From 517cd79e3fd0eea85d8aa981b68fca3ad85977c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BF=9F=E5=91=BD?= Date: Thu, 10 Feb 2022 18:11:11 +0800 Subject: [PATCH] update version to 5.13.6 --- README.md | 6 +- pom.xml | 427 +- .../openservices/tablestore/AsyncClient.java | 88 + .../tablestore/AsyncClientInterface.java | 873 +- .../tablestore/AsyncTimeseriesClient.java | 208 + .../AsyncTimeseriesClientInterface.java | 42 + .../tablestore/ClientConfiguration.java | 31 + .../tablestore/DefaultTableStoreWriter.java | 352 +- .../tablestore/InternalClient.java | 629 +- .../openservices/tablestore/SyncClient.java | 163 +- .../tablestore/SyncClientInterface.java | 937 +- .../tablestore/TableStoreWriter.java | 23 + .../tablestore/TimeseriesClient.java | 222 + .../tablestore/TimeseriesClientInterface.java | 31 + .../tablestore/TimeseriesConfiguration.java | 25 + .../openservices/tablestore/TunnelClient.java | 8 +- .../core/AddDefinedColumnLauncher.java | 63 + .../tablestore/core/AsyncCompletion.java | 83 +- .../tablestore/core/BulkExportLauncher.java | 63 + .../tablestore/core/BulkImportLauncher.java | 74 + .../tablestore/core/ClientResources.java | 62 + .../core/ComputeSplitsLauncher.java | 60 + .../tablestore/core/Constants.java | 17 +- .../core/CreateDeliveryTaskLauncher.java | 63 + .../core/CreateTableExLauncher.java | 64 + .../core/CreateTimeseriesTableLauncher.java | 60 + .../core/DeleteDefinedColumnLauncher.java | 63 + .../core/DeleteDeliveryTaskLauncher.java | 62 + .../core/DeleteTimeseriesMetaLauncher.java | 60 + .../core/DeleteTimeseriesTableLauncher.java | 60 + .../core/DescribeDeliveryTaskLauncher.java | 62 + .../core/DescribeTimeseriesTableLauncher.java | 60 + .../tablestore/core/GetRangeLauncher.java | 1 + .../core/GetTimeseriesDataLauncher.java | 60 + .../tablestore/core/LauncherFactory.java | 259 +- .../core/ListDeliveryTaskLauncher.java | 62 + .../core/ListTimeseriesTableLauncher.java | 60 + .../tablestore/core/ParallelScanLauncher.java | 60 + .../core/PutTimeseriesDataLauncher.java | 65 + .../core/QueryTimeseriesMetaLauncher.java | 60 + .../tablestore/core/ResourceManager.java | 68 + .../tablestore/core/SQLQueryLauncher.java | 62 + .../tablestore/core/TraceLogger.java | 2 +- .../core/UpdateSearchIndexLauncher.java | 63 + .../core/UpdateTimeseriesMetaLauncher.java | 60 + .../core/UpdateTimeseriesTableLauncher.java | 60 + .../tablestore/core/auth/AuthUtils.java | 12 +- .../core/auth/DefaultCredentialProvider.java | 5 + .../core/auth/DefaultCredentials.java | 4 + ...nvironmentVariableCredentialsProvider.java | 4 + .../SystemPropertiesCredentialsProvider.java | 4 + .../AddDefinedColumnResponseConsumer.java | 28 + .../core/http/BulkExportResponseConsumer.java | 29 + .../core/http/BulkImportResponseConsumer.java | 89 + .../http/ComputeSplitsResponseConsumer.java | 23 + .../core/http/ContentMD5ResponseHandler.java | 2 +- .../CreateDeliveryTaskResponseConsumer.java | 29 + ...CreateTimeseriesTableResponseConsumer.java | 26 + .../DeleteDefinedColumnResponseConsumer.java | 28 + .../DeleteDeliveryTaskResponseConsumer.java | 29 + .../DeleteTimeseriesMetaResponseConsumer.java | 26 + ...DeleteTimeseriesTableResponseConsumer.java | 26 + .../DescribeDeliveryTaskResponseConsumer.java | 29 + ...scribeTimeseriesTableResponseConsumer.java | 26 + .../core/http/ErrorResponseHandler.java | 2 +- .../http/GetBulkExportResponseConsumer.java | 30 + .../GetTimeseriesDataResponseConsumer.java | 26 + .../tablestore/core/http/HttpFactory.java | 9 +- .../ListDeliveryTaskResponseConsumer.java | 29 + .../ListTimeseriesTableResponseConsumer.java | 26 + .../core/http/OTSDeflateResponseHandler.java | 2 +- .../tablestore/core/http/OTSUri.java | 5 + .../http/OTSValidationResponseHandler.java | 2 +- .../http/ParallelScanResponseConsumer.java | 23 + .../PutTimeseriesDataResponseConsumer.java | 35 + .../QueryTimeseriesMetaResponseConsumer.java | 26 + .../tablestore/core/http/ResponseMessage.java | 14 +- .../core/http/SQLQueryResponseConsumer.java | 22 + .../UpdateSearchIndexResponseConsumer.java | 27 + .../UpdateTimeseriesMetaResponseConsumer.java | 26 + ...UpdateTimeseriesTableResponseConsumer.java | 26 + .../core/protocol/OTSProtocolBuilder.java | 475 +- .../core/protocol/OTSProtocolParser.java | 94 +- .../tablestore/core/protocol/OtsDelivery.java | 9071 ++ .../core/protocol/OtsDelivery.proto | 142 + .../tablestore/core/protocol/OtsFilter.java | 765 +- .../core/protocol/OtsInternalApi.java | 50399 +++++++---- .../protocol/PlainBufferCodedInputStream.java | 31 +- .../core/protocol/PlainBufferConversion.java | 6 +- .../core/protocol/ProtocolBufferParser.java | 12 +- .../core/protocol/ResponseFactory.java | 432 +- .../tablestore/core/protocol/Search.java | 75577 +++++++++++++--- .../protocol/SearchAggregationBuilder.java | 137 + .../protocol/SearchAggregationParser.java | 167 + .../SearchAggregationResultBuilder.java | 170 + .../core/protocol/SearchGroupByBuilder.java | 189 + .../core/protocol/SearchGroupByParser.java | 194 + .../protocol/SearchGroupByResultBuilder.java | 208 + .../core/protocol/SearchProtocolBuilder.java | 200 +- .../core/protocol/SearchProtocolParser.java | 278 +- .../core/protocol/SearchQueryBuilder.java | 31 +- .../core/protocol/SearchQueryParser.java | 347 + .../core/protocol/SearchSortBuilder.java | 91 +- .../core/protocol/SearchSortParser.java | 190 + .../core/protocol/SearchVariantType.java | 23 + .../core/protocol/TunnelProtocolBuilder.java | 76 +- .../core/protocol/TunnelServiceApi.java | 5435 +- .../tablestore/core/protocol/ots_filter.proto | 17 + .../core/protocol/ots_internal_api.proto | 187 +- .../tablestore/core/protocol/search.proto | 593 +- .../protocol/sql/flatbuffers/BytesValue.java | 38 + .../sql/flatbuffers/ColumnValues.java | 85 + .../protocol/sql/flatbuffers/DataType.java | 19 + .../sql/flatbuffers/RLEStringValues.java | 45 + .../sql/flatbuffers/SQLResponseColumn.java | 44 + .../sql/flatbuffers/SQLResponseColumns.java | 43 + .../tablestore/core/protocol/sql/sql.fbs | 38 + .../core/protocol/timeseries/Timeseries.java | 19165 ++++ .../timeseries/TimeseriesProtocolBuilder.java | 401 + .../timeseries/TimeseriesResponseFactory.java | 263 + .../timeseries/flatbuffer/BytesValue.java | 38 + .../timeseries/flatbuffer/DataType.java | 18 + .../timeseries/flatbuffer/FieldValues.java | 71 + .../flatbuffer/FlatBufferRowGroup.java | 59 + .../flatbuffer/FlatBufferRowInGroup.java | 54 + .../timeseries/flatbuffer/FlatBufferRows.java | 39 + .../core/protocol/timeseries/timeseries.fbs | 36 + .../core/protocol/timeseries/timeseries.proto | 214 + .../core/protocol/tunnel_service_api.proto | 15 + .../tablestore/core/utils/HttpUtil.java | 23 +- .../tablestore/core/utils/NumberUtils.java | 11 + .../tablestore/core/utils/PureJavaCrc32C.java | 630 + .../tablestore/core/utils/StringUtils.java | 12 + .../tablestore/core/utils/ValueUtil.java | 47 + .../tablestore/ecosystem/CatalogManager.java | 38 + .../ecosystem/ComputeParameters.java | 66 + .../DefaultTablestoreSplitManager.java | 293 + .../tablestore/ecosystem/Filter.java | 214 + .../ecosystem/FilterPushdownConfig.java | 21 + .../tablestore/ecosystem/GeoQueryHelper.java | 120 + .../tablestore/ecosystem/GeoType.java | 16 + .../tablestore/ecosystem/ICatalog.java | 4 + .../tablestore/ecosystem/ICatalogManager.java | 10 + .../ecosystem/ITablestoreSplit.java | 23 + .../ecosystem/ITablestoreSplitManager.java | 25 + .../tablestore/ecosystem/LeftMatchResult.java | 83 + .../ecosystem/SearchIndexFieldSchema.java | 7 + .../ecosystem/SearchIndexSchema.java | 13 + .../tablestore/ecosystem/SearchInfo.java | 22 + .../tablestore/ecosystem/TableCatalog.java | 101 + .../tablestore/ecosystem/TablestoreSplit.java | 1182 + .../ecosystem/TablestoreSplitIterator.java | 121 + .../expression/BinaryExpression.java | 44 + .../ecosystem/expression/Expression.java | 10 + .../expression/ExpressionVisitor.java | 9 + .../expression/LiteralExpression.java | 31 + .../ecosystem/expression/LogicExpression.java | 34 + .../expression/ReferenceExpression.java | 36 + .../expression/UnknownExpression.java | 20 + .../model/AddDefinedColumnRequest.java | 62 + .../model/AddDefinedColumnResponse.java | 12 + .../model/BatchWriteRowRequest.java | 34 + .../tablestore/model/BulkExportRequest.java | 42 + .../tablestore/model/BulkExportResponse.java | 90 + .../tablestore/model/BulkImportRequest.java | 92 + .../tablestore/model/BulkImportResponse.java | 162 + .../tablestore/model/CapacityDataSize.java | 171 + .../tablestore/model/ColumnValue.java | 746 +- .../model/ComputeSplitsBySizeRequest.java | 34 + .../model/ComputeSplitsRequest.java | 88 + .../model/ComputeSplitsResponse.java | 45 + .../tablestore/model/ConsumedCapacity.java | 36 +- .../tablestore/model/CreateIndexRequest.java | 1 + .../tablestore/model/CreateTableRequest.java | 61 + .../model/CreateTableRequestEx.java | 59 + .../tablestore/model/CustomRetryStrategy.java | 190 + .../tablestore/model/DataBlockType.java | 21 + .../model/DefaultRetryStrategy.java | 6 +- .../model/DeleteDefinedColumnRequest.java | 60 + .../model/DeleteDefinedColumnResponse.java | 12 + .../model/DescribeTableResponse.java | 40 + .../tablestore/model/GetRangeResponse.java | 10 + .../model/GetShardIteratorRequest.java | 44 +- .../model/GetShardIteratorResponse.java | 12 +- .../tablestore/model/IndexType.java | 3 +- .../tablestore/model/IndexUpdateMode.java | 6 +- .../tablestore/model/OperationNames.java | 200 +- .../model/PlainBufferBlockParser.java | 63 + .../model/PlainBufferBlockRowIterator.java | 94 + .../openservices/tablestore/model/Row.java | 19 +- .../tablestore/model/SSEDetails.java | 154 + .../tablestore/model/SSEKeyType.java | 15 + .../tablestore/model/SSESpecification.java | 219 + .../model/SearchIndexSplitsOptions.java | 25 + .../model/SimpleRowMatrixBlockConstants.java | 11 + .../model/SimpleRowMatrixBlockParser.java | 412 + .../SimpleRowMatrixBlockRowIterator.java | 218 + .../tablestore/model/SplitPointFactory.java | 90 + .../tablestore/model/SplitsOptions.java | 7 + .../tablestore/model/TableOptions.java | 70 +- .../tablestore/model/TimeseriesTableMeta.java | 130 + .../model/TimeseriesTableOptions.java | 106 + .../delivery/CreateDeliveryTaskRequest.java | 117 + .../delivery/CreateDeliveryTaskResponse.java | 11 + .../tablestore/model/delivery/DataType.java | 20 + .../delivery/DeleteDeliveryTaskRequest.java | 64 + .../delivery/DeleteDeliveryTaskResponse.java | 7 + .../model/delivery/DeliveryErrorType.java | 7 + .../model/delivery/DeliveryTaskInfo.java | 54 + .../model/delivery/DeliveryTaskType.java | 19 + .../delivery/DescribeDeliveryTaskRequest.java | 66 + .../DescribeDeliveryTaskResponse.java | 71 + .../model/delivery/EventColumn.java | 70 + .../model/delivery/EventTimeFormat.java | 9 + .../delivery/ListDeliveryTaskRequest.java | 40 + .../delivery/ListDeliveryTaskResponse.java | 29 + .../model/delivery/OSSFileEncoding.java | 9 + .../model/delivery/OSSFileFormat.java | 9 + .../model/delivery/OSSTaskConfig.java | 194 + .../model/delivery/ParquetSchema.java | 160 + .../model/delivery/TaskSyncPhase.java | 16 + .../model/delivery/TaskSyncStat.java | 78 + .../model/delivery/TimeFormatter.java | 8 + .../tablestore/model/filter/RegexRule.java | 48 + .../filter/SingleColumnValueRegexFilter.java | 187 + .../model/iterator/BulkExportIterator.java | 117 + .../GetRangeRowIterator.java} | 37 +- .../iterator/ParallelScanRowIterator.java | 82 + .../model/iterator/RowIterator.java | 9 + .../model/iterator/SearchRowIterator.java | 89 + .../tablestore/model/search/Collapse.java | 3 + .../search/CreateSearchIndexRequest.java | 59 + .../search/DescribeSearchIndexResponse.java | 90 + .../tablestore/model/search/FieldSchema.java | 136 +- .../tablestore/model/search/IndexSchema.java | 1 - .../tablestore/model/search/IndexSetting.java | 13 +- .../tablestore/model/search/MeteringInfo.java | 10 +- .../model/search/ParallelScanRequest.java | 214 + .../model/search/ParallelScanResponse.java | 69 + .../model/search/QueryFlowWeight.java | 65 + .../tablestore/model/search/ScanQuery.java | 194 + .../tablestore/model/search/SearchQuery.java | 149 +- .../model/search/SearchRequest.java | 266 +- .../model/search/SearchResponse.java | 62 +- .../tablestore/model/search/SyncStat.java | 2 - .../search/UpdateSearchIndexRequest.java | 124 + .../search/UpdateSearchIndexResponse.java | 9 + .../model/search/agg/Aggregation.java | 15 + .../model/search/agg/AggregationBuilder.java | 9 + .../model/search/agg/AggregationBuilders.java | 40 + .../model/search/agg/AggregationResult.java | 12 + .../model/search/agg/AggregationResults.java | 154 + .../model/search/agg/AggregationType.java | 20 + .../model/search/agg/AvgAggregation.java | 112 + .../search/agg/AvgAggregationResult.java | 40 + .../model/search/agg/CountAggregation.java | 86 + .../search/agg/CountAggregationResult.java | 34 + .../search/agg/DistinctCountAggregation.java | 111 + .../agg/DistinctCountAggregationResult.java | 33 + .../model/search/agg/MaxAggregation.java | 110 + .../search/agg/MaxAggregationResult.java | 35 + .../model/search/agg/MinAggregation.java | 108 + .../search/agg/MinAggregationResult.java | 34 + .../search/agg/PercentilesAggregation.java | 140 + .../agg/PercentilesAggregationItem.java | 27 + .../agg/PercentilesAggregationResult.java | 37 + .../model/search/agg/SumAggregation.java | 112 + .../search/agg/SumAggregationResult.java | 33 + .../model/search/agg/TopRowsAggregation.java | 95 + .../search/agg/TopRowsAggregationResult.java | 38 + .../search/analysis/AnalyzerParameter.java | 8 + .../analysis/AnalyzerParameterBuilder.java | 35 + .../analysis/FuzzyAnalyzerParameter.java | 44 + .../analysis/SingleWordAnalyzerParameter.java | 39 + .../analysis/SplitAnalyzerParameter.java | 28 + .../model/search/groupby/FieldRange.java | 31 + .../model/search/groupby/GroupBy.java | 12 + .../model/search/groupby/GroupByBuilder.java | 9 + .../model/search/groupby/GroupByBuilders.java | 28 + .../model/search/groupby/GroupByField.java | 215 + .../search/groupby/GroupByFieldResult.java | 36 + .../groupby/GroupByFieldResultItem.java | 50 + .../model/search/groupby/GroupByFilter.java | 142 + .../search/groupby/GroupByFilterResult.java | 37 + .../groupby/GroupByFilterResultItem.java | 39 + .../search/groupby/GroupByGeoDistance.java | 198 + .../groupby/GroupByGeoDistanceResult.java | 35 + .../groupby/GroupByGeoDistanceResultItem.java | 59 + .../search/groupby/GroupByHistogram.java | 267 + .../search/groupby/GroupByHistogramItem.java | 49 + .../groupby/GroupByHistogramResult.java | 34 + .../model/search/groupby/GroupByRange.java | 169 + .../search/groupby/GroupByRangeResult.java | 34 + .../groupby/GroupByRangeResultItem.java | 59 + .../model/search/groupby/GroupByResult.java | 12 + .../model/search/groupby/GroupByResults.java | 103 + .../model/search/groupby/GroupByType.java | 25 + .../model/search/groupby/Range.java | 29 + .../model/search/query/BoolQuery.java | 79 +- .../model/search/query/ConstScoreQuery.java | 29 +- .../model/search/query/ExistsQuery.java | 53 + .../search/query/FunctionScoreQuery.java | 30 +- .../search/query/GeoBoundingBoxQuery.java | 46 +- .../model/search/query/GeoDistanceQuery.java | 39 +- .../model/search/query/GeoPolygonQuery.java | 45 +- .../model/search/query/MatchAllQuery.java | 16 +- .../model/search/query/MatchPhraseQuery.java | 51 +- .../model/search/query/MatchQuery.java | 69 +- .../model/search/query/NestedQuery.java | 58 +- .../model/search/query/PrefixQuery.java | 50 +- .../model/search/query/QueryBuilder.java | 9 + .../model/search/query/QueryBuilders.java | 69 + .../model/search/query/QueryType.java | 3 +- .../model/search/query/RangeQuery.java | 59 +- .../model/search/query/TermQuery.java | 53 +- .../model/search/query/TermsQuery.java | 68 +- .../model/search/query/WildcardQuery.java | 49 +- .../model/search/sort/FieldSort.java | 24 + .../model/search/sort/GroupBySorter.java | 72 + .../model/search/sort/GroupKeySort.java | 28 + .../model/search/sort/RowCountSort.java | 28 + .../model/search/sort/SortOrder.java | 1 + .../model/search/sort/SubAggSort.java | 38 + .../tablestore/model/sql/SQLColumnSchema.java | 73 + .../tablestore/model/sql/SQLFactory.java | 46 + .../model/sql/SQLPayloadVersion.java | 12 + .../tablestore/model/sql/SQLQueryRequest.java | 43 + .../model/sql/SQLQueryResponse.java | 67 + .../tablestore/model/sql/SQLResultSet.java | 41 + .../model/sql/SQLResultSetImpl.java | 54 + .../tablestore/model/sql/SQLRow.java | 126 + .../tablestore/model/sql/SQLRowImpl.java | 176 + .../tablestore/model/sql/SQLRows.java | 38 + .../model/sql/SQLRowsFBsColumnBased.java | 153 + .../model/sql/SQLStatementType.java | 36 + .../tablestore/model/sql/SQLTableMeta.java | 34 + .../tablestore/model/sql/SQLUtils.java | 33 + .../AttributeMetaQueryCondition.java | 36 + .../CompositeMetaQueryCondition.java | 49 + .../CreateTimeseriesTableRequest.java | 49 + .../CreateTimeseriesTableResponse.java | 10 + .../DataSourceMetaQueryCondition.java | 32 + .../DeleteTimeseriesMetaRequest.java | 34 + .../DeleteTimeseriesMetaResponse.java | 49 + .../DeleteTimeseriesTableRequest.java | 46 + .../DeleteTimeseriesTableResponse.java | 10 + .../DescribeTimeseriesTableRequest.java | 49 + .../DescribeTimeseriesTableResponse.java | 32 + .../timeseries/GetTimeseriesDataRequest.java | 107 + .../timeseries/GetTimeseriesDataResponse.java | 32 + .../ListTimeseriesTableRequest.java | 19 + .../ListTimeseriesTableResponse.java | 75 + .../MeasurementMetaQueryCondition.java | 32 + .../MetaQueryCompositeOperator.java | 27 + .../model/timeseries/MetaQueryCondition.java | 11 + .../timeseries/MetaQuerySingleOperator.java | 40 + .../timeseries/PutTimeseriesDataRequest.java | 49 + .../timeseries/PutTimeseriesDataResponse.java | 49 + .../QueryTimeseriesMetaRequest.java | 60 + .../QueryTimeseriesMetaResponse.java | 41 + .../timeseries/TagMetaQueryCondition.java | 36 + .../model/timeseries/TimeseriesKey.java | 87 + .../model/timeseries/TimeseriesMeta.java | 49 + .../model/timeseries/TimeseriesRow.java | 74 + .../UpdateTimeMetaQueryCondition.java | 31 + .../UpdateTimeseriesMetaRequest.java | 34 + .../UpdateTimeseriesMetaResponse.java | 49 + .../UpdateTimeseriesTableRequest.java | 72 + .../UpdateTimeseriesTableResponse.java | 10 + .../model/tunnel/BulkExportQueryCriteria.java | 226 + .../model/tunnel/CreateTunnelRequest.java | 13 + .../model/tunnel/StartOffsetFlag.java | 12 + .../model/tunnel/StreamTunnelConfig.java | 67 + .../tablestore/model/tunnel/TunnelInfo.java | 29 +- .../tablestore/timeline/TimelineQueue.java | 23 + .../timeline/core/TimelineEntryIterator.java | 5 +- .../timeline/core/TimelineQueueImpl.java | 67 + .../timeline/core/TimelineStoreImpl.java | 1 + .../timestream/model/query/DataGetter.java | 4 +- .../timestream/model/query/DataQuery.java | 12 +- .../timestream/model/query/MetaFilter.java | 2 +- .../tunnel/pipeline/ProcessDataBackoff.java | 9 +- .../tunnel/pipeline/ProcessDataPipeline.java | 111 +- .../pipeline/ProcessDataPipelineContext.java | 20 +- .../tablestore/tunnel/pipeline/Utils.java | 2 +- .../tunnel/worker/ChannelConnect.java | 4 +- .../tunnel/worker/ChannelDialer.java | 40 +- .../tunnel/worker/TunnelStateMachine.java | 2 +- .../tunnel/worker/TunnelWorker.java | 101 +- .../tunnel/worker/TunnelWorkerConfig.java | 148 +- .../tablestore/writer/Bucket.java | 105 + .../tablestore/writer/CallbackFactory.java | 17 + .../writer/DefaultWriterStatistics.java | 40 - .../tablestore/writer/FlushCallback.java | 223 - .../openservices/tablestore/writer/Group.java | 69 + .../tablestore/writer/RequestManager.java | 18 + .../tablestore/writer/RequestWithGroups.java | 23 + .../tablestore/writer/RowChangeEvent.java | 6 +- .../writer/RowChangeEventHandler.java | 115 - .../tablestore/writer/RowChangeWithGroup.java | 14 + .../tablestore/writer/WriteRPCBuffer.java | 59 - .../tablestore/writer/WriterConfig.java | 164 +- .../tablestore/writer/WriterResult.java | 83 + .../tablestore/writer/WriterStatistics.java | 1 + .../writer/config/BucketConfig.java | 34 + .../writer/dispatch/BaseDispatcher.java | 28 + .../writer/dispatch/Dispatcher.java | 11 + .../dispatch/HashPartitionKeyDispatcher.java | 23 + .../dispatch/HashPrimaryKeyDispatcher.java | 22 + .../writer/dispatch/RoundRobinDispatcher.java | 24 + .../writer/enums/BatchRequestType.java | 13 + .../tablestore/writer/enums/DispatchMode.java | 17 + .../tablestore/writer/enums/WriteMode.java | 15 + .../writer/enums/WriterRetryStrategy.java | 25 + .../writer/handle/BaseRequestManager.java | 98 + .../handle/BatchWriteRowRequestManager.java | 49 + .../handle/BulkImportRequestManager.java | 50 + .../writer/handle/FlushCallback.java | 342 + .../writer/handle/FlushCallbackFactory.java | 49 + .../writer/handle/RowEventHandler.java | 150 + .../writer/handle/WriterHandleStatistics.java | 55 + .../writer/retry/BaseWriterRetryStrategy.java | 102 + .../retry/CertainCodeNotRetryStrategy.java | 53 + .../retry/CertainCodeRetryStrategy.java | 52 + .../tablestore/common/ServiceSettings.java | 34 +- .../openservices/tablestore/common/Utils.java | 2 +- .../tablestore/core/ResourceManagerTest.java | 99 + .../tablestore/core/auth/TestCredentials.java | 12 + .../core/protocol/BaseSearchTest.java | 1150 + .../core/protocol/OTSProtocolBuilderTest.java | 84 + .../protocol/ProtocolBufferParserTest.java | 51 + .../core/protocol/SearchVariantTypeTest.java | 40 + .../core/protocol/TestScanQueryBuilder.java | 79 + .../protocol/TestSearchProtocolBuilder.java | 464 + .../protocol/TestSearchProtocolParser.java | 455 + .../core/protocol/TestSearchQueryBuilder.java | 456 + .../tablestore/core/utils/HttpUtilTest.java | 38 + .../core/utils/NumberUtilsTest.java | 33 + .../tablestore/core/utils/Repeat.java | 13 + .../tablestore/core/utils/RepeatRule.java | 45 + .../tablestore/core/utils/StringUtilTest.java | 27 + .../tablestore/ecosystem/GeoWriter.java | 145 + .../ecosystem/testGetUnhandledOtsFilter.java | 159 + .../ecosystem/testSplitsGeneration.java | 622 + .../testSplitsGenerationForSearchIndex.java | 474 + .../ecosystem/testTablestoreSplit.java | 629 + .../tablestore/functiontest/APITest.java | 53 + .../functiontest/DataOperationTest.java | 2 +- .../tablestore/functiontest/LocalTxnTest.java | 71 +- .../functiontest/OTSAPIBehaviorTest.java | 51 + .../functiontest/RestrictedItemTest.java | 6 +- .../functiontest/SecondaryIndexTest.java | 421 + .../functiontest/SplitPointTest.java | 482 + .../functiontest/TableCreationTimeTest.java | 103 + .../functiontest/TestBulkExportFunciton.java | 1188 + .../functiontest/TestBulkImportFunction.java | 432 + .../TestComputeSplitPointsBySize.java | 250 + .../functiontest/TestComputeSplitsBySize.java | 267 +- .../TestCreateTableExFunciton.java | 196 + .../functiontest/TimeseriesTest.java | 451 + .../model/ComputeSplitsRequestTest.java | 71 + .../model/ComputeSplitsResponseTest.java | 28 + .../tablestore/model/OperationNamesTest.java | 14 + .../model/SearchIndexSplitsOptionsTest.java | 21 + .../tablestore/model/TableOptionsTest.java | 34 + .../tablestore/model/TestBulkExport.java | 42 + .../model/TestPartitionPointsFactory.java | 402 + .../model/UnifiedConditionalUpdateTest.java | 35 +- ...FilterRestrictionAndParamCheckingTest.java | 170 +- .../TestSingleColumnValueRegexFilter.java | 232 + .../search/CreateSearchIndexRequestTest.java | 70 + .../model/search/ParallelScanRequestTest.java | 29 + .../model/search/ScanQueryTest.java | 119 + .../model/search/SearchQueryTest.java | 355 + .../model/search/SearchRequestTest.java | 317 + .../TestDescribeSearchIndexResponse.java | 147 + .../model/search/TestExistsQuery.java | 50 + .../model/search/TestFieldSchema.java | 341 + .../model/search/TestGeoDecode.java | 56 + .../search/UpdateSearchIndexRequestTest.java | 64 + .../search/agg/AggregationBuildersTest.java | 169 + .../search/agg/AggregationResultsTest.java | 112 + .../AnalyzerParameterBuilderTest.java | 55 + .../search/groupby/GroupByBuildersTest.java | 211 + .../search/groupby/GroupByResultsTest.java | 55 + .../functionTest/TestSearchParameter.java | 2 +- .../functionTest/TestSearchQueue.java | 229 + .../functionTest/TestTimelineService.java | 2 +- .../internal/MetaCacheManagerUnittest.java | 17 +- .../model/filter/OrFiltterUnittest.java | 32 - .../functiontest/TestBackFillTunnel.java | 117 + .../functiontest/TestMaxChannelParallel.java | 97 + .../tunnel/functiontest/TestTunnel.java | 29 +- .../functiontest/TestTunnelConsumer.java | 297 + ...va => TestTunnelWorkerMultiReadTimes.java} | 32 +- .../TestExceptionFailedSingleRetry.java | 228 + .../writer/TestPartitionFailed.java | 312 + .../writer/TestUnknownExceptionFailed.java | 216 + .../tablestore/writer/TestWriter.java | 164 +- .../TestWriterInnerConstructClient.java | 888 + .../tablestore/writer/TestWriterParallel.java | 260 + .../tablestore/writer/TestWriterPerf.java | 49 +- .../writer/TestWriterSequential.java | 260 + .../TestWriterUserProvidedClientConfig.java | 237 + .../writer/TestWriterWithGlobaIndex.java | 263 + .../writer/{ => unittest}/MultiPMultiC.java | 2 +- .../writer/{ => unittest}/OnePOneC.java | 2 +- .../writer/{ => unittest}/RingBufferPerf.java | 2 +- .../writer/unittest/TestDispatcher.java | 100 + .../tablestore/writer/unittest/TestGroup.java | 177 + .../writer/unittest/TestWriterConfig.java | 129 + .../writer/unittest/TestWriterResult.java | 47 + .../writer/unittest/TestWriterRetry.java | 122 + .../java/examples/DataOperationSample.java | 53 + .../examples/DeliveryOperationSample.java | 93 + src/test/java/examples/GlobalIndexSample.java | 37 + src/test/java/examples/SQLQuerySample.java | 154 + src/test/java/examples/SearchIndexSample.java | 814 +- .../SearchIndexSerializationSample.java | 65 + .../examples/ServerSideEncryptionSample.java | 167 + src/test/java/examples/WriterSample.java | 233 + src/test/resources/conf.properties | 1 + 522 files changed, 175152 insertions(+), 36031 deletions(-) create mode 100644 src/main/java/com/alicloud/openservices/tablestore/AsyncTimeseriesClient.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/AsyncTimeseriesClientInterface.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/TimeseriesClient.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/TimeseriesClientInterface.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/TimeseriesConfiguration.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/AddDefinedColumnLauncher.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/BulkExportLauncher.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/BulkImportLauncher.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/ClientResources.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/ComputeSplitsLauncher.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/CreateDeliveryTaskLauncher.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/CreateTableExLauncher.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/CreateTimeseriesTableLauncher.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/DeleteDefinedColumnLauncher.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/DeleteDeliveryTaskLauncher.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/DeleteTimeseriesMetaLauncher.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/DeleteTimeseriesTableLauncher.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/DescribeDeliveryTaskLauncher.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/DescribeTimeseriesTableLauncher.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/GetTimeseriesDataLauncher.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/ListDeliveryTaskLauncher.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/ListTimeseriesTableLauncher.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/ParallelScanLauncher.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/PutTimeseriesDataLauncher.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/QueryTimeseriesMetaLauncher.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/ResourceManager.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/SQLQueryLauncher.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/UpdateSearchIndexLauncher.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/UpdateTimeseriesMetaLauncher.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/UpdateTimeseriesTableLauncher.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/http/AddDefinedColumnResponseConsumer.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/http/BulkExportResponseConsumer.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/http/BulkImportResponseConsumer.java create mode 100755 src/main/java/com/alicloud/openservices/tablestore/core/http/ComputeSplitsResponseConsumer.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/http/CreateDeliveryTaskResponseConsumer.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/http/CreateTimeseriesTableResponseConsumer.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/http/DeleteDefinedColumnResponseConsumer.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/http/DeleteDeliveryTaskResponseConsumer.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/http/DeleteTimeseriesMetaResponseConsumer.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/http/DeleteTimeseriesTableResponseConsumer.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/http/DescribeDeliveryTaskResponseConsumer.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/http/DescribeTimeseriesTableResponseConsumer.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/http/GetBulkExportResponseConsumer.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/http/GetTimeseriesDataResponseConsumer.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/http/ListDeliveryTaskResponseConsumer.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/http/ListTimeseriesTableResponseConsumer.java create mode 100755 src/main/java/com/alicloud/openservices/tablestore/core/http/ParallelScanResponseConsumer.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/http/PutTimeseriesDataResponseConsumer.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/http/QueryTimeseriesMetaResponseConsumer.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/http/SQLQueryResponseConsumer.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/http/UpdateSearchIndexResponseConsumer.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/http/UpdateTimeseriesMetaResponseConsumer.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/http/UpdateTimeseriesTableResponseConsumer.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/protocol/OtsDelivery.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/protocol/OtsDelivery.proto create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchAggregationBuilder.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchAggregationParser.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchAggregationResultBuilder.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchGroupByBuilder.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchGroupByParser.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchGroupByResultBuilder.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchQueryParser.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchSortParser.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/protocol/sql/flatbuffers/BytesValue.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/protocol/sql/flatbuffers/ColumnValues.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/protocol/sql/flatbuffers/DataType.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/protocol/sql/flatbuffers/RLEStringValues.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/protocol/sql/flatbuffers/SQLResponseColumn.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/protocol/sql/flatbuffers/SQLResponseColumns.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/protocol/sql/sql.fbs create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/protocol/timeseries/Timeseries.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/protocol/timeseries/TimeseriesProtocolBuilder.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/protocol/timeseries/TimeseriesResponseFactory.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/protocol/timeseries/flatbuffer/BytesValue.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/protocol/timeseries/flatbuffer/DataType.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/protocol/timeseries/flatbuffer/FieldValues.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/protocol/timeseries/flatbuffer/FlatBufferRowGroup.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/protocol/timeseries/flatbuffer/FlatBufferRowInGroup.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/protocol/timeseries/flatbuffer/FlatBufferRows.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/protocol/timeseries/timeseries.fbs create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/protocol/timeseries/timeseries.proto create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/utils/NumberUtils.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/utils/PureJavaCrc32C.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/core/utils/ValueUtil.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/ecosystem/CatalogManager.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/ecosystem/ComputeParameters.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/ecosystem/DefaultTablestoreSplitManager.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/ecosystem/Filter.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/ecosystem/FilterPushdownConfig.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/ecosystem/GeoQueryHelper.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/ecosystem/GeoType.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/ecosystem/ICatalog.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/ecosystem/ICatalogManager.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/ecosystem/ITablestoreSplit.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/ecosystem/ITablestoreSplitManager.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/ecosystem/LeftMatchResult.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/ecosystem/SearchIndexFieldSchema.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/ecosystem/SearchIndexSchema.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/ecosystem/SearchInfo.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/ecosystem/TableCatalog.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/ecosystem/TablestoreSplit.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/ecosystem/TablestoreSplitIterator.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/ecosystem/expression/BinaryExpression.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/ecosystem/expression/Expression.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/ecosystem/expression/ExpressionVisitor.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/ecosystem/expression/LiteralExpression.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/ecosystem/expression/LogicExpression.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/ecosystem/expression/ReferenceExpression.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/ecosystem/expression/UnknownExpression.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/AddDefinedColumnRequest.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/AddDefinedColumnResponse.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/BulkExportRequest.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/BulkExportResponse.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/BulkImportRequest.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/BulkImportResponse.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/CapacityDataSize.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/ComputeSplitsRequest.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/ComputeSplitsResponse.java create mode 100755 src/main/java/com/alicloud/openservices/tablestore/model/CreateTableRequestEx.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/CustomRetryStrategy.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/DataBlockType.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/DeleteDefinedColumnRequest.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/DeleteDefinedColumnResponse.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/PlainBufferBlockParser.java create mode 100755 src/main/java/com/alicloud/openservices/tablestore/model/PlainBufferBlockRowIterator.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/SSEDetails.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/SSEKeyType.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/SSESpecification.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/SearchIndexSplitsOptions.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/SimpleRowMatrixBlockConstants.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/SimpleRowMatrixBlockParser.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/SimpleRowMatrixBlockRowIterator.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/SplitPointFactory.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/SplitsOptions.java create mode 100755 src/main/java/com/alicloud/openservices/tablestore/model/TimeseriesTableMeta.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/TimeseriesTableOptions.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/delivery/CreateDeliveryTaskRequest.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/delivery/CreateDeliveryTaskResponse.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/delivery/DataType.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/delivery/DeleteDeliveryTaskRequest.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/delivery/DeleteDeliveryTaskResponse.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/delivery/DeliveryErrorType.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/delivery/DeliveryTaskInfo.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/delivery/DeliveryTaskType.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/delivery/DescribeDeliveryTaskRequest.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/delivery/DescribeDeliveryTaskResponse.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/delivery/EventColumn.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/delivery/EventTimeFormat.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/delivery/ListDeliveryTaskRequest.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/delivery/ListDeliveryTaskResponse.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/delivery/OSSFileEncoding.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/delivery/OSSFileFormat.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/delivery/OSSTaskConfig.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/delivery/ParquetSchema.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/delivery/TaskSyncPhase.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/delivery/TaskSyncStat.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/delivery/TimeFormatter.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/filter/RegexRule.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/filter/SingleColumnValueRegexFilter.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/iterator/BulkExportIterator.java rename src/main/java/com/alicloud/openservices/tablestore/model/{RowIterator.java => iterator/GetRangeRowIterator.java} (78%) create mode 100755 src/main/java/com/alicloud/openservices/tablestore/model/iterator/ParallelScanRowIterator.java create mode 100755 src/main/java/com/alicloud/openservices/tablestore/model/iterator/RowIterator.java create mode 100755 src/main/java/com/alicloud/openservices/tablestore/model/iterator/SearchRowIterator.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/ParallelScanRequest.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/ParallelScanResponse.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/QueryFlowWeight.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/ScanQuery.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/UpdateSearchIndexRequest.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/UpdateSearchIndexResponse.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/agg/Aggregation.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/agg/AggregationBuilder.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/agg/AggregationBuilders.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/agg/AggregationResult.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/agg/AggregationResults.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/agg/AggregationType.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/agg/AvgAggregation.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/agg/AvgAggregationResult.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/agg/CountAggregation.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/agg/CountAggregationResult.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/agg/DistinctCountAggregation.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/agg/DistinctCountAggregationResult.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/agg/MaxAggregation.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/agg/MaxAggregationResult.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/agg/MinAggregation.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/agg/MinAggregationResult.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/agg/PercentilesAggregation.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/agg/PercentilesAggregationItem.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/agg/PercentilesAggregationResult.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/agg/SumAggregation.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/agg/SumAggregationResult.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/agg/TopRowsAggregation.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/agg/TopRowsAggregationResult.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/analysis/AnalyzerParameter.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/analysis/AnalyzerParameterBuilder.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/analysis/FuzzyAnalyzerParameter.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/analysis/SingleWordAnalyzerParameter.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/analysis/SplitAnalyzerParameter.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/FieldRange.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupBy.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByBuilder.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByBuilders.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByField.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByFieldResult.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByFieldResultItem.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByFilter.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByFilterResult.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByFilterResultItem.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByGeoDistance.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByGeoDistanceResult.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByGeoDistanceResultItem.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByHistogram.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByHistogramItem.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByHistogramResult.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByRange.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByRangeResult.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByRangeResultItem.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByResult.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByResults.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByType.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/Range.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/query/ExistsQuery.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/query/QueryBuilder.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/query/QueryBuilders.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/sort/GroupBySorter.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/sort/GroupKeySort.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/sort/RowCountSort.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/search/sort/SubAggSort.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLColumnSchema.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLFactory.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLPayloadVersion.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLQueryRequest.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLQueryResponse.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLResultSet.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLResultSetImpl.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLRow.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLRowImpl.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLRows.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLRowsFBsColumnBased.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLStatementType.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLTableMeta.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLUtils.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/timeseries/AttributeMetaQueryCondition.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/timeseries/CompositeMetaQueryCondition.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/timeseries/CreateTimeseriesTableRequest.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/timeseries/CreateTimeseriesTableResponse.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/timeseries/DataSourceMetaQueryCondition.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/timeseries/DeleteTimeseriesMetaRequest.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/timeseries/DeleteTimeseriesMetaResponse.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/timeseries/DeleteTimeseriesTableRequest.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/timeseries/DeleteTimeseriesTableResponse.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/timeseries/DescribeTimeseriesTableRequest.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/timeseries/DescribeTimeseriesTableResponse.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/timeseries/GetTimeseriesDataRequest.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/timeseries/GetTimeseriesDataResponse.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/timeseries/ListTimeseriesTableRequest.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/timeseries/ListTimeseriesTableResponse.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/timeseries/MeasurementMetaQueryCondition.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/timeseries/MetaQueryCompositeOperator.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/timeseries/MetaQueryCondition.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/timeseries/MetaQuerySingleOperator.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/timeseries/PutTimeseriesDataRequest.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/timeseries/PutTimeseriesDataResponse.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/timeseries/QueryTimeseriesMetaRequest.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/timeseries/QueryTimeseriesMetaResponse.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/timeseries/TagMetaQueryCondition.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/timeseries/TimeseriesKey.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/timeseries/TimeseriesMeta.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/timeseries/TimeseriesRow.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/timeseries/UpdateTimeMetaQueryCondition.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/timeseries/UpdateTimeseriesMetaRequest.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/timeseries/UpdateTimeseriesMetaResponse.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/timeseries/UpdateTimeseriesTableRequest.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/timeseries/UpdateTimeseriesTableResponse.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/tunnel/BulkExportQueryCriteria.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/tunnel/StartOffsetFlag.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/model/tunnel/StreamTunnelConfig.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/writer/Bucket.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/writer/CallbackFactory.java delete mode 100644 src/main/java/com/alicloud/openservices/tablestore/writer/DefaultWriterStatistics.java delete mode 100644 src/main/java/com/alicloud/openservices/tablestore/writer/FlushCallback.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/writer/Group.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/writer/RequestManager.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/writer/RequestWithGroups.java delete mode 100644 src/main/java/com/alicloud/openservices/tablestore/writer/RowChangeEventHandler.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/writer/RowChangeWithGroup.java delete mode 100644 src/main/java/com/alicloud/openservices/tablestore/writer/WriteRPCBuffer.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/writer/WriterResult.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/writer/config/BucketConfig.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/writer/dispatch/BaseDispatcher.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/writer/dispatch/Dispatcher.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/writer/dispatch/HashPartitionKeyDispatcher.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/writer/dispatch/HashPrimaryKeyDispatcher.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/writer/dispatch/RoundRobinDispatcher.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/writer/enums/BatchRequestType.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/writer/enums/DispatchMode.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/writer/enums/WriteMode.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/writer/enums/WriterRetryStrategy.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/writer/handle/BaseRequestManager.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/writer/handle/BatchWriteRowRequestManager.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/writer/handle/BulkImportRequestManager.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/writer/handle/FlushCallback.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/writer/handle/FlushCallbackFactory.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/writer/handle/RowEventHandler.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/writer/handle/WriterHandleStatistics.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/writer/retry/BaseWriterRetryStrategy.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/writer/retry/CertainCodeNotRetryStrategy.java create mode 100644 src/main/java/com/alicloud/openservices/tablestore/writer/retry/CertainCodeRetryStrategy.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/core/ResourceManagerTest.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/core/protocol/BaseSearchTest.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/core/protocol/OTSProtocolBuilderTest.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/core/protocol/ProtocolBufferParserTest.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/core/protocol/SearchVariantTypeTest.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/core/protocol/TestScanQueryBuilder.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/core/protocol/TestSearchProtocolBuilder.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/core/protocol/TestSearchProtocolParser.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/core/protocol/TestSearchQueryBuilder.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/core/utils/HttpUtilTest.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/core/utils/NumberUtilsTest.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/core/utils/Repeat.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/core/utils/RepeatRule.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/core/utils/StringUtilTest.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/ecosystem/GeoWriter.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/ecosystem/testGetUnhandledOtsFilter.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/ecosystem/testSplitsGeneration.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/ecosystem/testSplitsGenerationForSearchIndex.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/ecosystem/testTablestoreSplit.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/functiontest/SecondaryIndexTest.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/functiontest/SplitPointTest.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/functiontest/TableCreationTimeTest.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/functiontest/TestBulkExportFunciton.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/functiontest/TestBulkImportFunction.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/functiontest/TestComputeSplitPointsBySize.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/functiontest/TestCreateTableExFunciton.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/functiontest/TimeseriesTest.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/model/ComputeSplitsRequestTest.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/model/ComputeSplitsResponseTest.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/model/OperationNamesTest.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/model/SearchIndexSplitsOptionsTest.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/model/TableOptionsTest.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/model/TestBulkExport.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/model/TestPartitionPointsFactory.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/model/filter/TestSingleColumnValueRegexFilter.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/model/search/CreateSearchIndexRequestTest.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/model/search/ParallelScanRequestTest.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/model/search/ScanQueryTest.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/model/search/SearchQueryTest.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/model/search/SearchRequestTest.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/model/search/TestDescribeSearchIndexResponse.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/model/search/TestExistsQuery.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/model/search/TestFieldSchema.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/model/search/TestGeoDecode.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/model/search/UpdateSearchIndexRequestTest.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/model/search/agg/AggregationBuildersTest.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/model/search/agg/AggregationResultsTest.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/model/search/analysis/AnalyzerParameterBuilderTest.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByBuildersTest.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByResultsTest.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/timeline/functionTest/TestSearchQueue.java delete mode 100644 src/test/java/com/alicloud/openservices/tablestore/timestream/model/filter/OrFiltterUnittest.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/tunnel/functiontest/TestBackFillTunnel.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/tunnel/functiontest/TestMaxChannelParallel.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/tunnel/functiontest/TestTunnelConsumer.java rename src/test/java/com/alicloud/openservices/tablestore/tunnel/functiontest/{TestTunnelWorkerReconnect.java => TestTunnelWorkerMultiReadTimes.java} (54%) create mode 100644 src/test/java/com/alicloud/openservices/tablestore/writer/TestExceptionFailedSingleRetry.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/writer/TestPartitionFailed.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/writer/TestUnknownExceptionFailed.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/writer/TestWriterInnerConstructClient.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/writer/TestWriterParallel.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/writer/TestWriterSequential.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/writer/TestWriterUserProvidedClientConfig.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/writer/TestWriterWithGlobaIndex.java rename src/test/java/com/alicloud/openservices/tablestore/writer/{ => unittest}/MultiPMultiC.java (98%) rename src/test/java/com/alicloud/openservices/tablestore/writer/{ => unittest}/OnePOneC.java (98%) rename src/test/java/com/alicloud/openservices/tablestore/writer/{ => unittest}/RingBufferPerf.java (98%) create mode 100644 src/test/java/com/alicloud/openservices/tablestore/writer/unittest/TestDispatcher.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/writer/unittest/TestGroup.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/writer/unittest/TestWriterConfig.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/writer/unittest/TestWriterResult.java create mode 100644 src/test/java/com/alicloud/openservices/tablestore/writer/unittest/TestWriterRetry.java create mode 100644 src/test/java/examples/DeliveryOperationSample.java create mode 100644 src/test/java/examples/SQLQuerySample.java create mode 100644 src/test/java/examples/SearchIndexSerializationSample.java create mode 100644 src/test/java/examples/ServerSideEncryptionSample.java create mode 100644 src/test/java/examples/WriterSample.java diff --git a/README.md b/README.md index 4d568ac..62cdb78 100644 --- a/README.md +++ b/README.md @@ -9,19 +9,19 @@ - 阿里云表格存储是阿里云自主研发的NoSQL数据存储服务,提供海量结构化数据的存储和实时访问。 ## 版本 - - 当前版本:4.12.1 + - 当前版本:5.13.6 ## 运行环境 - JDK 6及其以上 ## 安装 #### Maven方式 -下载[最新版JAR包](https://search.maven.org/remotecontent?filepath=com/aliyun/openservices/tablestore/4.12.1/tablestore-4.12.1.jar)或者通过Maven: +下载[最新版JAR包](https://search.maven.org/remotecontent?filepath=com/aliyun/openservices/tablestore/5.13.6/tablestore-5.13.6.jar)或者通过Maven: ```xml com.aliyun.openservices tablestore - 4.12.1 + 5.13.6 ``` diff --git a/pom.xml b/pom.xml index ecda6bd..f126530 100755 --- a/pom.xml +++ b/pom.xml @@ -1,57 +1,56 @@ - - - 4.0.0 - com.aliyun.openservices - tablestore - 4.12.2 - jar - AliCloud TableStore SDK for Java - http://www.aliyun.com - - com.taobao - parent - 1.0.2 - - Aliyun Open Services SDK for Java Copyright (C) Alibaba Cloud Computing All rights reserved. 版权所有 (C)阿里云计算有限公司 http://www.aliyun.com - - - java8-doclint-disabled - - [1.8,) - - - -Xdoclint:none - - - - - - junit - junit - 4.10 - test - - - commons-io - commons-io - 2.4 - test - - - com.google.protobuf - protobuf-java - 2.4.1 - - - org.apache.httpcomponents - httpasyncclient - 4.0.2 - - - joda-time - joda-time - 2.9.1 + + 4.0.0 + com.aliyun.openservices + tablestore + 5.13.6 + jar + AliCloud TableStore SDK for Java + http://www.aliyun.com + + com.taobao + parent + 1.0.2 + + Aliyun Open Services SDK for Java Copyright (C) Alibaba Cloud Computing All rights reserved. 版权所有 (C)阿里云计算有限公司 http://www.aliyun.com + + + java8-doclint-disabled + + [1.8,) + + + -Xdoclint:none + + + + + + junit + junit + 4.10 + test + + + commons-io + commons-io + 2.4 + test + + + com.google.protobuf + protobuf-java + 2.4.1 + + + org.apache.httpcomponents + httpasyncclient + 4.0.2 + + + joda-time + joda-time + 2.9.1 org.slf4j @@ -59,174 +58,194 @@ 1.7.25 - org.apache.logging.log4j - log4j-core - 2.0.2 + org.apache.logging.log4j + log4j-core + 2.17.1 runtime true - org.apache.logging.log4j - log4j-slf4j-impl - 2.0.2 + org.apache.logging.log4j + log4j-slf4j-impl + 2.17.1 runtime true - com.lmax - disruptor - 3.0.1 + com.lmax + disruptor + 3.4.4 - com.google.code.gson - gson - 2.8.5 + com.google.code.gson + gson + 2.8.5 com.google.guava guava 27.0.1-jre - - - - - maven-compiler-plugin - 2.3.2 - - 1.6 - 1.6 - UTF-8 - - - - org.apache.maven.plugins - maven-jar-plugin - 2.3.2 - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.10 - - -Dfile.encoding=UTF-8 - - - - run-test - test - - test - - - - **/integration/*.java - - - - - - - maven-failsafe-plugin - 2.6 - - -Dfile.encoding=UTF-8 - - - - - integration-test - verify - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 2.8 - - UTF-8 - com.aliyun.common.*;*.internal;*.internal.*;*.impl; - - - author - X - - - - - - package - - jar - - - ${javadoc.opts} - - - - - - org.apache.maven.plugins - maven-shade-plugin - 1.4 - - - - commons-logging:commons-logging:jar: - joda-time:joda-time:jar: - org.apache.logging.log4j:log4j-api:jar: - org.apache.logging.log4j:log4j-core:jar: - org.apache.logging.log4j:log4j-slf4j-impl:jar: - org.slf4j:slf4j-api:jar: - com.lmax:disruptor:jar: - commons-codec:commons-codec:jar: + + com.google.flatbuffers + flatbuffers-java + 1.11.0 + + + + + + maven-compiler-plugin + 2.3.2 + + 1.6 + 1.6 + UTF-8 + + + + org.apache.maven.plugins + maven-jar-plugin + 2.3.2 + + + + org.apache.maven.plugins + maven-source-plugin + 2.3 + + + attach-sources + + jar-no-fork + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.10 + + -Dfile.encoding=UTF-8 + + + + run-test + test + + test + + + + **/integration/*.java + **/examples/*.java + + + + + + + maven-failsafe-plugin + 2.6 + + -Dfile.encoding=UTF-8 + + + + + integration-test + verify + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.8 + + UTF-8 + com.aliyun.common.*;*.internal;*.internal.*;*.impl; + + + author + X + + + + + + package + + jar + + + ${javadoc.opts} + + + + + + org.apache.maven.plugins + maven-shade-plugin + 1.4 + + + + commons-logging:commons-logging:jar: + joda-time:joda-time:jar: + org.apache.logging.log4j:log4j-api:jar: + org.apache.logging.log4j:log4j-core:jar: + org.apache.logging.log4j:log4j-slf4j-impl:jar: + org.slf4j:slf4j-api:jar: + com.lmax:disruptor:jar: + commons-codec:commons-codec:jar: org.hamcrest:hamcrest-core:jar: com.google.code.gson:gson:jar: com.google.guava:guava:jar: - - - - - com.google.protobuf - com.aliyun.ots.thirdparty.com.google.protobuf - - - org.apache.http - com.aliyun.ots.thirdparty.org.apache - - - jar-with-dependencies - true - - - - package - - shade - - - - - - maven-assembly-plugin - - - src/main/assembly/package.xml - - - - - dwzip - package - - single - - - - - - + com.google.flatbuffers:flatbuffers-java:jar: + + + + + com.google.protobuf + com.aliyun.ots.thirdparty.com.google.protobuf + + + org.apache.http + com.aliyun.ots.thirdparty.org.apache + + + jar-with-dependencies + true + + + + package + + shade + + + + + + maven-assembly-plugin + + + src/main/assembly/package.xml + + + + + dwzip + package + + single + + + + + + diff --git a/src/main/java/com/alicloud/openservices/tablestore/AsyncClient.java b/src/main/java/com/alicloud/openservices/tablestore/AsyncClient.java index 2b5d40b..efcb38c 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/AsyncClient.java +++ b/src/main/java/com/alicloud/openservices/tablestore/AsyncClient.java @@ -4,9 +4,13 @@ import java.util.concurrent.Future; import java.util.concurrent.ExecutorService; +import com.alicloud.openservices.tablestore.core.ResourceManager; import com.alicloud.openservices.tablestore.core.auth.CredentialsProvider; import com.alicloud.openservices.tablestore.model.*; +import com.alicloud.openservices.tablestore.model.delivery.*; import com.alicloud.openservices.tablestore.model.search.*; +import com.alicloud.openservices.tablestore.model.sql.SQLQueryRequest; +import com.alicloud.openservices.tablestore.model.sql.SQLQueryResponse; public class AsyncClient implements AsyncClientInterface { @@ -105,6 +109,11 @@ public AsyncClient(String endpoint, String accessKeyId, internalClient = new InternalClient(endpoint, accessKeyId, accessKeySecret, instanceName, config, callbackExecutor, stsToken); } + public AsyncClient(String endpoint, CredentialsProvider credsProvider, String instanceName, + ClientConfiguration config, ResourceManager resourceManager) { + internalClient = new InternalClient(endpoint, credsProvider, instanceName, config, resourceManager); + } + AsyncClient(InternalClient internalClient) { this.internalClient = internalClient; } @@ -186,6 +195,22 @@ public Future deleteIndex( return internalClient.deleteIndex(request, callback); } + @Override + public Future addDefinedColumn( + AddDefinedColumnRequest request, + TableStoreCallback callback) + { + return internalClient.addDefinedColumn(request, callback); + } + + @Override + public Future deleteDefinedColumn( + DeleteDefinedColumnRequest request, + TableStoreCallback callback) + { + return internalClient.deleteDefinedColumn(request, callback); + } + @Override public Future getRow(GetRowRequest request, TableStoreCallback callback) @@ -239,6 +264,20 @@ public Future getRange(GetRangeRequest request, { return internalClient.getRangeInternal(request, callback); } + + @Override + public Future bulkExport(BulkExportRequest request, + TableStoreCallback callback) + { + return internalClient.bulkExportInternal(request, callback); + } + + @Override + public Future bulkImport(BulkImportRequest request, + TableStoreCallback callback) + { + return internalClient.bulkImport(request, callback); + } @Override public Future computeSplitsBySize( @@ -272,6 +311,11 @@ public Future createSearchIndex(CreateSearchIndexRequ return internalClient.createSearchIndex(request, callback); } + @Override + public Future updateSearchIndex(UpdateSearchIndexRequest request, TableStoreCallback callback) { + return internalClient.updateSearchIndex(request, callback); + } + @Override public Future listSearchIndex(ListSearchIndexRequest request, TableStoreCallback callback) { return internalClient.listSearchIndex(request, callback); @@ -287,6 +331,17 @@ public Future describeSearchIndex(DescribeSearchInd return internalClient.describeSearchIndex(request, callback); } + @Override + public Future computeSplits(ComputeSplitsRequest request, TableStoreCallback callback) { + return internalClient.computeSplits(request, callback); + } + + @Override + public Future parallelScan(ParallelScanRequest request, + TableStoreCallback callback) { + return internalClient.parallelScan(request, callback); + } + @Override public Future search(SearchRequest request, TableStoreCallback callback) { return internalClient.search(request, callback); @@ -307,11 +362,39 @@ public Future abortTransaction(AbortTransactionRequest return internalClient.abortTransaction(request, callback); } + @Override + public Future createDeliveryTask(CreateDeliveryTaskRequest request, TableStoreCallback callback) { + return internalClient.createDeliveryTask(request, callback); + } + + @Override + public Future deleteDeliveryTask(DeleteDeliveryTaskRequest request, TableStoreCallback callback) { + return internalClient.deleteDeliveryTask(request, callback); + } + + @Override + public Future describeDeliveryTask(DescribeDeliveryTaskRequest request, TableStoreCallback callback) { + return internalClient.describeDeliveryTask(request, callback); + } + + @Override + public Future listDeliveryTask(ListDeliveryTaskRequest request, TableStoreCallback callback) { + return internalClient.listDeliveryTask(request, callback); + } + @Override public SyncClientInterface asSyncClient() { return new SyncClient(this.internalClient); } + public TimeseriesClient asTimeseriesClient() { + return new TimeseriesClient(this.internalClient); + } + + public AsyncTimeseriesClient asAsyncTimeseriesClient() { + return new AsyncTimeseriesClient(this.internalClient); + } + @Override public void shutdown() { internalClient.shutdown(); @@ -321,4 +404,9 @@ public void shutdown() { public void switchCredentialsProvider(CredentialsProvider newCrdsProvider) { internalClient.switchCredentialsProvider(newCrdsProvider); } + + @Override + public Future sqlQuery(SQLQueryRequest request, TableStoreCallback callback) { + return internalClient.sqlQuery(request, callback); + } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/AsyncClientInterface.java b/src/main/java/com/alicloud/openservices/tablestore/AsyncClientInterface.java index 4d921b1..0606a15 100755 --- a/src/main/java/com/alicloud/openservices/tablestore/AsyncClientInterface.java +++ b/src/main/java/com/alicloud/openservices/tablestore/AsyncClientInterface.java @@ -1,377 +1,496 @@ -package com.alicloud.openservices.tablestore; - -import java.util.concurrent.Future; - -import com.alicloud.openservices.tablestore.core.auth.CredentialsProvider; -import com.alicloud.openservices.tablestore.model.*; -import com.alicloud.openservices.tablestore.model.search.*; - -public interface AsyncClientInterface { - - /** - * 在用户的实例下创建一张新的表。 - *

表被创建后不能立即进行读写操作, 需要等待几秒钟.

- * - * @param createTableRequest 执行CreateTable所需的参数 - * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 - * @return 获取结果的Future - * @throws TableStoreException TableStore服务返回的异常 - * @throws ClientException 请求的返回结果无效、或遇到网络异常 - */ - public Future createTable( - CreateTableRequest createTableRequest, - TableStoreCallback callback); - - /** - * 在表被创建之后,动态的更改表的配置或预留吞吐量。 - *

例如用户想要调整表的TTL、MaxVersions等配置或者用户发现当前预留吞吐量过小需要上调预留吞吐量。

- *

UpdateTable操作不能用于更改表的TableMeta,可以调整的配置为:

- *
    - *
  • 预留吞吐量({@link ReservedThroughput}): - * 表的预留吞吐量可被动态更改,读或写吞吐量都可以分别单独更改。调整每个表读写吞吐量的最小时间间隔为 1 分钟, - * 如果本次 UpdateTable 操作距上次 UpdateTable 或者 CreateTable 操作不到 1 分钟的话该请求将被拒绝。 - *
  • - *
  • 表的配置({@link TableOptions}): - * 只有表的部分配置项可以允许被动态更改,例如TTL、MaxVersions等。 - *
  • - *
- * UpdateTable操作执行完毕后,会返回表的当前更改之后的预留吞吐量以及配置。 - * - * @param updateTableRequest 执行UpdateTable所需的参数 - * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 - * @return 获取结果的Future - * @throws TableStoreException TableStore服务返回的异常 - * @throws ClientException 请求的返回结果无效、或遇到网络异常 - */ - public Future updateTable( - UpdateTableRequest updateTableRequest, - TableStoreCallback callback); - - /** - *

获取表的详细信息,表的详细信息包括:

- *
    - *
  • 表的结构({@link TableMeta})
  • - *
  • 表的预留吞吐量({@link ReservedThroughputDetails})
  • - *
  • 表的配置参数({@link TableOptions})
  • - *
- * - * @param describeTableRequest 执行DescribeTable所需的参数 - * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 - * @return 获取结果的Future - * @throws TableStoreException TableStore服务返回的异常 - * @throws ClientException 请求的返回结果无效、或遇到网络异常 - */ - public Future describeTable( - DescribeTableRequest describeTableRequest, - TableStoreCallback callback); - - /** - * 返回用户当前实例下的所有表的列表。 - * - * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 - * @return 获取结果的Future - * @throws TableStoreException TableStore服务返回的异常 - * @throws ClientException 请求的返回结果无效、或遇到网络异常 - */ - public Future listTable( - TableStoreCallback callback); - - /** - * 删除用户指定的某个实例下的一张表。。 - *

注意:表被成功删除后该表下所有的数据都将会被清空,无法恢复,请谨慎操作!

- * - * @param deleteTableRequest 执行DeleteTable所需的参数 - * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 - * @return 获取结果的Future - * @throws TableStoreException TableStore服务返回的异常 - * @throws ClientException 请求的返回结果无效、或遇到网络异常 - */ - public Future deleteTable( - DeleteTableRequest deleteTableRequest, - TableStoreCallback callback); - - /** - * 在用户指定的某张表下创建一张索引表 - * - * @param createIndexRequest 执行CreateIndex所需的参数 - * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 - * @return 获取结果的Future - * @throws TableStoreException TableStore服务返回的异常 - * @throws ClientException 请求返回的结果无效、或遇到网络异常 - */ - public Future createIndex( - CreateIndexRequest createIndexRequest, - TableStoreCallback callback); - - /** - * 在用户指定的某张表下删除一张索引表 - * - * @param deleteIndexRequest 执行deleteIndex所需的参数 - * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 - * @return 获取结果的Future - * @throws TableStoreException TableStore服务返回的异常 - * @throws ClientException 请求返回的结果无效、或遇到网络异常 - */ - public Future deleteIndex( - DeleteIndexRequest deleteIndexRequest, - TableStoreCallback callback); - - /** - * 读取表中的一行数据。 - * - * @param getRowRequest 执行GetRow操作所需的参数。 - * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 - * @return 获取结果的Future - * @throws TableStoreException TableStore服务返回的异常 - * @throws ClientException 请求的返回结果无效、或遇到网络异常 - */ - public Future getRow( - GetRowRequest getRowRequest, TableStoreCallback callback); - - /** - * 向表中插入或覆盖一行数据。 - *

若要写入的行已经存在,则旧行会被删除后写入新的一行。

- *

若要写入的行不存在,则直接写入新的一行。

- * - * @param putRowRequest 执行PutRow操作所需的参数。 - * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 - * @return 获取结果的Future - * @throws TableStoreException TableStore服务返回的异常 - * @throws ClientException 请求的返回结果无效、或遇到网络异常 - */ - public Future putRow( - PutRowRequest putRowRequest, TableStoreCallback callback); - - /** - * 更新表中的一行数据。 - *

若要更新的行不存在,则新写入一行数据。

- *

更新操作可以包括新写入一个属性列或者删除一个属性列的一个或多个版本。

- * - * @param updateRowRequest 执行UpdateRow操作所需的参数。 - * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 - * @return 获取结果的Future - * @throws TableStoreException TableStore服务返回的异常 - * @throws ClientException 请求的返回结果无效、或遇到网络异常 - */ - public Future updateRow( - UpdateRowRequest updateRowRequest, TableStoreCallback callback); - - /** - * 删除表中的一行数据。 - *

若该行存在,则删除该行。

- *

若该行不存在,则该操作不产生任何影响。

- * - * @param deleteRowRequest 执行DeleteRow操作所需的参数。 - * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 - * @return 获取结果的Future - * @throws TableStoreException TableStore服务返回的异常 - * @throws ClientException 请求的返回结果无效、或遇到网络异常 - */ - public Future deleteRow( - DeleteRowRequest deleteRowRequest, TableStoreCallback callback); - - /** - * 从多张表中读取多行数据。 - *

BatchGetRow 操作可视为多个 GetRow 操作的集合,各个操作独立执行,独立返回结果,独立计算服务能力单元。

- *

与执行大量的 GetRow 操作相比,使用 BatchGetRow 操作可以有效减少请求的响应时间,提高数据的读取速率。

- *

但需要注意的是 BatchGetRow 只支持在表级别设置查询条件。操作完成后,需要逐个检查子请求的状态,并选择对失败的行进行重试。

- * - * @param batchGetRowRequest 执行BatchGetRow操作所需的参数。 - * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 - * @return 获取结果的Future - */ - public Future batchGetRow( - BatchGetRowRequest batchGetRowRequest, TableStoreCallback callback); - - /** - * 对多张表中对多行执行更新或者删除操作。 - *

BatchWriteRow 操作可视为多个PutRow、UpdateRow、DeleteRow 操作的集合,各个操作独立执行,独立返回结果,独立计算服务能力单元。

- *

执行 BatchWriteRow 操作后,需要逐个检查子请求的状态,来判断写入结果,并选择对失败的行进行重试。

- * - * @param batchWriteRowRequest 执行BatchWriteRow操作所需的参数。 - * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 - * @return 获取结果的Future - */ - public Future batchWriteRow( - BatchWriteRowRequest batchWriteRowRequest, TableStoreCallback callback); - - /** - * 从表中查询一个范围内的多行数据。 - * - * @param getRangeRequest 执行GetRange操作所需的参数。 - * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 - * @return 获取结果的Future - */ - public Future getRange( - GetRangeRequest getRangeRequest, TableStoreCallback callback); - - /** - * 对表的数据根据一定的数据大小进行分块,并返回分块的信息以供数据获取接口使用。返回的数据分块按照主键列的递增顺序排列,返回的每个数据分块信息中包含分块所处的partition分区的ID的哈希值以及起始行和终止行的主键值,遵循左闭右开区间。 - * - * @param computeSplitsBySizeRequest 执行ComputeSplitsBySize操作所需的参数。 - * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 - * @return 获取结果的Future - */ - public Future computeSplitsBySize(ComputeSplitsBySizeRequest computeSplitsBySizeRequest, TableStoreCallback callback); - - /** - * 获取用户当前实例下的全部Stream列表或者特定表下的Stream。 - * - * @param listStreamRequest 执行ListStream操作所需的参数。 - * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 - * @return 获取结果的Future - */ - public Future listStream( - ListStreamRequest listStreamRequest, TableStoreCallback callback); - - /** - * 获取指定Stream的详细信息。通过此方法获取Shard列表。 - * - * @param describeStreamRequest 执行DescribeStream操作所需的参数。 - * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 - * @return 获取结果的Future - */ - public Future describeStream( - DescribeStreamRequest describeStreamRequest, TableStoreCallback callback); - - /** - * 获取ShardIterator,可通过ShardIterator读取Shard中的数据。 - * - * @param getShardIteratorRequest 执行GetShardIterator操作所需的参数。 - * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 - * @return 获取结果的Future - */ - public Future getShardIterator( - GetShardIteratorRequest getShardIteratorRequest, TableStoreCallback callback); - - /** - * 通过ShardIterator读取Shard中的数据。 - * - * @param getStreamRecordRequest 执行GetStreamRecord操作所需的参数。 - * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 - * @return 获取结果的Future - */ - public Future getStreamRecord( - GetStreamRecordRequest getStreamRecordRequest, TableStoreCallback callback); - - /** - * 开启一个本地事务 - * @param request 启动本地事务操作所需的参数 - * @return - * @throws TableStoreException TableStore服务返回的异常 - * @throws ClientException 请求的返回结果无效、或遇到网络异常 - */ - public Future startLocalTransaction( - StartLocalTransactionRequest request, TableStoreCallback callback); - - /** - * 提交一个事务 - * @param request 提交事务操作所需的参数 - * @return - * @throws TableStoreException TableStore服务返回的异常 - * @throws ClientException 请求的返回结果无效、或遇到网络异常 - */ - public Future commitTransaction( - CommitTransactionRequest request, TableStoreCallback callback); - - /** - * 取消一个事务 - * @param request 取消事务操作所需的参数 - * @return - * @throws TableStoreException TableStore服务返回的异常 - * @throws ClientException 请求的返回结果无效、或遇到网络异常 - */ - public Future abortTransaction( - AbortTransactionRequest request, TableStoreCallback callback); - - /** - * 创建SearchIndex - * @param request 创建SearchIndex所需的参数,详见{@link CreateSearchIndexRequest} - * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 - * @return SearchIndex服务返回的创建结果 - * @throws TableStoreException TableStore服务返回的异常 - * @throws ClientException 请求的返回结果无效、或遇到网络异常 - */ - public Future createSearchIndex( - CreateSearchIndexRequest request, TableStoreCallback callback); - - /** - * 获取表下的SearchIndex列表 - *

一个table下面,可以存在多个SearchIndex表,通过该函数,将能够获取一个table下面的所有SearchIndex信息

- * @param request 获取SearchIndex列表所需的参数 - * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 - * @return TableStore指定表下的SearchIndex列表 - * @throws TableStoreException TableStore服务返回的异常 - * @throws ClientException 请求的返回结果无效、或遇到网络异常 - */ - public Future listSearchIndex( - ListSearchIndexRequest request, TableStoreCallback callback); - - /** - * 删除SearchIndex - *

通过指定 tableName 和 indexName 即可删除一个index

- *

提示:在没有删除一个table下面所有的index之前,是不允许删除table的

- * @param request 删除SearchIndex所需的参数 - * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 - * @return 删除SearchIndex服务执行后返回的删除结果 - * @throws TableStoreException TableStore服务返回的异常 - * @throws ClientException 请求的返回结果无效、或遇到网络异常 - */ - public Future deleteSearchIndex( - DeleteSearchIndexRequest request, TableStoreCallback callback); - - /** - * 获取一个SearchIndex的信息 - * @param request 获取SearchIndex所需的参数(tableName 和 indexName) - * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 - * @return 返回指定index的 schema 和目前的同步状态信息 - * @throws TableStoreException TableStore服务返回的异常 - * @throws ClientException 请求的返回结果无效、或遇到网络异常 - */ - public Future describeSearchIndex( - DescribeSearchIndexRequest request, TableStoreCallback callback); - - /** - * 搜索功能 - *

构建自己的SearchRequest,然后获取SearchResponse

- *

示例:

- *

- * - * SearchQuery searchQuery = new SearchQuery(); - * TermQuery termQuery = new TermQuery(); - * termQuery.setFieldName("user_name"); - * termQuery.setTerm("jay"); - * searchQuery.setQuery(termQuery); - * SearchRequest searchRequest = new SearchRequest(tableName, indexName, searchQuery); - * SearchResponse resp = ots.search(searchRequest); - * - *

- * @param request 进行搜索所需的参数,详见{@link SearchRequest} - * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 - * @return 搜索结果,详见{@link SearchResponse} - * @throws TableStoreException TableStore服务返回的异常 - * @throws ClientException 请求的返回结果无效、或遇到网络异常 - */ - public Future search( - SearchRequest request, TableStoreCallback callback); - - - /** - * 转换成同步接口的Client。 - * @return 同步Client - */ - public SyncClientInterface asSyncClient(); - - /** - * 释放资源。 - *

请确保在所有请求执行完毕之后释放资源。释放资源之后将不能再发送请求,正在执行的请求可能无法返回结果。

- */ - public void shutdown(); - - /** - * Switch CredentialsProvider。 - * - * @param newCrdsProvider new CredentialsProvider, see {@link com.alicloud.openservices.tablestore.core.auth.CredentialsProviderFactory}. - */ - public void switchCredentialsProvider(CredentialsProvider newCrdsProvider); -} +package com.alicloud.openservices.tablestore; + +import java.util.concurrent.Future; + +import com.alicloud.openservices.tablestore.core.auth.CredentialsProvider; +import com.alicloud.openservices.tablestore.model.*; +import com.alicloud.openservices.tablestore.model.delivery.*; +import com.alicloud.openservices.tablestore.model.search.*; +import com.alicloud.openservices.tablestore.model.sql.SQLQueryRequest; +import com.alicloud.openservices.tablestore.model.sql.SQLQueryResponse; + +public interface AsyncClientInterface { + + /** + * 在用户的实例下创建一张新的表。 + *

表被创建后不能立即进行读写操作, 需要等待几秒钟.

+ * + * @param createTableRequest 执行CreateTable所需的参数 + * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 + * @return 获取结果的Future + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public Future createTable( + CreateTableRequest createTableRequest, + TableStoreCallback callback); + + /** + * 在表被创建之后,动态的更改表的配置或预留吞吐量。 + *

例如用户想要调整表的TTL、MaxVersions等配置或者用户发现当前预留吞吐量过小需要上调预留吞吐量。

+ *

UpdateTable操作不能用于更改表的TableMeta,可以调整的配置为:

+ *
    + *
  • 预留吞吐量({@link ReservedThroughput}): + * 表的预留吞吐量可被动态更改,读或写吞吐量都可以分别单独更改。调整每个表读写吞吐量的最小时间间隔为 1 分钟, + * 如果本次 UpdateTable 操作距上次 UpdateTable 或者 CreateTable 操作不到 1 分钟的话该请求将被拒绝。 + *
  • + *
  • 表的配置({@link TableOptions}): + * 只有表的部分配置项可以允许被动态更改,例如TTL、MaxVersions等。 + *
  • + *
+ * UpdateTable操作执行完毕后,会返回表的当前更改之后的预留吞吐量以及配置。 + * + * @param updateTableRequest 执行UpdateTable所需的参数 + * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 + * @return 获取结果的Future + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public Future updateTable( + UpdateTableRequest updateTableRequest, + TableStoreCallback callback); + + /** + *

获取表的详细信息,表的详细信息包括:

+ *
    + *
  • 表的结构({@link TableMeta})
  • + *
  • 表的预留吞吐量({@link ReservedThroughputDetails})
  • + *
  • 表的配置参数({@link TableOptions})
  • + *
+ * + * @param describeTableRequest 执行DescribeTable所需的参数 + * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 + * @return 获取结果的Future + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public Future describeTable( + DescribeTableRequest describeTableRequest, + TableStoreCallback callback); + + /** + * 返回用户当前实例下的所有表的列表。 + * + * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 + * @return 获取结果的Future + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public Future listTable( + TableStoreCallback callback); + + /** + * 删除用户指定的某个实例下的一张表。。 + *

注意:表被成功删除后该表下所有的数据都将会被清空,无法恢复,请谨慎操作!

+ * + * @param deleteTableRequest 执行DeleteTable所需的参数 + * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 + * @return 获取结果的Future + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public Future deleteTable( + DeleteTableRequest deleteTableRequest, + TableStoreCallback callback); + + /** + * 在用户指定的某张表下创建一张索引表 + * + * @param createIndexRequest 执行CreateIndex所需的参数 + * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 + * @return 获取结果的Future + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求返回的结果无效、或遇到网络异常 + */ + public Future createIndex( + CreateIndexRequest createIndexRequest, + TableStoreCallback callback); + + /** + * 在用户指定的某张表下删除一张索引表 + * + * @param deleteIndexRequest 执行deleteIndex所需的参数 + * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 + * @return 获取结果的Future + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求返回的结果无效、或遇到网络异常 + */ + public Future deleteIndex( + DeleteIndexRequest deleteIndexRequest, + TableStoreCallback callback); + + /** + * 为用户指定的表添加预定义列 + * @param addDefinedColumnRequest 执行addDefinedColumn所需的参数 + * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 + * @return 获取结果的Future + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求返回的结果无效、或遇到网络异常 + */ + public Future addDefinedColumn( + AddDefinedColumnRequest addDefinedColumnRequest, + TableStoreCallback callback); + + /** + * 为用户指定的表删除预定义列 + * @param deleteDefinedColumnRequest 执行deleteDefinedColumn所需的参数 + * @param callback 请求完成后调用的回调函数,可以为nukk,则代表不需要执行回调函数 + * @return 获取结果的future + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求返回的结果无效、或遇到网络异常 + */ + public Future deleteDefinedColumn( + DeleteDefinedColumnRequest deleteDefinedColumnRequest, + TableStoreCallback callback); + + /** + * 读取表中的一行数据。 + * + * @param getRowRequest 执行GetRow操作所需的参数。 + * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 + * @return 获取结果的Future + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public Future getRow( + GetRowRequest getRowRequest, TableStoreCallback callback); + + /** + * 向表中插入或覆盖一行数据。 + *

若要写入的行已经存在,则旧行会被删除后写入新的一行。

+ *

若要写入的行不存在,则直接写入新的一行。

+ * + * @param putRowRequest 执行PutRow操作所需的参数。 + * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 + * @return 获取结果的Future + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public Future putRow( + PutRowRequest putRowRequest, TableStoreCallback callback); + + /** + * 更新表中的一行数据。 + *

若要更新的行不存在,则新写入一行数据。

+ *

更新操作可以包括新写入一个属性列或者删除一个属性列的一个或多个版本。

+ * + * @param updateRowRequest 执行UpdateRow操作所需的参数。 + * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 + * @return 获取结果的Future + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public Future updateRow( + UpdateRowRequest updateRowRequest, TableStoreCallback callback); + + /** + * 删除表中的一行数据。 + *

若该行存在,则删除该行。

+ *

若该行不存在,则该操作不产生任何影响。

+ * + * @param deleteRowRequest 执行DeleteRow操作所需的参数。 + * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 + * @return 获取结果的Future + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public Future deleteRow( + DeleteRowRequest deleteRowRequest, TableStoreCallback callback); + + /** + * 从多张表中读取多行数据。 + *

BatchGetRow 操作可视为多个 GetRow 操作的集合,各个操作独立执行,独立返回结果,独立计算服务能力单元。

+ *

与执行大量的 GetRow 操作相比,使用 BatchGetRow 操作可以有效减少请求的响应时间,提高数据的读取速率。

+ *

但需要注意的是 BatchGetRow 只支持在表级别设置查询条件。操作完成后,需要逐个检查子请求的状态,并选择对失败的行进行重试。

+ * + * @param batchGetRowRequest 执行BatchGetRow操作所需的参数。 + * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 + * @return 获取结果的Future + */ + public Future batchGetRow( + BatchGetRowRequest batchGetRowRequest, TableStoreCallback callback); + + /** + * 对多张表中对多行执行更新或者删除操作。 + *

BatchWriteRow 操作可视为多个PutRow、UpdateRow、DeleteRow 操作的集合,各个操作独立执行,独立返回结果,独立计算服务能力单元。

+ *

执行 BatchWriteRow 操作后,需要逐个检查子请求的状态,来判断写入结果,并选择对失败的行进行重试。

+ * + * @param batchWriteRowRequest 执行BatchWriteRow操作所需的参数。 + * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 + * @return 获取结果的Future + */ + public Future batchWriteRow( + BatchWriteRowRequest batchWriteRowRequest, TableStoreCallback callback); + + /** + * 在单张表中对多行执行更新或者删除操作,离线服务接口。 + *

BulkImport 操作可视为多个PutRow、UpdateRow、DeleteRow 操作的集合,各个操作独立执行,独立返回结果,独立计算消费单元。

+ *

执行 BulkImport 操作后,需要逐个检查子请求的状态,来判断写入结果,并选择对失败的行进行重试。

+ * + * @param bulkImportRequest 执行BatchWriteRow操作所需的参数。 + * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 + * @return 获取结果的Future + */ + public Future bulkImport( + BulkImportRequest bulkImportRequest, TableStoreCallback callback); + + /** + * 从表中查询一个范围内的多行数据。 + * + * @param getRangeRequest 执行GetRange操作所需的参数。 + * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 + * @return 获取结果的Future + */ + public Future getRange( + GetRangeRequest getRangeRequest, TableStoreCallback callback); + + /** + * 从表中查询一个范围内的多行数据,离线服务接口。 + * + * @param bulkExportRequest 执行GetRange操作所需的参数。 + * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 + * @return 获取结果的Future + */ + public Future bulkExport( + BulkExportRequest bulkExportRequest, TableStoreCallback callback); + + /** + * 对表的数据根据一定的数据大小进行分块,并返回分块的信息以供数据获取接口使用。返回的数据分块按照主键列的递增顺序排列,返回的每个数据分块信息中包含分块所处的partition分区的ID的哈希值以及起始行和终止行的主键值,遵循左闭右开区间。 + * + * @param computeSplitsBySizeRequest 执行ComputeSplitsBySize操作所需的参数。 + * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 + * @return 获取结果的Future + */ + public Future computeSplitsBySize(ComputeSplitsBySizeRequest computeSplitsBySizeRequest, TableStoreCallback callback); + + /** + * 获取用户当前实例下的全部Stream列表或者特定表下的Stream。 + * + * @param listStreamRequest 执行ListStream操作所需的参数。 + * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 + * @return 获取结果的Future + */ + public Future listStream( + ListStreamRequest listStreamRequest, TableStoreCallback callback); + + /** + * 获取指定Stream的详细信息。通过此方法获取Shard列表。 + * + * @param describeStreamRequest 执行DescribeStream操作所需的参数。 + * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 + * @return 获取结果的Future + */ + public Future describeStream( + DescribeStreamRequest describeStreamRequest, TableStoreCallback callback); + + /** + * 获取ShardIterator,可通过ShardIterator读取Shard中的数据。 + * + * @param getShardIteratorRequest 执行GetShardIterator操作所需的参数。 + * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 + * @return 获取结果的Future + */ + public Future getShardIterator( + GetShardIteratorRequest getShardIteratorRequest, TableStoreCallback callback); + + /** + * 通过ShardIterator读取Shard中的数据。 + * + * @param getStreamRecordRequest 执行GetStreamRecord操作所需的参数。 + * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 + * @return 获取结果的Future + */ + public Future getStreamRecord( + GetStreamRecordRequest getStreamRecordRequest, TableStoreCallback callback); + + /** + * 开启一个本地事务 + * @param request 启动本地事务操作所需的参数 + * @return + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public Future startLocalTransaction( + StartLocalTransactionRequest request, TableStoreCallback callback); + + /** + * 提交一个事务 + * @param request 提交事务操作所需的参数 + * @return + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public Future commitTransaction( + CommitTransactionRequest request, TableStoreCallback callback); + + /** + * 取消一个事务 + * @param request 取消事务操作所需的参数 + * @return + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public Future abortTransaction( + AbortTransactionRequest request, TableStoreCallback callback); + + /** + * 创建SearchIndex + * @param request 创建SearchIndex所需的参数,详见{@link CreateSearchIndexRequest} + * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 + * @return SearchIndex服务返回的创建结果 + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public Future createSearchIndex( + CreateSearchIndexRequest request, TableStoreCallback callback); + + /** + * 更新SearchIndex(用于交换索引,或设置索引查询权重)。推荐优先使用官网控制台来实现动态修改多元索引schema的功能。 + * @param request 更新SearchIndex所需的参数 + * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 + * @return SearchIndex服务返回的创建结果 + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public Future updateSearchIndex( + UpdateSearchIndexRequest request, TableStoreCallback callback); + + /** + * 获取表下的SearchIndex列表 + *

一个table下面,可以存在多个SearchIndex表,通过该函数,将能够获取一个table下面的所有SearchIndex信息

+ * @param request 获取SearchIndex列表所需的参数 + * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 + * @return TableStore指定表下的SearchIndex列表 + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public Future listSearchIndex( + ListSearchIndexRequest request, TableStoreCallback callback); + + /** + * 删除SearchIndex + *

通过指定 tableName 和 indexName 即可删除一个index

+ *

提示:在没有删除一个table下面所有的index之前,是不允许删除table的

+ * @param request 删除SearchIndex所需的参数 + * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 + * @return 删除SearchIndex服务执行后返回的删除结果 + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public Future deleteSearchIndex( + DeleteSearchIndexRequest request, TableStoreCallback callback); + + /** + * 获取一个SearchIndex的信息 + * @param request 获取SearchIndex所需的参数(tableName 和 indexName) + * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 + * @return 返回指定index的 schema 和目前的同步状态信息 + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public Future describeSearchIndex( + DescribeSearchIndexRequest request, TableStoreCallback callback); + + /** + * Get the partition information of the data + * + * @param request Parameters required to perform the computeSplits operation. + * @param callback The callback function invoked after the request is completed. It can be null, which means that no callback function is required. + * @throws TableStoreException Exception returned by Tablestore service. + * @throws ClientException The return result of the request is invalid or a network exception was encountered. + */ + public Future computeSplits(ComputeSplitsRequest request, TableStoreCallback callback); + + /** + * Scan data form SearchIndex. + * + * @param request Parameters required to perform the parallelScan operation. + * @param callback The callback function invoked after the request is completed. It can be null, which means that no callback function is required. + * @throws TableStoreException Exception returned by Tablestore service. + * @throws ClientException The return result of the request is invalid or a network exception was encountered. + */ + public Future parallelScan(ParallelScanRequest request, TableStoreCallback callback); + + /** + * 创建投递任务 + * @param request 创建投递任务所需的参数 + * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要回调函数 + * @return + */ + public Future createDeliveryTask( + CreateDeliveryTaskRequest request, TableStoreCallback callback); + + /** + * 删除投递任务 + * @param request 删除投递任务所需要的参数 + * @return 删除投递任务执行后返回的删除结果 + * @throws TableStoreException Tablestore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public Future deleteDeliveryTask( + DeleteDeliveryTaskRequest request, TableStoreCallback callback); + + /** + * 描述投递任务 + * @param request 描述投递任务所需要的参数 + * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要回调函数 + * @return + */ + public Future describeDeliveryTask( + DescribeDeliveryTaskRequest request, TableStoreCallback callback); + + /** + * 列出投递任务列表 + * @param request 列出投递任务列表所需要的参数 + * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要回调函数 + * @return + */ + public Future listDeliveryTask( + ListDeliveryTaskRequest request, TableStoreCallback callback); + + /** + * 搜索功能 + *

构建自己的SearchRequest,然后获取SearchResponse

+ *

示例:

+ *

+ * + * SearchQuery searchQuery = new SearchQuery(); + * TermQuery termQuery = new TermQuery(); + * termQuery.setFieldName("user_name"); + * termQuery.setTerm("jay"); + * searchQuery.setQuery(termQuery); + * SearchRequest searchRequest = new SearchRequest(tableName, indexName, searchQuery); + * SearchResponse resp = ots.search(searchRequest); + * + *

+ * @param request 进行搜索所需的参数,详见{@link SearchRequest} + * @param callback 请求完成后调用的回调函数,可以为null,则代表不需要执行回调函数 + * @return 搜索结果,详见{@link SearchResponse} + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public Future search( + SearchRequest request, TableStoreCallback callback); + + + /** + * 转换成同步接口的Client。 + * @return 同步Client + */ + public SyncClientInterface asSyncClient(); + + /** + * 释放资源。 + *

请确保在所有请求执行完毕之后释放资源。释放资源之后将不能再发送请求,正在执行的请求可能无法返回结果。

+ */ + public void shutdown(); + + /** + * Switch CredentialsProvider。 + * + * @param newCrdsProvider new CredentialsProvider, see {@link com.alicloud.openservices.tablestore.core.auth.CredentialsProviderFactory}. + */ + public void switchCredentialsProvider(CredentialsProvider newCrdsProvider); + + public Future sqlQuery(SQLQueryRequest request, TableStoreCallback callback); +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/AsyncTimeseriesClient.java b/src/main/java/com/alicloud/openservices/tablestore/AsyncTimeseriesClient.java new file mode 100644 index 0000000..d1ec245 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/AsyncTimeseriesClient.java @@ -0,0 +1,208 @@ +package com.alicloud.openservices.tablestore; + +import com.alicloud.openservices.tablestore.core.ResourceManager; +import com.alicloud.openservices.tablestore.core.auth.CredentialsProvider; +import com.alicloud.openservices.tablestore.core.auth.DefaultCredentialProvider; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.alicloud.openservices.tablestore.model.timeseries.*; +import com.google.common.cache.Cache; +import com.google.common.cache.CacheBuilder; +import com.google.common.cache.Weigher; + +import java.util.Map; +import java.util.concurrent.*; + +public class AsyncTimeseriesClient implements AsyncTimeseriesClientInterface { + + private InternalClient internalClient; + private Cache timeseriesMetaCache; + + /** + * 使用指定的TableStore Endpoint和默认配置构造一个新的{@link AsyncTimeseriesClient}实例。 + * @param endpoint TableStore服务的Endpoint。 + * @param accessKeyId 访问TableStore服务的Access ID。 + * @param accessKeySecret 访问TableStore服务的Access Key。 + * @param instanceName 访问TableStore的服务的实例名称。 + */ + public AsyncTimeseriesClient(String endpoint, String accessKeyId, String accessKeySecret, String instanceName) { + this(endpoint, accessKeyId, accessKeySecret, instanceName, new ClientConfiguration()); + } + + /** + * 使用指定的TableStore Endpoint和配置构造一个新的{@link AsyncTimeseriesClient}实例。 + * + * @param endpoint TableStore服务的endpoint。 + * @param accessKeyId 访问TableStore服务的Access ID。 + * @param accessKeySecret 访问TableStore服务的Access Key。 + * @param instanceName 访问TableStore服务的实例名称。 + * @param conf 客户端配置信息({@link ClientConfiguration})。 如果传入null则使用默认配置。 + */ + public AsyncTimeseriesClient(String endpoint, String accessKeyId, String accessKeySecret, String instanceName, ClientConfiguration conf) { + this(endpoint, accessKeyId, accessKeySecret, instanceName, conf, null); + } + + /** + * 使用指定的TableStore Endpoint和默认配置构造一个新的{@link AsyncTimeseriesClient}实例。 + * + * @param endpoint TableStore服务的endpoint。 + * @param accessKeyId 访问TableStore服务的Access ID。 + * @param accessKeySecret 访问TableStore服务的Access Key。 + * @param instanceName 访问TableStore服务的实例名称。 + * @param stsToken Sts Token. + */ + public AsyncTimeseriesClient(String endpoint, String accessKeyId, String accessKeySecret, String instanceName, String stsToken) { + this(endpoint, accessKeyId, accessKeySecret, instanceName, new ClientConfiguration(), stsToken); + } + + /** + * 使用指定的TableStore Endpoint和默认配置构造一个新的{@link AsyncTimeseriesClient}实例。 + * + * @param endpoint TableStore服务的endpoint。 + * @param accessKeyId 访问TableStore服务的Access ID。 + * @param accessKeySecret 访问TableStore服务的Access Key。 + * @param instanceName 访问TableStore服务的实例名称。 + * @param config 客户端配置信息({@link ClientConfiguration})。 如果传入null则使用默认配置。 + * @param stsToken Sts Token. + */ + public AsyncTimeseriesClient(String endpoint, String accessKeyId, String accessKeySecret, String instanceName, + ClientConfiguration config, String stsToken) { + this(endpoint, accessKeyId, accessKeySecret, instanceName, config, stsToken, null); + } + + /** + * 使用指定的TableStore Endpoint和默认配置构造一个新的{@link AsyncTimeseriesClient}实例。 + * + * @param endpoint TableStore服务的endpoint。 + * @param accessKeyId 访问TableStore服务的Access ID。 + * @param accessKeySecret 访问TableStore服务的Access Key。 + * @param instanceName 访问TableStore服务的实例名称。 + * @param config 客户端配置信息({@link ClientConfiguration})。 如果传入null则使用默认配置。 + * @param stsToken Sts Token. + * @param callbackExecutor 执行callback的线程池,需要注意的是,client在shutdown的时候也会shutdown这个线程池。 + */ + public AsyncTimeseriesClient(String endpoint, String accessKeyId, String accessKeySecret, String instanceName, + ClientConfiguration config, String stsToken, ExecutorService callbackExecutor) { + this(endpoint, new DefaultCredentialProvider(accessKeyId, accessKeySecret, stsToken), instanceName, + config, new ResourceManager(config, callbackExecutor)); + } + + /** + * 使用指定的TableStore Endpoint和默认配置构造一个新的{@link AsyncTimeseriesClient}实例。 + */ + public AsyncTimeseriesClient(String endpoint, CredentialsProvider credsProvider, String instanceName, + ClientConfiguration config, ResourceManager resourceManager) { + this(new InternalClient(endpoint, credsProvider, instanceName, config, resourceManager)); + } + + AsyncTimeseriesClient(InternalClient internalClient) { + Preconditions.checkNotNull(internalClient); + this.internalClient = internalClient; + if (this.internalClient.getTimeseriesMetaCache() != null) { + this.timeseriesMetaCache = this.internalClient.getTimeseriesMetaCache(); + return; + } + ClientConfiguration config = this.internalClient.getClientConfig(); + if (config.getTimeseriesConfiguration() == null) { + config.setTimeseriesConfiguration(new TimeseriesConfiguration()); + } + this.timeseriesMetaCache = CacheBuilder.newBuilder() + .maximumWeight(config.getTimeseriesConfiguration().getMetaCacheMaxDataSize()) + .expireAfterAccess(config.getConnectionTimeoutInMillisecond(), TimeUnit.SECONDS) + .weigher(new Weigher() { + @Override + public int weigh(String key, Long value) { + return key.length() + 48 + 16; // add some overhead + } + }).build(); + this.internalClient.setTimeseriesMetaCache(timeseriesMetaCache); + } + + public void setExtraHeaders(Map extraHeaders) { + this.internalClient.setExtraHeaders(extraHeaders); + } + + @Override + public Future createTimeseriesTable(CreateTimeseriesTableRequest request, + TableStoreCallback callback) + { + return internalClient.createTimeseriesTable(request, callback); + } + + @Override + public Future listTimeseriesTable(TableStoreCallback callback) + { + return internalClient.listTimeseriesTable(callback); + } + + @Override + public Future deleteTimeseriesTable(DeleteTimeseriesTableRequest request, + TableStoreCallback callback) + { + return internalClient.deleteTimeseriesTable(request, callback); + } + + @Override + public Future describeTimeseriesTable(DescribeTimeseriesTableRequest request, + TableStoreCallback callback) + { + return internalClient.describeTimeseriesTable(request, callback); + } + + @Override + public Future updateTimeseriesTable(UpdateTimeseriesTableRequest request, + TableStoreCallback callback) + { + return internalClient.updateTimeseriesTable(request, callback); + } + + @Override + public Future putTimeseriesData(PutTimeseriesDataRequest request, + TableStoreCallback callback) + throws TableStoreException, ClientException { + return internalClient.putTimeseriesData(request, callback); + } + + @Override + public Future getTimeseriesData(GetTimeseriesDataRequest request, + TableStoreCallback callback) + throws TableStoreException, ClientException { + return internalClient.getTimeseriesData(request, callback); + } + + @Override + public Future queryTimeseriesMeta(QueryTimeseriesMetaRequest request, + TableStoreCallback callback) + throws TableStoreException, ClientException { + return internalClient.queryTimeseriesMeta(request, callback); + } + + @Override + public Future updateTimeseriesMeta(UpdateTimeseriesMetaRequest request, + TableStoreCallback callback) + throws TableStoreException, ClientException { + return internalClient.updateTimeseriesMeta(request, callback); + } + + @Override + public Future deleteTimeseriesMeta(DeleteTimeseriesMetaRequest request, + TableStoreCallback callback) + throws TableStoreException, ClientException { + return internalClient.deleteTimeseriesMeta(request, callback); + } + + public void shutdown() { + this.internalClient.shutdown(); + } + + public SyncClient asSyncClient() { + return new SyncClient(this.internalClient); + } + + public AsyncClient asAsyncClient() { + return new AsyncClient(this.internalClient); + } + + public TimeseriesClient asTimeseriesClient() { + return new TimeseriesClient(this.internalClient); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/AsyncTimeseriesClientInterface.java b/src/main/java/com/alicloud/openservices/tablestore/AsyncTimeseriesClientInterface.java new file mode 100644 index 0000000..937d779 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/AsyncTimeseriesClientInterface.java @@ -0,0 +1,42 @@ +package com.alicloud.openservices.tablestore; + +import com.alicloud.openservices.tablestore.model.timeseries.*; + +import java.util.concurrent.Future; + +public interface AsyncTimeseriesClientInterface { + + Future createTimeseriesTable(CreateTimeseriesTableRequest request, + TableStoreCallback callback); + + Future listTimeseriesTable(TableStoreCallback callback); + + Future deleteTimeseriesTable(DeleteTimeseriesTableRequest request, + TableStoreCallback callback); + + Future describeTimeseriesTable(DescribeTimeseriesTableRequest request, + TableStoreCallback callback); + + Future updateTimeseriesTable(UpdateTimeseriesTableRequest request, + TableStoreCallback callback); + + Future putTimeseriesData(PutTimeseriesDataRequest request, + TableStoreCallback callback) + throws TableStoreException, ClientException; + + Future getTimeseriesData(GetTimeseriesDataRequest request, + TableStoreCallback callback) + throws TableStoreException, ClientException; + + Future queryTimeseriesMeta(QueryTimeseriesMetaRequest request, + TableStoreCallback callback) + throws TableStoreException, ClientException; + + Future updateTimeseriesMeta(UpdateTimeseriesMetaRequest request, + TableStoreCallback callback) + throws TableStoreException, ClientException; + + Future deleteTimeseriesMeta(DeleteTimeseriesMetaRequest request, + TableStoreCallback callback) + throws TableStoreException, ClientException; +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/ClientConfiguration.java b/src/main/java/com/alicloud/openservices/tablestore/ClientConfiguration.java index c461a84..dd5ee78 100755 --- a/src/main/java/com/alicloud/openservices/tablestore/ClientConfiguration.java +++ b/src/main/java/com/alicloud/openservices/tablestore/ClientConfiguration.java @@ -14,6 +14,7 @@ public class ClientConfiguration { private int maxConnections = 300; private int socketTimeoutInMillisecond = 30 * 1000; private int connectionTimeoutInMillisecond = 30 * 1000; + private int connectionRequestTimeoutInMillisecond = -1; private int retryThreadCount = 1; private boolean enableRequestCompression = false; @@ -33,6 +34,8 @@ public class ClientConfiguration { private long syncClientWaitFutureTimeoutInMillis = 60 * 1000; + private TimeseriesConfiguration timeseriesConfiguration; + /** * 构造新实例。 */ @@ -403,4 +406,32 @@ public long getSyncClientWaitFutureTimeoutInMillis() { public void setSyncClientWaitFutureTimeoutInMillis(long syncClientWaitFutureTimeoutInMillis) { this.syncClientWaitFutureTimeoutInMillis = syncClientWaitFutureTimeoutInMillis; } + + /** + * 获取时序Client的配置。 + * @return + */ + public TimeseriesConfiguration getTimeseriesConfiguration() { + return timeseriesConfiguration; + } + + /** + * 设置时序Client的配置。 + * @param timeseriesConfiguration + */ + public void setTimeseriesConfiguration(TimeseriesConfiguration timeseriesConfiguration) { + this.timeseriesConfiguration = timeseriesConfiguration; + } + + public int getConnectionRequestTimeoutInMillisecond() { + return connectionRequestTimeoutInMillisecond; + } + + /** + * 设置HttpAsyncClient的ConnectionRequestTimeout配置。 + * @param connectionRequestTimeoutInMillisecond + */ + public void setConnectionRequestTimeoutInMillisecond(int connectionRequestTimeoutInMillisecond) { + this.connectionRequestTimeoutInMillisecond = connectionRequestTimeoutInMillisecond; + } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/DefaultTableStoreWriter.java b/src/main/java/com/alicloud/openservices/tablestore/DefaultTableStoreWriter.java index d52adc2..caf618a 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/DefaultTableStoreWriter.java +++ b/src/main/java/com/alicloud/openservices/tablestore/DefaultTableStoreWriter.java @@ -1,89 +1,149 @@ package com.alicloud.openservices.tablestore; -import com.alicloud.openservices.tablestore.model.*; +import com.alicloud.openservices.tablestore.core.auth.ServiceCredentials; import com.alicloud.openservices.tablestore.core.utils.ParamChecker; import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.alicloud.openservices.tablestore.model.*; import com.alicloud.openservices.tablestore.writer.*; -import com.lmax.disruptor.InsufficientCapacityException; -import com.lmax.disruptor.RingBuffer; -import com.lmax.disruptor.dsl.Disruptor; +import com.alicloud.openservices.tablestore.writer.config.BucketConfig; +import com.alicloud.openservices.tablestore.writer.dispatch.*; +import com.alicloud.openservices.tablestore.writer.Group; +import com.alicloud.openservices.tablestore.writer.handle.WriterHandleStatistics; +import com.alicloud.openservices.tablestore.writer.retry.CertainCodeNotRetryStrategy; +import com.alicloud.openservices.tablestore.writer.retry.CertainCodeRetryStrategy; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.util.List; -import java.util.Timer; -import java.util.TimerTask; +import java.util.*; import java.util.concurrent.*; import java.util.concurrent.atomic.AtomicBoolean; -import java.util.concurrent.locks.Condition; -import java.util.concurrent.locks.ReentrantLock; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicLong; public class DefaultTableStoreWriter implements TableStoreWriter { private Logger logger = LoggerFactory.getLogger(TableStoreWriter.class); - private AsyncClientInterface ots; + private static final int SCHEDULED_CORE_POOL_SIZE = 2; - private Executor executor; + private final AsyncClientInterface ots; - private WriterConfig writerConfig; + private final Executor executor; + + private final WriterConfig writerConfig; private TableStoreCallback callback; private TableStoreCallback resultCallback; - private String tableName; + private final String tableName; private TableMeta tableMeta; - private Timer flushTimer; + private Bucket[] buckets; + + private final WriterHandleStatistics writerStatistics; - private Disruptor disruptor; + private final AtomicBoolean closed = new AtomicBoolean(false); - private RingBuffer ringBuffer; + private BaseDispatcher dispatcher; - private RowChangeEventHandler eventHandler; + private final Semaphore semaphore; - private ExecutorService disruptorExecutor; + private final ScheduledExecutorService scheduledExecutorService = Executors.newScheduledThreadPool(SCHEDULED_CORE_POOL_SIZE, new ThreadFactory() { + private final AtomicInteger counter = new AtomicInteger(0); - private DefaultWriterStatistics writerStatistics; + @Override + public Thread newThread(Runnable r) { + return new Thread(r, "writer-scheduled-pool-%d" + counter.getAndIncrement()); + } + }); + + private final boolean isInnerConstruct; - private AtomicBoolean closed = new AtomicBoolean(false); + + /** + * 二级索引:不允许批量请求中PrimaryKey重复 + * */ + private boolean allowDuplicatePkInBatchRequest = true; public DefaultTableStoreWriter(AsyncClientInterface ots, String tableName, WriterConfig config, TableStoreCallback callback, Executor executor) { Preconditions.checkNotNull(ots, "The ots client can not be null."); Preconditions.checkArgument(tableName != null && !tableName.isEmpty(), "The table name can not be null or empty."); Preconditions.checkNotNull(executor, "The executor service can not be null."); - this.writerStatistics = new DefaultWriterStatistics(); + this.writerStatistics = new WriterHandleStatistics(); this.ots = ots; this.tableName = tableName; this.writerConfig = config; this.callback = callback; this.resultCallback = createResultCallback(callback); this.executor = executor; - flushTimer = new Timer(); + this.allowDuplicatePkInBatchRequest = writerConfig.isAllowDuplicatedRowInBatchRequest(); + semaphore = new Semaphore(writerConfig.getConcurrency()); + isInnerConstruct = false; initialize(); closed.set(false); } - private TableStoreCallback createResultCallback(final TableStoreCallback callback) { - if (callback != null) { - return new TableStoreCallback() { - @Override - public void onCompleted(RowChange req, RowWriteResult res) { - callback.onCompleted(req, res.getConsumedCapacity()); - } + public DefaultTableStoreWriter( + String endpoint, + ServiceCredentials credentials, + String instanceName, + String tableName, + WriterConfig config, + TableStoreCallback resultCallback) { + Preconditions.checkArgument(tableName != null && !tableName.isEmpty(), "The table name can not be null or empty."); + this.writerStatistics = new WriterHandleStatistics(); - @Override - public void onFailed(RowChange req, Exception ex) { - callback.onFailed(req, ex); - } - }; - } else { - return null; + ClientConfiguration cc = new ClientConfiguration(); + cc.setMaxConnections(config.getClientMaxConnections()); + switch (config.getWriterRetryStrategy()) { + case CERTAIN_ERROR_CODE_NOT_RETRY: + cc.setRetryStrategy(new CertainCodeNotRetryStrategy()); + break; + case CERTAIN_ERROR_CODE_RETRY: + default: + cc.setRetryStrategy(new CertainCodeRetryStrategy()); } + this.ots = new AsyncClient(endpoint, credentials.getAccessKeyId(), credentials.getAccessKeySecret(), instanceName, cc, credentials.getSecurityToken()); + this.tableName = tableName; + this.writerConfig = config; + this.callback = null; + this.resultCallback = resultCallback; + this.executor = createThreadPool(config); + this.allowDuplicatePkInBatchRequest = writerConfig.isAllowDuplicatedRowInBatchRequest(); + semaphore = new Semaphore(writerConfig.getConcurrency()); + isInnerConstruct = true; + + initialize(); + closed.set(false); } + public DefaultTableStoreWriter( + String endpoint, + ServiceCredentials credentials, + String instanceName, + String tableName, + WriterConfig config, + ClientConfiguration cc, + TableStoreCallback resultCallback) { + Preconditions.checkArgument(tableName != null && !tableName.isEmpty(), "The table name can not be null or empty."); + this.writerStatistics = new WriterHandleStatistics(); + this.ots = new AsyncClient(endpoint, credentials.getAccessKeyId(), credentials.getAccessKeySecret(), instanceName, cc, credentials.getSecurityToken()); + this.tableName = tableName; + this.writerConfig = config; + this.callback = null; + this.resultCallback = resultCallback; + this.executor = createThreadPool(config); + this.allowDuplicatePkInBatchRequest = writerConfig.isAllowDuplicatedRowInBatchRequest(); + semaphore = new Semaphore(writerConfig.getConcurrency()); + isInnerConstruct = true; + + initialize(); + closed.set(false); + } + + private void initialize() { logger.info("Start initialize ots writer, table name: {}.", tableName); DescribeTableRequest request = new DescribeTableRequest(); @@ -95,34 +155,81 @@ private void initialize() { } catch (Exception e) { throw new ClientException(e); } + if (res.getIndexMeta() != null && res.getIndexMeta().size() > 0) { + allowDuplicatePkInBatchRequest = false; + logger.info("Table [{}] has globalIndex, allowDuplicatePkInBatchRequest will be overwrite by [false]", tableName); + } this.tableMeta = res.getTableMeta(); logger.info("End initialize with table meta: {}.", tableMeta); - RowChangeEvent.RowChangeEventFactory factory = new RowChangeEvent.RowChangeEventFactory(); + buckets = new Bucket[writerConfig.getBucketCount()]; + for (int i = 0; i < writerConfig.getBucketCount(); i++) { + BucketConfig bucketConfig = new BucketConfig( + i, + this.tableMeta.getTableName(), + this.writerConfig.getWriteMode(), + this.allowDuplicatePkInBatchRequest); + + buckets[i] = new Bucket(bucketConfig, ots, writerConfig, resultCallback, executor, writerStatistics, semaphore); + } - // start flush thread, we only need one event handler, so we just set a thread pool with fixed size 1. - disruptorExecutor = Executors.newFixedThreadPool(1); - disruptor = new Disruptor(factory, writerConfig.getBufferSize(), disruptorExecutor); - ringBuffer = disruptor.getRingBuffer(); - eventHandler = new RowChangeEventHandler(ots, writerConfig, resultCallback, executor, writerStatistics); - disruptor.handleEventsWith(eventHandler); - disruptor.start(); + switch (writerConfig.getDispatchMode()) { + case HASH_PARTITION_KEY: + dispatcher = new HashPartitionKeyDispatcher(writerConfig.getBucketCount()); + break; + case ROUND_ROBIN: + dispatcher = new RoundRobinDispatcher(writerConfig.getBucketCount()); + break; + case HASH_PRIMARY_KEY: + dispatcher = new HashPrimaryKeyDispatcher(writerConfig.getBucketCount()); + break; + default: + throw new ClientException(String.format("The dispatch mode [%s] not supported", writerConfig.getDispatchMode())); + } - // start flush timer startFlushTimer(writerConfig.getFlushInterval()); + startLogTimer(writerConfig.getLogInterval()); } - public void startFlushTimer(int flushInterval) { - - this.flushTimer.cancel(); - - this.flushTimer = new Timer(); - this.flushTimer.scheduleAtFixedRate(new TimerTask() { + /** + * 基于用户机器核数,内部构建合适的线程池(N为机器核数) + * core/max: 支持用户配置,默认:核数+1 + * blockQueue: 支持用户配置,1024 + * Reject: CallerRunsPolicy + */ + private ExecutorService createThreadPool (WriterConfig config) { + int coreThreadCount = config.getCallbackThreadCount(); + int maxThreadCount = coreThreadCount; + int queueSize = config.getCallbackThreadPoolQueueSize(); + + ThreadFactory threadFactory = new ThreadFactory() { + private final AtomicInteger counter = new AtomicInteger(1); @Override - public void run() { - triggerFlush(); + public Thread newThread(Runnable r) { + return new Thread(r, "writer-callback-" + counter.getAndIncrement()); } - }, flushInterval, flushInterval); + }; + + return new ThreadPoolExecutor(coreThreadCount, maxThreadCount, 0L, TimeUnit.MILLISECONDS, + new LinkedBlockingQueue(queueSize), threadFactory, new ThreadPoolExecutor.CallerRunsPolicy()); + } + + private TableStoreCallback createResultCallback(final TableStoreCallback callback) { + if (callback != null) { + return new TableStoreCallback() { + @Override + public void onCompleted(RowChange req, RowWriteResult res) { + callback.onCompleted(req, res.getConsumedCapacity()); + } + + @Override + public void onFailed(RowChange req, Exception ex) { + callback.onFailed(req, ex); + } + }; + } else { + return null; + } } @Override @@ -131,8 +238,28 @@ public void addRowChange(RowChange rowChange) { ParamChecker.checkRowChange(tableMeta, rowChange, writerConfig); } + Group group = new Group(1); + while (true) { + if (!addRowChangeInternal(rowChange, group)) { + try { + Thread.sleep(1); + } catch (InterruptedException exp) { + } + } else { + break; + } + } + } + + @Override + public Future addRowChangeWithFuture(RowChange rowChange) { + if (writerConfig.isEnableSchemaCheck()) { + ParamChecker.checkRowChange(tableMeta, rowChange, writerConfig); + } + + Group group = new Group(1); while (true) { - if (!addRowChangeInternal(rowChange)) { + if (!addRowChangeInternal(rowChange, group)) { try { Thread.sleep(1); } catch (InterruptedException exp) { @@ -141,6 +268,8 @@ public void addRowChange(RowChange rowChange) { break; } } + + return group.getFuture(); } @Override @@ -149,40 +278,48 @@ public boolean tryAddRowChange(RowChange rowChange) { ParamChecker.checkRowChange(tableMeta, rowChange, writerConfig); } - return addRowChangeInternal(rowChange); + Group group = new Group(1); + return addRowChangeInternal(rowChange, group); } - public boolean addRowChangeInternal(RowChange rowChange) { + private boolean addRowChangeInternal(RowChange rowChange, final Group group) { if (closed.get()) { throw new ClientException("The writer has been closed."); } - try { - long sequence = ringBuffer.tryNext(); - RowChangeEvent event = ringBuffer.get(sequence); - event.setValue(rowChange); - ringBuffer.publish(sequence); - return true; - } catch (InsufficientCapacityException e) { - return false; - } + int targetBucketIndex = dispatcher.getDispatchIndex(rowChange); + + return buckets[targetBucketIndex].addRowChange(rowChange, group); } - private void addSignal(CountDownLatch latch) { - while (true) { - try { - long sequence = ringBuffer.tryNext(); - RowChangeEvent event = ringBuffer.get(sequence); - event.setValue(latch); - ringBuffer.publish(sequence); - return; - } catch (InsufficientCapacityException e) { - try { - Thread.sleep(1); - } catch (InterruptedException exp) { + public void startFlushTimer(int flushInterval) { + scheduledExecutorService.scheduleAtFixedRate(new Runnable() { + @Override + public void run() { + triggerFlush(); + } + }, 0, flushInterval, TimeUnit.MILLISECONDS); + } + + private void startLogTimer(int interval) { + scheduledExecutorService.scheduleAtFixedRate(new Runnable() { + @Override + public void run() { + StringBuilder ringBufferRemain = new StringBuilder("RingBuffer Remain: "); + for (Bucket bucket : buckets) { + ringBufferRemain.append(bucket.getRingBuffer().remainingCapacity()); + ringBufferRemain.append(", "); + } + logger.debug(ringBufferRemain.toString()); + + StringBuilder dispatcherCount = new StringBuilder("Dispatcher Count: "); + for (AtomicLong count : dispatcher.getBucketDispatchRowCount()) { + dispatcherCount.append(count.get()); + dispatcherCount.append(", "); } + logger.debug(dispatcherCount.toString()); } - } + }, 0, interval, TimeUnit.MILLISECONDS); } @Override @@ -200,18 +337,49 @@ public void addRowChange(List rowChanges, List dirtyRows) } } + @Override + public Future addRowChangeWithFuture(List rowChanges) throws ClientException { + Group group = new Group(rowChanges.size()); + for (RowChange rowChange : rowChanges) { + if (writerConfig.isEnableSchemaCheck()) { + ParamChecker.checkRowChange(tableMeta, rowChange, writerConfig); + } + + try { + while (true) { + if (!addRowChangeInternal(rowChange, group)) { + try { + Thread.sleep(1); + } catch (InterruptedException exp) { + } + } else { + break; + } + } + } catch (ClientException e) { + group.failedOneRow(rowChange, e); + } + } + + return group.getFuture(); + } + @Override public void setCallback(final TableStoreCallback callback) { this.callback = callback; this.resultCallback = createResultCallback(callback); - eventHandler.setCallback(resultCallback); + for (Bucket bucket : buckets) { + bucket.setResultCallback(resultCallback); + } } @Override public void setResultCallback(TableStoreCallback resultCallback) { this.callback = null; this.resultCallback = resultCallback; - eventHandler.setCallback(resultCallback); + for (Bucket bucket : buckets) { + bucket.setResultCallback(resultCallback); + } } @Override @@ -236,8 +404,11 @@ public WriterStatistics getWriterStatistics() { } private CountDownLatch triggerFlush() { - CountDownLatch latch = new CountDownLatch(1); - addSignal(latch); + CountDownLatch latch = new CountDownLatch(writerConfig.getBucketCount()); + for (Bucket bucket : buckets) { + bucket.addSignal(latch); + } + logger.info("WriterStatistics: " + writerStatistics); return latch; } @@ -263,11 +434,20 @@ public synchronized void close() { throw new ClientException("The writer has already been closed."); } - flushTimer.cancel(); flush(); - disruptor.shutdown(); - disruptorExecutor.shutdown(); + scheduledExecutorService.shutdown(); + for (Bucket bucket : buckets) { + bucket.close(); + logger.debug(String.format("bucket [%d] is closed.", bucket.getId())); + } + /** + * 内部构建的client与executor需要内部shutdown,用户无感知 + */ + if (isInnerConstruct) { + ots.shutdown(); + ((ExecutorService)executor).shutdown(); + } closed.set(true); } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/InternalClient.java b/src/main/java/com/alicloud/openservices/tablestore/InternalClient.java index ac4a235..5d37880 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/InternalClient.java +++ b/src/main/java/com/alicloud/openservices/tablestore/InternalClient.java @@ -4,16 +4,20 @@ import java.util.Random; import java.util.UUID; import java.util.concurrent.*; -import java.util.concurrent.atomic.AtomicInteger; import com.alicloud.openservices.tablestore.core.auth.CredentialsProvider; import com.alicloud.openservices.tablestore.core.auth.CredentialsProviderFactory; +import com.alicloud.openservices.tablestore.core.utils.HttpUtil; import com.alicloud.openservices.tablestore.core.utils.Preconditions; import com.alicloud.openservices.tablestore.core.auth.ServiceCredentials; import com.alicloud.openservices.tablestore.core.http.AsyncServiceClient; import com.alicloud.openservices.tablestore.core.*; import com.alicloud.openservices.tablestore.model.*; +import com.alicloud.openservices.tablestore.model.delivery.*; import com.alicloud.openservices.tablestore.model.search.*; +import com.alicloud.openservices.tablestore.model.sql.SQLQueryRequest; +import com.alicloud.openservices.tablestore.model.sql.SQLQueryResponse; +import com.alicloud.openservices.tablestore.model.timeseries.*; import com.alicloud.openservices.tablestore.model.tunnel.CreateTunnelRequest; import com.alicloud.openservices.tablestore.model.tunnel.CreateTunnelResponse; import com.alicloud.openservices.tablestore.model.tunnel.DeleteTunnelRequest; @@ -34,12 +38,14 @@ import com.alicloud.openservices.tablestore.model.tunnel.internal.ReadRecordsResponse; import com.alicloud.openservices.tablestore.model.tunnel.internal.ShutdownTunnelRequest; import com.alicloud.openservices.tablestore.model.tunnel.internal.ShutdownTunnelResponse; +import com.google.common.cache.Cache; public class InternalClient { private static int AVAILABLE_PROCESSORS = Runtime.getRuntime().availableProcessors(); private String endpoint; // TableStore endpoint private String instanceName; // 实例的名称 private CredentialsProvider crdsProvider; // 用户身份信息。 + private ResourceManager resourceManager; private AsyncServiceClient httpClient; private ScheduledExecutorService retryExecutor; private ExecutorService callbackExecutor; // 用于执行Callback @@ -47,6 +53,7 @@ public class InternalClient { private RetryStrategy retryStrategy; private LauncherFactory launcherFactory; private Random random = new Random(); + private Cache timeseriesMetaCache; /** * 使用指定的TableStore Endpoint和默认配置构造一个新的{@link AsyncClient}实例。 @@ -125,19 +132,18 @@ public InternalClient(String endpoint, String accessKeyId, String accessKeySecre public InternalClient(String endpoint, String accessKeyId, String accessKeySecret, String instanceName, ClientConfiguration config, ExecutorService callbackExecutor, String stsToken) { this(endpoint, CredentialsProviderFactory.newDefaultCredentialProvider(accessKeyId, accessKeySecret, stsToken), - instanceName, config, callbackExecutor); - - + instanceName, config, new ResourceManager(config, callbackExecutor)); } public InternalClient(String endpoint, CredentialsProvider credsProvider, String instanceName, - ClientConfiguration config, ExecutorService callbackExecutor) { + ClientConfiguration config, ResourceManager resourceManager) { Preconditions.checkArgument(endpoint != null && !endpoint.isEmpty(), "The end point should not be null or empty."); Preconditions.checkArgument(instanceName != null && !instanceName.isEmpty(), "The name of instance should not be null or empty."); Preconditions.checkArgument(instanceName.length() == instanceName.getBytes(Constants.UTF8_CHARSET).length, "InstanceName should not have multibyte character."); + Preconditions.checkArgument(HttpUtil.checkSSRF(instanceName), "The instance name is invalid: " + instanceName); if (!endpoint.startsWith("http://") && !endpoint.startsWith("https://")) { throw new IllegalArgumentException("the endpoint must start with \"http://\" or \"https://\"."); @@ -152,34 +158,22 @@ public InternalClient(String endpoint, CredentialsProvider credsProvider, String this.clientConfig = config; - this.httpClient = new AsyncServiceClient(config); - - this.retryExecutor = Executors.newScheduledThreadPool(config.getRetryThreadCount(), - new ThreadFactory() { - private final AtomicInteger counter = new AtomicInteger(1); - @Override - public Thread newThread(Runnable r) { - return new Thread(r, "tablestore-retry-scheduled-" + counter.getAndIncrement()); - } - }); - this.retryStrategy = config.getRetryStrategy(); this.instanceName = instanceName; - if (callbackExecutor != null) { - this.callbackExecutor = callbackExecutor; + if (resourceManager != null) { + this.resourceManager = resourceManager; } else { - this.callbackExecutor = Executors.newFixedThreadPool(AVAILABLE_PROCESSORS, - new ThreadFactory() { - private final AtomicInteger counter = new AtomicInteger(1); - @Override - public Thread newThread(Runnable r) { - return new Thread(r, "tablestore-callback-" + counter.getAndIncrement()); - } - }); + this.resourceManager = new ResourceManager(this.clientConfig); } + this.httpClient = this.resourceManager.getResources().getHttpClient(); + + this.retryExecutor = this.resourceManager.getResources().getRetryExecutor(); + + this.callbackExecutor = this.resourceManager.getResources().getCallbackExecutor(); + this.launcherFactory = new LauncherFactory(endpoint, instanceName, httpClient, crdsProvider, config); } @@ -214,6 +208,14 @@ public ClientConfiguration getClientConfig() { return clientConfig; } + protected void setTimeseriesMetaCache(Cache cache) { + timeseriesMetaCache = cache; + } + + protected Cache getTimeseriesMetaCache() { + return this.timeseriesMetaCache; + } + private TraceLogger getTraceLogger() { String traceId = new UUID(random.nextLong(), (new Random()).nextLong()).toString(); return new TraceLogger(traceId, this.clientConfig.getTimeThresholdOfTraceLogger()); @@ -264,6 +266,29 @@ public Future createTable(CreateTableRequest request, return f; } + public Future createTableEx(CreateTableRequestEx request, + TableStoreCallback callback) { + Preconditions.checkNotNull(request); + + TraceLogger tracer = getTraceLogger(); + RetryStrategy retry = this.retryStrategy.clone(); + CreateTableExLauncher launcher = launcherFactory.createTableEx(tracer, retry, request); + + AsyncCompletion completion = new AsyncCompletion( + launcher, request, tracer, callbackExecutor, retry, retryExecutor); + CallbackImpledFuture f = new CallbackImpledFuture(); + completion.watchBy(f); + if (callback != null) { + // user callback must be triggered after completion of the return + // future. + f.watchBy(callback); + } + + launcher.fire(request, completion); + + return f; + } + public Future describeTable(DescribeTableRequest request, TableStoreCallback callback) { Preconditions.checkNotNull(request); @@ -382,6 +407,51 @@ public Future deleteIndex(DeleteIndexRequest request, return f; } + public Future addDefinedColumn(AddDefinedColumnRequest request, + TableStoreCallback callback) { + Preconditions.checkNotNull(request); + + TraceLogger tracer = getTraceLogger(); + RetryStrategy retry = this.retryStrategy.clone(); + AddDefinedColumnLauncher launcher = launcherFactory.addDefinedColumn(tracer, retry, request); + + AsyncCompletion completion = new AsyncCompletion( + launcher, request, tracer, callbackExecutor, retry, retryExecutor); + CallbackImpledFuture f = new CallbackImpledFuture(); + completion.watchBy(f); + if (callback != null) { + // user callback must be triggered after completion of the return + // future. + f.watchBy(callback); + } + + launcher.fire(request, completion); + + return f; + } + + public Future deleteDefinedColumn(DeleteDefinedColumnRequest request, + TableStoreCallback callback) { + Preconditions.checkNotNull(request); + + TraceLogger tracer = getTraceLogger(); + RetryStrategy retry = this.retryStrategy.clone(); + DeleteDefinedColumnLauncher launcher = launcherFactory.deleteDefinedColumn(tracer, retry, request); + AsyncCompletion completion = new AsyncCompletion( + launcher, request, tracer, callbackExecutor, retry, retryExecutor); + CallbackImpledFuture f = new CallbackImpledFuture(); + completion.watchBy(f); + if (callback != null) { + // user callback must be triggered after completion of the return + // future. + f.watchBy(callback); + } + + launcher.fire(request, completion); + + return f; + } + public Future getRowInternal(GetRowRequest request, TableStoreCallback callback) { Preconditions.checkNotNull(request); @@ -566,6 +636,28 @@ public Future batchWriteRow(BatchWriteRowRequest request, return f; } + public Future bulkImport(BulkImportRequest request, + TableStoreCallback callback) { + Preconditions.checkNotNull(request); + + TraceLogger tracer = getTraceLogger(); + RetryStrategy retry = this.retryStrategy.clone(); + BulkImportLauncher launcher = launcherFactory.bulkImport(tracer, retry, request); + AsyncCompletion completion = new AsyncCompletion( + launcher, request, tracer, callbackExecutor, retry, retryExecutor); + CallbackImpledFuture f = new CallbackImpledFuture(); + completion.watchBy(f); + if (callback != null) { + // user callback must be triggered after completion of the return + // future. + f.watchBy(callback); + } + + launcher.fire(request, completion); + + return f; + } + public Future getRangeInternal(GetRangeRequest request, TableStoreCallback callback) { Preconditions.checkNotNull(request); @@ -589,6 +681,29 @@ public Future getRangeInternal(GetRangeRequest request, return f; } + public Future bulkExportInternal(BulkExportRequest request, + TableStoreCallback callback) { + Preconditions.checkNotNull(request); + + TraceLogger tracer = getTraceLogger(); + RetryStrategy retry = this.retryStrategy.clone(); + BulkExportLauncher launcher = launcherFactory.bulkExport(tracer, retry, request); + + AsyncCompletion completion = new AsyncCompletion( + launcher, request, tracer, callbackExecutor, retry, retryExecutor); + CallbackImpledFuture f = new CallbackImpledFuture(); + completion.watchBy(f); + if (callback != null) { + // user callback must be triggered after completion of the return + // future. + f.watchBy(callback); + } + + launcher.fire(request, completion); + + return f; + } + public Future getRange(GetRangeRequest request, TableStoreCallback callback) { Preconditions.checkNotNull(request); @@ -612,10 +727,33 @@ public Future getRange(GetRangeRequest request, return f; } + public Future bulkExport(BulkExportRequest request, + TableStoreCallback callback) { + Preconditions.checkNotNull(request); + + TraceLogger tracer = getTraceLogger(); + RetryStrategy retry = this.retryStrategy.clone(); + BulkExportLauncher launcher = launcherFactory.bulkExport(tracer, retry, request); + + AsyncCompletion completion = new AsyncCompletion(launcher, request, tracer, callbackExecutor, + retry, retryExecutor); + CallbackImpledFuture f = new CallbackImpledFuture(); + completion.watchBy(f); + if (callback != null) { + // user callback must be triggered after completion of the return + // future. + f.watchBy(callback); + } + + launcher.fire(request, completion); + + return f; + } + public Future computeSplitsBySize(ComputeSplitsBySizeRequest request, TableStoreCallback callback) { Preconditions.checkNotNull(request); - Preconditions.checkStringNotNullAndEmpty(request.getTableName(), + Preconditions.checkStringNotNullAndEmpty(request.getTableName(), "The table name for ComputeSplitsBySize should not be null or empty."); TraceLogger tracer = getTraceLogger(); @@ -638,9 +776,7 @@ public Future computeSplitsBySize(ComputeSplitsBySi } public void shutdown() { - this.retryExecutor.shutdownNow(); - this.callbackExecutor.shutdownNow(); - this.httpClient.shutdown(); + this.resourceManager.shutdown(); } public Future listStream(ListStreamRequest request, @@ -829,6 +965,31 @@ public Future createSearchIndex(CreateSearchIndexRequ return f; } + public Future updateSearchIndex(UpdateSearchIndexRequest request, + TableStoreCallback callback) { + Preconditions.checkNotNull(request); + + TraceLogger tracer = getTraceLogger(); + RetryStrategy retry = this.retryStrategy.clone(); + UpdateSearchIndexLauncher launcher = launcherFactory.updateSearchIndex(tracer, retry, request); + + AsyncCompletion completion = + new AsyncCompletion( + launcher, request, tracer, callbackExecutor, retry, retryExecutor); + CallbackImpledFuture f = + new CallbackImpledFuture(); + completion.watchBy(f); + if (callback != null) { + // user callback must be triggered after completion of the return + // future. + f.watchBy(callback); + } + + launcher.fire(request, completion); + + return f; + } + public Future listSearchIndex(ListSearchIndexRequest request, TableStoreCallback callback) { Preconditions.checkNotNull(request); @@ -904,6 +1065,50 @@ public Future describeSearchIndex(DescribeSearchInd return f; } + public Future computeSplits(ComputeSplitsRequest request, TableStoreCallback callback) { + Preconditions.checkNotNull(request); + + TraceLogger tracer = getTraceLogger(); + RetryStrategy retry = this.retryStrategy.clone(); + ComputeSplitsLauncher launcher = launcherFactory.computeSplits(tracer, retry, request); + + AsyncCompletion completion = + new AsyncCompletion(launcher, request, tracer, callbackExecutor, retry, retryExecutor); + CallbackImpledFuture f = new CallbackImpledFuture(); + completion.watchBy(f); + if (callback != null) { + // user callback must be triggered after completion of the return + // future. + f.watchBy(callback); + } + + launcher.fire(request, completion); + + return f; + } + + public Future parallelScan(ParallelScanRequest request, TableStoreCallback callback) { + Preconditions.checkNotNull(request); + + TraceLogger tracer = getTraceLogger(); + RetryStrategy retry = this.retryStrategy.clone(); + ParallelScanLauncher launcher = launcherFactory.parallelScan(tracer, retry, request); + + AsyncCompletion completion = + new AsyncCompletion(launcher, request, tracer, callbackExecutor, retry, retryExecutor); + CallbackImpledFuture f = new CallbackImpledFuture(); + completion.watchBy(f); + if (callback != null) { + // user callback must be triggered after completion of the return + // future. + f.watchBy(callback); + } + + launcher.fire(request, completion); + + return f; + } + public Future search(SearchRequest request, TableStoreCallback callback) { Preconditions.checkNotNull(request); @@ -1199,6 +1404,347 @@ public Future checkpoint(CheckpointRequest request, return f; } + + public Future createDeliveryTask(CreateDeliveryTaskRequest request, + TableStoreCallback callback) { + Preconditions.checkNotNull(request); + + TraceLogger tracer = getTraceLogger(); + RetryStrategy retry = this.retryStrategy.clone(); + CreateDeliveryTaskLauncher launcher = launcherFactory.createDeliveryTask(tracer, retry, request); + + AsyncCompletion completion = new AsyncCompletion( + launcher, request, tracer, callbackExecutor, retry, retryExecutor); + CallbackImpledFuture f = new CallbackImpledFuture(); + completion.watchBy(f); + if (callback != null) { + // user callback must be triggered after completion of the return + // future. + f.watchBy(callback); + } + + launcher.fire(request, completion); + + return f; + } + + public Future deleteDeliveryTask(DeleteDeliveryTaskRequest request, + TableStoreCallback callback) { + Preconditions.checkNotNull(request); + + TraceLogger tracer = getTraceLogger(); + RetryStrategy retry = this.retryStrategy.clone(); + DeleteDeliveryTaskLauncher launcher = launcherFactory.deleteDeliveryTask(tracer, retry, request); + + AsyncCompletion completion = new AsyncCompletion( + launcher, request, tracer, callbackExecutor, retry, retryExecutor); + CallbackImpledFuture f = new CallbackImpledFuture(); + completion.watchBy(f); + if (callback != null) { + // user callback must be triggered after completion of the return + // future. + f.watchBy(callback); + } + + launcher.fire(request, completion); + + return f; + } + + public Future describeDeliveryTask(DescribeDeliveryTaskRequest request, + TableStoreCallback callback) { + Preconditions.checkNotNull(request); + + TraceLogger tracer = getTraceLogger(); + RetryStrategy retry = this.retryStrategy.clone(); + DescribeDeliveryTaskLauncher launcher = launcherFactory.describeDeliveryTask(tracer, retry, request); + + AsyncCompletion completion = new AsyncCompletion( + launcher, request, tracer, callbackExecutor, retry, retryExecutor); + CallbackImpledFuture f = new CallbackImpledFuture(); + completion.watchBy(f); + if (callback != null) { + // user callback must be triggered after completion of the return + // future. + f.watchBy(callback); + } + + launcher.fire(request, completion); + + return f; + } + + public Future listDeliveryTask(ListDeliveryTaskRequest request, + TableStoreCallback callback) { + Preconditions.checkNotNull(request); + + TraceLogger tracer = getTraceLogger(); + RetryStrategy retry = this.retryStrategy.clone(); + ListDeliveryTaskLauncher launcher = launcherFactory.listDeliveryTask(tracer, retry, request); + + AsyncCompletion completion = new AsyncCompletion( + launcher, request, tracer, callbackExecutor, retry, retryExecutor); + CallbackImpledFuture f = new CallbackImpledFuture(); + completion.watchBy(f); + if (callback != null) { + // user callback must be triggered after completion of the return + // future. + f.watchBy(callback); + } + + launcher.fire(request, completion); + + return f; + } + + public Future createTimeseriesTable(CreateTimeseriesTableRequest request, + TableStoreCallback callback) { + Preconditions.checkNotNull(request); + + TraceLogger tracer = getTraceLogger(); + RetryStrategy retry = this.retryStrategy.clone(); + CreateTimeseriesTableLauncher launcher = launcherFactory.createTimeseriesTable(tracer, retry, request); + + AsyncCompletion completion = + new AsyncCompletion( + launcher, request, tracer, callbackExecutor, retry, retryExecutor); + CallbackImpledFuture f = + new CallbackImpledFuture(); + completion.watchBy(f); + if (callback != null) { + // user callback must be triggered after completion of the return + // future. + f.watchBy(callback); + } + + launcher.fire(request, completion); + + return f; + } + + public Future deleteTimeseriesTable(DeleteTimeseriesTableRequest request, + TableStoreCallback callback) { + Preconditions.checkNotNull(request); + + TraceLogger tracer = getTraceLogger(); + RetryStrategy retry = this.retryStrategy.clone(); + DeleteTimeseriesTableLauncher launcher = launcherFactory.deleteTimeseriesTable(tracer, retry, request); + + AsyncCompletion completion = + new AsyncCompletion( + launcher, request, tracer, callbackExecutor, retry, retryExecutor); + CallbackImpledFuture f = + new CallbackImpledFuture(); + completion.watchBy(f); + if (callback != null) { + // user callback must be triggered after completion of the return + // future. + f.watchBy(callback); + } + + launcher.fire(request, completion); + + return f; + } + + public Future describeTimeseriesTable(DescribeTimeseriesTableRequest request, + TableStoreCallback callback) { + Preconditions.checkNotNull(request); + + TraceLogger tracer = getTraceLogger(); + RetryStrategy retry = this.retryStrategy.clone(); + DescribeTimeseriesTableLauncher launcher = launcherFactory.describeTimeseriesTable(tracer, retry, request); + + AsyncCompletion completion = + new AsyncCompletion( + launcher, request, tracer, callbackExecutor, retry, retryExecutor); + CallbackImpledFuture f = + new CallbackImpledFuture(); + completion.watchBy(f); + if (callback != null) { + // user callback must be triggered after completion of the return + // future. + f.watchBy(callback); + } + + launcher.fire(request, completion); + + return f; + } + + public Future updateTimeseriesTable(UpdateTimeseriesTableRequest request, + TableStoreCallback callback) { + Preconditions.checkNotNull(request); + + TraceLogger tracer = getTraceLogger(); + RetryStrategy retry = this.retryStrategy.clone(); + UpdateTimeseriesTableLauncher launcher = launcherFactory.updateTimeseriesTable(tracer, retry, request); + + AsyncCompletion completion = + new AsyncCompletion( + launcher, request, tracer, callbackExecutor, retry, retryExecutor); + CallbackImpledFuture f = + new CallbackImpledFuture(); + completion.watchBy(f); + if (callback != null) { + // user callback must be triggered after completion of the return + // future. + f.watchBy(callback); + } + + launcher.fire(request, completion); + + return f; + } + + public Future putTimeseriesData(PutTimeseriesDataRequest request, + TableStoreCallback callback) { + Preconditions.checkNotNull(request); + + TraceLogger tracer = getTraceLogger(); + RetryStrategy retry = this.retryStrategy.clone(); + PutTimeseriesDataLauncher launcher = launcherFactory.putTimeseriesData(tracer, retry, request, timeseriesMetaCache); + + AsyncCompletion completion = + new AsyncCompletion( + launcher, request, tracer, callbackExecutor, retry, retryExecutor); + CallbackImpledFuture f = + new CallbackImpledFuture(); + completion.watchBy(f); + if (callback != null) { + // user callback must be triggered after completion of the return + // future. + f.watchBy(callback); + } + + launcher.fire(request, completion); + + return f; + } + + public Future getTimeseriesData(GetTimeseriesDataRequest request, + TableStoreCallback callback) { + Preconditions.checkNotNull(request); + + TraceLogger tracer = getTraceLogger(); + RetryStrategy retry = this.retryStrategy.clone(); + GetTimeseriesDataLauncher launcher = launcherFactory.getTimeseriesData(tracer, retry, request); + + AsyncCompletion completion = + new AsyncCompletion( + launcher, request, tracer, callbackExecutor, retry, retryExecutor); + CallbackImpledFuture f = + new CallbackImpledFuture(); + completion.watchBy(f); + if (callback != null) { + // user callback must be triggered after completion of the return + // future. + f.watchBy(callback); + } + + launcher.fire(request, completion); + + return f; + } + + public Future listTimeseriesTable(TableStoreCallback callback) { + ListTimeseriesTableRequest request = new ListTimeseriesTableRequest(); + TraceLogger tracer = getTraceLogger(); + RetryStrategy retry = this.retryStrategy.clone(); + ListTimeseriesTableLauncher launcher = launcherFactory.listTimeseriesTable(tracer, retry, request); + + AsyncCompletion completion = + new AsyncCompletion( + launcher, request, tracer, callbackExecutor, retry, retryExecutor); + CallbackImpledFuture f = + new CallbackImpledFuture(); + completion.watchBy(f); + if (callback != null) { + // user callback must be triggered after completion of the return + // future. + f.watchBy(callback); + } + + launcher.fire(request, completion); + + return f; + } + + public Future queryTimeseriesMeta(QueryTimeseriesMetaRequest request, + TableStoreCallback callback) { + Preconditions.checkNotNull(request); + + TraceLogger tracer = getTraceLogger(); + RetryStrategy retry = this.retryStrategy.clone(); + QueryTimeseriesMetaLauncher launcher = launcherFactory.queryTimeseriesMeta(tracer, retry, request); + + AsyncCompletion completion = + new AsyncCompletion( + launcher, request, tracer, callbackExecutor, retry, retryExecutor); + CallbackImpledFuture f = + new CallbackImpledFuture(); + completion.watchBy(f); + if (callback != null) { + // user callback must be triggered after completion of the return + // future. + f.watchBy(callback); + } + + launcher.fire(request, completion); + + return f; + } + + public Future updateTimeseriesMeta(UpdateTimeseriesMetaRequest request, + TableStoreCallback callback) { + Preconditions.checkNotNull(request); + + TraceLogger tracer = getTraceLogger(); + RetryStrategy retry = this.retryStrategy.clone(); + UpdateTimeseriesMetaLauncher launcher = launcherFactory.updateTimeseriesMeta(tracer, retry, request); + + AsyncCompletion completion = + new AsyncCompletion( + launcher, request, tracer, callbackExecutor, retry, retryExecutor); + CallbackImpledFuture f = + new CallbackImpledFuture(); + completion.watchBy(f); + if (callback != null) { + // user callback must be triggered after completion of the return + // future. + f.watchBy(callback); + } + + launcher.fire(request, completion); + + return f; + } + + public Future deleteTimeseriesMeta(DeleteTimeseriesMetaRequest request, + TableStoreCallback callback) { + Preconditions.checkNotNull(request); + + TraceLogger tracer = getTraceLogger(); + RetryStrategy retry = this.retryStrategy.clone(); + DeleteTimeseriesMetaLauncher launcher = launcherFactory.deleteTimeseriesMeta(tracer, retry, request); + + AsyncCompletion completion = + new AsyncCompletion( + launcher, request, tracer, callbackExecutor, retry, retryExecutor); + CallbackImpledFuture f = + new CallbackImpledFuture(); + completion.watchBy(f); + if (callback != null) { + // user callback must be triggered after completion of the return + // future. + f.watchBy(callback); + } + + launcher.fire(request, completion); + + return f; + } + public void setCredentials(ServiceCredentials credentials) { CredentialsProvider newCrdsProvider = CredentialsProviderFactory.newDefaultCredentialProvider(credentials.getAccessKeyId(), credentials.getAccessKeySecret(), credentials.getSecurityToken()); @@ -1209,4 +1755,27 @@ public void switchCredentialsProvider(CredentialsProvider newCrdsProvider) { this.crdsProvider = newCrdsProvider; this.launcherFactory.setCredentialsProvider(newCrdsProvider); } + + public Future sqlQuery(SQLQueryRequest request, + TableStoreCallback callback) { + Preconditions.checkNotNull(request); + + TraceLogger tracer = getTraceLogger(); + RetryStrategy retry = this.retryStrategy.clone(); + SQLQueryLauncher launcher = launcherFactory.sqlQuery(tracer, retry, request); + + AsyncCompletion completion = + new AsyncCompletion(launcher, request, tracer, callbackExecutor, retry, retryExecutor); + CallbackImpledFuture f = new CallbackImpledFuture(); + completion.watchBy(f); + if (callback != null) { + // user callback must be triggered after completion of the return + // future. + f.watchBy(callback); + } + + launcher.fire(request, completion); + + return f; + } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/SyncClient.java b/src/main/java/com/alicloud/openservices/tablestore/SyncClient.java index 70d54cd..e2677db 100755 --- a/src/main/java/com/alicloud/openservices/tablestore/SyncClient.java +++ b/src/main/java/com/alicloud/openservices/tablestore/SyncClient.java @@ -4,19 +4,23 @@ import java.util.Map; import java.util.concurrent.*; +import com.alicloud.openservices.tablestore.core.ResourceManager; import com.alicloud.openservices.tablestore.core.auth.CredentialsProvider; import com.alicloud.openservices.tablestore.core.auth.ServiceCredentials; import com.alicloud.openservices.tablestore.core.utils.Preconditions; import com.alicloud.openservices.tablestore.model.*; +import com.alicloud.openservices.tablestore.model.delivery.*; +import com.alicloud.openservices.tablestore.model.iterator.*; import com.alicloud.openservices.tablestore.model.search.*; -import org.apache.http.concurrent.FutureCallback; -import com.alicloud.openservices.tablestore.PrepareCallback; +import com.alicloud.openservices.tablestore.model.sql.SQLQueryRequest; +import com.alicloud.openservices.tablestore.model.sql.SQLQueryResponse; public class SyncClient implements SyncClientInterface { public class DefaultPrepareCallback implements PrepareCallback { public DefaultPrepareCallback() { } + @Override public void onPrepare() { } } @@ -96,6 +100,11 @@ public SyncClient(String endpoint, String accessKeyId, this.internalClient = new InternalClient(endpoint, accessKeyId, accessKeySecret, instanceName, config, callbackExecutor, stsToken); } + public SyncClient(String endpoint, CredentialsProvider credsProvider, String instanceName, + ClientConfiguration config, ResourceManager resourceManager) { + this.internalClient = new InternalClient(endpoint, credsProvider, instanceName, config, resourceManager); + } + SyncClient(InternalClient internalClient) { this.internalClient = internalClient; } @@ -199,6 +208,26 @@ public DeleteIndexResponse deleteIndex(DeleteIndexRequest deleteIndexRequest) return waitForFuture(res); } + @Override + public AddDefinedColumnResponse addDefinedColumn(AddDefinedColumnRequest addDefinedColumnRequest) + throws TableStoreException, ClientException + { + Preconditions.checkNotNull(addDefinedColumnRequest); + + Future res = this.internalClient.addDefinedColumn(addDefinedColumnRequest, null); + return waitForFuture(res); + } + + @Override + public DeleteDefinedColumnResponse deleteDefinedColumn(DeleteDefinedColumnRequest deleteDefinedColumnRequest) + throws TableStoreException, ClientException + { + Preconditions.checkNotNull(deleteDefinedColumnRequest); + + Future res = this.internalClient.deleteDefinedColumn(deleteDefinedColumnRequest, null); + return waitForFuture(res); + } + @Override public GetRowResponse getRow(GetRowRequest getRowRequest) throws TableStoreException, ClientException { Preconditions.checkNotNull(getRowRequest); @@ -263,6 +292,18 @@ public BatchWriteRowResponse batchWriteRow(final BatchWriteRowRequest batchWrite return waitForFuture(res); } + @Override + public BulkImportResponse bulkImport(final BulkImportRequest bulkImportRequest) + throws TableStoreException, ClientException + { + Preconditions.checkNotNull(bulkImportRequest); + Preconditions.checkNotNull(prepareCallback); + + prepareCallback.onPrepare(); + Future res = this.internalClient.bulkImport(bulkImportRequest, null); + return waitForFuture(res); + } + @Override public GetRangeResponse getRange(GetRangeRequest getRangeRequest) throws TableStoreException, ClientException { Preconditions.checkNotNull(getRangeRequest); @@ -272,7 +313,16 @@ public GetRangeResponse getRange(GetRangeRequest getRangeRequest) throws TableSt Future res = this.internalClient.getRange(getRangeRequest, null); return waitForFuture(res); } - + + @Override + public BulkExportResponse bulkExport(BulkExportRequest bulkExportRequest) throws TableStoreException, ClientException { + Preconditions.checkNotNull(bulkExportRequest); + Preconditions.checkNotNull(prepareCallback); + prepareCallback.onPrepare(); + Future res = this.internalClient.bulkExport(bulkExportRequest, null); + return waitForFuture(res); + } + @Override public ComputeSplitsBySizeResponse computeSplitsBySize(ComputeSplitsBySizeRequest computeSplitsBySizeRequest) throws TableStoreException, ClientException { @@ -288,7 +338,14 @@ public ComputeSplitsBySizeResponse computeSplitsBySize(ComputeSplitsBySizeReques public Iterator createRangeIterator( RangeIteratorParameter rangeIteratorParameter) throws TableStoreException, ClientException { - return new RowIterator(this, rangeIteratorParameter); + return new GetRangeRowIterator(this, rangeIteratorParameter); + } + + @Override + public Iterator createBulkExportIterator( + RangeIteratorParameter rangeIteratorParameter) throws TableStoreException, + ClientException { + return new BulkExportIterator(this, rangeIteratorParameter); } @Override @@ -351,6 +408,16 @@ public CreateSearchIndexResponse createSearchIndex(CreateSearchIndexRequest requ return waitForFuture(res); } + @Override + public UpdateSearchIndexResponse updateSearchIndex(UpdateSearchIndexRequest request) throws TableStoreException, ClientException { + Preconditions.checkNotNull(request); + Preconditions.checkNotNull(prepareCallback); + + prepareCallback.onPrepare(); + Future res = this.internalClient.updateSearchIndex(request, null); + return waitForFuture(res); + } + @Override public ListSearchIndexResponse listSearchIndex(ListSearchIndexRequest request) throws TableStoreException, ClientException { Preconditions.checkNotNull(request); @@ -383,6 +450,36 @@ public DescribeSearchIndexResponse describeSearchIndex(DescribeSearchIndexReques return waitForFuture(res); } + @Override + public ComputeSplitsResponse computeSplits(ComputeSplitsRequest request) throws TableStoreException, ClientException { + Preconditions.checkNotNull(request); + Preconditions.checkNotNull(prepareCallback); + + prepareCallback.onPrepare(); + Future res = this.internalClient.computeSplits(request, null); + return waitForFuture(res); + } + + @Override + public ParallelScanResponse parallelScan(ParallelScanRequest request) throws TableStoreException, ClientException { + Preconditions.checkNotNull(request); + Preconditions.checkNotNull(prepareCallback); + + prepareCallback.onPrepare(); + Future res = this.internalClient.parallelScan(request, null); + return waitForFuture(res); + } + + @Override + public RowIterator createParallelScanIterator(ParallelScanRequest request) throws TableStoreException, ClientException { + return new ParallelScanRowIterator(this, request); + } + + @Override + public RowIterator createSearchIterator(SearchRequest request) throws TableStoreException, ClientException { + return new SearchRowIterator(this, request); + } + @Override public SearchResponse search(SearchRequest request) throws TableStoreException, ClientException { Preconditions.checkNotNull(request); @@ -423,6 +520,56 @@ public AbortTransactionResponse abortTransaction(AbortTransactionRequest request return waitForFuture(res); } + @Override + public CreateDeliveryTaskResponse createDeliveryTask(CreateDeliveryTaskRequest request) + throws TableStoreException, ClientException + { + Preconditions.checkNotNull(request); + + Future res = this.internalClient.createDeliveryTask(request, null); + return waitForFuture(res); + } + + @Override + public DeleteDeliveryTaskResponse deleteDeliveryTask(DeleteDeliveryTaskRequest request) + throws TableStoreException, ClientException + { + Preconditions.checkNotNull(request); + + Future res = this.internalClient.deleteDeliveryTask(request, null); + return waitForFuture(res); + } + + @Override + public DescribeDeliveryTaskResponse describeDeliveryTask(DescribeDeliveryTaskRequest request) + throws TableStoreException, ClientException + { + Preconditions.checkNotNull(request); + + Future res = this.internalClient.describeDeliveryTask(request, null); + return waitForFuture(res); + } + + @Override + public ListDeliveryTaskResponse listDeliveryTask(ListDeliveryTaskRequest request) + throws TableStoreException, ClientException + { + Preconditions.checkNotNull(request); + + Future res = this.internalClient.listDeliveryTask(request, null); + return waitForFuture(res); + } + + @Override + public SQLQueryResponse sqlQuery(SQLQueryRequest request) throws TableStoreException, ClientException { + Preconditions.checkNotNull(request); + Preconditions.checkNotNull(prepareCallback); + + prepareCallback.onPrepare(); + Future res = this.internalClient.sqlQuery(request,null); + return waitForFuture(res); + } + private Res waitForFuture(Future f) { try { return f.get(this.internalClient.getClientConfig().getSyncClientWaitFutureTimeoutInMillis(), TimeUnit.MILLISECONDS); @@ -441,6 +588,14 @@ public AsyncClientInterface asAsyncClient() { return new AsyncClient(this.internalClient); } + public TimeseriesClient asTimeseriesClient() { + return new TimeseriesClient(this.internalClient); + } + + public AsyncTimeseriesClient asAsyncTimeseriesClient() { + return new AsyncTimeseriesClient(this.internalClient); + } + @Override public void shutdown() { this.internalClient.shutdown(); diff --git a/src/main/java/com/alicloud/openservices/tablestore/SyncClientInterface.java b/src/main/java/com/alicloud/openservices/tablestore/SyncClientInterface.java index 97e7608..49e05ae 100755 --- a/src/main/java/com/alicloud/openservices/tablestore/SyncClientInterface.java +++ b/src/main/java/com/alicloud/openservices/tablestore/SyncClientInterface.java @@ -1,391 +1,546 @@ -/** - * Copyright (C) Alibaba Cloud Computing - * All rights reserved. - * - * 版权所有 (C)阿里云计算有限公司 - */ - -package com.alicloud.openservices.tablestore; - -import java.util.Iterator; - -import com.alicloud.openservices.tablestore.core.auth.CredentialsProvider; -import com.alicloud.openservices.tablestore.model.*; -import com.alicloud.openservices.tablestore.model.search.*; - -/** - * 阿里云表格存储(TableStore, 原OTS)的访问接口。 - *

- * 阿里云表格存储(TableStore)是构建在阿里云大规模分布式计算系统之上的海量数据存储与实时查询的服务。 - *

- */ -public interface SyncClientInterface { - - /** - * 在用户的实例下创建一张新的表。 - *

表被创建后不能立即进行读写操作, 需要等待几秒钟.

- * - * @param createTableRequest 执行CreateTable所需的参数 - * @return TableStore服务返回的结果 - * @throws TableStoreException TableStore服务返回的异常 - * @throws ClientException 请求的返回结果无效、或遇到网络异常 - */ - public CreateTableResponse createTable(CreateTableRequest createTableRequest) - throws TableStoreException, ClientException; - - /** - * 在表被创建之后,动态的更改表的配置或预留吞吐量。 - *

例如用户想要调整表的TTL、MaxVersions等配置或者用户发现当前预留吞吐量过小需要上调预留吞吐量。

- *

UpdateTable操作不能用于更改表的TableMeta,可以调整的配置为:

- *
    - *
  • 预留吞吐量({@link ReservedThroughput}): - * 表的预留吞吐量可被动态更改,读或写吞吐量都可以分别单独更改。调整每个表读写吞吐量的最小时间间隔为 1 分钟, - * 如果本次 UpdateTable 操作距上次 UpdateTable 或者 CreateTable 操作不到 1 分钟的话该请求将被拒绝。 - *
  • - *
  • 表的配置({@link TableOptions}): - * 只有表的部分配置项可以允许被动态更改,例如TTL、MaxVersions等。 - *
  • - *
- * UpdateTable操作执行完毕后,会返回表的当前更改之后的预留吞吐量以及配置。 - * - * @param updateTableRequest 执行UpdateTable所需的参数 - * @return TableStore服务返回的结果 - * @throws TableStoreException TableStore服务返回的异常 - * @throws ClientException 请求的返回结果无效、或遇到网络异常 - */ - public UpdateTableResponse updateTable(UpdateTableRequest updateTableRequest) - throws TableStoreException, ClientException; - - /** - *

获取表的详细信息,表的详细信息包括:

- *
    - *
  • 表的结构({@link TableMeta})
  • - *
  • 表的预留吞吐量({@link ReservedThroughputDetails})
  • - *
  • 表的配置参数({@link TableOptions})
  • - *
- * - * @param describeTableRequest 执行DescribeTable所需的参数 - * @return TableStore服务返回的结果 - * @throws TableStoreException TableStore服务返回的异常 - * @throws ClientException 请求的返回结果无效、或遇到网络异常 - */ - public DescribeTableResponse describeTable(DescribeTableRequest describeTableRequest) - throws TableStoreException, ClientException; - - /** - * 返回用户当前实例下的所有表的列表。 - * - * @return TableStore服务返回的结果 - * @throws TableStoreException TableStore服务返回的异常 - * @throws ClientException 请求的返回结果无效、或遇到网络异常 - */ - public ListTableResponse listTable() throws TableStoreException, ClientException; - - /** - * 删除用户指定的某个实例下的一张表。。 - *

注意:表被成功删除后该表下所有的数据都将会被清空,无法恢复,请谨慎操作!

- * - * @param deleteTableRequest 执行DeleteTable所需的参数 - * @return TableStore服务返回的结果 - * @throws TableStoreException TableStore服务返回的异常 - * @throws ClientException 请求的返回结果无效、或遇到网络异常 - */ - public DeleteTableResponse deleteTable(DeleteTableRequest deleteTableRequest) - throws TableStoreException, ClientException; - - /** - * 在用户指定的某张表下创建一张索引表 - * - * @param createIndexRequest - * @return TableStore服务返回的结果 - * @throws TableStoreException TableStore服务返回的异常 - * @throws ClientException 请求返回的结果无效,或遇到网络异常 - */ - public CreateIndexResponse createIndex(CreateIndexRequest createIndexRequest) - throws TableStoreException, ClientException; - - /** - * 删除用户指定的某张表下的某张索引表 - *

注意:索引表被成功删除后该索引表下所有的数据都将被清空,无法恢复,请谨慎操作!

- * - * @param deleteIndexRequest 招待DeleteIndex所需的参数 - * @return TableStore服务返回的结果 - * @throws TableStoreException TableStore服务返回的异常 - * @throws ClientException 请求的返回结果无效、或遇到网络异常 - */ - public DeleteIndexResponse deleteIndex(DeleteIndexRequest deleteIndexRequest) - throws TableStoreException, ClientException; - - /** - * 读取表中的一行数据。 - * - * @param getRowRequest 执行GetRow操作所需的参数。 - * @return TableStore服务返回的结果 - * @throws TableStoreException TableStore服务返回的异常 - * @throws ClientException 请求的返回结果无效、或遇到网络异常 - */ - public GetRowResponse getRow(GetRowRequest getRowRequest) - throws TableStoreException, ClientException; - - /** - * 向表中插入或覆盖一行数据。 - *

若要写入的行已经存在,则旧行会被删除后写入新的一行。

- *

若要写入的行不存在,则直接写入新的一行。

- * - * @param putRowRequest 执行PutRow操作所需的参数。 - * @return TableStore服务返回的结果 - * @throws TableStoreException TableStore服务返回的异常 - * @throws ClientException 请求的返回结果无效、或遇到网络异常 - */ - public PutRowResponse putRow(PutRowRequest putRowRequest) - throws TableStoreException, ClientException; - - /** - * 更新表中的一行数据。 - *

若要更新的行不存在,则新写入一行数据。

- *

更新操作可以包括新写入一个属性列或者删除一个属性列的一个或多个版本。

- * - * @param updateRowRequest 执行UpdateRow操作所需的参数。 - * @return TableStore服务返回的结果 - * @throws TableStoreException TableStore服务返回的异常 - * @throws ClientException 请求的返回结果无效、或遇到网络异常 - */ - public UpdateRowResponse updateRow(UpdateRowRequest updateRowRequest) - throws TableStoreException, ClientException; - - /** - * 删除表中的一行数据。 - *

若该行存在,则删除该行。

- *

若该行不存在,则该操作不产生任何影响。

- * - * @param deleteRowRequest 执行DeleteRow操作所需的参数。 - * @return TableStore服务返回的结果 - * @throws TableStoreException TableStore服务返回的异常 - * @throws ClientException 请求的返回结果无效、或遇到网络异常 - */ - public DeleteRowResponse deleteRow(DeleteRowRequest deleteRowRequest) - throws TableStoreException, ClientException; - - /** - * 从多张表中读取多行数据。 - *

BatchGetRow 操作可视为多个 GetRow 操作的集合,各个操作独立执行,独立返回结果,独立计算服务能力单元。

- *

与执行大量的 GetRow 操作相比,使用 BatchGetRow 操作可以有效减少请求的响应时间,提高数据的读取速率。

- *

但需要注意的是 BatchGetRow 只支持在表级别设置查询条件。操作完成后,需要逐个检查子请求的状态,并选择对失败的行进行重试。

- * - * @param batchGetRowRequest 执行BatchGetRow操作所需的参数。 - * @return TableStore服务返回的结果 - * @throws TableStoreException TableStore服务返回的异常 - * @throws ClientException 请求的返回结果无效、或遇到网络异常 - */ - public BatchGetRowResponse batchGetRow(BatchGetRowRequest batchGetRowRequest) - throws TableStoreException, ClientException; - - /** - * 对多张表中对多行执行更新或者删除操作。 - *

BatchWriteRow 操作可视为多个PutRow、UpdateRow、DeleteRow 操作的集合,各个操作独立执行,独立返回结果,独立计算服务能力单元。

- *

执行 BatchWriteRow 操作后,需要逐个检查子请求的状态,来判断写入结果,并选择对失败的行进行重试。

- * - * @param batchWriteRowRequest 执行BatchWriteRow操作所需的参数。 - * @return TableStore服务返回的结果 - * @throws TableStoreException TableStore服务返回的异常 - * @throws ClientException 请求的返回结果无效、或遇到网络异常 - */ - public BatchWriteRowResponse batchWriteRow(BatchWriteRowRequest batchWriteRowRequest) - throws TableStoreException, ClientException; - - /** - * 从表中查询一个范围内的多行数据。 - * - * @param getRangeRequest 执行GetRange操作所需的参数。 - * @return TableStore服务返回的结果 - * @throws TableStoreException TableStore服务返回的异常 - * @throws ClientException 请求的返回结果无效、或遇到网络异常 - */ - public GetRangeResponse getRange(GetRangeRequest getRangeRequest) - throws TableStoreException, ClientException; - - /** - * 对表的数据根据一定的数据大小进行分块,并返回分块的信息以供数据获取接口使用。返回的数据分块按照主键列的递增顺序排列,返回的每个数据分块信息中包含分块所处的partition分区的ID的哈希值以及起始行和终止行的主键值,遵循左闭右开区间。 - * - * @param computeSplitsBySizeRequest 执行ComputeSplitsBySize操作所需的参数。 - * @return TableStore服务返回的结果 - * @throws TableStoreException TableStore服务返回的异常 - * @throws ClientException 请求的返回结果无效、或遇到网络异常 - */ - public ComputeSplitsBySizeResponse computeSplitsBySize(ComputeSplitsBySizeRequest computeSplitsBySizeRequest) - throws TableStoreException, ClientException; - - /** - * 以迭代器的形式封装{@link #getRange(GetRangeRequest)}接口。 - * - * @param rangeIteratorParameter 执行createRangeIterator操作所需的参数。 - * @return 行的迭代器 - * @throws TableStoreException TableStore服务返回的异常 - * @throws ClientException 请求的返回结果无效、或遇到网络异常 - */ - public Iterator createRangeIterator( - RangeIteratorParameter rangeIteratorParameter) throws TableStoreException, - ClientException; - - public WideColumnIterator createWideColumnIterator(GetRowRequest getRowRequest) throws TableStoreException, - ClientException; - - /** - * 获取用户当前实例下的全部Stream列表或者特定表下的Stream。 - * - * @param listStreamRequest 执行ListStream操作所需的参数。 - * @return TableStore服务返回的结果 - * @throws TableStoreException TableStore服务返回的异常 - * @throws ClientException 请求的返回结果无效、或遇到网络异常 - */ - public ListStreamResponse listStream(ListStreamRequest listStreamRequest) - throws TableStoreException, ClientException; - - /** - * 获取指定Stream的详细信息。通过此方法获取Shard列表。 - * - * @param describeStreamRequest 执行DescribeStream操作所需的参数。 - * @return TableStore服务返回的结果 - * @throws TableStoreException TableStore服务返回的异常 - * @throws ClientException 请求的返回结果无效、或遇到网络异常 - */ - public DescribeStreamResponse describeStream(DescribeStreamRequest describeStreamRequest) - throws TableStoreException, ClientException; - - /** - * 获取ShardIterator,可通过ShardIterator读取Shard中的数据。 - * - * @param getShardIteratorRequest 执行GetShardIterator操作所需的参数。 - * @return TableStore服务返回的结果 - * @throws TableStoreException TableStore服务返回的异常 - * @throws ClientException 请求的返回结果无效、或遇到网络异常 - */ - public GetShardIteratorResponse getShardIterator(GetShardIteratorRequest getShardIteratorRequest) - throws TableStoreException, ClientException; - - /** - * 通过ShardIterator读取Shard中的数据。 - * - * @param getStreamRecordRequest 执行GetStreamRecord操作所需的参数。 - * @return TableStore服务返回的结果 - * @throws TableStoreException TableStore服务返回的异常 - * @throws ClientException 请求的返回结果无效、或遇到网络异常 - */ - public GetStreamRecordResponse getStreamRecord(GetStreamRecordRequest getStreamRecordRequest) - throws TableStoreException, ClientException; - - /** - * 创建SearchIndex - * @param request 创建SearchIndex所需的参数,详见{@link CreateSearchIndexRequest} - * @return SearchIndex服务返回的创建结果 - * @throws TableStoreException TableStore服务返回的异常 - * @throws ClientException 请求的返回结果无效、或遇到网络异常 - */ - public CreateSearchIndexResponse createSearchIndex(CreateSearchIndexRequest request) - throws TableStoreException, ClientException; - - /** - * 获取表下的SearchIndex列表 - *

一个table下面,可以存在多个SearchIndex表,通过该函数,将能够获取一个table下面的所有SearchIndex信息

- * @param request 获取SearchIndex列表所需的参数 - * @return TableStore指定表下的SearchIndex列表 - * @throws TableStoreException TableStore服务返回的异常 - * @throws ClientException 请求的返回结果无效、或遇到网络异常 - */ - public ListSearchIndexResponse listSearchIndex(ListSearchIndexRequest request) - throws TableStoreException, ClientException; - - /** - * 删除SearchIndex - *

通过指定 tableName 和 indexName 即可删除一个index

- *

提示:在没有删除一个table下面所有的index之前,是不允许删除table的

- * @param request 删除SearchIndex所需的参数 - * @return 删除SearchIndex服务执行后返回的删除结果 - * @throws TableStoreException TableStore服务返回的异常 - * @throws ClientException 请求的返回结果无效、或遇到网络异常 - */ - public DeleteSearchIndexResponse deleteSearchIndex(DeleteSearchIndexRequest request) - throws TableStoreException, ClientException; - - /** - * 获取一个SearchIndex的信息 - * @param request 获取SearchIndex所需的参数(tableName 和 indexName) - * @return 返回指定index的 schema 和目前的同步状态信息 - * @throws TableStoreException TableStore服务返回的异常 - * @throws ClientException 请求的返回结果无效、或遇到网络异常 - */ - public DescribeSearchIndexResponse describeSearchIndex(DescribeSearchIndexRequest request) - throws TableStoreException, ClientException; - - /** - * 搜索功能 - *

构建自己的SearchRequest,然后获取SearchResponse

- *

示例:

- *

- * - * SearchQuery searchQuery = new SearchQuery(); - * TermQuery termQuery = new TermQuery(); - * termQuery.setFieldName("user_name"); - * termQuery.setTerm("jay"); - * searchQuery.setQuery(termQuery); - * SearchRequest searchRequest = new SearchRequest(tableName, indexName, searchQuery); - * SearchResponse resp = ots.search(searchRequest); - * - *

- * @param request 进行搜索所需的参数,详见{@link SearchRequest} - * @return 搜索结果,详见{@link SearchResponse} - * @throws TableStoreException TableStore服务返回的异常 - * @throws ClientException 请求的返回结果无效、或遇到网络异常 - */ - public SearchResponse search(SearchRequest request) - throws TableStoreException, ClientException; - - /** - * 开启一个本地事务 - * @param request 启动本地事务操作所需的参数 - * @return - * @throws TableStoreException TableStore服务返回的异常 - * @throws ClientException 请求的返回结果无效、或遇到网络异常 - */ - public StartLocalTransactionResponse startLocalTransaction(StartLocalTransactionRequest request) - throws TableStoreException, ClientException; - - /** - * 提交一个事务 - * @param request 提交事务操作所需的参数 - * @return - * @throws TableStoreException TableStore服务返回的异常 - * @throws ClientException 请求的返回结果无效、或遇到网络异常 - */ - public CommitTransactionResponse commitTransaction(CommitTransactionRequest request) - throws TableStoreException, ClientException; - - /** - * 取消一个事务 - * @param request 取消事务操作所需的参数 - * @return - * @throws TableStoreException TableStore服务返回的异常 - * @throws ClientException 请求的返回结果无效、或遇到网络异常 - */ - public AbortTransactionResponse abortTransaction(AbortTransactionRequest request) - throws TableStoreException, ClientException; - - /** - * 转换成异步接口的Client。 - * @return 异步接口Client。 - */ - public AsyncClientInterface asAsyncClient(); - - /** - * 释放资源。 - *

请确保在所有请求执行完毕之后释放资源。释放资源之后将不能再发送请求,正在执行的请求可能无法返回结果。

- */ - public void shutdown(); - - /** - * Switch CredentialsProvider。 - * - * @param newCrdsProvider new CredentialsProvider, see {@link com.alicloud.openservices.tablestore.core.auth.CredentialsProviderFactory}. - */ - public void switchCredentialsProvider(CredentialsProvider newCrdsProvider); -} +/** + * Copyright (C) Alibaba Cloud Computing + * All rights reserved. + * + * 版权所有 (C)阿里云计算有限公司 + */ + +package com.alicloud.openservices.tablestore; + +import java.util.Iterator; + +import com.alicloud.openservices.tablestore.core.auth.CredentialsProvider; +import com.alicloud.openservices.tablestore.model.*; +import com.alicloud.openservices.tablestore.model.delivery.*; +import com.alicloud.openservices.tablestore.model.iterator.RowIterator; +import com.alicloud.openservices.tablestore.model.search.*; +import com.alicloud.openservices.tablestore.model.sql.SQLQueryRequest; +import com.alicloud.openservices.tablestore.model.sql.SQLQueryResponse; + +/** + * 阿里云表格存储(TableStore, 原OTS)的访问接口。 + *

+ * 阿里云表格存储(TableStore)是构建在阿里云大规模分布式计算系统之上的海量数据存储与实时查询的服务。 + *

+ */ +public interface SyncClientInterface { + + /** + * 在用户的实例下创建一张新的表。 + *

表被创建后不能立即进行读写操作, 需要等待几秒钟.

+ * + * @param createTableRequest 执行CreateTable所需的参数 + * @return TableStore服务返回的结果 + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public CreateTableResponse createTable(CreateTableRequest createTableRequest) + throws TableStoreException, ClientException; + + /** + * 在表被创建之后,动态的更改表的配置或预留吞吐量。 + *

例如用户想要调整表的TTL、MaxVersions等配置或者用户发现当前预留吞吐量过小需要上调预留吞吐量。

+ *

UpdateTable操作不能用于更改表的TableMeta,可以调整的配置为:

+ *
    + *
  • 预留吞吐量({@link ReservedThroughput}): + * 表的预留吞吐量可被动态更改,读或写吞吐量都可以分别单独更改。调整每个表读写吞吐量的最小时间间隔为 1 分钟, + * 如果本次 UpdateTable 操作距上次 UpdateTable 或者 CreateTable 操作不到 1 分钟的话该请求将被拒绝。 + *
  • + *
  • 表的配置({@link TableOptions}): + * 只有表的部分配置项可以允许被动态更改,例如TTL、MaxVersions等。 + *
  • + *
+ * UpdateTable操作执行完毕后,会返回表的当前更改之后的预留吞吐量以及配置。 + * + * @param updateTableRequest 执行UpdateTable所需的参数 + * @return TableStore服务返回的结果 + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public UpdateTableResponse updateTable(UpdateTableRequest updateTableRequest) + throws TableStoreException, ClientException; + + /** + *

获取表的详细信息,表的详细信息包括:

+ *
    + *
  • 表的结构({@link TableMeta})
  • + *
  • 表的预留吞吐量({@link ReservedThroughputDetails})
  • + *
  • 表的配置参数({@link TableOptions})
  • + *
+ * + * @param describeTableRequest 执行DescribeTable所需的参数 + * @return TableStore服务返回的结果 + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public DescribeTableResponse describeTable(DescribeTableRequest describeTableRequest) + throws TableStoreException, ClientException; + + /** + * 返回用户当前实例下的所有表的列表。 + * + * @return TableStore服务返回的结果 + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public ListTableResponse listTable() throws TableStoreException, ClientException; + + /** + * 删除用户指定的某个实例下的一张表。。 + *

注意:表被成功删除后该表下所有的数据都将会被清空,无法恢复,请谨慎操作!

+ * + * @param deleteTableRequest 执行DeleteTable所需的参数 + * @return TableStore服务返回的结果 + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public DeleteTableResponse deleteTable(DeleteTableRequest deleteTableRequest) + throws TableStoreException, ClientException; + + /** + * 在用户指定的某张表下创建一张索引表 + * + * @param createIndexRequest + * @return TableStore服务返回的结果 + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求返回的结果无效,或遇到网络异常 + */ + public CreateIndexResponse createIndex(CreateIndexRequest createIndexRequest) + throws TableStoreException, ClientException; + + /** + * 删除用户指定的某张表下的某张索引表 + *

注意:索引表被成功删除后该索引表下所有的数据都将被清空,无法恢复,请谨慎操作!

+ * + * @param deleteIndexRequest 执行DeleteIndex所需的参数 + * @return TableStore服务返回的结果 + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public DeleteIndexResponse deleteIndex(DeleteIndexRequest deleteIndexRequest) + throws TableStoreException, ClientException; + + /** + * 为一张表添加预定义列^M + * @param addDefinedColumnRequest 执行AddDefinedColumn所需的参数^M + * @return TableStore服务返回的结果^M + * @throws TableStoreException TableStore服务返回的异常^M + * @throws ClientException 请求的返回结果无效、或遇到网络异常^M + */ + public AddDefinedColumnResponse addDefinedColumn(AddDefinedColumnRequest addDefinedColumnRequest) + throws TableStoreException, ClientException; + + /** + * 为一张表删除预定义列 + * @param deleteDefinedColumnRequest 执行DeleteDefinedColumn所需的参数 + * @return TableStore服务返回的结果 + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public DeleteDefinedColumnResponse deleteDefinedColumn(DeleteDefinedColumnRequest deleteDefinedColumnRequest) + throws TableStoreException, ClientException; + + /** + * 读取表中的一行数据。 + * + * @param getRowRequest 执行GetRow操作所需的参数。 + * @return TableStore服务返回的结果 + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public GetRowResponse getRow(GetRowRequest getRowRequest) + throws TableStoreException, ClientException; + + /** + * 向表中插入或覆盖一行数据。 + *

若要写入的行已经存在,则旧行会被删除后写入新的一行。

+ *

若要写入的行不存在,则直接写入新的一行。

+ * + * @param putRowRequest 执行PutRow操作所需的参数。 + * @return TableStore服务返回的结果 + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public PutRowResponse putRow(PutRowRequest putRowRequest) + throws TableStoreException, ClientException; + + /** + * 更新表中的一行数据。 + *

若要更新的行不存在,则新写入一行数据。

+ *

更新操作可以包括新写入一个属性列或者删除一个属性列的一个或多个版本。

+ * + * @param updateRowRequest 执行UpdateRow操作所需的参数。 + * @return TableStore服务返回的结果 + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public UpdateRowResponse updateRow(UpdateRowRequest updateRowRequest) + throws TableStoreException, ClientException; + + /** + * 删除表中的一行数据。 + *

若该行存在,则删除该行。

+ *

若该行不存在,则该操作不产生任何影响。

+ * + * @param deleteRowRequest 执行DeleteRow操作所需的参数。 + * @return TableStore服务返回的结果 + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public DeleteRowResponse deleteRow(DeleteRowRequest deleteRowRequest) + throws TableStoreException, ClientException; + + /** + * 从多张表中读取多行数据。 + *

BatchGetRow 操作可视为多个 GetRow 操作的集合,各个操作独立执行,独立返回结果,独立计算服务能力单元。

+ *

与执行大量的 GetRow 操作相比,使用 BatchGetRow 操作可以有效减少请求的响应时间,提高数据的读取速率。

+ *

但需要注意的是 BatchGetRow 只支持在表级别设置查询条件。操作完成后,需要逐个检查子请求的状态,并选择对失败的行进行重试。

+ * + * @param batchGetRowRequest 执行BatchGetRow操作所需的参数。 + * @return TableStore服务返回的结果 + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public BatchGetRowResponse batchGetRow(BatchGetRowRequest batchGetRowRequest) + throws TableStoreException, ClientException; + + /** + * 对多张表中对多行执行更新或者删除操作。 + *

BatchWriteRow 操作可视为多个PutRow、UpdateRow、DeleteRow 操作的集合,各个操作独立执行,独立返回结果,独立计算服务能力单元。

+ *

执行 BatchWriteRow 操作后,需要逐个检查子请求的状态,来判断写入结果,并选择对失败的行进行重试。

+ * + * @param batchWriteRowRequest 执行BatchWriteRow操作所需的参数。 + * @return TableStore服务返回的结果 + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public BatchWriteRowResponse batchWriteRow(BatchWriteRowRequest batchWriteRowRequest) + throws TableStoreException, ClientException; + + /** + * 单张表中对多行执行更新或者删除操作,离线服务接口。 + *

BulkImport 操作可视为多个PutRow、UpdateRow、DeleteRow 操作的集合,各个操作独立执行,独立返回结果,独立计算消费单元。

+ *

执行 BulkImport 操作后,需要逐个检查子请求的状态,来判断写入结果,并选择对失败的行进行重试。

+ * + * @param bulkImportRequest 执行BatchWriteRow操作所需的参数。 + * @return TableStore服务返回的结果 + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public BulkImportResponse bulkImport(BulkImportRequest bulkImportRequest) + throws TableStoreException, ClientException; + + /** + * 从表中查询一个范围内的多行数据。 + * + * @param getRangeRequest 执行GetRange操作所需的参数。 + * @return TableStore服务返回的结果 + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public GetRangeResponse getRange(GetRangeRequest getRangeRequest) + throws TableStoreException, ClientException; + + /** + * 从表中查询一个范围内的多行数据,离线服务接口。 + * + * @param bulkExportRequest 执行GetRange操作所需的参数。 + * @return TableStore服务返回的结果 + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public BulkExportResponse bulkExport(BulkExportRequest bulkExportRequest) + throws TableStoreException, ClientException; + + /** + * 对表的数据根据一定的数据大小进行分块,并返回分块的信息以供数据获取接口使用。返回的数据分块按照主键列的递增顺序排列,返回的每个数据分块信息中包含分块所处的partition分区的ID的哈希值以及起始行和终止行的主键值,遵循左闭右开区间。 + * + * @param computeSplitsBySizeRequest 执行ComputeSplitsBySize操作所需的参数。 + * @return TableStore服务返回的结果 + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public ComputeSplitsBySizeResponse computeSplitsBySize(ComputeSplitsBySizeRequest computeSplitsBySizeRequest) + throws TableStoreException, ClientException; + + /** + * 以迭代器的形式封装{@link #getRange(GetRangeRequest)}接口。 + * + * @param rangeIteratorParameter 执行createRangeIterator操作所需的参数。 + * @return 行的迭代器 + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public Iterator createRangeIterator( + RangeIteratorParameter rangeIteratorParameter) throws TableStoreException, + ClientException; + + public Iterator createBulkExportIterator( + RangeIteratorParameter rangeIteratorParameter) throws TableStoreException, + ClientException; + + public WideColumnIterator createWideColumnIterator(GetRowRequest getRowRequest) throws TableStoreException, + ClientException; + + /** + * 获取用户当前实例下的全部Stream列表或者特定表下的Stream。 + * + * @param listStreamRequest 执行ListStream操作所需的参数。 + * @return TableStore服务返回的结果 + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public ListStreamResponse listStream(ListStreamRequest listStreamRequest) + throws TableStoreException, ClientException; + + /** + * 获取指定Stream的详细信息。通过此方法获取Shard列表。 + * + * @param describeStreamRequest 执行DescribeStream操作所需的参数。 + * @return TableStore服务返回的结果 + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public DescribeStreamResponse describeStream(DescribeStreamRequest describeStreamRequest) + throws TableStoreException, ClientException; + + /** + * 获取ShardIterator,可通过ShardIterator读取Shard中的数据。 + * + * @param getShardIteratorRequest 执行GetShardIterator操作所需的参数。 + * @return TableStore服务返回的结果 + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public GetShardIteratorResponse getShardIterator(GetShardIteratorRequest getShardIteratorRequest) + throws TableStoreException, ClientException; + + /** + * 通过ShardIterator读取Shard中的数据。 + * + * @param getStreamRecordRequest 执行GetStreamRecord操作所需的参数。 + * @return TableStore服务返回的结果 + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public GetStreamRecordResponse getStreamRecord(GetStreamRecordRequest getStreamRecordRequest) + throws TableStoreException, ClientException; + + /** + * 创建SearchIndex + * @param request 创建SearchIndex所需的参数,详见{@link CreateSearchIndexRequest} + * @return SearchIndex服务返回的创建结果 + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public CreateSearchIndexResponse createSearchIndex(CreateSearchIndexRequest request) + throws TableStoreException, ClientException; + + /** + * 更新SearchIndex(用户索引交换,或设置索引查询权重) + * @param request 更新SearchIndex所需的参数,详见{@link UpdateSearchIndexRequest} + * @return SearchIndex服务返回的创建结果 + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public UpdateSearchIndexResponse updateSearchIndex(UpdateSearchIndexRequest request) + throws TableStoreException, ClientException; + + /** + * 获取表下的SearchIndex列表 + *

一个table下面,可以存在多个SearchIndex表,通过该函数,将能够获取一个table下面的所有SearchIndex信息

+ * @param request 获取SearchIndex列表所需的参数 + * @return TableStore指定表下的SearchIndex列表 + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public ListSearchIndexResponse listSearchIndex(ListSearchIndexRequest request) + throws TableStoreException, ClientException; + + /** + * 删除SearchIndex + *

通过指定 tableName 和 indexName 即可删除一个index

+ *

提示:在没有删除一个table下面所有的index之前,是不允许删除table的

+ * @param request 删除SearchIndex所需的参数 + * @return 删除SearchIndex服务执行后返回的删除结果 + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public DeleteSearchIndexResponse deleteSearchIndex(DeleteSearchIndexRequest request) + throws TableStoreException, ClientException; + + /** + * 获取一个SearchIndex的信息 + * @param request 获取SearchIndex所需的参数(tableName 和 indexName) + * @return 返回指定index的 schema 和目前的同步状态信息 + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public DescribeSearchIndexResponse describeSearchIndex(DescribeSearchIndexRequest request) + throws TableStoreException, ClientException; + + /** + * Get the partition information of the data. + * + * @param request Parameters required to perform the computeSplits operation. + * @return Results returned by the Tablestore service + * @throws TableStoreException Exception returned by Tablestore service. + * @throws ClientException The return result of the request is invalid or a network exception was encountered. + */ + public ComputeSplitsResponse computeSplits(ComputeSplitsRequest request) + throws TableStoreException, ClientException; + + /** + * Scan data form SearchIndex. + * + * @param request Parameters required to perform the parallelScan operation. + * @return Results returned by the Tablestore service + * @throws TableStoreException Exception returned by Tablestore service. + * @throws ClientException The return result of the request is invalid or a network exception was encountered. + */ + public ParallelScanResponse parallelScan(ParallelScanRequest request) + throws TableStoreException, ClientException; + + /** + * Get the Iterator for ParallelScan. + * @param request Parameters required to perform ParallelScan operation. + * @return Iterator for ParallelScan. + * @throws TableStoreException Exception returned by Tablestore service. + * @throws ClientException The return result of the request is invalid or a network exception was encountered. + * + */ + public RowIterator createParallelScanIterator(ParallelScanRequest request) throws TableStoreException, ClientException; + + + /** + * Get the Iterator for Search. + *

Note: If your searchIndex has a nested field and you want to search data, please specify the Sort.

+ * @param request Parameters required to perform searchRequest operation. + * @return Iterator for SearchQuery. + * @throws TableStoreException Exception returned by Tablestore service. + * @throws ClientException The return result of the request is invalid or a network exception was encountered. + * + */ + public RowIterator createSearchIterator(SearchRequest request) throws TableStoreException, ClientException; + + /** + * 搜索功能 + *

构建自己的SearchRequest,然后获取SearchResponse

+ *

示例:

+ *

+ * + * SearchQuery searchQuery = new SearchQuery(); + * TermQuery termQuery = new TermQuery(); + * termQuery.setFieldName("user_name"); + * termQuery.setTerm("jay"); + * searchQuery.setQuery(termQuery); + * SearchRequest searchRequest = new SearchRequest(tableName, indexName, searchQuery); + * SearchResponse resp = ots.search(searchRequest); + * + *

+ * @param request 进行搜索所需的参数,详见{@link SearchRequest} + * @return 搜索结果,详见{@link SearchResponse} + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public SearchResponse search(SearchRequest request) + throws TableStoreException, ClientException; + + /** + * 开启一个本地事务 + * @param request 启动本地事务操作所需的参数 + * @return + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public StartLocalTransactionResponse startLocalTransaction(StartLocalTransactionRequest request) + throws TableStoreException, ClientException; + + /** + * 提交一个事务 + * @param request 提交事务操作所需的参数 + * @return + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public CommitTransactionResponse commitTransaction(CommitTransactionRequest request) + throws TableStoreException, ClientException; + + /** + * 取消一个事务 + * @param request 取消事务操作所需的参数 + * @return + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public AbortTransactionResponse abortTransaction(AbortTransactionRequest request) + throws TableStoreException, ClientException; + + /** + * 转换成异步接口的Client。 + * @return 异步接口Client。 + */ + public AsyncClientInterface asAsyncClient(); + + /** + * 释放资源。 + *

请确保在所有请求执行完毕之后释放资源。释放资源之后将不能再发送请求,正在执行的请求可能无法返回结果。

+ */ + public void shutdown(); + + /** + * Switch CredentialsProvider。 + * + * @param newCrdsProvider new CredentialsProvider, see {@link com.alicloud.openservices.tablestore.core.auth.CredentialsProviderFactory}. + */ + public void switchCredentialsProvider(CredentialsProvider newCrdsProvider); + + /** + * 创建数据投递任务 + * @param request 创建投递任务所需的参数 + * @return + * @throws TableStoreException TableStore服务返回的异常 + * @throws ClientException 请求的返回结果无效、或遇到网络异常 + */ + public CreateDeliveryTaskResponse createDeliveryTask(CreateDeliveryTaskRequest request) + throws TableStoreException, ClientException; + + /** + * 删除投递任务 + * @param request 删除投递任务所需的参数 + * @return + * @throws TableStoreException Tablestore服务返回的异常 + * @throws ClientException 请求的结果无效、或遇到网络异常 + */ + public DeleteDeliveryTaskResponse deleteDeliveryTask(DeleteDeliveryTaskRequest request) + throws TableStoreException, ClientException; + + /** + * 投递任务描述函数 + * @param request 描述投递任务所需的参数 + * @return + * @throws TableStoreException Tablestore服务返回的异常 + * @throws ClientException 请求的结果无效、或遇到网络异常 + */ + public DescribeDeliveryTaskResponse describeDeliveryTask(DescribeDeliveryTaskRequest request) + throws TableStoreException, ClientException; + + /** + * 列出用户表下所有投递任务列表 + * @param request 获取投递任务列表所需参数 + * @return + * @throws TableStoreException Tablestore服务返回的异常 + * @throws ClientException 请求的结果无效、或遇到网络异常 + */ + public ListDeliveryTaskResponse listDeliveryTask(ListDeliveryTaskRequest request) + throws TableStoreException, ClientException; + + /** + * SQL query 请求 + * @param request sql query的参数 + * @return + * @throws TableStoreException Tablestore服务返回的异常 + * @throws ClientException 请求的结果无效、或遇到网络异常 + */ + public SQLQueryResponse sqlQuery(SQLQueryRequest request) throws TableStoreException, ClientException; +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/TableStoreWriter.java b/src/main/java/com/alicloud/openservices/tablestore/TableStoreWriter.java index 62fac37..7b6f59c 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/TableStoreWriter.java +++ b/src/main/java/com/alicloud/openservices/tablestore/TableStoreWriter.java @@ -4,9 +4,11 @@ import com.alicloud.openservices.tablestore.model.RowChange; import com.alicloud.openservices.tablestore.writer.RowWriteResult; import com.alicloud.openservices.tablestore.writer.WriterConfig; +import com.alicloud.openservices.tablestore.writer.WriterResult; import com.alicloud.openservices.tablestore.writer.WriterStatistics; import java.util.List; +import java.util.concurrent.Future; /** * TableStore提供了BatchWriteRow接口让用户能够向TableStore批量导入数据,但是在实际使用过程中,BatchWriteRow接口的使用方式对开发者并不友好。例如用户 @@ -60,6 +62,15 @@ public interface TableStoreWriter { */ void addRowChange(RowChange rowChange) throws ClientException; + /** + * 接口功能同 {@link com.alicloud.openservices.tablestore.TableStoreWriter#addRowChange}一致, + * 但会返回写入结果的Future,返回该行的写入成功、失败状态 + * + * @param rowChange 要写入的行 + * @throws com.alicloud.openservices.tablestore.ClientException 若该行被判定为脏数据 + */ + Future addRowChangeWithFuture(RowChange rowChange) throws ClientException; + /** * Same with {@link #addRowChange(RowChange)}, but it won't be blocked if the buffer is full. * @@ -81,6 +92,17 @@ public interface TableStoreWriter { */ void addRowChange(List rowChanges, List dirtyRows) throws ClientException; + + /** + * 向本地缓冲区批量写入行。 + * + * 批量写入的每一行会做与{@link #addRowChange(RowChange)}一样的检查;脏数据会直接更新到WriterResponse中统计 + + * @param rowChanges 批量写入的行 + * @throws ClientException 若存在脏数据 + */ + Future addRowChangeWithFuture(List rowChanges) throws ClientException; + /** * @see #setResultCallback(TableStoreCallback) * @@ -127,6 +149,7 @@ public interface TableStoreWriter { */ WriterStatistics getWriterStatistics(); + /** * 主动flush缓冲区中的数据,该函数会等待缓冲区中的所有数据被flush完毕。 * diff --git a/src/main/java/com/alicloud/openservices/tablestore/TimeseriesClient.java b/src/main/java/com/alicloud/openservices/tablestore/TimeseriesClient.java new file mode 100644 index 0000000..2abf79d --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/TimeseriesClient.java @@ -0,0 +1,222 @@ +package com.alicloud.openservices.tablestore; + +import com.alicloud.openservices.tablestore.core.ResourceManager; +import com.alicloud.openservices.tablestore.core.auth.CredentialsProvider; +import com.alicloud.openservices.tablestore.core.auth.DefaultCredentialProvider; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.alicloud.openservices.tablestore.model.timeseries.*; +import com.google.common.cache.Cache; +import com.google.common.cache.CacheBuilder; +import com.google.common.cache.Weigher; + +import java.util.Map; +import java.util.concurrent.*; + +public class TimeseriesClient implements TimeseriesClientInterface { + + private InternalClient internalClient; + private Cache timeseriesMetaCache; + + /** + * 使用指定的TableStore Endpoint和默认配置构造一个新的{@link TimeseriesClient}实例。 + * @param endpoint TableStore服务的Endpoint。 + * @param accessKeyId 访问TableStore服务的Access ID。 + * @param accessKeySecret 访问TableStore服务的Access Key。 + * @param instanceName 访问TableStore的服务的实例名称。 + */ + public TimeseriesClient(String endpoint, String accessKeyId, String accessKeySecret, String instanceName) { + this(endpoint, accessKeyId, accessKeySecret, instanceName, new ClientConfiguration()); + } + + /** + * 使用指定的TableStore Endpoint和配置构造一个新的{@link TimeseriesClient}实例。 + * + * @param endpoint TableStore服务的endpoint。 + * @param accessKeyId 访问TableStore服务的Access ID。 + * @param accessKeySecret 访问TableStore服务的Access Key。 + * @param instanceName 访问TableStore服务的实例名称。 + * @param conf 客户端配置信息({@link ClientConfiguration})。 如果传入null则使用默认配置。 + */ + public TimeseriesClient(String endpoint, String accessKeyId, String accessKeySecret, String instanceName, ClientConfiguration conf) { + this(endpoint, accessKeyId, accessKeySecret, instanceName, conf, null); + } + + /** + * 使用指定的TableStore Endpoint和默认配置构造一个新的{@link TimeseriesClient}实例。 + * + * @param endpoint TableStore服务的endpoint。 + * @param accessKeyId 访问TableStore服务的Access ID。 + * @param accessKeySecret 访问TableStore服务的Access Key。 + * @param instanceName 访问TableStore服务的实例名称。 + * @param stsToken Sts Token. + */ + public TimeseriesClient(String endpoint, String accessKeyId, String accessKeySecret, String instanceName, String stsToken) { + this(endpoint, accessKeyId, accessKeySecret, instanceName, new ClientConfiguration(), stsToken); + } + + /** + * 使用指定的TableStore Endpoint和默认配置构造一个新的{@link TimeseriesClient}实例。 + * + * @param endpoint TableStore服务的endpoint。 + * @param accessKeyId 访问TableStore服务的Access ID。 + * @param accessKeySecret 访问TableStore服务的Access Key。 + * @param instanceName 访问TableStore服务的实例名称。 + * @param config 客户端配置信息({@link ClientConfiguration})。 如果传入null则使用默认配置。 + * @param stsToken Sts Token. + */ + public TimeseriesClient(String endpoint, String accessKeyId, String accessKeySecret, String instanceName, + ClientConfiguration config, String stsToken) { + this(endpoint, accessKeyId, accessKeySecret, instanceName, config, stsToken, null); + } + + /** + * 使用指定的TableStore Endpoint和默认配置构造一个新的{@link TimeseriesClient}实例。 + * + * @param endpoint TableStore服务的endpoint。 + * @param accessKeyId 访问TableStore服务的Access ID。 + * @param accessKeySecret 访问TableStore服务的Access Key。 + * @param instanceName 访问TableStore服务的实例名称。 + * @param config 客户端配置信息({@link ClientConfiguration})。 如果传入null则使用默认配置。 + * @param stsToken Sts Token. + * @param callbackExecutor 执行callback的线程池,需要注意的是,client在shutdown的时候也会shutdown这个线程池。 + */ + public TimeseriesClient(String endpoint, String accessKeyId, String accessKeySecret, String instanceName, + ClientConfiguration config, String stsToken, ExecutorService callbackExecutor) { + this(endpoint, new DefaultCredentialProvider(accessKeyId, accessKeySecret, stsToken), instanceName, config, + new ResourceManager(config, callbackExecutor)); + } + + /** + * 使用指定的TableStore Endpoint和默认配置构造一个新的{@link TimeseriesClient}实例。 + */ + public TimeseriesClient(String endpoint, CredentialsProvider credsProvider, String instanceName, + ClientConfiguration config, ResourceManager resourceManager) { + this(new InternalClient(endpoint, credsProvider, instanceName, config, resourceManager)); + } + + TimeseriesClient(InternalClient internalClient) { + Preconditions.checkNotNull(internalClient); + this.internalClient = internalClient; + if (this.internalClient.getTimeseriesMetaCache() != null) { + this.timeseriesMetaCache = this.internalClient.getTimeseriesMetaCache(); + return; + } + ClientConfiguration config = this.internalClient.getClientConfig(); + if (config.getTimeseriesConfiguration() == null) { + config.setTimeseriesConfiguration(new TimeseriesConfiguration()); + } + this.timeseriesMetaCache = CacheBuilder.newBuilder() + .maximumWeight(config.getTimeseriesConfiguration().getMetaCacheMaxDataSize()) + .expireAfterAccess(config.getConnectionTimeoutInMillisecond(), TimeUnit.SECONDS) + .weigher(new Weigher() { + @Override + public int weigh(String key, Long value) { + return key.length() + 48 + 16; // add some overhead + } + }).build(); + this.internalClient.setTimeseriesMetaCache(timeseriesMetaCache); + } + + public void setExtraHeaders(Map extraHeaders) { + this.internalClient.setExtraHeaders(extraHeaders); + } + + @Override + public CreateTimeseriesTableResponse createTimeseriesTable(CreateTimeseriesTableRequest request) + { + Future resp = internalClient.createTimeseriesTable(request, null); + return waitForFuture(resp); + } + + @Override + public ListTimeseriesTableResponse listTimeseriesTable() + { + Future resp = internalClient.listTimeseriesTable(null); + return waitForFuture(resp); + } + + @Override + public DeleteTimeseriesTableResponse deleteTimeseriesTable(DeleteTimeseriesTableRequest request) + { + Future resp = internalClient.deleteTimeseriesTable(request, null); + return waitForFuture(resp); + } + + @Override + public DescribeTimeseriesTableResponse describeTimeseriesTable(DescribeTimeseriesTableRequest request) + { + Future resp = internalClient.describeTimeseriesTable(request, null); + return waitForFuture(resp); + } + + @Override + public UpdateTimeseriesTableResponse updateTimeseriesTable(UpdateTimeseriesTableRequest request) + { + Future resp = internalClient.updateTimeseriesTable(request, null); + return waitForFuture(resp); + } + + @Override + public PutTimeseriesDataResponse putTimeseriesData(PutTimeseriesDataRequest request) + throws TableStoreException, ClientException { + Future resp = internalClient.putTimeseriesData(request, null); + return waitForFuture(resp); + } + + @Override + public GetTimeseriesDataResponse getTimeseriesData(GetTimeseriesDataRequest request) + throws TableStoreException, ClientException { + Future resp = internalClient.getTimeseriesData(request, null); + return waitForFuture(resp); + } + + @Override + public QueryTimeseriesMetaResponse queryTimeseriesMeta(QueryTimeseriesMetaRequest request) + throws TableStoreException, ClientException { + Future resp = internalClient.queryTimeseriesMeta(request, null); + return waitForFuture(resp); + } + + @Override + public UpdateTimeseriesMetaResponse updateTimeseriesMeta(UpdateTimeseriesMetaRequest request) + throws TableStoreException, ClientException { + Future resp = internalClient.updateTimeseriesMeta(request, null); + return waitForFuture(resp); + } + + @Override + public DeleteTimeseriesMetaResponse deleteTimeseriesMeta(DeleteTimeseriesMetaRequest request) + throws TableStoreException, ClientException { + Future resp = internalClient.deleteTimeseriesMeta(request, null); + return waitForFuture(resp); + } + + private Res waitForFuture(Future f) { + try { + return f.get(this.internalClient.getClientConfig().getSyncClientWaitFutureTimeoutInMillis(), TimeUnit.MILLISECONDS); + } catch (InterruptedException e) { + throw new ClientException(String.format( + "The thread was interrupted: %s", e.getMessage())); + } catch (ExecutionException e) { + throw new ClientException("The thread was aborted", e); + } catch (TimeoutException e) { + throw new ClientException("Wait future timeout", e); + } + } + + public void shutdown() { + this.internalClient.shutdown(); + } + + public SyncClient asSyncClient() { + return new SyncClient(this.internalClient); + } + + public AsyncClient asAsyncClient() { + return new AsyncClient(this.internalClient); + } + + public AsyncTimeseriesClient asAsyncTimeseriesClient() { + return new AsyncTimeseriesClient(this.internalClient); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/TimeseriesClientInterface.java b/src/main/java/com/alicloud/openservices/tablestore/TimeseriesClientInterface.java new file mode 100644 index 0000000..e23b880 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/TimeseriesClientInterface.java @@ -0,0 +1,31 @@ +package com.alicloud.openservices.tablestore; + +import com.alicloud.openservices.tablestore.model.timeseries.*; + +public interface TimeseriesClientInterface { + + CreateTimeseriesTableResponse createTimeseriesTable(CreateTimeseriesTableRequest request); + + ListTimeseriesTableResponse listTimeseriesTable(); + + DeleteTimeseriesTableResponse deleteTimeseriesTable(DeleteTimeseriesTableRequest request); + + DescribeTimeseriesTableResponse describeTimeseriesTable(DescribeTimeseriesTableRequest request); + + UpdateTimeseriesTableResponse updateTimeseriesTable(UpdateTimeseriesTableRequest request); + + PutTimeseriesDataResponse putTimeseriesData(PutTimeseriesDataRequest request) + throws TableStoreException, ClientException; + + GetTimeseriesDataResponse getTimeseriesData(GetTimeseriesDataRequest request) + throws TableStoreException, ClientException; + + QueryTimeseriesMetaResponse queryTimeseriesMeta(QueryTimeseriesMetaRequest request) + throws TableStoreException, ClientException; + + UpdateTimeseriesMetaResponse updateTimeseriesMeta(UpdateTimeseriesMetaRequest request) + throws TableStoreException, ClientException; + + DeleteTimeseriesMetaResponse deleteTimeseriesMeta(DeleteTimeseriesMetaRequest request) + throws TableStoreException, ClientException; +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/TimeseriesConfiguration.java b/src/main/java/com/alicloud/openservices/tablestore/TimeseriesConfiguration.java new file mode 100644 index 0000000..ba76946 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/TimeseriesConfiguration.java @@ -0,0 +1,25 @@ +package com.alicloud.openservices.tablestore; + +public class TimeseriesConfiguration { + + private long metaCacheMaxDataSize = 64 * 1024 * 1024; + private int metaCacheExpireTimeAfterAccessInSec = 3600; + + public TimeseriesConfiguration() {} + + public long getMetaCacheMaxDataSize() { + return metaCacheMaxDataSize; + } + + public void setMetaCacheMaxDataSize(long metaCacheMaxDataSize) { + this.metaCacheMaxDataSize = metaCacheMaxDataSize; + } + + public int getMetaCacheExpireTimeAfterAccessInSec() { + return metaCacheExpireTimeAfterAccessInSec; + } + + public void setMetaCacheExpireTimeAfterAccessInSec(int metaCacheExpireTimeAfterAccessInSec) { + this.metaCacheExpireTimeAfterAccessInSec = metaCacheExpireTimeAfterAccessInSec; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/TunnelClient.java b/src/main/java/com/alicloud/openservices/tablestore/TunnelClient.java index 937c39d..f267fe1 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/TunnelClient.java +++ b/src/main/java/com/alicloud/openservices/tablestore/TunnelClient.java @@ -1,9 +1,7 @@ package com.alicloud.openservices.tablestore; import java.util.Map; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Future; +import java.util.concurrent.*; import com.alicloud.openservices.tablestore.core.utils.Preconditions; import com.alicloud.openservices.tablestore.model.tunnel.CreateTunnelRequest; @@ -223,12 +221,14 @@ public CheckpointResponse checkpoint(CheckpointRequest request) private Res waitForFuture(Future f) { try { - return f.get(); + return f.get(this.internalClient.getClientConfig().getSyncClientWaitFutureTimeoutInMillis(), TimeUnit.MILLISECONDS); } catch (InterruptedException e) { throw new ClientException(String.format( "The thread was interrupted: %s", e.getMessage())); } catch (ExecutionException e) { throw new ClientException("The thread was aborted", e); + } catch (TimeoutException e) { + throw new ClientException("Wait future timeout", e); } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/AddDefinedColumnLauncher.java b/src/main/java/com/alicloud/openservices/tablestore/core/AddDefinedColumnLauncher.java new file mode 100644 index 0000000..f556ff9 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/AddDefinedColumnLauncher.java @@ -0,0 +1,63 @@ +package com.alicloud.openservices.tablestore.core; + +import com.alicloud.openservices.tablestore.core.auth.CredentialsProvider; +import com.alicloud.openservices.tablestore.core.http.AddDefinedColumnResponseConsumer; +import org.apache.http.concurrent.FutureCallback; + +import com.alicloud.openservices.tablestore.ClientConfiguration; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.alicloud.openservices.tablestore.core.utils.LogUtil; +import com.alicloud.openservices.tablestore.core.auth.ServiceCredentials; +import com.alicloud.openservices.tablestore.core.http.OTSUri; +import com.alicloud.openservices.tablestore.core.http.AsyncServiceClient; +import com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi; +import com.alicloud.openservices.tablestore.core.protocol.OTSProtocolBuilder; +import com.alicloud.openservices.tablestore.core.protocol.ResultParserFactory; +import com.alicloud.openservices.tablestore.model.RetryStrategy; +import com.alicloud.openservices.tablestore.model.AddDefinedColumnRequest; +import com.alicloud.openservices.tablestore.model.AddDefinedColumnResponse; + +public class AddDefinedColumnLauncher + extends OperationLauncher { + private OTSUri uri; + private TraceLogger tracer; + private RetryStrategy retry; + + public AddDefinedColumnLauncher( + OTSUri uri, + TraceLogger tracer, + RetryStrategy retry, + String instanceName, + AsyncServiceClient client, + CredentialsProvider crdsProvider, + ClientConfiguration config, + AddDefinedColumnRequest originRequest) + { + super(instanceName, client, crdsProvider, config, originRequest); + + Preconditions.checkNotNull(uri); + Preconditions.checkNotNull(tracer); + Preconditions.checkNotNull(retry); + + this.uri = uri; + this.tracer = tracer; + this.retry = retry; + } + @Override + public void fire(AddDefinedColumnRequest req, FutureCallback cb) { + LogUtil.logBeforeExecution(tracer, retry); + + OtsInternalApi.AddDefinedColumnResponse defaultResponse = + OtsInternalApi.AddDefinedColumnResponse.getDefaultInstance(); + asyncInvokePost( + uri, + null, + OTSProtocolBuilder.buildAddDefinedColumnRequest(req), + tracer, + new AddDefinedColumnResponseConsumer( + ResultParserFactory.createFactory().createProtocolBufferResultParser( + defaultResponse, tracer.getTraceId()), + tracer, retry, lastResult), + cb); + } +} \ No newline at end of file diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/AsyncCompletion.java b/src/main/java/com/alicloud/openservices/tablestore/core/AsyncCompletion.java index c05f3d0..bca9423 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/core/AsyncCompletion.java +++ b/src/main/java/com/alicloud/openservices/tablestore/core/AsyncCompletion.java @@ -49,54 +49,63 @@ public AsyncCompletion( @Override public void completed(Res result) { - result.setTraceId(tracer.getTraceId()); - LogUtil.logOnCompleted(tracer, retry, result.getRequestId()); - tracer.printLog(); - onCompleted(request, result); + try { + result.setTraceId(tracer.getTraceId()); + LogUtil.logOnCompleted(tracer, retry, result.getRequestId()); + tracer.printLog(); + onCompleted(request, result); + } catch (Exception ex) { + LogUtil.LOG.error("unknown error in completed, future or user callback may not be notified", ex); + } } @Override public void failed(Exception ex) { - final Exception e; - String requestId = null; - if (ex instanceof TableStoreException) { - e = ex; - requestId = ((TableStoreException) ex).getRequestId(); - ((TableStoreException) e).setTraceId(tracer.getTraceId()); - } else if (ex instanceof ClientException) { - e = ex; - ((ClientException) e).setTraceId(tracer.getTraceId()); - } else { - e = new ClientException("Unexpected error: " + ex, ex, tracer.getTraceId()); - } - long nextPause = retry.nextPause(request.getOperationName(), e); - LogUtil.logOnFailed(tracer, retry, e, requestId, nextPause > 0); - if (nextPause <= 0) { - tracer.printLog(); - if (e instanceof PartialResultFailedException) { - onCompleted(this.request, (Res)((PartialResultFailedException)e).getResult()); + try { + final Exception e; + String requestId = null; + if (ex instanceof TableStoreException) { + e = ex; + requestId = ((TableStoreException) ex).getRequestId(); + ((TableStoreException) e).setTraceId(tracer.getTraceId()); + } else if (ex instanceof ClientException) { + e = ex; + ((ClientException) e).setTraceId(tracer.getTraceId()); } else { - onFailed(request, e); + e = new ClientException("Unexpected error: " + ex, ex, tracer.getTraceId()); } - } else { - final AsyncCompletion self = this; - retryExecutor.schedule( - new Runnable() { - @Override - public void run() { - try { - Req requestForRetry = (Req)launcher.getRequestForRetry(e); - launcher.fire(requestForRetry, self); - } catch(Exception ex) { - failed(new ClientException("Fail to retry.", ex)); + long nextPause = retry.nextPause(request.getOperationName(), e); + LogUtil.logOnFailed(tracer, retry, e, requestId, nextPause > 0); + if (nextPause <= 0) { + tracer.printLog(); + if (e instanceof PartialResultFailedException) { + onCompleted(this.request, (Res) ((PartialResultFailedException) e).getResult()); + } else { + onFailed(request, e); + } + } else { + final AsyncCompletion self = this; + retryExecutor.schedule( + new Runnable() { + @Override + public void run() { + try { + Req requestForRetry = (Req) launcher.getRequestForRetry(e); + launcher.fire(requestForRetry, self); + } catch (Exception ex) { + failed(new ClientException("Fail to retry.", ex)); + } } - } - }, - nextPause, TimeUnit.MILLISECONDS); + }, + nextPause, TimeUnit.MILLISECONDS); + } + } catch (Exception exception) { + LogUtil.LOG.error("unknown error in failed, future or user callback may not be notified", exception); } } @Override public void cancelled() { + failed(new ClientException("request cancelled")); } @Override public void onCompleted(final Req req, final Res res) { diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/BulkExportLauncher.java b/src/main/java/com/alicloud/openservices/tablestore/core/BulkExportLauncher.java new file mode 100644 index 0000000..1be3d60 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/BulkExportLauncher.java @@ -0,0 +1,63 @@ +package com.alicloud.openservices.tablestore.core; + +import com.alicloud.openservices.tablestore.core.auth.CredentialsProvider; +import com.alicloud.openservices.tablestore.core.http.BulkExportResponseConsumer; +import org.apache.http.concurrent.FutureCallback; + +import com.alicloud.openservices.tablestore.ClientConfiguration; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.alicloud.openservices.tablestore.core.utils.LogUtil; +import com.alicloud.openservices.tablestore.core.auth.ServiceCredentials; +import com.alicloud.openservices.tablestore.core.http.OTSUri; +import com.alicloud.openservices.tablestore.core.http.AsyncServiceClient; +import com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi; +import com.alicloud.openservices.tablestore.core.protocol.OTSProtocolBuilder; +import com.alicloud.openservices.tablestore.core.protocol.ResultParserFactory; +import com.alicloud.openservices.tablestore.model.RetryStrategy; +import com.alicloud.openservices.tablestore.model.BulkExportRequest; +import com.alicloud.openservices.tablestore.model.BulkExportResponse; + +public class BulkExportLauncher extends OperationLauncher { + private OTSUri uri; + private TraceLogger tracer; + private RetryStrategy retry; + + public BulkExportLauncher( + OTSUri uri, + TraceLogger tracer, + RetryStrategy retry, + String instanceName, + AsyncServiceClient client, + CredentialsProvider crdsProvider, + ClientConfiguration config, + BulkExportRequest originRequest) + { + super(instanceName, client, crdsProvider, config, originRequest); + + Preconditions.checkNotNull(uri); + Preconditions.checkNotNull(tracer); + Preconditions.checkNotNull(retry); + + this.uri = uri; + this.tracer = tracer; + this.retry = retry; + } + + @Override + public void fire(BulkExportRequest req, FutureCallback cb) { + LogUtil.logBeforeExecution(tracer, retry); + + OtsInternalApi.BulkExportResponse defaultResponse = + OtsInternalApi.BulkExportResponse.getDefaultInstance(); + asyncInvokePost( + uri, + null, + OTSProtocolBuilder.buildBulkExportRequest(req), + tracer, + new BulkExportResponseConsumer( + ResultParserFactory.createFactory().createProtocolBufferResultParser( + defaultResponse, tracer.getTraceId()), + tracer, retry, lastResult), + cb); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/BulkImportLauncher.java b/src/main/java/com/alicloud/openservices/tablestore/core/BulkImportLauncher.java new file mode 100644 index 0000000..efa5728 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/BulkImportLauncher.java @@ -0,0 +1,74 @@ +package com.alicloud.openservices.tablestore.core; + +import com.alicloud.openservices.tablestore.core.auth.CredentialsProvider; +import com.alicloud.openservices.tablestore.core.http.BulkImportResponseConsumer; +import com.alicloud.openservices.tablestore.model.*; +import org.apache.http.concurrent.FutureCallback; + +import com.alicloud.openservices.tablestore.ClientConfiguration; +import com.alicloud.openservices.tablestore.PartialResultFailedException; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.alicloud.openservices.tablestore.core.utils.LogUtil; +import com.alicloud.openservices.tablestore.core.auth.ServiceCredentials; +import com.alicloud.openservices.tablestore.core.http.OTSUri; +import com.alicloud.openservices.tablestore.core.http.AsyncServiceClient; +import com.alicloud.openservices.tablestore.core.http.BatchWriteRowResponseConsumer; +import com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi; +import com.alicloud.openservices.tablestore.core.protocol.OTSProtocolBuilder; +import com.alicloud.openservices.tablestore.core.protocol.ResultParserFactory; + +public class BulkImportLauncher extends OperationLauncher { + private OTSUri uri; + private TraceLogger tracer; + private RetryStrategy retry; + + public BulkImportLauncher( + OTSUri uri, + TraceLogger tracer, + RetryStrategy retry, + String instanceName, + AsyncServiceClient client, + CredentialsProvider crdsProvider, + ClientConfiguration config, + BulkImportRequest originRequest) + { + super(instanceName, client, crdsProvider, config, originRequest); + + Preconditions.checkNotNull(uri); + Preconditions.checkNotNull(tracer); + Preconditions.checkNotNull(retry); + + this.uri = uri; + this.tracer = tracer; + this.retry = retry; + } + + @Override + public BulkImportRequest getRequestForRetry(Exception e) { + BulkImportRequest request = this.originRequest; + if (e instanceof PartialResultFailedException) { + lastResult = (BulkImportResponse) ((PartialResultFailedException) e).getResult(); //??? + request = this.originRequest.createRequestForRetry( + lastResult.getFailedRows()); + } + return request; + } + + @Override + public void fire(BulkImportRequest req, FutureCallback cb) { + LogUtil.logBeforeExecution(tracer, retry); + + OtsInternalApi.BulkImportResponse defaultResponse = + OtsInternalApi.BulkImportResponse.getDefaultInstance(); + asyncInvokePost( + uri, + null, + OTSProtocolBuilder.buildBulkImportRequest(req), + tracer, + new BulkImportResponseConsumer( + ResultParserFactory.createFactory().createProtocolBufferResultParser( + defaultResponse, tracer.getTraceId()), + tracer, retry, lastResult), + cb); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/ClientResources.java b/src/main/java/com/alicloud/openservices/tablestore/core/ClientResources.java new file mode 100644 index 0000000..2b65393 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/ClientResources.java @@ -0,0 +1,62 @@ +package com.alicloud.openservices.tablestore.core; + +import com.alicloud.openservices.tablestore.ClientConfiguration; +import com.alicloud.openservices.tablestore.core.http.AsyncServiceClient; + +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.ThreadFactory; +import java.util.concurrent.atomic.AtomicInteger; + +public class ClientResources { + private static int AVAILABLE_PROCESSORS = Runtime.getRuntime().availableProcessors(); + + private AsyncServiceClient httpClient; + private ScheduledExecutorService retryExecutor; + private ExecutorService callbackExecutor; + + public ClientResources(ClientConfiguration config, ExecutorService callbackExecutor) { + this.httpClient = new AsyncServiceClient(config); + + this.retryExecutor = Executors.newScheduledThreadPool(config.getRetryThreadCount(), + new ThreadFactory() { + private final AtomicInteger counter = new AtomicInteger(1); + @Override + public Thread newThread(Runnable r) { + return new Thread(r, "tablestore-retry-scheduled-" + counter.getAndIncrement()); + } + }); + + if (callbackExecutor != null) { + this.callbackExecutor = callbackExecutor; + } else { + this.callbackExecutor = Executors.newFixedThreadPool(AVAILABLE_PROCESSORS, + new ThreadFactory() { + private final AtomicInteger counter = new AtomicInteger(1); + @Override + public Thread newThread(Runnable r) { + return new Thread(r, "tablestore-callback-" + counter.getAndIncrement()); + } + }); + } + } + + public AsyncServiceClient getHttpClient() { + return this.httpClient; + } + + public ScheduledExecutorService getRetryExecutor() { + return this.retryExecutor; + } + + public ExecutorService getCallbackExecutor() { + return this.callbackExecutor; + } + + void shutdown() { + this.retryExecutor.shutdownNow(); + this.callbackExecutor.shutdownNow(); + this.httpClient.shutdown(); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/ComputeSplitsLauncher.java b/src/main/java/com/alicloud/openservices/tablestore/core/ComputeSplitsLauncher.java new file mode 100644 index 0000000..2ab6023 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/ComputeSplitsLauncher.java @@ -0,0 +1,60 @@ +package com.alicloud.openservices.tablestore.core; + +import com.alicloud.openservices.tablestore.ClientConfiguration; +import com.alicloud.openservices.tablestore.core.auth.CredentialsProvider; +import com.alicloud.openservices.tablestore.core.http.AsyncServiceClient; +import com.alicloud.openservices.tablestore.core.http.ComputeSplitsResponseConsumer; +import com.alicloud.openservices.tablestore.core.http.OTSUri; +import com.alicloud.openservices.tablestore.core.protocol.OTSProtocolBuilder; +import com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi; +import com.alicloud.openservices.tablestore.core.protocol.ResultParserFactory; +import com.alicloud.openservices.tablestore.core.utils.LogUtil; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.alicloud.openservices.tablestore.model.ComputeSplitsRequest; +import com.alicloud.openservices.tablestore.model.ComputeSplitsResponse; +import com.alicloud.openservices.tablestore.model.RetryStrategy; +import org.apache.http.concurrent.FutureCallback; + +public class ComputeSplitsLauncher extends OperationLauncher { + private OTSUri uri; + private TraceLogger tracer; + private RetryStrategy retry; + + public ComputeSplitsLauncher( + OTSUri uri, + TraceLogger tracer, + RetryStrategy retry, + String instanceName, + AsyncServiceClient client, + CredentialsProvider crdsProvider, + ClientConfiguration config, + ComputeSplitsRequest originRequest) + { + super(instanceName, client, crdsProvider, config, originRequest); + + Preconditions.checkNotNull(uri); + Preconditions.checkNotNull(tracer); + Preconditions.checkNotNull(retry); + + this.uri = uri; + this.tracer = tracer; + this.retry = retry; + } + + @Override + public void fire(ComputeSplitsRequest req, FutureCallback cb) { + LogUtil.logBeforeExecution(tracer, retry); + + OtsInternalApi.ComputeSplitsResponse defaultResponse = OtsInternalApi.ComputeSplitsResponse.getDefaultInstance(); + asyncInvokePost( + uri, + null, + OTSProtocolBuilder.buildComputeSplitsRequest(req), + tracer, + new ComputeSplitsResponseConsumer( + ResultParserFactory.createFactory().createProtocolBufferResultParser(defaultResponse, tracer.getTraceId()), + tracer, retry, lastResult), + cb); + } +} + diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/Constants.java b/src/main/java/com/alicloud/openservices/tablestore/core/Constants.java index 3c5ef3e..def8498 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/core/Constants.java +++ b/src/main/java/com/alicloud/openservices/tablestore/core/Constants.java @@ -3,8 +3,9 @@ import java.nio.charset.Charset; public class Constants { + // ALL HTTP HEADERS SHOULD BE DEFINED IN LOWERCASE // request headers - public static final String USER_AGENT = "ots-java-sdk 4.1.0"; + public static final String USER_AGENT = "ots-java-sdk 5.8.7"; public static final String OTS_HEADER_API_VERSION = "x-ots-apiversion"; public static final String OTS_HEADER_ACCESS_KEY_ID = "x-ots-accesskeyid"; public static final String OTS_HEADER_OTS_CONTENT_MD5 = "x-ots-contentmd5"; @@ -18,20 +19,20 @@ public class Constants { // response headers public static final String OTS_HEADER_PREFIX = "x-ots-"; public static final String OTS_HEADER_OTS_CONTENT_TYPE = "x-ots-contenttype"; - public static final String OTS_HEADER_AUTHORIZATION = "Authorization"; + public static final String OTS_HEADER_AUTHORIZATION = "authorization"; public static final String OTS_HEADER_REQUEST_ID = "x-ots-requestid"; - public static final String OTS_MOVED_PERMANENTLY_LOCATION = "Location"; + public static final String OTS_MOVED_PERMANENTLY_LOCATION = "location"; public static final String OTS_HEADER_TRACE_INFO = "x-ots-traceinfo"; - + // request/response compress headers public final static String OTS_HEADER_REQUEST_COMPRESS_TYPE = "x-ots-request-compress-type"; public final static String OTS_HEADER_REQUEST_COMPRESS_SIZE = "x-ots-request-compress-size"; public final static String OTS_HEADER_RESPONSE_COMPRESS_TYPE = "x-ots-response-compress-type"; public final static String OTS_HEADER_RESPONSE_COMPRESS_SIZE = "x-ots-response-compress-size"; - + // compression type public final static String OTS_COMPRESS_TYPE = "deflate"; - + // http status code public final static int OTS_HTTP_MOVED_PERMANENTLY = 301; public final static int OTS_HTTP_ENTITY_TOO_LARGE = 413; @@ -47,4 +48,8 @@ public class Constants { public static final String UTF8_ENCODING = "utf-8"; public static final String HTTP_HEADER_ENCODING = "iso-8859-1"; public static final Charset UTF8_CHARSET = Charset.forName("UTF-8"); + + public static final String ENDPOINT_REGEX = "^(?i)http(s)?(?-i)://[a-zA-Z0-9._-]+(:\\d{1,5})?(/)?$"; + public static final String SSRF_CHECK_REGEX = "^[a-zA-Z0-9_-]+$"; + public static final String ACCESSKEYID_REGEX = "^[a-zA-Z0-9+\\./_-]+$"; } diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/CreateDeliveryTaskLauncher.java b/src/main/java/com/alicloud/openservices/tablestore/core/CreateDeliveryTaskLauncher.java new file mode 100644 index 0000000..e2c5d04 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/CreateDeliveryTaskLauncher.java @@ -0,0 +1,63 @@ +package com.alicloud.openservices.tablestore.core; + +import com.alicloud.openservices.tablestore.core.auth.CredentialsProvider; +import com.alicloud.openservices.tablestore.core.http.CreateDeliveryTaskResponseConsumer; +import com.alicloud.openservices.tablestore.core.protocol.OtsDelivery; +import com.alicloud.openservices.tablestore.model.delivery.CreateDeliveryTaskRequest; +import org.apache.http.concurrent.FutureCallback; + +import com.alicloud.openservices.tablestore.ClientConfiguration; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.alicloud.openservices.tablestore.core.utils.LogUtil; +import com.alicloud.openservices.tablestore.core.http.OTSUri; +import com.alicloud.openservices.tablestore.core.http.AsyncServiceClient; +import com.alicloud.openservices.tablestore.core.protocol.OTSProtocolBuilder; +import com.alicloud.openservices.tablestore.core.protocol.ResultParserFactory; +import com.alicloud.openservices.tablestore.model.RetryStrategy; +import com.alicloud.openservices.tablestore.model.delivery.CreateDeliveryTaskResponse; + +public class CreateDeliveryTaskLauncher + extends OperationLauncher { + private OTSUri uri; + private TraceLogger tracer; + private RetryStrategy retry; + + public CreateDeliveryTaskLauncher( + OTSUri uri, + TraceLogger tracer, + RetryStrategy retry, + String instanceName, + AsyncServiceClient client, + CredentialsProvider crdsProvider, + ClientConfiguration config, + CreateDeliveryTaskRequest originRequest) + { + super(instanceName, client, crdsProvider, config, originRequest); + + Preconditions.checkNotNull(uri); + Preconditions.checkNotNull(tracer); + Preconditions.checkNotNull(retry); + + this.uri = uri; + this.tracer = tracer; + this.retry = retry; + } + + @Override + public void fire(CreateDeliveryTaskRequest req, FutureCallback cb) { + LogUtil.logBeforeExecution(tracer, retry); + + OtsDelivery.CreateDeliveryTaskResponse defaultResponse = + OtsDelivery.CreateDeliveryTaskResponse.getDefaultInstance(); + asyncInvokePost( + uri, + null, + OTSProtocolBuilder.buildCreateDeliveryTaskRequest(req), + tracer, + new CreateDeliveryTaskResponseConsumer( + ResultParserFactory.createFactory().createProtocolBufferResultParser( + defaultResponse, tracer.getTraceId()), + tracer, retry, lastResult), + cb); + } +} \ No newline at end of file diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/CreateTableExLauncher.java b/src/main/java/com/alicloud/openservices/tablestore/core/CreateTableExLauncher.java new file mode 100644 index 0000000..4864bc3 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/CreateTableExLauncher.java @@ -0,0 +1,64 @@ +package com.alicloud.openservices.tablestore.core; + +import com.alicloud.openservices.tablestore.ClientConfiguration; +import com.alicloud.openservices.tablestore.core.auth.CredentialsProvider; +import com.alicloud.openservices.tablestore.core.http.AsyncServiceClient; +import com.alicloud.openservices.tablestore.core.http.CreateTableResponseConsumer; +import com.alicloud.openservices.tablestore.core.http.OTSUri; +import com.alicloud.openservices.tablestore.core.protocol.OTSProtocolBuilder; +import com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi; +import com.alicloud.openservices.tablestore.core.protocol.ResultParserFactory; +import com.alicloud.openservices.tablestore.core.utils.LogUtil; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.alicloud.openservices.tablestore.model.CreateTableRequest; +import com.alicloud.openservices.tablestore.model.CreateTableRequestEx; +import com.alicloud.openservices.tablestore.model.CreateTableResponse; +import com.alicloud.openservices.tablestore.model.RetryStrategy; +import org.apache.http.concurrent.FutureCallback; + +public class CreateTableExLauncher + extends OperationLauncher { + private OTSUri uri; + private TraceLogger tracer; + private RetryStrategy retry; + + public CreateTableExLauncher( + OTSUri uri, + TraceLogger tracer, + RetryStrategy retry, + String instanceName, + AsyncServiceClient client, + CredentialsProvider crdsProvider, + ClientConfiguration config, + CreateTableRequestEx originRequest) + { + super(instanceName, client, crdsProvider, config, originRequest); + + Preconditions.checkNotNull(uri); + Preconditions.checkNotNull(tracer); + Preconditions.checkNotNull(retry); + + this.uri = uri; + this.tracer = tracer; + this.retry = retry; + } + + @Override + public void fire(CreateTableRequestEx req, FutureCallback cb) { + LogUtil.logBeforeExecution(tracer, retry); + + OtsInternalApi.CreateTableResponse defaultResponse = + OtsInternalApi.CreateTableResponse.getDefaultInstance(); + asyncInvokePost( + uri, + null, + OTSProtocolBuilder.buildCreateTableExRequest(req), + tracer, + new CreateTableResponseConsumer( + ResultParserFactory.createFactory().createProtocolBufferResultParser( + defaultResponse, tracer.getTraceId()), + tracer, retry, lastResult), + cb); + } +} + diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/CreateTimeseriesTableLauncher.java b/src/main/java/com/alicloud/openservices/tablestore/core/CreateTimeseriesTableLauncher.java new file mode 100644 index 0000000..a4d33e7 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/CreateTimeseriesTableLauncher.java @@ -0,0 +1,60 @@ +package com.alicloud.openservices.tablestore.core; + +import com.alicloud.openservices.tablestore.ClientConfiguration; +import com.alicloud.openservices.tablestore.core.auth.CredentialsProvider; +import com.alicloud.openservices.tablestore.core.http.AsyncServiceClient; +import com.alicloud.openservices.tablestore.core.http.CreateTimeseriesTableResponseConsumer; +import com.alicloud.openservices.tablestore.core.http.OTSUri; +import com.alicloud.openservices.tablestore.core.protocol.ResultParserFactory; +import com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries; +import com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesProtocolBuilder; +import com.alicloud.openservices.tablestore.core.utils.LogUtil; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.alicloud.openservices.tablestore.model.RetryStrategy; +import com.alicloud.openservices.tablestore.model.timeseries.CreateTimeseriesTableRequest; +import com.alicloud.openservices.tablestore.model.timeseries.CreateTimeseriesTableResponse; +import org.apache.http.concurrent.FutureCallback; + +public class CreateTimeseriesTableLauncher extends OperationLauncher { + + private OTSUri uri; + private TraceLogger tracer; + private RetryStrategy retry; + + public CreateTimeseriesTableLauncher( + OTSUri uri, + TraceLogger tracer, + RetryStrategy retry, + String instanceName, + AsyncServiceClient client, + CredentialsProvider crdsProvider, + ClientConfiguration config, + CreateTimeseriesTableRequest originRequest) { + super(instanceName, client, crdsProvider, config, originRequest); + Preconditions.checkNotNull(uri); + Preconditions.checkNotNull(tracer); + Preconditions.checkNotNull(retry); + + this.uri = uri; + this.tracer = tracer; + this.retry = retry; + } + + @Override + public void fire(CreateTimeseriesTableRequest request, FutureCallback cb) { + LogUtil.logBeforeExecution(tracer, retry); + + Timeseries.CreateTimeseriesTableResponse defaultResponse = + Timeseries.CreateTimeseriesTableResponse.getDefaultInstance(); + asyncInvokePost( + uri, + null, + TimeseriesProtocolBuilder.buildCreateTimeseriesTableRequest(request), + tracer, + new CreateTimeseriesTableResponseConsumer( + ResultParserFactory.createFactory().createProtocolBufferResultParser( + defaultResponse, tracer.getTraceId()), + tracer, retry, lastResult), + cb); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/DeleteDefinedColumnLauncher.java b/src/main/java/com/alicloud/openservices/tablestore/core/DeleteDefinedColumnLauncher.java new file mode 100644 index 0000000..4f01ba9 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/DeleteDefinedColumnLauncher.java @@ -0,0 +1,63 @@ +package com.alicloud.openservices.tablestore.core; + +import com.alicloud.openservices.tablestore.core.auth.CredentialsProvider; +import com.alicloud.openservices.tablestore.core.http.DeleteDefinedColumnResponseConsumer; +import org.apache.http.concurrent.FutureCallback; + +import com.alicloud.openservices.tablestore.ClientConfiguration; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.alicloud.openservices.tablestore.core.utils.LogUtil; +import com.alicloud.openservices.tablestore.core.auth.ServiceCredentials; +import com.alicloud.openservices.tablestore.core.http.OTSUri; +import com.alicloud.openservices.tablestore.core.http.AsyncServiceClient; +import com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi; +import com.alicloud.openservices.tablestore.core.protocol.OTSProtocolBuilder; +import com.alicloud.openservices.tablestore.core.protocol.ResultParserFactory; +import com.alicloud.openservices.tablestore.model.RetryStrategy; +import com.alicloud.openservices.tablestore.model.DeleteDefinedColumnRequest; +import com.alicloud.openservices.tablestore.model.DeleteDefinedColumnResponse; + +public class DeleteDefinedColumnLauncher + extends OperationLauncher { + private OTSUri uri; + private TraceLogger tracer; + private RetryStrategy retry; + + public DeleteDefinedColumnLauncher( + OTSUri uri, + TraceLogger tracer, + RetryStrategy retry, + String instanceName, + AsyncServiceClient client, + CredentialsProvider crdsProvider, + ClientConfiguration config, + DeleteDefinedColumnRequest originRequest) + { + super(instanceName, client, crdsProvider, config, originRequest); + + Preconditions.checkNotNull(uri); + Preconditions.checkNotNull(tracer); + Preconditions.checkNotNull(retry); + + this.uri = uri; + this.tracer = tracer; + this.retry = retry; + } + @Override + public void fire(DeleteDefinedColumnRequest req, FutureCallback cb) { + LogUtil.logBeforeExecution(tracer, retry); + + OtsInternalApi.DeleteDefinedColumnResponse defaultResponse = + OtsInternalApi.DeleteDefinedColumnResponse.getDefaultInstance(); + asyncInvokePost( + uri, + null, + OTSProtocolBuilder.buildDeleteDefinedColumnRequest(req), + tracer, + new DeleteDefinedColumnResponseConsumer( + ResultParserFactory.createFactory().createProtocolBufferResultParser( + defaultResponse, tracer.getTraceId()), + tracer, retry, lastResult), + cb); + } +} \ No newline at end of file diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/DeleteDeliveryTaskLauncher.java b/src/main/java/com/alicloud/openservices/tablestore/core/DeleteDeliveryTaskLauncher.java new file mode 100644 index 0000000..e481122 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/DeleteDeliveryTaskLauncher.java @@ -0,0 +1,62 @@ +package com.alicloud.openservices.tablestore.core; + +import com.alicloud.openservices.tablestore.ClientConfiguration; +import com.alicloud.openservices.tablestore.core.auth.CredentialsProvider; +import com.alicloud.openservices.tablestore.core.http.AsyncServiceClient; +import com.alicloud.openservices.tablestore.core.http.DeleteDeliveryTaskResponseConsumer; +import com.alicloud.openservices.tablestore.core.http.OTSUri; +import com.alicloud.openservices.tablestore.core.protocol.OTSProtocolBuilder; +import com.alicloud.openservices.tablestore.core.protocol.OtsDelivery; +import com.alicloud.openservices.tablestore.core.protocol.ResultParserFactory; +import com.alicloud.openservices.tablestore.core.utils.LogUtil; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.alicloud.openservices.tablestore.model.delivery.DeleteDeliveryTaskRequest; +import com.alicloud.openservices.tablestore.model.delivery.DeleteDeliveryTaskResponse; +import com.alicloud.openservices.tablestore.model.RetryStrategy; +import org.apache.http.concurrent.FutureCallback; + +public class DeleteDeliveryTaskLauncher + extends OperationLauncher { + private OTSUri uri; + private TraceLogger tracer; + private RetryStrategy retry; + + public DeleteDeliveryTaskLauncher( + OTSUri uri, + TraceLogger tracer, + RetryStrategy retry, + String instanceName, + AsyncServiceClient client, + CredentialsProvider crdsProvider, + ClientConfiguration config, + DeleteDeliveryTaskRequest originRequest) + { + super(instanceName, client, crdsProvider, config, originRequest); + + Preconditions.checkNotNull(uri); + Preconditions.checkNotNull(tracer); + Preconditions.checkNotNull(retry); + + this.uri = uri; + this.tracer = tracer; + this.retry = retry; + } + + @Override + public void fire(DeleteDeliveryTaskRequest req, FutureCallback cb) { + LogUtil.logBeforeExecution(tracer, retry); + + OtsDelivery.DeleteDeliveryTaskResponse defaultResponse = + OtsDelivery.DeleteDeliveryTaskResponse.getDefaultInstance(); + asyncInvokePost( + uri, + null, + OTSProtocolBuilder.buildDeleteDeliveryTaskRequest(req), + tracer, + new DeleteDeliveryTaskResponseConsumer( + ResultParserFactory.createFactory().createProtocolBufferResultParser( + defaultResponse, tracer.getTraceId()), + tracer, retry, lastResult), + cb); + } + } \ No newline at end of file diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/DeleteTimeseriesMetaLauncher.java b/src/main/java/com/alicloud/openservices/tablestore/core/DeleteTimeseriesMetaLauncher.java new file mode 100644 index 0000000..e95245a --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/DeleteTimeseriesMetaLauncher.java @@ -0,0 +1,60 @@ +package com.alicloud.openservices.tablestore.core; + +import com.alicloud.openservices.tablestore.ClientConfiguration; +import com.alicloud.openservices.tablestore.core.auth.CredentialsProvider; +import com.alicloud.openservices.tablestore.core.http.AsyncServiceClient; +import com.alicloud.openservices.tablestore.core.http.OTSUri; +import com.alicloud.openservices.tablestore.core.http.DeleteTimeseriesMetaResponseConsumer; +import com.alicloud.openservices.tablestore.core.protocol.ResultParserFactory; +import com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries; +import com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesProtocolBuilder; +import com.alicloud.openservices.tablestore.core.utils.LogUtil; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.alicloud.openservices.tablestore.model.RetryStrategy; +import com.alicloud.openservices.tablestore.model.timeseries.DeleteTimeseriesMetaRequest; +import com.alicloud.openservices.tablestore.model.timeseries.DeleteTimeseriesMetaResponse; +import org.apache.http.concurrent.FutureCallback; + +public class DeleteTimeseriesMetaLauncher extends OperationLauncher { + + private OTSUri uri; + private TraceLogger tracer; + private RetryStrategy retry; + + public DeleteTimeseriesMetaLauncher( + OTSUri uri, + TraceLogger tracer, + RetryStrategy retry, + String instanceName, + AsyncServiceClient client, + CredentialsProvider crdsProvider, + ClientConfiguration config, + DeleteTimeseriesMetaRequest originRequest) { + super(instanceName, client, crdsProvider, config, originRequest); + Preconditions.checkNotNull(uri); + Preconditions.checkNotNull(tracer); + Preconditions.checkNotNull(retry); + + this.uri = uri; + this.tracer = tracer; + this.retry = retry; + } + + @Override + public void fire(DeleteTimeseriesMetaRequest request, FutureCallback cb) { + LogUtil.logBeforeExecution(tracer, retry); + + Timeseries.DeleteTimeseriesMetaResponse defaultResponse = + Timeseries.DeleteTimeseriesMetaResponse.getDefaultInstance(); + asyncInvokePost( + uri, + null, + TimeseriesProtocolBuilder.buildDeleteTimeseriesMetaRequest(request), + tracer, + new DeleteTimeseriesMetaResponseConsumer( + ResultParserFactory.createFactory().createProtocolBufferResultParser( + defaultResponse, tracer.getTraceId()), + tracer, retry, lastResult), + cb); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/DeleteTimeseriesTableLauncher.java b/src/main/java/com/alicloud/openservices/tablestore/core/DeleteTimeseriesTableLauncher.java new file mode 100644 index 0000000..7cfc5b1 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/DeleteTimeseriesTableLauncher.java @@ -0,0 +1,60 @@ +package com.alicloud.openservices.tablestore.core; + +import com.alicloud.openservices.tablestore.ClientConfiguration; +import com.alicloud.openservices.tablestore.core.auth.CredentialsProvider; +import com.alicloud.openservices.tablestore.core.http.AsyncServiceClient; +import com.alicloud.openservices.tablestore.core.http.DeleteTimeseriesTableResponseConsumer; +import com.alicloud.openservices.tablestore.core.http.OTSUri; +import com.alicloud.openservices.tablestore.core.protocol.ResultParserFactory; +import com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries; +import com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesProtocolBuilder; +import com.alicloud.openservices.tablestore.core.utils.LogUtil; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.alicloud.openservices.tablestore.model.RetryStrategy; +import com.alicloud.openservices.tablestore.model.timeseries.DeleteTimeseriesTableRequest; +import com.alicloud.openservices.tablestore.model.timeseries.DeleteTimeseriesTableResponse; +import org.apache.http.concurrent.FutureCallback; + +public class DeleteTimeseriesTableLauncher extends OperationLauncher { + + private OTSUri uri; + private TraceLogger tracer; + private RetryStrategy retry; + + public DeleteTimeseriesTableLauncher( + OTSUri uri, + TraceLogger tracer, + RetryStrategy retry, + String instanceName, + AsyncServiceClient client, + CredentialsProvider crdsProvider, + ClientConfiguration config, + DeleteTimeseriesTableRequest originRequest) { + super(instanceName, client, crdsProvider, config, originRequest); + Preconditions.checkNotNull(uri); + Preconditions.checkNotNull(tracer); + Preconditions.checkNotNull(retry); + + this.uri = uri; + this.tracer = tracer; + this.retry = retry; + } + + @Override + public void fire(DeleteTimeseriesTableRequest request, FutureCallback cb) { + LogUtil.logBeforeExecution(tracer, retry); + + Timeseries.DeleteTimeseriesTableResponse defaultResponse = + Timeseries.DeleteTimeseriesTableResponse.getDefaultInstance(); + asyncInvokePost( + uri, + null, + TimeseriesProtocolBuilder.buildDeleteTimeseriesTableRequest(request), + tracer, + new DeleteTimeseriesTableResponseConsumer( + ResultParserFactory.createFactory().createProtocolBufferResultParser( + defaultResponse, tracer.getTraceId()), + tracer, retry, lastResult), + cb); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/DescribeDeliveryTaskLauncher.java b/src/main/java/com/alicloud/openservices/tablestore/core/DescribeDeliveryTaskLauncher.java new file mode 100644 index 0000000..2b07bcb --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/DescribeDeliveryTaskLauncher.java @@ -0,0 +1,62 @@ +package com.alicloud.openservices.tablestore.core; + +import com.alicloud.openservices.tablestore.ClientConfiguration; +import com.alicloud.openservices.tablestore.core.auth.CredentialsProvider; +import com.alicloud.openservices.tablestore.core.http.AsyncServiceClient; +import com.alicloud.openservices.tablestore.core.http.DescribeDeliveryTaskResponseConsumer; +import com.alicloud.openservices.tablestore.core.http.OTSUri; +import com.alicloud.openservices.tablestore.core.protocol.OTSProtocolBuilder; +import com.alicloud.openservices.tablestore.core.protocol.OtsDelivery; +import com.alicloud.openservices.tablestore.core.protocol.ResultParserFactory; +import com.alicloud.openservices.tablestore.core.utils.LogUtil; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.alicloud.openservices.tablestore.model.delivery.DescribeDeliveryTaskRequest; +import com.alicloud.openservices.tablestore.model.delivery.DescribeDeliveryTaskResponse; +import com.alicloud.openservices.tablestore.model.RetryStrategy; +import org.apache.http.concurrent.FutureCallback; + +public class DescribeDeliveryTaskLauncher + extends OperationLauncher { + private OTSUri uri; + private TraceLogger tracer; + private RetryStrategy retry; + + public DescribeDeliveryTaskLauncher( + OTSUri uri, + TraceLogger tracer, + RetryStrategy retry, + String instanceName, + AsyncServiceClient client, + CredentialsProvider crdsProvider, + ClientConfiguration config, + DescribeDeliveryTaskRequest originRequest) + { + super(instanceName, client, crdsProvider, config, originRequest); + + Preconditions.checkNotNull(uri); + Preconditions.checkNotNull(tracer); + Preconditions.checkNotNull(retry); + + this.uri = uri; + this.tracer = tracer; + this.retry = retry; + } + + @Override + public void fire(DescribeDeliveryTaskRequest req, FutureCallback cb) { + LogUtil.logBeforeExecution(tracer, retry); + + OtsDelivery.DescribeDeliveryTaskResponse defaultResponse = + OtsDelivery.DescribeDeliveryTaskResponse.getDefaultInstance(); + asyncInvokePost( + uri, + null, + OTSProtocolBuilder.buildDescribeDeliveryTaskRequest(req), + tracer, + new DescribeDeliveryTaskResponseConsumer( + ResultParserFactory.createFactory().createProtocolBufferResultParser( + defaultResponse, tracer.getTraceId()), + tracer, retry, lastResult), + cb); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/DescribeTimeseriesTableLauncher.java b/src/main/java/com/alicloud/openservices/tablestore/core/DescribeTimeseriesTableLauncher.java new file mode 100644 index 0000000..faff255 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/DescribeTimeseriesTableLauncher.java @@ -0,0 +1,60 @@ +package com.alicloud.openservices.tablestore.core; + +import com.alicloud.openservices.tablestore.ClientConfiguration; +import com.alicloud.openservices.tablestore.core.auth.CredentialsProvider; +import com.alicloud.openservices.tablestore.core.http.AsyncServiceClient; +import com.alicloud.openservices.tablestore.core.http.DescribeTimeseriesTableResponseConsumer; +import com.alicloud.openservices.tablestore.core.http.OTSUri; +import com.alicloud.openservices.tablestore.core.protocol.ResultParserFactory; +import com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries; +import com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesProtocolBuilder; +import com.alicloud.openservices.tablestore.core.utils.LogUtil; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.alicloud.openservices.tablestore.model.RetryStrategy; +import com.alicloud.openservices.tablestore.model.timeseries.DescribeTimeseriesTableRequest; +import com.alicloud.openservices.tablestore.model.timeseries.DescribeTimeseriesTableResponse; +import org.apache.http.concurrent.FutureCallback; + +public class DescribeTimeseriesTableLauncher extends OperationLauncher { + + private OTSUri uri; + private TraceLogger tracer; + private RetryStrategy retry; + + public DescribeTimeseriesTableLauncher( + OTSUri uri, + TraceLogger tracer, + RetryStrategy retry, + String instanceName, + AsyncServiceClient client, + CredentialsProvider crdsProvider, + ClientConfiguration config, + DescribeTimeseriesTableRequest originRequest) { + super(instanceName, client, crdsProvider, config, originRequest); + Preconditions.checkNotNull(uri); + Preconditions.checkNotNull(tracer); + Preconditions.checkNotNull(retry); + + this.uri = uri; + this.tracer = tracer; + this.retry = retry; + } + + @Override + public void fire(DescribeTimeseriesTableRequest request, FutureCallback cb) { + LogUtil.logBeforeExecution(tracer, retry); + + Timeseries.DescribeTimeseriesTableResponse defaultResponse = + Timeseries.DescribeTimeseriesTableResponse.getDefaultInstance(); + asyncInvokePost( + uri, + null, + TimeseriesProtocolBuilder.buildDescribeTimeseriesTableRequest(request), + tracer, + new DescribeTimeseriesTableResponseConsumer( + ResultParserFactory.createFactory().createProtocolBufferResultParser( + defaultResponse, tracer.getTraceId()), + tracer, retry, lastResult), + cb); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/GetRangeLauncher.java b/src/main/java/com/alicloud/openservices/tablestore/core/GetRangeLauncher.java index 1d85815..6b7c9dc 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/core/GetRangeLauncher.java +++ b/src/main/java/com/alicloud/openservices/tablestore/core/GetRangeLauncher.java @@ -60,4 +60,5 @@ public void fire(GetRangeRequest req, FutureCallback cb) { tracer, retry, lastResult), cb); } + } diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/GetTimeseriesDataLauncher.java b/src/main/java/com/alicloud/openservices/tablestore/core/GetTimeseriesDataLauncher.java new file mode 100644 index 0000000..5f21720 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/GetTimeseriesDataLauncher.java @@ -0,0 +1,60 @@ +package com.alicloud.openservices.tablestore.core; + +import com.alicloud.openservices.tablestore.ClientConfiguration; +import com.alicloud.openservices.tablestore.core.auth.CredentialsProvider; +import com.alicloud.openservices.tablestore.core.http.AsyncServiceClient; +import com.alicloud.openservices.tablestore.core.http.GetTimeseriesDataResponseConsumer; +import com.alicloud.openservices.tablestore.core.http.OTSUri; +import com.alicloud.openservices.tablestore.core.protocol.ResultParserFactory; +import com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesProtocolBuilder; +import com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries; +import com.alicloud.openservices.tablestore.core.utils.LogUtil; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.alicloud.openservices.tablestore.model.RetryStrategy; +import com.alicloud.openservices.tablestore.model.timeseries.GetTimeseriesDataRequest; +import com.alicloud.openservices.tablestore.model.timeseries.GetTimeseriesDataResponse; +import org.apache.http.concurrent.FutureCallback; + +public class GetTimeseriesDataLauncher extends OperationLauncher { + + private OTSUri uri; + private TraceLogger tracer; + private RetryStrategy retry; + + public GetTimeseriesDataLauncher( + OTSUri uri, + TraceLogger tracer, + RetryStrategy retry, + String instanceName, + AsyncServiceClient client, + CredentialsProvider crdsProvider, + ClientConfiguration config, + GetTimeseriesDataRequest originRequest) { + super(instanceName, client, crdsProvider, config, originRequest); + Preconditions.checkNotNull(uri); + Preconditions.checkNotNull(tracer); + Preconditions.checkNotNull(retry); + + this.uri = uri; + this.tracer = tracer; + this.retry = retry; + } + + @Override + public void fire(GetTimeseriesDataRequest request, FutureCallback cb) { + LogUtil.logBeforeExecution(tracer, retry); + + Timeseries.GetTimeseriesDataResponse defaultResponse = + Timeseries.GetTimeseriesDataResponse.getDefaultInstance(); + asyncInvokePost( + uri, + null, + TimeseriesProtocolBuilder.buildGetTimeseriesDataRequest(request), + tracer, + new GetTimeseriesDataResponseConsumer( + ResultParserFactory.createFactory().createProtocolBufferResultParser( + defaultResponse, tracer.getTraceId()), + tracer, retry, lastResult), + cb); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/LauncherFactory.java b/src/main/java/com/alicloud/openservices/tablestore/core/LauncherFactory.java index 4b7b3d2..0cfe34b 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/core/LauncherFactory.java +++ b/src/main/java/com/alicloud/openservices/tablestore/core/LauncherFactory.java @@ -8,7 +8,13 @@ import com.alicloud.openservices.tablestore.core.http.OTSUri; import com.alicloud.openservices.tablestore.core.http.AsyncServiceClient; import com.alicloud.openservices.tablestore.model.*; +import com.alicloud.openservices.tablestore.model.delivery.CreateDeliveryTaskRequest; +import com.alicloud.openservices.tablestore.model.delivery.DeleteDeliveryTaskRequest; +import com.alicloud.openservices.tablestore.model.delivery.DescribeDeliveryTaskRequest; +import com.alicloud.openservices.tablestore.model.delivery.ListDeliveryTaskRequest; import com.alicloud.openservices.tablestore.model.search.*; +import com.alicloud.openservices.tablestore.model.sql.SQLQueryRequest; +import com.alicloud.openservices.tablestore.model.timeseries.*; import com.alicloud.openservices.tablestore.model.tunnel.CreateTunnelRequest; import com.alicloud.openservices.tablestore.model.tunnel.DeleteTunnelRequest; import com.alicloud.openservices.tablestore.model.tunnel.DescribeTunnelRequest; @@ -19,6 +25,7 @@ import com.alicloud.openservices.tablestore.model.tunnel.internal.HeartbeatRequest; import com.alicloud.openservices.tablestore.model.tunnel.internal.ReadRecordsRequest; import com.alicloud.openservices.tablestore.model.tunnel.internal.ShutdownTunnelRequest; +import com.google.common.cache.Cache; import static com.alicloud.openservices.tablestore.model.OperationNames.*; @@ -67,6 +74,10 @@ public LauncherFactory( new Context(new OTSUri(endpoint, OP_CREATE_INDEX))); contexts.put(OP_DELETE_INDEX, new Context(new OTSUri(endpoint, OP_DELETE_INDEX))); + contexts.put(OP_ADD_DEFINED_COLUMN, + new Context(new OTSUri(endpoint, OP_ADD_DEFINED_COLUMN))); + contexts.put(OP_DELETE_DEFINED_COLUMN, + new Context(new OTSUri(endpoint, OP_DELETE_DEFINED_COLUMN))); contexts.put(OP_PUT_ROW, new Context(new OTSUri(endpoint, OP_PUT_ROW))); @@ -75,39 +86,49 @@ public LauncherFactory( contexts.put(OP_DELETE_ROW, new Context(new OTSUri(endpoint, OP_DELETE_ROW))); contexts.put(OP_GET_ROW, - new Context(new OTSUri(endpoint, OP_GET_ROW))); + new Context(new OTSUri(endpoint, OP_GET_ROW))); contexts.put(OP_BATCH_GET_ROW, - new Context(new OTSUri(endpoint, OP_BATCH_GET_ROW))); + new Context(new OTSUri(endpoint, OP_BATCH_GET_ROW))); contexts.put(OP_BATCH_WRITE_ROW, - new Context(new OTSUri(endpoint, OP_BATCH_WRITE_ROW))); + new Context(new OTSUri(endpoint, OP_BATCH_WRITE_ROW))); + contexts.put(OP_BULK_IMPORT, + new Context(new OTSUri(endpoint, OP_BULK_IMPORT))); contexts.put(OP_GET_RANGE, - new Context(new OTSUri(endpoint, OP_GET_RANGE))); + new Context(new OTSUri(endpoint, OP_GET_RANGE))); + contexts.put(OP_BULK_EXPORT, + new Context(new OTSUri(endpoint, OP_BULK_EXPORT))); contexts.put(OP_LIST_STREAM, - new Context(new OTSUri(endpoint, OP_LIST_STREAM))); + new Context(new OTSUri(endpoint, OP_LIST_STREAM))); contexts.put(OP_DESCRIBE_STREAM, - new Context(new OTSUri(endpoint, OP_DESCRIBE_STREAM))); + new Context(new OTSUri(endpoint, OP_DESCRIBE_STREAM))); contexts.put(OP_GET_SHARD_ITERATOR, - new Context(new OTSUri(endpoint, OP_GET_SHARD_ITERATOR))); + new Context(new OTSUri(endpoint, OP_GET_SHARD_ITERATOR))); contexts.put(OP_GET_STREAM_RECORD, - new Context(new OTSUri(endpoint, OP_GET_STREAM_RECORD))); + new Context(new OTSUri(endpoint, OP_GET_STREAM_RECORD))); contexts.put(OP_COMPUTE_SPLITS_BY_SIZE, - new Context(new OTSUri(endpoint, OP_COMPUTE_SPLITS_BY_SIZE))); + new Context(new OTSUri(endpoint, OP_COMPUTE_SPLITS_BY_SIZE))); contexts.put(OP_CREATE_SEARCH_INDEX, - new Context(new OTSUri(endpoint, OP_CREATE_SEARCH_INDEX))); + new Context(new OTSUri(endpoint, OP_CREATE_SEARCH_INDEX))); + contexts.put(OP_UPDATE_SEARCH_INDEX, + new Context(new OTSUri(endpoint, OP_UPDATE_SEARCH_INDEX))); contexts.put(OP_LIST_SEARCH_INDEX, - new Context(new OTSUri(endpoint, OP_LIST_SEARCH_INDEX))); + new Context(new OTSUri(endpoint, OP_LIST_SEARCH_INDEX))); contexts.put(OP_DELETE_SEARCH_INDEX, - new Context(new OTSUri(endpoint, OP_DELETE_SEARCH_INDEX))); + new Context(new OTSUri(endpoint, OP_DELETE_SEARCH_INDEX))); contexts.put(OP_DESCRIBE_SEARCH_INDEX, - new Context(new OTSUri(endpoint, OP_DESCRIBE_SEARCH_INDEX))); + new Context(new OTSUri(endpoint, OP_DESCRIBE_SEARCH_INDEX))); contexts.put(OP_SEARCH, - new Context(new OTSUri(endpoint, OP_SEARCH))); + new Context(new OTSUri(endpoint, OP_SEARCH))); + contexts.put(OP_PARALLEL_SCAN, + new Context(new OTSUri(endpoint, OP_PARALLEL_SCAN))); + contexts.put(OP_COMPUTE_SPLITS, + new Context(new OTSUri(endpoint, OP_COMPUTE_SPLITS))); contexts.put(OP_START_LOCAL_TRANSACTION, - new Context(new OTSUri(endpoint, OP_START_LOCAL_TRANSACTION))); + new Context(new OTSUri(endpoint, OP_START_LOCAL_TRANSACTION))); contexts.put(OP_COMMIT_TRANSACTION, - new Context(new OTSUri(endpoint, OP_COMMIT_TRANSACTION))); + new Context(new OTSUri(endpoint, OP_COMMIT_TRANSACTION))); contexts.put(OP_ABORT_TRANSACTION, - new Context(new OTSUri(endpoint, OP_ABORT_TRANSACTION))); + new Context(new OTSUri(endpoint, OP_ABORT_TRANSACTION))); contexts.put(OP_CREATE_TUNNEL, new Context(new OTSUri(endpoint, OP_CREATE_TUNNEL))); @@ -129,6 +150,38 @@ public LauncherFactory( new Context(new OTSUri(endpoint, OP_READRECORDS))); contexts.put(OP_CHECKPOINT, new Context(new OTSUri(endpoint, OP_CHECKPOINT))); + contexts.put(OP_CREATE_DELIVERY_TASK, + new Context(new OTSUri(endpoint, OP_CREATE_DELIVERY_TASK))); + contexts.put(OP_DELETE_DELIVERY_TASK, + new Context(new OTSUri(endpoint, OP_DELETE_DELIVERY_TASK))); + contexts.put(OP_UPDATE_DELIVERY_TASK, + new Context(new OTSUri(endpoint, OP_UPDATE_DELIVERY_TASK))); + contexts.put(OP_DESCRIBE_DELIVERY_TASK, + new Context(new OTSUri(endpoint, OP_DESCRIBE_DELIVERY_TASK))); + contexts.put(OP_LIST_DELIVERY_TASK, + new Context(new OTSUri(endpoint, OP_LIST_DELIVERY_TASK))); + contexts.put(OP_CREATE_TIMESERIES_TABLE, + new Context(new OTSUri(endpoint, OP_CREATE_TIMESERIES_TABLE))); + contexts.put(OP_LIST_TIMESERIES_TABLE, + new Context(new OTSUri(endpoint, OP_LIST_TIMESERIES_TABLE))); + contexts.put(OP_DELETE_TIMESERIES_TABLE, + new Context(new OTSUri(endpoint, OP_DELETE_TIMESERIES_TABLE))); + contexts.put(OP_UPDATE_TIMESERIES_TABLE, + new Context(new OTSUri(endpoint, OP_UPDATE_TIMESERIES_TABLE))); + contexts.put(OP_DESCRIBE_TIMESERIES_TABLE, + new Context(new OTSUri(endpoint, OP_DESCRIBE_TIMESERIES_TABLE))); + contexts.put(OP_PUT_TIMESERIES_DATA, + new Context(new OTSUri(endpoint, OP_PUT_TIMESERIES_DATA))); + contexts.put(OP_GET_TIMESERIES_DATA, + new Context(new OTSUri(endpoint, OP_GET_TIMESERIES_DATA))); + contexts.put(OP_QUERY_TIMESERIES_META, + new Context(new OTSUri(endpoint, OP_QUERY_TIMESERIES_META))); + contexts.put(OP_UPDATE_TIMESERIES_META, + new Context(new OTSUri(endpoint, OP_UPDATE_TIMESERIES_META))); + contexts.put(OP_DELETE_TIMESERIES_META, + new Context(new OTSUri(endpoint, OP_DELETE_TIMESERIES_META))); + contexts.put(OP_SQL_Query, + new Context(new OTSUri(endpoint, OP_SQL_Query))); } public CreateTableLauncher createTable(TraceLogger tracer, RetryStrategy retry, CreateTableRequest originRequest) @@ -138,6 +191,13 @@ public CreateTableLauncher createTable(TraceLogger tracer, RetryStrategy retry, ctx.uri, tracer, retry, instanceName, client, crdsProvider, config, originRequest); } + public CreateTableExLauncher createTableEx(TraceLogger tracer, RetryStrategy retry, CreateTableRequestEx originRequest) + { + Context ctx = contexts.get(OP_CREATE_TABLE); + return new CreateTableExLauncher( + ctx.uri, tracer, retry, instanceName, client, crdsProvider, config, originRequest); + } + public DeleteTableLauncher deleteTable(TraceLogger tracer, RetryStrategy retry, DeleteTableRequest originRequest) { Context ctx = contexts.get(OP_DELETE_TABLE); @@ -180,6 +240,19 @@ public DeleteIndexLauncher deleteIndex(TraceLogger tracer, RetryStrategy retry, ctx.uri, tracer, retry, instanceName, client, crdsProvider, config, originRequest); } + public AddDefinedColumnLauncher addDefinedColumn(TraceLogger tracer, RetryStrategy retry, AddDefinedColumnRequest originRequest) + { + Context ctx = contexts.get(OP_ADD_DEFINED_COLUMN); + return new AddDefinedColumnLauncher( + ctx.uri, tracer, retry, instanceName, client, crdsProvider, config, originRequest); + } + + public DeleteDefinedColumnLauncher deleteDefinedColumn(TraceLogger tracer, RetryStrategy retry, DeleteDefinedColumnRequest originRequest) + { + Context ctx = contexts.get(OP_DELETE_DEFINED_COLUMN); + return new DeleteDefinedColumnLauncher( + ctx.uri, tracer, retry, instanceName, client, crdsProvider, config, originRequest); + } public PutRowLauncher putRow(TraceLogger tracer, RetryStrategy retry, PutRowRequest originRequest) { @@ -188,7 +261,7 @@ public PutRowLauncher putRow(TraceLogger tracer, RetryStrategy retry, PutRowRequ ctx.uri, tracer, retry, instanceName, client, crdsProvider, config, originRequest); } - + public UpdateRowLauncher updateRow(TraceLogger tracer, RetryStrategy retry, UpdateRowRequest originRequest) { Context ctx = contexts.get(OP_UPDATE_ROW); @@ -196,14 +269,13 @@ public UpdateRowLauncher updateRow(TraceLogger tracer, RetryStrategy retry, Upda ctx.uri, tracer, retry, instanceName, client, crdsProvider, config, originRequest); } - public DeleteRowLauncher deleteRow(TraceLogger tracer, RetryStrategy retry, DeleteRowRequest originRequest) { Context ctx = contexts.get(OP_DELETE_ROW); return new DeleteRowLauncher( ctx.uri, tracer, retry, instanceName, client, crdsProvider, config, originRequest); } - + public GetRowLauncher getRow(TraceLogger tracer, RetryStrategy retry, GetRowRequest originRequest) { Context ctx = contexts.get(OP_GET_ROW); @@ -217,21 +289,36 @@ public BatchGetRowLauncher batchGetRow(TraceLogger tracer, RetryStrategy retry, return new BatchGetRowLauncher( ctx.uri, tracer, retry, instanceName, client, crdsProvider, config, originRequest); } - + public BatchWriteRowLauncher batchWriteRow(TraceLogger tracer, RetryStrategy retry, BatchWriteRowRequest originRequest) { Context ctx = contexts.get(OP_BATCH_WRITE_ROW); return new BatchWriteRowLauncher( ctx.uri, tracer, retry, instanceName, client, crdsProvider, config, originRequest); } - + + public BulkImportLauncher bulkImport(TraceLogger tracer, RetryStrategy retry, BulkImportRequest originRequest) + { + Context ctx = contexts.get(OP_BULK_IMPORT); + return new BulkImportLauncher( + ctx.uri, tracer, retry, instanceName, client, crdsProvider, config, originRequest); + } + public GetRangeLauncher getRange(TraceLogger tracer, RetryStrategy retry, GetRangeRequest originRequest) { Context ctx = contexts.get(OP_GET_RANGE); return new GetRangeLauncher( ctx.uri, tracer, retry, instanceName, client, crdsProvider, config, originRequest); } - + + public BulkExportLauncher bulkExport(TraceLogger tracer, RetryStrategy retry, BulkExportRequest originRequest) + { + Context ctx = contexts.get(OP_BULK_EXPORT); + return new BulkExportLauncher( + ctx.uri, tracer, retry, instanceName, client, crdsProvider, config, originRequest); + } + + public ComputeSplitsBySizeLauncher computeSplitsBySize(TraceLogger tracer, RetryStrategy retry, ComputeSplitsBySizeRequest originRequest) { Context ctx = contexts.get(OP_COMPUTE_SPLITS_BY_SIZE); @@ -295,6 +382,13 @@ public CreateSearchIndexLauncher createSearchIndex(TraceLogger tracer, RetryStra ctx.uri, tracer, retry, instanceName, client, crdsProvider, config, originRequest); } + public UpdateSearchIndexLauncher updateSearchIndex(TraceLogger tracer, RetryStrategy retry, UpdateSearchIndexRequest originRequest) + { + Context ctx = contexts.get(OP_UPDATE_SEARCH_INDEX); + return new UpdateSearchIndexLauncher( + ctx.uri, tracer, retry, instanceName, client, crdsProvider, config, originRequest); + } + public ListSearchIndexLauncher listSearchIndex(TraceLogger tracer, RetryStrategy retry, ListSearchIndexRequest originRequest) { Context ctx = contexts.get(OP_LIST_SEARCH_INDEX); @@ -323,6 +417,20 @@ public SearchLauncher search(TraceLogger tracer, RetryStrategy retry, SearchRequ ctx.uri, tracer, retry, instanceName, client, crdsProvider, config, originRequest); } + public ParallelScanLauncher parallelScan(TraceLogger tracer, RetryStrategy retry, ParallelScanRequest originRequest) + { + Context ctx = contexts.get(OP_PARALLEL_SCAN); + return new ParallelScanLauncher( + ctx.uri, tracer, retry, instanceName, client, crdsProvider, config, originRequest); + } + + public ComputeSplitsLauncher computeSplits(TraceLogger tracer, RetryStrategy retry, ComputeSplitsRequest originRequest) + { + Context ctx = contexts.get(OP_COMPUTE_SPLITS); + return new ComputeSplitsLauncher( + ctx.uri, tracer, retry, instanceName, client, crdsProvider, config, originRequest); + } + public CreateTunnelLauncher createTunnel(TraceLogger tracer, RetryStrategy retry, CreateTunnelRequest originRequest) { Context ctx = contexts.get(OP_CREATE_TUNNEL); @@ -393,4 +501,109 @@ public CheckpointLauncher checkpoint(TraceLogger tracer, RetryStrategy retry, return new CheckpointLauncher( ctx.uri, tracer, retry, instanceName, client, crdsProvider, config, originRequest); } + + public CreateDeliveryTaskLauncher createDeliveryTask(TraceLogger tracer, RetryStrategy retry, + CreateDeliveryTaskRequest originRequest) { + Context ctx = contexts.get(OP_CREATE_DELIVERY_TASK); + return new CreateDeliveryTaskLauncher( + ctx.uri, tracer, retry, instanceName, client, crdsProvider, config, originRequest); + } + + public DeleteDeliveryTaskLauncher deleteDeliveryTask(TraceLogger tracer, RetryStrategy retry, + DeleteDeliveryTaskRequest originRequest) { + Context ctx = contexts.get(OP_DELETE_DELIVERY_TASK); + return new DeleteDeliveryTaskLauncher( + ctx.uri, tracer, retry, instanceName, client, crdsProvider, config, originRequest); + } + + public DescribeDeliveryTaskLauncher describeDeliveryTask(TraceLogger tracer, RetryStrategy retry, + DescribeDeliveryTaskRequest originRequest) { + Context ctx = contexts.get(OP_DESCRIBE_DELIVERY_TASK); + return new DescribeDeliveryTaskLauncher( + ctx.uri, tracer, retry, instanceName, client, crdsProvider, config, originRequest); + } + + public ListDeliveryTaskLauncher listDeliveryTask(TraceLogger tracer, RetryStrategy retry, + ListDeliveryTaskRequest originRequest) { + Context ctx = contexts.get(OP_LIST_DELIVERY_TASK); + return new ListDeliveryTaskLauncher( + ctx.uri, tracer, retry, instanceName, client, crdsProvider, config, originRequest); + } + + public CreateTimeseriesTableLauncher createTimeseriesTable(TraceLogger tracer, RetryStrategy retry, + CreateTimeseriesTableRequest originRequest) { + Context ctx = contexts.get(OP_CREATE_TIMESERIES_TABLE); + return new CreateTimeseriesTableLauncher( + ctx.uri, tracer, retry, instanceName, client, crdsProvider, config, originRequest); + } + + public ListTimeseriesTableLauncher listTimeseriesTable(TraceLogger tracer, RetryStrategy retry, + ListTimeseriesTableRequest originRequest) { + Context ctx = contexts.get(OP_LIST_TIMESERIES_TABLE); + return new ListTimeseriesTableLauncher( + ctx.uri, tracer, retry, instanceName, client, crdsProvider, config, originRequest); + } + + public DeleteTimeseriesTableLauncher deleteTimeseriesTable(TraceLogger tracer, RetryStrategy retry, + DeleteTimeseriesTableRequest originRequest) { + Context ctx = contexts.get(OP_DELETE_TIMESERIES_TABLE); + return new DeleteTimeseriesTableLauncher( + ctx.uri, tracer, retry, instanceName, client, crdsProvider, config, originRequest); + } + + public DescribeTimeseriesTableLauncher describeTimeseriesTable(TraceLogger tracer, RetryStrategy retry, + DescribeTimeseriesTableRequest originRequest) { + Context ctx = contexts.get(OP_DESCRIBE_TIMESERIES_TABLE); + return new DescribeTimeseriesTableLauncher( + ctx.uri, tracer, retry, instanceName, client, crdsProvider, config, originRequest); + } + + public UpdateTimeseriesTableLauncher updateTimeseriesTable(TraceLogger tracer, RetryStrategy retry, + UpdateTimeseriesTableRequest originRequest) { + Context ctx = contexts.get(OP_UPDATE_TIMESERIES_TABLE); + return new UpdateTimeseriesTableLauncher( + ctx.uri, tracer, retry, instanceName, client, crdsProvider, config, originRequest); + } + + public PutTimeseriesDataLauncher putTimeseriesData(TraceLogger tracer, RetryStrategy retry, + PutTimeseriesDataRequest originRequest, Cache timeseriesMetaCache) { + Context ctx = contexts.get(OP_PUT_TIMESERIES_DATA); + return new PutTimeseriesDataLauncher( + ctx.uri, tracer, retry, instanceName, client, crdsProvider, config, originRequest, timeseriesMetaCache); + } + + public GetTimeseriesDataLauncher getTimeseriesData(TraceLogger tracer, RetryStrategy retry, + GetTimeseriesDataRequest originRequest) { + Context ctx = contexts.get(OP_GET_TIMESERIES_DATA); + return new GetTimeseriesDataLauncher( + ctx.uri, tracer, retry, instanceName, client, crdsProvider, config, originRequest); + } + + public QueryTimeseriesMetaLauncher queryTimeseriesMeta(TraceLogger tracer, RetryStrategy retry, + QueryTimeseriesMetaRequest originRequest) { + Context ctx = contexts.get(OP_QUERY_TIMESERIES_META); + return new QueryTimeseriesMetaLauncher( + ctx.uri, tracer, retry, instanceName, client, crdsProvider, config, originRequest); + } + + public UpdateTimeseriesMetaLauncher updateTimeseriesMeta(TraceLogger tracer, RetryStrategy retry, + UpdateTimeseriesMetaRequest originRequest) { + Context ctx = contexts.get(OP_UPDATE_TIMESERIES_META); + return new UpdateTimeseriesMetaLauncher( + ctx.uri, tracer, retry, instanceName, client, crdsProvider, config, originRequest); + } + + public DeleteTimeseriesMetaLauncher deleteTimeseriesMeta(TraceLogger tracer, RetryStrategy retry, + DeleteTimeseriesMetaRequest originRequest) { + Context ctx = contexts.get(OP_DELETE_TIMESERIES_META); + return new DeleteTimeseriesMetaLauncher( + ctx.uri, tracer, retry, instanceName, client, crdsProvider, config, originRequest); + } + + public SQLQueryLauncher sqlQuery(TraceLogger tracer, RetryStrategy retry, SQLQueryRequest originRequest) + { + Context ctx = contexts.get(OP_SQL_Query); + return new SQLQueryLauncher( + ctx.uri, tracer, retry, instanceName, client, crdsProvider, config, originRequest); + } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/ListDeliveryTaskLauncher.java b/src/main/java/com/alicloud/openservices/tablestore/core/ListDeliveryTaskLauncher.java new file mode 100644 index 0000000..0421484 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/ListDeliveryTaskLauncher.java @@ -0,0 +1,62 @@ +package com.alicloud.openservices.tablestore.core; + +import com.alicloud.openservices.tablestore.ClientConfiguration; +import com.alicloud.openservices.tablestore.core.auth.CredentialsProvider; +import com.alicloud.openservices.tablestore.core.http.AsyncServiceClient; +import com.alicloud.openservices.tablestore.core.http.ListDeliveryTaskResponseConsumer; +import com.alicloud.openservices.tablestore.core.http.OTSUri; +import com.alicloud.openservices.tablestore.core.protocol.OTSProtocolBuilder; +import com.alicloud.openservices.tablestore.core.protocol.OtsDelivery; +import com.alicloud.openservices.tablestore.core.protocol.ResultParserFactory; +import com.alicloud.openservices.tablestore.core.utils.LogUtil; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.alicloud.openservices.tablestore.model.delivery.ListDeliveryTaskRequest; +import com.alicloud.openservices.tablestore.model.delivery.ListDeliveryTaskResponse; +import com.alicloud.openservices.tablestore.model.RetryStrategy; +import org.apache.http.concurrent.FutureCallback; + +public class ListDeliveryTaskLauncher + extends OperationLauncher { + private OTSUri uri; + private TraceLogger tracer; + private RetryStrategy retry; + + public ListDeliveryTaskLauncher( + OTSUri uri, + TraceLogger tracer, + RetryStrategy retry, + String instanceName, + AsyncServiceClient client, + CredentialsProvider crdsProvider, + ClientConfiguration config, + ListDeliveryTaskRequest originRequest) + { + super(instanceName, client, crdsProvider, config, originRequest); + + Preconditions.checkNotNull(uri); + Preconditions.checkNotNull(tracer); + Preconditions.checkNotNull(retry); + + this.uri = uri; + this.tracer = tracer; + this.retry = retry; + } + + @Override + public void fire(ListDeliveryTaskRequest req, FutureCallback cb) { + LogUtil.logBeforeExecution(tracer, retry); + + OtsDelivery.ListDeliveryTaskResponse defaultResponse = + OtsDelivery.ListDeliveryTaskResponse.getDefaultInstance(); + asyncInvokePost( + uri, + null, + OTSProtocolBuilder.buildListDeliveryTaskRequest(req), + tracer, + new ListDeliveryTaskResponseConsumer( + ResultParserFactory.createFactory().createProtocolBufferResultParser( + defaultResponse, tracer.getTraceId()), + tracer, retry, lastResult), + cb); + } +} \ No newline at end of file diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/ListTimeseriesTableLauncher.java b/src/main/java/com/alicloud/openservices/tablestore/core/ListTimeseriesTableLauncher.java new file mode 100644 index 0000000..50584cf --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/ListTimeseriesTableLauncher.java @@ -0,0 +1,60 @@ +package com.alicloud.openservices.tablestore.core; + +import com.alicloud.openservices.tablestore.ClientConfiguration; +import com.alicloud.openservices.tablestore.core.auth.CredentialsProvider; +import com.alicloud.openservices.tablestore.core.http.AsyncServiceClient; +import com.alicloud.openservices.tablestore.core.http.ListTimeseriesTableResponseConsumer; +import com.alicloud.openservices.tablestore.core.http.OTSUri; +import com.alicloud.openservices.tablestore.core.protocol.ResultParserFactory; +import com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries; +import com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesProtocolBuilder; +import com.alicloud.openservices.tablestore.core.utils.LogUtil; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.alicloud.openservices.tablestore.model.RetryStrategy; +import com.alicloud.openservices.tablestore.model.timeseries.ListTimeseriesTableResponse; +import com.alicloud.openservices.tablestore.model.timeseries.ListTimeseriesTableRequest; +import org.apache.http.concurrent.FutureCallback; + +public class ListTimeseriesTableLauncher extends OperationLauncher { + + private OTSUri uri; + private TraceLogger tracer; + private RetryStrategy retry; + + public ListTimeseriesTableLauncher( + OTSUri uri, + TraceLogger tracer, + RetryStrategy retry, + String instanceName, + AsyncServiceClient client, + CredentialsProvider crdsProvider, + ClientConfiguration config, + ListTimeseriesTableRequest originRequest) { + super(instanceName, client, crdsProvider, config, originRequest); + Preconditions.checkNotNull(uri); + Preconditions.checkNotNull(tracer); + Preconditions.checkNotNull(retry); + + this.uri = uri; + this.tracer = tracer; + this.retry = retry; + } + + @Override + public void fire(ListTimeseriesTableRequest request, FutureCallback cb) { + LogUtil.logBeforeExecution(tracer, retry); + + Timeseries.ListTimeseriesTableResponse defaultResponse = + Timeseries.ListTimeseriesTableResponse.getDefaultInstance(); + asyncInvokePost( + uri, + null, + TimeseriesProtocolBuilder.buildListTimeseriesTableRequest(request), + tracer, + new ListTimeseriesTableResponseConsumer( + ResultParserFactory.createFactory().createProtocolBufferResultParser( + defaultResponse, tracer.getTraceId()), + tracer, retry, lastResult), + cb); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/ParallelScanLauncher.java b/src/main/java/com/alicloud/openservices/tablestore/core/ParallelScanLauncher.java new file mode 100644 index 0000000..387763e --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/ParallelScanLauncher.java @@ -0,0 +1,60 @@ +package com.alicloud.openservices.tablestore.core; + +import com.alicloud.openservices.tablestore.ClientConfiguration; +import com.alicloud.openservices.tablestore.core.auth.CredentialsProvider; +import com.alicloud.openservices.tablestore.core.http.AsyncServiceClient; +import com.alicloud.openservices.tablestore.core.http.OTSUri; +import com.alicloud.openservices.tablestore.core.http.ParallelScanResponseConsumer; +import com.alicloud.openservices.tablestore.core.protocol.ResultParserFactory; +import com.alicloud.openservices.tablestore.core.protocol.Search; +import com.alicloud.openservices.tablestore.core.protocol.SearchProtocolBuilder; +import com.alicloud.openservices.tablestore.core.utils.LogUtil; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.alicloud.openservices.tablestore.model.RetryStrategy; +import com.alicloud.openservices.tablestore.model.search.ParallelScanRequest; +import com.alicloud.openservices.tablestore.model.search.ParallelScanResponse; +import org.apache.http.concurrent.FutureCallback; + +public class ParallelScanLauncher extends OperationLauncher { + private OTSUri uri; + private TraceLogger tracer; + private RetryStrategy retry; + + public ParallelScanLauncher( + OTSUri uri, + TraceLogger tracer, + RetryStrategy retry, + String instanceName, + AsyncServiceClient client, + CredentialsProvider crdsProvider, + ClientConfiguration config, + ParallelScanRequest originRequest) + { + super(instanceName, client, crdsProvider, config, originRequest); + + Preconditions.checkNotNull(uri); + Preconditions.checkNotNull(tracer); + Preconditions.checkNotNull(retry); + + this.uri = uri; + this.tracer = tracer; + this.retry = retry; + } + + @Override + public void fire(ParallelScanRequest req, FutureCallback cb) { + LogUtil.logBeforeExecution(tracer, retry); + + Search.ParallelScanResponse defaultResponse = Search.ParallelScanResponse.getDefaultInstance(); + asyncInvokePost( + uri, + null, + SearchProtocolBuilder.buildParallelScanRequest(req), + tracer, + new ParallelScanResponseConsumer( + ResultParserFactory.createFactory().createProtocolBufferResultParser(defaultResponse, tracer.getTraceId()), + tracer, retry, lastResult), + cb); + } +} + diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/PutTimeseriesDataLauncher.java b/src/main/java/com/alicloud/openservices/tablestore/core/PutTimeseriesDataLauncher.java new file mode 100644 index 0000000..19f7ff3 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/PutTimeseriesDataLauncher.java @@ -0,0 +1,65 @@ +package com.alicloud.openservices.tablestore.core; + +import com.alicloud.openservices.tablestore.ClientConfiguration; +import com.alicloud.openservices.tablestore.core.auth.CredentialsProvider; +import com.alicloud.openservices.tablestore.core.http.AsyncServiceClient; +import com.alicloud.openservices.tablestore.core.http.PutTimeseriesDataResponseConsumer; +import com.alicloud.openservices.tablestore.core.http.OTSUri; +import com.alicloud.openservices.tablestore.core.protocol.ResultParserFactory; +import com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesProtocolBuilder; +import com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries; +import com.alicloud.openservices.tablestore.core.utils.LogUtil; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.alicloud.openservices.tablestore.model.RetryStrategy; +import com.alicloud.openservices.tablestore.model.timeseries.PutTimeseriesDataRequest; +import com.alicloud.openservices.tablestore.model.timeseries.PutTimeseriesDataResponse; +import com.google.common.cache.Cache; +import org.apache.http.concurrent.FutureCallback; + +public class PutTimeseriesDataLauncher extends OperationLauncher { + + private OTSUri uri; + private TraceLogger tracer; + private RetryStrategy retry; + private Cache timeseriesMetaCache; + + public PutTimeseriesDataLauncher( + OTSUri uri, + TraceLogger tracer, + RetryStrategy retry, + String instanceName, + AsyncServiceClient client, + CredentialsProvider crdsProvider, + ClientConfiguration config, + PutTimeseriesDataRequest originRequest, + Cache timeseriesMetaCache) { + super(instanceName, client, crdsProvider, config, originRequest); + Preconditions.checkNotNull(uri); + Preconditions.checkNotNull(tracer); + Preconditions.checkNotNull(retry); + Preconditions.checkNotNull(timeseriesMetaCache); + + this.uri = uri; + this.tracer = tracer; + this.retry = retry; + this.timeseriesMetaCache = timeseriesMetaCache; + } + + @Override + public void fire(PutTimeseriesDataRequest request, FutureCallback cb) { + LogUtil.logBeforeExecution(tracer, retry); + + Timeseries.PutTimeseriesDataResponse defaultResponse = + Timeseries.PutTimeseriesDataResponse.getDefaultInstance(); + asyncInvokePost( + uri, + null, + TimeseriesProtocolBuilder.buildPutTimeseriesDataRequest(request, timeseriesMetaCache), + tracer, + new PutTimeseriesDataResponseConsumer( + ResultParserFactory.createFactory().createProtocolBufferResultParser( + defaultResponse, tracer.getTraceId()), + tracer, retry, lastResult, request, timeseriesMetaCache), + cb); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/QueryTimeseriesMetaLauncher.java b/src/main/java/com/alicloud/openservices/tablestore/core/QueryTimeseriesMetaLauncher.java new file mode 100644 index 0000000..0e36d68 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/QueryTimeseriesMetaLauncher.java @@ -0,0 +1,60 @@ +package com.alicloud.openservices.tablestore.core; + +import com.alicloud.openservices.tablestore.ClientConfiguration; +import com.alicloud.openservices.tablestore.core.auth.CredentialsProvider; +import com.alicloud.openservices.tablestore.core.http.AsyncServiceClient; +import com.alicloud.openservices.tablestore.core.http.QueryTimeseriesMetaResponseConsumer; +import com.alicloud.openservices.tablestore.core.http.OTSUri; +import com.alicloud.openservices.tablestore.core.protocol.ResultParserFactory; +import com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesProtocolBuilder; +import com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries; +import com.alicloud.openservices.tablestore.core.utils.LogUtil; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.alicloud.openservices.tablestore.model.RetryStrategy; +import com.alicloud.openservices.tablestore.model.timeseries.QueryTimeseriesMetaRequest; +import com.alicloud.openservices.tablestore.model.timeseries.QueryTimeseriesMetaResponse; +import org.apache.http.concurrent.FutureCallback; + +public class QueryTimeseriesMetaLauncher extends OperationLauncher { + + private OTSUri uri; + private TraceLogger tracer; + private RetryStrategy retry; + + public QueryTimeseriesMetaLauncher( + OTSUri uri, + TraceLogger tracer, + RetryStrategy retry, + String instanceName, + AsyncServiceClient client, + CredentialsProvider crdsProvider, + ClientConfiguration config, + QueryTimeseriesMetaRequest originRequest) { + super(instanceName, client, crdsProvider, config, originRequest); + Preconditions.checkNotNull(uri); + Preconditions.checkNotNull(tracer); + Preconditions.checkNotNull(retry); + + this.uri = uri; + this.tracer = tracer; + this.retry = retry; + } + + @Override + public void fire(QueryTimeseriesMetaRequest request, FutureCallback cb) { + LogUtil.logBeforeExecution(tracer, retry); + + Timeseries.QueryTimeseriesMetaResponse defaultResponse = + Timeseries.QueryTimeseriesMetaResponse.getDefaultInstance(); + asyncInvokePost( + uri, + null, + TimeseriesProtocolBuilder.buildQueryTimeseriesMetaRequest(request), + tracer, + new QueryTimeseriesMetaResponseConsumer( + ResultParserFactory.createFactory().createProtocolBufferResultParser( + defaultResponse, tracer.getTraceId()), + tracer, retry, lastResult), + cb); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/ResourceManager.java b/src/main/java/com/alicloud/openservices/tablestore/core/ResourceManager.java new file mode 100644 index 0000000..70af344 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/ResourceManager.java @@ -0,0 +1,68 @@ +package com.alicloud.openservices.tablestore.core; + +import com.alicloud.openservices.tablestore.ClientConfiguration; + +import java.util.concurrent.ExecutorService; + +public class ResourceManager { + + private final ClientResources resources; + private final boolean owned; + private final ResourceManager sharedInstance; + + /** + * create a resource manager which creates and owns resources. + * @param configuration + */ + public ResourceManager(ClientConfiguration configuration) { + this(configuration, null); + } + + /** + * create a resource manager which creates and owns resources. + * @param configuration + * @param callbackExecutor + */ + public ResourceManager(ClientConfiguration configuration, ExecutorService callbackExecutor) { + if (configuration == null) { + configuration = new ClientConfiguration(); + } + this.resources = new ClientResources(configuration, callbackExecutor); + this.owned = true; + + // pre-create a shared resource manager + this.sharedInstance = new ResourceManager(this.resources); + } + + /** + * create a resource manager which shares other manager's resources. + * @param resources + */ + public ResourceManager(ClientResources resources) { + this.resources = resources; + this.owned = false; + this.sharedInstance = null; + } + + /** + * get a shared resource manager + * @return + */ + public ResourceManager sharedResourceManager() { + if (!owned) { + return this; + } + return sharedInstance; + } + + public ClientResources getResources() { + return this.resources; + } + + public void shutdown() { + if (owned) { + resources.shutdown(); + } + } + +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/SQLQueryLauncher.java b/src/main/java/com/alicloud/openservices/tablestore/core/SQLQueryLauncher.java new file mode 100644 index 0000000..9178e64 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/SQLQueryLauncher.java @@ -0,0 +1,62 @@ +package com.alicloud.openservices.tablestore.core; + +import com.alicloud.openservices.tablestore.core.auth.CredentialsProvider; +import com.alicloud.openservices.tablestore.core.http.SQLQueryResponseConsumer; +import org.apache.http.concurrent.FutureCallback; + +import com.alicloud.openservices.tablestore.ClientConfiguration; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.alicloud.openservices.tablestore.core.utils.LogUtil; +import com.alicloud.openservices.tablestore.core.http.OTSUri; +import com.alicloud.openservices.tablestore.core.http.AsyncServiceClient; +import com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi; +import com.alicloud.openservices.tablestore.core.protocol.OTSProtocolBuilder; +import com.alicloud.openservices.tablestore.core.protocol.ResultParserFactory; +import com.alicloud.openservices.tablestore.model.RetryStrategy; +import com.alicloud.openservices.tablestore.model.sql.SQLQueryRequest; +import com.alicloud.openservices.tablestore.model.sql.SQLQueryResponse; + +public class SQLQueryLauncher extends OperationLauncher { + private OTSUri uri; + private TraceLogger tracer; + private RetryStrategy retry; + + public SQLQueryLauncher( + OTSUri uri, + TraceLogger tracer, + RetryStrategy retry, + String instanceName, + AsyncServiceClient client, + CredentialsProvider crdsProvider, + ClientConfiguration config, + SQLQueryRequest originRequest) + { + super(instanceName, client, crdsProvider, config, originRequest); + + Preconditions.checkNotNull(uri); + Preconditions.checkNotNull(tracer); + Preconditions.checkNotNull(retry); + + this.uri = uri; + this.tracer = tracer; + this.retry = retry; + } + + @Override + public void fire(SQLQueryRequest req, FutureCallback cb) { + LogUtil.logBeforeExecution(tracer, retry); + + OtsInternalApi.SQLQueryResponse defaultResponse = + OtsInternalApi.SQLQueryResponse.getDefaultInstance(); + asyncInvokePost( + uri, + null, + OTSProtocolBuilder.buildSQLQueryRequest(req), + tracer, + new SQLQueryResponseConsumer( + ResultParserFactory.createFactory().createProtocolBufferResultParser( + defaultResponse, tracer.getTraceId()), + tracer, retry, lastResult), + cb); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/TraceLogger.java b/src/main/java/com/alicloud/openservices/tablestore/core/TraceLogger.java index 359461f..b88fe48 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/core/TraceLogger.java +++ b/src/main/java/com/alicloud/openservices/tablestore/core/TraceLogger.java @@ -8,7 +8,7 @@ import com.alicloud.openservices.tablestore.core.utils.LogUtil; public class TraceLogger { - private String traceId; + private final String traceId; private List> eventTimeRecord; private List> requestInfoRecord; private static Logger logger = LoggerFactory.getLogger(TraceLogger.class); diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/UpdateSearchIndexLauncher.java b/src/main/java/com/alicloud/openservices/tablestore/core/UpdateSearchIndexLauncher.java new file mode 100644 index 0000000..1119dfb --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/UpdateSearchIndexLauncher.java @@ -0,0 +1,63 @@ +package com.alicloud.openservices.tablestore.core; + +import com.alicloud.openservices.tablestore.ClientConfiguration; +import com.alicloud.openservices.tablestore.core.auth.CredentialsProvider; +import com.alicloud.openservices.tablestore.core.http.AsyncServiceClient; +import com.alicloud.openservices.tablestore.core.http.OTSUri; +import com.alicloud.openservices.tablestore.core.http.UpdateSearchIndexResponseConsumer; +import com.alicloud.openservices.tablestore.core.protocol.ResultParserFactory; +import com.alicloud.openservices.tablestore.core.protocol.Search; +import com.alicloud.openservices.tablestore.core.protocol.SearchProtocolBuilder; +import com.alicloud.openservices.tablestore.core.utils.LogUtil; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.alicloud.openservices.tablestore.model.RetryStrategy; +import com.alicloud.openservices.tablestore.model.search.UpdateSearchIndexRequest; +import com.alicloud.openservices.tablestore.model.search.UpdateSearchIndexResponse; +import org.apache.http.concurrent.FutureCallback; + +public class UpdateSearchIndexLauncher + extends OperationLauncher { + + private OTSUri uri; + private TraceLogger tracer; + private RetryStrategy retry; + + public UpdateSearchIndexLauncher( + OTSUri uri, + TraceLogger tracer, + RetryStrategy retry, + String instanceName, + AsyncServiceClient client, + CredentialsProvider crdsProvider, + ClientConfiguration config, + UpdateSearchIndexRequest originRequest) + { + super(instanceName, client, crdsProvider, config, originRequest); + + Preconditions.checkNotNull(uri); + Preconditions.checkNotNull(tracer); + Preconditions.checkNotNull(retry); + + this.uri = uri; + this.tracer = tracer; + this.retry = retry; + } + + @Override + public void fire(UpdateSearchIndexRequest request, FutureCallback cb) { + LogUtil.logBeforeExecution(tracer, retry); + + Search.UpdateSearchIndexResponse defaultResponse = + Search.UpdateSearchIndexResponse.getDefaultInstance(); + asyncInvokePost( + uri, + null, + SearchProtocolBuilder.buildUpdateSearchIndexRequest(request), + tracer, + new UpdateSearchIndexResponseConsumer( + ResultParserFactory.createFactory().createProtocolBufferResultParser( + defaultResponse, tracer.getTraceId()), + tracer, retry, lastResult), + cb); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/UpdateTimeseriesMetaLauncher.java b/src/main/java/com/alicloud/openservices/tablestore/core/UpdateTimeseriesMetaLauncher.java new file mode 100644 index 0000000..07d4383 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/UpdateTimeseriesMetaLauncher.java @@ -0,0 +1,60 @@ +package com.alicloud.openservices.tablestore.core; + +import com.alicloud.openservices.tablestore.ClientConfiguration; +import com.alicloud.openservices.tablestore.core.auth.CredentialsProvider; +import com.alicloud.openservices.tablestore.core.http.AsyncServiceClient; +import com.alicloud.openservices.tablestore.core.http.OTSUri; +import com.alicloud.openservices.tablestore.core.http.UpdateTimeseriesMetaResponseConsumer; +import com.alicloud.openservices.tablestore.core.protocol.ResultParserFactory; +import com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries; +import com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesProtocolBuilder; +import com.alicloud.openservices.tablestore.core.utils.LogUtil; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.alicloud.openservices.tablestore.model.RetryStrategy; +import com.alicloud.openservices.tablestore.model.timeseries.UpdateTimeseriesMetaRequest; +import com.alicloud.openservices.tablestore.model.timeseries.UpdateTimeseriesMetaResponse; +import org.apache.http.concurrent.FutureCallback; + +public class UpdateTimeseriesMetaLauncher extends OperationLauncher { + + private OTSUri uri; + private TraceLogger tracer; + private RetryStrategy retry; + + public UpdateTimeseriesMetaLauncher( + OTSUri uri, + TraceLogger tracer, + RetryStrategy retry, + String instanceName, + AsyncServiceClient client, + CredentialsProvider crdsProvider, + ClientConfiguration config, + UpdateTimeseriesMetaRequest originRequest) { + super(instanceName, client, crdsProvider, config, originRequest); + Preconditions.checkNotNull(uri); + Preconditions.checkNotNull(tracer); + Preconditions.checkNotNull(retry); + + this.uri = uri; + this.tracer = tracer; + this.retry = retry; + } + + @Override + public void fire(UpdateTimeseriesMetaRequest request, FutureCallback cb) { + LogUtil.logBeforeExecution(tracer, retry); + + Timeseries.UpdateTimeseriesMetaResponse defaultResponse = + Timeseries.UpdateTimeseriesMetaResponse.getDefaultInstance(); + asyncInvokePost( + uri, + null, + TimeseriesProtocolBuilder.buildUpdateTimeseriesMetaRequest(request), + tracer, + new UpdateTimeseriesMetaResponseConsumer( + ResultParserFactory.createFactory().createProtocolBufferResultParser( + defaultResponse, tracer.getTraceId()), + tracer, retry, lastResult), + cb); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/UpdateTimeseriesTableLauncher.java b/src/main/java/com/alicloud/openservices/tablestore/core/UpdateTimeseriesTableLauncher.java new file mode 100644 index 0000000..cedd958 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/UpdateTimeseriesTableLauncher.java @@ -0,0 +1,60 @@ +package com.alicloud.openservices.tablestore.core; + +import com.alicloud.openservices.tablestore.ClientConfiguration; +import com.alicloud.openservices.tablestore.core.auth.CredentialsProvider; +import com.alicloud.openservices.tablestore.core.http.AsyncServiceClient; +import com.alicloud.openservices.tablestore.core.http.OTSUri; +import com.alicloud.openservices.tablestore.core.http.UpdateTimeseriesTableResponseConsumer; +import com.alicloud.openservices.tablestore.core.protocol.ResultParserFactory; +import com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries; +import com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesProtocolBuilder; +import com.alicloud.openservices.tablestore.core.utils.LogUtil; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.alicloud.openservices.tablestore.model.RetryStrategy; +import com.alicloud.openservices.tablestore.model.timeseries.UpdateTimeseriesTableRequest; +import com.alicloud.openservices.tablestore.model.timeseries.UpdateTimeseriesTableResponse; +import org.apache.http.concurrent.FutureCallback; + +public class UpdateTimeseriesTableLauncher extends OperationLauncher { + + private OTSUri uri; + private TraceLogger tracer; + private RetryStrategy retry; + + public UpdateTimeseriesTableLauncher( + OTSUri uri, + TraceLogger tracer, + RetryStrategy retry, + String instanceName, + AsyncServiceClient client, + CredentialsProvider crdsProvider, + ClientConfiguration config, + UpdateTimeseriesTableRequest originRequest) { + super(instanceName, client, crdsProvider, config, originRequest); + Preconditions.checkNotNull(uri); + Preconditions.checkNotNull(tracer); + Preconditions.checkNotNull(retry); + + this.uri = uri; + this.tracer = tracer; + this.retry = retry; + } + + @Override + public void fire(UpdateTimeseriesTableRequest request, FutureCallback cb) { + LogUtil.logBeforeExecution(tracer, retry); + + Timeseries.UpdateTimeseriesTableResponse defaultResponse = + Timeseries.UpdateTimeseriesTableResponse.getDefaultInstance(); + asyncInvokePost( + uri, + null, + TimeseriesProtocolBuilder.buildUpdateTimeseriesTableRequest(request), + tracer, + new UpdateTimeseriesTableResponseConsumer( + ResultParserFactory.createFactory().createProtocolBufferResultParser( + defaultResponse, tracer.getTraceId()), + tracer, retry, lastResult), + cb); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/auth/AuthUtils.java b/src/main/java/com/alicloud/openservices/tablestore/core/auth/AuthUtils.java index 4447724..fb5e7fa 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/core/auth/AuthUtils.java +++ b/src/main/java/com/alicloud/openservices/tablestore/core/auth/AuthUtils.java @@ -19,7 +19,8 @@ package com.alicloud.openservices.tablestore.core.auth; -import java.io.*; +import com.alicloud.openservices.tablestore.core.Constants; +import com.alicloud.openservices.tablestore.core.utils.StringUtils; public class AuthUtils { @@ -84,4 +85,13 @@ public class AuthUtils { /** System property name for the TableStore session token */ public static final String SESSION_TOKEN_SYSTEM_PROPERTY = "tablestore.sessionToken"; + + /** + * Check if accessKeyId is in valid format. + * @param accessKeyId value to check + * @return true if it is valid, else false. + */ + public static boolean checkAccessKeyIdFormat(String accessKeyId) { + return StringUtils.matchRegexPattern(Constants.ACCESSKEYID_REGEX, accessKeyId); + } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/auth/DefaultCredentialProvider.java b/src/main/java/com/alicloud/openservices/tablestore/core/auth/DefaultCredentialProvider.java index 2f29af2..d1a100f 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/core/auth/DefaultCredentialProvider.java +++ b/src/main/java/com/alicloud/openservices/tablestore/core/auth/DefaultCredentialProvider.java @@ -19,6 +19,9 @@ package com.alicloud.openservices.tablestore.core.auth; +import com.alicloud.openservices.tablestore.core.utils.HttpUtil; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; + /** * Default implementation of {@link CredentialsProvider}. */ @@ -66,6 +69,8 @@ private static void checkCredentials(String accessKeyId, String secretAccessKey) if (secretAccessKey == null || secretAccessKey.equals("")) { throw new InvalidCredentialsException("Access key secret should not be null or empty."); } + + Preconditions.checkArgument(AuthUtils.checkAccessKeyIdFormat(accessKeyId), "The access key id is invalid: " + accessKeyId); } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/auth/DefaultCredentials.java b/src/main/java/com/alicloud/openservices/tablestore/core/auth/DefaultCredentials.java index f80dfa5..b8ea9f2 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/core/auth/DefaultCredentials.java +++ b/src/main/java/com/alicloud/openservices/tablestore/core/auth/DefaultCredentials.java @@ -19,6 +19,8 @@ package com.alicloud.openservices.tablestore.core.auth; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; + /** * Default implementation of {@link ServiceCredentials}. */ @@ -33,6 +35,8 @@ public DefaultCredentials(String accessKeyId, String secretAccessKey) { } public DefaultCredentials(String accessKeyId, String secretAccessKey, String securityToken) { + Preconditions.checkArgument(AuthUtils.checkAccessKeyIdFormat(accessKeyId), "The access key id is not in valid format: " + accessKeyId); + if (accessKeyId == null || accessKeyId.equals("")) { throw new InvalidCredentialsException("Access key id should not be null or empty."); } diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/auth/EnvironmentVariableCredentialsProvider.java b/src/main/java/com/alicloud/openservices/tablestore/core/auth/EnvironmentVariableCredentialsProvider.java index acc9918..18abfd3 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/core/auth/EnvironmentVariableCredentialsProvider.java +++ b/src/main/java/com/alicloud/openservices/tablestore/core/auth/EnvironmentVariableCredentialsProvider.java @@ -19,6 +19,8 @@ package com.alicloud.openservices.tablestore.core.auth; +import com.alicloud.openservices.tablestore.core.utils.HttpUtil; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; import com.alicloud.openservices.tablestore.core.utils.StringUtils; /** @@ -45,6 +47,8 @@ public ServiceCredentials getCredentials() { if (secretAccessKey == null || secretAccessKey.equals("")) { throw new InvalidCredentialsException("Secret access key should not be null or empty."); } + + Preconditions.checkArgument(AuthUtils.checkAccessKeyIdFormat(accessKeyId), "The access key id is invalid: " + accessKeyId); return new DefaultCredentials(accessKeyId, secretAccessKey, sessionToken); } diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/auth/SystemPropertiesCredentialsProvider.java b/src/main/java/com/alicloud/openservices/tablestore/core/auth/SystemPropertiesCredentialsProvider.java index b4c60e0..b0d0c96 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/core/auth/SystemPropertiesCredentialsProvider.java +++ b/src/main/java/com/alicloud/openservices/tablestore/core/auth/SystemPropertiesCredentialsProvider.java @@ -19,6 +19,8 @@ package com.alicloud.openservices.tablestore.core.auth; +import com.alicloud.openservices.tablestore.core.utils.HttpUtil; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; import com.alicloud.openservices.tablestore.core.utils.StringUtils; /** @@ -46,6 +48,8 @@ public ServiceCredentials getCredentials() { throw new InvalidCredentialsException("Access key secret should not be null or empty."); } + Preconditions.checkArgument(AuthUtils.checkAccessKeyIdFormat(accessKeyId), "The access key id is invalid: " + accessKeyId); + return new DefaultCredentials(accessKeyId, secretAccessKey, sessionToken); } diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/http/AddDefinedColumnResponseConsumer.java b/src/main/java/com/alicloud/openservices/tablestore/core/http/AddDefinedColumnResponseConsumer.java new file mode 100644 index 0000000..964705a --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/http/AddDefinedColumnResponseConsumer.java @@ -0,0 +1,28 @@ +package com.alicloud.openservices.tablestore.core.http; + +import com.alicloud.openservices.tablestore.model.AddDefinedColumnResponse; +import com.alicloud.openservices.tablestore.model.RetryStrategy; +import com.alicloud.openservices.tablestore.core.TraceLogger; +import com.alicloud.openservices.tablestore.core.ResponseContentWithMeta; +import com.alicloud.openservices.tablestore.core.protocol.ResultParser; +import com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi; +import com.alicloud.openservices.tablestore.core.protocol.ResponseFactory; + +public class AddDefinedColumnResponseConsumer + extends ResponseConsumer { + + public AddDefinedColumnResponseConsumer( + ResultParser resultParser, TraceLogger traceLogger, + RetryStrategy retry, AddDefinedColumnResponse lastResult) { + super(resultParser, traceLogger, retry, lastResult); + } + @Override + protected AddDefinedColumnResponse parseResult() throws Exception { + ResponseContentWithMeta responseContent = getResponseContentWithMeta(); + OtsInternalApi.AddDefinedColumnResponse internalResponse = + (OtsInternalApi.AddDefinedColumnResponse) responseContent.getMessage(); + AddDefinedColumnResponse response = ResponseFactory.createAddDefinedColumnResponse( + responseContent, internalResponse); + return response; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/http/BulkExportResponseConsumer.java b/src/main/java/com/alicloud/openservices/tablestore/core/http/BulkExportResponseConsumer.java new file mode 100644 index 0000000..cd27455 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/http/BulkExportResponseConsumer.java @@ -0,0 +1,29 @@ +package com.alicloud.openservices.tablestore.core.http; + +import com.alicloud.openservices.tablestore.model.BulkExportResponse; +import com.alicloud.openservices.tablestore.model.RetryStrategy; +import com.alicloud.openservices.tablestore.core.TraceLogger; +import com.alicloud.openservices.tablestore.core.ResponseContentWithMeta; +import com.alicloud.openservices.tablestore.core.protocol.ResultParser; +import com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi; +import com.alicloud.openservices.tablestore.core.protocol.ResponseFactory; + +public class BulkExportResponseConsumer extends ResponseConsumer { + + public BulkExportResponseConsumer( + ResultParser resultParser, TraceLogger traceLogger, + RetryStrategy retry, BulkExportResponse lastResult) { + super(resultParser, traceLogger, retry, lastResult); + } + + @Override + protected BulkExportResponse parseResult() throws Exception { + ResponseContentWithMeta responseContent = getResponseContentWithMeta(); + OtsInternalApi.BulkExportResponse bulkExportResponse = + (OtsInternalApi.BulkExportResponse) responseContent.getMessage(); + BulkExportResponse result = ResponseFactory.createBulkExportResponse( + responseContent, bulkExportResponse); + return result; + } + +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/http/BulkImportResponseConsumer.java b/src/main/java/com/alicloud/openservices/tablestore/core/http/BulkImportResponseConsumer.java new file mode 100644 index 0000000..186777b --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/http/BulkImportResponseConsumer.java @@ -0,0 +1,89 @@ +package com.alicloud.openservices.tablestore.core.http; + +import com.alicloud.openservices.tablestore.PartialResultFailedException; +import com.alicloud.openservices.tablestore.TableStoreException; +import com.alicloud.openservices.tablestore.core.ResponseContentWithMeta; +import com.alicloud.openservices.tablestore.core.TraceLogger; +import com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi; +import com.alicloud.openservices.tablestore.core.protocol.ResponseFactory; +import com.alicloud.openservices.tablestore.core.protocol.ResultParser; +import com.alicloud.openservices.tablestore.core.utils.LogUtil; +import com.alicloud.openservices.tablestore.model.BatchWriteRowResponse; +import com.alicloud.openservices.tablestore.model.BulkImportResponse; +import com.alicloud.openservices.tablestore.model.Response; +import com.alicloud.openservices.tablestore.model.RetryStrategy; + +import java.util.List; +import java.util.Map; + +public class BulkImportResponseConsumer extends ResponseConsumer { + + public BulkImportResponseConsumer( + ResultParser resultParser, TraceLogger traceLogger, + RetryStrategy retry, BulkImportResponse lastResult) { + super(resultParser, traceLogger, retry, lastResult); + } + + /** + * 1.不是private方法,方便做ut. + * 2.假设getRowStatus返回的结果中index有序. + */ + BulkImportResponse mergeResult(BulkImportResponse lastResult, BulkImportResponse result) { + + Response meta = new Response(result.getRequestId()); + meta.setTraceId(this.traceLogger.getTraceId()); + BulkImportResponse mergedResult = new BulkImportResponse(meta); + + List lastRowResultList = lastResult.getRowResults(); + List rowResultList = result.getRowResults(); + int idx = 0; + for (BulkImportResponse.RowResult lastRowResult : lastRowResultList) { + if (lastRowResult.isSucceed()) { + mergedResult.addRowResult(lastRowResult); + } else { + BulkImportResponse.RowResult rowResult = rowResultList.get(idx); + idx++; + if (rowResult.isSucceed()) { + mergedResult.addRowResult(new BulkImportResponse.RowResult( + rowResult.getConsumedCapacity(), lastRowResult.getIndex())); + } else { + mergedResult.addRowResult(new BulkImportResponse.RowResult( + rowResult.getError(), lastRowResult.getIndex())); + } + } + } + return mergedResult; + } + + @Override + protected BulkImportResponse parseResult() throws Exception { + ResponseContentWithMeta responseContent = getResponseContentWithMeta(); + OtsInternalApi.BulkImportResponse bulkImportResponse = + (OtsInternalApi.BulkImportResponse) responseContent.getMessage(); + BulkImportResponse result = ResponseFactory.createBulkImportResponse( + responseContent, bulkImportResponse); + + if (lastResult != null) { + result = mergeResult(lastResult, result); + } + + List failedRows = result.getFailedRows(); + if (failedRows.isEmpty()) { + return result; + } else { + PartialResultFailedException partialEx = new PartialResultFailedException(null, result.getRequestId(), result); + /** + * 部分失败时记录log信息 + */ + for (BulkImportResponse.RowResult rowResult : failedRows) { + TableStoreException ex = new TableStoreException(rowResult.getError().getMessage(), null, rowResult.getError().getCode(), + result.getRequestId(), 0); + partialEx.addError(ex); + LogUtil.logOnFailed(traceLogger, retry, ex, result.getRequestId()); + } + + throw partialEx; + } + } + +} \ No newline at end of file diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/http/ComputeSplitsResponseConsumer.java b/src/main/java/com/alicloud/openservices/tablestore/core/http/ComputeSplitsResponseConsumer.java new file mode 100755 index 0000000..53c61be --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/http/ComputeSplitsResponseConsumer.java @@ -0,0 +1,23 @@ +package com.alicloud.openservices.tablestore.core.http; + +import com.alicloud.openservices.tablestore.core.ResponseContentWithMeta; +import com.alicloud.openservices.tablestore.core.TraceLogger; +import com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi; +import com.alicloud.openservices.tablestore.core.protocol.ResponseFactory; +import com.alicloud.openservices.tablestore.core.protocol.ResultParser; +import com.alicloud.openservices.tablestore.model.ComputeSplitsResponse; +import com.alicloud.openservices.tablestore.model.RetryStrategy; + +public class ComputeSplitsResponseConsumer extends ResponseConsumer { + + public ComputeSplitsResponseConsumer(ResultParser resultParser, TraceLogger traceLogger, RetryStrategy retry, ComputeSplitsResponse lastResult) { + super(resultParser, traceLogger, retry, lastResult); + } + + @Override + protected ComputeSplitsResponse parseResult() throws Exception { + ResponseContentWithMeta responseContent = getResponseContentWithMeta(); + OtsInternalApi.ComputeSplitsResponse internalResponse = (OtsInternalApi.ComputeSplitsResponse) responseContent.getMessage(); + return ResponseFactory.createComputeSplitsResponse(responseContent, internalResponse); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/http/ContentMD5ResponseHandler.java b/src/main/java/com/alicloud/openservices/tablestore/core/http/ContentMD5ResponseHandler.java index 0715cb7..dbe2252 100755 --- a/src/main/java/com/alicloud/openservices/tablestore/core/http/ContentMD5ResponseHandler.java +++ b/src/main/java/com/alicloud/openservices/tablestore/core/http/ContentMD5ResponseHandler.java @@ -14,7 +14,7 @@ public class ContentMD5ResponseHandler implements ResponseHandler { public void handle(ResponseMessage responseData) throws ClientException { - Map headers = responseData.getHeadersMap(); + Map headers = responseData.getLowerCaseHeadersMap(); // 验证头信息完整性 String contentMd5 = headers.get(Constants.OTS_HEADER_OTS_CONTENT_MD5); diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/http/CreateDeliveryTaskResponseConsumer.java b/src/main/java/com/alicloud/openservices/tablestore/core/http/CreateDeliveryTaskResponseConsumer.java new file mode 100644 index 0000000..09a0d42 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/http/CreateDeliveryTaskResponseConsumer.java @@ -0,0 +1,29 @@ +package com.alicloud.openservices.tablestore.core.http; + +import com.alicloud.openservices.tablestore.core.ResponseContentWithMeta; +import com.alicloud.openservices.tablestore.core.TraceLogger; +import com.alicloud.openservices.tablestore.core.protocol.OtsDelivery; +import com.alicloud.openservices.tablestore.core.protocol.ResponseFactory; +import com.alicloud.openservices.tablestore.core.protocol.ResultParser; +import com.alicloud.openservices.tablestore.model.delivery.CreateDeliveryTaskResponse; +import com.alicloud.openservices.tablestore.model.RetryStrategy; + +public class CreateDeliveryTaskResponseConsumer + extends ResponseConsumer { + + public CreateDeliveryTaskResponseConsumer( + ResultParser resultParser, TraceLogger traceLogger, + RetryStrategy retry, CreateDeliveryTaskResponse lastResult) { + super(resultParser, traceLogger, retry, lastResult); + } + + @Override + protected CreateDeliveryTaskResponse parseResult() throws Exception { + ResponseContentWithMeta responseContent = getResponseContentWithMeta(); + OtsDelivery.CreateDeliveryTaskResponse internalResponse = + (OtsDelivery.CreateDeliveryTaskResponse) responseContent.getMessage(); + CreateDeliveryTaskResponse response = ResponseFactory.createDeliveryTaskResponse( + responseContent, internalResponse); + return response; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/http/CreateTimeseriesTableResponseConsumer.java b/src/main/java/com/alicloud/openservices/tablestore/core/http/CreateTimeseriesTableResponseConsumer.java new file mode 100644 index 0000000..ad1b0da --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/http/CreateTimeseriesTableResponseConsumer.java @@ -0,0 +1,26 @@ +package com.alicloud.openservices.tablestore.core.http; + +import com.alicloud.openservices.tablestore.core.ResponseContentWithMeta; +import com.alicloud.openservices.tablestore.core.TraceLogger; +import com.alicloud.openservices.tablestore.core.protocol.ResultParser; +import com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries; +import com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesResponseFactory; +import com.alicloud.openservices.tablestore.model.RetryStrategy; +import com.alicloud.openservices.tablestore.model.timeseries.CreateTimeseriesTableResponse; + +public class CreateTimeseriesTableResponseConsumer extends ResponseConsumer { + + public CreateTimeseriesTableResponseConsumer(ResultParser resultParser, TraceLogger traceLogger, RetryStrategy retry, CreateTimeseriesTableResponse lastResult) { + super(resultParser, traceLogger, retry, lastResult); + } + + @Override + protected CreateTimeseriesTableResponse parseResult() throws Exception { + ResponseContentWithMeta responseContent = getResponseContentWithMeta(); + Timeseries.CreateTimeseriesTableResponse response = + (Timeseries.CreateTimeseriesTableResponse) responseContent.getMessage(); + CreateTimeseriesTableResponse result = TimeseriesResponseFactory.createCreateTimeseriesTableResponse( + responseContent, response); + return result; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/http/DeleteDefinedColumnResponseConsumer.java b/src/main/java/com/alicloud/openservices/tablestore/core/http/DeleteDefinedColumnResponseConsumer.java new file mode 100644 index 0000000..a65cb87 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/http/DeleteDefinedColumnResponseConsumer.java @@ -0,0 +1,28 @@ +package com.alicloud.openservices.tablestore.core.http; + +import com.alicloud.openservices.tablestore.model.DeleteDefinedColumnResponse; +import com.alicloud.openservices.tablestore.model.RetryStrategy; +import com.alicloud.openservices.tablestore.core.TraceLogger; +import com.alicloud.openservices.tablestore.core.ResponseContentWithMeta; +import com.alicloud.openservices.tablestore.core.protocol.ResultParser; +import com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi; +import com.alicloud.openservices.tablestore.core.protocol.ResponseFactory; + +public class DeleteDefinedColumnResponseConsumer + extends ResponseConsumer { + + public DeleteDefinedColumnResponseConsumer( + ResultParser resultParser, TraceLogger traceLogger, + RetryStrategy retry, DeleteDefinedColumnResponse lastResult) { + super(resultParser, traceLogger, retry, lastResult); + } + @Override + protected DeleteDefinedColumnResponse parseResult() throws Exception { + ResponseContentWithMeta responseContent = getResponseContentWithMeta(); + OtsInternalApi.DeleteDefinedColumnResponse internalResponse = + (OtsInternalApi.DeleteDefinedColumnResponse) responseContent.getMessage(); + DeleteDefinedColumnResponse response = ResponseFactory.createDeleteDefinedColumnResponse( + responseContent, internalResponse); + return response; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/http/DeleteDeliveryTaskResponseConsumer.java b/src/main/java/com/alicloud/openservices/tablestore/core/http/DeleteDeliveryTaskResponseConsumer.java new file mode 100644 index 0000000..975a367 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/http/DeleteDeliveryTaskResponseConsumer.java @@ -0,0 +1,29 @@ +package com.alicloud.openservices.tablestore.core.http; + +import com.alicloud.openservices.tablestore.core.ResponseContentWithMeta; +import com.alicloud.openservices.tablestore.core.TraceLogger; +import com.alicloud.openservices.tablestore.core.protocol.OtsDelivery; +import com.alicloud.openservices.tablestore.core.protocol.ResponseFactory; +import com.alicloud.openservices.tablestore.core.protocol.ResultParser; +import com.alicloud.openservices.tablestore.model.delivery.DeleteDeliveryTaskResponse; +import com.alicloud.openservices.tablestore.model.RetryStrategy; + +public class DeleteDeliveryTaskResponseConsumer + extends ResponseConsumer { + + public DeleteDeliveryTaskResponseConsumer( + ResultParser resultParser, TraceLogger traceLogger, + RetryStrategy retry, DeleteDeliveryTaskResponse lastResult) { + super(resultParser, traceLogger, retry, lastResult); + } + + @Override + protected DeleteDeliveryTaskResponse parseResult() throws Exception { + ResponseContentWithMeta responseContent = getResponseContentWithMeta(); + OtsDelivery.DeleteDeliveryTaskResponse internalResponse = + (OtsDelivery.DeleteDeliveryTaskResponse) responseContent.getMessage(); + DeleteDeliveryTaskResponse response = ResponseFactory.deleteDeliveryTaskResponse( + responseContent, internalResponse); + return response; + } +} \ No newline at end of file diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/http/DeleteTimeseriesMetaResponseConsumer.java b/src/main/java/com/alicloud/openservices/tablestore/core/http/DeleteTimeseriesMetaResponseConsumer.java new file mode 100644 index 0000000..2354fcd --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/http/DeleteTimeseriesMetaResponseConsumer.java @@ -0,0 +1,26 @@ +package com.alicloud.openservices.tablestore.core.http; + +import com.alicloud.openservices.tablestore.core.ResponseContentWithMeta; +import com.alicloud.openservices.tablestore.core.TraceLogger; +import com.alicloud.openservices.tablestore.core.protocol.ResultParser; +import com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries; +import com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesResponseFactory; +import com.alicloud.openservices.tablestore.model.RetryStrategy; +import com.alicloud.openservices.tablestore.model.timeseries.DeleteTimeseriesMetaResponse; + +public class DeleteTimeseriesMetaResponseConsumer extends ResponseConsumer { + + public DeleteTimeseriesMetaResponseConsumer(ResultParser resultParser, TraceLogger traceLogger, RetryStrategy retry, DeleteTimeseriesMetaResponse lastResult) { + super(resultParser, traceLogger, retry, lastResult); + } + + @Override + protected DeleteTimeseriesMetaResponse parseResult() throws Exception { + ResponseContentWithMeta responseContent = getResponseContentWithMeta(); + Timeseries.DeleteTimeseriesMetaResponse response = + (Timeseries.DeleteTimeseriesMetaResponse) responseContent.getMessage(); + DeleteTimeseriesMetaResponse result = TimeseriesResponseFactory.createDeleteTimeseriesMetaResponse( + responseContent, response); + return result; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/http/DeleteTimeseriesTableResponseConsumer.java b/src/main/java/com/alicloud/openservices/tablestore/core/http/DeleteTimeseriesTableResponseConsumer.java new file mode 100644 index 0000000..9192d63 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/http/DeleteTimeseriesTableResponseConsumer.java @@ -0,0 +1,26 @@ +package com.alicloud.openservices.tablestore.core.http; + +import com.alicloud.openservices.tablestore.core.ResponseContentWithMeta; +import com.alicloud.openservices.tablestore.core.TraceLogger; +import com.alicloud.openservices.tablestore.core.protocol.ResultParser; +import com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries; +import com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesResponseFactory; +import com.alicloud.openservices.tablestore.model.RetryStrategy; +import com.alicloud.openservices.tablestore.model.timeseries.DeleteTimeseriesTableResponse; + +public class DeleteTimeseriesTableResponseConsumer extends ResponseConsumer { + + public DeleteTimeseriesTableResponseConsumer(ResultParser resultParser, TraceLogger traceLogger, RetryStrategy retry, DeleteTimeseriesTableResponse lastResult) { + super(resultParser, traceLogger, retry, lastResult); + } + + @Override + protected DeleteTimeseriesTableResponse parseResult() throws Exception { + ResponseContentWithMeta responseContent = getResponseContentWithMeta(); + Timeseries.DeleteTimeseriesTableResponse response = + (Timeseries.DeleteTimeseriesTableResponse) responseContent.getMessage(); + DeleteTimeseriesTableResponse result = TimeseriesResponseFactory.createDeleteTimeseriesTableResponse( + responseContent, response); + return result; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/http/DescribeDeliveryTaskResponseConsumer.java b/src/main/java/com/alicloud/openservices/tablestore/core/http/DescribeDeliveryTaskResponseConsumer.java new file mode 100644 index 0000000..8ac6e88 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/http/DescribeDeliveryTaskResponseConsumer.java @@ -0,0 +1,29 @@ +package com.alicloud.openservices.tablestore.core.http; + +import com.alicloud.openservices.tablestore.core.ResponseContentWithMeta; +import com.alicloud.openservices.tablestore.core.TraceLogger; +import com.alicloud.openservices.tablestore.core.protocol.OtsDelivery; +import com.alicloud.openservices.tablestore.core.protocol.ResponseFactory; +import com.alicloud.openservices.tablestore.core.protocol.ResultParser; +import com.alicloud.openservices.tablestore.model.delivery.DescribeDeliveryTaskResponse; +import com.alicloud.openservices.tablestore.model.RetryStrategy; + +public class DescribeDeliveryTaskResponseConsumer + extends ResponseConsumer { + + public DescribeDeliveryTaskResponseConsumer( + ResultParser resultParser, TraceLogger traceLogger, + RetryStrategy retry, DescribeDeliveryTaskResponse lastResult) { + super(resultParser, traceLogger, retry, lastResult); + } + + @Override + protected DescribeDeliveryTaskResponse parseResult() throws Exception { + ResponseContentWithMeta responseContent = getResponseContentWithMeta(); + OtsDelivery.DescribeDeliveryTaskResponse internalResponse = + (OtsDelivery.DescribeDeliveryTaskResponse) responseContent.getMessage(); + DescribeDeliveryTaskResponse response = ResponseFactory.describeDeliveryTaskResponse( + responseContent, internalResponse); + return response; + } + } \ No newline at end of file diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/http/DescribeTimeseriesTableResponseConsumer.java b/src/main/java/com/alicloud/openservices/tablestore/core/http/DescribeTimeseriesTableResponseConsumer.java new file mode 100644 index 0000000..f440ac7 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/http/DescribeTimeseriesTableResponseConsumer.java @@ -0,0 +1,26 @@ +package com.alicloud.openservices.tablestore.core.http; + +import com.alicloud.openservices.tablestore.core.ResponseContentWithMeta; +import com.alicloud.openservices.tablestore.core.TraceLogger; +import com.alicloud.openservices.tablestore.core.protocol.ResultParser; +import com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries; +import com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesResponseFactory; +import com.alicloud.openservices.tablestore.model.RetryStrategy; +import com.alicloud.openservices.tablestore.model.timeseries.DescribeTimeseriesTableResponse; + +public class DescribeTimeseriesTableResponseConsumer extends ResponseConsumer { + + public DescribeTimeseriesTableResponseConsumer(ResultParser resultParser, TraceLogger traceLogger, RetryStrategy retry, DescribeTimeseriesTableResponse lastResult) { + super(resultParser, traceLogger, retry, lastResult); + } + + @Override + protected DescribeTimeseriesTableResponse parseResult() throws Exception { + ResponseContentWithMeta responseContent = getResponseContentWithMeta(); + Timeseries.DescribeTimeseriesTableResponse response = + (Timeseries.DescribeTimeseriesTableResponse) responseContent.getMessage(); + DescribeTimeseriesTableResponse result = TimeseriesResponseFactory.createDescribeTimeseriesTableResponse( + responseContent, response); + return result; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/http/ErrorResponseHandler.java b/src/main/java/com/alicloud/openservices/tablestore/core/http/ErrorResponseHandler.java index 2dd3270..8901b9e 100755 --- a/src/main/java/com/alicloud/openservices/tablestore/core/http/ErrorResponseHandler.java +++ b/src/main/java/com/alicloud/openservices/tablestore/core/http/ErrorResponseHandler.java @@ -21,7 +21,7 @@ public void handle(ResponseMessage responseData) throws TableStoreException, Cli return; } - Map headers = responseData.getHeadersMap(); + Map headers = responseData.getLowerCaseHeadersMap(); int httpStatus = responseData.getStatusCode(); if (httpStatus == Constants.OTS_HTTP_MOVED_PERMANENTLY) { diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/http/GetBulkExportResponseConsumer.java b/src/main/java/com/alicloud/openservices/tablestore/core/http/GetBulkExportResponseConsumer.java new file mode 100644 index 0000000..33783ff --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/http/GetBulkExportResponseConsumer.java @@ -0,0 +1,30 @@ +package com.alicloud.openservices.tablestore.core.http; + +import com.alicloud.openservices.tablestore.model.BulkExportResponse; +import com.alicloud.openservices.tablestore.model.GetRangeResponse; +import com.alicloud.openservices.tablestore.model.RetryStrategy; +import com.alicloud.openservices.tablestore.core.TraceLogger; +import com.alicloud.openservices.tablestore.core.ResponseContentWithMeta; +import com.alicloud.openservices.tablestore.core.protocol.ResultParser; +import com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi; +import com.alicloud.openservices.tablestore.core.protocol.ResponseFactory; + +public class GetBulkExportResponseConsumer extends ResponseConsumer { + + public GetBulkExportResponseConsumer( + ResultParser resultParser, TraceLogger traceLogger, + RetryStrategy retry, BulkExportResponse lastResult) { + super(resultParser, traceLogger, retry, lastResult); + } + + @Override + protected BulkExportResponse parseResult() throws Exception { + ResponseContentWithMeta responseContent = getResponseContentWithMeta(); + OtsInternalApi.BulkExportResponse bulkExportResponse = + (OtsInternalApi.BulkExportResponse) responseContent.getMessage(); + BulkExportResponse result = ResponseFactory.createBulkExportResponse( + responseContent, bulkExportResponse); + return result; + } + +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/http/GetTimeseriesDataResponseConsumer.java b/src/main/java/com/alicloud/openservices/tablestore/core/http/GetTimeseriesDataResponseConsumer.java new file mode 100644 index 0000000..8a94a2b --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/http/GetTimeseriesDataResponseConsumer.java @@ -0,0 +1,26 @@ +package com.alicloud.openservices.tablestore.core.http; + +import com.alicloud.openservices.tablestore.core.ResponseContentWithMeta; +import com.alicloud.openservices.tablestore.core.TraceLogger; +import com.alicloud.openservices.tablestore.core.protocol.ResultParser; +import com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries; +import com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesResponseFactory; +import com.alicloud.openservices.tablestore.model.RetryStrategy; +import com.alicloud.openservices.tablestore.model.timeseries.GetTimeseriesDataResponse; + +public class GetTimeseriesDataResponseConsumer extends ResponseConsumer { + + public GetTimeseriesDataResponseConsumer(ResultParser resultParser, TraceLogger traceLogger, RetryStrategy retry, GetTimeseriesDataResponse lastResult) { + super(resultParser, traceLogger, retry, lastResult); + } + + @Override + protected GetTimeseriesDataResponse parseResult() throws Exception { + ResponseContentWithMeta responseContent = getResponseContentWithMeta(); + Timeseries.GetTimeseriesDataResponse response = + (Timeseries.GetTimeseriesDataResponse) responseContent.getMessage(); + GetTimeseriesDataResponse result = TimeseriesResponseFactory.createGetTimeseriesDataResponse( + responseContent, response); + return result; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/http/HttpFactory.java b/src/main/java/com/alicloud/openservices/tablestore/core/http/HttpFactory.java index 49f9cda..34328ac 100755 --- a/src/main/java/com/alicloud/openservices/tablestore/core/http/HttpFactory.java +++ b/src/main/java/com/alicloud/openservices/tablestore/core/http/HttpFactory.java @@ -20,10 +20,13 @@ public static CloseableHttpAsyncClient createHttpAsyncClient( ClientConfiguration config, PoolingNHttpClientConnectionManager cm) { HttpAsyncClientBuilder httpClientBuilder = HttpAsyncClients.custom(); httpClientBuilder.setConnectionManager(cm); - RequestConfig requestConfig = RequestConfig.custom() + RequestConfig.Builder requestConfigBuilder = RequestConfig.custom() .setConnectTimeout(config.getConnectionTimeoutInMillisecond()) - .setSocketTimeout(config.getSocketTimeoutInMillisecond()).build(); - httpClientBuilder.setDefaultRequestConfig(requestConfig); + .setSocketTimeout(config.getSocketTimeoutInMillisecond()); + if (config.getConnectionRequestTimeoutInMillisecond() > 0) { + requestConfigBuilder.setConnectionRequestTimeout(config.getConnectionRequestTimeoutInMillisecond()); + } + httpClientBuilder.setDefaultRequestConfig(requestConfigBuilder.build()); httpClientBuilder.setUserAgent(Constants.USER_AGENT); httpClientBuilder.disableCookieManagement(); diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/http/ListDeliveryTaskResponseConsumer.java b/src/main/java/com/alicloud/openservices/tablestore/core/http/ListDeliveryTaskResponseConsumer.java new file mode 100644 index 0000000..a00ce12 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/http/ListDeliveryTaskResponseConsumer.java @@ -0,0 +1,29 @@ +package com.alicloud.openservices.tablestore.core.http; + +import com.alicloud.openservices.tablestore.core.ResponseContentWithMeta; +import com.alicloud.openservices.tablestore.core.TraceLogger; +import com.alicloud.openservices.tablestore.core.protocol.OtsDelivery; +import com.alicloud.openservices.tablestore.core.protocol.ResponseFactory; +import com.alicloud.openservices.tablestore.core.protocol.ResultParser; +import com.alicloud.openservices.tablestore.model.delivery.ListDeliveryTaskResponse; +import com.alicloud.openservices.tablestore.model.RetryStrategy; + +public class ListDeliveryTaskResponseConsumer + extends ResponseConsumer { + + public ListDeliveryTaskResponseConsumer( + ResultParser resultParser, TraceLogger traceLogger, + RetryStrategy retry, ListDeliveryTaskResponse lastResult) { + super(resultParser, traceLogger, retry, lastResult); + } + + @Override + protected ListDeliveryTaskResponse parseResult() throws Exception { + ResponseContentWithMeta responseContent = getResponseContentWithMeta(); + OtsDelivery.ListDeliveryTaskResponse internalResponse = + (OtsDelivery.ListDeliveryTaskResponse) responseContent.getMessage(); + ListDeliveryTaskResponse response = ResponseFactory.listDeliveryTaskResponse( + responseContent, internalResponse); + return response; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/http/ListTimeseriesTableResponseConsumer.java b/src/main/java/com/alicloud/openservices/tablestore/core/http/ListTimeseriesTableResponseConsumer.java new file mode 100644 index 0000000..7c27a42 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/http/ListTimeseriesTableResponseConsumer.java @@ -0,0 +1,26 @@ +package com.alicloud.openservices.tablestore.core.http; + +import com.alicloud.openservices.tablestore.core.ResponseContentWithMeta; +import com.alicloud.openservices.tablestore.core.TraceLogger; +import com.alicloud.openservices.tablestore.core.protocol.ResultParser; +import com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries; +import com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesResponseFactory; +import com.alicloud.openservices.tablestore.model.RetryStrategy; +import com.alicloud.openservices.tablestore.model.timeseries.ListTimeseriesTableResponse; + +public class ListTimeseriesTableResponseConsumer extends ResponseConsumer { + + public ListTimeseriesTableResponseConsumer(ResultParser resultParser, TraceLogger traceLogger, RetryStrategy retry, ListTimeseriesTableResponse lastResult) { + super(resultParser, traceLogger, retry, lastResult); + } + + @Override + protected ListTimeseriesTableResponse parseResult() throws Exception { + ResponseContentWithMeta responseContent = getResponseContentWithMeta(); + Timeseries.ListTimeseriesTableResponse response = + (Timeseries.ListTimeseriesTableResponse) responseContent.getMessage(); + ListTimeseriesTableResponse result = TimeseriesResponseFactory.createListTimeseriesTableResponse( + responseContent, response); + return result; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/http/OTSDeflateResponseHandler.java b/src/main/java/com/alicloud/openservices/tablestore/core/http/OTSDeflateResponseHandler.java index 8a72511..287a85a 100755 --- a/src/main/java/com/alicloud/openservices/tablestore/core/http/OTSDeflateResponseHandler.java +++ b/src/main/java/com/alicloud/openservices/tablestore/core/http/OTSDeflateResponseHandler.java @@ -21,7 +21,7 @@ public class OTSDeflateResponseHandler implements ResponseHandler { public void handle(ResponseMessage responseData) throws TableStoreException, ClientException { - Map header = responseData.getHeadersMap(); + Map header = responseData.getLowerCaseHeadersMap(); String compressType = header.get(Constants.OTS_HEADER_RESPONSE_COMPRESS_TYPE); if(compressType != null) { try{ diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/http/OTSUri.java b/src/main/java/com/alicloud/openservices/tablestore/core/http/OTSUri.java index eac7c38..49e5cdb 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/core/http/OTSUri.java +++ b/src/main/java/com/alicloud/openservices/tablestore/core/http/OTSUri.java @@ -3,6 +3,8 @@ import java.net.URI; import java.net.URISyntaxException; +import com.alicloud.openservices.tablestore.core.utils.HttpUtil; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; import org.apache.http.HttpHost; import org.apache.http.client.utils.URIUtils; @@ -27,6 +29,9 @@ public OTSUri(String endpoint, String action) { endpoint = endpoint.substring(0, index + 1); + // for SSRF check + Preconditions.checkArgument(HttpUtil.validateEndpointArgs(endpoint), "The endpoint is invalid: " + endpoint); + try { this.uri = new URI(endpoint + action); } catch (URISyntaxException e) { diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/http/OTSValidationResponseHandler.java b/src/main/java/com/alicloud/openservices/tablestore/core/http/OTSValidationResponseHandler.java index bd259c9..637dcbb 100755 --- a/src/main/java/com/alicloud/openservices/tablestore/core/http/OTSValidationResponseHandler.java +++ b/src/main/java/com/alicloud/openservices/tablestore/core/http/OTSValidationResponseHandler.java @@ -35,7 +35,7 @@ public OTSValidationResponseHandler(ServiceCredentials credentials, OTSUri uri){ } public void handle(ResponseMessage responseData) throws ClientException { - Map headers = responseData.getHeadersMap(); + Map headers = responseData.getLowerCaseHeadersMap(); // 验证头信息完整性 if (!headers.containsKey(OTS_HEADER_OTS_CONTENT_MD5)) { diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/http/ParallelScanResponseConsumer.java b/src/main/java/com/alicloud/openservices/tablestore/core/http/ParallelScanResponseConsumer.java new file mode 100755 index 0000000..f1cb7cb --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/http/ParallelScanResponseConsumer.java @@ -0,0 +1,23 @@ +package com.alicloud.openservices.tablestore.core.http; + +import com.alicloud.openservices.tablestore.core.ResponseContentWithMeta; +import com.alicloud.openservices.tablestore.core.TraceLogger; +import com.alicloud.openservices.tablestore.core.protocol.ResponseFactory; +import com.alicloud.openservices.tablestore.core.protocol.ResultParser; +import com.alicloud.openservices.tablestore.core.protocol.Search; +import com.alicloud.openservices.tablestore.model.RetryStrategy; +import com.alicloud.openservices.tablestore.model.search.ParallelScanResponse; + +public class ParallelScanResponseConsumer extends ResponseConsumer { + + public ParallelScanResponseConsumer(ResultParser resultParser, TraceLogger traceLogger, RetryStrategy retry, ParallelScanResponse lastResult) { + super(resultParser, traceLogger, retry, lastResult); + } + + @Override + protected ParallelScanResponse parseResult() throws Exception { + ResponseContentWithMeta responseContent = getResponseContentWithMeta(); + Search.ParallelScanResponse internalResponse = (Search.ParallelScanResponse) responseContent.getMessage(); + return ResponseFactory.createParallelScanResponse(responseContent, internalResponse); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/http/PutTimeseriesDataResponseConsumer.java b/src/main/java/com/alicloud/openservices/tablestore/core/http/PutTimeseriesDataResponseConsumer.java new file mode 100644 index 0000000..dc90113 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/http/PutTimeseriesDataResponseConsumer.java @@ -0,0 +1,35 @@ +package com.alicloud.openservices.tablestore.core.http; + +import com.alicloud.openservices.tablestore.core.ResponseContentWithMeta; +import com.alicloud.openservices.tablestore.core.TraceLogger; +import com.alicloud.openservices.tablestore.core.protocol.ResultParser; +import com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries; +import com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesResponseFactory; +import com.alicloud.openservices.tablestore.model.RetryStrategy; +import com.alicloud.openservices.tablestore.model.timeseries.PutTimeseriesDataRequest; +import com.alicloud.openservices.tablestore.model.timeseries.PutTimeseriesDataResponse; +import com.google.common.cache.Cache; + +public class PutTimeseriesDataResponseConsumer extends ResponseConsumer { + + private PutTimeseriesDataRequest request; + private Cache timeseriesMetaCache; + + public PutTimeseriesDataResponseConsumer(ResultParser resultParser, TraceLogger traceLogger, RetryStrategy retry, + PutTimeseriesDataResponse lastResult, PutTimeseriesDataRequest request, + Cache timeseriesMetaCache) { + super(resultParser, traceLogger, retry, lastResult); + this.request = request; + this.timeseriesMetaCache = timeseriesMetaCache; + } + + @Override + protected PutTimeseriesDataResponse parseResult() throws Exception { + ResponseContentWithMeta responseContent = getResponseContentWithMeta(); + Timeseries.PutTimeseriesDataResponse response = + (Timeseries.PutTimeseriesDataResponse) responseContent.getMessage(); + PutTimeseriesDataResponse result = TimeseriesResponseFactory.createPutTimeseriesDataResponse( + responseContent, response, request, timeseriesMetaCache); + return result; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/http/QueryTimeseriesMetaResponseConsumer.java b/src/main/java/com/alicloud/openservices/tablestore/core/http/QueryTimeseriesMetaResponseConsumer.java new file mode 100644 index 0000000..566f396 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/http/QueryTimeseriesMetaResponseConsumer.java @@ -0,0 +1,26 @@ +package com.alicloud.openservices.tablestore.core.http; + +import com.alicloud.openservices.tablestore.core.ResponseContentWithMeta; +import com.alicloud.openservices.tablestore.core.TraceLogger; +import com.alicloud.openservices.tablestore.core.protocol.ResultParser; +import com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries; +import com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesResponseFactory; +import com.alicloud.openservices.tablestore.model.RetryStrategy; +import com.alicloud.openservices.tablestore.model.timeseries.QueryTimeseriesMetaResponse; + +public class QueryTimeseriesMetaResponseConsumer extends ResponseConsumer { + + public QueryTimeseriesMetaResponseConsumer(ResultParser resultParser, TraceLogger traceLogger, RetryStrategy retry, QueryTimeseriesMetaResponse lastResult) { + super(resultParser, traceLogger, retry, lastResult); + } + + @Override + protected QueryTimeseriesMetaResponse parseResult() throws Exception { + ResponseContentWithMeta responseContent = getResponseContentWithMeta(); + Timeseries.QueryTimeseriesMetaResponse response = + (Timeseries.QueryTimeseriesMetaResponse) responseContent.getMessage(); + QueryTimeseriesMetaResponse result = TimeseriesResponseFactory.createQueryTimeseriesMetaResponse( + responseContent, response); + return result; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/http/ResponseMessage.java b/src/main/java/com/alicloud/openservices/tablestore/core/http/ResponseMessage.java index 83a585d..1275aaf 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/core/http/ResponseMessage.java +++ b/src/main/java/com/alicloud/openservices/tablestore/core/http/ResponseMessage.java @@ -10,7 +10,7 @@ public class ResponseMessage { private HttpResponse response; - private Map headers; + private Map lowerCaseHeaders; private static final int HTTP_SUCCESS_STATUS_CODE = 200; @@ -25,12 +25,12 @@ public int getStatusCode() { public String getHeader(String header) { initHeaderMap(); - return headers.get(header); + return lowerCaseHeaders.get(header.toLowerCase()); } - public Map getHeadersMap() { + public Map getLowerCaseHeadersMap() { initHeaderMap(); - return headers; + return lowerCaseHeaders; } public HttpResponse getResponse() { @@ -38,10 +38,10 @@ public HttpResponse getResponse() { } private void initHeaderMap() { - if (headers == null) { - headers = new HashMap(response.getAllHeaders().length); + if (lowerCaseHeaders == null) { + lowerCaseHeaders = new HashMap(response.getAllHeaders().length); for (Header header : response.getAllHeaders()) { - headers.put(header.getName(), header.getValue()); + lowerCaseHeaders.put(header.getName().toLowerCase(), header.getValue()); } } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/http/SQLQueryResponseConsumer.java b/src/main/java/com/alicloud/openservices/tablestore/core/http/SQLQueryResponseConsumer.java new file mode 100644 index 0000000..ff62456 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/http/SQLQueryResponseConsumer.java @@ -0,0 +1,22 @@ +package com.alicloud.openservices.tablestore.core.http; + +import com.alicloud.openservices.tablestore.core.ResponseContentWithMeta; +import com.alicloud.openservices.tablestore.core.TraceLogger; +import com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi; +import com.alicloud.openservices.tablestore.core.protocol.ResponseFactory; +import com.alicloud.openservices.tablestore.core.protocol.ResultParser; +import com.alicloud.openservices.tablestore.model.RetryStrategy; +import com.alicloud.openservices.tablestore.model.sql.SQLQueryResponse; + +public class SQLQueryResponseConsumer extends ResponseConsumer { + public SQLQueryResponseConsumer(ResultParser resultParser, TraceLogger traceLogger, RetryStrategy retry, SQLQueryResponse lastResult) { + super(resultParser, traceLogger, retry, lastResult); + } + + @Override + protected SQLQueryResponse parseResult() throws Exception { + ResponseContentWithMeta responseContent = getResponseContentWithMeta(); + OtsInternalApi.SQLQueryResponse internalResponse = (OtsInternalApi.SQLQueryResponse) responseContent.getMessage(); + return ResponseFactory.createSqlQueryResponse(responseContent, internalResponse); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/http/UpdateSearchIndexResponseConsumer.java b/src/main/java/com/alicloud/openservices/tablestore/core/http/UpdateSearchIndexResponseConsumer.java new file mode 100644 index 0000000..61f7804 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/http/UpdateSearchIndexResponseConsumer.java @@ -0,0 +1,27 @@ +package com.alicloud.openservices.tablestore.core.http; + +import com.alicloud.openservices.tablestore.core.ResponseContentWithMeta; +import com.alicloud.openservices.tablestore.core.TraceLogger; +import com.alicloud.openservices.tablestore.core.protocol.ResponseFactory; +import com.alicloud.openservices.tablestore.core.protocol.ResultParser; +import com.alicloud.openservices.tablestore.core.protocol.Search; +import com.alicloud.openservices.tablestore.model.RetryStrategy; +import com.alicloud.openservices.tablestore.model.search.UpdateSearchIndexResponse; + +public class UpdateSearchIndexResponseConsumer + extends ResponseConsumer { + + public UpdateSearchIndexResponseConsumer(ResultParser resultParser, TraceLogger traceLogger, RetryStrategy retry, UpdateSearchIndexResponse lastResult) { + super(resultParser, traceLogger, retry, lastResult); + } + + @Override + protected UpdateSearchIndexResponse parseResult() throws Exception { + ResponseContentWithMeta responseContent = getResponseContentWithMeta(); + Search.UpdateSearchIndexResponse internalResponse = + (Search.UpdateSearchIndexResponse) responseContent.getMessage(); + UpdateSearchIndexResponse response = ResponseFactory.createUpdateSearchIndexResponse( + responseContent, internalResponse); + return response; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/http/UpdateTimeseriesMetaResponseConsumer.java b/src/main/java/com/alicloud/openservices/tablestore/core/http/UpdateTimeseriesMetaResponseConsumer.java new file mode 100644 index 0000000..3fe2bd1 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/http/UpdateTimeseriesMetaResponseConsumer.java @@ -0,0 +1,26 @@ +package com.alicloud.openservices.tablestore.core.http; + +import com.alicloud.openservices.tablestore.core.ResponseContentWithMeta; +import com.alicloud.openservices.tablestore.core.TraceLogger; +import com.alicloud.openservices.tablestore.core.protocol.ResultParser; +import com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries; +import com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesResponseFactory; +import com.alicloud.openservices.tablestore.model.RetryStrategy; +import com.alicloud.openservices.tablestore.model.timeseries.UpdateTimeseriesMetaResponse; + +public class UpdateTimeseriesMetaResponseConsumer extends ResponseConsumer { + + public UpdateTimeseriesMetaResponseConsumer(ResultParser resultParser, TraceLogger traceLogger, RetryStrategy retry, UpdateTimeseriesMetaResponse lastResult) { + super(resultParser, traceLogger, retry, lastResult); + } + + @Override + protected UpdateTimeseriesMetaResponse parseResult() throws Exception { + ResponseContentWithMeta responseContent = getResponseContentWithMeta(); + Timeseries.UpdateTimeseriesMetaResponse response = + (Timeseries.UpdateTimeseriesMetaResponse) responseContent.getMessage(); + UpdateTimeseriesMetaResponse result = TimeseriesResponseFactory.createUpdateTimeseriesMetaResponse( + responseContent, response); + return result; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/http/UpdateTimeseriesTableResponseConsumer.java b/src/main/java/com/alicloud/openservices/tablestore/core/http/UpdateTimeseriesTableResponseConsumer.java new file mode 100644 index 0000000..e143fa8 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/http/UpdateTimeseriesTableResponseConsumer.java @@ -0,0 +1,26 @@ +package com.alicloud.openservices.tablestore.core.http; + +import com.alicloud.openservices.tablestore.core.ResponseContentWithMeta; +import com.alicloud.openservices.tablestore.core.TraceLogger; +import com.alicloud.openservices.tablestore.core.protocol.ResultParser; +import com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries; +import com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesResponseFactory; +import com.alicloud.openservices.tablestore.model.RetryStrategy; +import com.alicloud.openservices.tablestore.model.timeseries.UpdateTimeseriesTableResponse; + +public class UpdateTimeseriesTableResponseConsumer extends ResponseConsumer { + + public UpdateTimeseriesTableResponseConsumer(ResultParser resultParser, TraceLogger traceLogger, RetryStrategy retry, UpdateTimeseriesTableResponse lastResult) { + super(resultParser, traceLogger, retry, lastResult); + } + + @Override + protected UpdateTimeseriesTableResponse parseResult() throws Exception { + ResponseContentWithMeta responseContent = getResponseContentWithMeta(); + Timeseries.UpdateTimeseriesTableResponse response = + (Timeseries.UpdateTimeseriesTableResponse) responseContent.getMessage(); + UpdateTimeseriesTableResponse result = TimeseriesResponseFactory.createUpdateTimeseriesTableResponse( + responseContent, response); + return result; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/OTSProtocolBuilder.java b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/OTSProtocolBuilder.java index 3b99d32..a2a5e26 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/OTSProtocolBuilder.java +++ b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/OTSProtocolBuilder.java @@ -6,7 +6,11 @@ import com.alicloud.openservices.tablestore.model.condition.ColumnCondition; import com.alicloud.openservices.tablestore.model.condition.ColumnConditionType; +import com.alicloud.openservices.tablestore.model.delivery.*; import com.alicloud.openservices.tablestore.model.filter.*; +import com.alicloud.openservices.tablestore.model.sql.SQLPayloadVersion; +import com.alicloud.openservices.tablestore.model.sql.SQLQueryRequest; +import com.alicloud.openservices.tablestore.model.tunnel.BulkExportQueryCriteria; import com.google.protobuf.ByteString; import com.alicloud.openservices.tablestore.ClientException; @@ -56,8 +60,10 @@ public static OtsInternalApi.DefinedColumnType toPBDefinedColumnType(DefinedColu public static OtsInternalApi.IndexType toPBIndexType(IndexType indexType) { switch (indexType) { - case IT_GLOBAL_INDEX:GLOBAL_INDEX: + case IT_GLOBAL_INDEX: return OtsInternalApi.IndexType.IT_GLOBAL_INDEX; + case IT_LOCAL_INDEX: + return OtsInternalApi.IndexType.IT_LOCAL_INDEX; default: throw new IllegalArgumentException("Unknown index type:" + indexType); } @@ -67,11 +73,113 @@ public static OtsInternalApi.IndexUpdateMode toPBIndexUpdateMode(IndexUpdateMode switch (indexUpdateMode) { case IUM_ASYNC_INDEX: return OtsInternalApi.IndexUpdateMode.IUM_ASYNC_INDEX; + case IUM_SYNC_INDEX: + return OtsInternalApi.IndexUpdateMode.IUM_SYNC_INDEX; default: throw new IllegalArgumentException("Unknown index update mode" + indexUpdateMode); } } + public static OtsDelivery.EventColumn.eventTimeFormat toPBEventTimeFormat(EventTimeFormat eventTimeFormat) { + switch(eventTimeFormat) { + case RFC822: + return OtsDelivery.EventColumn.eventTimeFormat.RFC822; + case RFC850: + return OtsDelivery.EventColumn.eventTimeFormat.RFC850; + case RFC1123: + return OtsDelivery.EventColumn.eventTimeFormat.RFC1123; + case RFC3339: + return OtsDelivery.EventColumn.eventTimeFormat.RFC3339; + case Unix: + return OtsDelivery.EventColumn.eventTimeFormat.Unix; + default: + throw new IllegalArgumentException("Unknown eventTimeFormat: " + eventTimeFormat); + } + } + + public static OtsDelivery.TimeFormatter toPBTimeFormatter(TimeFormatter timeFormatter) { + switch (timeFormatter) { + case YDMFormatter: + return OtsDelivery.TimeFormatter.YDMFormatter; + default: + throw new IllegalArgumentException("Unknown timeFormatter: " + timeFormatter); + } + } + + public static OtsDelivery.Format toPBFormat(OSSFileFormat format) { + switch (format) { + case Parquet: + return OtsDelivery.Format.Parquet; + default: + throw new IllegalArgumentException("UnKnown format: " + format); + } + } + + public static OtsDelivery.DeliveryTaskType toPBDeliveryTaskType(DeliveryTaskType deliveryTaskType) { + switch (deliveryTaskType) { + case BASE: + return OtsDelivery.DeliveryTaskType.BASE; + case INC: + return OtsDelivery.DeliveryTaskType.INC; + case BASE_INC: + return OtsDelivery.DeliveryTaskType.BASE_INC; + default: + throw new IllegalArgumentException("UnKnown deliveryTaskType: " + deliveryTaskType); + } + } + + public static OtsDelivery.ParquetSchema.DataType toPBDataType(DataType dataType) { + switch (dataType) { + case BOOL: + return OtsDelivery.ParquetSchema.DataType.BOOL; + case INT64: + return OtsDelivery.ParquetSchema.DataType.INT64; + case UTF8: + return OtsDelivery.ParquetSchema.DataType.UTF8; + case DOUBLE: + return OtsDelivery.ParquetSchema.DataType.DOUBLE; + case DATE: + return OtsDelivery.ParquetSchema.DataType.DATE; + case DECIMAL: + return OtsDelivery.ParquetSchema.DataType.DECIMAL; + case TIME_MILLIS: + return OtsDelivery.ParquetSchema.DataType.TIME_MILLIS; + case TIME_MICROS: + return OtsDelivery.ParquetSchema.DataType.TIME_MICROS; + case LIST: + return OtsDelivery.ParquetSchema.DataType.LIST; + case MAP: + return OtsDelivery.ParquetSchema.DataType.MAP; + case INTERVAL: + return OtsDelivery.ParquetSchema.DataType.INTERVAL; + case FLOAT: + return OtsDelivery.ParquetSchema.DataType.FLOAT; + case INT32: + return OtsDelivery.ParquetSchema.DataType.INT32; + case INT96: + return OtsDelivery.ParquetSchema.DataType.INT96; + default: + throw new IllegalArgumentException("UnKnown dataType: " + dataType); + } + } + + public static OtsDelivery.Encoding toPBEncoding(OSSFileEncoding encoding) { + switch (encoding) { + case PLAIN: + return OtsDelivery.Encoding.PLAIN; + case PLAIN_DICTIONARY: + return OtsDelivery.Encoding.PLAIN_DICTIONARY; + case DELTA_BINARY_PACKED: + return OtsDelivery.Encoding.DELTA_BINARY_PACKED; + case DELTA_BYTE_ARRAY: + return OtsDelivery.Encoding.DELTA_BYTE_ARRAY; + case DELTA_LENGTH_BYTE_ARRAY: + return OtsDelivery.Encoding.DELTA_LENGTH_BYTE_ARRAY; + default: + throw new IllegalArgumentException("UnKnown encoding: " + encoding); + } + } + public static OtsInternalApi.DefinedColumnSchema buildDefinedColumnSchema(DefinedColumnSchema definedColun) { OtsInternalApi.DefinedColumnSchema.Builder builder = OtsInternalApi.DefinedColumnSchema.newBuilder(); builder.setName(definedColun.getName()); @@ -175,6 +283,40 @@ public static OtsInternalApi.GetRowRequest buildGetRowRequest(GetRowRequest requ return builder.build(); } + public static OtsInternalApi.PartitionRange buildPartitionRange(PrimaryKeyValue leftPoint, PrimaryKeyValue rightPoint){ + OtsInternalApi.PartitionRange.Builder builderPartition = OtsInternalApi.PartitionRange.newBuilder(); + try { + builderPartition.setBegin(ByteString.copyFrom(PlainBufferBuilder.buildPrimaryKeyValueWithoutLengthPrefix(leftPoint))); + } catch (Exception e) { + //Bug: serialize primary key value failed. + throw new ClientException(" Failed to build the start point of partition range.", e); + } + try { + builderPartition.setEnd(ByteString.copyFrom(PlainBufferBuilder.buildPrimaryKeyValueWithoutLengthPrefix(rightPoint))); + } catch (Exception e) { + //Bug: serialize primary key value failed. + throw new ClientException(" Failed to build the end point of partition range.", e); + } + return builderPartition.build(); + } + + public static void buildPartitionRanges(OtsInternalApi.CreateTableRequest.Builder builder, List splitPoints){ + if (splitPoints.isEmpty()) { + return; + } + PrimaryKeyValue lastPoint = null; + for (PrimaryKeyValue currentPoint : splitPoints){ + if (lastPoint == null) { + builder.addPartitions(buildPartitionRange(PrimaryKeyValue.INF_MIN, currentPoint)); + } else{ + builder.addPartitions(buildPartitionRange(lastPoint, currentPoint)); + } + lastPoint = currentPoint; + } + builder.addPartitions(buildPartitionRange(lastPoint, PrimaryKeyValue.INF_MAX)); + } + + private static OtsInternalApi.TimeRange buildTimeRange(TimeRange timeRange) { OtsInternalApi.TimeRange.Builder builder = OtsInternalApi.TimeRange.newBuilder(); if (timeRange.containsOnlyOneVersion()) { @@ -186,7 +328,7 @@ private static OtsInternalApi.TimeRange buildTimeRange(TimeRange timeRange) { return builder.build(); } - public static OtsInternalApi.CreateTableRequest buildCreateTableRequest(CreateTableRequest createTableRequest) { + public static OtsInternalApi.CreateTableRequest.Builder getCreateTableRequestBuilder(CreateTableRequest createTableRequest) { OtsInternalApi.CreateTableRequest.Builder builder = OtsInternalApi.CreateTableRequest.newBuilder(); // required TableMeta table_meta = 1; @@ -207,11 +349,33 @@ public static OtsInternalApi.CreateTableRequest buildCreateTableRequest(CreateTa builder.setStreamSpec(buildStreamSpecification(streamSpec)); } + SSESpecification sseSpec = createTableRequest.getSseSpecification(); + if (sseSpec != null) { + builder.setSseSpec(buildSseSpecification(sseSpec)); + } + List indexMeta = createTableRequest.getIndexMetaList(); for (IndexMeta index : indexMeta) { builder.addIndexMetas(buildIndexMeta(index)); } + if (createTableRequest.hasLocalTxnSet()) { + builder.setEnableLocalTxn(createTableRequest.isLocalTxnEnabled()); + } + + return builder; + } + + public static OtsInternalApi.CreateTableRequest buildCreateTableRequest(CreateTableRequest createTableRequest) { + return getCreateTableRequestBuilder(createTableRequest).build(); + } + + public static OtsInternalApi.CreateTableRequest buildCreateTableExRequest(CreateTableRequestEx createTableRequestEx) { + OtsInternalApi.CreateTableRequest.Builder builder = getCreateTableRequestBuilder(createTableRequestEx); + + List splitPoints = createTableRequestEx.getSplitPoints(); + buildPartitionRanges(builder, splitPoints); + return builder.build(); } @@ -230,6 +394,10 @@ private static OtsInternalApi.TableOptions buildTableOptions(TableOptions x) { builder.setDeviationCellVersionInSec(x.getMaxTimeDeviation()); } + if (x.hasSetAllowUpdate()) { + builder.setAllowUpdate(x.getAllowUpdate()); + } + return builder.build(); } @@ -259,6 +427,92 @@ public static OtsInternalApi.DeleteTableRequest buildDeleteTableRequest(DeleteTa return builder.build(); } + public static OtsDelivery.CreateDeliveryTaskRequest buildCreateDeliveryTaskRequest(CreateDeliveryTaskRequest req) { + OtsDelivery.CreateDeliveryTaskRequest.Builder builder = OtsDelivery.CreateDeliveryTaskRequest.newBuilder(); + + //optional string tableName = 1; + builder.setTableName(req.getTableName()); + + //optional string taskName = 2; + builder.setTaskName(req.getTaskName()); + + //optional OSSTaskConfig taskConfig = 3; + builder.setTaskConfig(buildOSSTaskConfig(req.getTaskConfig())); + + //optional DeliveryTaskType taskType = 4; + builder.setTaskType(toPBDeliveryTaskType(req.getTaskType())); + return builder.build(); + } + + public static OtsDelivery.OSSTaskConfig buildOSSTaskConfig(OSSTaskConfig taskConfig) { + OtsDelivery.OSSTaskConfig.Builder builder = OtsDelivery.OSSTaskConfig.newBuilder(); + + builder.setOssPrefix(taskConfig.getOssPrefix()); + builder.clearFormatter(); +// builder.setFormatter(toPBTimeFormatter(taskConfig.getTimeFormatter())); + builder.setOssBucket(taskConfig.getOssBucket()); + builder.setOssEndpoint(taskConfig.getOssEndpoint()); + builder.setOssStsRole(taskConfig.getOssStsRole()); + if (taskConfig.getEventTimeColumn() != null) { + builder.setEventTimeColumn(buildEventTimeColumn(taskConfig.getEventTimeColumn())); + } + builder.setFormat(toPBFormat(taskConfig.getFormat())); + for (ParquetSchema ps : taskConfig.getParquetSchemaList()) { + builder.addSchema(buildParquetSchema(ps)); + } + return builder.build(); + } + + private static OtsDelivery.ParquetSchema buildParquetSchema(ParquetSchema parquetSchema) { + OtsDelivery.ParquetSchema.Builder builder = OtsDelivery.ParquetSchema.newBuilder(); + builder.setColumnName(parquetSchema.getColumnName()); + builder.setOssColumnName(parquetSchema.getOssColumnName()); + builder.setType(toPBDataType(parquetSchema.getType())); + builder.setEncode(toPBEncoding(parquetSchema.getEncode())); + if (parquetSchema.getTypeExtend() != null) { + builder.setTypeExtend(parquetSchema.getTypeExtend()); + } + return builder.build(); + } + + public static OtsDelivery.EventColumn buildEventTimeColumn(EventColumn eventColumn) { + OtsDelivery.EventColumn.Builder builder = OtsDelivery.EventColumn.newBuilder(); + + builder.setColumnName(eventColumn.getColumnName()); + builder.setTimeFormat(toPBEventTimeFormat(eventColumn.getEventTimeFormat())); + return builder.build(); + } + + public static OtsDelivery.DeleteDeliveryTaskRequest buildDeleteDeliveryTaskRequest(DeleteDeliveryTaskRequest req) { + OtsDelivery.DeleteDeliveryTaskRequest.Builder builder = OtsDelivery.DeleteDeliveryTaskRequest.newBuilder(); + + //optional string tableName = 1; + builder.setTableName(req.getTableName()); + + //optional string taskName = 2; + builder.setTaskName(req.getTaskName()); + return builder.build(); + } + + public static OtsDelivery.DescribeDeliveryTaskRequest buildDescribeDeliveryTaskRequest(DescribeDeliveryTaskRequest req) { + OtsDelivery.DescribeDeliveryTaskRequest.Builder builder = OtsDelivery.DescribeDeliveryTaskRequest.newBuilder(); + + //optional string tableName = 1; + builder.setTableName(req.getTableName()); + + //optional string taskName = 2; + builder.setTaskName(req.getTaskName()); + return builder.build(); + } + + public static OtsDelivery.ListDeliveryTaskRequest buildListDeliveryTaskRequest(ListDeliveryTaskRequest req) { + OtsDelivery.ListDeliveryTaskRequest.Builder builder = OtsDelivery.ListDeliveryTaskRequest.newBuilder(); + + //optional string tableName = 1; + builder.setTableName(req.getTableName()); + return builder.build(); + } + public static OtsInternalApi.CreateIndexRequest buildCreateIndexRequest(CreateIndexRequest req) { OtsInternalApi.CreateIndexRequest.Builder builder = OtsInternalApi.CreateIndexRequest.newBuilder(); @@ -275,6 +529,30 @@ public static OtsInternalApi.DropIndexRequest buildDeleteIndexRequest(DeleteInde return builder.build(); } + public static OtsInternalApi.AddDefinedColumnRequest buildAddDefinedColumnRequest(AddDefinedColumnRequest req) { + OtsInternalApi.AddDefinedColumnRequest.Builder builder = OtsInternalApi.AddDefinedColumnRequest.newBuilder(); + + builder.setTableName(req.getTableName()); + List defColumns = req.getDefinedColumn(); + for (DefinedColumnSchema col : defColumns) { + builder.addColumns(buildDefinedColumnSchema(col)); + } + + return builder.build(); + } + + public static OtsInternalApi.DeleteDefinedColumnRequest buildDeleteDefinedColumnRequest(DeleteDefinedColumnRequest req) { + OtsInternalApi.DeleteDefinedColumnRequest.Builder builder = OtsInternalApi.DeleteDefinedColumnRequest.newBuilder(); + + builder.setTableName(req.getTableName()); + List defColumns = req.getDefinedColumn(); + for (String col : defColumns) { + builder.addColumns(col); + } + + return builder.build(); + } + public static OtsInternalApi.RowExistenceExpectation toPBRowExistenceExpectation( RowExistenceExpectation rowExistenceExpectation) { switch(rowExistenceExpectation) { @@ -288,7 +566,7 @@ public static OtsInternalApi.RowExistenceExpectation toPBRowExistenceExpectation throw new IllegalArgumentException("Invalid row existence expectation: " + rowExistenceExpectation); } } - + public static OtsInternalApi.Condition buildCondition(Condition cond) { OtsInternalApi.Condition.Builder builder = OtsInternalApi.Condition.newBuilder(); @@ -299,7 +577,7 @@ public static OtsInternalApi.Condition buildCondition(Condition cond) return builder.build(); } - + public static OtsInternalApi.ReturnContent buildReturnContent(ReturnType returnType, Set returnColumnNames) { OtsInternalApi.ReturnContent.Builder builder = OtsInternalApi.ReturnContent.newBuilder(); @@ -312,7 +590,7 @@ public static OtsInternalApi.ReturnContent buildReturnContent(ReturnType returnT return builder.build(); } - private static OtsInternalApi.ReturnType toPBReturnType(ReturnType returnType) + private static OtsInternalApi.ReturnType toPBReturnType(ReturnType returnType) { switch(returnType) { case RT_NONE: @@ -423,14 +701,20 @@ public static OtsInternalApi.Direction toPBDirection(Direction direction) { throw new IllegalArgumentException("Invalid direction type: " + direction); } } - + public static OtsInternalApi.ComputeSplitPointsBySizeRequest buildComputeSplitsBySizeRequest(ComputeSplitsBySizeRequest req) { OtsInternalApi.ComputeSplitPointsBySizeRequest.Builder builder = OtsInternalApi.ComputeSplitPointsBySizeRequest.newBuilder(); // required string table_name = 1; builder.setTableName(req.getTableName()); + // required int64 split_size = 2; builder.setSplitSize(req.getSplitUnitCount()); + // optional int64 split_size_unit_in_byte = 3; builder.setSplitSizeUnitInByte(req.getSplitUnitSizeInByte()); + // optional int64 split_limit = 4; + if (req.hasSetSplitPointLimit()) { + builder.setSplitPointLimit(req.getSplitPointLimit()); + } return builder.build(); } @@ -502,6 +786,42 @@ public static OtsInternalApi.GetRangeRequest buildGetRangeRequest(GetRangeReques return builder.build(); } + public static OtsInternalApi.BulkExportRequest buildBulkExportRequest(BulkExportRequest request) { + BulkExportQueryCriteria criteria = request.getBulkExportQueryCriteria(); + OtsInternalApi.BulkExportRequest.Builder builder = OtsInternalApi.BulkExportRequest.newBuilder(); + + // required string table_name = 1; + builder.setTableName(criteria.getTableName()); + + // repeated string columns_to_get = 2; + for (String column : criteria.getColumnsToGet()) { + builder.addColumnsToGet(column); + } + + try { + // required bytes inclusive_start_primary_key = 3; + builder.setInclusiveStartPrimaryKey(ByteString.copyFrom(PlainBufferBuilder.buildPrimaryKeyWithHeader(criteria.getInclusiveStartPrimaryKey()))); + // required bytes exclusive_end_primary_key = 4; + builder.setExclusiveEndPrimaryKey(ByteString.copyFrom(PlainBufferBuilder.buildPrimaryKeyWithHeader(criteria.getExclusiveEndPrimaryKey()))); + } catch (IOException e) { + throw new ClientException("Bug: serialize primary key failed.", e); + } + + // optional bytes filter = 5; + if (criteria.hasSetFilter()) { + builder.setFilter(buildFilter(criteria.getFilter())); + } + + // optional DataBlockType data_block_type_hint = 6 [default = DBT_SIMPLE_ROW_MATRIX]; + if (criteria.getDataBlockType() == DataBlockType.DBT_PLAIN_BUFFER) { + builder.setDataBlockTypeHint(OtsInternalApi.DataBlockType.DBT_PLAIN_BUFFER); + } else { + builder.setDataBlockTypeHint(OtsInternalApi.DataBlockType.DBT_SIMPLE_ROW_MATRIX); + } + + return builder.build(); + } + public static OtsInternalApi.BatchGetRowRequest buildBatchGetRowRequest( Map criteriasGroupByTable) { OtsInternalApi.BatchGetRowRequest.Builder builder = OtsInternalApi.BatchGetRowRequest.newBuilder(); @@ -608,6 +928,41 @@ public static OtsInternalApi.BatchWriteRowRequest buildBatchWriteRowRequest(Batc builder.setTransactionId(request.getTransactionId()); } + if (request.isAtomicSet()) { + builder.setIsAtomic(request.isAtomic()); + } + + return builder.build(); + } + + public static OtsInternalApi.BulkImportRequest buildBulkImportRequest(BulkImportRequest request) { + OtsInternalApi.BulkImportRequest.Builder builder = OtsInternalApi.BulkImportRequest.newBuilder(); + + builder.setTableName(request.getTableName()); + + List rowChanges = request.getRowChange(); + if (rowChanges != null && !rowChanges.isEmpty()) { + for (RowChange rowChange : rowChanges) { + try { + OtsInternalApi.RowInBulkImportRequest.Builder rowBuilder = OtsInternalApi.RowInBulkImportRequest.newBuilder(); + if (rowChange instanceof RowPutChange) { + rowBuilder.setType(OtsInternalApi.OperationType.PUT); + rowBuilder.setRowChange(ByteString.copyFrom(PlainBufferBuilder.buildRowPutChangeWithHeader((RowPutChange) rowChange))); + } else if (rowChange instanceof RowUpdateChange) { + rowBuilder.setType(OtsInternalApi.OperationType.UPDATE); + rowBuilder.setRowChange(ByteString.copyFrom(PlainBufferBuilder.buildRowUpdateChangeWithHeader((RowUpdateChange) rowChange))); + } else if (rowChange instanceof RowDeleteChange) { + rowBuilder.setType(OtsInternalApi.OperationType.DELETE); + rowBuilder.setRowChange(ByteString.copyFrom(PlainBufferBuilder.buildRowDeleteChangeWithHeader((RowDeleteChange) rowChange))); + } else { + throw new ClientException("Unknown type of rowChange."); + } + builder.addRows(rowBuilder.build()); + } catch (IOException e) { + throw new ClientException("Bug: serialize row put change failed.", e); + } + } + } return builder.build(); } @@ -640,6 +995,31 @@ private static OtsInternalApi.StreamSpecification buildStreamSpecification(Strea return builder.build(); } + private static OtsInternalApi.SSESpecification buildSseSpecification(SSESpecification sseSpecification) { + OtsInternalApi.SSESpecification.Builder builder = OtsInternalApi.SSESpecification.newBuilder(); + builder.setEnable(sseSpecification.isEnable()); + if (sseSpecification.getKeyType() != null) { + SSEKeyType keyType = sseSpecification.getKeyType(); + switch (keyType) { + case SSE_KMS_SERVICE: + builder.setKeyType(OtsInternalApi.SSEKeyType.SSE_KMS_SERVICE); + break; + case SSE_BYOK: + builder.setKeyType(OtsInternalApi.SSEKeyType.SSE_BYOK); + break; + default: + throw new IllegalArgumentException("Unknown server side encryption key type: " + keyType); + } + } + if (sseSpecification.getKeyId() != null) { + builder.setKeyId(ByteString.copyFrom(sseSpecification.getKeyId().getBytes())); + } + if (sseSpecification.getRoleArn() != null) { + builder.setRoleArn(ByteString.copyFrom(sseSpecification.getRoleArn().getBytes())); + } + return builder.build(); + } + public static OtsFilter.LogicalOperator toLogicalOperator(CompositeColumnValueFilter.LogicOperator type) { switch (type) { case NOT: @@ -725,6 +1105,46 @@ public static ByteString buildSingleColumnValueFilter(SingleColumnValueFilter fi return builder.build().toByteString(); } + public static ByteString buildSingleColumnValueRegexFilter(SingleColumnValueRegexFilter filter) { + OtsFilter.SingleColumnValueFilter.Builder builder = OtsFilter.SingleColumnValueFilter.newBuilder(); + builder.setColumnName(filter.getColumnName()); + if (filter.hasRegexRule()) { + builder.setValueTransRule(filter.getRegexRule().serialize()); + } + builder.setComparator(toComparatorType(filter.getOperator())); + try { + builder.setColumnValue(ByteString.copyFrom(PlainBufferBuilder.buildColumnValueWithoutLengthPrefix(filter.getColumnValue()))); + } catch (IOException e) { + throw new ClientException("Bug: serialize column value failed.", e); + } + builder.setFilterIfMissing(true); + builder.setLatestVersionOnly(filter.getLatestVersionsOnly()); + return builder.build().toByteString(); + } + + private static OtsFilter.ComparatorType toComparatorType(SingleColumnValueRegexFilter.CompareOperator operator) { + switch (operator) { + case EQUAL: + return OtsFilter.ComparatorType.CT_EQUAL; + case NOT_EQUAL: + return OtsFilter.ComparatorType.CT_NOT_EQUAL; + case GREATER_THAN: + return OtsFilter.ComparatorType.CT_GREATER_THAN; + case GREATER_EQUAL: + return OtsFilter.ComparatorType.CT_GREATER_EQUAL; + case LESS_THAN: + return OtsFilter.ComparatorType.CT_LESS_THAN; + case LESS_EQUAL: + return OtsFilter.ComparatorType.CT_LESS_EQUAL; + case EXIST: + return OtsFilter.ComparatorType.CT_EXIST; + case NOT_EXIST: + return OtsFilter.ComparatorType.CT_NOT_EXIST; + default: + throw new IllegalArgumentException("Unknown compare operator: " + operator); + } + } + private static OtsFilter.ComparatorType toComparatorType(SingleColumnValueFilter.CompareOperator operator) { switch (operator) { case EQUAL: @@ -775,6 +1195,12 @@ public static OtsInternalApi.GetShardIteratorRequest buildGetShardIteratorReques OtsInternalApi.GetShardIteratorRequest.Builder builder = OtsInternalApi.GetShardIteratorRequest.newBuilder(); builder.setStreamId(request.getStreamId()); builder.setShardId(request.getShardId()); + if (request.hasTimestamp()) { + builder.setTimestamp(request.getTimestamp()); + } + if (request.hasToken()) { + builder.setToken(request.getToken()); + } return builder.build(); } @@ -809,4 +1235,41 @@ public static OtsInternalApi.CommitTransactionRequest buildCommitTransactionRequ builder.setTransactionId(request.getTransactionID()); return builder.build(); } + + public static OtsInternalApi.ComputeSplitsRequest buildComputeSplitsRequest(ComputeSplitsRequest request) { + OtsInternalApi.ComputeSplitsRequest.Builder builder = OtsInternalApi.ComputeSplitsRequest.newBuilder(); + if (null != request.getTableName()) { + builder.setTableName(request.getTableName()); + } + if (null != request.getSplitsOptions()) { + SplitsOptions splitsOptions = request.getSplitsOptions(); + if (splitsOptions instanceof SearchIndexSplitsOptions) { + SearchIndexSplitsOptions searchIndexSplitsOptions = (SearchIndexSplitsOptions)splitsOptions; + OtsInternalApi.SearchIndexSplitsOptions.Builder optionsBuilder = OtsInternalApi.SearchIndexSplitsOptions.newBuilder(); + if (null != searchIndexSplitsOptions.getIndexName()) { + optionsBuilder.setIndexName(searchIndexSplitsOptions.getIndexName()); + } + builder.setSearchIndexSplitsOptions(optionsBuilder.build()); + } + } + return builder.build(); + } + + public static OtsInternalApi.SQLQueryRequest buildSQLQueryRequest(SQLQueryRequest request) { + OtsInternalApi.SQLQueryRequest.Builder builder = OtsInternalApi.SQLQueryRequest.newBuilder(); + + builder.setQuery(request.getQuery()); + builder.setVersion(buildSQLPayloadVersion(request.getSqlPayloadVersion())); + + return builder.build(); + } + + public static OtsInternalApi.SQLPayloadVersion buildSQLPayloadVersion(SQLPayloadVersion sqlPayloadVersion) { + switch (sqlPayloadVersion) { + case SQL_FLAT_BUFFERS: + return OtsInternalApi.SQLPayloadVersion.SQL_FLAT_BUFFERS; + default: + throw new UnsupportedOperationException("not supported sql payload version: " + sqlPayloadVersion); + } + } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/OTSProtocolParser.java b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/OTSProtocolParser.java index 11001a3..5d6ac37 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/OTSProtocolParser.java +++ b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/OTSProtocolParser.java @@ -2,6 +2,8 @@ import com.alicloud.openservices.tablestore.ClientException; import com.alicloud.openservices.tablestore.model.*; +import com.alicloud.openservices.tablestore.model.sql.SQLPayloadVersion; +import com.alicloud.openservices.tablestore.model.sql.SQLStatementType; import java.io.IOException; import java.util.List; @@ -36,7 +38,7 @@ public static DefinedColumnType toDefinedColumnType(OtsInternalApi.DefinedColumn throw new IllegalArgumentException("Unknown defined column type: " + type); } } - + public static PrimaryKeyOption toPrimaryKeyOption(OtsInternalApi.PrimaryKeyOption option) { switch (option) { case AUTO_INCREMENT: @@ -66,6 +68,8 @@ public static IndexType parseIndexType(OtsInternalApi.IndexType indexType) { switch (indexType) { case IT_GLOBAL_INDEX: return IndexType.IT_GLOBAL_INDEX; + case IT_LOCAL_INDEX: + return IndexType.IT_LOCAL_INDEX; default: throw new IllegalArgumentException("Unknown index type: " + indexType); } @@ -75,6 +79,8 @@ public static IndexUpdateMode parseIndexUpdateMode(OtsInternalApi.IndexUpdateMod switch (indexUpdateMode) { case IUM_ASYNC_INDEX: return IndexUpdateMode.IUM_ASYNC_INDEX; + case IUM_SYNC_INDEX: + return IndexUpdateMode.IUM_SYNC_INDEX; default: throw new IllegalArgumentException("Unknown index update mode: " + indexUpdateMode); } @@ -114,6 +120,46 @@ public static CapacityUnit parseCapacityUnit(OtsInternalApi.CapacityUnit capacit return result; } + public static CapacityDataSize parseCapacityDataSize(OtsInternalApi.CapacityDataSize capacityDataSize) { + CapacityDataSize result = new CapacityDataSize(); + if (capacityDataSize.hasReadSize()) { + result.setReadCapacityDataSize(capacityDataSize.getReadSize()); + } + + if (capacityDataSize.hasWriteSize()) { + result.setWriteCapacityDataSize(capacityDataSize.getWriteSize()); + } + return result; + } + + public static SQLPayloadVersion parseSQLPayloadVersion(OtsInternalApi.SQLPayloadVersion sqlPayloadVersion) { + switch (sqlPayloadVersion) { + case SQL_FLAT_BUFFERS: + return SQLPayloadVersion.SQL_FLAT_BUFFERS; + default: + throw new UnsupportedOperationException("not supported sql payload version: " + sqlPayloadVersion); + } + } + + public static SQLStatementType parseSQLStatementType(OtsInternalApi.SQLStatementType sqlStatementType) { + switch (sqlStatementType) { + case SQL_SELECT: + return SQLStatementType.SQL_SELECT; + case SQL_CREATE_TABLE: + return SQLStatementType.SQL_CREATE_TABLE; + case SQL_SHOW_TABLE: + return SQLStatementType.SQL_SHOW_TABLE; + case SQL_DESCRIBE_TABLE: + return SQLStatementType.SQL_DESCRIBE_TABLE; + case SQL_DROP_TABLE: + return SQLStatementType.SQL_DROP_TABLE; + case SQL_ALTER_TABLE: + return SQLStatementType.SQL_ALTER_TABLE; + default: + throw new UnsupportedOperationException("not supported sql type: " + sqlStatementType); + } + } + public static TableOptions parseTableOptions(OtsInternalApi.TableOptions tableOptions) { TableOptions result = new TableOptions(); @@ -129,6 +175,10 @@ public static TableOptions parseTableOptions(OtsInternalApi.TableOptions tableOp result.setTimeToLive(tableOptions.getTimeToLive()); } + if (tableOptions.hasAllowUpdate()) { + result.setAllowUpdate(tableOptions.getAllowUpdate()); + } + return result; } @@ -163,7 +213,7 @@ public static BatchWriteRowResponse.RowResult parseBatchWriteRowStatus(String ta Row row = null; if (status.getIsOk()) { ConsumedCapacity consumedCapacity = new ConsumedCapacity(parseCapacityUnit(status.getConsumed().getCapacityUnit())); - + if (status.hasRow() && !status.getRow().isEmpty()) { try { PlainBufferCodedInputStream inputStream = new PlainBufferCodedInputStream(new PlainBufferInputStream(status.getRow().asReadOnlyByteBuffer())); @@ -183,6 +233,21 @@ public static BatchWriteRowResponse.RowResult parseBatchWriteRowStatus(String ta } } + public static BulkImportResponse.RowResult parseBulkImportStatus(OtsInternalApi.RowInBulkImportResponse status, int index) { + if (status.getIsOk()) { + ConsumedCapacity consumedCapacity = new ConsumedCapacity( + OTSProtocolParser.parseCapacityUnit(status.getConsumed().getCapacityUnit())); + if (status.getConsumed().hasCapacityDataSize()){ + consumedCapacity.setCapacityDataSize(OTSProtocolParser.parseCapacityDataSize(status.getConsumed().getCapacityDataSize())); + } + return new BulkImportResponse.RowResult(consumedCapacity, index); + } else { + com.alicloud.openservices.tablestore.model.Error error = new com.alicloud.openservices.tablestore.model.Error(status.getError().getCode(), status.getError().getMessage()); + return new BulkImportResponse.RowResult(error, index); + } + } + + public static StreamDetails parseStreamDetails(OtsInternalApi.StreamDetails streamDetails) { StreamDetails result = new StreamDetails(); result.setEnableStream(streamDetails.getEnableStream()); @@ -227,4 +292,29 @@ public static StreamStatus parseStreamStatus(OtsInternalApi.StreamStatus status) throw new ClientException("Unknown stream status:" + status); } } + + public static SSEDetails parseSseDetails(OtsInternalApi.SSEDetails sseDetails) { + SSEDetails result = new SSEDetails(); + result.setEnable(sseDetails.getEnable()); + if (sseDetails.hasKeyType()) { + OtsInternalApi.SSEKeyType keyType = sseDetails.getKeyType(); + switch (keyType) { + case SSE_KMS_SERVICE: + result.setKeyType(SSEKeyType.SSE_KMS_SERVICE); + break; + case SSE_BYOK: + result.setKeyType(SSEKeyType.SSE_BYOK); + break; + default: + throw new ClientException("Unknown server side encryption key type: " + keyType); + } + } + if (sseDetails.hasKeyId()) { + result.setKeyId(sseDetails.getKeyId().toByteArray()); + } + if (sseDetails.hasRoleArn()) { + result.setRoleArn(sseDetails.getRoleArn().toByteArray()); + } + return result; + } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/OtsDelivery.java b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/OtsDelivery.java new file mode 100644 index 0000000..bb13fa7 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/OtsDelivery.java @@ -0,0 +1,9071 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: OtsDelivery.proto + +package com.alicloud.openservices.tablestore.core.protocol; + +public final class OtsDelivery { + private OtsDelivery() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + public enum DeliveryTaskType + implements com.google.protobuf.ProtocolMessageEnum { + BASE(0, 0), + INC(1, 1), + BASE_INC(2, 2), + ; + + public static final int BASE_VALUE = 0; + public static final int INC_VALUE = 1; + public static final int BASE_INC_VALUE = 2; + + + public final int getNumber() { return value; } + + public static DeliveryTaskType valueOf(int value) { + switch (value) { + case 0: return BASE; + case 1: return INC; + case 2: return BASE_INC; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DeliveryTaskType findValueByNumber(int number) { + return DeliveryTaskType.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.getDescriptor().getEnumTypes().get(0); + } + + private static final DeliveryTaskType[] VALUES = { + BASE, INC, BASE_INC, + }; + + public static DeliveryTaskType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private DeliveryTaskType(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:com.alicloud.openservices.tablestore.core.protocol.DeliveryTaskType) + } + + public enum Format + implements com.google.protobuf.ProtocolMessageEnum { + Parquet(0, 0), + ; + + public static final int Parquet_VALUE = 0; + + + public final int getNumber() { return value; } + + public static Format valueOf(int value) { + switch (value) { + case 0: return Parquet; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Format findValueByNumber(int number) { + return Format.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.getDescriptor().getEnumTypes().get(1); + } + + private static final Format[] VALUES = { + Parquet, + }; + + public static Format valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private Format(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:com.alicloud.openservices.tablestore.core.protocol.Format) + } + + public enum Encoding + implements com.google.protobuf.ProtocolMessageEnum { + PLAIN(0, 0), + PLAIN_DICTIONARY(1, 1), + DELTA_BINARY_PACKED(2, 2), + DELTA_BYTE_ARRAY(3, 3), + DELTA_LENGTH_BYTE_ARRAY(4, 4), + ; + + public static final int PLAIN_VALUE = 0; + public static final int PLAIN_DICTIONARY_VALUE = 1; + public static final int DELTA_BINARY_PACKED_VALUE = 2; + public static final int DELTA_BYTE_ARRAY_VALUE = 3; + public static final int DELTA_LENGTH_BYTE_ARRAY_VALUE = 4; + + + public final int getNumber() { return value; } + + public static Encoding valueOf(int value) { + switch (value) { + case 0: return PLAIN; + case 1: return PLAIN_DICTIONARY; + case 2: return DELTA_BINARY_PACKED; + case 3: return DELTA_BYTE_ARRAY; + case 4: return DELTA_LENGTH_BYTE_ARRAY; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Encoding findValueByNumber(int number) { + return Encoding.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.getDescriptor().getEnumTypes().get(2); + } + + private static final Encoding[] VALUES = { + PLAIN, PLAIN_DICTIONARY, DELTA_BINARY_PACKED, DELTA_BYTE_ARRAY, DELTA_LENGTH_BYTE_ARRAY, + }; + + public static Encoding valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private Encoding(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:com.alicloud.openservices.tablestore.core.protocol.Encoding) + } + + public enum TimeFormatter + implements com.google.protobuf.ProtocolMessageEnum { + YDMFormatter(0, 0), + ; + + public static final int YDMFormatter_VALUE = 0; + + + public final int getNumber() { return value; } + + public static TimeFormatter valueOf(int value) { + switch (value) { + case 0: return YDMFormatter; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public TimeFormatter findValueByNumber(int number) { + return TimeFormatter.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.getDescriptor().getEnumTypes().get(3); + } + + private static final TimeFormatter[] VALUES = { + YDMFormatter, + }; + + public static TimeFormatter valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private TimeFormatter(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:com.alicloud.openservices.tablestore.core.protocol.TimeFormatter) + } + + public enum ErrorType + implements com.google.protobuf.ProtocolMessageEnum { + OK(0, 0), + UNAUTHORIZED(1, 1), + INVALID_OSS_BUCKET(2, 2), + ; + + public static final int OK_VALUE = 0; + public static final int UNAUTHORIZED_VALUE = 1; + public static final int INVALID_OSS_BUCKET_VALUE = 2; + + + public final int getNumber() { return value; } + + public static ErrorType valueOf(int value) { + switch (value) { + case 0: return OK; + case 1: return UNAUTHORIZED; + case 2: return INVALID_OSS_BUCKET; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ErrorType findValueByNumber(int number) { + return ErrorType.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.getDescriptor().getEnumTypes().get(4); + } + + private static final ErrorType[] VALUES = { + OK, UNAUTHORIZED, INVALID_OSS_BUCKET, + }; + + public static ErrorType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private ErrorType(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:com.alicloud.openservices.tablestore.core.protocol.ErrorType) + } + + public interface CreateDeliveryTaskRequestOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string tableName = 1; + boolean hasTableName(); + String getTableName(); + + // optional string taskName = 2; + boolean hasTaskName(); + String getTaskName(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.OSSTaskConfig taskConfig = 3; + boolean hasTaskConfig(); + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig getTaskConfig(); + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfigOrBuilder getTaskConfigOrBuilder(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.DeliveryTaskType taskType = 4; + boolean hasTaskType(); + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskType getTaskType(); + } + public static final class CreateDeliveryTaskRequest extends + com.google.protobuf.GeneratedMessage + implements CreateDeliveryTaskRequestOrBuilder { + // Use CreateDeliveryTaskRequest.newBuilder() to construct. + private CreateDeliveryTaskRequest(Builder builder) { + super(builder); + } + private CreateDeliveryTaskRequest(boolean noInit) {} + + private static final CreateDeliveryTaskRequest defaultInstance; + public static CreateDeliveryTaskRequest getDefaultInstance() { + return defaultInstance; + } + + public CreateDeliveryTaskRequest getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateDeliveryTaskRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateDeliveryTaskRequest_fieldAccessorTable; + } + + private int bitField0_; + // optional string tableName = 1; + public static final int TABLENAME_FIELD_NUMBER = 1; + private java.lang.Object tableName_; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + tableName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional string taskName = 2; + public static final int TASKNAME_FIELD_NUMBER = 2; + private java.lang.Object taskName_; + public boolean hasTaskName() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getTaskName() { + java.lang.Object ref = taskName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + taskName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTaskNameBytes() { + java.lang.Object ref = taskName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + taskName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.OSSTaskConfig taskConfig = 3; + public static final int TASKCONFIG_FIELD_NUMBER = 3; + private com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig taskConfig_; + public boolean hasTaskConfig() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig getTaskConfig() { + return taskConfig_; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfigOrBuilder getTaskConfigOrBuilder() { + return taskConfig_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.DeliveryTaskType taskType = 4; + public static final int TASKTYPE_FIELD_NUMBER = 4; + private com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskType taskType_; + public boolean hasTaskType() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskType getTaskType() { + return taskType_; + } + + private void initFields() { + tableName_ = ""; + taskName_ = ""; + taskConfig_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig.getDefaultInstance(); + taskType_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskType.BASE; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getTaskNameBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeMessage(3, taskConfig_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeEnum(4, taskType_.getNumber()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getTaskNameBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, taskConfig_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, taskType_.getNumber()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskRequest prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateDeliveryTaskRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateDeliveryTaskRequest_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getTaskConfigFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + tableName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + taskName_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + if (taskConfigBuilder_ == null) { + taskConfig_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig.getDefaultInstance(); + } else { + taskConfigBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + taskType_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskType.BASE; + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskRequest.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskRequest.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskRequest build() { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskRequest buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.tableName_ = tableName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.taskName_ = taskName_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + if (taskConfigBuilder_ == null) { + result.taskConfig_ = taskConfig_; + } else { + result.taskConfig_ = taskConfigBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.taskType_ = taskType_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskRequest.getDefaultInstance()) return this; + if (other.hasTableName()) { + setTableName(other.getTableName()); + } + if (other.hasTaskName()) { + setTaskName(other.getTaskName()); + } + if (other.hasTaskConfig()) { + mergeTaskConfig(other.getTaskConfig()); + } + if (other.hasTaskType()) { + setTaskType(other.getTaskType()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + tableName_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + taskName_ = input.readBytes(); + break; + } + case 26: { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig.newBuilder(); + if (hasTaskConfig()) { + subBuilder.mergeFrom(getTaskConfig()); + } + input.readMessage(subBuilder, extensionRegistry); + setTaskConfig(subBuilder.buildPartial()); + break; + } + case 32: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskType value = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(4, rawValue); + } else { + bitField0_ |= 0x00000008; + taskType_ = value; + } + break; + } + } + } + } + + private int bitField0_; + + // optional string tableName = 1; + private java.lang.Object tableName_ = ""; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + tableName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setTableName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + return this; + } + public Builder clearTableName() { + bitField0_ = (bitField0_ & ~0x00000001); + tableName_ = getDefaultInstance().getTableName(); + onChanged(); + return this; + } + void setTableName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + } + + // optional string taskName = 2; + private java.lang.Object taskName_ = ""; + public boolean hasTaskName() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getTaskName() { + java.lang.Object ref = taskName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + taskName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setTaskName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + taskName_ = value; + onChanged(); + return this; + } + public Builder clearTaskName() { + bitField0_ = (bitField0_ & ~0x00000002); + taskName_ = getDefaultInstance().getTaskName(); + onChanged(); + return this; + } + void setTaskName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000002; + taskName_ = value; + onChanged(); + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.OSSTaskConfig taskConfig = 3; + private com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig taskConfig_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfigOrBuilder> taskConfigBuilder_; + public boolean hasTaskConfig() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig getTaskConfig() { + if (taskConfigBuilder_ == null) { + return taskConfig_; + } else { + return taskConfigBuilder_.getMessage(); + } + } + public Builder setTaskConfig(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig value) { + if (taskConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + taskConfig_ = value; + onChanged(); + } else { + taskConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder setTaskConfig( + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig.Builder builderForValue) { + if (taskConfigBuilder_ == null) { + taskConfig_ = builderForValue.build(); + onChanged(); + } else { + taskConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder mergeTaskConfig(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig value) { + if (taskConfigBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004) && + taskConfig_ != com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig.getDefaultInstance()) { + taskConfig_ = + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig.newBuilder(taskConfig_).mergeFrom(value).buildPartial(); + } else { + taskConfig_ = value; + } + onChanged(); + } else { + taskConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder clearTaskConfig() { + if (taskConfigBuilder_ == null) { + taskConfig_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig.getDefaultInstance(); + onChanged(); + } else { + taskConfigBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig.Builder getTaskConfigBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getTaskConfigFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfigOrBuilder getTaskConfigOrBuilder() { + if (taskConfigBuilder_ != null) { + return taskConfigBuilder_.getMessageOrBuilder(); + } else { + return taskConfig_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfigOrBuilder> + getTaskConfigFieldBuilder() { + if (taskConfigBuilder_ == null) { + taskConfigBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfigOrBuilder>( + taskConfig_, + getParentForChildren(), + isClean()); + taskConfig_ = null; + } + return taskConfigBuilder_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.DeliveryTaskType taskType = 4; + private com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskType taskType_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskType.BASE; + public boolean hasTaskType() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskType getTaskType() { + return taskType_; + } + public Builder setTaskType(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + taskType_ = value; + onChanged(); + return this; + } + public Builder clearTaskType() { + bitField0_ = (bitField0_ & ~0x00000008); + taskType_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskType.BASE; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.CreateDeliveryTaskRequest) + } + + static { + defaultInstance = new CreateDeliveryTaskRequest(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.CreateDeliveryTaskRequest) + } + + public interface OSSTaskConfigOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string ossPrefix = 1; + boolean hasOssPrefix(); + String getOssPrefix(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.TimeFormatter formatter = 2; + boolean hasFormatter(); + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TimeFormatter getFormatter(); + + // optional string ossDirtyPrefix = 3; + boolean hasOssDirtyPrefix(); + String getOssDirtyPrefix(); + + // optional string ossBucket = 4; + boolean hasOssBucket(); + String getOssBucket(); + + // optional string ossEndpoint = 5; + boolean hasOssEndpoint(); + String getOssEndpoint(); + + // optional string ossStsRole = 6; + boolean hasOssStsRole(); + String getOssStsRole(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.EventColumn eventTimeColumn = 7; + boolean hasEventTimeColumn(); + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn getEventTimeColumn(); + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumnOrBuilder getEventTimeColumnOrBuilder(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.Format format = 8; + boolean hasFormat(); + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.Format getFormat(); + + // repeated .com.alicloud.openservices.tablestore.core.protocol.ParquetSchema schema = 11; + java.util.List + getSchemaList(); + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema getSchema(int index); + int getSchemaCount(); + java.util.List + getSchemaOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchemaOrBuilder getSchemaOrBuilder( + int index); + } + public static final class OSSTaskConfig extends + com.google.protobuf.GeneratedMessage + implements OSSTaskConfigOrBuilder { + // Use OSSTaskConfig.newBuilder() to construct. + private OSSTaskConfig(Builder builder) { + super(builder); + } + private OSSTaskConfig(boolean noInit) {} + + private static final OSSTaskConfig defaultInstance; + public static OSSTaskConfig getDefaultInstance() { + return defaultInstance; + } + + public OSSTaskConfig getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_OSSTaskConfig_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_OSSTaskConfig_fieldAccessorTable; + } + + private int bitField0_; + // optional string ossPrefix = 1; + public static final int OSSPREFIX_FIELD_NUMBER = 1; + private java.lang.Object ossPrefix_; + public boolean hasOssPrefix() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getOssPrefix() { + java.lang.Object ref = ossPrefix_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + ossPrefix_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getOssPrefixBytes() { + java.lang.Object ref = ossPrefix_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + ossPrefix_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.TimeFormatter formatter = 2; + public static final int FORMATTER_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TimeFormatter formatter_; + public boolean hasFormatter() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TimeFormatter getFormatter() { + return formatter_; + } + + // optional string ossDirtyPrefix = 3; + public static final int OSSDIRTYPREFIX_FIELD_NUMBER = 3; + private java.lang.Object ossDirtyPrefix_; + public boolean hasOssDirtyPrefix() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public String getOssDirtyPrefix() { + java.lang.Object ref = ossDirtyPrefix_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + ossDirtyPrefix_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getOssDirtyPrefixBytes() { + java.lang.Object ref = ossDirtyPrefix_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + ossDirtyPrefix_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional string ossBucket = 4; + public static final int OSSBUCKET_FIELD_NUMBER = 4; + private java.lang.Object ossBucket_; + public boolean hasOssBucket() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public String getOssBucket() { + java.lang.Object ref = ossBucket_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + ossBucket_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getOssBucketBytes() { + java.lang.Object ref = ossBucket_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + ossBucket_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional string ossEndpoint = 5; + public static final int OSSENDPOINT_FIELD_NUMBER = 5; + private java.lang.Object ossEndpoint_; + public boolean hasOssEndpoint() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public String getOssEndpoint() { + java.lang.Object ref = ossEndpoint_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + ossEndpoint_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getOssEndpointBytes() { + java.lang.Object ref = ossEndpoint_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + ossEndpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional string ossStsRole = 6; + public static final int OSSSTSROLE_FIELD_NUMBER = 6; + private java.lang.Object ossStsRole_; + public boolean hasOssStsRole() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + public String getOssStsRole() { + java.lang.Object ref = ossStsRole_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + ossStsRole_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getOssStsRoleBytes() { + java.lang.Object ref = ossStsRole_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + ossStsRole_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.EventColumn eventTimeColumn = 7; + public static final int EVENTTIMECOLUMN_FIELD_NUMBER = 7; + private com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn eventTimeColumn_; + public boolean hasEventTimeColumn() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn getEventTimeColumn() { + return eventTimeColumn_; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumnOrBuilder getEventTimeColumnOrBuilder() { + return eventTimeColumn_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.Format format = 8; + public static final int FORMAT_FIELD_NUMBER = 8; + private com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.Format format_; + public boolean hasFormat() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.Format getFormat() { + return format_; + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.ParquetSchema schema = 11; + public static final int SCHEMA_FIELD_NUMBER = 11; + private java.util.List schema_; + public java.util.List getSchemaList() { + return schema_; + } + public java.util.List + getSchemaOrBuilderList() { + return schema_; + } + public int getSchemaCount() { + return schema_.size(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema getSchema(int index) { + return schema_.get(index); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchemaOrBuilder getSchemaOrBuilder( + int index) { + return schema_.get(index); + } + + private void initFields() { + ossPrefix_ = ""; + formatter_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TimeFormatter.YDMFormatter; + ossDirtyPrefix_ = ""; + ossBucket_ = ""; + ossEndpoint_ = ""; + ossStsRole_ = ""; + eventTimeColumn_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn.getDefaultInstance(); + format_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.Format.Parquet; + schema_ = java.util.Collections.emptyList(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getOssPrefixBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeEnum(2, formatter_.getNumber()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeBytes(3, getOssDirtyPrefixBytes()); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeBytes(4, getOssBucketBytes()); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeBytes(5, getOssEndpointBytes()); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeBytes(6, getOssStsRoleBytes()); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + output.writeMessage(7, eventTimeColumn_); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + output.writeEnum(8, format_.getNumber()); + } + for (int i = 0; i < schema_.size(); i++) { + output.writeMessage(11, schema_.get(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getOssPrefixBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, formatter_.getNumber()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, getOssDirtyPrefixBytes()); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(4, getOssBucketBytes()); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(5, getOssEndpointBytes()); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(6, getOssStsRoleBytes()); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, eventTimeColumn_); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(8, format_.getNumber()); + } + for (int i = 0; i < schema_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, schema_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_OSSTaskConfig_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_OSSTaskConfig_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getEventTimeColumnFieldBuilder(); + getSchemaFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + ossPrefix_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + formatter_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TimeFormatter.YDMFormatter; + bitField0_ = (bitField0_ & ~0x00000002); + ossDirtyPrefix_ = ""; + bitField0_ = (bitField0_ & ~0x00000004); + ossBucket_ = ""; + bitField0_ = (bitField0_ & ~0x00000008); + ossEndpoint_ = ""; + bitField0_ = (bitField0_ & ~0x00000010); + ossStsRole_ = ""; + bitField0_ = (bitField0_ & ~0x00000020); + if (eventTimeColumnBuilder_ == null) { + eventTimeColumn_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn.getDefaultInstance(); + } else { + eventTimeColumnBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000040); + format_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.Format.Parquet; + bitField0_ = (bitField0_ & ~0x00000080); + if (schemaBuilder_ == null) { + schema_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000100); + } else { + schemaBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig build() { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig result = new com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.ossPrefix_ = ossPrefix_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.formatter_ = formatter_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.ossDirtyPrefix_ = ossDirtyPrefix_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.ossBucket_ = ossBucket_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + result.ossEndpoint_ = ossEndpoint_; + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000020; + } + result.ossStsRole_ = ossStsRole_; + if (((from_bitField0_ & 0x00000040) == 0x00000040)) { + to_bitField0_ |= 0x00000040; + } + if (eventTimeColumnBuilder_ == null) { + result.eventTimeColumn_ = eventTimeColumn_; + } else { + result.eventTimeColumn_ = eventTimeColumnBuilder_.build(); + } + if (((from_bitField0_ & 0x00000080) == 0x00000080)) { + to_bitField0_ |= 0x00000080; + } + result.format_ = format_; + if (schemaBuilder_ == null) { + if (((bitField0_ & 0x00000100) == 0x00000100)) { + schema_ = java.util.Collections.unmodifiableList(schema_); + bitField0_ = (bitField0_ & ~0x00000100); + } + result.schema_ = schema_; + } else { + result.schema_ = schemaBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig.getDefaultInstance()) return this; + if (other.hasOssPrefix()) { + setOssPrefix(other.getOssPrefix()); + } + if (other.hasFormatter()) { + setFormatter(other.getFormatter()); + } + if (other.hasOssDirtyPrefix()) { + setOssDirtyPrefix(other.getOssDirtyPrefix()); + } + if (other.hasOssBucket()) { + setOssBucket(other.getOssBucket()); + } + if (other.hasOssEndpoint()) { + setOssEndpoint(other.getOssEndpoint()); + } + if (other.hasOssStsRole()) { + setOssStsRole(other.getOssStsRole()); + } + if (other.hasEventTimeColumn()) { + mergeEventTimeColumn(other.getEventTimeColumn()); + } + if (other.hasFormat()) { + setFormat(other.getFormat()); + } + if (schemaBuilder_ == null) { + if (!other.schema_.isEmpty()) { + if (schema_.isEmpty()) { + schema_ = other.schema_; + bitField0_ = (bitField0_ & ~0x00000100); + } else { + ensureSchemaIsMutable(); + schema_.addAll(other.schema_); + } + onChanged(); + } + } else { + if (!other.schema_.isEmpty()) { + if (schemaBuilder_.isEmpty()) { + schemaBuilder_.dispose(); + schemaBuilder_ = null; + schema_ = other.schema_; + bitField0_ = (bitField0_ & ~0x00000100); + schemaBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getSchemaFieldBuilder() : null; + } else { + schemaBuilder_.addAllMessages(other.schema_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + ossPrefix_ = input.readBytes(); + break; + } + case 16: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TimeFormatter value = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TimeFormatter.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(2, rawValue); + } else { + bitField0_ |= 0x00000002; + formatter_ = value; + } + break; + } + case 26: { + bitField0_ |= 0x00000004; + ossDirtyPrefix_ = input.readBytes(); + break; + } + case 34: { + bitField0_ |= 0x00000008; + ossBucket_ = input.readBytes(); + break; + } + case 42: { + bitField0_ |= 0x00000010; + ossEndpoint_ = input.readBytes(); + break; + } + case 50: { + bitField0_ |= 0x00000020; + ossStsRole_ = input.readBytes(); + break; + } + case 58: { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn.newBuilder(); + if (hasEventTimeColumn()) { + subBuilder.mergeFrom(getEventTimeColumn()); + } + input.readMessage(subBuilder, extensionRegistry); + setEventTimeColumn(subBuilder.buildPartial()); + break; + } + case 64: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.Format value = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.Format.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(8, rawValue); + } else { + bitField0_ |= 0x00000080; + format_ = value; + } + break; + } + case 90: { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addSchema(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // optional string ossPrefix = 1; + private java.lang.Object ossPrefix_ = ""; + public boolean hasOssPrefix() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getOssPrefix() { + java.lang.Object ref = ossPrefix_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + ossPrefix_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setOssPrefix(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + ossPrefix_ = value; + onChanged(); + return this; + } + public Builder clearOssPrefix() { + bitField0_ = (bitField0_ & ~0x00000001); + ossPrefix_ = getDefaultInstance().getOssPrefix(); + onChanged(); + return this; + } + void setOssPrefix(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + ossPrefix_ = value; + onChanged(); + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.TimeFormatter formatter = 2; + private com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TimeFormatter formatter_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TimeFormatter.YDMFormatter; + public boolean hasFormatter() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TimeFormatter getFormatter() { + return formatter_; + } + public Builder setFormatter(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TimeFormatter value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + formatter_ = value; + onChanged(); + return this; + } + public Builder clearFormatter() { + bitField0_ = (bitField0_ & ~0x00000002); + formatter_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TimeFormatter.YDMFormatter; + onChanged(); + return this; + } + + // optional string ossDirtyPrefix = 3; + private java.lang.Object ossDirtyPrefix_ = ""; + public boolean hasOssDirtyPrefix() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public String getOssDirtyPrefix() { + java.lang.Object ref = ossDirtyPrefix_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + ossDirtyPrefix_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setOssDirtyPrefix(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + ossDirtyPrefix_ = value; + onChanged(); + return this; + } + public Builder clearOssDirtyPrefix() { + bitField0_ = (bitField0_ & ~0x00000004); + ossDirtyPrefix_ = getDefaultInstance().getOssDirtyPrefix(); + onChanged(); + return this; + } + void setOssDirtyPrefix(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000004; + ossDirtyPrefix_ = value; + onChanged(); + } + + // optional string ossBucket = 4; + private java.lang.Object ossBucket_ = ""; + public boolean hasOssBucket() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public String getOssBucket() { + java.lang.Object ref = ossBucket_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + ossBucket_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setOssBucket(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + ossBucket_ = value; + onChanged(); + return this; + } + public Builder clearOssBucket() { + bitField0_ = (bitField0_ & ~0x00000008); + ossBucket_ = getDefaultInstance().getOssBucket(); + onChanged(); + return this; + } + void setOssBucket(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000008; + ossBucket_ = value; + onChanged(); + } + + // optional string ossEndpoint = 5; + private java.lang.Object ossEndpoint_ = ""; + public boolean hasOssEndpoint() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public String getOssEndpoint() { + java.lang.Object ref = ossEndpoint_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + ossEndpoint_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setOssEndpoint(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + ossEndpoint_ = value; + onChanged(); + return this; + } + public Builder clearOssEndpoint() { + bitField0_ = (bitField0_ & ~0x00000010); + ossEndpoint_ = getDefaultInstance().getOssEndpoint(); + onChanged(); + return this; + } + void setOssEndpoint(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000010; + ossEndpoint_ = value; + onChanged(); + } + + // optional string ossStsRole = 6; + private java.lang.Object ossStsRole_ = ""; + public boolean hasOssStsRole() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + public String getOssStsRole() { + java.lang.Object ref = ossStsRole_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + ossStsRole_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setOssStsRole(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + ossStsRole_ = value; + onChanged(); + return this; + } + public Builder clearOssStsRole() { + bitField0_ = (bitField0_ & ~0x00000020); + ossStsRole_ = getDefaultInstance().getOssStsRole(); + onChanged(); + return this; + } + void setOssStsRole(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000020; + ossStsRole_ = value; + onChanged(); + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.EventColumn eventTimeColumn = 7; + private com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn eventTimeColumn_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumnOrBuilder> eventTimeColumnBuilder_; + public boolean hasEventTimeColumn() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn getEventTimeColumn() { + if (eventTimeColumnBuilder_ == null) { + return eventTimeColumn_; + } else { + return eventTimeColumnBuilder_.getMessage(); + } + } + public Builder setEventTimeColumn(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn value) { + if (eventTimeColumnBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + eventTimeColumn_ = value; + onChanged(); + } else { + eventTimeColumnBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + return this; + } + public Builder setEventTimeColumn( + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn.Builder builderForValue) { + if (eventTimeColumnBuilder_ == null) { + eventTimeColumn_ = builderForValue.build(); + onChanged(); + } else { + eventTimeColumnBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + return this; + } + public Builder mergeEventTimeColumn(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn value) { + if (eventTimeColumnBuilder_ == null) { + if (((bitField0_ & 0x00000040) == 0x00000040) && + eventTimeColumn_ != com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn.getDefaultInstance()) { + eventTimeColumn_ = + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn.newBuilder(eventTimeColumn_).mergeFrom(value).buildPartial(); + } else { + eventTimeColumn_ = value; + } + onChanged(); + } else { + eventTimeColumnBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + return this; + } + public Builder clearEventTimeColumn() { + if (eventTimeColumnBuilder_ == null) { + eventTimeColumn_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn.getDefaultInstance(); + onChanged(); + } else { + eventTimeColumnBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000040); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn.Builder getEventTimeColumnBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getEventTimeColumnFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumnOrBuilder getEventTimeColumnOrBuilder() { + if (eventTimeColumnBuilder_ != null) { + return eventTimeColumnBuilder_.getMessageOrBuilder(); + } else { + return eventTimeColumn_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumnOrBuilder> + getEventTimeColumnFieldBuilder() { + if (eventTimeColumnBuilder_ == null) { + eventTimeColumnBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumnOrBuilder>( + eventTimeColumn_, + getParentForChildren(), + isClean()); + eventTimeColumn_ = null; + } + return eventTimeColumnBuilder_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.Format format = 8; + private com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.Format format_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.Format.Parquet; + public boolean hasFormat() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.Format getFormat() { + return format_; + } + public Builder setFormat(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.Format value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000080; + format_ = value; + onChanged(); + return this; + } + public Builder clearFormat() { + bitField0_ = (bitField0_ & ~0x00000080); + format_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.Format.Parquet; + onChanged(); + return this; + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.ParquetSchema schema = 11; + private java.util.List schema_ = + java.util.Collections.emptyList(); + private void ensureSchemaIsMutable() { + if (!((bitField0_ & 0x00000100) == 0x00000100)) { + schema_ = new java.util.ArrayList(schema_); + bitField0_ |= 0x00000100; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchemaOrBuilder> schemaBuilder_; + + public java.util.List getSchemaList() { + if (schemaBuilder_ == null) { + return java.util.Collections.unmodifiableList(schema_); + } else { + return schemaBuilder_.getMessageList(); + } + } + public int getSchemaCount() { + if (schemaBuilder_ == null) { + return schema_.size(); + } else { + return schemaBuilder_.getCount(); + } + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema getSchema(int index) { + if (schemaBuilder_ == null) { + return schema_.get(index); + } else { + return schemaBuilder_.getMessage(index); + } + } + public Builder setSchema( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema value) { + if (schemaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSchemaIsMutable(); + schema_.set(index, value); + onChanged(); + } else { + schemaBuilder_.setMessage(index, value); + } + return this; + } + public Builder setSchema( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema.Builder builderForValue) { + if (schemaBuilder_ == null) { + ensureSchemaIsMutable(); + schema_.set(index, builderForValue.build()); + onChanged(); + } else { + schemaBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + public Builder addSchema(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema value) { + if (schemaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSchemaIsMutable(); + schema_.add(value); + onChanged(); + } else { + schemaBuilder_.addMessage(value); + } + return this; + } + public Builder addSchema( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema value) { + if (schemaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSchemaIsMutable(); + schema_.add(index, value); + onChanged(); + } else { + schemaBuilder_.addMessage(index, value); + } + return this; + } + public Builder addSchema( + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema.Builder builderForValue) { + if (schemaBuilder_ == null) { + ensureSchemaIsMutable(); + schema_.add(builderForValue.build()); + onChanged(); + } else { + schemaBuilder_.addMessage(builderForValue.build()); + } + return this; + } + public Builder addSchema( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema.Builder builderForValue) { + if (schemaBuilder_ == null) { + ensureSchemaIsMutable(); + schema_.add(index, builderForValue.build()); + onChanged(); + } else { + schemaBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAllSchema( + java.lang.Iterable values) { + if (schemaBuilder_ == null) { + ensureSchemaIsMutable(); + super.addAll(values, schema_); + onChanged(); + } else { + schemaBuilder_.addAllMessages(values); + } + return this; + } + public Builder clearSchema() { + if (schemaBuilder_ == null) { + schema_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + } else { + schemaBuilder_.clear(); + } + return this; + } + public Builder removeSchema(int index) { + if (schemaBuilder_ == null) { + ensureSchemaIsMutable(); + schema_.remove(index); + onChanged(); + } else { + schemaBuilder_.remove(index); + } + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema.Builder getSchemaBuilder( + int index) { + return getSchemaFieldBuilder().getBuilder(index); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchemaOrBuilder getSchemaOrBuilder( + int index) { + if (schemaBuilder_ == null) { + return schema_.get(index); } else { + return schemaBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getSchemaOrBuilderList() { + if (schemaBuilder_ != null) { + return schemaBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(schema_); + } + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema.Builder addSchemaBuilder() { + return getSchemaFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema.getDefaultInstance()); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema.Builder addSchemaBuilder( + int index) { + return getSchemaFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema.getDefaultInstance()); + } + public java.util.List + getSchemaBuilderList() { + return getSchemaFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchemaOrBuilder> + getSchemaFieldBuilder() { + if (schemaBuilder_ == null) { + schemaBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchemaOrBuilder>( + schema_, + ((bitField0_ & 0x00000100) == 0x00000100), + getParentForChildren(), + isClean()); + schema_ = null; + } + return schemaBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.OSSTaskConfig) + } + + static { + defaultInstance = new OSSTaskConfig(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.OSSTaskConfig) + } + + public interface CreateDeliveryTaskResponseOrBuilder + extends com.google.protobuf.MessageOrBuilder { + } + public static final class CreateDeliveryTaskResponse extends + com.google.protobuf.GeneratedMessage + implements CreateDeliveryTaskResponseOrBuilder { + // Use CreateDeliveryTaskResponse.newBuilder() to construct. + private CreateDeliveryTaskResponse(Builder builder) { + super(builder); + } + private CreateDeliveryTaskResponse(boolean noInit) {} + + private static final CreateDeliveryTaskResponse defaultInstance; + public static CreateDeliveryTaskResponse getDefaultInstance() { + return defaultInstance; + } + + public CreateDeliveryTaskResponse getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateDeliveryTaskResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateDeliveryTaskResponse_fieldAccessorTable; + } + + private void initFields() { + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskResponse prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateDeliveryTaskResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateDeliveryTaskResponse_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskResponse.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskResponse.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskResponse build() { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskResponse buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskResponse(this); + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + } + } + } + + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.CreateDeliveryTaskResponse) + } + + static { + defaultInstance = new CreateDeliveryTaskResponse(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.CreateDeliveryTaskResponse) + } + + public interface DeleteDeliveryTaskRequestOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string tableName = 1; + boolean hasTableName(); + String getTableName(); + + // optional string taskName = 2; + boolean hasTaskName(); + String getTaskName(); + } + public static final class DeleteDeliveryTaskRequest extends + com.google.protobuf.GeneratedMessage + implements DeleteDeliveryTaskRequestOrBuilder { + // Use DeleteDeliveryTaskRequest.newBuilder() to construct. + private DeleteDeliveryTaskRequest(Builder builder) { + super(builder); + } + private DeleteDeliveryTaskRequest(boolean noInit) {} + + private static final DeleteDeliveryTaskRequest defaultInstance; + public static DeleteDeliveryTaskRequest getDefaultInstance() { + return defaultInstance; + } + + public DeleteDeliveryTaskRequest getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteDeliveryTaskRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteDeliveryTaskRequest_fieldAccessorTable; + } + + private int bitField0_; + // optional string tableName = 1; + public static final int TABLENAME_FIELD_NUMBER = 1; + private java.lang.Object tableName_; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + tableName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional string taskName = 2; + public static final int TASKNAME_FIELD_NUMBER = 2; + private java.lang.Object taskName_; + public boolean hasTaskName() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getTaskName() { + java.lang.Object ref = taskName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + taskName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTaskNameBytes() { + java.lang.Object ref = taskName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + taskName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + tableName_ = ""; + taskName_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getTaskNameBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getTaskNameBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskRequest prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteDeliveryTaskRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteDeliveryTaskRequest_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + tableName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + taskName_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskRequest.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskRequest.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskRequest build() { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskRequest buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.tableName_ = tableName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.taskName_ = taskName_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskRequest.getDefaultInstance()) return this; + if (other.hasTableName()) { + setTableName(other.getTableName()); + } + if (other.hasTaskName()) { + setTaskName(other.getTaskName()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + tableName_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + taskName_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // optional string tableName = 1; + private java.lang.Object tableName_ = ""; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + tableName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setTableName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + return this; + } + public Builder clearTableName() { + bitField0_ = (bitField0_ & ~0x00000001); + tableName_ = getDefaultInstance().getTableName(); + onChanged(); + return this; + } + void setTableName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + } + + // optional string taskName = 2; + private java.lang.Object taskName_ = ""; + public boolean hasTaskName() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getTaskName() { + java.lang.Object ref = taskName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + taskName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setTaskName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + taskName_ = value; + onChanged(); + return this; + } + public Builder clearTaskName() { + bitField0_ = (bitField0_ & ~0x00000002); + taskName_ = getDefaultInstance().getTaskName(); + onChanged(); + return this; + } + void setTaskName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000002; + taskName_ = value; + onChanged(); + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.DeleteDeliveryTaskRequest) + } + + static { + defaultInstance = new DeleteDeliveryTaskRequest(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.DeleteDeliveryTaskRequest) + } + + public interface DeleteDeliveryTaskResponseOrBuilder + extends com.google.protobuf.MessageOrBuilder { + } + public static final class DeleteDeliveryTaskResponse extends + com.google.protobuf.GeneratedMessage + implements DeleteDeliveryTaskResponseOrBuilder { + // Use DeleteDeliveryTaskResponse.newBuilder() to construct. + private DeleteDeliveryTaskResponse(Builder builder) { + super(builder); + } + private DeleteDeliveryTaskResponse(boolean noInit) {} + + private static final DeleteDeliveryTaskResponse defaultInstance; + public static DeleteDeliveryTaskResponse getDefaultInstance() { + return defaultInstance; + } + + public DeleteDeliveryTaskResponse getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteDeliveryTaskResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteDeliveryTaskResponse_fieldAccessorTable; + } + + private void initFields() { + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskResponse prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteDeliveryTaskResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteDeliveryTaskResponse_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskResponse.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskResponse.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskResponse build() { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskResponse buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskResponse(this); + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + } + } + } + + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.DeleteDeliveryTaskResponse) + } + + static { + defaultInstance = new DeleteDeliveryTaskResponse(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.DeleteDeliveryTaskResponse) + } + + public interface DescribeDeliveryTaskRequestOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string tableName = 1; + boolean hasTableName(); + String getTableName(); + + // optional string taskName = 2; + boolean hasTaskName(); + String getTaskName(); + } + public static final class DescribeDeliveryTaskRequest extends + com.google.protobuf.GeneratedMessage + implements DescribeDeliveryTaskRequestOrBuilder { + // Use DescribeDeliveryTaskRequest.newBuilder() to construct. + private DescribeDeliveryTaskRequest(Builder builder) { + super(builder); + } + private DescribeDeliveryTaskRequest(boolean noInit) {} + + private static final DescribeDeliveryTaskRequest defaultInstance; + public static DescribeDeliveryTaskRequest getDefaultInstance() { + return defaultInstance; + } + + public DescribeDeliveryTaskRequest getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeDeliveryTaskRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeDeliveryTaskRequest_fieldAccessorTable; + } + + private int bitField0_; + // optional string tableName = 1; + public static final int TABLENAME_FIELD_NUMBER = 1; + private java.lang.Object tableName_; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + tableName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional string taskName = 2; + public static final int TASKNAME_FIELD_NUMBER = 2; + private java.lang.Object taskName_; + public boolean hasTaskName() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getTaskName() { + java.lang.Object ref = taskName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + taskName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTaskNameBytes() { + java.lang.Object ref = taskName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + taskName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + tableName_ = ""; + taskName_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getTaskNameBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getTaskNameBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskRequest prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeDeliveryTaskRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeDeliveryTaskRequest_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + tableName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + taskName_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskRequest.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskRequest.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskRequest build() { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskRequest buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.tableName_ = tableName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.taskName_ = taskName_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskRequest.getDefaultInstance()) return this; + if (other.hasTableName()) { + setTableName(other.getTableName()); + } + if (other.hasTaskName()) { + setTaskName(other.getTaskName()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + tableName_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + taskName_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // optional string tableName = 1; + private java.lang.Object tableName_ = ""; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + tableName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setTableName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + return this; + } + public Builder clearTableName() { + bitField0_ = (bitField0_ & ~0x00000001); + tableName_ = getDefaultInstance().getTableName(); + onChanged(); + return this; + } + void setTableName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + } + + // optional string taskName = 2; + private java.lang.Object taskName_ = ""; + public boolean hasTaskName() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getTaskName() { + java.lang.Object ref = taskName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + taskName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setTaskName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + taskName_ = value; + onChanged(); + return this; + } + public Builder clearTaskName() { + bitField0_ = (bitField0_ & ~0x00000002); + taskName_ = getDefaultInstance().getTaskName(); + onChanged(); + return this; + } + void setTaskName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000002; + taskName_ = value; + onChanged(); + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.DescribeDeliveryTaskRequest) + } + + static { + defaultInstance = new DescribeDeliveryTaskRequest(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.DescribeDeliveryTaskRequest) + } + + public interface DescribeDeliveryTaskResponseOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional .com.alicloud.openservices.tablestore.core.protocol.OSSTaskConfig taskConfig = 1; + boolean hasTaskConfig(); + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig getTaskConfig(); + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfigOrBuilder getTaskConfigOrBuilder(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.TaskSyncStat task_sync_stat = 2; + boolean hasTaskSyncStat(); + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat getTaskSyncStat(); + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStatOrBuilder getTaskSyncStatOrBuilder(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.DeliveryTaskType taskType = 3; + boolean hasTaskType(); + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskType getTaskType(); + } + public static final class DescribeDeliveryTaskResponse extends + com.google.protobuf.GeneratedMessage + implements DescribeDeliveryTaskResponseOrBuilder { + // Use DescribeDeliveryTaskResponse.newBuilder() to construct. + private DescribeDeliveryTaskResponse(Builder builder) { + super(builder); + } + private DescribeDeliveryTaskResponse(boolean noInit) {} + + private static final DescribeDeliveryTaskResponse defaultInstance; + public static DescribeDeliveryTaskResponse getDefaultInstance() { + return defaultInstance; + } + + public DescribeDeliveryTaskResponse getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeDeliveryTaskResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeDeliveryTaskResponse_fieldAccessorTable; + } + + private int bitField0_; + // optional .com.alicloud.openservices.tablestore.core.protocol.OSSTaskConfig taskConfig = 1; + public static final int TASKCONFIG_FIELD_NUMBER = 1; + private com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig taskConfig_; + public boolean hasTaskConfig() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig getTaskConfig() { + return taskConfig_; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfigOrBuilder getTaskConfigOrBuilder() { + return taskConfig_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.TaskSyncStat task_sync_stat = 2; + public static final int TASK_SYNC_STAT_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat taskSyncStat_; + public boolean hasTaskSyncStat() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat getTaskSyncStat() { + return taskSyncStat_; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStatOrBuilder getTaskSyncStatOrBuilder() { + return taskSyncStat_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.DeliveryTaskType taskType = 3; + public static final int TASKTYPE_FIELD_NUMBER = 3; + private com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskType taskType_; + public boolean hasTaskType() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskType getTaskType() { + return taskType_; + } + + private void initFields() { + taskConfig_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig.getDefaultInstance(); + taskSyncStat_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat.getDefaultInstance(); + taskType_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskType.BASE; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(1, taskConfig_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeMessage(2, taskSyncStat_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeEnum(3, taskType_.getNumber()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, taskConfig_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, taskSyncStat_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, taskType_.getNumber()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskResponse prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeDeliveryTaskResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeDeliveryTaskResponse_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getTaskConfigFieldBuilder(); + getTaskSyncStatFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (taskConfigBuilder_ == null) { + taskConfig_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig.getDefaultInstance(); + } else { + taskConfigBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (taskSyncStatBuilder_ == null) { + taskSyncStat_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat.getDefaultInstance(); + } else { + taskSyncStatBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + taskType_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskType.BASE; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskResponse.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskResponse.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskResponse build() { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskResponse buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskResponse(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + if (taskConfigBuilder_ == null) { + result.taskConfig_ = taskConfig_; + } else { + result.taskConfig_ = taskConfigBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + if (taskSyncStatBuilder_ == null) { + result.taskSyncStat_ = taskSyncStat_; + } else { + result.taskSyncStat_ = taskSyncStatBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.taskType_ = taskType_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskResponse.getDefaultInstance()) return this; + if (other.hasTaskConfig()) { + mergeTaskConfig(other.getTaskConfig()); + } + if (other.hasTaskSyncStat()) { + mergeTaskSyncStat(other.getTaskSyncStat()); + } + if (other.hasTaskType()) { + setTaskType(other.getTaskType()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig.newBuilder(); + if (hasTaskConfig()) { + subBuilder.mergeFrom(getTaskConfig()); + } + input.readMessage(subBuilder, extensionRegistry); + setTaskConfig(subBuilder.buildPartial()); + break; + } + case 18: { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat.newBuilder(); + if (hasTaskSyncStat()) { + subBuilder.mergeFrom(getTaskSyncStat()); + } + input.readMessage(subBuilder, extensionRegistry); + setTaskSyncStat(subBuilder.buildPartial()); + break; + } + case 24: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskType value = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(3, rawValue); + } else { + bitField0_ |= 0x00000004; + taskType_ = value; + } + break; + } + } + } + } + + private int bitField0_; + + // optional .com.alicloud.openservices.tablestore.core.protocol.OSSTaskConfig taskConfig = 1; + private com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig taskConfig_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfigOrBuilder> taskConfigBuilder_; + public boolean hasTaskConfig() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig getTaskConfig() { + if (taskConfigBuilder_ == null) { + return taskConfig_; + } else { + return taskConfigBuilder_.getMessage(); + } + } + public Builder setTaskConfig(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig value) { + if (taskConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + taskConfig_ = value; + onChanged(); + } else { + taskConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder setTaskConfig( + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig.Builder builderForValue) { + if (taskConfigBuilder_ == null) { + taskConfig_ = builderForValue.build(); + onChanged(); + } else { + taskConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder mergeTaskConfig(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig value) { + if (taskConfigBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001) && + taskConfig_ != com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig.getDefaultInstance()) { + taskConfig_ = + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig.newBuilder(taskConfig_).mergeFrom(value).buildPartial(); + } else { + taskConfig_ = value; + } + onChanged(); + } else { + taskConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder clearTaskConfig() { + if (taskConfigBuilder_ == null) { + taskConfig_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig.getDefaultInstance(); + onChanged(); + } else { + taskConfigBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig.Builder getTaskConfigBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getTaskConfigFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfigOrBuilder getTaskConfigOrBuilder() { + if (taskConfigBuilder_ != null) { + return taskConfigBuilder_.getMessageOrBuilder(); + } else { + return taskConfig_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfigOrBuilder> + getTaskConfigFieldBuilder() { + if (taskConfigBuilder_ == null) { + taskConfigBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfigOrBuilder>( + taskConfig_, + getParentForChildren(), + isClean()); + taskConfig_ = null; + } + return taskConfigBuilder_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.TaskSyncStat task_sync_stat = 2; + private com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat taskSyncStat_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStatOrBuilder> taskSyncStatBuilder_; + public boolean hasTaskSyncStat() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat getTaskSyncStat() { + if (taskSyncStatBuilder_ == null) { + return taskSyncStat_; + } else { + return taskSyncStatBuilder_.getMessage(); + } + } + public Builder setTaskSyncStat(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat value) { + if (taskSyncStatBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + taskSyncStat_ = value; + onChanged(); + } else { + taskSyncStatBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder setTaskSyncStat( + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat.Builder builderForValue) { + if (taskSyncStatBuilder_ == null) { + taskSyncStat_ = builderForValue.build(); + onChanged(); + } else { + taskSyncStatBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder mergeTaskSyncStat(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat value) { + if (taskSyncStatBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002) && + taskSyncStat_ != com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat.getDefaultInstance()) { + taskSyncStat_ = + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat.newBuilder(taskSyncStat_).mergeFrom(value).buildPartial(); + } else { + taskSyncStat_ = value; + } + onChanged(); + } else { + taskSyncStatBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder clearTaskSyncStat() { + if (taskSyncStatBuilder_ == null) { + taskSyncStat_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat.getDefaultInstance(); + onChanged(); + } else { + taskSyncStatBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat.Builder getTaskSyncStatBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getTaskSyncStatFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStatOrBuilder getTaskSyncStatOrBuilder() { + if (taskSyncStatBuilder_ != null) { + return taskSyncStatBuilder_.getMessageOrBuilder(); + } else { + return taskSyncStat_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStatOrBuilder> + getTaskSyncStatFieldBuilder() { + if (taskSyncStatBuilder_ == null) { + taskSyncStatBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStatOrBuilder>( + taskSyncStat_, + getParentForChildren(), + isClean()); + taskSyncStat_ = null; + } + return taskSyncStatBuilder_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.DeliveryTaskType taskType = 3; + private com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskType taskType_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskType.BASE; + public boolean hasTaskType() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskType getTaskType() { + return taskType_; + } + public Builder setTaskType(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + taskType_ = value; + onChanged(); + return this; + } + public Builder clearTaskType() { + bitField0_ = (bitField0_ & ~0x00000004); + taskType_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskType.BASE; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.DescribeDeliveryTaskResponse) + } + + static { + defaultInstance = new DescribeDeliveryTaskResponse(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.DescribeDeliveryTaskResponse) + } + + public interface TaskSyncStatOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional .com.alicloud.openservices.tablestore.core.protocol.TaskSyncStat.TaskSyncPhase task_sync_phase = 1; + boolean hasTaskSyncPhase(); + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat.TaskSyncPhase getTaskSyncPhase(); + + // optional int64 current_sync_timestamp = 2; + boolean hasCurrentSyncTimestamp(); + long getCurrentSyncTimestamp(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.ErrorType error_code = 3; + boolean hasErrorCode(); + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ErrorType getErrorCode(); + + // optional string detail = 4; + boolean hasDetail(); + String getDetail(); + } + public static final class TaskSyncStat extends + com.google.protobuf.GeneratedMessage + implements TaskSyncStatOrBuilder { + // Use TaskSyncStat.newBuilder() to construct. + private TaskSyncStat(Builder builder) { + super(builder); + } + private TaskSyncStat(boolean noInit) {} + + private static final TaskSyncStat defaultInstance; + public static TaskSyncStat getDefaultInstance() { + return defaultInstance; + } + + public TaskSyncStat getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_TaskSyncStat_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_TaskSyncStat_fieldAccessorTable; + } + + public enum TaskSyncPhase + implements com.google.protobuf.ProtocolMessageEnum { + INIT(0, 0), + FULL(1, 1), + INCR(2, 2), + ; + + public static final int INIT_VALUE = 0; + public static final int FULL_VALUE = 1; + public static final int INCR_VALUE = 2; + + + public final int getNumber() { return value; } + + public static TaskSyncPhase valueOf(int value) { + switch (value) { + case 0: return INIT; + case 1: return FULL; + case 2: return INCR; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public TaskSyncPhase findValueByNumber(int number) { + return TaskSyncPhase.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat.getDescriptor().getEnumTypes().get(0); + } + + private static final TaskSyncPhase[] VALUES = { + INIT, FULL, INCR, + }; + + public static TaskSyncPhase valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private TaskSyncPhase(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:com.alicloud.openservices.tablestore.core.protocol.TaskSyncStat.TaskSyncPhase) + } + + private int bitField0_; + // optional .com.alicloud.openservices.tablestore.core.protocol.TaskSyncStat.TaskSyncPhase task_sync_phase = 1; + public static final int TASK_SYNC_PHASE_FIELD_NUMBER = 1; + private com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat.TaskSyncPhase taskSyncPhase_; + public boolean hasTaskSyncPhase() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat.TaskSyncPhase getTaskSyncPhase() { + return taskSyncPhase_; + } + + // optional int64 current_sync_timestamp = 2; + public static final int CURRENT_SYNC_TIMESTAMP_FIELD_NUMBER = 2; + private long currentSyncTimestamp_; + public boolean hasCurrentSyncTimestamp() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public long getCurrentSyncTimestamp() { + return currentSyncTimestamp_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.ErrorType error_code = 3; + public static final int ERROR_CODE_FIELD_NUMBER = 3; + private com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ErrorType errorCode_; + public boolean hasErrorCode() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ErrorType getErrorCode() { + return errorCode_; + } + + // optional string detail = 4; + public static final int DETAIL_FIELD_NUMBER = 4; + private java.lang.Object detail_; + public boolean hasDetail() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public String getDetail() { + java.lang.Object ref = detail_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + detail_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getDetailBytes() { + java.lang.Object ref = detail_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + detail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + taskSyncPhase_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat.TaskSyncPhase.INIT; + currentSyncTimestamp_ = 0L; + errorCode_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ErrorType.OK; + detail_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeEnum(1, taskSyncPhase_.getNumber()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeInt64(2, currentSyncTimestamp_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeEnum(3, errorCode_.getNumber()); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeBytes(4, getDetailBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, taskSyncPhase_.getNumber()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, currentSyncTimestamp_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, errorCode_.getNumber()); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(4, getDetailBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStatOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_TaskSyncStat_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_TaskSyncStat_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + taskSyncPhase_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat.TaskSyncPhase.INIT; + bitField0_ = (bitField0_ & ~0x00000001); + currentSyncTimestamp_ = 0L; + bitField0_ = (bitField0_ & ~0x00000002); + errorCode_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ErrorType.OK; + bitField0_ = (bitField0_ & ~0x00000004); + detail_ = ""; + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat build() { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat result = new com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.taskSyncPhase_ = taskSyncPhase_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.currentSyncTimestamp_ = currentSyncTimestamp_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.errorCode_ = errorCode_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.detail_ = detail_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat.getDefaultInstance()) return this; + if (other.hasTaskSyncPhase()) { + setTaskSyncPhase(other.getTaskSyncPhase()); + } + if (other.hasCurrentSyncTimestamp()) { + setCurrentSyncTimestamp(other.getCurrentSyncTimestamp()); + } + if (other.hasErrorCode()) { + setErrorCode(other.getErrorCode()); + } + if (other.hasDetail()) { + setDetail(other.getDetail()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat.TaskSyncPhase value = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat.TaskSyncPhase.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + taskSyncPhase_ = value; + } + break; + } + case 16: { + bitField0_ |= 0x00000002; + currentSyncTimestamp_ = input.readInt64(); + break; + } + case 24: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ErrorType value = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ErrorType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(3, rawValue); + } else { + bitField0_ |= 0x00000004; + errorCode_ = value; + } + break; + } + case 34: { + bitField0_ |= 0x00000008; + detail_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // optional .com.alicloud.openservices.tablestore.core.protocol.TaskSyncStat.TaskSyncPhase task_sync_phase = 1; + private com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat.TaskSyncPhase taskSyncPhase_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat.TaskSyncPhase.INIT; + public boolean hasTaskSyncPhase() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat.TaskSyncPhase getTaskSyncPhase() { + return taskSyncPhase_; + } + public Builder setTaskSyncPhase(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat.TaskSyncPhase value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + taskSyncPhase_ = value; + onChanged(); + return this; + } + public Builder clearTaskSyncPhase() { + bitField0_ = (bitField0_ & ~0x00000001); + taskSyncPhase_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat.TaskSyncPhase.INIT; + onChanged(); + return this; + } + + // optional int64 current_sync_timestamp = 2; + private long currentSyncTimestamp_ ; + public boolean hasCurrentSyncTimestamp() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public long getCurrentSyncTimestamp() { + return currentSyncTimestamp_; + } + public Builder setCurrentSyncTimestamp(long value) { + bitField0_ |= 0x00000002; + currentSyncTimestamp_ = value; + onChanged(); + return this; + } + public Builder clearCurrentSyncTimestamp() { + bitField0_ = (bitField0_ & ~0x00000002); + currentSyncTimestamp_ = 0L; + onChanged(); + return this; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.ErrorType error_code = 3; + private com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ErrorType errorCode_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ErrorType.OK; + public boolean hasErrorCode() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ErrorType getErrorCode() { + return errorCode_; + } + public Builder setErrorCode(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ErrorType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + errorCode_ = value; + onChanged(); + return this; + } + public Builder clearErrorCode() { + bitField0_ = (bitField0_ & ~0x00000004); + errorCode_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ErrorType.OK; + onChanged(); + return this; + } + + // optional string detail = 4; + private java.lang.Object detail_ = ""; + public boolean hasDetail() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public String getDetail() { + java.lang.Object ref = detail_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + detail_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setDetail(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + detail_ = value; + onChanged(); + return this; + } + public Builder clearDetail() { + bitField0_ = (bitField0_ & ~0x00000008); + detail_ = getDefaultInstance().getDetail(); + onChanged(); + return this; + } + void setDetail(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000008; + detail_ = value; + onChanged(); + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.TaskSyncStat) + } + + static { + defaultInstance = new TaskSyncStat(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.TaskSyncStat) + } + + public interface UpdateDeliveryTaskRequestOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string table = 1; + boolean hasTable(); + String getTable(); + + // optional string taskName = 2; + boolean hasTaskName(); + String getTaskName(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.OSSTaskConfig taskConfig = 5; + boolean hasTaskConfig(); + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig getTaskConfig(); + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfigOrBuilder getTaskConfigOrBuilder(); + } + public static final class UpdateDeliveryTaskRequest extends + com.google.protobuf.GeneratedMessage + implements UpdateDeliveryTaskRequestOrBuilder { + // Use UpdateDeliveryTaskRequest.newBuilder() to construct. + private UpdateDeliveryTaskRequest(Builder builder) { + super(builder); + } + private UpdateDeliveryTaskRequest(boolean noInit) {} + + private static final UpdateDeliveryTaskRequest defaultInstance; + public static UpdateDeliveryTaskRequest getDefaultInstance() { + return defaultInstance; + } + + public UpdateDeliveryTaskRequest getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateDeliveryTaskRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateDeliveryTaskRequest_fieldAccessorTable; + } + + private int bitField0_; + // optional string table = 1; + public static final int TABLE_FIELD_NUMBER = 1; + private java.lang.Object table_; + public boolean hasTable() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTable() { + java.lang.Object ref = table_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + table_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTableBytes() { + java.lang.Object ref = table_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + table_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional string taskName = 2; + public static final int TASKNAME_FIELD_NUMBER = 2; + private java.lang.Object taskName_; + public boolean hasTaskName() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getTaskName() { + java.lang.Object ref = taskName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + taskName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTaskNameBytes() { + java.lang.Object ref = taskName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + taskName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.OSSTaskConfig taskConfig = 5; + public static final int TASKCONFIG_FIELD_NUMBER = 5; + private com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig taskConfig_; + public boolean hasTaskConfig() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig getTaskConfig() { + return taskConfig_; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfigOrBuilder getTaskConfigOrBuilder() { + return taskConfig_; + } + + private void initFields() { + table_ = ""; + taskName_ = ""; + taskConfig_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getTableBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getTaskNameBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeMessage(5, taskConfig_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getTableBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getTaskNameBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, taskConfig_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskRequest prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateDeliveryTaskRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateDeliveryTaskRequest_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getTaskConfigFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + table_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + taskName_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + if (taskConfigBuilder_ == null) { + taskConfig_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig.getDefaultInstance(); + } else { + taskConfigBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskRequest.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskRequest.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskRequest build() { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskRequest buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.table_ = table_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.taskName_ = taskName_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + if (taskConfigBuilder_ == null) { + result.taskConfig_ = taskConfig_; + } else { + result.taskConfig_ = taskConfigBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskRequest.getDefaultInstance()) return this; + if (other.hasTable()) { + setTable(other.getTable()); + } + if (other.hasTaskName()) { + setTaskName(other.getTaskName()); + } + if (other.hasTaskConfig()) { + mergeTaskConfig(other.getTaskConfig()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + table_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + taskName_ = input.readBytes(); + break; + } + case 42: { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig.newBuilder(); + if (hasTaskConfig()) { + subBuilder.mergeFrom(getTaskConfig()); + } + input.readMessage(subBuilder, extensionRegistry); + setTaskConfig(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // optional string table = 1; + private java.lang.Object table_ = ""; + public boolean hasTable() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTable() { + java.lang.Object ref = table_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + table_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setTable(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + table_ = value; + onChanged(); + return this; + } + public Builder clearTable() { + bitField0_ = (bitField0_ & ~0x00000001); + table_ = getDefaultInstance().getTable(); + onChanged(); + return this; + } + void setTable(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + table_ = value; + onChanged(); + } + + // optional string taskName = 2; + private java.lang.Object taskName_ = ""; + public boolean hasTaskName() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getTaskName() { + java.lang.Object ref = taskName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + taskName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setTaskName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + taskName_ = value; + onChanged(); + return this; + } + public Builder clearTaskName() { + bitField0_ = (bitField0_ & ~0x00000002); + taskName_ = getDefaultInstance().getTaskName(); + onChanged(); + return this; + } + void setTaskName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000002; + taskName_ = value; + onChanged(); + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.OSSTaskConfig taskConfig = 5; + private com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig taskConfig_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfigOrBuilder> taskConfigBuilder_; + public boolean hasTaskConfig() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig getTaskConfig() { + if (taskConfigBuilder_ == null) { + return taskConfig_; + } else { + return taskConfigBuilder_.getMessage(); + } + } + public Builder setTaskConfig(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig value) { + if (taskConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + taskConfig_ = value; + onChanged(); + } else { + taskConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder setTaskConfig( + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig.Builder builderForValue) { + if (taskConfigBuilder_ == null) { + taskConfig_ = builderForValue.build(); + onChanged(); + } else { + taskConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder mergeTaskConfig(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig value) { + if (taskConfigBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004) && + taskConfig_ != com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig.getDefaultInstance()) { + taskConfig_ = + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig.newBuilder(taskConfig_).mergeFrom(value).buildPartial(); + } else { + taskConfig_ = value; + } + onChanged(); + } else { + taskConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder clearTaskConfig() { + if (taskConfigBuilder_ == null) { + taskConfig_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig.getDefaultInstance(); + onChanged(); + } else { + taskConfigBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig.Builder getTaskConfigBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getTaskConfigFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfigOrBuilder getTaskConfigOrBuilder() { + if (taskConfigBuilder_ != null) { + return taskConfigBuilder_.getMessageOrBuilder(); + } else { + return taskConfig_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfigOrBuilder> + getTaskConfigFieldBuilder() { + if (taskConfigBuilder_ == null) { + taskConfigBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfigOrBuilder>( + taskConfig_, + getParentForChildren(), + isClean()); + taskConfig_ = null; + } + return taskConfigBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.UpdateDeliveryTaskRequest) + } + + static { + defaultInstance = new UpdateDeliveryTaskRequest(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.UpdateDeliveryTaskRequest) + } + + public interface UpdateDeliveryTaskResponseOrBuilder + extends com.google.protobuf.MessageOrBuilder { + } + public static final class UpdateDeliveryTaskResponse extends + com.google.protobuf.GeneratedMessage + implements UpdateDeliveryTaskResponseOrBuilder { + // Use UpdateDeliveryTaskResponse.newBuilder() to construct. + private UpdateDeliveryTaskResponse(Builder builder) { + super(builder); + } + private UpdateDeliveryTaskResponse(boolean noInit) {} + + private static final UpdateDeliveryTaskResponse defaultInstance; + public static UpdateDeliveryTaskResponse getDefaultInstance() { + return defaultInstance; + } + + public UpdateDeliveryTaskResponse getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateDeliveryTaskResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateDeliveryTaskResponse_fieldAccessorTable; + } + + private void initFields() { + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskResponse prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateDeliveryTaskResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateDeliveryTaskResponse_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskResponse.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskResponse.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskResponse build() { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskResponse buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskResponse(this); + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + } + } + } + + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.UpdateDeliveryTaskResponse) + } + + static { + defaultInstance = new UpdateDeliveryTaskResponse(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.UpdateDeliveryTaskResponse) + } + + public interface ListDeliveryTaskRequestOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string tableName = 1; + boolean hasTableName(); + String getTableName(); + } + public static final class ListDeliveryTaskRequest extends + com.google.protobuf.GeneratedMessage + implements ListDeliveryTaskRequestOrBuilder { + // Use ListDeliveryTaskRequest.newBuilder() to construct. + private ListDeliveryTaskRequest(Builder builder) { + super(builder); + } + private ListDeliveryTaskRequest(boolean noInit) {} + + private static final ListDeliveryTaskRequest defaultInstance; + public static ListDeliveryTaskRequest getDefaultInstance() { + return defaultInstance; + } + + public ListDeliveryTaskRequest getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListDeliveryTaskRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListDeliveryTaskRequest_fieldAccessorTable; + } + + private int bitField0_; + // optional string tableName = 1; + public static final int TABLENAME_FIELD_NUMBER = 1; + private java.lang.Object tableName_; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + tableName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + tableName_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getTableNameBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getTableNameBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskRequest prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListDeliveryTaskRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListDeliveryTaskRequest_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + tableName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskRequest.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskRequest.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskRequest build() { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskRequest buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.tableName_ = tableName_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskRequest.getDefaultInstance()) return this; + if (other.hasTableName()) { + setTableName(other.getTableName()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + tableName_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // optional string tableName = 1; + private java.lang.Object tableName_ = ""; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + tableName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setTableName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + return this; + } + public Builder clearTableName() { + bitField0_ = (bitField0_ & ~0x00000001); + tableName_ = getDefaultInstance().getTableName(); + onChanged(); + return this; + } + void setTableName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.ListDeliveryTaskRequest) + } + + static { + defaultInstance = new ListDeliveryTaskRequest(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.ListDeliveryTaskRequest) + } + + public interface ListDeliveryTaskResponseOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // repeated .com.alicloud.openservices.tablestore.core.protocol.DeliveryTaskInfo tasks = 1; + java.util.List + getTasksList(); + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfo getTasks(int index); + int getTasksCount(); + java.util.List + getTasksOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfoOrBuilder getTasksOrBuilder( + int index); + } + public static final class ListDeliveryTaskResponse extends + com.google.protobuf.GeneratedMessage + implements ListDeliveryTaskResponseOrBuilder { + // Use ListDeliveryTaskResponse.newBuilder() to construct. + private ListDeliveryTaskResponse(Builder builder) { + super(builder); + } + private ListDeliveryTaskResponse(boolean noInit) {} + + private static final ListDeliveryTaskResponse defaultInstance; + public static ListDeliveryTaskResponse getDefaultInstance() { + return defaultInstance; + } + + public ListDeliveryTaskResponse getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListDeliveryTaskResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListDeliveryTaskResponse_fieldAccessorTable; + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.DeliveryTaskInfo tasks = 1; + public static final int TASKS_FIELD_NUMBER = 1; + private java.util.List tasks_; + public java.util.List getTasksList() { + return tasks_; + } + public java.util.List + getTasksOrBuilderList() { + return tasks_; + } + public int getTasksCount() { + return tasks_.size(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfo getTasks(int index) { + return tasks_.get(index); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfoOrBuilder getTasksOrBuilder( + int index) { + return tasks_.get(index); + } + + private void initFields() { + tasks_ = java.util.Collections.emptyList(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < tasks_.size(); i++) { + output.writeMessage(1, tasks_.get(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < tasks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, tasks_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskResponse prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListDeliveryTaskResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListDeliveryTaskResponse_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getTasksFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (tasksBuilder_ == null) { + tasks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + tasksBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskResponse.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskResponse.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskResponse build() { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskResponse buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskResponse(this); + int from_bitField0_ = bitField0_; + if (tasksBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + tasks_ = java.util.Collections.unmodifiableList(tasks_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.tasks_ = tasks_; + } else { + result.tasks_ = tasksBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskResponse.getDefaultInstance()) return this; + if (tasksBuilder_ == null) { + if (!other.tasks_.isEmpty()) { + if (tasks_.isEmpty()) { + tasks_ = other.tasks_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTasksIsMutable(); + tasks_.addAll(other.tasks_); + } + onChanged(); + } + } else { + if (!other.tasks_.isEmpty()) { + if (tasksBuilder_.isEmpty()) { + tasksBuilder_.dispose(); + tasksBuilder_ = null; + tasks_ = other.tasks_; + bitField0_ = (bitField0_ & ~0x00000001); + tasksBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getTasksFieldBuilder() : null; + } else { + tasksBuilder_.addAllMessages(other.tasks_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfo.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfo.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addTasks(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // repeated .com.alicloud.openservices.tablestore.core.protocol.DeliveryTaskInfo tasks = 1; + private java.util.List tasks_ = + java.util.Collections.emptyList(); + private void ensureTasksIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + tasks_ = new java.util.ArrayList(tasks_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfo, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfo.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfoOrBuilder> tasksBuilder_; + + public java.util.List getTasksList() { + if (tasksBuilder_ == null) { + return java.util.Collections.unmodifiableList(tasks_); + } else { + return tasksBuilder_.getMessageList(); + } + } + public int getTasksCount() { + if (tasksBuilder_ == null) { + return tasks_.size(); + } else { + return tasksBuilder_.getCount(); + } + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfo getTasks(int index) { + if (tasksBuilder_ == null) { + return tasks_.get(index); + } else { + return tasksBuilder_.getMessage(index); + } + } + public Builder setTasks( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfo value) { + if (tasksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTasksIsMutable(); + tasks_.set(index, value); + onChanged(); + } else { + tasksBuilder_.setMessage(index, value); + } + return this; + } + public Builder setTasks( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfo.Builder builderForValue) { + if (tasksBuilder_ == null) { + ensureTasksIsMutable(); + tasks_.set(index, builderForValue.build()); + onChanged(); + } else { + tasksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + public Builder addTasks(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfo value) { + if (tasksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTasksIsMutable(); + tasks_.add(value); + onChanged(); + } else { + tasksBuilder_.addMessage(value); + } + return this; + } + public Builder addTasks( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfo value) { + if (tasksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTasksIsMutable(); + tasks_.add(index, value); + onChanged(); + } else { + tasksBuilder_.addMessage(index, value); + } + return this; + } + public Builder addTasks( + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfo.Builder builderForValue) { + if (tasksBuilder_ == null) { + ensureTasksIsMutable(); + tasks_.add(builderForValue.build()); + onChanged(); + } else { + tasksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + public Builder addTasks( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfo.Builder builderForValue) { + if (tasksBuilder_ == null) { + ensureTasksIsMutable(); + tasks_.add(index, builderForValue.build()); + onChanged(); + } else { + tasksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAllTasks( + java.lang.Iterable values) { + if (tasksBuilder_ == null) { + ensureTasksIsMutable(); + super.addAll(values, tasks_); + onChanged(); + } else { + tasksBuilder_.addAllMessages(values); + } + return this; + } + public Builder clearTasks() { + if (tasksBuilder_ == null) { + tasks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + tasksBuilder_.clear(); + } + return this; + } + public Builder removeTasks(int index) { + if (tasksBuilder_ == null) { + ensureTasksIsMutable(); + tasks_.remove(index); + onChanged(); + } else { + tasksBuilder_.remove(index); + } + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfo.Builder getTasksBuilder( + int index) { + return getTasksFieldBuilder().getBuilder(index); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfoOrBuilder getTasksOrBuilder( + int index) { + if (tasksBuilder_ == null) { + return tasks_.get(index); } else { + return tasksBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getTasksOrBuilderList() { + if (tasksBuilder_ != null) { + return tasksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(tasks_); + } + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfo.Builder addTasksBuilder() { + return getTasksFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfo.getDefaultInstance()); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfo.Builder addTasksBuilder( + int index) { + return getTasksFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfo.getDefaultInstance()); + } + public java.util.List + getTasksBuilderList() { + return getTasksFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfo, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfo.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfoOrBuilder> + getTasksFieldBuilder() { + if (tasksBuilder_ == null) { + tasksBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfo, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfo.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfoOrBuilder>( + tasks_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + tasks_ = null; + } + return tasksBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.ListDeliveryTaskResponse) + } + + static { + defaultInstance = new ListDeliveryTaskResponse(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.ListDeliveryTaskResponse) + } + + public interface DeliveryTaskInfoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string tableName = 1; + boolean hasTableName(); + String getTableName(); + + // optional string taskName = 2; + boolean hasTaskName(); + String getTaskName(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.DeliveryTaskType taskType = 3; + boolean hasTaskType(); + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskType getTaskType(); + } + public static final class DeliveryTaskInfo extends + com.google.protobuf.GeneratedMessage + implements DeliveryTaskInfoOrBuilder { + // Use DeliveryTaskInfo.newBuilder() to construct. + private DeliveryTaskInfo(Builder builder) { + super(builder); + } + private DeliveryTaskInfo(boolean noInit) {} + + private static final DeliveryTaskInfo defaultInstance; + public static DeliveryTaskInfo getDefaultInstance() { + return defaultInstance; + } + + public DeliveryTaskInfo getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeliveryTaskInfo_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeliveryTaskInfo_fieldAccessorTable; + } + + private int bitField0_; + // optional string tableName = 1; + public static final int TABLENAME_FIELD_NUMBER = 1; + private java.lang.Object tableName_; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + tableName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional string taskName = 2; + public static final int TASKNAME_FIELD_NUMBER = 2; + private java.lang.Object taskName_; + public boolean hasTaskName() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getTaskName() { + java.lang.Object ref = taskName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + taskName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTaskNameBytes() { + java.lang.Object ref = taskName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + taskName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.DeliveryTaskType taskType = 3; + public static final int TASKTYPE_FIELD_NUMBER = 3; + private com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskType taskType_; + public boolean hasTaskType() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskType getTaskType() { + return taskType_; + } + + private void initFields() { + tableName_ = ""; + taskName_ = ""; + taskType_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskType.BASE; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getTaskNameBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeEnum(3, taskType_.getNumber()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getTaskNameBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, taskType_.getNumber()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfo prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeliveryTaskInfo_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeliveryTaskInfo_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + tableName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + taskName_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + taskType_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskType.BASE; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfo.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfo getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfo.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfo build() { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfo buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfo buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfo result = new com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfo(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.tableName_ = tableName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.taskName_ = taskName_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.taskType_ = taskType_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfo) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfo other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfo.getDefaultInstance()) return this; + if (other.hasTableName()) { + setTableName(other.getTableName()); + } + if (other.hasTaskName()) { + setTaskName(other.getTaskName()); + } + if (other.hasTaskType()) { + setTaskType(other.getTaskType()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + tableName_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + taskName_ = input.readBytes(); + break; + } + case 24: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskType value = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(3, rawValue); + } else { + bitField0_ |= 0x00000004; + taskType_ = value; + } + break; + } + } + } + } + + private int bitField0_; + + // optional string tableName = 1; + private java.lang.Object tableName_ = ""; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + tableName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setTableName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + return this; + } + public Builder clearTableName() { + bitField0_ = (bitField0_ & ~0x00000001); + tableName_ = getDefaultInstance().getTableName(); + onChanged(); + return this; + } + void setTableName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + } + + // optional string taskName = 2; + private java.lang.Object taskName_ = ""; + public boolean hasTaskName() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getTaskName() { + java.lang.Object ref = taskName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + taskName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setTaskName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + taskName_ = value; + onChanged(); + return this; + } + public Builder clearTaskName() { + bitField0_ = (bitField0_ & ~0x00000002); + taskName_ = getDefaultInstance().getTaskName(); + onChanged(); + return this; + } + void setTaskName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000002; + taskName_ = value; + onChanged(); + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.DeliveryTaskType taskType = 3; + private com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskType taskType_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskType.BASE; + public boolean hasTaskType() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskType getTaskType() { + return taskType_; + } + public Builder setTaskType(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + taskType_ = value; + onChanged(); + return this; + } + public Builder clearTaskType() { + bitField0_ = (bitField0_ & ~0x00000004); + taskType_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskType.BASE; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.DeliveryTaskInfo) + } + + static { + defaultInstance = new DeliveryTaskInfo(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.DeliveryTaskInfo) + } + + public interface EventColumnOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string columnName = 1; + boolean hasColumnName(); + String getColumnName(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.EventColumn.eventTimeFormat timeFormat = 2; + boolean hasTimeFormat(); + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn.eventTimeFormat getTimeFormat(); + } + public static final class EventColumn extends + com.google.protobuf.GeneratedMessage + implements EventColumnOrBuilder { + // Use EventColumn.newBuilder() to construct. + private EventColumn(Builder builder) { + super(builder); + } + private EventColumn(boolean noInit) {} + + private static final EventColumn defaultInstance; + public static EventColumn getDefaultInstance() { + return defaultInstance; + } + + public EventColumn getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_EventColumn_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_EventColumn_fieldAccessorTable; + } + + public enum eventTimeFormat + implements com.google.protobuf.ProtocolMessageEnum { + RFC822(0, 1), + RFC850(1, 2), + RFC1123(2, 3), + RFC3339(3, 4), + Unix(4, 5), + ; + + public static final int RFC822_VALUE = 1; + public static final int RFC850_VALUE = 2; + public static final int RFC1123_VALUE = 3; + public static final int RFC3339_VALUE = 4; + public static final int Unix_VALUE = 5; + + + public final int getNumber() { return value; } + + public static eventTimeFormat valueOf(int value) { + switch (value) { + case 1: return RFC822; + case 2: return RFC850; + case 3: return RFC1123; + case 4: return RFC3339; + case 5: return Unix; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public eventTimeFormat findValueByNumber(int number) { + return eventTimeFormat.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn.getDescriptor().getEnumTypes().get(0); + } + + private static final eventTimeFormat[] VALUES = { + RFC822, RFC850, RFC1123, RFC3339, Unix, + }; + + public static eventTimeFormat valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private eventTimeFormat(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:com.alicloud.openservices.tablestore.core.protocol.EventColumn.eventTimeFormat) + } + + private int bitField0_; + // optional string columnName = 1; + public static final int COLUMNNAME_FIELD_NUMBER = 1; + private java.lang.Object columnName_; + public boolean hasColumnName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getColumnName() { + java.lang.Object ref = columnName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + columnName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getColumnNameBytes() { + java.lang.Object ref = columnName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + columnName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.EventColumn.eventTimeFormat timeFormat = 2; + public static final int TIMEFORMAT_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn.eventTimeFormat timeFormat_; + public boolean hasTimeFormat() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn.eventTimeFormat getTimeFormat() { + return timeFormat_; + } + + private void initFields() { + columnName_ = ""; + timeFormat_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn.eventTimeFormat.RFC822; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getColumnNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeEnum(2, timeFormat_.getNumber()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getColumnNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, timeFormat_.getNumber()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumnOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_EventColumn_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_EventColumn_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + columnName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + timeFormat_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn.eventTimeFormat.RFC822; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn build() { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn result = new com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.columnName_ = columnName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.timeFormat_ = timeFormat_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn.getDefaultInstance()) return this; + if (other.hasColumnName()) { + setColumnName(other.getColumnName()); + } + if (other.hasTimeFormat()) { + setTimeFormat(other.getTimeFormat()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + columnName_ = input.readBytes(); + break; + } + case 16: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn.eventTimeFormat value = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn.eventTimeFormat.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(2, rawValue); + } else { + bitField0_ |= 0x00000002; + timeFormat_ = value; + } + break; + } + } + } + } + + private int bitField0_; + + // optional string columnName = 1; + private java.lang.Object columnName_ = ""; + public boolean hasColumnName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getColumnName() { + java.lang.Object ref = columnName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + columnName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setColumnName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + columnName_ = value; + onChanged(); + return this; + } + public Builder clearColumnName() { + bitField0_ = (bitField0_ & ~0x00000001); + columnName_ = getDefaultInstance().getColumnName(); + onChanged(); + return this; + } + void setColumnName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + columnName_ = value; + onChanged(); + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.EventColumn.eventTimeFormat timeFormat = 2; + private com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn.eventTimeFormat timeFormat_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn.eventTimeFormat.RFC822; + public boolean hasTimeFormat() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn.eventTimeFormat getTimeFormat() { + return timeFormat_; + } + public Builder setTimeFormat(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn.eventTimeFormat value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + timeFormat_ = value; + onChanged(); + return this; + } + public Builder clearTimeFormat() { + bitField0_ = (bitField0_ & ~0x00000002); + timeFormat_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn.eventTimeFormat.RFC822; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.EventColumn) + } + + static { + defaultInstance = new EventColumn(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.EventColumn) + } + + public interface ParquetSchemaOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string columnName = 1; + boolean hasColumnName(); + String getColumnName(); + + // optional string ossColumnName = 2; + boolean hasOssColumnName(); + String getOssColumnName(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.ParquetSchema.DataType type = 3; + boolean hasType(); + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema.DataType getType(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.Encoding encode = 4; + boolean hasEncode(); + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.Encoding getEncode(); + + // optional string typeExtend = 5; + boolean hasTypeExtend(); + String getTypeExtend(); + } + public static final class ParquetSchema extends + com.google.protobuf.GeneratedMessage + implements ParquetSchemaOrBuilder { + // Use ParquetSchema.newBuilder() to construct. + private ParquetSchema(Builder builder) { + super(builder); + } + private ParquetSchema(boolean noInit) {} + + private static final ParquetSchema defaultInstance; + public static ParquetSchema getDefaultInstance() { + return defaultInstance; + } + + public ParquetSchema getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_ParquetSchema_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_ParquetSchema_fieldAccessorTable; + } + + public enum DataType + implements com.google.protobuf.ProtocolMessageEnum { + BOOL(0, 0), + INT64(1, 1), + UTF8(2, 2), + DOUBLE(3, 3), + DATE(4, 4), + DECIMAL(5, 5), + TIME_MILLIS(6, 6), + TIME_MICROS(7, 7), + TIMESTAMP_MILLIS(8, 8), + TIMESTAMP_MICROS(9, 9), + LIST(10, 10), + MAP(11, 11), + INTERVAL(12, 12), + FLOAT(13, 13), + INT32(14, 14), + INT96(15, 15), + ; + + public static final int BOOL_VALUE = 0; + public static final int INT64_VALUE = 1; + public static final int UTF8_VALUE = 2; + public static final int DOUBLE_VALUE = 3; + public static final int DATE_VALUE = 4; + public static final int DECIMAL_VALUE = 5; + public static final int TIME_MILLIS_VALUE = 6; + public static final int TIME_MICROS_VALUE = 7; + public static final int TIMESTAMP_MILLIS_VALUE = 8; + public static final int TIMESTAMP_MICROS_VALUE = 9; + public static final int LIST_VALUE = 10; + public static final int MAP_VALUE = 11; + public static final int INTERVAL_VALUE = 12; + public static final int FLOAT_VALUE = 13; + public static final int INT32_VALUE = 14; + public static final int INT96_VALUE = 15; + + + public final int getNumber() { return value; } + + public static DataType valueOf(int value) { + switch (value) { + case 0: return BOOL; + case 1: return INT64; + case 2: return UTF8; + case 3: return DOUBLE; + case 4: return DATE; + case 5: return DECIMAL; + case 6: return TIME_MILLIS; + case 7: return TIME_MICROS; + case 8: return TIMESTAMP_MILLIS; + case 9: return TIMESTAMP_MICROS; + case 10: return LIST; + case 11: return MAP; + case 12: return INTERVAL; + case 13: return FLOAT; + case 14: return INT32; + case 15: return INT96; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DataType findValueByNumber(int number) { + return DataType.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema.getDescriptor().getEnumTypes().get(0); + } + + private static final DataType[] VALUES = { + BOOL, INT64, UTF8, DOUBLE, DATE, DECIMAL, TIME_MILLIS, TIME_MICROS, TIMESTAMP_MILLIS, TIMESTAMP_MICROS, LIST, MAP, INTERVAL, FLOAT, INT32, INT96, + }; + + public static DataType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private DataType(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:com.alicloud.openservices.tablestore.core.protocol.ParquetSchema.DataType) + } + + private int bitField0_; + // optional string columnName = 1; + public static final int COLUMNNAME_FIELD_NUMBER = 1; + private java.lang.Object columnName_; + public boolean hasColumnName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getColumnName() { + java.lang.Object ref = columnName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + columnName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getColumnNameBytes() { + java.lang.Object ref = columnName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + columnName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional string ossColumnName = 2; + public static final int OSSCOLUMNNAME_FIELD_NUMBER = 2; + private java.lang.Object ossColumnName_; + public boolean hasOssColumnName() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getOssColumnName() { + java.lang.Object ref = ossColumnName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + ossColumnName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getOssColumnNameBytes() { + java.lang.Object ref = ossColumnName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + ossColumnName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.ParquetSchema.DataType type = 3; + public static final int TYPE_FIELD_NUMBER = 3; + private com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema.DataType type_; + public boolean hasType() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema.DataType getType() { + return type_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.Encoding encode = 4; + public static final int ENCODE_FIELD_NUMBER = 4; + private com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.Encoding encode_; + public boolean hasEncode() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.Encoding getEncode() { + return encode_; + } + + // optional string typeExtend = 5; + public static final int TYPEEXTEND_FIELD_NUMBER = 5; + private java.lang.Object typeExtend_; + public boolean hasTypeExtend() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public String getTypeExtend() { + java.lang.Object ref = typeExtend_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + typeExtend_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTypeExtendBytes() { + java.lang.Object ref = typeExtend_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + typeExtend_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + columnName_ = ""; + ossColumnName_ = ""; + type_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema.DataType.BOOL; + encode_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.Encoding.PLAIN; + typeExtend_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getColumnNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getOssColumnNameBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeEnum(3, type_.getNumber()); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeEnum(4, encode_.getNumber()); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeBytes(5, getTypeExtendBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getColumnNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getOssColumnNameBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, type_.getNumber()); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, encode_.getNumber()); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(5, getTypeExtendBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchemaOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_ParquetSchema_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.internal_static_com_alicloud_openservices_tablestore_core_protocol_ParquetSchema_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + columnName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + ossColumnName_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + type_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema.DataType.BOOL; + bitField0_ = (bitField0_ & ~0x00000004); + encode_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.Encoding.PLAIN; + bitField0_ = (bitField0_ & ~0x00000008); + typeExtend_ = ""; + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema build() { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema result = new com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.columnName_ = columnName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.ossColumnName_ = ossColumnName_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.type_ = type_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.encode_ = encode_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + result.typeExtend_ = typeExtend_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema.getDefaultInstance()) return this; + if (other.hasColumnName()) { + setColumnName(other.getColumnName()); + } + if (other.hasOssColumnName()) { + setOssColumnName(other.getOssColumnName()); + } + if (other.hasType()) { + setType(other.getType()); + } + if (other.hasEncode()) { + setEncode(other.getEncode()); + } + if (other.hasTypeExtend()) { + setTypeExtend(other.getTypeExtend()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + columnName_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + ossColumnName_ = input.readBytes(); + break; + } + case 24: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema.DataType value = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema.DataType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(3, rawValue); + } else { + bitField0_ |= 0x00000004; + type_ = value; + } + break; + } + case 32: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.Encoding value = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.Encoding.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(4, rawValue); + } else { + bitField0_ |= 0x00000008; + encode_ = value; + } + break; + } + case 42: { + bitField0_ |= 0x00000010; + typeExtend_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // optional string columnName = 1; + private java.lang.Object columnName_ = ""; + public boolean hasColumnName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getColumnName() { + java.lang.Object ref = columnName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + columnName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setColumnName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + columnName_ = value; + onChanged(); + return this; + } + public Builder clearColumnName() { + bitField0_ = (bitField0_ & ~0x00000001); + columnName_ = getDefaultInstance().getColumnName(); + onChanged(); + return this; + } + void setColumnName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + columnName_ = value; + onChanged(); + } + + // optional string ossColumnName = 2; + private java.lang.Object ossColumnName_ = ""; + public boolean hasOssColumnName() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getOssColumnName() { + java.lang.Object ref = ossColumnName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + ossColumnName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setOssColumnName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + ossColumnName_ = value; + onChanged(); + return this; + } + public Builder clearOssColumnName() { + bitField0_ = (bitField0_ & ~0x00000002); + ossColumnName_ = getDefaultInstance().getOssColumnName(); + onChanged(); + return this; + } + void setOssColumnName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000002; + ossColumnName_ = value; + onChanged(); + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.ParquetSchema.DataType type = 3; + private com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema.DataType type_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema.DataType.BOOL; + public boolean hasType() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema.DataType getType() { + return type_; + } + public Builder setType(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema.DataType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + type_ = value; + onChanged(); + return this; + } + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000004); + type_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema.DataType.BOOL; + onChanged(); + return this; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.Encoding encode = 4; + private com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.Encoding encode_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.Encoding.PLAIN; + public boolean hasEncode() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.Encoding getEncode() { + return encode_; + } + public Builder setEncode(com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.Encoding value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + encode_ = value; + onChanged(); + return this; + } + public Builder clearEncode() { + bitField0_ = (bitField0_ & ~0x00000008); + encode_ = com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.Encoding.PLAIN; + onChanged(); + return this; + } + + // optional string typeExtend = 5; + private java.lang.Object typeExtend_ = ""; + public boolean hasTypeExtend() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public String getTypeExtend() { + java.lang.Object ref = typeExtend_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + typeExtend_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setTypeExtend(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + typeExtend_ = value; + onChanged(); + return this; + } + public Builder clearTypeExtend() { + bitField0_ = (bitField0_ & ~0x00000010); + typeExtend_ = getDefaultInstance().getTypeExtend(); + onChanged(); + return this; + } + void setTypeExtend(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000010; + typeExtend_ = value; + onChanged(); + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.ParquetSchema) + } + + static { + defaultInstance = new ParquetSchema(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.ParquetSchema) + } + + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateDeliveryTaskRequest_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateDeliveryTaskRequest_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_OSSTaskConfig_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_OSSTaskConfig_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateDeliveryTaskResponse_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateDeliveryTaskResponse_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteDeliveryTaskRequest_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteDeliveryTaskRequest_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteDeliveryTaskResponse_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteDeliveryTaskResponse_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeDeliveryTaskRequest_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeDeliveryTaskRequest_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeDeliveryTaskResponse_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeDeliveryTaskResponse_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_TaskSyncStat_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_TaskSyncStat_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateDeliveryTaskRequest_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateDeliveryTaskRequest_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateDeliveryTaskResponse_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateDeliveryTaskResponse_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_ListDeliveryTaskRequest_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_ListDeliveryTaskRequest_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_ListDeliveryTaskResponse_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_ListDeliveryTaskResponse_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_DeliveryTaskInfo_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_DeliveryTaskInfo_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_EventColumn_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_EventColumn_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_ParquetSchema_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_ParquetSchema_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\021OtsDelivery.proto\0222com.alicloud.opense" + + "rvices.tablestore.core.protocol\"\357\001\n\031Crea" + + "teDeliveryTaskRequest\022\021\n\ttableName\030\001 \001(\t" + + "\022\020\n\010taskName\030\002 \001(\t\022U\n\ntaskConfig\030\003 \001(\0132A" + + ".com.alicloud.openservices.tablestore.co" + + "re.protocol.OSSTaskConfig\022V\n\010taskType\030\004 " + + "\001(\0162D.com.alicloud.openservices.tablesto" + + "re.core.protocol.DeliveryTaskType\"\305\003\n\rOS" + + "STaskConfig\022\021\n\tossPrefix\030\001 \001(\t\022T\n\tformat" + + "ter\030\002 \001(\0162A.com.alicloud.openservices.ta", + "blestore.core.protocol.TimeFormatter\022\026\n\016" + + "ossDirtyPrefix\030\003 \001(\t\022\021\n\tossBucket\030\004 \001(\t\022" + + "\023\n\013ossEndpoint\030\005 \001(\t\022\022\n\nossStsRole\030\006 \001(\t" + + "\022X\n\017eventTimeColumn\030\007 \001(\0132?.com.alicloud" + + ".openservices.tablestore.core.protocol.E" + + "ventColumn\022J\n\006format\030\010 \001(\0162:.com.aliclou" + + "d.openservices.tablestore.core.protocol." + + "Format\022Q\n\006schema\030\013 \003(\0132A.com.alicloud.op" + + "enservices.tablestore.core.protocol.Parq" + + "uetSchema\"\034\n\032CreateDeliveryTaskResponse\"", + "@\n\031DeleteDeliveryTaskRequest\022\021\n\ttableNam" + + "e\030\001 \001(\t\022\020\n\010taskName\030\002 \001(\t\"\034\n\032DeleteDeliv" + + "eryTaskResponse\"B\n\033DescribeDeliveryTaskR" + + "equest\022\021\n\ttableName\030\001 \001(\t\022\020\n\010taskName\030\002 " + + "\001(\t\"\247\002\n\034DescribeDeliveryTaskResponse\022U\n\n" + + "taskConfig\030\001 \001(\0132A.com.alicloud.openserv" + + "ices.tablestore.core.protocol.OSSTaskCon" + + "fig\022X\n\016task_sync_stat\030\002 \001(\0132@.com.aliclo" + + "ud.openservices.tablestore.core.protocol" + + ".TaskSyncStat\022V\n\010taskType\030\003 \001(\0162D.com.al", + "icloud.openservices.tablestore.core.prot" + + "ocol.DeliveryTaskType\"\251\002\n\014TaskSyncStat\022g" + + "\n\017task_sync_phase\030\001 \001(\0162N.com.alicloud.o" + + "penservices.tablestore.core.protocol.Tas" + + "kSyncStat.TaskSyncPhase\022\036\n\026current_sync_" + + "timestamp\030\002 \001(\003\022Q\n\nerror_code\030\003 \001(\0162=.co" + + "m.alicloud.openservices.tablestore.core." + + "protocol.ErrorType\022\016\n\006detail\030\004 \001(\t\"-\n\rTa" + + "skSyncPhase\022\010\n\004INIT\020\000\022\010\n\004FULL\020\001\022\010\n\004INCR\020" + + "\002\"\223\001\n\031UpdateDeliveryTaskRequest\022\r\n\005table", + "\030\001 \001(\t\022\020\n\010taskName\030\002 \001(\t\022U\n\ntaskConfig\030\005" + + " \001(\0132A.com.alicloud.openservices.tablest" + + "ore.core.protocol.OSSTaskConfig\"\034\n\032Updat" + + "eDeliveryTaskResponse\",\n\027ListDeliveryTas" + + "kRequest\022\021\n\ttableName\030\001 \001(\t\"o\n\030ListDeliv" + + "eryTaskResponse\022S\n\005tasks\030\001 \003(\0132D.com.ali" + + "cloud.openservices.tablestore.core.proto" + + "col.DeliveryTaskInfo\"\217\001\n\020DeliveryTaskInf" + + "o\022\021\n\ttableName\030\001 \001(\t\022\020\n\010taskName\030\002 \001(\t\022V" + + "\n\010taskType\030\003 \001(\0162D.com.alicloud.openserv", + "ices.tablestore.core.protocol.DeliveryTa" + + "skType\"\325\001\n\013EventColumn\022\022\n\ncolumnName\030\001 \001" + + "(\t\022c\n\ntimeFormat\030\002 \001(\0162O.com.alicloud.op" + + "enservices.tablestore.core.protocol.Even" + + "tColumn.eventTimeFormat\"M\n\017eventTimeForm" + + "at\022\n\n\006RFC822\020\001\022\n\n\006RFC850\020\002\022\013\n\007RFC1123\020\003\022" + + "\013\n\007RFC3339\020\004\022\010\n\004Unix\020\005\"\325\003\n\rParquetSchema" + + "\022\022\n\ncolumnName\030\001 \001(\t\022\025\n\rossColumnName\030\002 " + + "\001(\t\022X\n\004type\030\003 \001(\0162J.com.alicloud.openser" + + "vices.tablestore.core.protocol.ParquetSc", + "hema.DataType\022L\n\006encode\030\004 \001(\0162<.com.alic" + + "loud.openservices.tablestore.core.protoc" + + "ol.Encoding\022\022\n\ntypeExtend\030\005 \001(\t\"\334\001\n\010Data" + + "Type\022\010\n\004BOOL\020\000\022\t\n\005INT64\020\001\022\010\n\004UTF8\020\002\022\n\n\006D" + + "OUBLE\020\003\022\010\n\004DATE\020\004\022\013\n\007DECIMAL\020\005\022\017\n\013TIME_M" + + "ILLIS\020\006\022\017\n\013TIME_MICROS\020\007\022\024\n\020TIMESTAMP_MI" + + "LLIS\020\010\022\024\n\020TIMESTAMP_MICROS\020\t\022\010\n\004LIST\020\n\022\007" + + "\n\003MAP\020\013\022\014\n\010INTERVAL\020\014\022\t\n\005FLOAT\020\r\022\t\n\005INT3" + + "2\020\016\022\t\n\005INT96\020\017*3\n\020DeliveryTaskType\022\010\n\004BA" + + "SE\020\000\022\007\n\003INC\020\001\022\014\n\010BASE_INC\020\002*\025\n\006Format\022\013\n", + "\007Parquet\020\000*w\n\010Encoding\022\t\n\005PLAIN\020\000\022\024\n\020PLA" + + "IN_DICTIONARY\020\001\022\027\n\023DELTA_BINARY_PACKED\020\002" + + "\022\024\n\020DELTA_BYTE_ARRAY\020\003\022\033\n\027DELTA_LENGTH_B" + + "YTE_ARRAY\020\004*!\n\rTimeFormatter\022\020\n\014YDMForma" + + "tter\020\000*=\n\tErrorType\022\006\n\002OK\020\000\022\020\n\014UNAUTHORI" + + "ZED\020\001\022\026\n\022INVALID_OSS_BUCKET\020\002" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateDeliveryTaskRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateDeliveryTaskRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateDeliveryTaskRequest_descriptor, + new java.lang.String[] { "TableName", "TaskName", "TaskConfig", "TaskType", }, + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskRequest.class, + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskRequest.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_OSSTaskConfig_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_com_alicloud_openservices_tablestore_core_protocol_OSSTaskConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_OSSTaskConfig_descriptor, + new java.lang.String[] { "OssPrefix", "Formatter", "OssDirtyPrefix", "OssBucket", "OssEndpoint", "OssStsRole", "EventTimeColumn", "Format", "Schema", }, + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig.class, + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.OSSTaskConfig.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateDeliveryTaskResponse_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateDeliveryTaskResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateDeliveryTaskResponse_descriptor, + new java.lang.String[] { }, + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskResponse.class, + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.CreateDeliveryTaskResponse.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteDeliveryTaskRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteDeliveryTaskRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteDeliveryTaskRequest_descriptor, + new java.lang.String[] { "TableName", "TaskName", }, + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskRequest.class, + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskRequest.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteDeliveryTaskResponse_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteDeliveryTaskResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteDeliveryTaskResponse_descriptor, + new java.lang.String[] { }, + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskResponse.class, + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeleteDeliveryTaskResponse.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeDeliveryTaskRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeDeliveryTaskRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeDeliveryTaskRequest_descriptor, + new java.lang.String[] { "TableName", "TaskName", }, + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskRequest.class, + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskRequest.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeDeliveryTaskResponse_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeDeliveryTaskResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeDeliveryTaskResponse_descriptor, + new java.lang.String[] { "TaskConfig", "TaskSyncStat", "TaskType", }, + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskResponse.class, + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DescribeDeliveryTaskResponse.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_TaskSyncStat_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_com_alicloud_openservices_tablestore_core_protocol_TaskSyncStat_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_TaskSyncStat_descriptor, + new java.lang.String[] { "TaskSyncPhase", "CurrentSyncTimestamp", "ErrorCode", "Detail", }, + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat.class, + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.TaskSyncStat.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateDeliveryTaskRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateDeliveryTaskRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateDeliveryTaskRequest_descriptor, + new java.lang.String[] { "Table", "TaskName", "TaskConfig", }, + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskRequest.class, + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskRequest.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateDeliveryTaskResponse_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateDeliveryTaskResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateDeliveryTaskResponse_descriptor, + new java.lang.String[] { }, + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskResponse.class, + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.UpdateDeliveryTaskResponse.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_ListDeliveryTaskRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_com_alicloud_openservices_tablestore_core_protocol_ListDeliveryTaskRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_ListDeliveryTaskRequest_descriptor, + new java.lang.String[] { "TableName", }, + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskRequest.class, + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskRequest.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_ListDeliveryTaskResponse_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_com_alicloud_openservices_tablestore_core_protocol_ListDeliveryTaskResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_ListDeliveryTaskResponse_descriptor, + new java.lang.String[] { "Tasks", }, + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskResponse.class, + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ListDeliveryTaskResponse.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_DeliveryTaskInfo_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_com_alicloud_openservices_tablestore_core_protocol_DeliveryTaskInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_DeliveryTaskInfo_descriptor, + new java.lang.String[] { "TableName", "TaskName", "TaskType", }, + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfo.class, + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.DeliveryTaskInfo.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_EventColumn_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_com_alicloud_openservices_tablestore_core_protocol_EventColumn_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_EventColumn_descriptor, + new java.lang.String[] { "ColumnName", "TimeFormat", }, + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn.class, + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.EventColumn.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_ParquetSchema_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_com_alicloud_openservices_tablestore_core_protocol_ParquetSchema_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_ParquetSchema_descriptor, + new java.lang.String[] { "ColumnName", "OssColumnName", "Type", "Encode", "TypeExtend", }, + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema.class, + com.alicloud.openservices.tablestore.core.protocol.OtsDelivery.ParquetSchema.Builder.class); + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/OtsDelivery.proto b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/OtsDelivery.proto new file mode 100644 index 0000000..c392b9c --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/OtsDelivery.proto @@ -0,0 +1,142 @@ +syntax = "proto2"; + +package com.alicloud.openservices.tablestore.core.protocol; + +enum DeliveryTaskType { + BASE = 0; + INC = 1; + BASE_INC = 2; +} + +message CreateDeliveryTaskRequest { + optional string tableName = 1; + optional string taskName = 2; + optional OSSTaskConfig taskConfig = 3; + optional DeliveryTaskType taskType = 4; +} + +message OSSTaskConfig { + optional string ossPrefix = 1; + optional TimeFormatter formatter = 2; + optional string ossDirtyPrefix = 3; + optional string ossBucket = 4; + optional string ossEndpoint = 5; + optional string ossStsRole = 6; + optional EventColumn eventTimeColumn = 7; + optional Format format = 8; + repeated ParquetSchema schema = 11; +} + +message CreateDeliveryTaskResponse {} + +message DeleteDeliveryTaskRequest { + optional string tableName = 1; + optional string taskName = 2; +} + +message DeleteDeliveryTaskResponse {} + +message DescribeDeliveryTaskRequest { + optional string tableName = 1; + optional string taskName = 2; +} + +message DescribeDeliveryTaskResponse { + optional OSSTaskConfig taskConfig = 1; + optional TaskSyncStat task_sync_stat = 2; + optional DeliveryTaskType taskType = 3; +} + +message TaskSyncStat { + enum TaskSyncPhase { + INIT = 0; + FULL = 1; + INCR = 2; + } + optional TaskSyncPhase task_sync_phase = 1; + optional int64 current_sync_timestamp = 2; // 同步进度,参考TunnelService。 + optional ErrorType error_code = 3; // UnAuthorized/InvalidOssBucket... + optional string detail = 4; +} + +message UpdateDeliveryTaskRequest { + optional string table = 1; + optional string taskName = 2; + optional OSSTaskConfig taskConfig = 5; +} + +message UpdateDeliveryTaskResponse {} + +message ListDeliveryTaskRequest { + optional string tableName = 1; +} + +message ListDeliveryTaskResponse { + repeated DeliveryTaskInfo tasks = 1; +} + +message DeliveryTaskInfo { + optional string tableName = 1; + optional string taskName = 2; + optional DeliveryTaskType taskType = 3; +} + +message EventColumn { + optional string columnName = 1; + enum eventTimeFormat{ + RFC822 = 1; + RFC850 = 2; + RFC1123 = 3; + RFC3339 = 4; + Unix = 5; + } + optional eventTimeFormat timeFormat = 2; +} + +enum Format { + Parquet = 0; +} + +enum Encoding { + PLAIN = 0; + PLAIN_DICTIONARY = 1; + DELTA_BINARY_PACKED = 2; + DELTA_BYTE_ARRAY = 3; + DELTA_LENGTH_BYTE_ARRAY = 4; +} + +enum TimeFormatter { + YDMFormatter = 0; +} + +enum ErrorType { + OK = 0; + UNAUTHORIZED = 1; + INVALID_OSS_BUCKET = 2; +} + +message ParquetSchema { + enum DataType { + BOOL = 0; + INT64 = 1; + UTF8 = 2; + DOUBLE = 3; + DATE = 4; + DECIMAL = 5; + TIME_MILLIS = 6; + TIME_MICROS = 7; + TIMESTAMP_MILLIS = 8; + TIMESTAMP_MICROS = 9; + LIST = 10; + MAP = 11; + INTERVAL = 12; + FLOAT = 13; + INT32 = 14; + INT96 = 15; + } + optional string columnName = 1; + optional string ossColumnName = 2; + optional DataType type = 3; // parquet logical type + optional Encoding encode = 4; + optional string typeExtend = 5; +} \ No newline at end of file diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/OtsFilter.java b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/OtsFilter.java index 7839d7b..0006299 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/OtsFilter.java +++ b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/OtsFilter.java @@ -8,6 +8,84 @@ private OtsFilter() {} public static void registerAllExtensions( com.google.protobuf.ExtensionRegistry registry) { } + public enum VariantType + implements com.google.protobuf.ProtocolMessageEnum { + VT_INTEGER(0, 0), + VT_DOUBLE(1, 1), + VT_STRING(2, 3), + VT_NULL(3, 6), + VT_BLOB(4, 7), + ; + + public static final int VT_INTEGER_VALUE = 0; + public static final int VT_DOUBLE_VALUE = 1; + public static final int VT_STRING_VALUE = 3; + public static final int VT_NULL_VALUE = 6; + public static final int VT_BLOB_VALUE = 7; + + + public final int getNumber() { return value; } + + public static VariantType valueOf(int value) { + switch (value) { + case 0: return VT_INTEGER; + case 1: return VT_DOUBLE; + case 3: return VT_STRING; + case 6: return VT_NULL; + case 7: return VT_BLOB; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public VariantType findValueByNumber(int number) { + return VariantType.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsFilter.getDescriptor().getEnumTypes().get(0); + } + + private static final VariantType[] VALUES = { + VT_INTEGER, VT_DOUBLE, VT_STRING, VT_NULL, VT_BLOB, + }; + + public static VariantType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private VariantType(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:com.alicloud.openservices.tablestore.core.protocol.VariantType) + } + public enum FilterType implements com.google.protobuf.ProtocolMessageEnum { FT_SINGLE_COLUMN_VALUE(0, 1), @@ -53,7 +131,7 @@ public FilterType findValueByNumber(int number) { } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsFilter.getDescriptor().getEnumTypes().get(0); + return com.alicloud.openservices.tablestore.core.protocol.OtsFilter.getDescriptor().getEnumTypes().get(1); } private static final FilterType[] VALUES = { @@ -88,6 +166,8 @@ public enum ComparatorType CT_GREATER_EQUAL(3, 4), CT_LESS_THAN(4, 5), CT_LESS_EQUAL(5, 6), + CT_EXIST(6, 7), + CT_NOT_EXIST(7, 8), ; public static final int CT_EQUAL_VALUE = 1; @@ -96,6 +176,8 @@ public enum ComparatorType public static final int CT_GREATER_EQUAL_VALUE = 4; public static final int CT_LESS_THAN_VALUE = 5; public static final int CT_LESS_EQUAL_VALUE = 6; + public static final int CT_EXIST_VALUE = 7; + public static final int CT_NOT_EXIST_VALUE = 8; public final int getNumber() { return value; } @@ -108,6 +190,8 @@ public static ComparatorType valueOf(int value) { case 4: return CT_GREATER_EQUAL; case 5: return CT_LESS_THAN; case 6: return CT_LESS_EQUAL; + case 7: return CT_EXIST; + case 8: return CT_NOT_EXIST; default: return null; } } @@ -134,11 +218,11 @@ public ComparatorType findValueByNumber(int number) { } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsFilter.getDescriptor().getEnumTypes().get(1); + return com.alicloud.openservices.tablestore.core.protocol.OtsFilter.getDescriptor().getEnumTypes().get(2); } private static final ComparatorType[] VALUES = { - CT_EQUAL, CT_NOT_EQUAL, CT_GREATER_THAN, CT_GREATER_EQUAL, CT_LESS_THAN, CT_LESS_EQUAL, + CT_EQUAL, CT_NOT_EQUAL, CT_GREATER_THAN, CT_GREATER_EQUAL, CT_LESS_THAN, CT_LESS_EQUAL, CT_EXIST, CT_NOT_EXIST, }; public static ComparatorType valueOf( @@ -206,7 +290,7 @@ public LogicalOperator findValueByNumber(int number) { } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsFilter.getDescriptor().getEnumTypes().get(2); + return com.alicloud.openservices.tablestore.core.protocol.OtsFilter.getDescriptor().getEnumTypes().get(3); } private static final LogicalOperator[] VALUES = { @@ -233,6 +317,455 @@ private LogicalOperator(int index, int value) { // @@protoc_insertion_point(enum_scope:com.alicloud.openservices.tablestore.core.protocol.LogicalOperator) } + public interface ValueTransferRuleOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string regex = 1; + boolean hasRegex(); + String getRegex(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.VariantType cast_type = 2; + boolean hasCastType(); + com.alicloud.openservices.tablestore.core.protocol.OtsFilter.VariantType getCastType(); + } + public static final class ValueTransferRule extends + com.google.protobuf.GeneratedMessage + implements ValueTransferRuleOrBuilder { + // Use ValueTransferRule.newBuilder() to construct. + private ValueTransferRule(Builder builder) { + super(builder); + } + private ValueTransferRule(boolean noInit) {} + + private static final ValueTransferRule defaultInstance; + public static ValueTransferRule getDefaultInstance() { + return defaultInstance; + } + + public ValueTransferRule getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsFilter.internal_static_com_alicloud_openservices_tablestore_core_protocol_ValueTransferRule_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsFilter.internal_static_com_alicloud_openservices_tablestore_core_protocol_ValueTransferRule_fieldAccessorTable; + } + + private int bitField0_; + // required string regex = 1; + public static final int REGEX_FIELD_NUMBER = 1; + private java.lang.Object regex_; + public boolean hasRegex() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getRegex() { + java.lang.Object ref = regex_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + regex_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getRegexBytes() { + java.lang.Object ref = regex_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + regex_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.VariantType cast_type = 2; + public static final int CAST_TYPE_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.OtsFilter.VariantType castType_; + public boolean hasCastType() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsFilter.VariantType getCastType() { + return castType_; + } + + private void initFields() { + regex_ = ""; + castType_ = com.alicloud.openservices.tablestore.core.protocol.OtsFilter.VariantType.VT_INTEGER; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasRegex()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getRegexBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeEnum(2, castType_.getNumber()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getRegexBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, castType_.getNumber()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRuleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsFilter.internal_static_com_alicloud_openservices_tablestore_core_protocol_ValueTransferRule_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsFilter.internal_static_com_alicloud_openservices_tablestore_core_protocol_ValueTransferRule_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + regex_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + castType_ = com.alicloud.openservices.tablestore.core.protocol.OtsFilter.VariantType.VT_INTEGER; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule build() { + com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule result = new com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.regex_ = regex_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.castType_ = castType_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule.getDefaultInstance()) return this; + if (other.hasRegex()) { + setRegex(other.getRegex()); + } + if (other.hasCastType()) { + setCastType(other.getCastType()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasRegex()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + regex_ = input.readBytes(); + break; + } + case 16: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.OtsFilter.VariantType value = com.alicloud.openservices.tablestore.core.protocol.OtsFilter.VariantType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(2, rawValue); + } else { + bitField0_ |= 0x00000002; + castType_ = value; + } + break; + } + } + } + } + + private int bitField0_; + + // required string regex = 1; + private java.lang.Object regex_ = ""; + public boolean hasRegex() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getRegex() { + java.lang.Object ref = regex_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + regex_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setRegex(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + regex_ = value; + onChanged(); + return this; + } + public Builder clearRegex() { + bitField0_ = (bitField0_ & ~0x00000001); + regex_ = getDefaultInstance().getRegex(); + onChanged(); + return this; + } + void setRegex(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + regex_ = value; + onChanged(); + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.VariantType cast_type = 2; + private com.alicloud.openservices.tablestore.core.protocol.OtsFilter.VariantType castType_ = com.alicloud.openservices.tablestore.core.protocol.OtsFilter.VariantType.VT_INTEGER; + public boolean hasCastType() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsFilter.VariantType getCastType() { + return castType_; + } + public Builder setCastType(com.alicloud.openservices.tablestore.core.protocol.OtsFilter.VariantType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + castType_ = value; + onChanged(); + return this; + } + public Builder clearCastType() { + bitField0_ = (bitField0_ & ~0x00000002); + castType_ = com.alicloud.openservices.tablestore.core.protocol.OtsFilter.VariantType.VT_INTEGER; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.ValueTransferRule) + } + + static { + defaultInstance = new ValueTransferRule(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.ValueTransferRule) + } + public interface SingleColumnValueFilterOrBuilder extends com.google.protobuf.MessageOrBuilder { @@ -255,6 +788,11 @@ public interface SingleColumnValueFilterOrBuilder // required bool latest_version_only = 5; boolean hasLatestVersionOnly(); boolean getLatestVersionOnly(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.ValueTransferRule value_trans_rule = 6; + boolean hasValueTransRule(); + com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule getValueTransRule(); + com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRuleOrBuilder getValueTransRuleOrBuilder(); } public static final class SingleColumnValueFilter extends com.google.protobuf.GeneratedMessage @@ -357,12 +895,26 @@ public boolean getLatestVersionOnly() { return latestVersionOnly_; } + // optional .com.alicloud.openservices.tablestore.core.protocol.ValueTransferRule value_trans_rule = 6; + public static final int VALUE_TRANS_RULE_FIELD_NUMBER = 6; + private com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule valueTransRule_; + public boolean hasValueTransRule() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule getValueTransRule() { + return valueTransRule_; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRuleOrBuilder getValueTransRuleOrBuilder() { + return valueTransRule_; + } + private void initFields() { comparator_ = com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ComparatorType.CT_EQUAL; columnName_ = ""; columnValue_ = com.google.protobuf.ByteString.EMPTY; filterIfMissing_ = false; latestVersionOnly_ = false; + valueTransRule_ = com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -389,6 +941,12 @@ public final boolean isInitialized() { memoizedIsInitialized = 0; return false; } + if (hasValueTransRule()) { + if (!getValueTransRule().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } memoizedIsInitialized = 1; return true; } @@ -411,6 +969,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeBool(5, latestVersionOnly_); } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeMessage(6, valueTransRule_); + } getUnknownFields().writeTo(output); } @@ -440,6 +1001,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeBoolSize(5, latestVersionOnly_); } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, valueTransRule_); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -556,6 +1121,7 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getValueTransRuleFieldBuilder(); } } private static Builder create() { @@ -574,6 +1140,12 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000008); latestVersionOnly_ = false; bitField0_ = (bitField0_ & ~0x00000010); + if (valueTransRuleBuilder_ == null) { + valueTransRule_ = com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule.getDefaultInstance(); + } else { + valueTransRuleBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); return this; } @@ -632,6 +1204,14 @@ public com.alicloud.openservices.tablestore.core.protocol.OtsFilter.SingleColumn to_bitField0_ |= 0x00000010; } result.latestVersionOnly_ = latestVersionOnly_; + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000020; + } + if (valueTransRuleBuilder_ == null) { + result.valueTransRule_ = valueTransRule_; + } else { + result.valueTransRule_ = valueTransRuleBuilder_.build(); + } result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -663,6 +1243,9 @@ public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsF if (other.hasLatestVersionOnly()) { setLatestVersionOnly(other.getLatestVersionOnly()); } + if (other.hasValueTransRule()) { + mergeValueTransRule(other.getValueTransRule()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -688,6 +1271,12 @@ public final boolean isInitialized() { return false; } + if (hasValueTransRule()) { + if (!getValueTransRule().isInitialized()) { + + return false; + } + } return true; } @@ -745,6 +1334,15 @@ public Builder mergeFrom( latestVersionOnly_ = input.readBool(); break; } + case 50: { + com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule.newBuilder(); + if (hasValueTransRule()) { + subBuilder.mergeFrom(getValueTransRule()); + } + input.readMessage(subBuilder, extensionRegistry); + setValueTransRule(subBuilder.buildPartial()); + break; + } } } } @@ -877,6 +1475,96 @@ public Builder clearLatestVersionOnly() { return this; } + // optional .com.alicloud.openservices.tablestore.core.protocol.ValueTransferRule value_trans_rule = 6; + private com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule valueTransRule_ = com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule, com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRuleOrBuilder> valueTransRuleBuilder_; + public boolean hasValueTransRule() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule getValueTransRule() { + if (valueTransRuleBuilder_ == null) { + return valueTransRule_; + } else { + return valueTransRuleBuilder_.getMessage(); + } + } + public Builder setValueTransRule(com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule value) { + if (valueTransRuleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + valueTransRule_ = value; + onChanged(); + } else { + valueTransRuleBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + return this; + } + public Builder setValueTransRule( + com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule.Builder builderForValue) { + if (valueTransRuleBuilder_ == null) { + valueTransRule_ = builderForValue.build(); + onChanged(); + } else { + valueTransRuleBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + return this; + } + public Builder mergeValueTransRule(com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule value) { + if (valueTransRuleBuilder_ == null) { + if (((bitField0_ & 0x00000020) == 0x00000020) && + valueTransRule_ != com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule.getDefaultInstance()) { + valueTransRule_ = + com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule.newBuilder(valueTransRule_).mergeFrom(value).buildPartial(); + } else { + valueTransRule_ = value; + } + onChanged(); + } else { + valueTransRuleBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + return this; + } + public Builder clearValueTransRule() { + if (valueTransRuleBuilder_ == null) { + valueTransRule_ = com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule.getDefaultInstance(); + onChanged(); + } else { + valueTransRuleBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule.Builder getValueTransRuleBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getValueTransRuleFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRuleOrBuilder getValueTransRuleOrBuilder() { + if (valueTransRuleBuilder_ != null) { + return valueTransRuleBuilder_.getMessageOrBuilder(); + } else { + return valueTransRule_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule, com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRuleOrBuilder> + getValueTransRuleFieldBuilder() { + if (valueTransRuleBuilder_ == null) { + valueTransRuleBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule, com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRuleOrBuilder>( + valueTransRule_, + getParentForChildren(), + isClean()); + valueTransRule_ = null; + } + return valueTransRuleBuilder_; + } + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.SingleColumnValueFilter) } @@ -2362,6 +3050,11 @@ public Builder clearFilter() { // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.Filter) } + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_ValueTransferRule_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_ValueTransferRule_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor internal_static_com_alicloud_openservices_tablestore_core_protocol_SingleColumnValueFilter_descriptor; private static @@ -2392,45 +3085,61 @@ public Builder clearFilter() { static { java.lang.String[] descriptorData = { "\n\020ots_filter.proto\0222com.alicloud.openser" + - "vices.tablestore.core.protocol\"\324\001\n\027Singl" + + "vices.tablestore.core.protocol\"v\n\021ValueT" + + "ransferRule\022\r\n\005regex\030\001 \002(\t\022R\n\tcast_type\030" + + "\002 \001(\0162?.com.alicloud.openservices.tables" + + "tore.core.protocol.VariantType\"\265\002\n\027Singl" + "eColumnValueFilter\022V\n\ncomparator\030\001 \002(\0162B" + ".com.alicloud.openservices.tablestore.co" + "re.protocol.ComparatorType\022\023\n\013column_nam" + "e\030\002 \002(\t\022\024\n\014column_value\030\003 \002(\014\022\031\n\021filter_" + - "if_missing\030\004 \002(\010\022\033\n\023latest_version_only\030" + - "\005 \002(\010\"\306\001\n\032CompositeColumnValueFilter\022W\n\n" + - "combinator\030\001 \002(\0162C.com.alicloud.openserv" + - "ices.tablestore.core.protocol.LogicalOpe", - "rator\022O\n\013sub_filters\030\002 \003(\0132:.com.aliclou" + - "d.openservices.tablestore.core.protocol." + - "Filter\"7\n\026ColumnPaginationFilter\022\016\n\006offs" + - "et\030\001 \002(\005\022\r\n\005limit\030\002 \002(\005\"f\n\006Filter\022L\n\004typ" + - "e\030\001 \002(\0162>.com.alicloud.openservices.tabl" + - "estore.core.protocol.FilterType\022\016\n\006filte" + - "r\030\002 \002(\014*a\n\nFilterType\022\032\n\026FT_SINGLE_COLUM" + - "N_VALUE\020\001\022\035\n\031FT_COMPOSITE_COLUMN_VALUE\020\002" + - "\022\030\n\024FT_COLUMN_PAGINATION\020\003*\200\001\n\016Comparato" + - "rType\022\014\n\010CT_EQUAL\020\001\022\020\n\014CT_NOT_EQUAL\020\002\022\023\n", - "\017CT_GREATER_THAN\020\003\022\024\n\020CT_GREATER_EQUAL\020\004" + - "\022\020\n\014CT_LESS_THAN\020\005\022\021\n\rCT_LESS_EQUAL\020\006*4\n" + - "\017LogicalOperator\022\n\n\006LO_NOT\020\001\022\n\n\006LO_AND\020\002" + - "\022\t\n\005LO_OR\020\003" + "if_missing\030\004 \002(\010\022\033\n\023latest_version_only\030", + "\005 \002(\010\022_\n\020value_trans_rule\030\006 \001(\0132E.com.al" + + "icloud.openservices.tablestore.core.prot" + + "ocol.ValueTransferRule\"\306\001\n\032CompositeColu" + + "mnValueFilter\022W\n\ncombinator\030\001 \002(\0162C.com." + + "alicloud.openservices.tablestore.core.pr" + + "otocol.LogicalOperator\022O\n\013sub_filters\030\002 " + + "\003(\0132:.com.alicloud.openservices.tablesto" + + "re.core.protocol.Filter\"7\n\026ColumnPaginat" + + "ionFilter\022\016\n\006offset\030\001 \002(\005\022\r\n\005limit\030\002 \002(\005" + + "\"f\n\006Filter\022L\n\004type\030\001 \002(\0162>.com.alicloud.", + "openservices.tablestore.core.protocol.Fi" + + "lterType\022\016\n\006filter\030\002 \002(\014*U\n\013VariantType\022" + + "\016\n\nVT_INTEGER\020\000\022\r\n\tVT_DOUBLE\020\001\022\r\n\tVT_STR" + + "ING\020\003\022\013\n\007VT_NULL\020\006\022\013\n\007VT_BLOB\020\007*a\n\nFilte" + + "rType\022\032\n\026FT_SINGLE_COLUMN_VALUE\020\001\022\035\n\031FT_" + + "COMPOSITE_COLUMN_VALUE\020\002\022\030\n\024FT_COLUMN_PA" + + "GINATION\020\003*\240\001\n\016ComparatorType\022\014\n\010CT_EQUA" + + "L\020\001\022\020\n\014CT_NOT_EQUAL\020\002\022\023\n\017CT_GREATER_THAN" + + "\020\003\022\024\n\020CT_GREATER_EQUAL\020\004\022\020\n\014CT_LESS_THAN" + + "\020\005\022\021\n\rCT_LESS_EQUAL\020\006\022\014\n\010CT_EXIST\020\007\022\020\n\014C", + "T_NOT_EXIST\020\010*4\n\017LogicalOperator\022\n\n\006LO_N" + + "OT\020\001\022\n\n\006LO_AND\020\002\022\t\n\005LO_OR\020\003" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { public com.google.protobuf.ExtensionRegistry assignDescriptors( com.google.protobuf.Descriptors.FileDescriptor root) { descriptor = root; - internal_static_com_alicloud_openservices_tablestore_core_protocol_SingleColumnValueFilter_descriptor = + internal_static_com_alicloud_openservices_tablestore_core_protocol_ValueTransferRule_descriptor = getDescriptor().getMessageTypes().get(0); + internal_static_com_alicloud_openservices_tablestore_core_protocol_ValueTransferRule_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_ValueTransferRule_descriptor, + new java.lang.String[] { "Regex", "CastType", }, + com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule.class, + com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ValueTransferRule.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_SingleColumnValueFilter_descriptor = + getDescriptor().getMessageTypes().get(1); internal_static_com_alicloud_openservices_tablestore_core_protocol_SingleColumnValueFilter_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_SingleColumnValueFilter_descriptor, - new java.lang.String[] { "Comparator", "ColumnName", "ColumnValue", "FilterIfMissing", "LatestVersionOnly", }, + new java.lang.String[] { "Comparator", "ColumnName", "ColumnValue", "FilterIfMissing", "LatestVersionOnly", "ValueTransRule", }, com.alicloud.openservices.tablestore.core.protocol.OtsFilter.SingleColumnValueFilter.class, com.alicloud.openservices.tablestore.core.protocol.OtsFilter.SingleColumnValueFilter.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_CompositeColumnValueFilter_descriptor = - getDescriptor().getMessageTypes().get(1); + getDescriptor().getMessageTypes().get(2); internal_static_com_alicloud_openservices_tablestore_core_protocol_CompositeColumnValueFilter_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_CompositeColumnValueFilter_descriptor, @@ -2438,7 +3147,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsFilter.CompositeColumnValueFilter.class, com.alicloud.openservices.tablestore.core.protocol.OtsFilter.CompositeColumnValueFilter.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_ColumnPaginationFilter_descriptor = - getDescriptor().getMessageTypes().get(2); + getDescriptor().getMessageTypes().get(3); internal_static_com_alicloud_openservices_tablestore_core_protocol_ColumnPaginationFilter_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_ColumnPaginationFilter_descriptor, @@ -2446,7 +3155,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ColumnPaginationFilter.class, com.alicloud.openservices.tablestore.core.protocol.OtsFilter.ColumnPaginationFilter.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_Filter_descriptor = - getDescriptor().getMessageTypes().get(3); + getDescriptor().getMessageTypes().get(4); internal_static_com_alicloud_openservices_tablestore_core_protocol_Filter_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_Filter_descriptor, diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/OtsInternalApi.java b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/OtsInternalApi.java index b3d2ae8..3160ede 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/OtsInternalApi.java +++ b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/OtsInternalApi.java @@ -1,5 +1,5 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: ots_internal_api.proto +// source: com/alicloud/openservices/tablestore/core/protocol/ots_internal_api.proto package com.alicloud.openservices.tablestore.core.protocol; @@ -434,6 +434,75 @@ private RowExistenceExpectation(int index, int value) { // @@protoc_insertion_point(enum_scope:com.alicloud.openservices.tablestore.core.protocol.RowExistenceExpectation) } + public enum SSEKeyType + implements com.google.protobuf.ProtocolMessageEnum { + SSE_KMS_SERVICE(0, 1), + SSE_BYOK(1, 2), + ; + + public static final int SSE_KMS_SERVICE_VALUE = 1; + public static final int SSE_BYOK_VALUE = 2; + + + public final int getNumber() { return value; } + + public static SSEKeyType valueOf(int value) { + switch (value) { + case 1: return SSE_KMS_SERVICE; + case 2: return SSE_BYOK; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public SSEKeyType findValueByNumber(int number) { + return SSEKeyType.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.getDescriptor().getEnumTypes().get(6); + } + + private static final SSEKeyType[] VALUES = { + SSE_KMS_SERVICE, SSE_BYOK, + }; + + public static SSEKeyType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private SSEKeyType(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:com.alicloud.openservices.tablestore.core.protocol.SSEKeyType) + } + public enum ReturnType implements com.google.protobuf.ProtocolMessageEnum { RT_NONE(0, 0), @@ -479,7 +548,7 @@ public ReturnType findValueByNumber(int number) { } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.getDescriptor().getEnumTypes().get(6); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.getDescriptor().getEnumTypes().get(7); } private static final ReturnType[] VALUES = { @@ -551,7 +620,7 @@ public OperationType findValueByNumber(int number) { } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.getDescriptor().getEnumTypes().get(7); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.getDescriptor().getEnumTypes().get(8); } private static final OperationType[] VALUES = { @@ -620,7 +689,7 @@ public Direction findValueByNumber(int number) { } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.getDescriptor().getEnumTypes().get(8); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.getDescriptor().getEnumTypes().get(9); } private static final Direction[] VALUES = { @@ -689,7 +758,7 @@ public StreamStatus findValueByNumber(int number) { } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.getDescriptor().getEnumTypes().get(9); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.getDescriptor().getEnumTypes().get(10); } private static final StreamStatus[] VALUES = { @@ -761,7 +830,7 @@ public ActionType findValueByNumber(int number) { } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.getDescriptor().getEnumTypes().get(10); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.getDescriptor().getEnumTypes().get(11); } private static final ActionType[] VALUES = { @@ -788,6 +857,225 @@ private ActionType(int index, int value) { // @@protoc_insertion_point(enum_scope:com.alicloud.openservices.tablestore.core.protocol.ActionType) } + public enum DataBlockType + implements com.google.protobuf.ProtocolMessageEnum { + DBT_PLAIN_BUFFER(0, 0), + DBT_SIMPLE_ROW_MATRIX(1, 1), + ; + + public static final int DBT_PLAIN_BUFFER_VALUE = 0; + public static final int DBT_SIMPLE_ROW_MATRIX_VALUE = 1; + + + public final int getNumber() { return value; } + + public static DataBlockType valueOf(int value) { + switch (value) { + case 0: return DBT_PLAIN_BUFFER; + case 1: return DBT_SIMPLE_ROW_MATRIX; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DataBlockType findValueByNumber(int number) { + return DataBlockType.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.getDescriptor().getEnumTypes().get(12); + } + + private static final DataBlockType[] VALUES = { + DBT_PLAIN_BUFFER, DBT_SIMPLE_ROW_MATRIX, + }; + + public static DataBlockType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private DataBlockType(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:com.alicloud.openservices.tablestore.core.protocol.DataBlockType) + } + + public enum SQLPayloadVersion + implements com.google.protobuf.ProtocolMessageEnum { + SQL_PLAIN_BUFFER(0, 1), + SQL_FLAT_BUFFERS(1, 2), + ; + + public static final int SQL_PLAIN_BUFFER_VALUE = 1; + public static final int SQL_FLAT_BUFFERS_VALUE = 2; + + + public final int getNumber() { return value; } + + public static SQLPayloadVersion valueOf(int value) { + switch (value) { + case 1: return SQL_PLAIN_BUFFER; + case 2: return SQL_FLAT_BUFFERS; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public SQLPayloadVersion findValueByNumber(int number) { + return SQLPayloadVersion.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.getDescriptor().getEnumTypes().get(13); + } + + private static final SQLPayloadVersion[] VALUES = { + SQL_PLAIN_BUFFER, SQL_FLAT_BUFFERS, + }; + + public static SQLPayloadVersion valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private SQLPayloadVersion(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:com.alicloud.openservices.tablestore.core.protocol.SQLPayloadVersion) + } + + public enum SQLStatementType + implements com.google.protobuf.ProtocolMessageEnum { + SQL_SELECT(0, 1), + SQL_CREATE_TABLE(1, 2), + SQL_SHOW_TABLE(2, 3), + SQL_DESCRIBE_TABLE(3, 4), + SQL_DROP_TABLE(4, 5), + SQL_ALTER_TABLE(5, 6), + ; + + public static final int SQL_SELECT_VALUE = 1; + public static final int SQL_CREATE_TABLE_VALUE = 2; + public static final int SQL_SHOW_TABLE_VALUE = 3; + public static final int SQL_DESCRIBE_TABLE_VALUE = 4; + public static final int SQL_DROP_TABLE_VALUE = 5; + public static final int SQL_ALTER_TABLE_VALUE = 6; + + + public final int getNumber() { return value; } + + public static SQLStatementType valueOf(int value) { + switch (value) { + case 1: return SQL_SELECT; + case 2: return SQL_CREATE_TABLE; + case 3: return SQL_SHOW_TABLE; + case 4: return SQL_DESCRIBE_TABLE; + case 5: return SQL_DROP_TABLE; + case 6: return SQL_ALTER_TABLE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public SQLStatementType findValueByNumber(int number) { + return SQLStatementType.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.getDescriptor().getEnumTypes().get(14); + } + + private static final SQLStatementType[] VALUES = { + SQL_SELECT, SQL_CREATE_TABLE, SQL_SHOW_TABLE, SQL_DESCRIBE_TABLE, SQL_DROP_TABLE, SQL_ALTER_TABLE, + }; + + public static SQLStatementType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private SQLStatementType(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:com.alicloud.openservices.tablestore.core.protocol.SQLStatementType) + } + public interface ErrorOrBuilder extends com.google.protobuf.MessageOrBuilder { @@ -1788,102 +2076,80 @@ public Builder clearOption() { // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.PrimaryKeySchema) } - public interface DefinedColumnSchemaOrBuilder + public interface PartitionRangeOrBuilder extends com.google.protobuf.MessageOrBuilder { - // required string name = 1; - boolean hasName(); - String getName(); + // required bytes begin = 1; + boolean hasBegin(); + com.google.protobuf.ByteString getBegin(); - // required .com.alicloud.openservices.tablestore.core.protocol.DefinedColumnType type = 2; - boolean hasType(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnType getType(); + // required bytes end = 2; + boolean hasEnd(); + com.google.protobuf.ByteString getEnd(); } - public static final class DefinedColumnSchema extends + public static final class PartitionRange extends com.google.protobuf.GeneratedMessage - implements DefinedColumnSchemaOrBuilder { - // Use DefinedColumnSchema.newBuilder() to construct. - private DefinedColumnSchema(Builder builder) { + implements PartitionRangeOrBuilder { + // Use PartitionRange.newBuilder() to construct. + private PartitionRange(Builder builder) { super(builder); } - private DefinedColumnSchema(boolean noInit) {} + private PartitionRange(boolean noInit) {} - private static final DefinedColumnSchema defaultInstance; - public static DefinedColumnSchema getDefaultInstance() { + private static final PartitionRange defaultInstance; + public static PartitionRange getDefaultInstance() { return defaultInstance; } - public DefinedColumnSchema getDefaultInstanceForType() { + public PartitionRange getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DefinedColumnSchema_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_PartitionRange_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DefinedColumnSchema_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_PartitionRange_fieldAccessorTable; } private int bitField0_; - // required string name = 1; - public static final int NAME_FIELD_NUMBER = 1; - private java.lang.Object name_; - public boolean hasName() { + // required bytes begin = 1; + public static final int BEGIN_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString begin_; + public boolean hasBegin() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getName() { - java.lang.Object ref = name_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - name_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public com.google.protobuf.ByteString getBegin() { + return begin_; } - // required .com.alicloud.openservices.tablestore.core.protocol.DefinedColumnType type = 2; - public static final int TYPE_FIELD_NUMBER = 2; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnType type_; - public boolean hasType() { + // required bytes end = 2; + public static final int END_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString end_; + public boolean hasEnd() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnType getType() { - return type_; + public com.google.protobuf.ByteString getEnd() { + return end_; } private void initFields() { - name_ = ""; - type_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnType.DCT_INTEGER; + begin_ = com.google.protobuf.ByteString.EMPTY; + end_ = com.google.protobuf.ByteString.EMPTY; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - if (!hasName()) { + if (!hasBegin()) { memoizedIsInitialized = 0; return false; } - if (!hasType()) { + if (!hasEnd()) { memoizedIsInitialized = 0; return false; } @@ -1895,10 +2161,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getNameBytes()); + output.writeBytes(1, begin_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeEnum(2, type_.getNumber()); + output.writeBytes(2, end_); } getUnknownFields().writeTo(output); } @@ -1911,11 +2177,11 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getNameBytes()); + .computeBytesSize(1, begin_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, type_.getNumber()); + .computeBytesSize(2, end_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -1929,41 +2195,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRange parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRange parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRange parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRange parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRange parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRange parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRange parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -1972,7 +2238,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRange parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -1983,12 +2249,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRange parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRange parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -1998,7 +2264,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRange prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -2011,18 +2277,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchemaOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRangeOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DefinedColumnSchema_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_PartitionRange_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DefinedColumnSchema_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_PartitionRange_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRange.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -2041,9 +2307,9 @@ private static Builder create() { public Builder clear() { super.clear(); - name_ = ""; + begin_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); - type_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnType.DCT_INTEGER; + end_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -2054,24 +2320,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRange.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRange getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRange.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRange build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRange result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRange buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRange result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -2079,50 +2345,489 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Define return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema(this); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRange buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRange result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRange(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.name_ = name_; + result.begin_ = begin_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - result.type_ = type_; + result.end_ = end_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRange) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRange)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema.getDefaultInstance()) return this; - if (other.hasName()) { - setName(other.getName()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRange other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRange.getDefaultInstance()) return this; + if (other.hasBegin()) { + setBegin(other.getBegin()); } - if (other.hasType()) { - setType(other.getType()); + if (other.hasEnd()) { + setEnd(other.getEnd()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { - if (!hasName()) { + if (!hasBegin()) { return false; } - if (!hasType()) { + if (!hasEnd()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + begin_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + end_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // required bytes begin = 1; + private com.google.protobuf.ByteString begin_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasBegin() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.google.protobuf.ByteString getBegin() { + return begin_; + } + public Builder setBegin(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + begin_ = value; + onChanged(); + return this; + } + public Builder clearBegin() { + bitField0_ = (bitField0_ & ~0x00000001); + begin_ = getDefaultInstance().getBegin(); + onChanged(); + return this; + } + + // required bytes end = 2; + private com.google.protobuf.ByteString end_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasEnd() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getEnd() { + return end_; + } + public Builder setEnd(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + end_ = value; + onChanged(); + return this; + } + public Builder clearEnd() { + bitField0_ = (bitField0_ & ~0x00000002); + end_ = getDefaultInstance().getEnd(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.PartitionRange) + } + + static { + defaultInstance = new PartitionRange(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.PartitionRange) + } + + public interface DefinedColumnSchemaOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string name = 1; + boolean hasName(); + String getName(); + + // required .com.alicloud.openservices.tablestore.core.protocol.DefinedColumnType type = 2; + boolean hasType(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnType getType(); + } + public static final class DefinedColumnSchema extends + com.google.protobuf.GeneratedMessage + implements DefinedColumnSchemaOrBuilder { + // Use DefinedColumnSchema.newBuilder() to construct. + private DefinedColumnSchema(Builder builder) { + super(builder); + } + private DefinedColumnSchema(boolean noInit) {} + + private static final DefinedColumnSchema defaultInstance; + public static DefinedColumnSchema getDefaultInstance() { + return defaultInstance; + } + + public DefinedColumnSchema getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DefinedColumnSchema_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DefinedColumnSchema_fieldAccessorTable; + } + + private int bitField0_; + // required string name = 1; + public static final int NAME_FIELD_NUMBER = 1; + private java.lang.Object name_; + public boolean hasName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getName() { + java.lang.Object ref = name_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + name_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // required .com.alicloud.openservices.tablestore.core.protocol.DefinedColumnType type = 2; + public static final int TYPE_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnType type_; + public boolean hasType() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnType getType() { + return type_; + } + + private void initFields() { + name_ = ""; + type_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnType.DCT_INTEGER; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasName()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasType()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeEnum(2, type_.getNumber()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, type_.getNumber()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchemaOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DefinedColumnSchema_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DefinedColumnSchema_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + name_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + type_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnType.DCT_INTEGER; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.name_ = name_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.type_ = type_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema.getDefaultInstance()) return this; + if (other.hasName()) { + setName(other.getName()); + } + if (other.hasType()) { + setType(other.getType()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasName()) { + + return false; + } + if (!hasType()) { return false; } @@ -2259,6 +2964,10 @@ public interface TableOptionsOrBuilder // optional int64 deviation_cell_version_in_sec = 5; boolean hasDeviationCellVersionInSec(); long getDeviationCellVersionInSec(); + + // optional bool allow_update = 6; + boolean hasAllowUpdate(); + boolean getAllowUpdate(); } public static final class TableOptions extends com.google.protobuf.GeneratedMessage @@ -2319,10 +3028,21 @@ public long getDeviationCellVersionInSec() { return deviationCellVersionInSec_; } + // optional bool allow_update = 6; + public static final int ALLOW_UPDATE_FIELD_NUMBER = 6; + private boolean allowUpdate_; + public boolean hasAllowUpdate() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public boolean getAllowUpdate() { + return allowUpdate_; + } + private void initFields() { timeToLive_ = 0; maxVersions_ = 0; deviationCellVersionInSec_ = 0L; + allowUpdate_ = false; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -2345,6 +3065,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeInt64(5, deviationCellVersionInSec_); } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeBool(6, allowUpdate_); + } getUnknownFields().writeTo(output); } @@ -2366,6 +3089,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeInt64Size(5, deviationCellVersionInSec_); } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(6, allowUpdate_); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -2496,6 +3223,8 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000002); deviationCellVersionInSec_ = 0L; bitField0_ = (bitField0_ & ~0x00000004); + allowUpdate_ = false; + bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -2546,6 +3275,10 @@ public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOp to_bitField0_ |= 0x00000004; } result.deviationCellVersionInSec_ = deviationCellVersionInSec_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.allowUpdate_ = allowUpdate_; result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -2571,6 +3304,9 @@ public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsI if (other.hasDeviationCellVersionInSec()) { setDeviationCellVersionInSec(other.getDeviationCellVersionInSec()); } + if (other.hasAllowUpdate()) { + setAllowUpdate(other.getAllowUpdate()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -2617,6 +3353,11 @@ public Builder mergeFrom( deviationCellVersionInSec_ = input.readInt64(); break; } + case 48: { + bitField0_ |= 0x00000008; + allowUpdate_ = input.readBool(); + break; + } } } } @@ -2686,6 +3427,27 @@ public Builder clearDeviationCellVersionInSec() { return this; } + // optional bool allow_update = 6; + private boolean allowUpdate_ ; + public boolean hasAllowUpdate() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public boolean getAllowUpdate() { + return allowUpdate_; + } + public Builder setAllowUpdate(boolean value) { + bitField0_ |= 0x00000008; + allowUpdate_ = value; + onChanged(); + return this; + } + public Builder clearAllowUpdate() { + bitField0_ = (bitField0_ & ~0x00000008); + allowUpdate_ = false; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.TableOptions) } @@ -5213,6 +5975,401 @@ public Builder clearWrite() { // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.CapacityUnit) } + public interface CapacityDataSizeOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional int64 read_size = 1; + boolean hasReadSize(); + long getReadSize(); + + // optional int64 write_size = 2; + boolean hasWriteSize(); + long getWriteSize(); + } + public static final class CapacityDataSize extends + com.google.protobuf.GeneratedMessage + implements CapacityDataSizeOrBuilder { + // Use CapacityDataSize.newBuilder() to construct. + private CapacityDataSize(Builder builder) { + super(builder); + } + private CapacityDataSize(boolean noInit) {} + + private static final CapacityDataSize defaultInstance; + public static CapacityDataSize getDefaultInstance() { + return defaultInstance; + } + + public CapacityDataSize getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CapacityDataSize_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CapacityDataSize_fieldAccessorTable; + } + + private int bitField0_; + // optional int64 read_size = 1; + public static final int READ_SIZE_FIELD_NUMBER = 1; + private long readSize_; + public boolean hasReadSize() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public long getReadSize() { + return readSize_; + } + + // optional int64 write_size = 2; + public static final int WRITE_SIZE_FIELD_NUMBER = 2; + private long writeSize_; + public boolean hasWriteSize() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public long getWriteSize() { + return writeSize_; + } + + private void initFields() { + readSize_ = 0L; + writeSize_ = 0L; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeInt64(1, readSize_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeInt64(2, writeSize_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, readSize_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, writeSize_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSizeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CapacityDataSize_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CapacityDataSize_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + readSize_ = 0L; + bitField0_ = (bitField0_ & ~0x00000001); + writeSize_ = 0L; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.readSize_ = readSize_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.writeSize_ = writeSize_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize.getDefaultInstance()) return this; + if (other.hasReadSize()) { + setReadSize(other.getReadSize()); + } + if (other.hasWriteSize()) { + setWriteSize(other.getWriteSize()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + readSize_ = input.readInt64(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + writeSize_ = input.readInt64(); + break; + } + } + } + } + + private int bitField0_; + + // optional int64 read_size = 1; + private long readSize_ ; + public boolean hasReadSize() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public long getReadSize() { + return readSize_; + } + public Builder setReadSize(long value) { + bitField0_ |= 0x00000001; + readSize_ = value; + onChanged(); + return this; + } + public Builder clearReadSize() { + bitField0_ = (bitField0_ & ~0x00000001); + readSize_ = 0L; + onChanged(); + return this; + } + + // optional int64 write_size = 2; + private long writeSize_ ; + public boolean hasWriteSize() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public long getWriteSize() { + return writeSize_; + } + public Builder setWriteSize(long value) { + bitField0_ |= 0x00000002; + writeSize_ = value; + onChanged(); + return this; + } + public Builder clearWriteSize() { + bitField0_ = (bitField0_ & ~0x00000002); + writeSize_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.CapacityDataSize) + } + + static { + defaultInstance = new CapacityDataSize(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.CapacityDataSize) + } + public interface ReservedThroughputDetailsOrBuilder extends com.google.protobuf.MessageOrBuilder { @@ -6206,6 +7363,11 @@ public interface ConsumedCapacityOrBuilder boolean hasCapacityUnit(); com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityUnit getCapacityUnit(); com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityUnitOrBuilder getCapacityUnitOrBuilder(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.CapacityDataSize capacity_data_size = 2; + boolean hasCapacityDataSize(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize getCapacityDataSize(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSizeOrBuilder getCapacityDataSizeOrBuilder(); } public static final class ConsumedCapacity extends com.google.protobuf.GeneratedMessage @@ -6249,8 +7411,22 @@ public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Capacit return capacityUnit_; } + // optional .com.alicloud.openservices.tablestore.core.protocol.CapacityDataSize capacity_data_size = 2; + public static final int CAPACITY_DATA_SIZE_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize capacityDataSize_; + public boolean hasCapacityDataSize() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize getCapacityDataSize() { + return capacityDataSize_; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSizeOrBuilder getCapacityDataSizeOrBuilder() { + return capacityDataSize_; + } + private void initFields() { capacityUnit_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityUnit.getDefaultInstance(); + capacityDataSize_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -6271,6 +7447,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeMessage(1, capacityUnit_); } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeMessage(2, capacityDataSize_); + } getUnknownFields().writeTo(output); } @@ -6284,6 +7463,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, capacityUnit_); } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, capacityDataSize_); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -6401,6 +7584,7 @@ private Builder(BuilderParent parent) { private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { getCapacityUnitFieldBuilder(); + getCapacityDataSizeFieldBuilder(); } } private static Builder create() { @@ -6415,6 +7599,12 @@ public Builder clear() { capacityUnitBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); + if (capacityDataSizeBuilder_ == null) { + capacityDataSize_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize.getDefaultInstance(); + } else { + capacityDataSizeBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -6461,6 +7651,14 @@ public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Consume } else { result.capacityUnit_ = capacityUnitBuilder_.build(); } + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + if (capacityDataSizeBuilder_ == null) { + result.capacityDataSize_ = capacityDataSize_; + } else { + result.capacityDataSize_ = capacityDataSizeBuilder_.build(); + } result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -6480,6 +7678,9 @@ public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsI if (other.hasCapacityUnit()) { mergeCapacityUnit(other.getCapacityUnit()); } + if (other.hasCapacityDataSize()) { + mergeCapacityDataSize(other.getCapacityDataSize()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -6524,6 +7725,15 @@ public Builder mergeFrom( setCapacityUnit(subBuilder.buildPartial()); break; } + case 18: { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize.newBuilder(); + if (hasCapacityDataSize()) { + subBuilder.mergeFrom(getCapacityDataSize()); + } + input.readMessage(subBuilder, extensionRegistry); + setCapacityDataSize(subBuilder.buildPartial()); + break; + } } } } @@ -6620,6 +7830,96 @@ public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Capacit return capacityUnitBuilder_; } + // optional .com.alicloud.openservices.tablestore.core.protocol.CapacityDataSize capacity_data_size = 2; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize capacityDataSize_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSizeOrBuilder> capacityDataSizeBuilder_; + public boolean hasCapacityDataSize() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize getCapacityDataSize() { + if (capacityDataSizeBuilder_ == null) { + return capacityDataSize_; + } else { + return capacityDataSizeBuilder_.getMessage(); + } + } + public Builder setCapacityDataSize(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize value) { + if (capacityDataSizeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + capacityDataSize_ = value; + onChanged(); + } else { + capacityDataSizeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder setCapacityDataSize( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize.Builder builderForValue) { + if (capacityDataSizeBuilder_ == null) { + capacityDataSize_ = builderForValue.build(); + onChanged(); + } else { + capacityDataSizeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder mergeCapacityDataSize(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize value) { + if (capacityDataSizeBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002) && + capacityDataSize_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize.getDefaultInstance()) { + capacityDataSize_ = + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize.newBuilder(capacityDataSize_).mergeFrom(value).buildPartial(); + } else { + capacityDataSize_ = value; + } + onChanged(); + } else { + capacityDataSizeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder clearCapacityDataSize() { + if (capacityDataSizeBuilder_ == null) { + capacityDataSize_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize.getDefaultInstance(); + onChanged(); + } else { + capacityDataSizeBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize.Builder getCapacityDataSizeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getCapacityDataSizeFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSizeOrBuilder getCapacityDataSizeOrBuilder() { + if (capacityDataSizeBuilder_ != null) { + return capacityDataSizeBuilder_.getMessageOrBuilder(); + } else { + return capacityDataSize_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSizeOrBuilder> + getCapacityDataSizeFieldBuilder() { + if (capacityDataSizeBuilder_ == null) { + capacityDataSizeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSizeOrBuilder>( + capacityDataSize_, + getParentForChildren(), + isClean()); + capacityDataSize_ = null; + } + return capacityDataSizeBuilder_; + } + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity) } @@ -7588,181 +8888,109 @@ public Builder clearLastEnableTime() { // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.StreamDetails) } - public interface CreateTableRequestOrBuilder + public interface SSESpecificationOrBuilder extends com.google.protobuf.MessageOrBuilder { - // required .com.alicloud.openservices.tablestore.core.protocol.TableMeta table_meta = 1; - boolean hasTableMeta(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta getTableMeta(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMetaOrBuilder getTableMetaOrBuilder(); - - // required .com.alicloud.openservices.tablestore.core.protocol.ReservedThroughput reserved_throughput = 2; - boolean hasReservedThroughput(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput getReservedThroughput(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputOrBuilder getReservedThroughputOrBuilder(); + // required bool enable = 1; + boolean hasEnable(); + boolean getEnable(); - // optional .com.alicloud.openservices.tablestore.core.protocol.TableOptions table_options = 3; - boolean hasTableOptions(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions getTableOptions(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptionsOrBuilder getTableOptionsOrBuilder(); + // optional .com.alicloud.openservices.tablestore.core.protocol.SSEKeyType key_type = 2; + boolean hasKeyType(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEKeyType getKeyType(); - // optional .com.alicloud.openservices.tablestore.core.protocol.StreamSpecification stream_spec = 5; - boolean hasStreamSpec(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification getStreamSpec(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecificationOrBuilder getStreamSpecOrBuilder(); + // optional bytes key_id = 3; + boolean hasKeyId(); + com.google.protobuf.ByteString getKeyId(); - // repeated .com.alicloud.openservices.tablestore.core.protocol.IndexMeta index_metas = 7; - java.util.List - getIndexMetasList(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta getIndexMetas(int index); - int getIndexMetasCount(); - java.util.List - getIndexMetasOrBuilderList(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMetaOrBuilder getIndexMetasOrBuilder( - int index); + // optional bytes role_arn = 4; + boolean hasRoleArn(); + com.google.protobuf.ByteString getRoleArn(); } - public static final class CreateTableRequest extends + public static final class SSESpecification extends com.google.protobuf.GeneratedMessage - implements CreateTableRequestOrBuilder { - // Use CreateTableRequest.newBuilder() to construct. - private CreateTableRequest(Builder builder) { + implements SSESpecificationOrBuilder { + // Use SSESpecification.newBuilder() to construct. + private SSESpecification(Builder builder) { super(builder); } - private CreateTableRequest(boolean noInit) {} + private SSESpecification(boolean noInit) {} - private static final CreateTableRequest defaultInstance; - public static CreateTableRequest getDefaultInstance() { + private static final SSESpecification defaultInstance; + public static SSESpecification getDefaultInstance() { return defaultInstance; } - public CreateTableRequest getDefaultInstanceForType() { + public SSESpecification getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateTableRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_SSESpecification_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateTableRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_SSESpecification_fieldAccessorTable; } private int bitField0_; - // required .com.alicloud.openservices.tablestore.core.protocol.TableMeta table_meta = 1; - public static final int TABLE_META_FIELD_NUMBER = 1; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta tableMeta_; - public boolean hasTableMeta() { + // required bool enable = 1; + public static final int ENABLE_FIELD_NUMBER = 1; + private boolean enable_; + public boolean hasEnable() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta getTableMeta() { - return tableMeta_; - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMetaOrBuilder getTableMetaOrBuilder() { - return tableMeta_; + public boolean getEnable() { + return enable_; } - // required .com.alicloud.openservices.tablestore.core.protocol.ReservedThroughput reserved_throughput = 2; - public static final int RESERVED_THROUGHPUT_FIELD_NUMBER = 2; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput reservedThroughput_; - public boolean hasReservedThroughput() { + // optional .com.alicloud.openservices.tablestore.core.protocol.SSEKeyType key_type = 2; + public static final int KEY_TYPE_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEKeyType keyType_; + public boolean hasKeyType() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput getReservedThroughput() { - return reservedThroughput_; - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputOrBuilder getReservedThroughputOrBuilder() { - return reservedThroughput_; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEKeyType getKeyType() { + return keyType_; } - // optional .com.alicloud.openservices.tablestore.core.protocol.TableOptions table_options = 3; - public static final int TABLE_OPTIONS_FIELD_NUMBER = 3; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions tableOptions_; - public boolean hasTableOptions() { + // optional bytes key_id = 3; + public static final int KEY_ID_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString keyId_; + public boolean hasKeyId() { return ((bitField0_ & 0x00000004) == 0x00000004); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions getTableOptions() { - return tableOptions_; - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptionsOrBuilder getTableOptionsOrBuilder() { - return tableOptions_; + public com.google.protobuf.ByteString getKeyId() { + return keyId_; } - // optional .com.alicloud.openservices.tablestore.core.protocol.StreamSpecification stream_spec = 5; - public static final int STREAM_SPEC_FIELD_NUMBER = 5; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification streamSpec_; - public boolean hasStreamSpec() { + // optional bytes role_arn = 4; + public static final int ROLE_ARN_FIELD_NUMBER = 4; + private com.google.protobuf.ByteString roleArn_; + public boolean hasRoleArn() { return ((bitField0_ & 0x00000008) == 0x00000008); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification getStreamSpec() { - return streamSpec_; - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecificationOrBuilder getStreamSpecOrBuilder() { - return streamSpec_; - } - - // repeated .com.alicloud.openservices.tablestore.core.protocol.IndexMeta index_metas = 7; - public static final int INDEX_METAS_FIELD_NUMBER = 7; - private java.util.List indexMetas_; - public java.util.List getIndexMetasList() { - return indexMetas_; - } - public java.util.List - getIndexMetasOrBuilderList() { - return indexMetas_; - } - public int getIndexMetasCount() { - return indexMetas_.size(); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta getIndexMetas(int index) { - return indexMetas_.get(index); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMetaOrBuilder getIndexMetasOrBuilder( - int index) { - return indexMetas_.get(index); + public com.google.protobuf.ByteString getRoleArn() { + return roleArn_; } private void initFields() { - tableMeta_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.getDefaultInstance(); - reservedThroughput_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.getDefaultInstance(); - tableOptions_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.getDefaultInstance(); - streamSpec_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.getDefaultInstance(); - indexMetas_ = java.util.Collections.emptyList(); + enable_ = false; + keyType_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEKeyType.SSE_KMS_SERVICE; + keyId_ = com.google.protobuf.ByteString.EMPTY; + roleArn_ = com.google.protobuf.ByteString.EMPTY; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - if (!hasTableMeta()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasReservedThroughput()) { - memoizedIsInitialized = 0; - return false; - } - if (!getTableMeta().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - if (!getReservedThroughput().isInitialized()) { + if (!hasEnable()) { memoizedIsInitialized = 0; return false; } - if (hasStreamSpec()) { - if (!getStreamSpec().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - for (int i = 0; i < getIndexMetasCount(); i++) { - if (!getIndexMetas(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } memoizedIsInitialized = 1; return true; } @@ -7771,19 +8999,16 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeMessage(1, tableMeta_); + output.writeBool(1, enable_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeMessage(2, reservedThroughput_); + output.writeEnum(2, keyType_.getNumber()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeMessage(3, tableOptions_); + output.writeBytes(3, keyId_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeMessage(5, streamSpec_); - } - for (int i = 0; i < indexMetas_.size(); i++) { - output.writeMessage(7, indexMetas_.get(i)); + output.writeBytes(4, roleArn_); } getUnknownFields().writeTo(output); } @@ -7796,23 +9021,19 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, tableMeta_); + .computeBoolSize(1, enable_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, reservedThroughput_); + .computeEnumSize(2, keyType_.getNumber()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, tableOptions_); + .computeBytesSize(3, keyId_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, streamSpec_); - } - for (int i = 0; i < indexMetas_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, indexMetas_.get(i)); + .computeBytesSize(4, roleArn_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -7826,41 +9047,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -7869,7 +9090,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -7880,12 +9101,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -7895,7 +9116,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -7908,18 +9129,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequestOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecificationOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateTableRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_SSESpecification_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateTableRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_SSESpecification_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -7930,11 +9151,6 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getTableMetaFieldBuilder(); - getReservedThroughputFieldBuilder(); - getTableOptionsFieldBuilder(); - getStreamSpecFieldBuilder(); - getIndexMetasFieldBuilder(); } } private static Builder create() { @@ -7943,36 +9159,14 @@ private static Builder create() { public Builder clear() { super.clear(); - if (tableMetaBuilder_ == null) { - tableMeta_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.getDefaultInstance(); - } else { - tableMetaBuilder_.clear(); - } + enable_ = false; bitField0_ = (bitField0_ & ~0x00000001); - if (reservedThroughputBuilder_ == null) { - reservedThroughput_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.getDefaultInstance(); - } else { - reservedThroughputBuilder_.clear(); - } + keyType_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEKeyType.SSE_KMS_SERVICE; bitField0_ = (bitField0_ & ~0x00000002); - if (tableOptionsBuilder_ == null) { - tableOptions_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.getDefaultInstance(); - } else { - tableOptionsBuilder_.clear(); - } + keyId_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000004); - if (streamSpecBuilder_ == null) { - streamSpec_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.getDefaultInstance(); - } else { - streamSpecBuilder_.clear(); - } + roleArn_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000008); - if (indexMetasBuilder_ == null) { - indexMetas_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - } else { - indexMetasBuilder_.clear(); - } return this; } @@ -7982,24 +9176,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -8007,138 +9201,63 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Create return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest(this); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - if (tableMetaBuilder_ == null) { - result.tableMeta_ = tableMeta_; - } else { - result.tableMeta_ = tableMetaBuilder_.build(); - } + result.enable_ = enable_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - if (reservedThroughputBuilder_ == null) { - result.reservedThroughput_ = reservedThroughput_; - } else { - result.reservedThroughput_ = reservedThroughputBuilder_.build(); - } + result.keyType_ = keyType_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } - if (tableOptionsBuilder_ == null) { - result.tableOptions_ = tableOptions_; - } else { - result.tableOptions_ = tableOptionsBuilder_.build(); - } + result.keyId_ = keyId_; if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; } - if (streamSpecBuilder_ == null) { - result.streamSpec_ = streamSpec_; - } else { - result.streamSpec_ = streamSpecBuilder_.build(); - } - if (indexMetasBuilder_ == null) { - if (((bitField0_ & 0x00000010) == 0x00000010)) { - indexMetas_ = java.util.Collections.unmodifiableList(indexMetas_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.indexMetas_ = indexMetas_; - } else { - result.indexMetas_ = indexMetasBuilder_.build(); - } + result.roleArn_ = roleArn_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest.getDefaultInstance()) return this; - if (other.hasTableMeta()) { - mergeTableMeta(other.getTableMeta()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification.getDefaultInstance()) return this; + if (other.hasEnable()) { + setEnable(other.getEnable()); } - if (other.hasReservedThroughput()) { - mergeReservedThroughput(other.getReservedThroughput()); + if (other.hasKeyType()) { + setKeyType(other.getKeyType()); } - if (other.hasTableOptions()) { - mergeTableOptions(other.getTableOptions()); + if (other.hasKeyId()) { + setKeyId(other.getKeyId()); } - if (other.hasStreamSpec()) { - mergeStreamSpec(other.getStreamSpec()); - } - if (indexMetasBuilder_ == null) { - if (!other.indexMetas_.isEmpty()) { - if (indexMetas_.isEmpty()) { - indexMetas_ = other.indexMetas_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureIndexMetasIsMutable(); - indexMetas_.addAll(other.indexMetas_); - } - onChanged(); - } - } else { - if (!other.indexMetas_.isEmpty()) { - if (indexMetasBuilder_.isEmpty()) { - indexMetasBuilder_.dispose(); - indexMetasBuilder_ = null; - indexMetas_ = other.indexMetas_; - bitField0_ = (bitField0_ & ~0x00000010); - indexMetasBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getIndexMetasFieldBuilder() : null; - } else { - indexMetasBuilder_.addAllMessages(other.indexMetas_); - } - } + if (other.hasRoleArn()) { + setRoleArn(other.getRoleArn()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { - if (!hasTableMeta()) { - - return false; - } - if (!hasReservedThroughput()) { - - return false; - } - if (!getTableMeta().isInitialized()) { + if (!hasEnable()) { return false; } - if (!getReservedThroughput().isInitialized()) { - - return false; - } - if (hasStreamSpec()) { - if (!getStreamSpec().isInitialized()) { - - return false; - } - } - for (int i = 0; i < getIndexMetasCount(); i++) { - if (!getIndexMetas(i).isInitialized()) { - - return false; - } - } return true; } @@ -8165,46 +9284,30 @@ public Builder mergeFrom( } break; } - case 10: { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.newBuilder(); - if (hasTableMeta()) { - subBuilder.mergeFrom(getTableMeta()); - } - input.readMessage(subBuilder, extensionRegistry); - setTableMeta(subBuilder.buildPartial()); + case 8: { + bitField0_ |= 0x00000001; + enable_ = input.readBool(); break; } - case 18: { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.newBuilder(); - if (hasReservedThroughput()) { - subBuilder.mergeFrom(getReservedThroughput()); + case 16: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEKeyType value = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEKeyType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(2, rawValue); + } else { + bitField0_ |= 0x00000002; + keyType_ = value; } - input.readMessage(subBuilder, extensionRegistry); - setReservedThroughput(subBuilder.buildPartial()); break; } case 26: { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.newBuilder(); - if (hasTableOptions()) { - subBuilder.mergeFrom(getTableOptions()); - } - input.readMessage(subBuilder, extensionRegistry); - setTableOptions(subBuilder.buildPartial()); - break; - } - case 42: { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.newBuilder(); - if (hasStreamSpec()) { - subBuilder.mergeFrom(getStreamSpec()); - } - input.readMessage(subBuilder, extensionRegistry); - setStreamSpec(subBuilder.buildPartial()); + bitField0_ |= 0x00000004; + keyId_ = input.readBytes(); break; } - case 58: { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.newBuilder(); - input.readMessage(subBuilder, extensionRegistry); - addIndexMetas(subBuilder.buildPartial()); + case 34: { + bitField0_ |= 0x00000008; + roleArn_ = input.readBytes(); break; } } @@ -8213,617 +9316,257 @@ public Builder mergeFrom( private int bitField0_; - // required .com.alicloud.openservices.tablestore.core.protocol.TableMeta table_meta = 1; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta tableMeta_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMetaOrBuilder> tableMetaBuilder_; - public boolean hasTableMeta() { + // required bool enable = 1; + private boolean enable_ ; + public boolean hasEnable() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta getTableMeta() { - if (tableMetaBuilder_ == null) { - return tableMeta_; - } else { - return tableMetaBuilder_.getMessage(); - } - } - public Builder setTableMeta(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta value) { - if (tableMetaBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - tableMeta_ = value; - onChanged(); - } else { - tableMetaBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - return this; - } - public Builder setTableMeta( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.Builder builderForValue) { - if (tableMetaBuilder_ == null) { - tableMeta_ = builderForValue.build(); - onChanged(); - } else { - tableMetaBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - return this; + public boolean getEnable() { + return enable_; } - public Builder mergeTableMeta(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta value) { - if (tableMetaBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001) && - tableMeta_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.getDefaultInstance()) { - tableMeta_ = - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.newBuilder(tableMeta_).mergeFrom(value).buildPartial(); - } else { - tableMeta_ = value; - } - onChanged(); - } else { - tableMetaBuilder_.mergeFrom(value); - } + public Builder setEnable(boolean value) { bitField0_ |= 0x00000001; + enable_ = value; + onChanged(); return this; } - public Builder clearTableMeta() { - if (tableMetaBuilder_ == null) { - tableMeta_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.getDefaultInstance(); - onChanged(); - } else { - tableMetaBuilder_.clear(); - } + public Builder clearEnable() { bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.Builder getTableMetaBuilder() { - bitField0_ |= 0x00000001; + enable_ = false; onChanged(); - return getTableMetaFieldBuilder().getBuilder(); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMetaOrBuilder getTableMetaOrBuilder() { - if (tableMetaBuilder_ != null) { - return tableMetaBuilder_.getMessageOrBuilder(); - } else { - return tableMeta_; - } - } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMetaOrBuilder> - getTableMetaFieldBuilder() { - if (tableMetaBuilder_ == null) { - tableMetaBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMetaOrBuilder>( - tableMeta_, - getParentForChildren(), - isClean()); - tableMeta_ = null; - } - return tableMetaBuilder_; + return this; } - // required .com.alicloud.openservices.tablestore.core.protocol.ReservedThroughput reserved_throughput = 2; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput reservedThroughput_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputOrBuilder> reservedThroughputBuilder_; - public boolean hasReservedThroughput() { + // optional .com.alicloud.openservices.tablestore.core.protocol.SSEKeyType key_type = 2; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEKeyType keyType_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEKeyType.SSE_KMS_SERVICE; + public boolean hasKeyType() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput getReservedThroughput() { - if (reservedThroughputBuilder_ == null) { - return reservedThroughput_; - } else { - return reservedThroughputBuilder_.getMessage(); - } - } - public Builder setReservedThroughput(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput value) { - if (reservedThroughputBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - reservedThroughput_ = value; - onChanged(); - } else { - reservedThroughputBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - return this; - } - public Builder setReservedThroughput( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.Builder builderForValue) { - if (reservedThroughputBuilder_ == null) { - reservedThroughput_ = builderForValue.build(); - onChanged(); - } else { - reservedThroughputBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - return this; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEKeyType getKeyType() { + return keyType_; } - public Builder mergeReservedThroughput(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput value) { - if (reservedThroughputBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002) && - reservedThroughput_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.getDefaultInstance()) { - reservedThroughput_ = - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.newBuilder(reservedThroughput_).mergeFrom(value).buildPartial(); - } else { - reservedThroughput_ = value; - } - onChanged(); - } else { - reservedThroughputBuilder_.mergeFrom(value); + public Builder setKeyType(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEKeyType value) { + if (value == null) { + throw new NullPointerException(); } bitField0_ |= 0x00000002; + keyType_ = value; + onChanged(); return this; } - public Builder clearReservedThroughput() { - if (reservedThroughputBuilder_ == null) { - reservedThroughput_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.getDefaultInstance(); - onChanged(); - } else { - reservedThroughputBuilder_.clear(); - } + public Builder clearKeyType() { bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.Builder getReservedThroughputBuilder() { - bitField0_ |= 0x00000002; + keyType_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEKeyType.SSE_KMS_SERVICE; onChanged(); - return getReservedThroughputFieldBuilder().getBuilder(); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputOrBuilder getReservedThroughputOrBuilder() { - if (reservedThroughputBuilder_ != null) { - return reservedThroughputBuilder_.getMessageOrBuilder(); - } else { - return reservedThroughput_; - } - } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputOrBuilder> - getReservedThroughputFieldBuilder() { - if (reservedThroughputBuilder_ == null) { - reservedThroughputBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputOrBuilder>( - reservedThroughput_, - getParentForChildren(), - isClean()); - reservedThroughput_ = null; - } - return reservedThroughputBuilder_; + return this; } - // optional .com.alicloud.openservices.tablestore.core.protocol.TableOptions table_options = 3; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions tableOptions_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptionsOrBuilder> tableOptionsBuilder_; - public boolean hasTableOptions() { + // optional bytes key_id = 3; + private com.google.protobuf.ByteString keyId_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasKeyId() { return ((bitField0_ & 0x00000004) == 0x00000004); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions getTableOptions() { - if (tableOptionsBuilder_ == null) { - return tableOptions_; - } else { - return tableOptionsBuilder_.getMessage(); - } - } - public Builder setTableOptions(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions value) { - if (tableOptionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - tableOptions_ = value; - onChanged(); - } else { - tableOptionsBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - return this; - } - public Builder setTableOptions( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.Builder builderForValue) { - if (tableOptionsBuilder_ == null) { - tableOptions_ = builderForValue.build(); - onChanged(); - } else { - tableOptionsBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - return this; + public com.google.protobuf.ByteString getKeyId() { + return keyId_; } - public Builder mergeTableOptions(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions value) { - if (tableOptionsBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004) && - tableOptions_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.getDefaultInstance()) { - tableOptions_ = - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.newBuilder(tableOptions_).mergeFrom(value).buildPartial(); - } else { - tableOptions_ = value; - } - onChanged(); - } else { - tableOptionsBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; + public Builder setKeyId(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + keyId_ = value; + onChanged(); return this; } - public Builder clearTableOptions() { - if (tableOptionsBuilder_ == null) { - tableOptions_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.getDefaultInstance(); - onChanged(); - } else { - tableOptionsBuilder_.clear(); - } + public Builder clearKeyId() { bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.Builder getTableOptionsBuilder() { - bitField0_ |= 0x00000004; + keyId_ = getDefaultInstance().getKeyId(); onChanged(); - return getTableOptionsFieldBuilder().getBuilder(); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptionsOrBuilder getTableOptionsOrBuilder() { - if (tableOptionsBuilder_ != null) { - return tableOptionsBuilder_.getMessageOrBuilder(); - } else { - return tableOptions_; - } - } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptionsOrBuilder> - getTableOptionsFieldBuilder() { - if (tableOptionsBuilder_ == null) { - tableOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptionsOrBuilder>( - tableOptions_, - getParentForChildren(), - isClean()); - tableOptions_ = null; - } - return tableOptionsBuilder_; + return this; } - // optional .com.alicloud.openservices.tablestore.core.protocol.StreamSpecification stream_spec = 5; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification streamSpec_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecificationOrBuilder> streamSpecBuilder_; - public boolean hasStreamSpec() { + // optional bytes role_arn = 4; + private com.google.protobuf.ByteString roleArn_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasRoleArn() { return ((bitField0_ & 0x00000008) == 0x00000008); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification getStreamSpec() { - if (streamSpecBuilder_ == null) { - return streamSpec_; - } else { - return streamSpecBuilder_.getMessage(); - } - } - public Builder setStreamSpec(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification value) { - if (streamSpecBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - streamSpec_ = value; - onChanged(); - } else { - streamSpecBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - return this; - } - public Builder setStreamSpec( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.Builder builderForValue) { - if (streamSpecBuilder_ == null) { - streamSpec_ = builderForValue.build(); - onChanged(); - } else { - streamSpecBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - return this; + public com.google.protobuf.ByteString getRoleArn() { + return roleArn_; } - public Builder mergeStreamSpec(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification value) { - if (streamSpecBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008) && - streamSpec_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.getDefaultInstance()) { - streamSpec_ = - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.newBuilder(streamSpec_).mergeFrom(value).buildPartial(); - } else { - streamSpec_ = value; - } - onChanged(); - } else { - streamSpecBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000008; + public Builder setRoleArn(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + roleArn_ = value; + onChanged(); return this; } - public Builder clearStreamSpec() { - if (streamSpecBuilder_ == null) { - streamSpec_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.getDefaultInstance(); - onChanged(); - } else { - streamSpecBuilder_.clear(); - } + public Builder clearRoleArn() { bitField0_ = (bitField0_ & ~0x00000008); + roleArn_ = getDefaultInstance().getRoleArn(); + onChanged(); return this; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.Builder getStreamSpecBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getStreamSpecFieldBuilder().getBuilder(); + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.SSESpecification) + } + + static { + defaultInstance = new SSESpecification(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.SSESpecification) + } + + public interface SSEDetailsOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required bool enable = 1; + boolean hasEnable(); + boolean getEnable(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.SSEKeyType key_type = 2; + boolean hasKeyType(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEKeyType getKeyType(); + + // optional bytes key_id = 3; + boolean hasKeyId(); + com.google.protobuf.ByteString getKeyId(); + + // optional bytes role_arn = 4; + boolean hasRoleArn(); + com.google.protobuf.ByteString getRoleArn(); + } + public static final class SSEDetails extends + com.google.protobuf.GeneratedMessage + implements SSEDetailsOrBuilder { + // Use SSEDetails.newBuilder() to construct. + private SSEDetails(Builder builder) { + super(builder); + } + private SSEDetails(boolean noInit) {} + + private static final SSEDetails defaultInstance; + public static SSEDetails getDefaultInstance() { + return defaultInstance; + } + + public SSEDetails getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_SSEDetails_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_SSEDetails_fieldAccessorTable; + } + + private int bitField0_; + // required bool enable = 1; + public static final int ENABLE_FIELD_NUMBER = 1; + private boolean enable_; + public boolean hasEnable() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public boolean getEnable() { + return enable_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.SSEKeyType key_type = 2; + public static final int KEY_TYPE_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEKeyType keyType_; + public boolean hasKeyType() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEKeyType getKeyType() { + return keyType_; + } + + // optional bytes key_id = 3; + public static final int KEY_ID_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString keyId_; + public boolean hasKeyId() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.google.protobuf.ByteString getKeyId() { + return keyId_; + } + + // optional bytes role_arn = 4; + public static final int ROLE_ARN_FIELD_NUMBER = 4; + private com.google.protobuf.ByteString roleArn_; + public boolean hasRoleArn() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.google.protobuf.ByteString getRoleArn() { + return roleArn_; + } + + private void initFields() { + enable_ = false; + keyType_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEKeyType.SSE_KMS_SERVICE; + keyId_ = com.google.protobuf.ByteString.EMPTY; + roleArn_ = com.google.protobuf.ByteString.EMPTY; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasEnable()) { + memoizedIsInitialized = 0; + return false; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecificationOrBuilder getStreamSpecOrBuilder() { - if (streamSpecBuilder_ != null) { - return streamSpecBuilder_.getMessageOrBuilder(); - } else { - return streamSpec_; - } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBool(1, enable_); } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecificationOrBuilder> - getStreamSpecFieldBuilder() { - if (streamSpecBuilder_ == null) { - streamSpecBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecificationOrBuilder>( - streamSpec_, - getParentForChildren(), - isClean()); - streamSpec_ = null; - } - return streamSpecBuilder_; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeEnum(2, keyType_.getNumber()); } - - // repeated .com.alicloud.openservices.tablestore.core.protocol.IndexMeta index_metas = 7; - private java.util.List indexMetas_ = - java.util.Collections.emptyList(); - private void ensureIndexMetasIsMutable() { - if (!((bitField0_ & 0x00000010) == 0x00000010)) { - indexMetas_ = new java.util.ArrayList(indexMetas_); - bitField0_ |= 0x00000010; - } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeBytes(3, keyId_); } - - private com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMetaOrBuilder> indexMetasBuilder_; - - public java.util.List getIndexMetasList() { - if (indexMetasBuilder_ == null) { - return java.util.Collections.unmodifiableList(indexMetas_); - } else { - return indexMetasBuilder_.getMessageList(); - } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeBytes(4, roleArn_); } - public int getIndexMetasCount() { - if (indexMetasBuilder_ == null) { - return indexMetas_.size(); - } else { - return indexMetasBuilder_.getCount(); - } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, enable_); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta getIndexMetas(int index) { - if (indexMetasBuilder_ == null) { - return indexMetas_.get(index); - } else { - return indexMetasBuilder_.getMessage(index); - } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, keyType_.getNumber()); } - public Builder setIndexMetas( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta value) { - if (indexMetasBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureIndexMetasIsMutable(); - indexMetas_.set(index, value); - onChanged(); - } else { - indexMetasBuilder_.setMessage(index, value); - } - return this; + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, keyId_); } - public Builder setIndexMetas( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder builderForValue) { - if (indexMetasBuilder_ == null) { - ensureIndexMetasIsMutable(); - indexMetas_.set(index, builderForValue.build()); - onChanged(); - } else { - indexMetasBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - public Builder addIndexMetas(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta value) { - if (indexMetasBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureIndexMetasIsMutable(); - indexMetas_.add(value); - onChanged(); - } else { - indexMetasBuilder_.addMessage(value); - } - return this; - } - public Builder addIndexMetas( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta value) { - if (indexMetasBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureIndexMetasIsMutable(); - indexMetas_.add(index, value); - onChanged(); - } else { - indexMetasBuilder_.addMessage(index, value); - } - return this; - } - public Builder addIndexMetas( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder builderForValue) { - if (indexMetasBuilder_ == null) { - ensureIndexMetasIsMutable(); - indexMetas_.add(builderForValue.build()); - onChanged(); - } else { - indexMetasBuilder_.addMessage(builderForValue.build()); - } - return this; - } - public Builder addIndexMetas( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder builderForValue) { - if (indexMetasBuilder_ == null) { - ensureIndexMetasIsMutable(); - indexMetas_.add(index, builderForValue.build()); - onChanged(); - } else { - indexMetasBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - public Builder addAllIndexMetas( - java.lang.Iterable values) { - if (indexMetasBuilder_ == null) { - ensureIndexMetasIsMutable(); - super.addAll(values, indexMetas_); - onChanged(); - } else { - indexMetasBuilder_.addAllMessages(values); - } - return this; - } - public Builder clearIndexMetas() { - if (indexMetasBuilder_ == null) { - indexMetas_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - } else { - indexMetasBuilder_.clear(); - } - return this; - } - public Builder removeIndexMetas(int index) { - if (indexMetasBuilder_ == null) { - ensureIndexMetasIsMutable(); - indexMetas_.remove(index); - onChanged(); - } else { - indexMetasBuilder_.remove(index); - } - return this; - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder getIndexMetasBuilder( - int index) { - return getIndexMetasFieldBuilder().getBuilder(index); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMetaOrBuilder getIndexMetasOrBuilder( - int index) { - if (indexMetasBuilder_ == null) { - return indexMetas_.get(index); } else { - return indexMetasBuilder_.getMessageOrBuilder(index); - } - } - public java.util.List - getIndexMetasOrBuilderList() { - if (indexMetasBuilder_ != null) { - return indexMetasBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(indexMetas_); - } - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder addIndexMetasBuilder() { - return getIndexMetasFieldBuilder().addBuilder( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.getDefaultInstance()); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder addIndexMetasBuilder( - int index) { - return getIndexMetasFieldBuilder().addBuilder( - index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.getDefaultInstance()); - } - public java.util.List - getIndexMetasBuilderList() { - return getIndexMetasFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMetaOrBuilder> - getIndexMetasFieldBuilder() { - if (indexMetasBuilder_ == null) { - indexMetasBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMetaOrBuilder>( - indexMetas_, - ((bitField0_ & 0x00000010) == 0x00000010), - getParentForChildren(), - isClean()); - indexMetas_ = null; - } - return indexMetasBuilder_; + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(4, roleArn_); } - - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.CreateTableRequest) - } - - static { - defaultInstance = new CreateTableRequest(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.CreateTableRequest) - } - - public interface CreateTableResponseOrBuilder - extends com.google.protobuf.MessageOrBuilder { - } - public static final class CreateTableResponse extends - com.google.protobuf.GeneratedMessage - implements CreateTableResponseOrBuilder { - // Use CreateTableResponse.newBuilder() to construct. - private CreateTableResponse(Builder builder) { - super(builder); - } - private CreateTableResponse(boolean noInit) {} - - private static final CreateTableResponse defaultInstance; - public static CreateTableResponse getDefaultInstance() { - return defaultInstance; - } - - public CreateTableResponse getDefaultInstanceForType() { - return defaultInstance; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateTableResponse_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateTableResponse_fieldAccessorTable; - } - - private void initFields() { - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -8836,41 +9579,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -8879,7 +9622,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -8890,12 +9633,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -8905,7 +9648,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -8918,18 +9661,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponseOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetailsOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateTableResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_SSEDetails_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateTableResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_SSEDetails_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -8948,6 +9691,14 @@ private static Builder create() { public Builder clear() { super.clear(); + enable_ = false; + bitField0_ = (bitField0_ & ~0x00000001); + keyType_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEKeyType.SSE_KMS_SERVICE; + bitField0_ = (bitField0_ & ~0x00000002); + keyId_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + roleArn_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -8957,24 +9708,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -8982,28 +9733,63 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Create return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse(this); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.enable_ = enable_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.keyType_ = keyType_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.keyId_ = keyId_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.roleArn_ = roleArn_; + result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse.getDefaultInstance()) return this; + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails.getDefaultInstance()) return this; + if (other.hasEnable()) { + setEnable(other.getEnable()); + } + if (other.hasKeyType()) { + setKeyType(other.getKeyType()); + } + if (other.hasKeyId()) { + setKeyId(other.getKeyId()); + } + if (other.hasRoleArn()) { + setRoleArn(other.getRoleArn()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { + if (!hasEnable()) { + + return false; + } return true; } @@ -9030,180 +9816,466 @@ public Builder mergeFrom( } break; } + case 8: { + bitField0_ |= 0x00000001; + enable_ = input.readBool(); + break; + } + case 16: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEKeyType value = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEKeyType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(2, rawValue); + } else { + bitField0_ |= 0x00000002; + keyType_ = value; + } + break; + } + case 26: { + bitField0_ |= 0x00000004; + keyId_ = input.readBytes(); + break; + } + case 34: { + bitField0_ |= 0x00000008; + roleArn_ = input.readBytes(); + break; + } } } } + private int bitField0_; - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.CreateTableResponse) + // required bool enable = 1; + private boolean enable_ ; + public boolean hasEnable() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public boolean getEnable() { + return enable_; + } + public Builder setEnable(boolean value) { + bitField0_ |= 0x00000001; + enable_ = value; + onChanged(); + return this; + } + public Builder clearEnable() { + bitField0_ = (bitField0_ & ~0x00000001); + enable_ = false; + onChanged(); + return this; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.SSEKeyType key_type = 2; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEKeyType keyType_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEKeyType.SSE_KMS_SERVICE; + public boolean hasKeyType() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEKeyType getKeyType() { + return keyType_; + } + public Builder setKeyType(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEKeyType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + keyType_ = value; + onChanged(); + return this; + } + public Builder clearKeyType() { + bitField0_ = (bitField0_ & ~0x00000002); + keyType_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEKeyType.SSE_KMS_SERVICE; + onChanged(); + return this; + } + + // optional bytes key_id = 3; + private com.google.protobuf.ByteString keyId_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasKeyId() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.google.protobuf.ByteString getKeyId() { + return keyId_; + } + public Builder setKeyId(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + keyId_ = value; + onChanged(); + return this; + } + public Builder clearKeyId() { + bitField0_ = (bitField0_ & ~0x00000004); + keyId_ = getDefaultInstance().getKeyId(); + onChanged(); + return this; + } + + // optional bytes role_arn = 4; + private com.google.protobuf.ByteString roleArn_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasRoleArn() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.google.protobuf.ByteString getRoleArn() { + return roleArn_; + } + public Builder setRoleArn(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + roleArn_ = value; + onChanged(); + return this; + } + public Builder clearRoleArn() { + bitField0_ = (bitField0_ & ~0x00000008); + roleArn_ = getDefaultInstance().getRoleArn(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.SSEDetails) } static { - defaultInstance = new CreateTableResponse(true); + defaultInstance = new SSEDetails(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.CreateTableResponse) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.SSEDetails) } - public interface CreateIndexRequestOrBuilder + public interface CreateTableRequestOrBuilder extends com.google.protobuf.MessageOrBuilder { - // required string main_table_name = 1; - boolean hasMainTableName(); - String getMainTableName(); + // required .com.alicloud.openservices.tablestore.core.protocol.TableMeta table_meta = 1; + boolean hasTableMeta(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta getTableMeta(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMetaOrBuilder getTableMetaOrBuilder(); - // required .com.alicloud.openservices.tablestore.core.protocol.IndexMeta index_meta = 2; - boolean hasIndexMeta(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta getIndexMeta(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMetaOrBuilder getIndexMetaOrBuilder(); + // required .com.alicloud.openservices.tablestore.core.protocol.ReservedThroughput reserved_throughput = 2; + boolean hasReservedThroughput(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput getReservedThroughput(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputOrBuilder getReservedThroughputOrBuilder(); - // optional bool include_base_data = 3; - boolean hasIncludeBaseData(); - boolean getIncludeBaseData(); + // optional .com.alicloud.openservices.tablestore.core.protocol.TableOptions table_options = 3; + boolean hasTableOptions(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions getTableOptions(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptionsOrBuilder getTableOptionsOrBuilder(); + + // repeated .com.alicloud.openservices.tablestore.core.protocol.PartitionRange partitions = 4; + java.util.List + getPartitionsList(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRange getPartitions(int index); + int getPartitionsCount(); + java.util.List + getPartitionsOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRangeOrBuilder getPartitionsOrBuilder( + int index); + + // optional .com.alicloud.openservices.tablestore.core.protocol.StreamSpecification stream_spec = 5; + boolean hasStreamSpec(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification getStreamSpec(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecificationOrBuilder getStreamSpecOrBuilder(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.SSESpecification sse_spec = 6; + boolean hasSseSpec(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification getSseSpec(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecificationOrBuilder getSseSpecOrBuilder(); + + // repeated .com.alicloud.openservices.tablestore.core.protocol.IndexMeta index_metas = 7; + java.util.List + getIndexMetasList(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta getIndexMetas(int index); + int getIndexMetasCount(); + java.util.List + getIndexMetasOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMetaOrBuilder getIndexMetasOrBuilder( + int index); + + // optional bool enable_local_txn = 8; + boolean hasEnableLocalTxn(); + boolean getEnableLocalTxn(); } - public static final class CreateIndexRequest extends + public static final class CreateTableRequest extends com.google.protobuf.GeneratedMessage - implements CreateIndexRequestOrBuilder { - // Use CreateIndexRequest.newBuilder() to construct. - private CreateIndexRequest(Builder builder) { + implements CreateTableRequestOrBuilder { + // Use CreateTableRequest.newBuilder() to construct. + private CreateTableRequest(Builder builder) { super(builder); } - private CreateIndexRequest(boolean noInit) {} + private CreateTableRequest(boolean noInit) {} - private static final CreateIndexRequest defaultInstance; - public static CreateIndexRequest getDefaultInstance() { + private static final CreateTableRequest defaultInstance; + public static CreateTableRequest getDefaultInstance() { return defaultInstance; } - public CreateIndexRequest getDefaultInstanceForType() { + public CreateTableRequest getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateIndexRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateTableRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateIndexRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateTableRequest_fieldAccessorTable; } private int bitField0_; - // required string main_table_name = 1; - public static final int MAIN_TABLE_NAME_FIELD_NUMBER = 1; - private java.lang.Object mainTableName_; - public boolean hasMainTableName() { + // required .com.alicloud.openservices.tablestore.core.protocol.TableMeta table_meta = 1; + public static final int TABLE_META_FIELD_NUMBER = 1; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta tableMeta_; + public boolean hasTableMeta() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getMainTableName() { - java.lang.Object ref = mainTableName_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - mainTableName_ = s; - } - return s; - } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta getTableMeta() { + return tableMeta_; } - private com.google.protobuf.ByteString getMainTableNameBytes() { - java.lang.Object ref = mainTableName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - mainTableName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMetaOrBuilder getTableMetaOrBuilder() { + return tableMeta_; } - // required .com.alicloud.openservices.tablestore.core.protocol.IndexMeta index_meta = 2; - public static final int INDEX_META_FIELD_NUMBER = 2; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta indexMeta_; - public boolean hasIndexMeta() { + // required .com.alicloud.openservices.tablestore.core.protocol.ReservedThroughput reserved_throughput = 2; + public static final int RESERVED_THROUGHPUT_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput reservedThroughput_; + public boolean hasReservedThroughput() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta getIndexMeta() { - return indexMeta_; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput getReservedThroughput() { + return reservedThroughput_; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMetaOrBuilder getIndexMetaOrBuilder() { - return indexMeta_; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputOrBuilder getReservedThroughputOrBuilder() { + return reservedThroughput_; } - // optional bool include_base_data = 3; - public static final int INCLUDE_BASE_DATA_FIELD_NUMBER = 3; - private boolean includeBaseData_; - public boolean hasIncludeBaseData() { + // optional .com.alicloud.openservices.tablestore.core.protocol.TableOptions table_options = 3; + public static final int TABLE_OPTIONS_FIELD_NUMBER = 3; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions tableOptions_; + public boolean hasTableOptions() { return ((bitField0_ & 0x00000004) == 0x00000004); } - public boolean getIncludeBaseData() { - return includeBaseData_; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions getTableOptions() { + return tableOptions_; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptionsOrBuilder getTableOptionsOrBuilder() { + return tableOptions_; } - private void initFields() { - mainTableName_ = ""; - indexMeta_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.getDefaultInstance(); - includeBaseData_ = false; + // repeated .com.alicloud.openservices.tablestore.core.protocol.PartitionRange partitions = 4; + public static final int PARTITIONS_FIELD_NUMBER = 4; + private java.util.List partitions_; + public java.util.List getPartitionsList() { + return partitions_; } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasMainTableName()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasIndexMeta()) { - memoizedIsInitialized = 0; - return false; - } - if (!getIndexMeta().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; + public java.util.List + getPartitionsOrBuilderList() { + return partitions_; } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getMainTableNameBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeMessage(2, indexMeta_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeBool(3, includeBaseData_); - } - getUnknownFields().writeTo(output); + public int getPartitionsCount() { + return partitions_.size(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRange getPartitions(int index) { + return partitions_.get(index); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRangeOrBuilder getPartitionsOrBuilder( + int index) { + return partitions_.get(index); } - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getMainTableNameBytes()); + // optional .com.alicloud.openservices.tablestore.core.protocol.StreamSpecification stream_spec = 5; + public static final int STREAM_SPEC_FIELD_NUMBER = 5; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification streamSpec_; + public boolean hasStreamSpec() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification getStreamSpec() { + return streamSpec_; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecificationOrBuilder getStreamSpecOrBuilder() { + return streamSpec_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.SSESpecification sse_spec = 6; + public static final int SSE_SPEC_FIELD_NUMBER = 6; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification sseSpec_; + public boolean hasSseSpec() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification getSseSpec() { + return sseSpec_; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecificationOrBuilder getSseSpecOrBuilder() { + return sseSpec_; + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.IndexMeta index_metas = 7; + public static final int INDEX_METAS_FIELD_NUMBER = 7; + private java.util.List indexMetas_; + public java.util.List getIndexMetasList() { + return indexMetas_; + } + public java.util.List + getIndexMetasOrBuilderList() { + return indexMetas_; + } + public int getIndexMetasCount() { + return indexMetas_.size(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta getIndexMetas(int index) { + return indexMetas_.get(index); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMetaOrBuilder getIndexMetasOrBuilder( + int index) { + return indexMetas_.get(index); + } + + // optional bool enable_local_txn = 8; + public static final int ENABLE_LOCAL_TXN_FIELD_NUMBER = 8; + private boolean enableLocalTxn_; + public boolean hasEnableLocalTxn() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + public boolean getEnableLocalTxn() { + return enableLocalTxn_; + } + + private void initFields() { + tableMeta_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.getDefaultInstance(); + reservedThroughput_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.getDefaultInstance(); + tableOptions_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.getDefaultInstance(); + partitions_ = java.util.Collections.emptyList(); + streamSpec_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.getDefaultInstance(); + sseSpec_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification.getDefaultInstance(); + indexMetas_ = java.util.Collections.emptyList(); + enableLocalTxn_ = false; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasTableMeta()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasReservedThroughput()) { + memoizedIsInitialized = 0; + return false; + } + if (!getTableMeta().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + if (!getReservedThroughput().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + for (int i = 0; i < getPartitionsCount(); i++) { + if (!getPartitions(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + if (hasStreamSpec()) { + if (!getStreamSpec().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + if (hasSseSpec()) { + if (!getSseSpec().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + for (int i = 0; i < getIndexMetasCount(); i++) { + if (!getIndexMetas(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(1, tableMeta_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeMessage(2, reservedThroughput_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeMessage(3, tableOptions_); + } + for (int i = 0; i < partitions_.size(); i++) { + output.writeMessage(4, partitions_.get(i)); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeMessage(5, streamSpec_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeMessage(6, sseSpec_); + } + for (int i = 0; i < indexMetas_.size(); i++) { + output.writeMessage(7, indexMetas_.get(i)); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeBool(8, enableLocalTxn_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, indexMeta_); + .computeMessageSize(1, tableMeta_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, reservedThroughput_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream - .computeBoolSize(3, includeBaseData_); + .computeMessageSize(3, tableOptions_); + } + for (int i = 0; i < partitions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, partitions_.get(i)); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, streamSpec_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, sseSpec_); + } + for (int i = 0; i < indexMetas_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, indexMetas_.get(i)); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(8, enableLocalTxn_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -9217,41 +10289,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -9260,7 +10332,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -9271,12 +10343,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -9286,7 +10358,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -9299,18 +10371,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequestOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateIndexRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateTableRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateIndexRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateTableRequest_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -9321,7 +10393,13 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getIndexMetaFieldBuilder(); + getTableMetaFieldBuilder(); + getReservedThroughputFieldBuilder(); + getTableOptionsFieldBuilder(); + getPartitionsFieldBuilder(); + getStreamSpecFieldBuilder(); + getSseSpecFieldBuilder(); + getIndexMetasFieldBuilder(); } } private static Builder create() { @@ -9330,16 +10408,50 @@ private static Builder create() { public Builder clear() { super.clear(); - mainTableName_ = ""; + if (tableMetaBuilder_ == null) { + tableMeta_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.getDefaultInstance(); + } else { + tableMetaBuilder_.clear(); + } bitField0_ = (bitField0_ & ~0x00000001); - if (indexMetaBuilder_ == null) { - indexMeta_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.getDefaultInstance(); + if (reservedThroughputBuilder_ == null) { + reservedThroughput_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.getDefaultInstance(); } else { - indexMetaBuilder_.clear(); + reservedThroughputBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); - includeBaseData_ = false; + if (tableOptionsBuilder_ == null) { + tableOptions_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.getDefaultInstance(); + } else { + tableOptionsBuilder_.clear(); + } bitField0_ = (bitField0_ & ~0x00000004); + if (partitionsBuilder_ == null) { + partitions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + partitionsBuilder_.clear(); + } + if (streamSpecBuilder_ == null) { + streamSpec_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.getDefaultInstance(); + } else { + streamSpecBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + if (sseSpecBuilder_ == null) { + sseSpec_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification.getDefaultInstance(); + } else { + sseSpecBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + if (indexMetasBuilder_ == null) { + indexMetas_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + } else { + indexMetasBuilder_.clear(); + } + enableLocalTxn_ = false; + bitField0_ = (bitField0_ & ~0x00000080); return this; } @@ -9349,24 +10461,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -9374,68 +10486,203 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Create return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest(this); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.mainTableName_ = mainTableName_; + if (tableMetaBuilder_ == null) { + result.tableMeta_ = tableMeta_; + } else { + result.tableMeta_ = tableMetaBuilder_.build(); + } if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - if (indexMetaBuilder_ == null) { - result.indexMeta_ = indexMeta_; + if (reservedThroughputBuilder_ == null) { + result.reservedThroughput_ = reservedThroughput_; } else { - result.indexMeta_ = indexMetaBuilder_.build(); + result.reservedThroughput_ = reservedThroughputBuilder_.build(); } if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } - result.includeBaseData_ = includeBaseData_; + if (tableOptionsBuilder_ == null) { + result.tableOptions_ = tableOptions_; + } else { + result.tableOptions_ = tableOptionsBuilder_.build(); + } + if (partitionsBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008)) { + partitions_ = java.util.Collections.unmodifiableList(partitions_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.partitions_ = partitions_; + } else { + result.partitions_ = partitionsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000008; + } + if (streamSpecBuilder_ == null) { + result.streamSpec_ = streamSpec_; + } else { + result.streamSpec_ = streamSpecBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000010; + } + if (sseSpecBuilder_ == null) { + result.sseSpec_ = sseSpec_; + } else { + result.sseSpec_ = sseSpecBuilder_.build(); + } + if (indexMetasBuilder_ == null) { + if (((bitField0_ & 0x00000040) == 0x00000040)) { + indexMetas_ = java.util.Collections.unmodifiableList(indexMetas_); + bitField0_ = (bitField0_ & ~0x00000040); + } + result.indexMetas_ = indexMetas_; + } else { + result.indexMetas_ = indexMetasBuilder_.build(); + } + if (((from_bitField0_ & 0x00000080) == 0x00000080)) { + to_bitField0_ |= 0x00000020; + } + result.enableLocalTxn_ = enableLocalTxn_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest.getDefaultInstance()) return this; - if (other.hasMainTableName()) { - setMainTableName(other.getMainTableName()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest.getDefaultInstance()) return this; + if (other.hasTableMeta()) { + mergeTableMeta(other.getTableMeta()); } - if (other.hasIndexMeta()) { - mergeIndexMeta(other.getIndexMeta()); + if (other.hasReservedThroughput()) { + mergeReservedThroughput(other.getReservedThroughput()); } - if (other.hasIncludeBaseData()) { - setIncludeBaseData(other.getIncludeBaseData()); + if (other.hasTableOptions()) { + mergeTableOptions(other.getTableOptions()); + } + if (partitionsBuilder_ == null) { + if (!other.partitions_.isEmpty()) { + if (partitions_.isEmpty()) { + partitions_ = other.partitions_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensurePartitionsIsMutable(); + partitions_.addAll(other.partitions_); + } + onChanged(); + } + } else { + if (!other.partitions_.isEmpty()) { + if (partitionsBuilder_.isEmpty()) { + partitionsBuilder_.dispose(); + partitionsBuilder_ = null; + partitions_ = other.partitions_; + bitField0_ = (bitField0_ & ~0x00000008); + partitionsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getPartitionsFieldBuilder() : null; + } else { + partitionsBuilder_.addAllMessages(other.partitions_); + } + } + } + if (other.hasStreamSpec()) { + mergeStreamSpec(other.getStreamSpec()); + } + if (other.hasSseSpec()) { + mergeSseSpec(other.getSseSpec()); + } + if (indexMetasBuilder_ == null) { + if (!other.indexMetas_.isEmpty()) { + if (indexMetas_.isEmpty()) { + indexMetas_ = other.indexMetas_; + bitField0_ = (bitField0_ & ~0x00000040); + } else { + ensureIndexMetasIsMutable(); + indexMetas_.addAll(other.indexMetas_); + } + onChanged(); + } + } else { + if (!other.indexMetas_.isEmpty()) { + if (indexMetasBuilder_.isEmpty()) { + indexMetasBuilder_.dispose(); + indexMetasBuilder_ = null; + indexMetas_ = other.indexMetas_; + bitField0_ = (bitField0_ & ~0x00000040); + indexMetasBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getIndexMetasFieldBuilder() : null; + } else { + indexMetasBuilder_.addAllMessages(other.indexMetas_); + } + } + } + if (other.hasEnableLocalTxn()) { + setEnableLocalTxn(other.getEnableLocalTxn()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { - if (!hasMainTableName()) { + if (!hasTableMeta()) { return false; } - if (!hasIndexMeta()) { + if (!hasReservedThroughput()) { return false; } - if (!getIndexMeta().isInitialized()) { + if (!getTableMeta().isInitialized()) { + + return false; + } + if (!getReservedThroughput().isInitialized()) { return false; } + for (int i = 0; i < getPartitionsCount(); i++) { + if (!getPartitions(i).isInitialized()) { + + return false; + } + } + if (hasStreamSpec()) { + if (!getStreamSpec().isInitialized()) { + + return false; + } + } + if (hasSseSpec()) { + if (!getSseSpec().isInitialized()) { + + return false; + } + } + for (int i = 0; i < getIndexMetasCount(); i++) { + if (!getIndexMetas(i).isInitialized()) { + + return false; + } + } return true; } @@ -9463,22 +10710,65 @@ public Builder mergeFrom( break; } case 10: { - bitField0_ |= 0x00000001; - mainTableName_ = input.readBytes(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.newBuilder(); + if (hasTableMeta()) { + subBuilder.mergeFrom(getTableMeta()); + } + input.readMessage(subBuilder, extensionRegistry); + setTableMeta(subBuilder.buildPartial()); break; } case 18: { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.newBuilder(); - if (hasIndexMeta()) { - subBuilder.mergeFrom(getIndexMeta()); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.newBuilder(); + if (hasReservedThroughput()) { + subBuilder.mergeFrom(getReservedThroughput()); } input.readMessage(subBuilder, extensionRegistry); - setIndexMeta(subBuilder.buildPartial()); + setReservedThroughput(subBuilder.buildPartial()); break; } - case 24: { - bitField0_ |= 0x00000004; - includeBaseData_ = input.readBool(); + case 26: { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.newBuilder(); + if (hasTableOptions()) { + subBuilder.mergeFrom(getTableOptions()); + } + input.readMessage(subBuilder, extensionRegistry); + setTableOptions(subBuilder.buildPartial()); + break; + } + case 34: { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRange.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRange.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addPartitions(subBuilder.buildPartial()); + break; + } + case 42: { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.newBuilder(); + if (hasStreamSpec()) { + subBuilder.mergeFrom(getStreamSpec()); + } + input.readMessage(subBuilder, extensionRegistry); + setStreamSpec(subBuilder.buildPartial()); + break; + } + case 50: { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification.newBuilder(); + if (hasSseSpec()) { + subBuilder.mergeFrom(getSseSpec()); + } + input.readMessage(subBuilder, extensionRegistry); + setSseSpec(subBuilder.buildPartial()); + break; + } + case 58: { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addIndexMetas(subBuilder.buildPartial()); + break; + } + case 64: { + bitField0_ |= 0x00000080; + enableLocalTxn_ = input.readBool(); break; } } @@ -9487,561 +10777,898 @@ public Builder mergeFrom( private int bitField0_; - // required string main_table_name = 1; - private java.lang.Object mainTableName_ = ""; - public boolean hasMainTableName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getMainTableName() { - java.lang.Object ref = mainTableName_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - mainTableName_ = s; - return s; - } else { - return (String) ref; - } - } - public Builder setMainTableName(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - mainTableName_ = value; - onChanged(); - return this; - } - public Builder clearMainTableName() { - bitField0_ = (bitField0_ & ~0x00000001); - mainTableName_ = getDefaultInstance().getMainTableName(); - onChanged(); - return this; - } - void setMainTableName(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; - mainTableName_ = value; - onChanged(); - } - - // required .com.alicloud.openservices.tablestore.core.protocol.IndexMeta index_meta = 2; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta indexMeta_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.getDefaultInstance(); + // required .com.alicloud.openservices.tablestore.core.protocol.TableMeta table_meta = 1; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta tableMeta_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMetaOrBuilder> indexMetaBuilder_; - public boolean hasIndexMeta() { - return ((bitField0_ & 0x00000002) == 0x00000002); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMetaOrBuilder> tableMetaBuilder_; + public boolean hasTableMeta() { + return ((bitField0_ & 0x00000001) == 0x00000001); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta getIndexMeta() { - if (indexMetaBuilder_ == null) { - return indexMeta_; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta getTableMeta() { + if (tableMetaBuilder_ == null) { + return tableMeta_; } else { - return indexMetaBuilder_.getMessage(); + return tableMetaBuilder_.getMessage(); } } - public Builder setIndexMeta(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta value) { - if (indexMetaBuilder_ == null) { + public Builder setTableMeta(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta value) { + if (tableMetaBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - indexMeta_ = value; + tableMeta_ = value; onChanged(); } else { - indexMetaBuilder_.setMessage(value); + tableMetaBuilder_.setMessage(value); } - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000001; return this; } - public Builder setIndexMeta( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder builderForValue) { - if (indexMetaBuilder_ == null) { - indexMeta_ = builderForValue.build(); + public Builder setTableMeta( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.Builder builderForValue) { + if (tableMetaBuilder_ == null) { + tableMeta_ = builderForValue.build(); onChanged(); } else { - indexMetaBuilder_.setMessage(builderForValue.build()); + tableMetaBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000001; return this; } - public Builder mergeIndexMeta(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta value) { - if (indexMetaBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002) && - indexMeta_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.getDefaultInstance()) { - indexMeta_ = - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.newBuilder(indexMeta_).mergeFrom(value).buildPartial(); + public Builder mergeTableMeta(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta value) { + if (tableMetaBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001) && + tableMeta_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.getDefaultInstance()) { + tableMeta_ = + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.newBuilder(tableMeta_).mergeFrom(value).buildPartial(); } else { - indexMeta_ = value; + tableMeta_ = value; } onChanged(); } else { - indexMetaBuilder_.mergeFrom(value); + tableMetaBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder clearTableMeta() { + if (tableMetaBuilder_ == null) { + tableMeta_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.getDefaultInstance(); + onChanged(); + } else { + tableMetaBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.Builder getTableMetaBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getTableMetaFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMetaOrBuilder getTableMetaOrBuilder() { + if (tableMetaBuilder_ != null) { + return tableMetaBuilder_.getMessageOrBuilder(); + } else { + return tableMeta_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMetaOrBuilder> + getTableMetaFieldBuilder() { + if (tableMetaBuilder_ == null) { + tableMetaBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMetaOrBuilder>( + tableMeta_, + getParentForChildren(), + isClean()); + tableMeta_ = null; + } + return tableMetaBuilder_; + } + + // required .com.alicloud.openservices.tablestore.core.protocol.ReservedThroughput reserved_throughput = 2; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput reservedThroughput_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputOrBuilder> reservedThroughputBuilder_; + public boolean hasReservedThroughput() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput getReservedThroughput() { + if (reservedThroughputBuilder_ == null) { + return reservedThroughput_; + } else { + return reservedThroughputBuilder_.getMessage(); + } + } + public Builder setReservedThroughput(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput value) { + if (reservedThroughputBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + reservedThroughput_ = value; + onChanged(); + } else { + reservedThroughputBuilder_.setMessage(value); } bitField0_ |= 0x00000002; return this; } - public Builder clearIndexMeta() { - if (indexMetaBuilder_ == null) { - indexMeta_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.getDefaultInstance(); + public Builder setReservedThroughput( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.Builder builderForValue) { + if (reservedThroughputBuilder_ == null) { + reservedThroughput_ = builderForValue.build(); onChanged(); } else { - indexMetaBuilder_.clear(); + reservedThroughputBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder mergeReservedThroughput(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput value) { + if (reservedThroughputBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002) && + reservedThroughput_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.getDefaultInstance()) { + reservedThroughput_ = + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.newBuilder(reservedThroughput_).mergeFrom(value).buildPartial(); + } else { + reservedThroughput_ = value; + } + onChanged(); + } else { + reservedThroughputBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder clearReservedThroughput() { + if (reservedThroughputBuilder_ == null) { + reservedThroughput_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.getDefaultInstance(); + onChanged(); + } else { + reservedThroughputBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); return this; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder getIndexMetaBuilder() { + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.Builder getReservedThroughputBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getIndexMetaFieldBuilder().getBuilder(); + return getReservedThroughputFieldBuilder().getBuilder(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMetaOrBuilder getIndexMetaOrBuilder() { - if (indexMetaBuilder_ != null) { - return indexMetaBuilder_.getMessageOrBuilder(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputOrBuilder getReservedThroughputOrBuilder() { + if (reservedThroughputBuilder_ != null) { + return reservedThroughputBuilder_.getMessageOrBuilder(); } else { - return indexMeta_; + return reservedThroughput_; } } private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMetaOrBuilder> - getIndexMetaFieldBuilder() { - if (indexMetaBuilder_ == null) { - indexMetaBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMetaOrBuilder>( - indexMeta_, + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputOrBuilder> + getReservedThroughputFieldBuilder() { + if (reservedThroughputBuilder_ == null) { + reservedThroughputBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputOrBuilder>( + reservedThroughput_, getParentForChildren(), isClean()); - indexMeta_ = null; + reservedThroughput_ = null; } - return indexMetaBuilder_; + return reservedThroughputBuilder_; } - // optional bool include_base_data = 3; - private boolean includeBaseData_ ; - public boolean hasIncludeBaseData() { + // optional .com.alicloud.openservices.tablestore.core.protocol.TableOptions table_options = 3; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions tableOptions_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptionsOrBuilder> tableOptionsBuilder_; + public boolean hasTableOptions() { return ((bitField0_ & 0x00000004) == 0x00000004); } - public boolean getIncludeBaseData() { - return includeBaseData_; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions getTableOptions() { + if (tableOptionsBuilder_ == null) { + return tableOptions_; + } else { + return tableOptionsBuilder_.getMessage(); + } } - public Builder setIncludeBaseData(boolean value) { + public Builder setTableOptions(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions value) { + if (tableOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tableOptions_ = value; + onChanged(); + } else { + tableOptionsBuilder_.setMessage(value); + } bitField0_ |= 0x00000004; - includeBaseData_ = value; - onChanged(); return this; } - public Builder clearIncludeBaseData() { + public Builder setTableOptions( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.Builder builderForValue) { + if (tableOptionsBuilder_ == null) { + tableOptions_ = builderForValue.build(); + onChanged(); + } else { + tableOptionsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder mergeTableOptions(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions value) { + if (tableOptionsBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004) && + tableOptions_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.getDefaultInstance()) { + tableOptions_ = + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.newBuilder(tableOptions_).mergeFrom(value).buildPartial(); + } else { + tableOptions_ = value; + } + onChanged(); + } else { + tableOptionsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder clearTableOptions() { + if (tableOptionsBuilder_ == null) { + tableOptions_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.getDefaultInstance(); + onChanged(); + } else { + tableOptionsBuilder_.clear(); + } bitField0_ = (bitField0_ & ~0x00000004); - includeBaseData_ = false; - onChanged(); return this; } - - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.CreateIndexRequest) - } - - static { - defaultInstance = new CreateIndexRequest(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.CreateIndexRequest) - } - - public interface CreateIndexResponseOrBuilder - extends com.google.protobuf.MessageOrBuilder { - } - public static final class CreateIndexResponse extends - com.google.protobuf.GeneratedMessage - implements CreateIndexResponseOrBuilder { - // Use CreateIndexResponse.newBuilder() to construct. - private CreateIndexResponse(Builder builder) { - super(builder); - } - private CreateIndexResponse(boolean noInit) {} - - private static final CreateIndexResponse defaultInstance; - public static CreateIndexResponse getDefaultInstance() { - return defaultInstance; - } - - public CreateIndexResponse getDefaultInstanceForType() { - return defaultInstance; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateIndexResponse_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateIndexResponse_fieldAccessorTable; - } - - private void initFields() { - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.Builder getTableOptionsBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getTableOptionsFieldBuilder().getBuilder(); } - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptionsOrBuilder getTableOptionsOrBuilder() { + if (tableOptionsBuilder_ != null) { + return tableOptionsBuilder_.getMessageOrBuilder(); + } else { + return tableOptions_; + } } - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateIndexResponse_descriptor; + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptionsOrBuilder> + getTableOptionsFieldBuilder() { + if (tableOptionsBuilder_ == null) { + tableOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptionsOrBuilder>( + tableOptions_, + getParentForChildren(), + isClean()); + tableOptions_ = null; + } + return tableOptionsBuilder_; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateIndexResponse_fieldAccessorTable; + // repeated .com.alicloud.openservices.tablestore.core.protocol.PartitionRange partitions = 4; + private java.util.List partitions_ = + java.util.Collections.emptyList(); + private void ensurePartitionsIsMutable() { + if (!((bitField0_ & 0x00000008) == 0x00000008)) { + partitions_ = new java.util.ArrayList(partitions_); + bitField0_ |= 0x00000008; + } } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRange, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRange.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRangeOrBuilder> partitionsBuilder_; - private Builder(BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); + public java.util.List getPartitionsList() { + if (partitionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(partitions_); + } else { + return partitionsBuilder_.getMessageList(); + } } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + public int getPartitionsCount() { + if (partitionsBuilder_ == null) { + return partitions_.size(); + } else { + return partitionsBuilder_.getCount(); } } - private static Builder create() { - return new Builder(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRange getPartitions(int index) { + if (partitionsBuilder_ == null) { + return partitions_.get(index); + } else { + return partitionsBuilder_.getMessage(index); + } } - - public Builder clear() { - super.clear(); + public Builder setPartitions( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRange value) { + if (partitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartitionsIsMutable(); + partitions_.set(index, value); + onChanged(); + } else { + partitionsBuilder_.setMessage(index, value); + } return this; } - - public Builder clone() { - return create().mergeFrom(buildPartial()); + public Builder setPartitions( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRange.Builder builderForValue) { + if (partitionsBuilder_ == null) { + ensurePartitionsIsMutable(); + partitions_.set(index, builderForValue.build()); + onChanged(); + } else { + partitionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse.getDescriptor(); + public Builder addPartitions(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRange value) { + if (partitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartitionsIsMutable(); + partitions_.add(value); + onChanged(); + } else { + partitionsBuilder_.addMessage(value); + } + return this; } - - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse.getDefaultInstance(); + public Builder addPartitions( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRange value) { + if (partitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartitionsIsMutable(); + partitions_.add(index, value); + onChanged(); + } else { + partitionsBuilder_.addMessage(index, value); + } + return this; } - - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); + public Builder addPartitions( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRange.Builder builderForValue) { + if (partitionsBuilder_ == null) { + ensurePartitionsIsMutable(); + partitions_.add(builderForValue.build()); + onChanged(); + } else { + partitionsBuilder_.addMessage(builderForValue.build()); } - return result; + return this; } - - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); + public Builder addPartitions( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRange.Builder builderForValue) { + if (partitionsBuilder_ == null) { + ensurePartitionsIsMutable(); + partitions_.add(index, builderForValue.build()); + onChanged(); + } else { + partitionsBuilder_.addMessage(index, builderForValue.build()); } - return result; + return this; } - - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse(this); - onBuilt(); - return result; + public Builder addAllPartitions( + java.lang.Iterable values) { + if (partitionsBuilder_ == null) { + ensurePartitionsIsMutable(); + super.addAll(values, partitions_); + onChanged(); + } else { + partitionsBuilder_.addAllMessages(values); + } + return this; } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse)other); + public Builder clearPartitions() { + if (partitionsBuilder_ == null) { + partitions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); } else { - super.mergeFrom(other); - return this; + partitionsBuilder_.clear(); } + return this; } - - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse.getDefaultInstance()) return this; - this.mergeUnknownFields(other.getUnknownFields()); + public Builder removePartitions(int index) { + if (partitionsBuilder_ == null) { + ensurePartitionsIsMutable(); + partitions_.remove(index); + onChanged(); + } else { + partitionsBuilder_.remove(index); + } return this; } - - public final boolean isInitialized() { - return true; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRange.Builder getPartitionsBuilder( + int index) { + return getPartitionsFieldBuilder().getBuilder(index); } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRangeOrBuilder getPartitionsOrBuilder( + int index) { + if (partitionsBuilder_ == null) { + return partitions_.get(index); } else { + return partitionsBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getPartitionsOrBuilderList() { + if (partitionsBuilder_ != null) { + return partitionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(partitions_); + } + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRange.Builder addPartitionsBuilder() { + return getPartitionsFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRange.getDefaultInstance()); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRange.Builder addPartitionsBuilder( + int index) { + return getPartitionsFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRange.getDefaultInstance()); + } + public java.util.List + getPartitionsBuilderList() { + return getPartitionsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRange, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRange.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRangeOrBuilder> + getPartitionsFieldBuilder() { + if (partitionsBuilder_ == null) { + partitionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRange, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRange.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRangeOrBuilder>( + partitions_, + ((bitField0_ & 0x00000008) == 0x00000008), + getParentForChildren(), + isClean()); + partitions_ = null; + } + return partitionsBuilder_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.StreamSpecification stream_spec = 5; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification streamSpec_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecificationOrBuilder> streamSpecBuilder_; + public boolean hasStreamSpec() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification getStreamSpec() { + if (streamSpecBuilder_ == null) { + return streamSpec_; + } else { + return streamSpecBuilder_.getMessage(); + } + } + public Builder setStreamSpec(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification value) { + if (streamSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + streamSpec_ = value; + onChanged(); + } else { + streamSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + return this; + } + public Builder setStreamSpec( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.Builder builderForValue) { + if (streamSpecBuilder_ == null) { + streamSpec_ = builderForValue.build(); + onChanged(); + } else { + streamSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + return this; + } + public Builder mergeStreamSpec(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification value) { + if (streamSpecBuilder_ == null) { + if (((bitField0_ & 0x00000010) == 0x00000010) && + streamSpec_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.getDefaultInstance()) { + streamSpec_ = + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.newBuilder(streamSpec_).mergeFrom(value).buildPartial(); + } else { + streamSpec_ = value; + } + onChanged(); + } else { + streamSpecBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + return this; + } + public Builder clearStreamSpec() { + if (streamSpecBuilder_ == null) { + streamSpec_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.getDefaultInstance(); + onChanged(); + } else { + streamSpecBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.Builder getStreamSpecBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getStreamSpecFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecificationOrBuilder getStreamSpecOrBuilder() { + if (streamSpecBuilder_ != null) { + return streamSpecBuilder_.getMessageOrBuilder(); + } else { + return streamSpec_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecificationOrBuilder> + getStreamSpecFieldBuilder() { + if (streamSpecBuilder_ == null) { + streamSpecBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecificationOrBuilder>( + streamSpec_, + getParentForChildren(), + isClean()); + streamSpec_ = null; + } + return streamSpecBuilder_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.SSESpecification sse_spec = 6; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification sseSpec_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecificationOrBuilder> sseSpecBuilder_; + public boolean hasSseSpec() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification getSseSpec() { + if (sseSpecBuilder_ == null) { + return sseSpec_; + } else { + return sseSpecBuilder_.getMessage(); + } + } + public Builder setSseSpec(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification value) { + if (sseSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sseSpec_ = value; + onChanged(); + } else { + sseSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + return this; + } + public Builder setSseSpec( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification.Builder builderForValue) { + if (sseSpecBuilder_ == null) { + sseSpec_ = builderForValue.build(); + onChanged(); + } else { + sseSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + return this; + } + public Builder mergeSseSpec(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification value) { + if (sseSpecBuilder_ == null) { + if (((bitField0_ & 0x00000020) == 0x00000020) && + sseSpec_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification.getDefaultInstance()) { + sseSpec_ = + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification.newBuilder(sseSpec_).mergeFrom(value).buildPartial(); + } else { + sseSpec_ = value; } + onChanged(); + } else { + sseSpecBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + return this; + } + public Builder clearSseSpec() { + if (sseSpecBuilder_ == null) { + sseSpec_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification.getDefaultInstance(); + onChanged(); + } else { + sseSpecBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification.Builder getSseSpecBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getSseSpecFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecificationOrBuilder getSseSpecOrBuilder() { + if (sseSpecBuilder_ != null) { + return sseSpecBuilder_.getMessageOrBuilder(); + } else { + return sseSpec_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecificationOrBuilder> + getSseSpecFieldBuilder() { + if (sseSpecBuilder_ == null) { + sseSpecBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecificationOrBuilder>( + sseSpec_, + getParentForChildren(), + isClean()); + sseSpec_ = null; } + return sseSpecBuilder_; + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.IndexMeta index_metas = 7; + private java.util.List indexMetas_ = + java.util.Collections.emptyList(); + private void ensureIndexMetasIsMutable() { + if (!((bitField0_ & 0x00000040) == 0x00000040)) { + indexMetas_ = new java.util.ArrayList(indexMetas_); + bitField0_ |= 0x00000040; + } } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMetaOrBuilder> indexMetasBuilder_; - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.CreateIndexResponse) + public java.util.List getIndexMetasList() { + if (indexMetasBuilder_ == null) { + return java.util.Collections.unmodifiableList(indexMetas_); + } else { + return indexMetasBuilder_.getMessageList(); + } + } + public int getIndexMetasCount() { + if (indexMetasBuilder_ == null) { + return indexMetas_.size(); + } else { + return indexMetasBuilder_.getCount(); + } + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta getIndexMetas(int index) { + if (indexMetasBuilder_ == null) { + return indexMetas_.get(index); + } else { + return indexMetasBuilder_.getMessage(index); + } + } + public Builder setIndexMetas( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta value) { + if (indexMetasBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIndexMetasIsMutable(); + indexMetas_.set(index, value); + onChanged(); + } else { + indexMetasBuilder_.setMessage(index, value); + } + return this; + } + public Builder setIndexMetas( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder builderForValue) { + if (indexMetasBuilder_ == null) { + ensureIndexMetasIsMutable(); + indexMetas_.set(index, builderForValue.build()); + onChanged(); + } else { + indexMetasBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + public Builder addIndexMetas(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta value) { + if (indexMetasBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIndexMetasIsMutable(); + indexMetas_.add(value); + onChanged(); + } else { + indexMetasBuilder_.addMessage(value); + } + return this; + } + public Builder addIndexMetas( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta value) { + if (indexMetasBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIndexMetasIsMutable(); + indexMetas_.add(index, value); + onChanged(); + } else { + indexMetasBuilder_.addMessage(index, value); + } + return this; + } + public Builder addIndexMetas( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder builderForValue) { + if (indexMetasBuilder_ == null) { + ensureIndexMetasIsMutable(); + indexMetas_.add(builderForValue.build()); + onChanged(); + } else { + indexMetasBuilder_.addMessage(builderForValue.build()); + } + return this; + } + public Builder addIndexMetas( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder builderForValue) { + if (indexMetasBuilder_ == null) { + ensureIndexMetasIsMutable(); + indexMetas_.add(index, builderForValue.build()); + onChanged(); + } else { + indexMetasBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAllIndexMetas( + java.lang.Iterable values) { + if (indexMetasBuilder_ == null) { + ensureIndexMetasIsMutable(); + super.addAll(values, indexMetas_); + onChanged(); + } else { + indexMetasBuilder_.addAllMessages(values); + } + return this; + } + public Builder clearIndexMetas() { + if (indexMetasBuilder_ == null) { + indexMetas_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + } else { + indexMetasBuilder_.clear(); + } + return this; + } + public Builder removeIndexMetas(int index) { + if (indexMetasBuilder_ == null) { + ensureIndexMetasIsMutable(); + indexMetas_.remove(index); + onChanged(); + } else { + indexMetasBuilder_.remove(index); + } + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder getIndexMetasBuilder( + int index) { + return getIndexMetasFieldBuilder().getBuilder(index); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMetaOrBuilder getIndexMetasOrBuilder( + int index) { + if (indexMetasBuilder_ == null) { + return indexMetas_.get(index); } else { + return indexMetasBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getIndexMetasOrBuilderList() { + if (indexMetasBuilder_ != null) { + return indexMetasBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(indexMetas_); + } + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder addIndexMetasBuilder() { + return getIndexMetasFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.getDefaultInstance()); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder addIndexMetasBuilder( + int index) { + return getIndexMetasFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.getDefaultInstance()); + } + public java.util.List + getIndexMetasBuilderList() { + return getIndexMetasFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMetaOrBuilder> + getIndexMetasFieldBuilder() { + if (indexMetasBuilder_ == null) { + indexMetasBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMetaOrBuilder>( + indexMetas_, + ((bitField0_ & 0x00000040) == 0x00000040), + getParentForChildren(), + isClean()); + indexMetas_ = null; + } + return indexMetasBuilder_; + } + + // optional bool enable_local_txn = 8; + private boolean enableLocalTxn_ ; + public boolean hasEnableLocalTxn() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + public boolean getEnableLocalTxn() { + return enableLocalTxn_; + } + public Builder setEnableLocalTxn(boolean value) { + bitField0_ |= 0x00000080; + enableLocalTxn_ = value; + onChanged(); + return this; + } + public Builder clearEnableLocalTxn() { + bitField0_ = (bitField0_ & ~0x00000080); + enableLocalTxn_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.CreateTableRequest) } static { - defaultInstance = new CreateIndexResponse(true); + defaultInstance = new CreateTableRequest(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.CreateIndexResponse) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.CreateTableRequest) } - public interface DropIndexRequestOrBuilder + public interface CreateTableResponseOrBuilder extends com.google.protobuf.MessageOrBuilder { - - // required string main_table_name = 1; - boolean hasMainTableName(); - String getMainTableName(); - - // required string index_name = 2; - boolean hasIndexName(); - String getIndexName(); } - public static final class DropIndexRequest extends + public static final class CreateTableResponse extends com.google.protobuf.GeneratedMessage - implements DropIndexRequestOrBuilder { - // Use DropIndexRequest.newBuilder() to construct. - private DropIndexRequest(Builder builder) { + implements CreateTableResponseOrBuilder { + // Use CreateTableResponse.newBuilder() to construct. + private CreateTableResponse(Builder builder) { super(builder); } - private DropIndexRequest(boolean noInit) {} + private CreateTableResponse(boolean noInit) {} - private static final DropIndexRequest defaultInstance; - public static DropIndexRequest getDefaultInstance() { + private static final CreateTableResponse defaultInstance; + public static CreateTableResponse getDefaultInstance() { return defaultInstance; } - public DropIndexRequest getDefaultInstanceForType() { + public CreateTableResponse getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DropIndexRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateTableResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DropIndexRequest_fieldAccessorTable; - } - - private int bitField0_; - // required string main_table_name = 1; - public static final int MAIN_TABLE_NAME_FIELD_NUMBER = 1; - private java.lang.Object mainTableName_; - public boolean hasMainTableName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getMainTableName() { - java.lang.Object ref = mainTableName_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - mainTableName_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getMainTableNameBytes() { - java.lang.Object ref = mainTableName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - mainTableName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // required string index_name = 2; - public static final int INDEX_NAME_FIELD_NUMBER = 2; - private java.lang.Object indexName_; - public boolean hasIndexName() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public String getIndexName() { - java.lang.Object ref = indexName_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - indexName_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getIndexNameBytes() { - java.lang.Object ref = indexName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - indexName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateTableResponse_fieldAccessorTable; } private void initFields() { - mainTableName_ = ""; - indexName_ = ""; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - if (!hasMainTableName()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasIndexName()) { - memoizedIsInitialized = 0; - return false; - } memoizedIsInitialized = 1; return true; } @@ -10049,12 +11676,6 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getMainTableNameBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getIndexNameBytes()); - } getUnknownFields().writeTo(output); } @@ -10064,14 +11685,6 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getMainTableNameBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getIndexNameBytes()); - } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -10084,41 +11697,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -10127,7 +11740,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -10138,12 +11751,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -10153,7 +11766,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -10166,18 +11779,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequestOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DropIndexRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateTableResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DropIndexRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateTableResponse_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -10196,10 +11809,6 @@ private static Builder create() { public Builder clear() { super.clear(); - mainTableName_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - indexName_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -10209,24 +11818,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -10234,53 +11843,28 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIn return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.mainTableName_ = mainTableName_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.indexName_ = indexName_; - result.bitField0_ = to_bitField0_; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse(this); onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest.getDefaultInstance()) return this; - if (other.hasMainTableName()) { - setMainTableName(other.getMainTableName()); - } - if (other.hasIndexName()) { - setIndexName(other.getIndexName()); - } + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse.getDefaultInstance()) return this; this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { - if (!hasMainTableName()) { - - return false; - } - if (!hasIndexName()) { - - return false; - } return true; } @@ -10307,143 +11891,144 @@ public Builder mergeFrom( } break; } - case 10: { - bitField0_ |= 0x00000001; - mainTableName_ = input.readBytes(); - break; - } - case 18: { - bitField0_ |= 0x00000002; - indexName_ = input.readBytes(); - break; - } } } } - private int bitField0_; - - // required string main_table_name = 1; - private java.lang.Object mainTableName_ = ""; - public boolean hasMainTableName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getMainTableName() { - java.lang.Object ref = mainTableName_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - mainTableName_ = s; - return s; - } else { - return (String) ref; - } - } - public Builder setMainTableName(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - mainTableName_ = value; - onChanged(); - return this; - } - public Builder clearMainTableName() { - bitField0_ = (bitField0_ & ~0x00000001); - mainTableName_ = getDefaultInstance().getMainTableName(); - onChanged(); - return this; - } - void setMainTableName(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; - mainTableName_ = value; - onChanged(); - } - - // required string index_name = 2; - private java.lang.Object indexName_ = ""; - public boolean hasIndexName() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public String getIndexName() { - java.lang.Object ref = indexName_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - indexName_ = s; - return s; - } else { - return (String) ref; - } - } - public Builder setIndexName(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - indexName_ = value; - onChanged(); - return this; - } - public Builder clearIndexName() { - bitField0_ = (bitField0_ & ~0x00000002); - indexName_ = getDefaultInstance().getIndexName(); - onChanged(); - return this; - } - void setIndexName(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000002; - indexName_ = value; - onChanged(); - } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.DropIndexRequest) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.CreateTableResponse) } static { - defaultInstance = new DropIndexRequest(true); + defaultInstance = new CreateTableResponse(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.DropIndexRequest) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.CreateTableResponse) } - public interface DropIndexResponseOrBuilder + public interface CreateIndexRequestOrBuilder extends com.google.protobuf.MessageOrBuilder { + + // required string main_table_name = 1; + boolean hasMainTableName(); + String getMainTableName(); + + // required .com.alicloud.openservices.tablestore.core.protocol.IndexMeta index_meta = 2; + boolean hasIndexMeta(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta getIndexMeta(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMetaOrBuilder getIndexMetaOrBuilder(); + + // optional bool include_base_data = 3; + boolean hasIncludeBaseData(); + boolean getIncludeBaseData(); } - public static final class DropIndexResponse extends + public static final class CreateIndexRequest extends com.google.protobuf.GeneratedMessage - implements DropIndexResponseOrBuilder { - // Use DropIndexResponse.newBuilder() to construct. - private DropIndexResponse(Builder builder) { + implements CreateIndexRequestOrBuilder { + // Use CreateIndexRequest.newBuilder() to construct. + private CreateIndexRequest(Builder builder) { super(builder); } - private DropIndexResponse(boolean noInit) {} + private CreateIndexRequest(boolean noInit) {} - private static final DropIndexResponse defaultInstance; - public static DropIndexResponse getDefaultInstance() { + private static final CreateIndexRequest defaultInstance; + public static CreateIndexRequest getDefaultInstance() { return defaultInstance; } - public DropIndexResponse getDefaultInstanceForType() { + public CreateIndexRequest getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DropIndexResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateIndexRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DropIndexResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateIndexRequest_fieldAccessorTable; + } + + private int bitField0_; + // required string main_table_name = 1; + public static final int MAIN_TABLE_NAME_FIELD_NUMBER = 1; + private java.lang.Object mainTableName_; + public boolean hasMainTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getMainTableName() { + java.lang.Object ref = mainTableName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + mainTableName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getMainTableNameBytes() { + java.lang.Object ref = mainTableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + mainTableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // required .com.alicloud.openservices.tablestore.core.protocol.IndexMeta index_meta = 2; + public static final int INDEX_META_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta indexMeta_; + public boolean hasIndexMeta() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta getIndexMeta() { + return indexMeta_; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMetaOrBuilder getIndexMetaOrBuilder() { + return indexMeta_; + } + + // optional bool include_base_data = 3; + public static final int INCLUDE_BASE_DATA_FIELD_NUMBER = 3; + private boolean includeBaseData_; + public boolean hasIncludeBaseData() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public boolean getIncludeBaseData() { + return includeBaseData_; } private void initFields() { + mainTableName_ = ""; + indexMeta_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.getDefaultInstance(); + includeBaseData_ = false; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; + if (!hasMainTableName()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasIndexMeta()) { + memoizedIsInitialized = 0; + return false; + } + if (!getIndexMeta().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } memoizedIsInitialized = 1; return true; } @@ -10451,6 +12036,15 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getMainTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeMessage(2, indexMeta_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeBool(3, includeBaseData_); + } getUnknownFields().writeTo(output); } @@ -10460,6 +12054,18 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getMainTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, indexMeta_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, includeBaseData_); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -10472,41 +12078,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -10515,7 +12121,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -10526,12 +12132,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -10541,7 +12147,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -10554,18 +12160,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponseOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DropIndexResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateIndexRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DropIndexResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateIndexRequest_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -10576,6 +12182,7 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getIndexMetaFieldBuilder(); } } private static Builder create() { @@ -10584,6 +12191,16 @@ private static Builder create() { public Builder clear() { super.clear(); + mainTableName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + if (indexMetaBuilder_ == null) { + indexMeta_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.getDefaultInstance(); + } else { + indexMetaBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + includeBaseData_ = false; + bitField0_ = (bitField0_ & ~0x00000004); return this; } @@ -10593,24 +12210,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -10618,28 +12235,68 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIn return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse(this); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.mainTableName_ = mainTableName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + if (indexMetaBuilder_ == null) { + result.indexMeta_ = indexMeta_; + } else { + result.indexMeta_ = indexMetaBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.includeBaseData_ = includeBaseData_; + result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse.getDefaultInstance()) return this; + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest.getDefaultInstance()) return this; + if (other.hasMainTableName()) { + setMainTableName(other.getMainTableName()); + } + if (other.hasIndexMeta()) { + mergeIndexMeta(other.getIndexMeta()); + } + if (other.hasIncludeBaseData()) { + setIncludeBaseData(other.getIncludeBaseData()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { + if (!hasMainTableName()) { + + return false; + } + if (!hasIndexMeta()) { + + return false; + } + if (!getIndexMeta().isInitialized()) { + + return false; + } return true; } @@ -10666,171 +12323,227 @@ public Builder mergeFrom( } break; } + case 10: { + bitField0_ |= 0x00000001; + mainTableName_ = input.readBytes(); + break; + } + case 18: { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.newBuilder(); + if (hasIndexMeta()) { + subBuilder.mergeFrom(getIndexMeta()); + } + input.readMessage(subBuilder, extensionRegistry); + setIndexMeta(subBuilder.buildPartial()); + break; + } + case 24: { + bitField0_ |= 0x00000004; + includeBaseData_ = input.readBool(); + break; + } } } } + private int bitField0_; - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.DropIndexResponse) - } - - static { - defaultInstance = new DropIndexResponse(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.DropIndexResponse) - } - - public interface UpdateTableRequestOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required string table_name = 1; - boolean hasTableName(); - String getTableName(); - - // optional .com.alicloud.openservices.tablestore.core.protocol.ReservedThroughput reserved_throughput = 2; - boolean hasReservedThroughput(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput getReservedThroughput(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputOrBuilder getReservedThroughputOrBuilder(); - - // optional .com.alicloud.openservices.tablestore.core.protocol.TableOptions table_options = 3; - boolean hasTableOptions(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions getTableOptions(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptionsOrBuilder getTableOptionsOrBuilder(); - - // optional .com.alicloud.openservices.tablestore.core.protocol.StreamSpecification stream_spec = 4; - boolean hasStreamSpec(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification getStreamSpec(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecificationOrBuilder getStreamSpecOrBuilder(); - } - public static final class UpdateTableRequest extends - com.google.protobuf.GeneratedMessage - implements UpdateTableRequestOrBuilder { - // Use UpdateTableRequest.newBuilder() to construct. - private UpdateTableRequest(Builder builder) { - super(builder); - } - private UpdateTableRequest(boolean noInit) {} - - private static final UpdateTableRequest defaultInstance; - public static UpdateTableRequest getDefaultInstance() { - return defaultInstance; - } - - public UpdateTableRequest getDefaultInstanceForType() { - return defaultInstance; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateTableRequest_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateTableRequest_fieldAccessorTable; - } - - private int bitField0_; - // required string table_name = 1; - public static final int TABLE_NAME_FIELD_NUMBER = 1; - private java.lang.Object tableName_; - public boolean hasTableName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getTableName() { - java.lang.Object ref = tableName_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - tableName_ = s; + // required string main_table_name = 1; + private java.lang.Object mainTableName_ = ""; + public boolean hasMainTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getMainTableName() { + java.lang.Object ref = mainTableName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + mainTableName_ = s; + return s; + } else { + return (String) ref; } - return s; } - } - private com.google.protobuf.ByteString getTableNameBytes() { - java.lang.Object ref = tableName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - tableName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + public Builder setMainTableName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + mainTableName_ = value; + onChanged(); + return this; } + public Builder clearMainTableName() { + bitField0_ = (bitField0_ & ~0x00000001); + mainTableName_ = getDefaultInstance().getMainTableName(); + onChanged(); + return this; + } + void setMainTableName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + mainTableName_ = value; + onChanged(); + } + + // required .com.alicloud.openservices.tablestore.core.protocol.IndexMeta index_meta = 2; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta indexMeta_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMetaOrBuilder> indexMetaBuilder_; + public boolean hasIndexMeta() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta getIndexMeta() { + if (indexMetaBuilder_ == null) { + return indexMeta_; + } else { + return indexMetaBuilder_.getMessage(); + } + } + public Builder setIndexMeta(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta value) { + if (indexMetaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + indexMeta_ = value; + onChanged(); + } else { + indexMetaBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder setIndexMeta( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder builderForValue) { + if (indexMetaBuilder_ == null) { + indexMeta_ = builderForValue.build(); + onChanged(); + } else { + indexMetaBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder mergeIndexMeta(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta value) { + if (indexMetaBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002) && + indexMeta_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.getDefaultInstance()) { + indexMeta_ = + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.newBuilder(indexMeta_).mergeFrom(value).buildPartial(); + } else { + indexMeta_ = value; + } + onChanged(); + } else { + indexMetaBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder clearIndexMeta() { + if (indexMetaBuilder_ == null) { + indexMeta_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.getDefaultInstance(); + onChanged(); + } else { + indexMetaBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder getIndexMetaBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getIndexMetaFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMetaOrBuilder getIndexMetaOrBuilder() { + if (indexMetaBuilder_ != null) { + return indexMetaBuilder_.getMessageOrBuilder(); + } else { + return indexMeta_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMetaOrBuilder> + getIndexMetaFieldBuilder() { + if (indexMetaBuilder_ == null) { + indexMetaBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMetaOrBuilder>( + indexMeta_, + getParentForChildren(), + isClean()); + indexMeta_ = null; + } + return indexMetaBuilder_; + } + + // optional bool include_base_data = 3; + private boolean includeBaseData_ ; + public boolean hasIncludeBaseData() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public boolean getIncludeBaseData() { + return includeBaseData_; + } + public Builder setIncludeBaseData(boolean value) { + bitField0_ |= 0x00000004; + includeBaseData_ = value; + onChanged(); + return this; + } + public Builder clearIncludeBaseData() { + bitField0_ = (bitField0_ & ~0x00000004); + includeBaseData_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.CreateIndexRequest) } - // optional .com.alicloud.openservices.tablestore.core.protocol.ReservedThroughput reserved_throughput = 2; - public static final int RESERVED_THROUGHPUT_FIELD_NUMBER = 2; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput reservedThroughput_; - public boolean hasReservedThroughput() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput getReservedThroughput() { - return reservedThroughput_; - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputOrBuilder getReservedThroughputOrBuilder() { - return reservedThroughput_; - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.TableOptions table_options = 3; - public static final int TABLE_OPTIONS_FIELD_NUMBER = 3; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions tableOptions_; - public boolean hasTableOptions() { - return ((bitField0_ & 0x00000004) == 0x00000004); + static { + defaultInstance = new CreateIndexRequest(true); + defaultInstance.initFields(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions getTableOptions() { - return tableOptions_; + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.CreateIndexRequest) + } + + public interface CreateIndexResponseOrBuilder + extends com.google.protobuf.MessageOrBuilder { + } + public static final class CreateIndexResponse extends + com.google.protobuf.GeneratedMessage + implements CreateIndexResponseOrBuilder { + // Use CreateIndexResponse.newBuilder() to construct. + private CreateIndexResponse(Builder builder) { + super(builder); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptionsOrBuilder getTableOptionsOrBuilder() { - return tableOptions_; + private CreateIndexResponse(boolean noInit) {} + + private static final CreateIndexResponse defaultInstance; + public static CreateIndexResponse getDefaultInstance() { + return defaultInstance; } - // optional .com.alicloud.openservices.tablestore.core.protocol.StreamSpecification stream_spec = 4; - public static final int STREAM_SPEC_FIELD_NUMBER = 4; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification streamSpec_; - public boolean hasStreamSpec() { - return ((bitField0_ & 0x00000008) == 0x00000008); + public CreateIndexResponse getDefaultInstanceForType() { + return defaultInstance; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification getStreamSpec() { - return streamSpec_; + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateIndexResponse_descriptor; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecificationOrBuilder getStreamSpecOrBuilder() { - return streamSpec_; + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateIndexResponse_fieldAccessorTable; } private void initFields() { - tableName_ = ""; - reservedThroughput_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.getDefaultInstance(); - tableOptions_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.getDefaultInstance(); - streamSpec_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - if (!hasTableName()) { - memoizedIsInitialized = 0; - return false; - } - if (hasReservedThroughput()) { - if (!getReservedThroughput().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - if (hasStreamSpec()) { - if (!getStreamSpec().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } memoizedIsInitialized = 1; return true; } @@ -10838,18 +12551,6 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getTableNameBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeMessage(2, reservedThroughput_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeMessage(3, tableOptions_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeMessage(4, streamSpec_); - } getUnknownFields().writeTo(output); } @@ -10859,22 +12560,6 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getTableNameBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, reservedThroughput_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, tableOptions_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, streamSpec_); - } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -10887,41 +12572,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -10930,7 +12615,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -10941,12 +12626,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -10956,7 +12641,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -10969,18 +12654,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequestOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateTableRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateIndexResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateTableRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateIndexResponse_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -10991,9 +12676,6 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getReservedThroughputFieldBuilder(); - getTableOptionsFieldBuilder(); - getStreamSpecFieldBuilder(); } } private static Builder create() { @@ -11002,26 +12684,6 @@ private static Builder create() { public Builder clear() { super.clear(); - tableName_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - if (reservedThroughputBuilder_ == null) { - reservedThroughput_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.getDefaultInstance(); - } else { - reservedThroughputBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - if (tableOptionsBuilder_ == null) { - tableOptions_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.getDefaultInstance(); - } else { - tableOptionsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - if (streamSpecBuilder_ == null) { - streamSpec_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.getDefaultInstance(); - } else { - streamSpecBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -11031,24 +12693,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -11056,87 +12718,28 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Update return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.tableName_ = tableName_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - if (reservedThroughputBuilder_ == null) { - result.reservedThroughput_ = reservedThroughput_; - } else { - result.reservedThroughput_ = reservedThroughputBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - if (tableOptionsBuilder_ == null) { - result.tableOptions_ = tableOptions_; - } else { - result.tableOptions_ = tableOptionsBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - if (streamSpecBuilder_ == null) { - result.streamSpec_ = streamSpec_; - } else { - result.streamSpec_ = streamSpecBuilder_.build(); - } - result.bitField0_ = to_bitField0_; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse(this); onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest.getDefaultInstance()) return this; - if (other.hasTableName()) { - setTableName(other.getTableName()); - } - if (other.hasReservedThroughput()) { - mergeReservedThroughput(other.getReservedThroughput()); - } - if (other.hasTableOptions()) { - mergeTableOptions(other.getTableOptions()); - } - if (other.hasStreamSpec()) { - mergeStreamSpec(other.getStreamSpec()); - } + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse.getDefaultInstance()) return this; this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { - if (!hasTableName()) { - - return false; - } - if (hasReservedThroughput()) { - if (!getReservedThroughput().isInitialized()) { - - return false; - } - } - if (hasStreamSpec()) { - if (!getStreamSpec().isInitialized()) { - - return false; - } - } return true; } @@ -11163,475 +12766,143 @@ public Builder mergeFrom( } break; } - case 10: { - bitField0_ |= 0x00000001; - tableName_ = input.readBytes(); - break; - } - case 18: { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.newBuilder(); - if (hasReservedThroughput()) { - subBuilder.mergeFrom(getReservedThroughput()); - } - input.readMessage(subBuilder, extensionRegistry); - setReservedThroughput(subBuilder.buildPartial()); - break; - } - case 26: { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.newBuilder(); - if (hasTableOptions()) { - subBuilder.mergeFrom(getTableOptions()); - } - input.readMessage(subBuilder, extensionRegistry); - setTableOptions(subBuilder.buildPartial()); - break; - } - case 34: { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.newBuilder(); - if (hasStreamSpec()) { - subBuilder.mergeFrom(getStreamSpec()); - } - input.readMessage(subBuilder, extensionRegistry); - setStreamSpec(subBuilder.buildPartial()); - break; - } } } } - private int bitField0_; - // required string table_name = 1; - private java.lang.Object tableName_ = ""; - public boolean hasTableName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getTableName() { - java.lang.Object ref = tableName_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - tableName_ = s; - return s; - } else { - return (String) ref; - } - } - public Builder setTableName(String value) { - if (value == null) { - throw new NullPointerException(); + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.CreateIndexResponse) + } + + static { + defaultInstance = new CreateIndexResponse(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.CreateIndexResponse) } - bitField0_ |= 0x00000001; - tableName_ = value; - onChanged(); - return this; - } - public Builder clearTableName() { - bitField0_ = (bitField0_ & ~0x00000001); - tableName_ = getDefaultInstance().getTableName(); - onChanged(); - return this; - } - void setTableName(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; - tableName_ = value; - onChanged(); - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.ReservedThroughput reserved_throughput = 2; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput reservedThroughput_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputOrBuilder> reservedThroughputBuilder_; - public boolean hasReservedThroughput() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput getReservedThroughput() { - if (reservedThroughputBuilder_ == null) { - return reservedThroughput_; - } else { - return reservedThroughputBuilder_.getMessage(); + + public interface DropIndexRequestOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string main_table_name = 1; + boolean hasMainTableName(); + String getMainTableName(); + + // required string index_name = 2; + boolean hasIndexName(); + String getIndexName(); + } + public static final class DropIndexRequest extends + com.google.protobuf.GeneratedMessage + implements DropIndexRequestOrBuilder { + // Use DropIndexRequest.newBuilder() to construct. + private DropIndexRequest(Builder builder) { + super(builder); + } + private DropIndexRequest(boolean noInit) {} + + private static final DropIndexRequest defaultInstance; + public static DropIndexRequest getDefaultInstance() { + return defaultInstance; + } + + public DropIndexRequest getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DropIndexRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DropIndexRequest_fieldAccessorTable; + } + + private int bitField0_; + // required string main_table_name = 1; + public static final int MAIN_TABLE_NAME_FIELD_NUMBER = 1; + private java.lang.Object mainTableName_; + public boolean hasMainTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getMainTableName() { + java.lang.Object ref = mainTableName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + mainTableName_ = s; } + return s; } - public Builder setReservedThroughput(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput value) { - if (reservedThroughputBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - reservedThroughput_ = value; - onChanged(); - } else { - reservedThroughputBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - return this; - } - public Builder setReservedThroughput( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.Builder builderForValue) { - if (reservedThroughputBuilder_ == null) { - reservedThroughput_ = builderForValue.build(); - onChanged(); - } else { - reservedThroughputBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - return this; - } - public Builder mergeReservedThroughput(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput value) { - if (reservedThroughputBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002) && - reservedThroughput_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.getDefaultInstance()) { - reservedThroughput_ = - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.newBuilder(reservedThroughput_).mergeFrom(value).buildPartial(); - } else { - reservedThroughput_ = value; - } - onChanged(); - } else { - reservedThroughputBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - return this; - } - public Builder clearReservedThroughput() { - if (reservedThroughputBuilder_ == null) { - reservedThroughput_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.getDefaultInstance(); - onChanged(); - } else { - reservedThroughputBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.Builder getReservedThroughputBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getReservedThroughputFieldBuilder().getBuilder(); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputOrBuilder getReservedThroughputOrBuilder() { - if (reservedThroughputBuilder_ != null) { - return reservedThroughputBuilder_.getMessageOrBuilder(); - } else { - return reservedThroughput_; - } - } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputOrBuilder> - getReservedThroughputFieldBuilder() { - if (reservedThroughputBuilder_ == null) { - reservedThroughputBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputOrBuilder>( - reservedThroughput_, - getParentForChildren(), - isClean()); - reservedThroughput_ = null; - } - return reservedThroughputBuilder_; - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.TableOptions table_options = 3; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions tableOptions_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptionsOrBuilder> tableOptionsBuilder_; - public boolean hasTableOptions() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions getTableOptions() { - if (tableOptionsBuilder_ == null) { - return tableOptions_; - } else { - return tableOptionsBuilder_.getMessage(); - } - } - public Builder setTableOptions(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions value) { - if (tableOptionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - tableOptions_ = value; - onChanged(); - } else { - tableOptionsBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - return this; - } - public Builder setTableOptions( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.Builder builderForValue) { - if (tableOptionsBuilder_ == null) { - tableOptions_ = builderForValue.build(); - onChanged(); - } else { - tableOptionsBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - return this; - } - public Builder mergeTableOptions(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions value) { - if (tableOptionsBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004) && - tableOptions_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.getDefaultInstance()) { - tableOptions_ = - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.newBuilder(tableOptions_).mergeFrom(value).buildPartial(); - } else { - tableOptions_ = value; - } - onChanged(); - } else { - tableOptionsBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - return this; - } - public Builder clearTableOptions() { - if (tableOptionsBuilder_ == null) { - tableOptions_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.getDefaultInstance(); - onChanged(); - } else { - tableOptionsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.Builder getTableOptionsBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getTableOptionsFieldBuilder().getBuilder(); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptionsOrBuilder getTableOptionsOrBuilder() { - if (tableOptionsBuilder_ != null) { - return tableOptionsBuilder_.getMessageOrBuilder(); - } else { - return tableOptions_; - } - } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptionsOrBuilder> - getTableOptionsFieldBuilder() { - if (tableOptionsBuilder_ == null) { - tableOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptionsOrBuilder>( - tableOptions_, - getParentForChildren(), - isClean()); - tableOptions_ = null; - } - return tableOptionsBuilder_; - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.StreamSpecification stream_spec = 4; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification streamSpec_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecificationOrBuilder> streamSpecBuilder_; - public boolean hasStreamSpec() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification getStreamSpec() { - if (streamSpecBuilder_ == null) { - return streamSpec_; - } else { - return streamSpecBuilder_.getMessage(); - } - } - public Builder setStreamSpec(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification value) { - if (streamSpecBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - streamSpec_ = value; - onChanged(); - } else { - streamSpecBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - return this; - } - public Builder setStreamSpec( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.Builder builderForValue) { - if (streamSpecBuilder_ == null) { - streamSpec_ = builderForValue.build(); - onChanged(); - } else { - streamSpecBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - return this; - } - public Builder mergeStreamSpec(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification value) { - if (streamSpecBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008) && - streamSpec_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.getDefaultInstance()) { - streamSpec_ = - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.newBuilder(streamSpec_).mergeFrom(value).buildPartial(); - } else { - streamSpec_ = value; - } - onChanged(); - } else { - streamSpecBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000008; - return this; - } - public Builder clearStreamSpec() { - if (streamSpecBuilder_ == null) { - streamSpec_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.getDefaultInstance(); - onChanged(); - } else { - streamSpecBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - return this; - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.Builder getStreamSpecBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getStreamSpecFieldBuilder().getBuilder(); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecificationOrBuilder getStreamSpecOrBuilder() { - if (streamSpecBuilder_ != null) { - return streamSpecBuilder_.getMessageOrBuilder(); - } else { - return streamSpec_; - } - } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecificationOrBuilder> - getStreamSpecFieldBuilder() { - if (streamSpecBuilder_ == null) { - streamSpecBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecificationOrBuilder>( - streamSpec_, - getParentForChildren(), - isClean()); - streamSpec_ = null; - } - return streamSpecBuilder_; - } - - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.UpdateTableRequest) - } - - static { - defaultInstance = new UpdateTableRequest(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.UpdateTableRequest) - } - - public interface UpdateTableResponseOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required .com.alicloud.openservices.tablestore.core.protocol.ReservedThroughputDetails reserved_throughput_details = 1; - boolean hasReservedThroughputDetails(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails getReservedThroughputDetails(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetailsOrBuilder getReservedThroughputDetailsOrBuilder(); - - // required .com.alicloud.openservices.tablestore.core.protocol.TableOptions table_options = 2; - boolean hasTableOptions(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions getTableOptions(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptionsOrBuilder getTableOptionsOrBuilder(); - - // optional .com.alicloud.openservices.tablestore.core.protocol.StreamDetails stream_details = 3; - boolean hasStreamDetails(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails getStreamDetails(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetailsOrBuilder getStreamDetailsOrBuilder(); - } - public static final class UpdateTableResponse extends - com.google.protobuf.GeneratedMessage - implements UpdateTableResponseOrBuilder { - // Use UpdateTableResponse.newBuilder() to construct. - private UpdateTableResponse(Builder builder) { - super(builder); - } - private UpdateTableResponse(boolean noInit) {} - - private static final UpdateTableResponse defaultInstance; - public static UpdateTableResponse getDefaultInstance() { - return defaultInstance; - } - - public UpdateTableResponse getDefaultInstanceForType() { - return defaultInstance; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateTableResponse_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateTableResponse_fieldAccessorTable; - } - - private int bitField0_; - // required .com.alicloud.openservices.tablestore.core.protocol.ReservedThroughputDetails reserved_throughput_details = 1; - public static final int RESERVED_THROUGHPUT_DETAILS_FIELD_NUMBER = 1; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails reservedThroughputDetails_; - public boolean hasReservedThroughputDetails() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails getReservedThroughputDetails() { - return reservedThroughputDetails_; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetailsOrBuilder getReservedThroughputDetailsOrBuilder() { - return reservedThroughputDetails_; + private com.google.protobuf.ByteString getMainTableNameBytes() { + java.lang.Object ref = mainTableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + mainTableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - // required .com.alicloud.openservices.tablestore.core.protocol.TableOptions table_options = 2; - public static final int TABLE_OPTIONS_FIELD_NUMBER = 2; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions tableOptions_; - public boolean hasTableOptions() { + // required string index_name = 2; + public static final int INDEX_NAME_FIELD_NUMBER = 2; + private java.lang.Object indexName_; + public boolean hasIndexName() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions getTableOptions() { - return tableOptions_; - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptionsOrBuilder getTableOptionsOrBuilder() { - return tableOptions_; - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.StreamDetails stream_details = 3; - public static final int STREAM_DETAILS_FIELD_NUMBER = 3; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails streamDetails_; - public boolean hasStreamDetails() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails getStreamDetails() { - return streamDetails_; + public String getIndexName() { + java.lang.Object ref = indexName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + indexName_ = s; + } + return s; + } } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetailsOrBuilder getStreamDetailsOrBuilder() { - return streamDetails_; + private com.google.protobuf.ByteString getIndexNameBytes() { + java.lang.Object ref = indexName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + indexName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } private void initFields() { - reservedThroughputDetails_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.getDefaultInstance(); - tableOptions_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.getDefaultInstance(); - streamDetails_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.getDefaultInstance(); + mainTableName_ = ""; + indexName_ = ""; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - if (!hasReservedThroughputDetails()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasTableOptions()) { + if (!hasMainTableName()) { memoizedIsInitialized = 0; return false; } - if (!getReservedThroughputDetails().isInitialized()) { + if (!hasIndexName()) { memoizedIsInitialized = 0; return false; } - if (hasStreamDetails()) { - if (!getStreamDetails().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } memoizedIsInitialized = 1; return true; } @@ -11640,13 +12911,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeMessage(1, reservedThroughputDetails_); + output.writeBytes(1, getMainTableNameBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeMessage(2, tableOptions_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeMessage(3, streamDetails_); + output.writeBytes(2, getIndexNameBytes()); } getUnknownFields().writeTo(output); } @@ -11659,15 +12927,11 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, reservedThroughputDetails_); + .computeBytesSize(1, getMainTableNameBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, tableOptions_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, streamDetails_); + .computeBytesSize(2, getIndexNameBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -11681,41 +12945,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -11724,7 +12988,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -11735,12 +12999,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -11750,7 +13014,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -11763,18 +13027,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponseOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateTableResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DropIndexRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateTableResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DropIndexRequest_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -11785,9 +13049,6 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getReservedThroughputDetailsFieldBuilder(); - getTableOptionsFieldBuilder(); - getStreamDetailsFieldBuilder(); } } private static Builder create() { @@ -11796,24 +13057,10 @@ private static Builder create() { public Builder clear() { super.clear(); - if (reservedThroughputDetailsBuilder_ == null) { - reservedThroughputDetails_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.getDefaultInstance(); - } else { - reservedThroughputDetailsBuilder_.clear(); - } + mainTableName_ = ""; bitField0_ = (bitField0_ & ~0x00000001); - if (tableOptionsBuilder_ == null) { - tableOptions_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.getDefaultInstance(); - } else { - tableOptionsBuilder_.clear(); - } + indexName_ = ""; bitField0_ = (bitField0_ & ~0x00000002); - if (streamDetailsBuilder_ == null) { - streamDetails_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.getDefaultInstance(); - } else { - streamDetailsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); return this; } @@ -11823,24 +13070,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -11848,82 +13095,53 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Update return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse(this); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - if (reservedThroughputDetailsBuilder_ == null) { - result.reservedThroughputDetails_ = reservedThroughputDetails_; - } else { - result.reservedThroughputDetails_ = reservedThroughputDetailsBuilder_.build(); - } + result.mainTableName_ = mainTableName_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - if (tableOptionsBuilder_ == null) { - result.tableOptions_ = tableOptions_; - } else { - result.tableOptions_ = tableOptionsBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - if (streamDetailsBuilder_ == null) { - result.streamDetails_ = streamDetails_; - } else { - result.streamDetails_ = streamDetailsBuilder_.build(); - } + result.indexName_ = indexName_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse.getDefaultInstance()) return this; - if (other.hasReservedThroughputDetails()) { - mergeReservedThroughputDetails(other.getReservedThroughputDetails()); - } - if (other.hasTableOptions()) { - mergeTableOptions(other.getTableOptions()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest.getDefaultInstance()) return this; + if (other.hasMainTableName()) { + setMainTableName(other.getMainTableName()); } - if (other.hasStreamDetails()) { - mergeStreamDetails(other.getStreamDetails()); + if (other.hasIndexName()) { + setIndexName(other.getIndexName()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { - if (!hasReservedThroughputDetails()) { - - return false; - } - if (!hasTableOptions()) { + if (!hasMainTableName()) { return false; } - if (!getReservedThroughputDetails().isInitialized()) { + if (!hasIndexName()) { return false; } - if (hasStreamDetails()) { - if (!getStreamDetails().isInitialized()) { - - return false; - } - } return true; } @@ -11951,30 +13169,13 @@ public Builder mergeFrom( break; } case 10: { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.newBuilder(); - if (hasReservedThroughputDetails()) { - subBuilder.mergeFrom(getReservedThroughputDetails()); - } - input.readMessage(subBuilder, extensionRegistry); - setReservedThroughputDetails(subBuilder.buildPartial()); + bitField0_ |= 0x00000001; + mainTableName_ = input.readBytes(); break; } case 18: { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.newBuilder(); - if (hasTableOptions()) { - subBuilder.mergeFrom(getTableOptions()); - } - input.readMessage(subBuilder, extensionRegistry); - setTableOptions(subBuilder.buildPartial()); - break; - } - case 26: { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.newBuilder(); - if (hasStreamDetails()) { - subBuilder.mergeFrom(getStreamDetails()); - } - input.readMessage(subBuilder, extensionRegistry); - setStreamDetails(subBuilder.buildPartial()); + bitField0_ |= 0x00000002; + indexName_ = input.readBytes(); break; } } @@ -11983,367 +13184,127 @@ public Builder mergeFrom( private int bitField0_; - // required .com.alicloud.openservices.tablestore.core.protocol.ReservedThroughputDetails reserved_throughput_details = 1; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails reservedThroughputDetails_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetailsOrBuilder> reservedThroughputDetailsBuilder_; - public boolean hasReservedThroughputDetails() { + // required string main_table_name = 1; + private java.lang.Object mainTableName_ = ""; + public boolean hasMainTableName() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails getReservedThroughputDetails() { - if (reservedThroughputDetailsBuilder_ == null) { - return reservedThroughputDetails_; - } else { - return reservedThroughputDetailsBuilder_.getMessage(); - } - } - public Builder setReservedThroughputDetails(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails value) { - if (reservedThroughputDetailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - reservedThroughputDetails_ = value; - onChanged(); - } else { - reservedThroughputDetailsBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - return this; - } - public Builder setReservedThroughputDetails( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.Builder builderForValue) { - if (reservedThroughputDetailsBuilder_ == null) { - reservedThroughputDetails_ = builderForValue.build(); - onChanged(); + public String getMainTableName() { + java.lang.Object ref = mainTableName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + mainTableName_ = s; + return s; } else { - reservedThroughputDetailsBuilder_.setMessage(builderForValue.build()); + return (String) ref; } - bitField0_ |= 0x00000001; - return this; } - public Builder mergeReservedThroughputDetails(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails value) { - if (reservedThroughputDetailsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001) && - reservedThroughputDetails_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.getDefaultInstance()) { - reservedThroughputDetails_ = - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.newBuilder(reservedThroughputDetails_).mergeFrom(value).buildPartial(); - } else { - reservedThroughputDetails_ = value; - } - onChanged(); - } else { - reservedThroughputDetailsBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; + public Builder setMainTableName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + mainTableName_ = value; + onChanged(); return this; } - public Builder clearReservedThroughputDetails() { - if (reservedThroughputDetailsBuilder_ == null) { - reservedThroughputDetails_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.getDefaultInstance(); - onChanged(); - } else { - reservedThroughputDetailsBuilder_.clear(); - } + public Builder clearMainTableName() { bitField0_ = (bitField0_ & ~0x00000001); + mainTableName_ = getDefaultInstance().getMainTableName(); + onChanged(); return this; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.Builder getReservedThroughputDetailsBuilder() { + void setMainTableName(com.google.protobuf.ByteString value) { bitField0_ |= 0x00000001; + mainTableName_ = value; onChanged(); - return getReservedThroughputDetailsFieldBuilder().getBuilder(); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetailsOrBuilder getReservedThroughputDetailsOrBuilder() { - if (reservedThroughputDetailsBuilder_ != null) { - return reservedThroughputDetailsBuilder_.getMessageOrBuilder(); - } else { - return reservedThroughputDetails_; - } - } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetailsOrBuilder> - getReservedThroughputDetailsFieldBuilder() { - if (reservedThroughputDetailsBuilder_ == null) { - reservedThroughputDetailsBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetailsOrBuilder>( - reservedThroughputDetails_, - getParentForChildren(), - isClean()); - reservedThroughputDetails_ = null; - } - return reservedThroughputDetailsBuilder_; } - // required .com.alicloud.openservices.tablestore.core.protocol.TableOptions table_options = 2; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions tableOptions_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptionsOrBuilder> tableOptionsBuilder_; - public boolean hasTableOptions() { + // required string index_name = 2; + private java.lang.Object indexName_ = ""; + public boolean hasIndexName() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions getTableOptions() { - if (tableOptionsBuilder_ == null) { - return tableOptions_; - } else { - return tableOptionsBuilder_.getMessage(); - } - } - public Builder setTableOptions(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions value) { - if (tableOptionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - tableOptions_ = value; - onChanged(); - } else { - tableOptionsBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - return this; - } - public Builder setTableOptions( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.Builder builderForValue) { - if (tableOptionsBuilder_ == null) { - tableOptions_ = builderForValue.build(); - onChanged(); + public String getIndexName() { + java.lang.Object ref = indexName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + indexName_ = s; + return s; } else { - tableOptionsBuilder_.setMessage(builderForValue.build()); + return (String) ref; } - bitField0_ |= 0x00000002; - return this; } - public Builder mergeTableOptions(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions value) { - if (tableOptionsBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002) && - tableOptions_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.getDefaultInstance()) { - tableOptions_ = - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.newBuilder(tableOptions_).mergeFrom(value).buildPartial(); - } else { - tableOptions_ = value; - } - onChanged(); - } else { - tableOptionsBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; + public Builder setIndexName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + indexName_ = value; + onChanged(); return this; } - public Builder clearTableOptions() { - if (tableOptionsBuilder_ == null) { - tableOptions_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.getDefaultInstance(); - onChanged(); - } else { - tableOptionsBuilder_.clear(); - } + public Builder clearIndexName() { bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.Builder getTableOptionsBuilder() { - bitField0_ |= 0x00000002; + indexName_ = getDefaultInstance().getIndexName(); onChanged(); - return getTableOptionsFieldBuilder().getBuilder(); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptionsOrBuilder getTableOptionsOrBuilder() { - if (tableOptionsBuilder_ != null) { - return tableOptionsBuilder_.getMessageOrBuilder(); - } else { - return tableOptions_; - } - } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptionsOrBuilder> - getTableOptionsFieldBuilder() { - if (tableOptionsBuilder_ == null) { - tableOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptionsOrBuilder>( - tableOptions_, - getParentForChildren(), - isClean()); - tableOptions_ = null; - } - return tableOptionsBuilder_; - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.StreamDetails stream_details = 3; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails streamDetails_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetailsOrBuilder> streamDetailsBuilder_; - public boolean hasStreamDetails() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails getStreamDetails() { - if (streamDetailsBuilder_ == null) { - return streamDetails_; - } else { - return streamDetailsBuilder_.getMessage(); - } - } - public Builder setStreamDetails(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails value) { - if (streamDetailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - streamDetails_ = value; - onChanged(); - } else { - streamDetailsBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - return this; - } - public Builder setStreamDetails( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.Builder builderForValue) { - if (streamDetailsBuilder_ == null) { - streamDetails_ = builderForValue.build(); - onChanged(); - } else { - streamDetailsBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - return this; - } - public Builder mergeStreamDetails(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails value) { - if (streamDetailsBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004) && - streamDetails_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.getDefaultInstance()) { - streamDetails_ = - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.newBuilder(streamDetails_).mergeFrom(value).buildPartial(); - } else { - streamDetails_ = value; - } - onChanged(); - } else { - streamDetailsBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - return this; - } - public Builder clearStreamDetails() { - if (streamDetailsBuilder_ == null) { - streamDetails_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.getDefaultInstance(); - onChanged(); - } else { - streamDetailsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); return this; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.Builder getStreamDetailsBuilder() { - bitField0_ |= 0x00000004; + void setIndexName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000002; + indexName_ = value; onChanged(); - return getStreamDetailsFieldBuilder().getBuilder(); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetailsOrBuilder getStreamDetailsOrBuilder() { - if (streamDetailsBuilder_ != null) { - return streamDetailsBuilder_.getMessageOrBuilder(); - } else { - return streamDetails_; - } - } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetailsOrBuilder> - getStreamDetailsFieldBuilder() { - if (streamDetailsBuilder_ == null) { - streamDetailsBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetailsOrBuilder>( - streamDetails_, - getParentForChildren(), - isClean()); - streamDetails_ = null; - } - return streamDetailsBuilder_; } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.UpdateTableResponse) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.DropIndexRequest) } static { - defaultInstance = new UpdateTableResponse(true); + defaultInstance = new DropIndexRequest(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.UpdateTableResponse) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.DropIndexRequest) } - public interface DescribeTableRequestOrBuilder + public interface DropIndexResponseOrBuilder extends com.google.protobuf.MessageOrBuilder { - - // required string table_name = 1; - boolean hasTableName(); - String getTableName(); } - public static final class DescribeTableRequest extends + public static final class DropIndexResponse extends com.google.protobuf.GeneratedMessage - implements DescribeTableRequestOrBuilder { - // Use DescribeTableRequest.newBuilder() to construct. - private DescribeTableRequest(Builder builder) { + implements DropIndexResponseOrBuilder { + // Use DropIndexResponse.newBuilder() to construct. + private DropIndexResponse(Builder builder) { super(builder); } - private DescribeTableRequest(boolean noInit) {} + private DropIndexResponse(boolean noInit) {} - private static final DescribeTableRequest defaultInstance; - public static DescribeTableRequest getDefaultInstance() { + private static final DropIndexResponse defaultInstance; + public static DropIndexResponse getDefaultInstance() { return defaultInstance; } - public DescribeTableRequest getDefaultInstanceForType() { + public DropIndexResponse getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeTableRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DropIndexResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeTableRequest_fieldAccessorTable; - } - - private int bitField0_; - // required string table_name = 1; - public static final int TABLE_NAME_FIELD_NUMBER = 1; - private java.lang.Object tableName_; - public boolean hasTableName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getTableName() { - java.lang.Object ref = tableName_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - tableName_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getTableNameBytes() { - java.lang.Object ref = tableName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - tableName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DropIndexResponse_fieldAccessorTable; } private void initFields() { - tableName_ = ""; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - if (!hasTableName()) { - memoizedIsInitialized = 0; - return false; - } memoizedIsInitialized = 1; return true; } @@ -12351,9 +13312,6 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getTableNameBytes()); - } getUnknownFields().writeTo(output); } @@ -12363,10 +13321,6 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getTableNameBytes()); - } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -12379,41 +13333,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -12422,7 +13376,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -12433,12 +13387,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -12448,7 +13402,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -12461,18 +13415,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequestOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeTableRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DropIndexResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeTableRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DropIndexResponse_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -12491,8 +13445,6 @@ private static Builder create() { public Builder clear() { super.clear(); - tableName_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -12502,24 +13454,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -12527,42 +13479,28 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Descri return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.tableName_ = tableName_; - result.bitField0_ = to_bitField0_; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse(this); onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest.getDefaultInstance()) return this; - if (other.hasTableName()) { - setTableName(other.getTableName()); - } + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse.getDefaultInstance()) return this; this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { - if (!hasTableName()) { - - return false; - } return true; } @@ -12589,259 +13527,136 @@ public Builder mergeFrom( } break; } - case 10: { - bitField0_ |= 0x00000001; - tableName_ = input.readBytes(); - break; - } } } } - private int bitField0_; - // required string table_name = 1; - private java.lang.Object tableName_ = ""; - public boolean hasTableName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getTableName() { - java.lang.Object ref = tableName_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - tableName_ = s; - return s; - } else { - return (String) ref; - } - } - public Builder setTableName(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - tableName_ = value; - onChanged(); - return this; - } - public Builder clearTableName() { - bitField0_ = (bitField0_ & ~0x00000001); - tableName_ = getDefaultInstance().getTableName(); - onChanged(); - return this; - } - void setTableName(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; - tableName_ = value; - onChanged(); - } - - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.DescribeTableRequest) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.DropIndexResponse) } static { - defaultInstance = new DescribeTableRequest(true); + defaultInstance = new DropIndexResponse(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.DescribeTableRequest) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.DropIndexResponse) } - public interface DescribeTableResponseOrBuilder + public interface AddDefinedColumnRequestOrBuilder extends com.google.protobuf.MessageOrBuilder { - // required .com.alicloud.openservices.tablestore.core.protocol.TableMeta table_meta = 1; - boolean hasTableMeta(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta getTableMeta(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMetaOrBuilder getTableMetaOrBuilder(); - - // required .com.alicloud.openservices.tablestore.core.protocol.ReservedThroughputDetails reserved_throughput_details = 2; - boolean hasReservedThroughputDetails(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails getReservedThroughputDetails(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetailsOrBuilder getReservedThroughputDetailsOrBuilder(); - - // required .com.alicloud.openservices.tablestore.core.protocol.TableOptions table_options = 3; - boolean hasTableOptions(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions getTableOptions(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptionsOrBuilder getTableOptionsOrBuilder(); - - // optional .com.alicloud.openservices.tablestore.core.protocol.StreamDetails stream_details = 5; - boolean hasStreamDetails(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails getStreamDetails(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetailsOrBuilder getStreamDetailsOrBuilder(); - - // repeated bytes shard_splits = 6; - java.util.List getShardSplitsList(); - int getShardSplitsCount(); - com.google.protobuf.ByteString getShardSplits(int index); + // required string table_name = 1; + boolean hasTableName(); + String getTableName(); - // repeated .com.alicloud.openservices.tablestore.core.protocol.IndexMeta index_metas = 8; - java.util.List - getIndexMetasList(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta getIndexMetas(int index); - int getIndexMetasCount(); - java.util.List - getIndexMetasOrBuilderList(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMetaOrBuilder getIndexMetasOrBuilder( + // repeated .com.alicloud.openservices.tablestore.core.protocol.DefinedColumnSchema columns = 2; + java.util.List + getColumnsList(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema getColumns(int index); + int getColumnsCount(); + java.util.List + getColumnsOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchemaOrBuilder getColumnsOrBuilder( int index); } - public static final class DescribeTableResponse extends + public static final class AddDefinedColumnRequest extends com.google.protobuf.GeneratedMessage - implements DescribeTableResponseOrBuilder { - // Use DescribeTableResponse.newBuilder() to construct. - private DescribeTableResponse(Builder builder) { + implements AddDefinedColumnRequestOrBuilder { + // Use AddDefinedColumnRequest.newBuilder() to construct. + private AddDefinedColumnRequest(Builder builder) { super(builder); } - private DescribeTableResponse(boolean noInit) {} + private AddDefinedColumnRequest(boolean noInit) {} - private static final DescribeTableResponse defaultInstance; - public static DescribeTableResponse getDefaultInstance() { + private static final AddDefinedColumnRequest defaultInstance; + public static AddDefinedColumnRequest getDefaultInstance() { return defaultInstance; } - public DescribeTableResponse getDefaultInstanceForType() { + public AddDefinedColumnRequest getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeTableResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_AddDefinedColumnRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeTableResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_AddDefinedColumnRequest_fieldAccessorTable; } private int bitField0_; - // required .com.alicloud.openservices.tablestore.core.protocol.TableMeta table_meta = 1; - public static final int TABLE_META_FIELD_NUMBER = 1; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta tableMeta_; - public boolean hasTableMeta() { + // required string table_name = 1; + public static final int TABLE_NAME_FIELD_NUMBER = 1; + private java.lang.Object tableName_; + public boolean hasTableName() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta getTableMeta() { - return tableMeta_; - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMetaOrBuilder getTableMetaOrBuilder() { - return tableMeta_; - } - - // required .com.alicloud.openservices.tablestore.core.protocol.ReservedThroughputDetails reserved_throughput_details = 2; - public static final int RESERVED_THROUGHPUT_DETAILS_FIELD_NUMBER = 2; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails reservedThroughputDetails_; - public boolean hasReservedThroughputDetails() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails getReservedThroughputDetails() { - return reservedThroughputDetails_; - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetailsOrBuilder getReservedThroughputDetailsOrBuilder() { - return reservedThroughputDetails_; - } - - // required .com.alicloud.openservices.tablestore.core.protocol.TableOptions table_options = 3; - public static final int TABLE_OPTIONS_FIELD_NUMBER = 3; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions tableOptions_; - public boolean hasTableOptions() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions getTableOptions() { - return tableOptions_; - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptionsOrBuilder getTableOptionsOrBuilder() { - return tableOptions_; - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.StreamDetails stream_details = 5; - public static final int STREAM_DETAILS_FIELD_NUMBER = 5; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails streamDetails_; - public boolean hasStreamDetails() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails getStreamDetails() { - return streamDetails_; - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetailsOrBuilder getStreamDetailsOrBuilder() { - return streamDetails_; - } - - // repeated bytes shard_splits = 6; - public static final int SHARD_SPLITS_FIELD_NUMBER = 6; - private java.util.List shardSplits_; - public java.util.List - getShardSplitsList() { - return shardSplits_; - } - public int getShardSplitsCount() { - return shardSplits_.size(); + public String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + tableName_ = s; + } + return s; + } } - public com.google.protobuf.ByteString getShardSplits(int index) { - return shardSplits_.get(index); + private com.google.protobuf.ByteString getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - // repeated .com.alicloud.openservices.tablestore.core.protocol.IndexMeta index_metas = 8; - public static final int INDEX_METAS_FIELD_NUMBER = 8; - private java.util.List indexMetas_; - public java.util.List getIndexMetasList() { - return indexMetas_; + // repeated .com.alicloud.openservices.tablestore.core.protocol.DefinedColumnSchema columns = 2; + public static final int COLUMNS_FIELD_NUMBER = 2; + private java.util.List columns_; + public java.util.List getColumnsList() { + return columns_; } - public java.util.List - getIndexMetasOrBuilderList() { - return indexMetas_; + public java.util.List + getColumnsOrBuilderList() { + return columns_; } - public int getIndexMetasCount() { - return indexMetas_.size(); + public int getColumnsCount() { + return columns_.size(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta getIndexMetas(int index) { - return indexMetas_.get(index); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema getColumns(int index) { + return columns_.get(index); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMetaOrBuilder getIndexMetasOrBuilder( + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchemaOrBuilder getColumnsOrBuilder( int index) { - return indexMetas_.get(index); + return columns_.get(index); } private void initFields() { - tableMeta_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.getDefaultInstance(); - reservedThroughputDetails_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.getDefaultInstance(); - tableOptions_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.getDefaultInstance(); - streamDetails_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.getDefaultInstance(); - shardSplits_ = java.util.Collections.emptyList();; - indexMetas_ = java.util.Collections.emptyList(); + tableName_ = ""; + columns_ = java.util.Collections.emptyList(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - if (!hasTableMeta()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasReservedThroughputDetails()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasTableOptions()) { - memoizedIsInitialized = 0; - return false; - } - if (!getTableMeta().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - if (!getReservedThroughputDetails().isInitialized()) { + if (!hasTableName()) { memoizedIsInitialized = 0; return false; } - if (hasStreamDetails()) { - if (!getStreamDetails().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - for (int i = 0; i < getIndexMetasCount(); i++) { - if (!getIndexMetas(i).isInitialized()) { + for (int i = 0; i < getColumnsCount(); i++) { + if (!getColumns(i).isInitialized()) { memoizedIsInitialized = 0; return false; } @@ -12854,22 +13669,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeMessage(1, tableMeta_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeMessage(2, reservedThroughputDetails_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeMessage(3, tableOptions_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeMessage(5, streamDetails_); - } - for (int i = 0; i < shardSplits_.size(); i++) { - output.writeBytes(6, shardSplits_.get(i)); + output.writeBytes(1, getTableNameBytes()); } - for (int i = 0; i < indexMetas_.size(); i++) { - output.writeMessage(8, indexMetas_.get(i)); + for (int i = 0; i < columns_.size(); i++) { + output.writeMessage(2, columns_.get(i)); } getUnknownFields().writeTo(output); } @@ -12882,32 +13685,11 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, tableMeta_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, reservedThroughputDetails_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, tableOptions_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, streamDetails_); - } - { - int dataSize = 0; - for (int i = 0; i < shardSplits_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeBytesSizeNoTag(shardSplits_.get(i)); - } - size += dataSize; - size += 1 * getShardSplitsList().size(); + .computeBytesSize(1, getTableNameBytes()); } - for (int i = 0; i < indexMetas_.size(); i++) { + for (int i = 0; i < columns_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, indexMetas_.get(i)); + .computeMessageSize(2, columns_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -12921,41 +13703,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -12964,7 +13746,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -12975,12 +13757,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -12990,7 +13772,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnRequest prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -13003,18 +13785,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponseOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeTableResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_AddDefinedColumnRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeTableResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_AddDefinedColumnRequest_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -13025,11 +13807,7 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getTableMetaFieldBuilder(); - getReservedThroughputDetailsFieldBuilder(); - getTableOptionsFieldBuilder(); - getStreamDetailsFieldBuilder(); - getIndexMetasFieldBuilder(); + getColumnsFieldBuilder(); } } private static Builder create() { @@ -13038,37 +13816,13 @@ private static Builder create() { public Builder clear() { super.clear(); - if (tableMetaBuilder_ == null) { - tableMeta_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.getDefaultInstance(); - } else { - tableMetaBuilder_.clear(); - } + tableName_ = ""; bitField0_ = (bitField0_ & ~0x00000001); - if (reservedThroughputDetailsBuilder_ == null) { - reservedThroughputDetails_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.getDefaultInstance(); - } else { - reservedThroughputDetailsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - if (tableOptionsBuilder_ == null) { - tableOptions_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.getDefaultInstance(); - } else { - tableOptionsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - if (streamDetailsBuilder_ == null) { - streamDetails_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.getDefaultInstance(); - } else { - streamDetailsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - shardSplits_ = java.util.Collections.emptyList();; - bitField0_ = (bitField0_ & ~0x00000010); - if (indexMetasBuilder_ == null) { - indexMetas_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); + if (columnsBuilder_ == null) { + columns_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); } else { - indexMetasBuilder_.clear(); + columnsBuilder_.clear(); } return this; } @@ -13079,24 +13833,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnRequest.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnRequest.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnRequest build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnRequest buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -13104,55 +13858,22 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Descri return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse(this); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnRequest(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - if (tableMetaBuilder_ == null) { - result.tableMeta_ = tableMeta_; - } else { - result.tableMeta_ = tableMetaBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - if (reservedThroughputDetailsBuilder_ == null) { - result.reservedThroughputDetails_ = reservedThroughputDetails_; - } else { - result.reservedThroughputDetails_ = reservedThroughputDetailsBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - if (tableOptionsBuilder_ == null) { - result.tableOptions_ = tableOptions_; - } else { - result.tableOptions_ = tableOptionsBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - if (streamDetailsBuilder_ == null) { - result.streamDetails_ = streamDetails_; - } else { - result.streamDetails_ = streamDetailsBuilder_.build(); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - shardSplits_ = java.util.Collections.unmodifiableList(shardSplits_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.shardSplits_ = shardSplits_; - if (indexMetasBuilder_ == null) { - if (((bitField0_ & 0x00000020) == 0x00000020)) { - indexMetas_ = java.util.Collections.unmodifiableList(indexMetas_); - bitField0_ = (bitField0_ & ~0x00000020); + result.tableName_ = tableName_; + if (columnsBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { + columns_ = java.util.Collections.unmodifiableList(columns_); + bitField0_ = (bitField0_ & ~0x00000002); } - result.indexMetas_ = indexMetas_; + result.columns_ = columns_; } else { - result.indexMetas_ = indexMetasBuilder_.build(); + result.columns_ = columnsBuilder_.build(); } result.bitField0_ = to_bitField0_; onBuilt(); @@ -13160,61 +13881,42 @@ public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Describ } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnRequest)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse.getDefaultInstance()) return this; - if (other.hasTableMeta()) { - mergeTableMeta(other.getTableMeta()); - } - if (other.hasReservedThroughputDetails()) { - mergeReservedThroughputDetails(other.getReservedThroughputDetails()); - } - if (other.hasTableOptions()) { - mergeTableOptions(other.getTableOptions()); - } - if (other.hasStreamDetails()) { - mergeStreamDetails(other.getStreamDetails()); - } - if (!other.shardSplits_.isEmpty()) { - if (shardSplits_.isEmpty()) { - shardSplits_ = other.shardSplits_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureShardSplitsIsMutable(); - shardSplits_.addAll(other.shardSplits_); - } - onChanged(); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnRequest.getDefaultInstance()) return this; + if (other.hasTableName()) { + setTableName(other.getTableName()); } - if (indexMetasBuilder_ == null) { - if (!other.indexMetas_.isEmpty()) { - if (indexMetas_.isEmpty()) { - indexMetas_ = other.indexMetas_; - bitField0_ = (bitField0_ & ~0x00000020); + if (columnsBuilder_ == null) { + if (!other.columns_.isEmpty()) { + if (columns_.isEmpty()) { + columns_ = other.columns_; + bitField0_ = (bitField0_ & ~0x00000002); } else { - ensureIndexMetasIsMutable(); - indexMetas_.addAll(other.indexMetas_); + ensureColumnsIsMutable(); + columns_.addAll(other.columns_); } onChanged(); } } else { - if (!other.indexMetas_.isEmpty()) { - if (indexMetasBuilder_.isEmpty()) { - indexMetasBuilder_.dispose(); - indexMetasBuilder_ = null; - indexMetas_ = other.indexMetas_; - bitField0_ = (bitField0_ & ~0x00000020); - indexMetasBuilder_ = + if (!other.columns_.isEmpty()) { + if (columnsBuilder_.isEmpty()) { + columnsBuilder_.dispose(); + columnsBuilder_ = null; + columns_ = other.columns_; + bitField0_ = (bitField0_ & ~0x00000002); + columnsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getIndexMetasFieldBuilder() : null; + getColumnsFieldBuilder() : null; } else { - indexMetasBuilder_.addAllMessages(other.indexMetas_); + columnsBuilder_.addAllMessages(other.columns_); } } } @@ -13223,34 +13925,12 @@ public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsI } public final boolean isInitialized() { - if (!hasTableMeta()) { - - return false; - } - if (!hasReservedThroughputDetails()) { - - return false; - } - if (!hasTableOptions()) { - - return false; - } - if (!getTableMeta().isInitialized()) { - - return false; - } - if (!getReservedThroughputDetails().isInitialized()) { + if (!hasTableName()) { return false; } - if (hasStreamDetails()) { - if (!getStreamDetails().isInitialized()) { - - return false; - } - } - for (int i = 0; i < getIndexMetasCount(); i++) { - if (!getIndexMetas(i).isInitialized()) { + for (int i = 0; i < getColumnsCount(); i++) { + if (!getColumns(i).isInitialized()) { return false; } @@ -13282,50 +13962,14 @@ public Builder mergeFrom( break; } case 10: { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.newBuilder(); - if (hasTableMeta()) { - subBuilder.mergeFrom(getTableMeta()); - } - input.readMessage(subBuilder, extensionRegistry); - setTableMeta(subBuilder.buildPartial()); + bitField0_ |= 0x00000001; + tableName_ = input.readBytes(); break; } case 18: { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.newBuilder(); - if (hasReservedThroughputDetails()) { - subBuilder.mergeFrom(getReservedThroughputDetails()); - } - input.readMessage(subBuilder, extensionRegistry); - setReservedThroughputDetails(subBuilder.buildPartial()); - break; - } - case 26: { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.newBuilder(); - if (hasTableOptions()) { - subBuilder.mergeFrom(getTableOptions()); - } - input.readMessage(subBuilder, extensionRegistry); - setTableOptions(subBuilder.buildPartial()); - break; - } - case 42: { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.newBuilder(); - if (hasStreamDetails()) { - subBuilder.mergeFrom(getStreamDetails()); - } - input.readMessage(subBuilder, extensionRegistry); - setStreamDetails(subBuilder.buildPartial()); - break; - } - case 50: { - ensureShardSplitsIsMutable(); - shardSplits_.add(input.readBytes()); - break; - } - case 66: { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.newBuilder(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema.newBuilder(); input.readMessage(subBuilder, extensionRegistry); - addIndexMetas(subBuilder.buildPartial()); + addColumns(subBuilder.buildPartial()); break; } } @@ -13334,643 +13978,268 @@ public Builder mergeFrom( private int bitField0_; - // required .com.alicloud.openservices.tablestore.core.protocol.TableMeta table_meta = 1; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta tableMeta_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMetaOrBuilder> tableMetaBuilder_; - public boolean hasTableMeta() { + // required string table_name = 1; + private java.lang.Object tableName_ = ""; + public boolean hasTableName() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta getTableMeta() { - if (tableMetaBuilder_ == null) { - return tableMeta_; + public String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + tableName_ = s; + return s; } else { - return tableMetaBuilder_.getMessage(); + return (String) ref; } } - public Builder setTableMeta(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta value) { - if (tableMetaBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - tableMeta_ = value; - onChanged(); - } else { - tableMetaBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; + public Builder setTableName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); return this; } - public Builder setTableMeta( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.Builder builderForValue) { - if (tableMetaBuilder_ == null) { - tableMeta_ = builderForValue.build(); - onChanged(); - } else { - tableMetaBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; + public Builder clearTableName() { + bitField0_ = (bitField0_ & ~0x00000001); + tableName_ = getDefaultInstance().getTableName(); + onChanged(); return this; } - public Builder mergeTableMeta(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta value) { - if (tableMetaBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001) && - tableMeta_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.getDefaultInstance()) { - tableMeta_ = - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.newBuilder(tableMeta_).mergeFrom(value).buildPartial(); - } else { - tableMeta_ = value; - } - onChanged(); - } else { - tableMetaBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - return this; - } - public Builder clearTableMeta() { - if (tableMetaBuilder_ == null) { - tableMeta_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.getDefaultInstance(); - onChanged(); - } else { - tableMetaBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.Builder getTableMetaBuilder() { + void setTableName(com.google.protobuf.ByteString value) { bitField0_ |= 0x00000001; + tableName_ = value; onChanged(); - return getTableMetaFieldBuilder().getBuilder(); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMetaOrBuilder getTableMetaOrBuilder() { - if (tableMetaBuilder_ != null) { - return tableMetaBuilder_.getMessageOrBuilder(); - } else { - return tableMeta_; - } - } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMetaOrBuilder> - getTableMetaFieldBuilder() { - if (tableMetaBuilder_ == null) { - tableMetaBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMetaOrBuilder>( - tableMeta_, - getParentForChildren(), - isClean()); - tableMeta_ = null; - } - return tableMetaBuilder_; - } - - // required .com.alicloud.openservices.tablestore.core.protocol.ReservedThroughputDetails reserved_throughput_details = 2; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails reservedThroughputDetails_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetailsOrBuilder> reservedThroughputDetailsBuilder_; - public boolean hasReservedThroughputDetails() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails getReservedThroughputDetails() { - if (reservedThroughputDetailsBuilder_ == null) { - return reservedThroughputDetails_; - } else { - return reservedThroughputDetailsBuilder_.getMessage(); - } - } - public Builder setReservedThroughputDetails(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails value) { - if (reservedThroughputDetailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - reservedThroughputDetails_ = value; - onChanged(); - } else { - reservedThroughputDetailsBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - return this; - } - public Builder setReservedThroughputDetails( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.Builder builderForValue) { - if (reservedThroughputDetailsBuilder_ == null) { - reservedThroughputDetails_ = builderForValue.build(); - onChanged(); - } else { - reservedThroughputDetailsBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - return this; - } - public Builder mergeReservedThroughputDetails(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails value) { - if (reservedThroughputDetailsBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002) && - reservedThroughputDetails_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.getDefaultInstance()) { - reservedThroughputDetails_ = - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.newBuilder(reservedThroughputDetails_).mergeFrom(value).buildPartial(); - } else { - reservedThroughputDetails_ = value; - } - onChanged(); - } else { - reservedThroughputDetailsBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - return this; - } - public Builder clearReservedThroughputDetails() { - if (reservedThroughputDetailsBuilder_ == null) { - reservedThroughputDetails_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.getDefaultInstance(); - onChanged(); - } else { - reservedThroughputDetailsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.Builder getReservedThroughputDetailsBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getReservedThroughputDetailsFieldBuilder().getBuilder(); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetailsOrBuilder getReservedThroughputDetailsOrBuilder() { - if (reservedThroughputDetailsBuilder_ != null) { - return reservedThroughputDetailsBuilder_.getMessageOrBuilder(); - } else { - return reservedThroughputDetails_; - } - } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetailsOrBuilder> - getReservedThroughputDetailsFieldBuilder() { - if (reservedThroughputDetailsBuilder_ == null) { - reservedThroughputDetailsBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetailsOrBuilder>( - reservedThroughputDetails_, - getParentForChildren(), - isClean()); - reservedThroughputDetails_ = null; - } - return reservedThroughputDetailsBuilder_; - } - - // required .com.alicloud.openservices.tablestore.core.protocol.TableOptions table_options = 3; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions tableOptions_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptionsOrBuilder> tableOptionsBuilder_; - public boolean hasTableOptions() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions getTableOptions() { - if (tableOptionsBuilder_ == null) { - return tableOptions_; - } else { - return tableOptionsBuilder_.getMessage(); - } - } - public Builder setTableOptions(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions value) { - if (tableOptionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - tableOptions_ = value; - onChanged(); - } else { - tableOptionsBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - return this; - } - public Builder setTableOptions( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.Builder builderForValue) { - if (tableOptionsBuilder_ == null) { - tableOptions_ = builderForValue.build(); - onChanged(); - } else { - tableOptionsBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - return this; - } - public Builder mergeTableOptions(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions value) { - if (tableOptionsBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004) && - tableOptions_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.getDefaultInstance()) { - tableOptions_ = - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.newBuilder(tableOptions_).mergeFrom(value).buildPartial(); - } else { - tableOptions_ = value; - } - onChanged(); - } else { - tableOptionsBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - return this; - } - public Builder clearTableOptions() { - if (tableOptionsBuilder_ == null) { - tableOptions_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.getDefaultInstance(); - onChanged(); - } else { - tableOptionsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.Builder getTableOptionsBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getTableOptionsFieldBuilder().getBuilder(); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptionsOrBuilder getTableOptionsOrBuilder() { - if (tableOptionsBuilder_ != null) { - return tableOptionsBuilder_.getMessageOrBuilder(); - } else { - return tableOptions_; - } - } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptionsOrBuilder> - getTableOptionsFieldBuilder() { - if (tableOptionsBuilder_ == null) { - tableOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptionsOrBuilder>( - tableOptions_, - getParentForChildren(), - isClean()); - tableOptions_ = null; - } - return tableOptionsBuilder_; - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.StreamDetails stream_details = 5; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails streamDetails_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetailsOrBuilder> streamDetailsBuilder_; - public boolean hasStreamDetails() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails getStreamDetails() { - if (streamDetailsBuilder_ == null) { - return streamDetails_; - } else { - return streamDetailsBuilder_.getMessage(); - } - } - public Builder setStreamDetails(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails value) { - if (streamDetailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - streamDetails_ = value; - onChanged(); - } else { - streamDetailsBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - return this; - } - public Builder setStreamDetails( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.Builder builderForValue) { - if (streamDetailsBuilder_ == null) { - streamDetails_ = builderForValue.build(); - onChanged(); - } else { - streamDetailsBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - return this; - } - public Builder mergeStreamDetails(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails value) { - if (streamDetailsBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008) && - streamDetails_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.getDefaultInstance()) { - streamDetails_ = - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.newBuilder(streamDetails_).mergeFrom(value).buildPartial(); - } else { - streamDetails_ = value; - } - onChanged(); - } else { - streamDetailsBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000008; - return this; - } - public Builder clearStreamDetails() { - if (streamDetailsBuilder_ == null) { - streamDetails_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.getDefaultInstance(); - onChanged(); - } else { - streamDetailsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - return this; - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.Builder getStreamDetailsBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getStreamDetailsFieldBuilder().getBuilder(); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetailsOrBuilder getStreamDetailsOrBuilder() { - if (streamDetailsBuilder_ != null) { - return streamDetailsBuilder_.getMessageOrBuilder(); - } else { - return streamDetails_; - } - } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetailsOrBuilder> - getStreamDetailsFieldBuilder() { - if (streamDetailsBuilder_ == null) { - streamDetailsBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetailsOrBuilder>( - streamDetails_, - getParentForChildren(), - isClean()); - streamDetails_ = null; - } - return streamDetailsBuilder_; - } - - // repeated bytes shard_splits = 6; - private java.util.List shardSplits_ = java.util.Collections.emptyList();; - private void ensureShardSplitsIsMutable() { - if (!((bitField0_ & 0x00000010) == 0x00000010)) { - shardSplits_ = new java.util.ArrayList(shardSplits_); - bitField0_ |= 0x00000010; - } - } - public java.util.List - getShardSplitsList() { - return java.util.Collections.unmodifiableList(shardSplits_); - } - public int getShardSplitsCount() { - return shardSplits_.size(); - } - public com.google.protobuf.ByteString getShardSplits(int index) { - return shardSplits_.get(index); - } - public Builder setShardSplits( - int index, com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - ensureShardSplitsIsMutable(); - shardSplits_.set(index, value); - onChanged(); - return this; - } - public Builder addShardSplits(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - ensureShardSplitsIsMutable(); - shardSplits_.add(value); - onChanged(); - return this; - } - public Builder addAllShardSplits( - java.lang.Iterable values) { - ensureShardSplitsIsMutable(); - super.addAll(values, shardSplits_); - onChanged(); - return this; - } - public Builder clearShardSplits() { - shardSplits_ = java.util.Collections.emptyList();; - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; } - // repeated .com.alicloud.openservices.tablestore.core.protocol.IndexMeta index_metas = 8; - private java.util.List indexMetas_ = + // repeated .com.alicloud.openservices.tablestore.core.protocol.DefinedColumnSchema columns = 2; + private java.util.List columns_ = java.util.Collections.emptyList(); - private void ensureIndexMetasIsMutable() { - if (!((bitField0_ & 0x00000020) == 0x00000020)) { - indexMetas_ = new java.util.ArrayList(indexMetas_); - bitField0_ |= 0x00000020; + private void ensureColumnsIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + columns_ = new java.util.ArrayList(columns_); + bitField0_ |= 0x00000002; } } private com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMetaOrBuilder> indexMetasBuilder_; + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchemaOrBuilder> columnsBuilder_; - public java.util.List getIndexMetasList() { - if (indexMetasBuilder_ == null) { - return java.util.Collections.unmodifiableList(indexMetas_); + public java.util.List getColumnsList() { + if (columnsBuilder_ == null) { + return java.util.Collections.unmodifiableList(columns_); } else { - return indexMetasBuilder_.getMessageList(); + return columnsBuilder_.getMessageList(); } } - public int getIndexMetasCount() { - if (indexMetasBuilder_ == null) { - return indexMetas_.size(); + public int getColumnsCount() { + if (columnsBuilder_ == null) { + return columns_.size(); } else { - return indexMetasBuilder_.getCount(); + return columnsBuilder_.getCount(); } } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta getIndexMetas(int index) { - if (indexMetasBuilder_ == null) { - return indexMetas_.get(index); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema getColumns(int index) { + if (columnsBuilder_ == null) { + return columns_.get(index); } else { - return indexMetasBuilder_.getMessage(index); + return columnsBuilder_.getMessage(index); } } - public Builder setIndexMetas( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta value) { - if (indexMetasBuilder_ == null) { + public Builder setColumns( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema value) { + if (columnsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureIndexMetasIsMutable(); - indexMetas_.set(index, value); + ensureColumnsIsMutable(); + columns_.set(index, value); onChanged(); } else { - indexMetasBuilder_.setMessage(index, value); + columnsBuilder_.setMessage(index, value); } return this; } - public Builder setIndexMetas( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder builderForValue) { - if (indexMetasBuilder_ == null) { - ensureIndexMetasIsMutable(); - indexMetas_.set(index, builderForValue.build()); + public Builder setColumns( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema.Builder builderForValue) { + if (columnsBuilder_ == null) { + ensureColumnsIsMutable(); + columns_.set(index, builderForValue.build()); onChanged(); } else { - indexMetasBuilder_.setMessage(index, builderForValue.build()); + columnsBuilder_.setMessage(index, builderForValue.build()); } return this; } - public Builder addIndexMetas(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta value) { - if (indexMetasBuilder_ == null) { + public Builder addColumns(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema value) { + if (columnsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureIndexMetasIsMutable(); - indexMetas_.add(value); + ensureColumnsIsMutable(); + columns_.add(value); onChanged(); } else { - indexMetasBuilder_.addMessage(value); + columnsBuilder_.addMessage(value); } return this; } - public Builder addIndexMetas( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta value) { - if (indexMetasBuilder_ == null) { + public Builder addColumns( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema value) { + if (columnsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureIndexMetasIsMutable(); - indexMetas_.add(index, value); + ensureColumnsIsMutable(); + columns_.add(index, value); onChanged(); } else { - indexMetasBuilder_.addMessage(index, value); + columnsBuilder_.addMessage(index, value); } return this; } - public Builder addIndexMetas( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder builderForValue) { - if (indexMetasBuilder_ == null) { - ensureIndexMetasIsMutable(); - indexMetas_.add(builderForValue.build()); + public Builder addColumns( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema.Builder builderForValue) { + if (columnsBuilder_ == null) { + ensureColumnsIsMutable(); + columns_.add(builderForValue.build()); onChanged(); } else { - indexMetasBuilder_.addMessage(builderForValue.build()); + columnsBuilder_.addMessage(builderForValue.build()); } return this; } - public Builder addIndexMetas( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder builderForValue) { - if (indexMetasBuilder_ == null) { - ensureIndexMetasIsMutable(); - indexMetas_.add(index, builderForValue.build()); + public Builder addColumns( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema.Builder builderForValue) { + if (columnsBuilder_ == null) { + ensureColumnsIsMutable(); + columns_.add(index, builderForValue.build()); onChanged(); } else { - indexMetasBuilder_.addMessage(index, builderForValue.build()); + columnsBuilder_.addMessage(index, builderForValue.build()); } return this; } - public Builder addAllIndexMetas( - java.lang.Iterable values) { - if (indexMetasBuilder_ == null) { - ensureIndexMetasIsMutable(); - super.addAll(values, indexMetas_); + public Builder addAllColumns( + java.lang.Iterable values) { + if (columnsBuilder_ == null) { + ensureColumnsIsMutable(); + super.addAll(values, columns_); onChanged(); } else { - indexMetasBuilder_.addAllMessages(values); + columnsBuilder_.addAllMessages(values); } return this; } - public Builder clearIndexMetas() { - if (indexMetasBuilder_ == null) { - indexMetas_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); + public Builder clearColumns() { + if (columnsBuilder_ == null) { + columns_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { - indexMetasBuilder_.clear(); + columnsBuilder_.clear(); } return this; } - public Builder removeIndexMetas(int index) { - if (indexMetasBuilder_ == null) { - ensureIndexMetasIsMutable(); - indexMetas_.remove(index); + public Builder removeColumns(int index) { + if (columnsBuilder_ == null) { + ensureColumnsIsMutable(); + columns_.remove(index); onChanged(); } else { - indexMetasBuilder_.remove(index); + columnsBuilder_.remove(index); } return this; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder getIndexMetasBuilder( + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema.Builder getColumnsBuilder( int index) { - return getIndexMetasFieldBuilder().getBuilder(index); + return getColumnsFieldBuilder().getBuilder(index); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMetaOrBuilder getIndexMetasOrBuilder( + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchemaOrBuilder getColumnsOrBuilder( int index) { - if (indexMetasBuilder_ == null) { - return indexMetas_.get(index); } else { - return indexMetasBuilder_.getMessageOrBuilder(index); + if (columnsBuilder_ == null) { + return columns_.get(index); } else { + return columnsBuilder_.getMessageOrBuilder(index); } } - public java.util.List - getIndexMetasOrBuilderList() { - if (indexMetasBuilder_ != null) { - return indexMetasBuilder_.getMessageOrBuilderList(); + public java.util.List + getColumnsOrBuilderList() { + if (columnsBuilder_ != null) { + return columnsBuilder_.getMessageOrBuilderList(); } else { - return java.util.Collections.unmodifiableList(indexMetas_); + return java.util.Collections.unmodifiableList(columns_); } } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder addIndexMetasBuilder() { - return getIndexMetasFieldBuilder().addBuilder( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.getDefaultInstance()); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema.Builder addColumnsBuilder() { + return getColumnsFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema.getDefaultInstance()); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder addIndexMetasBuilder( + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema.Builder addColumnsBuilder( int index) { - return getIndexMetasFieldBuilder().addBuilder( - index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.getDefaultInstance()); + return getColumnsFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema.getDefaultInstance()); } - public java.util.List - getIndexMetasBuilderList() { - return getIndexMetasFieldBuilder().getBuilderList(); + public java.util.List + getColumnsBuilderList() { + return getColumnsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMetaOrBuilder> - getIndexMetasFieldBuilder() { - if (indexMetasBuilder_ == null) { - indexMetasBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMetaOrBuilder>( - indexMetas_, - ((bitField0_ & 0x00000020) == 0x00000020), + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchemaOrBuilder> + getColumnsFieldBuilder() { + if (columnsBuilder_ == null) { + columnsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchemaOrBuilder>( + columns_, + ((bitField0_ & 0x00000002) == 0x00000002), getParentForChildren(), isClean()); - indexMetas_ = null; + columns_ = null; } - return indexMetasBuilder_; + return columnsBuilder_; } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.DescribeTableResponse) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.AddDefinedColumnRequest) } static { - defaultInstance = new DescribeTableResponse(true); + defaultInstance = new AddDefinedColumnRequest(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.DescribeTableResponse) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.AddDefinedColumnRequest) } - public interface ListTableRequestOrBuilder + public interface AddDefinedColumnResponseOrBuilder extends com.google.protobuf.MessageOrBuilder { } - public static final class ListTableRequest extends + public static final class AddDefinedColumnResponse extends com.google.protobuf.GeneratedMessage - implements ListTableRequestOrBuilder { - // Use ListTableRequest.newBuilder() to construct. - private ListTableRequest(Builder builder) { + implements AddDefinedColumnResponseOrBuilder { + // Use AddDefinedColumnResponse.newBuilder() to construct. + private AddDefinedColumnResponse(Builder builder) { super(builder); } - private ListTableRequest(boolean noInit) {} + private AddDefinedColumnResponse(boolean noInit) {} - private static final ListTableRequest defaultInstance; - public static ListTableRequest getDefaultInstance() { + private static final AddDefinedColumnResponse defaultInstance; + public static AddDefinedColumnResponse getDefaultInstance() { return defaultInstance; } - public ListTableRequest getDefaultInstanceForType() { + public AddDefinedColumnResponse getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListTableRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_AddDefinedColumnResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListTableRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_AddDefinedColumnResponse_fieldAccessorTable; } private void initFields() { @@ -14008,41 +14277,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -14051,7 +14320,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -14062,12 +14331,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -14077,7 +14346,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnResponse prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -14090,18 +14359,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequestOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListTableRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_AddDefinedColumnResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListTableRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_AddDefinedColumnResponse_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -14129,24 +14398,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnResponse.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnResponse.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnResponse build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnResponse buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -14154,23 +14423,23 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTa return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest(this); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnResponse(this); onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnResponse)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest.getDefaultInstance()) return this; + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnResponse.getDefaultInstance()) return this; this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -14207,75 +14476,117 @@ public Builder mergeFrom( } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.ListTableRequest) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.AddDefinedColumnResponse) } static { - defaultInstance = new ListTableRequest(true); + defaultInstance = new AddDefinedColumnResponse(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.ListTableRequest) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.AddDefinedColumnResponse) } - public interface ListTableResponseOrBuilder + public interface DeleteDefinedColumnRequestOrBuilder extends com.google.protobuf.MessageOrBuilder { - // repeated string table_names = 1; - java.util.List getTableNamesList(); - int getTableNamesCount(); - String getTableNames(int index); + // required string table_name = 1; + boolean hasTableName(); + String getTableName(); + + // repeated string columns = 2; + java.util.List getColumnsList(); + int getColumnsCount(); + String getColumns(int index); } - public static final class ListTableResponse extends + public static final class DeleteDefinedColumnRequest extends com.google.protobuf.GeneratedMessage - implements ListTableResponseOrBuilder { - // Use ListTableResponse.newBuilder() to construct. - private ListTableResponse(Builder builder) { + implements DeleteDefinedColumnRequestOrBuilder { + // Use DeleteDefinedColumnRequest.newBuilder() to construct. + private DeleteDefinedColumnRequest(Builder builder) { super(builder); } - private ListTableResponse(boolean noInit) {} + private DeleteDefinedColumnRequest(boolean noInit) {} - private static final ListTableResponse defaultInstance; - public static ListTableResponse getDefaultInstance() { + private static final DeleteDefinedColumnRequest defaultInstance; + public static DeleteDefinedColumnRequest getDefaultInstance() { return defaultInstance; } - public ListTableResponse getDefaultInstanceForType() { + public DeleteDefinedColumnRequest getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListTableResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteDefinedColumnRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListTableResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteDefinedColumnRequest_fieldAccessorTable; } - // repeated string table_names = 1; - public static final int TABLE_NAMES_FIELD_NUMBER = 1; - private com.google.protobuf.LazyStringList tableNames_; + private int bitField0_; + // required string table_name = 1; + public static final int TABLE_NAME_FIELD_NUMBER = 1; + private java.lang.Object tableName_; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + tableName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // repeated string columns = 2; + public static final int COLUMNS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList columns_; public java.util.List - getTableNamesList() { - return tableNames_; + getColumnsList() { + return columns_; } - public int getTableNamesCount() { - return tableNames_.size(); + public int getColumnsCount() { + return columns_.size(); } - public String getTableNames(int index) { - return tableNames_.get(index); + public String getColumns(int index) { + return columns_.get(index); } private void initFields() { - tableNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + tableName_ = ""; + columns_ = com.google.protobuf.LazyStringArrayList.EMPTY; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; + if (!hasTableName()) { + memoizedIsInitialized = 0; + return false; + } memoizedIsInitialized = 1; return true; } @@ -14283,8 +14594,11 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - for (int i = 0; i < tableNames_.size(); i++) { - output.writeBytes(1, tableNames_.getByteString(i)); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getTableNameBytes()); + } + for (int i = 0; i < columns_.size(); i++) { + output.writeBytes(2, columns_.getByteString(i)); } getUnknownFields().writeTo(output); } @@ -14295,14 +14609,18 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getTableNameBytes()); + } { int dataSize = 0; - for (int i = 0; i < tableNames_.size(); i++) { + for (int i = 0; i < columns_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream - .computeBytesSizeNoTag(tableNames_.getByteString(i)); + .computeBytesSizeNoTag(columns_.getByteString(i)); } size += dataSize; - size += 1 * getTableNamesList().size(); + size += 1 * getColumnsList().size(); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -14316,41 +14634,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -14359,7 +14677,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -14370,12 +14688,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -14385,7 +14703,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnRequest prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -14398,18 +14716,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponseOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListTableResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteDefinedColumnRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListTableResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteDefinedColumnRequest_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -14428,8 +14746,10 @@ private static Builder create() { public Builder clear() { super.clear(); - tableNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + tableName_ = ""; bitField0_ = (bitField0_ & ~0x00000001); + columns_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -14439,24 +14759,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnRequest.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnRequest.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnRequest build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnRequest buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -14464,37 +14784,46 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTa return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse(this); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnRequest(this); int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - tableNames_ = new com.google.protobuf.UnmodifiableLazyStringList( - tableNames_); - bitField0_ = (bitField0_ & ~0x00000001); + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; } - result.tableNames_ = tableNames_; + result.tableName_ = tableName_; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + columns_ = new com.google.protobuf.UnmodifiableLazyStringList( + columns_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.columns_ = columns_; + result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnRequest)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse.getDefaultInstance()) return this; - if (!other.tableNames_.isEmpty()) { - if (tableNames_.isEmpty()) { - tableNames_ = other.tableNames_; - bitField0_ = (bitField0_ & ~0x00000001); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnRequest.getDefaultInstance()) return this; + if (other.hasTableName()) { + setTableName(other.getTableName()); + } + if (!other.columns_.isEmpty()) { + if (columns_.isEmpty()) { + columns_ = other.columns_; + bitField0_ = (bitField0_ & ~0x00000002); } else { - ensureTableNamesIsMutable(); - tableNames_.addAll(other.tableNames_); + ensureColumnsIsMutable(); + columns_.addAll(other.columns_); } onChanged(); } @@ -14503,6 +14832,10 @@ public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsI } public final boolean isInitialized() { + if (!hasTableName()) { + + return false; + } return true; } @@ -14530,8 +14863,13 @@ public Builder mergeFrom( break; } case 10: { - ensureTableNamesIsMutable(); - tableNames_.add(input.readBytes()); + bitField0_ |= 0x00000001; + tableName_ = input.readBytes(); + break; + } + case 18: { + ensureColumnsIsMutable(); + columns_.add(input.readBytes()); break; } } @@ -14540,153 +14878,147 @@ public Builder mergeFrom( private int bitField0_; - // repeated string table_names = 1; - private com.google.protobuf.LazyStringList tableNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureTableNamesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - tableNames_ = new com.google.protobuf.LazyStringArrayList(tableNames_); - bitField0_ |= 0x00000001; + // required string table_name = 1; + private java.lang.Object tableName_ = ""; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + tableName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setTableName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + return this; + } + public Builder clearTableName() { + bitField0_ = (bitField0_ & ~0x00000001); + tableName_ = getDefaultInstance().getTableName(); + onChanged(); + return this; + } + void setTableName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + } + + // repeated string columns = 2; + private com.google.protobuf.LazyStringList columns_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureColumnsIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + columns_ = new com.google.protobuf.LazyStringArrayList(columns_); + bitField0_ |= 0x00000002; } } public java.util.List - getTableNamesList() { - return java.util.Collections.unmodifiableList(tableNames_); + getColumnsList() { + return java.util.Collections.unmodifiableList(columns_); } - public int getTableNamesCount() { - return tableNames_.size(); + public int getColumnsCount() { + return columns_.size(); } - public String getTableNames(int index) { - return tableNames_.get(index); + public String getColumns(int index) { + return columns_.get(index); } - public Builder setTableNames( + public Builder setColumns( int index, String value) { if (value == null) { throw new NullPointerException(); } - ensureTableNamesIsMutable(); - tableNames_.set(index, value); + ensureColumnsIsMutable(); + columns_.set(index, value); onChanged(); return this; } - public Builder addTableNames(String value) { + public Builder addColumns(String value) { if (value == null) { throw new NullPointerException(); } - ensureTableNamesIsMutable(); - tableNames_.add(value); + ensureColumnsIsMutable(); + columns_.add(value); onChanged(); return this; } - public Builder addAllTableNames( + public Builder addAllColumns( java.lang.Iterable values) { - ensureTableNamesIsMutable(); - super.addAll(values, tableNames_); + ensureColumnsIsMutable(); + super.addAll(values, columns_); onChanged(); return this; } - public Builder clearTableNames() { - tableNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); + public Builder clearColumns() { + columns_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } - void addTableNames(com.google.protobuf.ByteString value) { - ensureTableNamesIsMutable(); - tableNames_.add(value); + void addColumns(com.google.protobuf.ByteString value) { + ensureColumnsIsMutable(); + columns_.add(value); onChanged(); } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.ListTableResponse) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.DeleteDefinedColumnRequest) } static { - defaultInstance = new ListTableResponse(true); + defaultInstance = new DeleteDefinedColumnRequest(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.ListTableResponse) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.DeleteDefinedColumnRequest) } - public interface DeleteTableRequestOrBuilder + public interface DeleteDefinedColumnResponseOrBuilder extends com.google.protobuf.MessageOrBuilder { - - // required string table_name = 1; - boolean hasTableName(); - String getTableName(); } - public static final class DeleteTableRequest extends + public static final class DeleteDefinedColumnResponse extends com.google.protobuf.GeneratedMessage - implements DeleteTableRequestOrBuilder { - // Use DeleteTableRequest.newBuilder() to construct. - private DeleteTableRequest(Builder builder) { + implements DeleteDefinedColumnResponseOrBuilder { + // Use DeleteDefinedColumnResponse.newBuilder() to construct. + private DeleteDefinedColumnResponse(Builder builder) { super(builder); } - private DeleteTableRequest(boolean noInit) {} + private DeleteDefinedColumnResponse(boolean noInit) {} - private static final DeleteTableRequest defaultInstance; - public static DeleteTableRequest getDefaultInstance() { + private static final DeleteDefinedColumnResponse defaultInstance; + public static DeleteDefinedColumnResponse getDefaultInstance() { return defaultInstance; } - public DeleteTableRequest getDefaultInstanceForType() { + public DeleteDefinedColumnResponse getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteTableRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteDefinedColumnResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteTableRequest_fieldAccessorTable; - } - - private int bitField0_; - // required string table_name = 1; - public static final int TABLE_NAME_FIELD_NUMBER = 1; - private java.lang.Object tableName_; - public boolean hasTableName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getTableName() { - java.lang.Object ref = tableName_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - tableName_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getTableNameBytes() { - java.lang.Object ref = tableName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - tableName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteDefinedColumnResponse_fieldAccessorTable; } private void initFields() { - tableName_ = ""; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - if (!hasTableName()) { - memoizedIsInitialized = 0; - return false; - } memoizedIsInitialized = 1; return true; } @@ -14694,9 +15026,6 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getTableNameBytes()); - } getUnknownFields().writeTo(output); } @@ -14706,10 +15035,6 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getTableNameBytes()); - } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -14722,41 +15047,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -14765,7 +15090,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -14776,12 +15101,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -14791,7 +15116,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnResponse prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -14804,18 +15129,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequestOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteTableRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteDefinedColumnResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteTableRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteDefinedColumnResponse_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -14834,8 +15159,6 @@ private static Builder create() { public Builder clear() { super.clear(); - tableName_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -14845,24 +15168,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnResponse.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnResponse.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnResponse build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnResponse buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -14870,355 +15193,23 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Delete return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.tableName_ = tableName_; - result.bitField0_ = to_bitField0_; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnResponse(this); onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnResponse)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest.getDefaultInstance()) return this; - if (other.hasTableName()) { - setTableName(other.getTableName()); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - if (!hasTableName()) { - - return false; - } - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 10: { - bitField0_ |= 0x00000001; - tableName_ = input.readBytes(); - break; - } - } - } - } - - private int bitField0_; - - // required string table_name = 1; - private java.lang.Object tableName_ = ""; - public boolean hasTableName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getTableName() { - java.lang.Object ref = tableName_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - tableName_ = s; - return s; - } else { - return (String) ref; - } - } - public Builder setTableName(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - tableName_ = value; - onChanged(); - return this; - } - public Builder clearTableName() { - bitField0_ = (bitField0_ & ~0x00000001); - tableName_ = getDefaultInstance().getTableName(); - onChanged(); - return this; - } - void setTableName(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; - tableName_ = value; - onChanged(); - } - - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.DeleteTableRequest) - } - - static { - defaultInstance = new DeleteTableRequest(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.DeleteTableRequest) - } - - public interface DeleteTableResponseOrBuilder - extends com.google.protobuf.MessageOrBuilder { - } - public static final class DeleteTableResponse extends - com.google.protobuf.GeneratedMessage - implements DeleteTableResponseOrBuilder { - // Use DeleteTableResponse.newBuilder() to construct. - private DeleteTableResponse(Builder builder) { - super(builder); - } - private DeleteTableResponse(boolean noInit) {} - - private static final DeleteTableResponse defaultInstance; - public static DeleteTableResponse getDefaultInstance() { - return defaultInstance; - } - - public DeleteTableResponse getDefaultInstanceForType() { - return defaultInstance; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteTableResponse_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteTableResponse_fieldAccessorTable; - } - - private void initFields() { - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteTableResponse_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteTableResponse_fieldAccessorTable; - } - - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse.getDescriptor(); - } - - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse.getDefaultInstance(); - } - - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse(this); - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse.getDefaultInstance()) return this; + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnResponse.getDefaultInstance()) return this; this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -15255,50 +15246,65 @@ public Builder mergeFrom( } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.DeleteTableResponse) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.DeleteDefinedColumnResponse) } static { - defaultInstance = new DeleteTableResponse(true); + defaultInstance = new DeleteDefinedColumnResponse(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.DeleteTableResponse) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.DeleteDefinedColumnResponse) } - public interface LoadTableRequestOrBuilder + public interface UpdateTableRequestOrBuilder extends com.google.protobuf.MessageOrBuilder { // required string table_name = 1; boolean hasTableName(); String getTableName(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.ReservedThroughput reserved_throughput = 2; + boolean hasReservedThroughput(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput getReservedThroughput(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputOrBuilder getReservedThroughputOrBuilder(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.TableOptions table_options = 3; + boolean hasTableOptions(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions getTableOptions(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptionsOrBuilder getTableOptionsOrBuilder(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.StreamSpecification stream_spec = 4; + boolean hasStreamSpec(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification getStreamSpec(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecificationOrBuilder getStreamSpecOrBuilder(); } - public static final class LoadTableRequest extends + public static final class UpdateTableRequest extends com.google.protobuf.GeneratedMessage - implements LoadTableRequestOrBuilder { - // Use LoadTableRequest.newBuilder() to construct. - private LoadTableRequest(Builder builder) { + implements UpdateTableRequestOrBuilder { + // Use UpdateTableRequest.newBuilder() to construct. + private UpdateTableRequest(Builder builder) { super(builder); } - private LoadTableRequest(boolean noInit) {} + private UpdateTableRequest(boolean noInit) {} - private static final LoadTableRequest defaultInstance; - public static LoadTableRequest getDefaultInstance() { + private static final UpdateTableRequest defaultInstance; + public static UpdateTableRequest getDefaultInstance() { return defaultInstance; } - public LoadTableRequest getDefaultInstanceForType() { + public UpdateTableRequest getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_LoadTableRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateTableRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_LoadTableRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateTableRequest_fieldAccessorTable; } private int bitField0_; @@ -15334,8 +15340,50 @@ private com.google.protobuf.ByteString getTableNameBytes() { } } + // optional .com.alicloud.openservices.tablestore.core.protocol.ReservedThroughput reserved_throughput = 2; + public static final int RESERVED_THROUGHPUT_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput reservedThroughput_; + public boolean hasReservedThroughput() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput getReservedThroughput() { + return reservedThroughput_; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputOrBuilder getReservedThroughputOrBuilder() { + return reservedThroughput_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.TableOptions table_options = 3; + public static final int TABLE_OPTIONS_FIELD_NUMBER = 3; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions tableOptions_; + public boolean hasTableOptions() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions getTableOptions() { + return tableOptions_; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptionsOrBuilder getTableOptionsOrBuilder() { + return tableOptions_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.StreamSpecification stream_spec = 4; + public static final int STREAM_SPEC_FIELD_NUMBER = 4; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification streamSpec_; + public boolean hasStreamSpec() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification getStreamSpec() { + return streamSpec_; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecificationOrBuilder getStreamSpecOrBuilder() { + return streamSpec_; + } + private void initFields() { tableName_ = ""; + reservedThroughput_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.getDefaultInstance(); + tableOptions_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.getDefaultInstance(); + streamSpec_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -15346,6 +15394,18 @@ public final boolean isInitialized() { memoizedIsInitialized = 0; return false; } + if (hasReservedThroughput()) { + if (!getReservedThroughput().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + if (hasStreamSpec()) { + if (!getStreamSpec().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } memoizedIsInitialized = 1; return true; } @@ -15356,6 +15416,15 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getTableNameBytes()); } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeMessage(2, reservedThroughput_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeMessage(3, tableOptions_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeMessage(4, streamSpec_); + } getUnknownFields().writeTo(output); } @@ -15369,6 +15438,18 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, getTableNameBytes()); } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, reservedThroughput_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, tableOptions_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, streamSpec_); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -15381,41 +15462,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -15424,7 +15505,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -15435,12 +15516,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -15450,7 +15531,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -15463,18 +15544,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequestOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_LoadTableRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateTableRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_LoadTableRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateTableRequest_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -15485,6 +15566,9 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getReservedThroughputFieldBuilder(); + getTableOptionsFieldBuilder(); + getStreamSpecFieldBuilder(); } } private static Builder create() { @@ -15495,6 +15579,24 @@ public Builder clear() { super.clear(); tableName_ = ""; bitField0_ = (bitField0_ & ~0x00000001); + if (reservedThroughputBuilder_ == null) { + reservedThroughput_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.getDefaultInstance(); + } else { + reservedThroughputBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + if (tableOptionsBuilder_ == null) { + tableOptions_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.getDefaultInstance(); + } else { + tableOptionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + if (streamSpecBuilder_ == null) { + streamSpec_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.getDefaultInstance(); + } else { + streamSpecBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -15504,24 +15606,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -15529,33 +15631,66 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTa return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest(this); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.tableName_ = tableName_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest)other); - } else { - super.mergeFrom(other); + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + if (reservedThroughputBuilder_ == null) { + result.reservedThroughput_ = reservedThroughput_; + } else { + result.reservedThroughput_ = reservedThroughputBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + if (tableOptionsBuilder_ == null) { + result.tableOptions_ = tableOptions_; + } else { + result.tableOptions_ = tableOptionsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + if (streamSpecBuilder_ == null) { + result.streamSpec_ = streamSpec_; + } else { + result.streamSpec_ = streamSpecBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest)other); + } else { + super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest.getDefaultInstance()) return this; + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest.getDefaultInstance()) return this; if (other.hasTableName()) { setTableName(other.getTableName()); } + if (other.hasReservedThroughput()) { + mergeReservedThroughput(other.getReservedThroughput()); + } + if (other.hasTableOptions()) { + mergeTableOptions(other.getTableOptions()); + } + if (other.hasStreamSpec()) { + mergeStreamSpec(other.getStreamSpec()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -15565,6 +15700,18 @@ public final boolean isInitialized() { return false; } + if (hasReservedThroughput()) { + if (!getReservedThroughput().isInitialized()) { + + return false; + } + } + if (hasStreamSpec()) { + if (!getStreamSpec().isInitialized()) { + + return false; + } + } return true; } @@ -15596,6 +15743,33 @@ public Builder mergeFrom( tableName_ = input.readBytes(); break; } + case 18: { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.newBuilder(); + if (hasReservedThroughput()) { + subBuilder.mergeFrom(getReservedThroughput()); + } + input.readMessage(subBuilder, extensionRegistry); + setReservedThroughput(subBuilder.buildPartial()); + break; + } + case 26: { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.newBuilder(); + if (hasTableOptions()) { + subBuilder.mergeFrom(getTableOptions()); + } + input.readMessage(subBuilder, extensionRegistry); + setTableOptions(subBuilder.buildPartial()); + break; + } + case 34: { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.newBuilder(); + if (hasStreamSpec()) { + subBuilder.mergeFrom(getStreamSpec()); + } + input.readMessage(subBuilder, extensionRegistry); + setStreamSpec(subBuilder.buildPartial()); + break; + } } } } @@ -15638,55 +15812,401 @@ void setTableName(com.google.protobuf.ByteString value) { onChanged(); } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.LoadTableRequest) + // optional .com.alicloud.openservices.tablestore.core.protocol.ReservedThroughput reserved_throughput = 2; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput reservedThroughput_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputOrBuilder> reservedThroughputBuilder_; + public boolean hasReservedThroughput() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput getReservedThroughput() { + if (reservedThroughputBuilder_ == null) { + return reservedThroughput_; + } else { + return reservedThroughputBuilder_.getMessage(); + } + } + public Builder setReservedThroughput(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput value) { + if (reservedThroughputBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + reservedThroughput_ = value; + onChanged(); + } else { + reservedThroughputBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder setReservedThroughput( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.Builder builderForValue) { + if (reservedThroughputBuilder_ == null) { + reservedThroughput_ = builderForValue.build(); + onChanged(); + } else { + reservedThroughputBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder mergeReservedThroughput(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput value) { + if (reservedThroughputBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002) && + reservedThroughput_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.getDefaultInstance()) { + reservedThroughput_ = + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.newBuilder(reservedThroughput_).mergeFrom(value).buildPartial(); + } else { + reservedThroughput_ = value; + } + onChanged(); + } else { + reservedThroughputBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder clearReservedThroughput() { + if (reservedThroughputBuilder_ == null) { + reservedThroughput_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.getDefaultInstance(); + onChanged(); + } else { + reservedThroughputBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.Builder getReservedThroughputBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getReservedThroughputFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputOrBuilder getReservedThroughputOrBuilder() { + if (reservedThroughputBuilder_ != null) { + return reservedThroughputBuilder_.getMessageOrBuilder(); + } else { + return reservedThroughput_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputOrBuilder> + getReservedThroughputFieldBuilder() { + if (reservedThroughputBuilder_ == null) { + reservedThroughputBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputOrBuilder>( + reservedThroughput_, + getParentForChildren(), + isClean()); + reservedThroughput_ = null; + } + return reservedThroughputBuilder_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.TableOptions table_options = 3; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions tableOptions_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptionsOrBuilder> tableOptionsBuilder_; + public boolean hasTableOptions() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions getTableOptions() { + if (tableOptionsBuilder_ == null) { + return tableOptions_; + } else { + return tableOptionsBuilder_.getMessage(); + } + } + public Builder setTableOptions(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions value) { + if (tableOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tableOptions_ = value; + onChanged(); + } else { + tableOptionsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder setTableOptions( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.Builder builderForValue) { + if (tableOptionsBuilder_ == null) { + tableOptions_ = builderForValue.build(); + onChanged(); + } else { + tableOptionsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder mergeTableOptions(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions value) { + if (tableOptionsBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004) && + tableOptions_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.getDefaultInstance()) { + tableOptions_ = + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.newBuilder(tableOptions_).mergeFrom(value).buildPartial(); + } else { + tableOptions_ = value; + } + onChanged(); + } else { + tableOptionsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder clearTableOptions() { + if (tableOptionsBuilder_ == null) { + tableOptions_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.getDefaultInstance(); + onChanged(); + } else { + tableOptionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.Builder getTableOptionsBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getTableOptionsFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptionsOrBuilder getTableOptionsOrBuilder() { + if (tableOptionsBuilder_ != null) { + return tableOptionsBuilder_.getMessageOrBuilder(); + } else { + return tableOptions_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptionsOrBuilder> + getTableOptionsFieldBuilder() { + if (tableOptionsBuilder_ == null) { + tableOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptionsOrBuilder>( + tableOptions_, + getParentForChildren(), + isClean()); + tableOptions_ = null; + } + return tableOptionsBuilder_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.StreamSpecification stream_spec = 4; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification streamSpec_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecificationOrBuilder> streamSpecBuilder_; + public boolean hasStreamSpec() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification getStreamSpec() { + if (streamSpecBuilder_ == null) { + return streamSpec_; + } else { + return streamSpecBuilder_.getMessage(); + } + } + public Builder setStreamSpec(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification value) { + if (streamSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + streamSpec_ = value; + onChanged(); + } else { + streamSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder setStreamSpec( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.Builder builderForValue) { + if (streamSpecBuilder_ == null) { + streamSpec_ = builderForValue.build(); + onChanged(); + } else { + streamSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder mergeStreamSpec(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification value) { + if (streamSpecBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008) && + streamSpec_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.getDefaultInstance()) { + streamSpec_ = + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.newBuilder(streamSpec_).mergeFrom(value).buildPartial(); + } else { + streamSpec_ = value; + } + onChanged(); + } else { + streamSpecBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder clearStreamSpec() { + if (streamSpecBuilder_ == null) { + streamSpec_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.getDefaultInstance(); + onChanged(); + } else { + streamSpecBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.Builder getStreamSpecBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getStreamSpecFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecificationOrBuilder getStreamSpecOrBuilder() { + if (streamSpecBuilder_ != null) { + return streamSpecBuilder_.getMessageOrBuilder(); + } else { + return streamSpec_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecificationOrBuilder> + getStreamSpecFieldBuilder() { + if (streamSpecBuilder_ == null) { + streamSpecBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecificationOrBuilder>( + streamSpec_, + getParentForChildren(), + isClean()); + streamSpec_ = null; + } + return streamSpecBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.UpdateTableRequest) } static { - defaultInstance = new LoadTableRequest(true); + defaultInstance = new UpdateTableRequest(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.LoadTableRequest) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.UpdateTableRequest) } - public interface LoadTableResponseOrBuilder + public interface UpdateTableResponseOrBuilder extends com.google.protobuf.MessageOrBuilder { + + // required .com.alicloud.openservices.tablestore.core.protocol.ReservedThroughputDetails reserved_throughput_details = 1; + boolean hasReservedThroughputDetails(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails getReservedThroughputDetails(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetailsOrBuilder getReservedThroughputDetailsOrBuilder(); + + // required .com.alicloud.openservices.tablestore.core.protocol.TableOptions table_options = 2; + boolean hasTableOptions(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions getTableOptions(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptionsOrBuilder getTableOptionsOrBuilder(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.StreamDetails stream_details = 3; + boolean hasStreamDetails(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails getStreamDetails(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetailsOrBuilder getStreamDetailsOrBuilder(); } - public static final class LoadTableResponse extends + public static final class UpdateTableResponse extends com.google.protobuf.GeneratedMessage - implements LoadTableResponseOrBuilder { - // Use LoadTableResponse.newBuilder() to construct. - private LoadTableResponse(Builder builder) { + implements UpdateTableResponseOrBuilder { + // Use UpdateTableResponse.newBuilder() to construct. + private UpdateTableResponse(Builder builder) { super(builder); } - private LoadTableResponse(boolean noInit) {} + private UpdateTableResponse(boolean noInit) {} - private static final LoadTableResponse defaultInstance; - public static LoadTableResponse getDefaultInstance() { + private static final UpdateTableResponse defaultInstance; + public static UpdateTableResponse getDefaultInstance() { return defaultInstance; } - public LoadTableResponse getDefaultInstanceForType() { + public UpdateTableResponse getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_LoadTableResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateTableResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_LoadTableResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateTableResponse_fieldAccessorTable; + } + + private int bitField0_; + // required .com.alicloud.openservices.tablestore.core.protocol.ReservedThroughputDetails reserved_throughput_details = 1; + public static final int RESERVED_THROUGHPUT_DETAILS_FIELD_NUMBER = 1; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails reservedThroughputDetails_; + public boolean hasReservedThroughputDetails() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails getReservedThroughputDetails() { + return reservedThroughputDetails_; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetailsOrBuilder getReservedThroughputDetailsOrBuilder() { + return reservedThroughputDetails_; + } + + // required .com.alicloud.openservices.tablestore.core.protocol.TableOptions table_options = 2; + public static final int TABLE_OPTIONS_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions tableOptions_; + public boolean hasTableOptions() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions getTableOptions() { + return tableOptions_; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptionsOrBuilder getTableOptionsOrBuilder() { + return tableOptions_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.StreamDetails stream_details = 3; + public static final int STREAM_DETAILS_FIELD_NUMBER = 3; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails streamDetails_; + public boolean hasStreamDetails() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails getStreamDetails() { + return streamDetails_; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetailsOrBuilder getStreamDetailsOrBuilder() { + return streamDetails_; } private void initFields() { + reservedThroughputDetails_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.getDefaultInstance(); + tableOptions_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.getDefaultInstance(); + streamDetails_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; + if (!hasReservedThroughputDetails()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasTableOptions()) { + memoizedIsInitialized = 0; + return false; + } + if (!getReservedThroughputDetails().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + if (hasStreamDetails()) { + if (!getStreamDetails().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } memoizedIsInitialized = 1; return true; } @@ -15694,6 +16214,15 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(1, reservedThroughputDetails_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeMessage(2, tableOptions_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeMessage(3, streamDetails_); + } getUnknownFields().writeTo(output); } @@ -15703,6 +16232,18 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, reservedThroughputDetails_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, tableOptions_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, streamDetails_); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -15715,41 +16256,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -15758,7 +16299,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -15769,12 +16310,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -15784,7 +16325,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -15797,18 +16338,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponseOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_LoadTableResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateTableResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_LoadTableResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateTableResponse_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -15819,7 +16360,10 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } + getReservedThroughputDetailsFieldBuilder(); + getTableOptionsFieldBuilder(); + getStreamDetailsFieldBuilder(); + } } private static Builder create() { return new Builder(); @@ -15827,6 +16371,24 @@ private static Builder create() { public Builder clear() { super.clear(); + if (reservedThroughputDetailsBuilder_ == null) { + reservedThroughputDetails_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.getDefaultInstance(); + } else { + reservedThroughputDetailsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (tableOptionsBuilder_ == null) { + tableOptions_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.getDefaultInstance(); + } else { + tableOptionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + if (streamDetailsBuilder_ == null) { + streamDetails_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.getDefaultInstance(); + } else { + streamDetailsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); return this; } @@ -15836,24 +16398,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -15861,28 +16423,82 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTa return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse(this); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + if (reservedThroughputDetailsBuilder_ == null) { + result.reservedThroughputDetails_ = reservedThroughputDetails_; + } else { + result.reservedThroughputDetails_ = reservedThroughputDetailsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + if (tableOptionsBuilder_ == null) { + result.tableOptions_ = tableOptions_; + } else { + result.tableOptions_ = tableOptionsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + if (streamDetailsBuilder_ == null) { + result.streamDetails_ = streamDetails_; + } else { + result.streamDetails_ = streamDetailsBuilder_.build(); + } + result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse.getDefaultInstance()) return this; + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse.getDefaultInstance()) return this; + if (other.hasReservedThroughputDetails()) { + mergeReservedThroughputDetails(other.getReservedThroughputDetails()); + } + if (other.hasTableOptions()) { + mergeTableOptions(other.getTableOptions()); + } + if (other.hasStreamDetails()) { + mergeStreamDetails(other.getStreamDetails()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { + if (!hasReservedThroughputDetails()) { + + return false; + } + if (!hasTableOptions()) { + + return false; + } + if (!getReservedThroughputDetails().isInitialized()) { + + return false; + } + if (hasStreamDetails()) { + if (!getStreamDetails().isInitialized()) { + + return false; + } + } return true; } @@ -15909,55 +16525,353 @@ public Builder mergeFrom( } break; } + case 10: { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.newBuilder(); + if (hasReservedThroughputDetails()) { + subBuilder.mergeFrom(getReservedThroughputDetails()); + } + input.readMessage(subBuilder, extensionRegistry); + setReservedThroughputDetails(subBuilder.buildPartial()); + break; + } + case 18: { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.newBuilder(); + if (hasTableOptions()) { + subBuilder.mergeFrom(getTableOptions()); + } + input.readMessage(subBuilder, extensionRegistry); + setTableOptions(subBuilder.buildPartial()); + break; + } + case 26: { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.newBuilder(); + if (hasStreamDetails()) { + subBuilder.mergeFrom(getStreamDetails()); + } + input.readMessage(subBuilder, extensionRegistry); + setStreamDetails(subBuilder.buildPartial()); + break; + } } } } + private int bitField0_; - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.LoadTableResponse) + // required .com.alicloud.openservices.tablestore.core.protocol.ReservedThroughputDetails reserved_throughput_details = 1; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails reservedThroughputDetails_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetailsOrBuilder> reservedThroughputDetailsBuilder_; + public boolean hasReservedThroughputDetails() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails getReservedThroughputDetails() { + if (reservedThroughputDetailsBuilder_ == null) { + return reservedThroughputDetails_; + } else { + return reservedThroughputDetailsBuilder_.getMessage(); + } + } + public Builder setReservedThroughputDetails(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails value) { + if (reservedThroughputDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + reservedThroughputDetails_ = value; + onChanged(); + } else { + reservedThroughputDetailsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder setReservedThroughputDetails( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.Builder builderForValue) { + if (reservedThroughputDetailsBuilder_ == null) { + reservedThroughputDetails_ = builderForValue.build(); + onChanged(); + } else { + reservedThroughputDetailsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder mergeReservedThroughputDetails(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails value) { + if (reservedThroughputDetailsBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001) && + reservedThroughputDetails_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.getDefaultInstance()) { + reservedThroughputDetails_ = + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.newBuilder(reservedThroughputDetails_).mergeFrom(value).buildPartial(); + } else { + reservedThroughputDetails_ = value; + } + onChanged(); + } else { + reservedThroughputDetailsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder clearReservedThroughputDetails() { + if (reservedThroughputDetailsBuilder_ == null) { + reservedThroughputDetails_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.getDefaultInstance(); + onChanged(); + } else { + reservedThroughputDetailsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.Builder getReservedThroughputDetailsBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getReservedThroughputDetailsFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetailsOrBuilder getReservedThroughputDetailsOrBuilder() { + if (reservedThroughputDetailsBuilder_ != null) { + return reservedThroughputDetailsBuilder_.getMessageOrBuilder(); + } else { + return reservedThroughputDetails_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetailsOrBuilder> + getReservedThroughputDetailsFieldBuilder() { + if (reservedThroughputDetailsBuilder_ == null) { + reservedThroughputDetailsBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetailsOrBuilder>( + reservedThroughputDetails_, + getParentForChildren(), + isClean()); + reservedThroughputDetails_ = null; + } + return reservedThroughputDetailsBuilder_; + } + + // required .com.alicloud.openservices.tablestore.core.protocol.TableOptions table_options = 2; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions tableOptions_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptionsOrBuilder> tableOptionsBuilder_; + public boolean hasTableOptions() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions getTableOptions() { + if (tableOptionsBuilder_ == null) { + return tableOptions_; + } else { + return tableOptionsBuilder_.getMessage(); + } + } + public Builder setTableOptions(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions value) { + if (tableOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tableOptions_ = value; + onChanged(); + } else { + tableOptionsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder setTableOptions( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.Builder builderForValue) { + if (tableOptionsBuilder_ == null) { + tableOptions_ = builderForValue.build(); + onChanged(); + } else { + tableOptionsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder mergeTableOptions(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions value) { + if (tableOptionsBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002) && + tableOptions_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.getDefaultInstance()) { + tableOptions_ = + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.newBuilder(tableOptions_).mergeFrom(value).buildPartial(); + } else { + tableOptions_ = value; + } + onChanged(); + } else { + tableOptionsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder clearTableOptions() { + if (tableOptionsBuilder_ == null) { + tableOptions_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.getDefaultInstance(); + onChanged(); + } else { + tableOptionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.Builder getTableOptionsBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getTableOptionsFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptionsOrBuilder getTableOptionsOrBuilder() { + if (tableOptionsBuilder_ != null) { + return tableOptionsBuilder_.getMessageOrBuilder(); + } else { + return tableOptions_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptionsOrBuilder> + getTableOptionsFieldBuilder() { + if (tableOptionsBuilder_ == null) { + tableOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptionsOrBuilder>( + tableOptions_, + getParentForChildren(), + isClean()); + tableOptions_ = null; + } + return tableOptionsBuilder_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.StreamDetails stream_details = 3; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails streamDetails_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetailsOrBuilder> streamDetailsBuilder_; + public boolean hasStreamDetails() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails getStreamDetails() { + if (streamDetailsBuilder_ == null) { + return streamDetails_; + } else { + return streamDetailsBuilder_.getMessage(); + } + } + public Builder setStreamDetails(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails value) { + if (streamDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + streamDetails_ = value; + onChanged(); + } else { + streamDetailsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder setStreamDetails( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.Builder builderForValue) { + if (streamDetailsBuilder_ == null) { + streamDetails_ = builderForValue.build(); + onChanged(); + } else { + streamDetailsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder mergeStreamDetails(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails value) { + if (streamDetailsBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004) && + streamDetails_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.getDefaultInstance()) { + streamDetails_ = + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.newBuilder(streamDetails_).mergeFrom(value).buildPartial(); + } else { + streamDetails_ = value; + } + onChanged(); + } else { + streamDetailsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder clearStreamDetails() { + if (streamDetailsBuilder_ == null) { + streamDetails_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.getDefaultInstance(); + onChanged(); + } else { + streamDetailsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.Builder getStreamDetailsBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getStreamDetailsFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetailsOrBuilder getStreamDetailsOrBuilder() { + if (streamDetailsBuilder_ != null) { + return streamDetailsBuilder_.getMessageOrBuilder(); + } else { + return streamDetails_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetailsOrBuilder> + getStreamDetailsFieldBuilder() { + if (streamDetailsBuilder_ == null) { + streamDetailsBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetailsOrBuilder>( + streamDetails_, + getParentForChildren(), + isClean()); + streamDetails_ = null; + } + return streamDetailsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.UpdateTableResponse) } static { - defaultInstance = new LoadTableResponse(true); + defaultInstance = new UpdateTableResponse(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.LoadTableResponse) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.UpdateTableResponse) } - public interface UnloadTableRequestOrBuilder + public interface DescribeTableRequestOrBuilder extends com.google.protobuf.MessageOrBuilder { // required string table_name = 1; boolean hasTableName(); String getTableName(); } - public static final class UnloadTableRequest extends + public static final class DescribeTableRequest extends com.google.protobuf.GeneratedMessage - implements UnloadTableRequestOrBuilder { - // Use UnloadTableRequest.newBuilder() to construct. - private UnloadTableRequest(Builder builder) { + implements DescribeTableRequestOrBuilder { + // Use DescribeTableRequest.newBuilder() to construct. + private DescribeTableRequest(Builder builder) { super(builder); } - private UnloadTableRequest(boolean noInit) {} + private DescribeTableRequest(boolean noInit) {} - private static final UnloadTableRequest defaultInstance; - public static UnloadTableRequest getDefaultInstance() { + private static final DescribeTableRequest defaultInstance; + public static DescribeTableRequest getDefaultInstance() { return defaultInstance; } - public UnloadTableRequest getDefaultInstanceForType() { + public DescribeTableRequest getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UnloadTableRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeTableRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UnloadTableRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeTableRequest_fieldAccessorTable; } private int bitField0_; @@ -16040,41 +16954,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -16083,7 +16997,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -16094,12 +17008,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -16109,7 +17023,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -16122,18 +17036,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequestOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UnloadTableRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeTableRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UnloadTableRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeTableRequest_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -16163,24 +17077,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -16188,8 +17102,8 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Unload return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest(this); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { @@ -16202,16 +17116,16 @@ public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadT } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest.getDefaultInstance()) return this; + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest.getDefaultInstance()) return this; if (other.hasTableName()) { setTableName(other.getTableName()); } @@ -16297,55 +17211,256 @@ void setTableName(com.google.protobuf.ByteString value) { onChanged(); } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.UnloadTableRequest) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.DescribeTableRequest) } static { - defaultInstance = new UnloadTableRequest(true); + defaultInstance = new DescribeTableRequest(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.UnloadTableRequest) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.DescribeTableRequest) } - public interface UnloadTableResponseOrBuilder + public interface DescribeTableResponseOrBuilder extends com.google.protobuf.MessageOrBuilder { - } - public static final class UnloadTableResponse extends - com.google.protobuf.GeneratedMessage - implements UnloadTableResponseOrBuilder { - // Use UnloadTableResponse.newBuilder() to construct. - private UnloadTableResponse(Builder builder) { - super(builder); - } - private UnloadTableResponse(boolean noInit) {} - private static final UnloadTableResponse defaultInstance; - public static UnloadTableResponse getDefaultInstance() { - return defaultInstance; - } + // required .com.alicloud.openservices.tablestore.core.protocol.TableMeta table_meta = 1; + boolean hasTableMeta(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta getTableMeta(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMetaOrBuilder getTableMetaOrBuilder(); - public UnloadTableResponse getDefaultInstanceForType() { - return defaultInstance; - } + // required .com.alicloud.openservices.tablestore.core.protocol.ReservedThroughputDetails reserved_throughput_details = 2; + boolean hasReservedThroughputDetails(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails getReservedThroughputDetails(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetailsOrBuilder getReservedThroughputDetailsOrBuilder(); + + // required .com.alicloud.openservices.tablestore.core.protocol.TableOptions table_options = 3; + boolean hasTableOptions(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions getTableOptions(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptionsOrBuilder getTableOptionsOrBuilder(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.StreamDetails stream_details = 5; + boolean hasStreamDetails(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails getStreamDetails(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetailsOrBuilder getStreamDetailsOrBuilder(); + + // repeated bytes shard_splits = 6; + java.util.List getShardSplitsList(); + int getShardSplitsCount(); + com.google.protobuf.ByteString getShardSplits(int index); + + // optional .com.alicloud.openservices.tablestore.core.protocol.SSEDetails sse_details = 7; + boolean hasSseDetails(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails getSseDetails(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetailsOrBuilder getSseDetailsOrBuilder(); + + // repeated .com.alicloud.openservices.tablestore.core.protocol.IndexMeta index_metas = 8; + java.util.List + getIndexMetasList(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta getIndexMetas(int index); + int getIndexMetasCount(); + java.util.List + getIndexMetasOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMetaOrBuilder getIndexMetasOrBuilder( + int index); + + // optional int64 creation_time = 9; + boolean hasCreationTime(); + long getCreationTime(); + } + public static final class DescribeTableResponse extends + com.google.protobuf.GeneratedMessage + implements DescribeTableResponseOrBuilder { + // Use DescribeTableResponse.newBuilder() to construct. + private DescribeTableResponse(Builder builder) { + super(builder); + } + private DescribeTableResponse(boolean noInit) {} + + private static final DescribeTableResponse defaultInstance; + public static DescribeTableResponse getDefaultInstance() { + return defaultInstance; + } + + public DescribeTableResponse getDefaultInstanceForType() { + return defaultInstance; + } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UnloadTableResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeTableResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UnloadTableResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeTableResponse_fieldAccessorTable; + } + + private int bitField0_; + // required .com.alicloud.openservices.tablestore.core.protocol.TableMeta table_meta = 1; + public static final int TABLE_META_FIELD_NUMBER = 1; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta tableMeta_; + public boolean hasTableMeta() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta getTableMeta() { + return tableMeta_; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMetaOrBuilder getTableMetaOrBuilder() { + return tableMeta_; + } + + // required .com.alicloud.openservices.tablestore.core.protocol.ReservedThroughputDetails reserved_throughput_details = 2; + public static final int RESERVED_THROUGHPUT_DETAILS_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails reservedThroughputDetails_; + public boolean hasReservedThroughputDetails() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails getReservedThroughputDetails() { + return reservedThroughputDetails_; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetailsOrBuilder getReservedThroughputDetailsOrBuilder() { + return reservedThroughputDetails_; + } + + // required .com.alicloud.openservices.tablestore.core.protocol.TableOptions table_options = 3; + public static final int TABLE_OPTIONS_FIELD_NUMBER = 3; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions tableOptions_; + public boolean hasTableOptions() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions getTableOptions() { + return tableOptions_; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptionsOrBuilder getTableOptionsOrBuilder() { + return tableOptions_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.StreamDetails stream_details = 5; + public static final int STREAM_DETAILS_FIELD_NUMBER = 5; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails streamDetails_; + public boolean hasStreamDetails() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails getStreamDetails() { + return streamDetails_; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetailsOrBuilder getStreamDetailsOrBuilder() { + return streamDetails_; + } + + // repeated bytes shard_splits = 6; + public static final int SHARD_SPLITS_FIELD_NUMBER = 6; + private java.util.List shardSplits_; + public java.util.List + getShardSplitsList() { + return shardSplits_; + } + public int getShardSplitsCount() { + return shardSplits_.size(); + } + public com.google.protobuf.ByteString getShardSplits(int index) { + return shardSplits_.get(index); + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.SSEDetails sse_details = 7; + public static final int SSE_DETAILS_FIELD_NUMBER = 7; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails sseDetails_; + public boolean hasSseDetails() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails getSseDetails() { + return sseDetails_; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetailsOrBuilder getSseDetailsOrBuilder() { + return sseDetails_; + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.IndexMeta index_metas = 8; + public static final int INDEX_METAS_FIELD_NUMBER = 8; + private java.util.List indexMetas_; + public java.util.List getIndexMetasList() { + return indexMetas_; + } + public java.util.List + getIndexMetasOrBuilderList() { + return indexMetas_; + } + public int getIndexMetasCount() { + return indexMetas_.size(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta getIndexMetas(int index) { + return indexMetas_.get(index); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMetaOrBuilder getIndexMetasOrBuilder( + int index) { + return indexMetas_.get(index); + } + + // optional int64 creation_time = 9; + public static final int CREATION_TIME_FIELD_NUMBER = 9; + private long creationTime_; + public boolean hasCreationTime() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + public long getCreationTime() { + return creationTime_; } private void initFields() { + tableMeta_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.getDefaultInstance(); + reservedThroughputDetails_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.getDefaultInstance(); + tableOptions_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.getDefaultInstance(); + streamDetails_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.getDefaultInstance(); + shardSplits_ = java.util.Collections.emptyList();; + sseDetails_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails.getDefaultInstance(); + indexMetas_ = java.util.Collections.emptyList(); + creationTime_ = 0L; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; + if (!hasTableMeta()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasReservedThroughputDetails()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasTableOptions()) { + memoizedIsInitialized = 0; + return false; + } + if (!getTableMeta().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + if (!getReservedThroughputDetails().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + if (hasStreamDetails()) { + if (!getStreamDetails().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + if (hasSseDetails()) { + if (!getSseDetails().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + for (int i = 0; i < getIndexMetasCount(); i++) { + if (!getIndexMetas(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } memoizedIsInitialized = 1; return true; } @@ -16353,6 +17468,30 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(1, tableMeta_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeMessage(2, reservedThroughputDetails_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeMessage(3, tableOptions_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeMessage(5, streamDetails_); + } + for (int i = 0; i < shardSplits_.size(); i++) { + output.writeBytes(6, shardSplits_.get(i)); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeMessage(7, sseDetails_); + } + for (int i = 0; i < indexMetas_.size(); i++) { + output.writeMessage(8, indexMetas_.get(i)); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeInt64(9, creationTime_); + } getUnknownFields().writeTo(output); } @@ -16362,6 +17501,43 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, tableMeta_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, reservedThroughputDetails_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, tableOptions_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, streamDetails_); + } + { + int dataSize = 0; + for (int i = 0; i < shardSplits_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(shardSplits_.get(i)); + } + size += dataSize; + size += 1 * getShardSplitsList().size(); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, sseDetails_); + } + for (int i = 0; i < indexMetas_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, indexMetas_.get(i)); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(9, creationTime_); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -16374,41 +17550,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -16417,7 +17593,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -16428,12 +17604,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -16443,7 +17619,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -16456,18 +17632,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponseOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UnloadTableResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeTableResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UnloadTableResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeTableResponse_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -16478,6 +17654,12 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getTableMetaFieldBuilder(); + getReservedThroughputDetailsFieldBuilder(); + getTableOptionsFieldBuilder(); + getStreamDetailsFieldBuilder(); + getSseDetailsFieldBuilder(); + getIndexMetasFieldBuilder(); } } private static Builder create() { @@ -16486,6 +17668,46 @@ private static Builder create() { public Builder clear() { super.clear(); + if (tableMetaBuilder_ == null) { + tableMeta_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.getDefaultInstance(); + } else { + tableMetaBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (reservedThroughputDetailsBuilder_ == null) { + reservedThroughputDetails_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.getDefaultInstance(); + } else { + reservedThroughputDetailsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + if (tableOptionsBuilder_ == null) { + tableOptions_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.getDefaultInstance(); + } else { + tableOptionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + if (streamDetailsBuilder_ == null) { + streamDetails_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.getDefaultInstance(); + } else { + streamDetailsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + shardSplits_ = java.util.Collections.emptyList();; + bitField0_ = (bitField0_ & ~0x00000010); + if (sseDetailsBuilder_ == null) { + sseDetails_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails.getDefaultInstance(); + } else { + sseDetailsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + if (indexMetasBuilder_ == null) { + indexMetas_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + } else { + indexMetasBuilder_.clear(); + } + creationTime_ = 0L; + bitField0_ = (bitField0_ & ~0x00000080); return this; } @@ -16495,24 +17717,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -16520,28 +17742,181 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Unload return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse(this); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + if (tableMetaBuilder_ == null) { + result.tableMeta_ = tableMeta_; + } else { + result.tableMeta_ = tableMetaBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + if (reservedThroughputDetailsBuilder_ == null) { + result.reservedThroughputDetails_ = reservedThroughputDetails_; + } else { + result.reservedThroughputDetails_ = reservedThroughputDetailsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + if (tableOptionsBuilder_ == null) { + result.tableOptions_ = tableOptions_; + } else { + result.tableOptions_ = tableOptionsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + if (streamDetailsBuilder_ == null) { + result.streamDetails_ = streamDetails_; + } else { + result.streamDetails_ = streamDetailsBuilder_.build(); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + shardSplits_ = java.util.Collections.unmodifiableList(shardSplits_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.shardSplits_ = shardSplits_; + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000010; + } + if (sseDetailsBuilder_ == null) { + result.sseDetails_ = sseDetails_; + } else { + result.sseDetails_ = sseDetailsBuilder_.build(); + } + if (indexMetasBuilder_ == null) { + if (((bitField0_ & 0x00000040) == 0x00000040)) { + indexMetas_ = java.util.Collections.unmodifiableList(indexMetas_); + bitField0_ = (bitField0_ & ~0x00000040); + } + result.indexMetas_ = indexMetas_; + } else { + result.indexMetas_ = indexMetasBuilder_.build(); + } + if (((from_bitField0_ & 0x00000080) == 0x00000080)) { + to_bitField0_ |= 0x00000020; + } + result.creationTime_ = creationTime_; + result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse.getDefaultInstance()) return this; + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse.getDefaultInstance()) return this; + if (other.hasTableMeta()) { + mergeTableMeta(other.getTableMeta()); + } + if (other.hasReservedThroughputDetails()) { + mergeReservedThroughputDetails(other.getReservedThroughputDetails()); + } + if (other.hasTableOptions()) { + mergeTableOptions(other.getTableOptions()); + } + if (other.hasStreamDetails()) { + mergeStreamDetails(other.getStreamDetails()); + } + if (!other.shardSplits_.isEmpty()) { + if (shardSplits_.isEmpty()) { + shardSplits_ = other.shardSplits_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureShardSplitsIsMutable(); + shardSplits_.addAll(other.shardSplits_); + } + onChanged(); + } + if (other.hasSseDetails()) { + mergeSseDetails(other.getSseDetails()); + } + if (indexMetasBuilder_ == null) { + if (!other.indexMetas_.isEmpty()) { + if (indexMetas_.isEmpty()) { + indexMetas_ = other.indexMetas_; + bitField0_ = (bitField0_ & ~0x00000040); + } else { + ensureIndexMetasIsMutable(); + indexMetas_.addAll(other.indexMetas_); + } + onChanged(); + } + } else { + if (!other.indexMetas_.isEmpty()) { + if (indexMetasBuilder_.isEmpty()) { + indexMetasBuilder_.dispose(); + indexMetasBuilder_ = null; + indexMetas_ = other.indexMetas_; + bitField0_ = (bitField0_ & ~0x00000040); + indexMetasBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getIndexMetasFieldBuilder() : null; + } else { + indexMetasBuilder_.addAllMessages(other.indexMetas_); + } + } + } + if (other.hasCreationTime()) { + setCreationTime(other.getCreationTime()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { + if (!hasTableMeta()) { + + return false; + } + if (!hasReservedThroughputDetails()) { + + return false; + } + if (!hasTableOptions()) { + + return false; + } + if (!getTableMeta().isInitialized()) { + + return false; + } + if (!getReservedThroughputDetails().isInitialized()) { + + return false; + } + if (hasStreamDetails()) { + if (!getStreamDetails().isInitialized()) { + + return false; + } + } + if (hasSseDetails()) { + if (!getSseDetails().isInitialized()) { + + return false; + } + } + for (int i = 0; i < getIndexMetasCount(); i++) { + if (!getIndexMetas(i).isInitialized()) { + + return false; + } + } return true; } @@ -16568,106 +17943,11970 @@ public Builder mergeFrom( } break; } - } - } - } - - - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.UnloadTableResponse) - } - - static { - defaultInstance = new UnloadTableResponse(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.UnloadTableResponse) - } - - public interface TimeRangeOrBuilder + case 10: { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.newBuilder(); + if (hasTableMeta()) { + subBuilder.mergeFrom(getTableMeta()); + } + input.readMessage(subBuilder, extensionRegistry); + setTableMeta(subBuilder.buildPartial()); + break; + } + case 18: { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.newBuilder(); + if (hasReservedThroughputDetails()) { + subBuilder.mergeFrom(getReservedThroughputDetails()); + } + input.readMessage(subBuilder, extensionRegistry); + setReservedThroughputDetails(subBuilder.buildPartial()); + break; + } + case 26: { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.newBuilder(); + if (hasTableOptions()) { + subBuilder.mergeFrom(getTableOptions()); + } + input.readMessage(subBuilder, extensionRegistry); + setTableOptions(subBuilder.buildPartial()); + break; + } + case 42: { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.newBuilder(); + if (hasStreamDetails()) { + subBuilder.mergeFrom(getStreamDetails()); + } + input.readMessage(subBuilder, extensionRegistry); + setStreamDetails(subBuilder.buildPartial()); + break; + } + case 50: { + ensureShardSplitsIsMutable(); + shardSplits_.add(input.readBytes()); + break; + } + case 58: { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails.newBuilder(); + if (hasSseDetails()) { + subBuilder.mergeFrom(getSseDetails()); + } + input.readMessage(subBuilder, extensionRegistry); + setSseDetails(subBuilder.buildPartial()); + break; + } + case 66: { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addIndexMetas(subBuilder.buildPartial()); + break; + } + case 72: { + bitField0_ |= 0x00000080; + creationTime_ = input.readInt64(); + break; + } + } + } + } + + private int bitField0_; + + // required .com.alicloud.openservices.tablestore.core.protocol.TableMeta table_meta = 1; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta tableMeta_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMetaOrBuilder> tableMetaBuilder_; + public boolean hasTableMeta() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta getTableMeta() { + if (tableMetaBuilder_ == null) { + return tableMeta_; + } else { + return tableMetaBuilder_.getMessage(); + } + } + public Builder setTableMeta(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta value) { + if (tableMetaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tableMeta_ = value; + onChanged(); + } else { + tableMetaBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder setTableMeta( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.Builder builderForValue) { + if (tableMetaBuilder_ == null) { + tableMeta_ = builderForValue.build(); + onChanged(); + } else { + tableMetaBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder mergeTableMeta(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta value) { + if (tableMetaBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001) && + tableMeta_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.getDefaultInstance()) { + tableMeta_ = + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.newBuilder(tableMeta_).mergeFrom(value).buildPartial(); + } else { + tableMeta_ = value; + } + onChanged(); + } else { + tableMetaBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder clearTableMeta() { + if (tableMetaBuilder_ == null) { + tableMeta_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.getDefaultInstance(); + onChanged(); + } else { + tableMetaBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.Builder getTableMetaBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getTableMetaFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMetaOrBuilder getTableMetaOrBuilder() { + if (tableMetaBuilder_ != null) { + return tableMetaBuilder_.getMessageOrBuilder(); + } else { + return tableMeta_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMetaOrBuilder> + getTableMetaFieldBuilder() { + if (tableMetaBuilder_ == null) { + tableMetaBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMetaOrBuilder>( + tableMeta_, + getParentForChildren(), + isClean()); + tableMeta_ = null; + } + return tableMetaBuilder_; + } + + // required .com.alicloud.openservices.tablestore.core.protocol.ReservedThroughputDetails reserved_throughput_details = 2; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails reservedThroughputDetails_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetailsOrBuilder> reservedThroughputDetailsBuilder_; + public boolean hasReservedThroughputDetails() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails getReservedThroughputDetails() { + if (reservedThroughputDetailsBuilder_ == null) { + return reservedThroughputDetails_; + } else { + return reservedThroughputDetailsBuilder_.getMessage(); + } + } + public Builder setReservedThroughputDetails(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails value) { + if (reservedThroughputDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + reservedThroughputDetails_ = value; + onChanged(); + } else { + reservedThroughputDetailsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder setReservedThroughputDetails( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.Builder builderForValue) { + if (reservedThroughputDetailsBuilder_ == null) { + reservedThroughputDetails_ = builderForValue.build(); + onChanged(); + } else { + reservedThroughputDetailsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder mergeReservedThroughputDetails(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails value) { + if (reservedThroughputDetailsBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002) && + reservedThroughputDetails_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.getDefaultInstance()) { + reservedThroughputDetails_ = + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.newBuilder(reservedThroughputDetails_).mergeFrom(value).buildPartial(); + } else { + reservedThroughputDetails_ = value; + } + onChanged(); + } else { + reservedThroughputDetailsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder clearReservedThroughputDetails() { + if (reservedThroughputDetailsBuilder_ == null) { + reservedThroughputDetails_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.getDefaultInstance(); + onChanged(); + } else { + reservedThroughputDetailsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.Builder getReservedThroughputDetailsBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getReservedThroughputDetailsFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetailsOrBuilder getReservedThroughputDetailsOrBuilder() { + if (reservedThroughputDetailsBuilder_ != null) { + return reservedThroughputDetailsBuilder_.getMessageOrBuilder(); + } else { + return reservedThroughputDetails_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetailsOrBuilder> + getReservedThroughputDetailsFieldBuilder() { + if (reservedThroughputDetailsBuilder_ == null) { + reservedThroughputDetailsBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetailsOrBuilder>( + reservedThroughputDetails_, + getParentForChildren(), + isClean()); + reservedThroughputDetails_ = null; + } + return reservedThroughputDetailsBuilder_; + } + + // required .com.alicloud.openservices.tablestore.core.protocol.TableOptions table_options = 3; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions tableOptions_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptionsOrBuilder> tableOptionsBuilder_; + public boolean hasTableOptions() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions getTableOptions() { + if (tableOptionsBuilder_ == null) { + return tableOptions_; + } else { + return tableOptionsBuilder_.getMessage(); + } + } + public Builder setTableOptions(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions value) { + if (tableOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tableOptions_ = value; + onChanged(); + } else { + tableOptionsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder setTableOptions( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.Builder builderForValue) { + if (tableOptionsBuilder_ == null) { + tableOptions_ = builderForValue.build(); + onChanged(); + } else { + tableOptionsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder mergeTableOptions(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions value) { + if (tableOptionsBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004) && + tableOptions_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.getDefaultInstance()) { + tableOptions_ = + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.newBuilder(tableOptions_).mergeFrom(value).buildPartial(); + } else { + tableOptions_ = value; + } + onChanged(); + } else { + tableOptionsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder clearTableOptions() { + if (tableOptionsBuilder_ == null) { + tableOptions_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.getDefaultInstance(); + onChanged(); + } else { + tableOptionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.Builder getTableOptionsBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getTableOptionsFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptionsOrBuilder getTableOptionsOrBuilder() { + if (tableOptionsBuilder_ != null) { + return tableOptionsBuilder_.getMessageOrBuilder(); + } else { + return tableOptions_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptionsOrBuilder> + getTableOptionsFieldBuilder() { + if (tableOptionsBuilder_ == null) { + tableOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptionsOrBuilder>( + tableOptions_, + getParentForChildren(), + isClean()); + tableOptions_ = null; + } + return tableOptionsBuilder_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.StreamDetails stream_details = 5; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails streamDetails_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetailsOrBuilder> streamDetailsBuilder_; + public boolean hasStreamDetails() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails getStreamDetails() { + if (streamDetailsBuilder_ == null) { + return streamDetails_; + } else { + return streamDetailsBuilder_.getMessage(); + } + } + public Builder setStreamDetails(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails value) { + if (streamDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + streamDetails_ = value; + onChanged(); + } else { + streamDetailsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder setStreamDetails( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.Builder builderForValue) { + if (streamDetailsBuilder_ == null) { + streamDetails_ = builderForValue.build(); + onChanged(); + } else { + streamDetailsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder mergeStreamDetails(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails value) { + if (streamDetailsBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008) && + streamDetails_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.getDefaultInstance()) { + streamDetails_ = + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.newBuilder(streamDetails_).mergeFrom(value).buildPartial(); + } else { + streamDetails_ = value; + } + onChanged(); + } else { + streamDetailsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder clearStreamDetails() { + if (streamDetailsBuilder_ == null) { + streamDetails_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.getDefaultInstance(); + onChanged(); + } else { + streamDetailsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.Builder getStreamDetailsBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getStreamDetailsFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetailsOrBuilder getStreamDetailsOrBuilder() { + if (streamDetailsBuilder_ != null) { + return streamDetailsBuilder_.getMessageOrBuilder(); + } else { + return streamDetails_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetailsOrBuilder> + getStreamDetailsFieldBuilder() { + if (streamDetailsBuilder_ == null) { + streamDetailsBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetailsOrBuilder>( + streamDetails_, + getParentForChildren(), + isClean()); + streamDetails_ = null; + } + return streamDetailsBuilder_; + } + + // repeated bytes shard_splits = 6; + private java.util.List shardSplits_ = java.util.Collections.emptyList();; + private void ensureShardSplitsIsMutable() { + if (!((bitField0_ & 0x00000010) == 0x00000010)) { + shardSplits_ = new java.util.ArrayList(shardSplits_); + bitField0_ |= 0x00000010; + } + } + public java.util.List + getShardSplitsList() { + return java.util.Collections.unmodifiableList(shardSplits_); + } + public int getShardSplitsCount() { + return shardSplits_.size(); + } + public com.google.protobuf.ByteString getShardSplits(int index) { + return shardSplits_.get(index); + } + public Builder setShardSplits( + int index, com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureShardSplitsIsMutable(); + shardSplits_.set(index, value); + onChanged(); + return this; + } + public Builder addShardSplits(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureShardSplitsIsMutable(); + shardSplits_.add(value); + onChanged(); + return this; + } + public Builder addAllShardSplits( + java.lang.Iterable values) { + ensureShardSplitsIsMutable(); + super.addAll(values, shardSplits_); + onChanged(); + return this; + } + public Builder clearShardSplits() { + shardSplits_ = java.util.Collections.emptyList();; + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.SSEDetails sse_details = 7; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails sseDetails_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetailsOrBuilder> sseDetailsBuilder_; + public boolean hasSseDetails() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails getSseDetails() { + if (sseDetailsBuilder_ == null) { + return sseDetails_; + } else { + return sseDetailsBuilder_.getMessage(); + } + } + public Builder setSseDetails(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails value) { + if (sseDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sseDetails_ = value; + onChanged(); + } else { + sseDetailsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + return this; + } + public Builder setSseDetails( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails.Builder builderForValue) { + if (sseDetailsBuilder_ == null) { + sseDetails_ = builderForValue.build(); + onChanged(); + } else { + sseDetailsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + return this; + } + public Builder mergeSseDetails(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails value) { + if (sseDetailsBuilder_ == null) { + if (((bitField0_ & 0x00000020) == 0x00000020) && + sseDetails_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails.getDefaultInstance()) { + sseDetails_ = + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails.newBuilder(sseDetails_).mergeFrom(value).buildPartial(); + } else { + sseDetails_ = value; + } + onChanged(); + } else { + sseDetailsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + return this; + } + public Builder clearSseDetails() { + if (sseDetailsBuilder_ == null) { + sseDetails_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails.getDefaultInstance(); + onChanged(); + } else { + sseDetailsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails.Builder getSseDetailsBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getSseDetailsFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetailsOrBuilder getSseDetailsOrBuilder() { + if (sseDetailsBuilder_ != null) { + return sseDetailsBuilder_.getMessageOrBuilder(); + } else { + return sseDetails_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetailsOrBuilder> + getSseDetailsFieldBuilder() { + if (sseDetailsBuilder_ == null) { + sseDetailsBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetailsOrBuilder>( + sseDetails_, + getParentForChildren(), + isClean()); + sseDetails_ = null; + } + return sseDetailsBuilder_; + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.IndexMeta index_metas = 8; + private java.util.List indexMetas_ = + java.util.Collections.emptyList(); + private void ensureIndexMetasIsMutable() { + if (!((bitField0_ & 0x00000040) == 0x00000040)) { + indexMetas_ = new java.util.ArrayList(indexMetas_); + bitField0_ |= 0x00000040; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMetaOrBuilder> indexMetasBuilder_; + + public java.util.List getIndexMetasList() { + if (indexMetasBuilder_ == null) { + return java.util.Collections.unmodifiableList(indexMetas_); + } else { + return indexMetasBuilder_.getMessageList(); + } + } + public int getIndexMetasCount() { + if (indexMetasBuilder_ == null) { + return indexMetas_.size(); + } else { + return indexMetasBuilder_.getCount(); + } + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta getIndexMetas(int index) { + if (indexMetasBuilder_ == null) { + return indexMetas_.get(index); + } else { + return indexMetasBuilder_.getMessage(index); + } + } + public Builder setIndexMetas( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta value) { + if (indexMetasBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIndexMetasIsMutable(); + indexMetas_.set(index, value); + onChanged(); + } else { + indexMetasBuilder_.setMessage(index, value); + } + return this; + } + public Builder setIndexMetas( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder builderForValue) { + if (indexMetasBuilder_ == null) { + ensureIndexMetasIsMutable(); + indexMetas_.set(index, builderForValue.build()); + onChanged(); + } else { + indexMetasBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + public Builder addIndexMetas(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta value) { + if (indexMetasBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIndexMetasIsMutable(); + indexMetas_.add(value); + onChanged(); + } else { + indexMetasBuilder_.addMessage(value); + } + return this; + } + public Builder addIndexMetas( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta value) { + if (indexMetasBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIndexMetasIsMutable(); + indexMetas_.add(index, value); + onChanged(); + } else { + indexMetasBuilder_.addMessage(index, value); + } + return this; + } + public Builder addIndexMetas( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder builderForValue) { + if (indexMetasBuilder_ == null) { + ensureIndexMetasIsMutable(); + indexMetas_.add(builderForValue.build()); + onChanged(); + } else { + indexMetasBuilder_.addMessage(builderForValue.build()); + } + return this; + } + public Builder addIndexMetas( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder builderForValue) { + if (indexMetasBuilder_ == null) { + ensureIndexMetasIsMutable(); + indexMetas_.add(index, builderForValue.build()); + onChanged(); + } else { + indexMetasBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAllIndexMetas( + java.lang.Iterable values) { + if (indexMetasBuilder_ == null) { + ensureIndexMetasIsMutable(); + super.addAll(values, indexMetas_); + onChanged(); + } else { + indexMetasBuilder_.addAllMessages(values); + } + return this; + } + public Builder clearIndexMetas() { + if (indexMetasBuilder_ == null) { + indexMetas_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + } else { + indexMetasBuilder_.clear(); + } + return this; + } + public Builder removeIndexMetas(int index) { + if (indexMetasBuilder_ == null) { + ensureIndexMetasIsMutable(); + indexMetas_.remove(index); + onChanged(); + } else { + indexMetasBuilder_.remove(index); + } + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder getIndexMetasBuilder( + int index) { + return getIndexMetasFieldBuilder().getBuilder(index); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMetaOrBuilder getIndexMetasOrBuilder( + int index) { + if (indexMetasBuilder_ == null) { + return indexMetas_.get(index); } else { + return indexMetasBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getIndexMetasOrBuilderList() { + if (indexMetasBuilder_ != null) { + return indexMetasBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(indexMetas_); + } + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder addIndexMetasBuilder() { + return getIndexMetasFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.getDefaultInstance()); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder addIndexMetasBuilder( + int index) { + return getIndexMetasFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.getDefaultInstance()); + } + public java.util.List + getIndexMetasBuilderList() { + return getIndexMetasFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMetaOrBuilder> + getIndexMetasFieldBuilder() { + if (indexMetasBuilder_ == null) { + indexMetasBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMetaOrBuilder>( + indexMetas_, + ((bitField0_ & 0x00000040) == 0x00000040), + getParentForChildren(), + isClean()); + indexMetas_ = null; + } + return indexMetasBuilder_; + } + + // optional int64 creation_time = 9; + private long creationTime_ ; + public boolean hasCreationTime() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + public long getCreationTime() { + return creationTime_; + } + public Builder setCreationTime(long value) { + bitField0_ |= 0x00000080; + creationTime_ = value; + onChanged(); + return this; + } + public Builder clearCreationTime() { + bitField0_ = (bitField0_ & ~0x00000080); + creationTime_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.DescribeTableResponse) + } + + static { + defaultInstance = new DescribeTableResponse(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.DescribeTableResponse) + } + + public interface ListTableRequestOrBuilder + extends com.google.protobuf.MessageOrBuilder { + } + public static final class ListTableRequest extends + com.google.protobuf.GeneratedMessage + implements ListTableRequestOrBuilder { + // Use ListTableRequest.newBuilder() to construct. + private ListTableRequest(Builder builder) { + super(builder); + } + private ListTableRequest(boolean noInit) {} + + private static final ListTableRequest defaultInstance; + public static ListTableRequest getDefaultInstance() { + return defaultInstance; + } + + public ListTableRequest getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListTableRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListTableRequest_fieldAccessorTable; + } + + private void initFields() { + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListTableRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListTableRequest_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest(this); + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + } + } + } + + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.ListTableRequest) + } + + static { + defaultInstance = new ListTableRequest(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.ListTableRequest) + } + + public interface ListTableResponseOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // repeated string table_names = 1; + java.util.List getTableNamesList(); + int getTableNamesCount(); + String getTableNames(int index); + } + public static final class ListTableResponse extends + com.google.protobuf.GeneratedMessage + implements ListTableResponseOrBuilder { + // Use ListTableResponse.newBuilder() to construct. + private ListTableResponse(Builder builder) { + super(builder); + } + private ListTableResponse(boolean noInit) {} + + private static final ListTableResponse defaultInstance; + public static ListTableResponse getDefaultInstance() { + return defaultInstance; + } + + public ListTableResponse getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListTableResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListTableResponse_fieldAccessorTable; + } + + // repeated string table_names = 1; + public static final int TABLE_NAMES_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList tableNames_; + public java.util.List + getTableNamesList() { + return tableNames_; + } + public int getTableNamesCount() { + return tableNames_.size(); + } + public String getTableNames(int index) { + return tableNames_.get(index); + } + + private void initFields() { + tableNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < tableNames_.size(); i++) { + output.writeBytes(1, tableNames_.getByteString(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < tableNames_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(tableNames_.getByteString(i)); + } + size += dataSize; + size += 1 * getTableNamesList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListTableResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListTableResponse_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + tableNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + tableNames_ = new com.google.protobuf.UnmodifiableLazyStringList( + tableNames_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.tableNames_ = tableNames_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse.getDefaultInstance()) return this; + if (!other.tableNames_.isEmpty()) { + if (tableNames_.isEmpty()) { + tableNames_ = other.tableNames_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTableNamesIsMutable(); + tableNames_.addAll(other.tableNames_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + ensureTableNamesIsMutable(); + tableNames_.add(input.readBytes()); + break; + } + } + } + } + + private int bitField0_; + + // repeated string table_names = 1; + private com.google.protobuf.LazyStringList tableNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureTableNamesIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + tableNames_ = new com.google.protobuf.LazyStringArrayList(tableNames_); + bitField0_ |= 0x00000001; + } + } + public java.util.List + getTableNamesList() { + return java.util.Collections.unmodifiableList(tableNames_); + } + public int getTableNamesCount() { + return tableNames_.size(); + } + public String getTableNames(int index) { + return tableNames_.get(index); + } + public Builder setTableNames( + int index, String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTableNamesIsMutable(); + tableNames_.set(index, value); + onChanged(); + return this; + } + public Builder addTableNames(String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTableNamesIsMutable(); + tableNames_.add(value); + onChanged(); + return this; + } + public Builder addAllTableNames( + java.lang.Iterable values) { + ensureTableNamesIsMutable(); + super.addAll(values, tableNames_); + onChanged(); + return this; + } + public Builder clearTableNames() { + tableNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + void addTableNames(com.google.protobuf.ByteString value) { + ensureTableNamesIsMutable(); + tableNames_.add(value); + onChanged(); + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.ListTableResponse) + } + + static { + defaultInstance = new ListTableResponse(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.ListTableResponse) + } + + public interface DeleteTableRequestOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string table_name = 1; + boolean hasTableName(); + String getTableName(); + } + public static final class DeleteTableRequest extends + com.google.protobuf.GeneratedMessage + implements DeleteTableRequestOrBuilder { + // Use DeleteTableRequest.newBuilder() to construct. + private DeleteTableRequest(Builder builder) { + super(builder); + } + private DeleteTableRequest(boolean noInit) {} + + private static final DeleteTableRequest defaultInstance; + public static DeleteTableRequest getDefaultInstance() { + return defaultInstance; + } + + public DeleteTableRequest getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteTableRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteTableRequest_fieldAccessorTable; + } + + private int bitField0_; + // required string table_name = 1; + public static final int TABLE_NAME_FIELD_NUMBER = 1; + private java.lang.Object tableName_; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + tableName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + tableName_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasTableName()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getTableNameBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getTableNameBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteTableRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteTableRequest_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + tableName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.tableName_ = tableName_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest.getDefaultInstance()) return this; + if (other.hasTableName()) { + setTableName(other.getTableName()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasTableName()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + tableName_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // required string table_name = 1; + private java.lang.Object tableName_ = ""; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + tableName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setTableName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + return this; + } + public Builder clearTableName() { + bitField0_ = (bitField0_ & ~0x00000001); + tableName_ = getDefaultInstance().getTableName(); + onChanged(); + return this; + } + void setTableName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.DeleteTableRequest) + } + + static { + defaultInstance = new DeleteTableRequest(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.DeleteTableRequest) + } + + public interface DeleteTableResponseOrBuilder + extends com.google.protobuf.MessageOrBuilder { + } + public static final class DeleteTableResponse extends + com.google.protobuf.GeneratedMessage + implements DeleteTableResponseOrBuilder { + // Use DeleteTableResponse.newBuilder() to construct. + private DeleteTableResponse(Builder builder) { + super(builder); + } + private DeleteTableResponse(boolean noInit) {} + + private static final DeleteTableResponse defaultInstance; + public static DeleteTableResponse getDefaultInstance() { + return defaultInstance; + } + + public DeleteTableResponse getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteTableResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteTableResponse_fieldAccessorTable; + } + + private void initFields() { + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteTableResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteTableResponse_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse(this); + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + } + } + } + + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.DeleteTableResponse) + } + + static { + defaultInstance = new DeleteTableResponse(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.DeleteTableResponse) + } + + public interface LoadTableRequestOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string table_name = 1; + boolean hasTableName(); + String getTableName(); + } + public static final class LoadTableRequest extends + com.google.protobuf.GeneratedMessage + implements LoadTableRequestOrBuilder { + // Use LoadTableRequest.newBuilder() to construct. + private LoadTableRequest(Builder builder) { + super(builder); + } + private LoadTableRequest(boolean noInit) {} + + private static final LoadTableRequest defaultInstance; + public static LoadTableRequest getDefaultInstance() { + return defaultInstance; + } + + public LoadTableRequest getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_LoadTableRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_LoadTableRequest_fieldAccessorTable; + } + + private int bitField0_; + // required string table_name = 1; + public static final int TABLE_NAME_FIELD_NUMBER = 1; + private java.lang.Object tableName_; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + tableName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + tableName_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasTableName()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getTableNameBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getTableNameBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_LoadTableRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_LoadTableRequest_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + tableName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.tableName_ = tableName_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest.getDefaultInstance()) return this; + if (other.hasTableName()) { + setTableName(other.getTableName()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasTableName()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + tableName_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // required string table_name = 1; + private java.lang.Object tableName_ = ""; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + tableName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setTableName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + return this; + } + public Builder clearTableName() { + bitField0_ = (bitField0_ & ~0x00000001); + tableName_ = getDefaultInstance().getTableName(); + onChanged(); + return this; + } + void setTableName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.LoadTableRequest) + } + + static { + defaultInstance = new LoadTableRequest(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.LoadTableRequest) + } + + public interface LoadTableResponseOrBuilder + extends com.google.protobuf.MessageOrBuilder { + } + public static final class LoadTableResponse extends + com.google.protobuf.GeneratedMessage + implements LoadTableResponseOrBuilder { + // Use LoadTableResponse.newBuilder() to construct. + private LoadTableResponse(Builder builder) { + super(builder); + } + private LoadTableResponse(boolean noInit) {} + + private static final LoadTableResponse defaultInstance; + public static LoadTableResponse getDefaultInstance() { + return defaultInstance; + } + + public LoadTableResponse getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_LoadTableResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_LoadTableResponse_fieldAccessorTable; + } + + private void initFields() { + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_LoadTableResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_LoadTableResponse_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse(this); + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + } + } + } + + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.LoadTableResponse) + } + + static { + defaultInstance = new LoadTableResponse(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.LoadTableResponse) + } + + public interface UnloadTableRequestOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string table_name = 1; + boolean hasTableName(); + String getTableName(); + } + public static final class UnloadTableRequest extends + com.google.protobuf.GeneratedMessage + implements UnloadTableRequestOrBuilder { + // Use UnloadTableRequest.newBuilder() to construct. + private UnloadTableRequest(Builder builder) { + super(builder); + } + private UnloadTableRequest(boolean noInit) {} + + private static final UnloadTableRequest defaultInstance; + public static UnloadTableRequest getDefaultInstance() { + return defaultInstance; + } + + public UnloadTableRequest getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UnloadTableRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UnloadTableRequest_fieldAccessorTable; + } + + private int bitField0_; + // required string table_name = 1; + public static final int TABLE_NAME_FIELD_NUMBER = 1; + private java.lang.Object tableName_; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + tableName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + tableName_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasTableName()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getTableNameBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getTableNameBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UnloadTableRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UnloadTableRequest_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + tableName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.tableName_ = tableName_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest.getDefaultInstance()) return this; + if (other.hasTableName()) { + setTableName(other.getTableName()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasTableName()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + tableName_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // required string table_name = 1; + private java.lang.Object tableName_ = ""; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + tableName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setTableName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + return this; + } + public Builder clearTableName() { + bitField0_ = (bitField0_ & ~0x00000001); + tableName_ = getDefaultInstance().getTableName(); + onChanged(); + return this; + } + void setTableName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.UnloadTableRequest) + } + + static { + defaultInstance = new UnloadTableRequest(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.UnloadTableRequest) + } + + public interface UnloadTableResponseOrBuilder + extends com.google.protobuf.MessageOrBuilder { + } + public static final class UnloadTableResponse extends + com.google.protobuf.GeneratedMessage + implements UnloadTableResponseOrBuilder { + // Use UnloadTableResponse.newBuilder() to construct. + private UnloadTableResponse(Builder builder) { + super(builder); + } + private UnloadTableResponse(boolean noInit) {} + + private static final UnloadTableResponse defaultInstance; + public static UnloadTableResponse getDefaultInstance() { + return defaultInstance; + } + + public UnloadTableResponse getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UnloadTableResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UnloadTableResponse_fieldAccessorTable; + } + + private void initFields() { + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UnloadTableResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UnloadTableResponse_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse(this); + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + } + } + } + + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.UnloadTableResponse) + } + + static { + defaultInstance = new UnloadTableResponse(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.UnloadTableResponse) + } + + public interface TimeRangeOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional int64 start_time = 1; + boolean hasStartTime(); + long getStartTime(); + + // optional int64 end_time = 2; + boolean hasEndTime(); + long getEndTime(); + + // optional int64 specific_time = 3; + boolean hasSpecificTime(); + long getSpecificTime(); + } + public static final class TimeRange extends + com.google.protobuf.GeneratedMessage + implements TimeRangeOrBuilder { + // Use TimeRange.newBuilder() to construct. + private TimeRange(Builder builder) { + super(builder); + } + private TimeRange(boolean noInit) {} + + private static final TimeRange defaultInstance; + public static TimeRange getDefaultInstance() { + return defaultInstance; + } + + public TimeRange getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TimeRange_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TimeRange_fieldAccessorTable; + } + + private int bitField0_; + // optional int64 start_time = 1; + public static final int START_TIME_FIELD_NUMBER = 1; + private long startTime_; + public boolean hasStartTime() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public long getStartTime() { + return startTime_; + } + + // optional int64 end_time = 2; + public static final int END_TIME_FIELD_NUMBER = 2; + private long endTime_; + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public long getEndTime() { + return endTime_; + } + + // optional int64 specific_time = 3; + public static final int SPECIFIC_TIME_FIELD_NUMBER = 3; + private long specificTime_; + public boolean hasSpecificTime() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public long getSpecificTime() { + return specificTime_; + } + + private void initFields() { + startTime_ = 0L; + endTime_ = 0L; + specificTime_ = 0L; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeInt64(1, startTime_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeInt64(2, endTime_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeInt64(3, specificTime_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, startTime_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, endTime_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, specificTime_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRangeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TimeRange_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TimeRange_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + startTime_ = 0L; + bitField0_ = (bitField0_ & ~0x00000001); + endTime_ = 0L; + bitField0_ = (bitField0_ & ~0x00000002); + specificTime_ = 0L; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.startTime_ = startTime_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.endTime_ = endTime_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.specificTime_ = specificTime_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.getDefaultInstance()) return this; + if (other.hasStartTime()) { + setStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + setEndTime(other.getEndTime()); + } + if (other.hasSpecificTime()) { + setSpecificTime(other.getSpecificTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + startTime_ = input.readInt64(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + endTime_ = input.readInt64(); + break; + } + case 24: { + bitField0_ |= 0x00000004; + specificTime_ = input.readInt64(); + break; + } + } + } + } + + private int bitField0_; + + // optional int64 start_time = 1; + private long startTime_ ; + public boolean hasStartTime() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public long getStartTime() { + return startTime_; + } + public Builder setStartTime(long value) { + bitField0_ |= 0x00000001; + startTime_ = value; + onChanged(); + return this; + } + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000001); + startTime_ = 0L; + onChanged(); + return this; + } + + // optional int64 end_time = 2; + private long endTime_ ; + public boolean hasEndTime() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public long getEndTime() { + return endTime_; + } + public Builder setEndTime(long value) { + bitField0_ |= 0x00000002; + endTime_ = value; + onChanged(); + return this; + } + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000002); + endTime_ = 0L; + onChanged(); + return this; + } + + // optional int64 specific_time = 3; + private long specificTime_ ; + public boolean hasSpecificTime() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public long getSpecificTime() { + return specificTime_; + } + public Builder setSpecificTime(long value) { + bitField0_ |= 0x00000004; + specificTime_ = value; + onChanged(); + return this; + } + public Builder clearSpecificTime() { + bitField0_ = (bitField0_ & ~0x00000004); + specificTime_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.TimeRange) + } + + static { + defaultInstance = new TimeRange(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.TimeRange) + } + + public interface ReturnContentOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional .com.alicloud.openservices.tablestore.core.protocol.ReturnType return_type = 1; + boolean hasReturnType(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnType getReturnType(); + + // repeated string return_column_names = 2; + java.util.List getReturnColumnNamesList(); + int getReturnColumnNamesCount(); + String getReturnColumnNames(int index); + } + public static final class ReturnContent extends + com.google.protobuf.GeneratedMessage + implements ReturnContentOrBuilder { + // Use ReturnContent.newBuilder() to construct. + private ReturnContent(Builder builder) { + super(builder); + } + private ReturnContent(boolean noInit) {} + + private static final ReturnContent defaultInstance; + public static ReturnContent getDefaultInstance() { + return defaultInstance; + } + + public ReturnContent getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ReturnContent_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ReturnContent_fieldAccessorTable; + } + + private int bitField0_; + // optional .com.alicloud.openservices.tablestore.core.protocol.ReturnType return_type = 1; + public static final int RETURN_TYPE_FIELD_NUMBER = 1; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnType returnType_; + public boolean hasReturnType() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnType getReturnType() { + return returnType_; + } + + // repeated string return_column_names = 2; + public static final int RETURN_COLUMN_NAMES_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList returnColumnNames_; + public java.util.List + getReturnColumnNamesList() { + return returnColumnNames_; + } + public int getReturnColumnNamesCount() { + return returnColumnNames_.size(); + } + public String getReturnColumnNames(int index) { + return returnColumnNames_.get(index); + } + + private void initFields() { + returnType_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnType.RT_NONE; + returnColumnNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeEnum(1, returnType_.getNumber()); + } + for (int i = 0; i < returnColumnNames_.size(); i++) { + output.writeBytes(2, returnColumnNames_.getByteString(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, returnType_.getNumber()); + } + { + int dataSize = 0; + for (int i = 0; i < returnColumnNames_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(returnColumnNames_.getByteString(i)); + } + size += dataSize; + size += 1 * getReturnColumnNamesList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ReturnContent_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ReturnContent_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + returnType_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnType.RT_NONE; + bitField0_ = (bitField0_ & ~0x00000001); + returnColumnNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.returnType_ = returnType_; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + returnColumnNames_ = new com.google.protobuf.UnmodifiableLazyStringList( + returnColumnNames_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.returnColumnNames_ = returnColumnNames_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.getDefaultInstance()) return this; + if (other.hasReturnType()) { + setReturnType(other.getReturnType()); + } + if (!other.returnColumnNames_.isEmpty()) { + if (returnColumnNames_.isEmpty()) { + returnColumnNames_ = other.returnColumnNames_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureReturnColumnNamesIsMutable(); + returnColumnNames_.addAll(other.returnColumnNames_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnType value = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + returnType_ = value; + } + break; + } + case 18: { + ensureReturnColumnNamesIsMutable(); + returnColumnNames_.add(input.readBytes()); + break; + } + } + } + } + + private int bitField0_; + + // optional .com.alicloud.openservices.tablestore.core.protocol.ReturnType return_type = 1; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnType returnType_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnType.RT_NONE; + public boolean hasReturnType() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnType getReturnType() { + return returnType_; + } + public Builder setReturnType(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + returnType_ = value; + onChanged(); + return this; + } + public Builder clearReturnType() { + bitField0_ = (bitField0_ & ~0x00000001); + returnType_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnType.RT_NONE; + onChanged(); + return this; + } + + // repeated string return_column_names = 2; + private com.google.protobuf.LazyStringList returnColumnNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureReturnColumnNamesIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + returnColumnNames_ = new com.google.protobuf.LazyStringArrayList(returnColumnNames_); + bitField0_ |= 0x00000002; + } + } + public java.util.List + getReturnColumnNamesList() { + return java.util.Collections.unmodifiableList(returnColumnNames_); + } + public int getReturnColumnNamesCount() { + return returnColumnNames_.size(); + } + public String getReturnColumnNames(int index) { + return returnColumnNames_.get(index); + } + public Builder setReturnColumnNames( + int index, String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureReturnColumnNamesIsMutable(); + returnColumnNames_.set(index, value); + onChanged(); + return this; + } + public Builder addReturnColumnNames(String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureReturnColumnNamesIsMutable(); + returnColumnNames_.add(value); + onChanged(); + return this; + } + public Builder addAllReturnColumnNames( + java.lang.Iterable values) { + ensureReturnColumnNamesIsMutable(); + super.addAll(values, returnColumnNames_); + onChanged(); + return this; + } + public Builder clearReturnColumnNames() { + returnColumnNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + void addReturnColumnNames(com.google.protobuf.ByteString value) { + ensureReturnColumnNamesIsMutable(); + returnColumnNames_.add(value); + onChanged(); + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.ReturnContent) + } + + static { + defaultInstance = new ReturnContent(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.ReturnContent) + } + + public interface GetRowRequestOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string table_name = 1; + boolean hasTableName(); + String getTableName(); + + // required bytes primary_key = 2; + boolean hasPrimaryKey(); + com.google.protobuf.ByteString getPrimaryKey(); + + // repeated string columns_to_get = 3; + java.util.List getColumnsToGetList(); + int getColumnsToGetCount(); + String getColumnsToGet(int index); + + // optional .com.alicloud.openservices.tablestore.core.protocol.TimeRange time_range = 4; + boolean hasTimeRange(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange getTimeRange(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRangeOrBuilder getTimeRangeOrBuilder(); + + // optional int32 max_versions = 5; + boolean hasMaxVersions(); + int getMaxVersions(); + + // optional bytes filter = 7; + boolean hasFilter(); + com.google.protobuf.ByteString getFilter(); + + // optional string start_column = 8; + boolean hasStartColumn(); + String getStartColumn(); + + // optional string end_column = 9; + boolean hasEndColumn(); + String getEndColumn(); + + // optional bytes token = 10; + boolean hasToken(); + com.google.protobuf.ByteString getToken(); + + // optional string transaction_id = 11; + boolean hasTransactionId(); + String getTransactionId(); + } + public static final class GetRowRequest extends + com.google.protobuf.GeneratedMessage + implements GetRowRequestOrBuilder { + // Use GetRowRequest.newBuilder() to construct. + private GetRowRequest(Builder builder) { + super(builder); + } + private GetRowRequest(boolean noInit) {} + + private static final GetRowRequest defaultInstance; + public static GetRowRequest getDefaultInstance() { + return defaultInstance; + } + + public GetRowRequest getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetRowRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetRowRequest_fieldAccessorTable; + } + + private int bitField0_; + // required string table_name = 1; + public static final int TABLE_NAME_FIELD_NUMBER = 1; + private java.lang.Object tableName_; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + tableName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // required bytes primary_key = 2; + public static final int PRIMARY_KEY_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString primaryKey_; + public boolean hasPrimaryKey() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getPrimaryKey() { + return primaryKey_; + } + + // repeated string columns_to_get = 3; + public static final int COLUMNS_TO_GET_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList columnsToGet_; + public java.util.List + getColumnsToGetList() { + return columnsToGet_; + } + public int getColumnsToGetCount() { + return columnsToGet_.size(); + } + public String getColumnsToGet(int index) { + return columnsToGet_.get(index); + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.TimeRange time_range = 4; + public static final int TIME_RANGE_FIELD_NUMBER = 4; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange timeRange_; + public boolean hasTimeRange() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange getTimeRange() { + return timeRange_; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRangeOrBuilder getTimeRangeOrBuilder() { + return timeRange_; + } + + // optional int32 max_versions = 5; + public static final int MAX_VERSIONS_FIELD_NUMBER = 5; + private int maxVersions_; + public boolean hasMaxVersions() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public int getMaxVersions() { + return maxVersions_; + } + + // optional bytes filter = 7; + public static final int FILTER_FIELD_NUMBER = 7; + private com.google.protobuf.ByteString filter_; + public boolean hasFilter() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public com.google.protobuf.ByteString getFilter() { + return filter_; + } + + // optional string start_column = 8; + public static final int START_COLUMN_FIELD_NUMBER = 8; + private java.lang.Object startColumn_; + public boolean hasStartColumn() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + public String getStartColumn() { + java.lang.Object ref = startColumn_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + startColumn_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getStartColumnBytes() { + java.lang.Object ref = startColumn_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + startColumn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional string end_column = 9; + public static final int END_COLUMN_FIELD_NUMBER = 9; + private java.lang.Object endColumn_; + public boolean hasEndColumn() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + public String getEndColumn() { + java.lang.Object ref = endColumn_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + endColumn_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getEndColumnBytes() { + java.lang.Object ref = endColumn_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + endColumn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional bytes token = 10; + public static final int TOKEN_FIELD_NUMBER = 10; + private com.google.protobuf.ByteString token_; + public boolean hasToken() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + public com.google.protobuf.ByteString getToken() { + return token_; + } + + // optional string transaction_id = 11; + public static final int TRANSACTION_ID_FIELD_NUMBER = 11; + private java.lang.Object transactionId_; + public boolean hasTransactionId() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + public String getTransactionId() { + java.lang.Object ref = transactionId_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + transactionId_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTransactionIdBytes() { + java.lang.Object ref = transactionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + transactionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + tableName_ = ""; + primaryKey_ = com.google.protobuf.ByteString.EMPTY; + columnsToGet_ = com.google.protobuf.LazyStringArrayList.EMPTY; + timeRange_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.getDefaultInstance(); + maxVersions_ = 0; + filter_ = com.google.protobuf.ByteString.EMPTY; + startColumn_ = ""; + endColumn_ = ""; + token_ = com.google.protobuf.ByteString.EMPTY; + transactionId_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasTableName()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasPrimaryKey()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, primaryKey_); + } + for (int i = 0; i < columnsToGet_.size(); i++) { + output.writeBytes(3, columnsToGet_.getByteString(i)); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeMessage(4, timeRange_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeInt32(5, maxVersions_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeBytes(7, filter_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeBytes(8, getStartColumnBytes()); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + output.writeBytes(9, getEndColumnBytes()); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + output.writeBytes(10, token_); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + output.writeBytes(11, getTransactionIdBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, primaryKey_); + } + { + int dataSize = 0; + for (int i = 0; i < columnsToGet_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(columnsToGet_.getByteString(i)); + } + size += dataSize; + size += 1 * getColumnsToGetList().size(); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, timeRange_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(5, maxVersions_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(7, filter_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(8, getStartColumnBytes()); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(9, getEndColumnBytes()); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(10, token_); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(11, getTransactionIdBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetRowRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetRowRequest_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getTimeRangeFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + tableName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + primaryKey_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + columnsToGet_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + if (timeRangeBuilder_ == null) { + timeRange_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.getDefaultInstance(); + } else { + timeRangeBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + maxVersions_ = 0; + bitField0_ = (bitField0_ & ~0x00000010); + filter_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000020); + startColumn_ = ""; + bitField0_ = (bitField0_ & ~0x00000040); + endColumn_ = ""; + bitField0_ = (bitField0_ & ~0x00000080); + token_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000100); + transactionId_ = ""; + bitField0_ = (bitField0_ & ~0x00000200); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.tableName_ = tableName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.primaryKey_ = primaryKey_; + if (((bitField0_ & 0x00000004) == 0x00000004)) { + columnsToGet_ = new com.google.protobuf.UnmodifiableLazyStringList( + columnsToGet_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.columnsToGet_ = columnsToGet_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000004; + } + if (timeRangeBuilder_ == null) { + result.timeRange_ = timeRange_; + } else { + result.timeRange_ = timeRangeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000008; + } + result.maxVersions_ = maxVersions_; + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000010; + } + result.filter_ = filter_; + if (((from_bitField0_ & 0x00000040) == 0x00000040)) { + to_bitField0_ |= 0x00000020; + } + result.startColumn_ = startColumn_; + if (((from_bitField0_ & 0x00000080) == 0x00000080)) { + to_bitField0_ |= 0x00000040; + } + result.endColumn_ = endColumn_; + if (((from_bitField0_ & 0x00000100) == 0x00000100)) { + to_bitField0_ |= 0x00000080; + } + result.token_ = token_; + if (((from_bitField0_ & 0x00000200) == 0x00000200)) { + to_bitField0_ |= 0x00000100; + } + result.transactionId_ = transactionId_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest.getDefaultInstance()) return this; + if (other.hasTableName()) { + setTableName(other.getTableName()); + } + if (other.hasPrimaryKey()) { + setPrimaryKey(other.getPrimaryKey()); + } + if (!other.columnsToGet_.isEmpty()) { + if (columnsToGet_.isEmpty()) { + columnsToGet_ = other.columnsToGet_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureColumnsToGetIsMutable(); + columnsToGet_.addAll(other.columnsToGet_); + } + onChanged(); + } + if (other.hasTimeRange()) { + mergeTimeRange(other.getTimeRange()); + } + if (other.hasMaxVersions()) { + setMaxVersions(other.getMaxVersions()); + } + if (other.hasFilter()) { + setFilter(other.getFilter()); + } + if (other.hasStartColumn()) { + setStartColumn(other.getStartColumn()); + } + if (other.hasEndColumn()) { + setEndColumn(other.getEndColumn()); + } + if (other.hasToken()) { + setToken(other.getToken()); + } + if (other.hasTransactionId()) { + setTransactionId(other.getTransactionId()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasTableName()) { + + return false; + } + if (!hasPrimaryKey()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + tableName_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + primaryKey_ = input.readBytes(); + break; + } + case 26: { + ensureColumnsToGetIsMutable(); + columnsToGet_.add(input.readBytes()); + break; + } + case 34: { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.newBuilder(); + if (hasTimeRange()) { + subBuilder.mergeFrom(getTimeRange()); + } + input.readMessage(subBuilder, extensionRegistry); + setTimeRange(subBuilder.buildPartial()); + break; + } + case 40: { + bitField0_ |= 0x00000010; + maxVersions_ = input.readInt32(); + break; + } + case 58: { + bitField0_ |= 0x00000020; + filter_ = input.readBytes(); + break; + } + case 66: { + bitField0_ |= 0x00000040; + startColumn_ = input.readBytes(); + break; + } + case 74: { + bitField0_ |= 0x00000080; + endColumn_ = input.readBytes(); + break; + } + case 82: { + bitField0_ |= 0x00000100; + token_ = input.readBytes(); + break; + } + case 90: { + bitField0_ |= 0x00000200; + transactionId_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // required string table_name = 1; + private java.lang.Object tableName_ = ""; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + tableName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setTableName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + return this; + } + public Builder clearTableName() { + bitField0_ = (bitField0_ & ~0x00000001); + tableName_ = getDefaultInstance().getTableName(); + onChanged(); + return this; + } + void setTableName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + } + + // required bytes primary_key = 2; + private com.google.protobuf.ByteString primaryKey_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasPrimaryKey() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getPrimaryKey() { + return primaryKey_; + } + public Builder setPrimaryKey(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + primaryKey_ = value; + onChanged(); + return this; + } + public Builder clearPrimaryKey() { + bitField0_ = (bitField0_ & ~0x00000002); + primaryKey_ = getDefaultInstance().getPrimaryKey(); + onChanged(); + return this; + } + + // repeated string columns_to_get = 3; + private com.google.protobuf.LazyStringList columnsToGet_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureColumnsToGetIsMutable() { + if (!((bitField0_ & 0x00000004) == 0x00000004)) { + columnsToGet_ = new com.google.protobuf.LazyStringArrayList(columnsToGet_); + bitField0_ |= 0x00000004; + } + } + public java.util.List + getColumnsToGetList() { + return java.util.Collections.unmodifiableList(columnsToGet_); + } + public int getColumnsToGetCount() { + return columnsToGet_.size(); + } + public String getColumnsToGet(int index) { + return columnsToGet_.get(index); + } + public Builder setColumnsToGet( + int index, String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureColumnsToGetIsMutable(); + columnsToGet_.set(index, value); + onChanged(); + return this; + } + public Builder addColumnsToGet(String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureColumnsToGetIsMutable(); + columnsToGet_.add(value); + onChanged(); + return this; + } + public Builder addAllColumnsToGet( + java.lang.Iterable values) { + ensureColumnsToGetIsMutable(); + super.addAll(values, columnsToGet_); + onChanged(); + return this; + } + public Builder clearColumnsToGet() { + columnsToGet_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + void addColumnsToGet(com.google.protobuf.ByteString value) { + ensureColumnsToGetIsMutable(); + columnsToGet_.add(value); + onChanged(); + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.TimeRange time_range = 4; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange timeRange_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRangeOrBuilder> timeRangeBuilder_; + public boolean hasTimeRange() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange getTimeRange() { + if (timeRangeBuilder_ == null) { + return timeRange_; + } else { + return timeRangeBuilder_.getMessage(); + } + } + public Builder setTimeRange(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange value) { + if (timeRangeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timeRange_ = value; + onChanged(); + } else { + timeRangeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder setTimeRange( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.Builder builderForValue) { + if (timeRangeBuilder_ == null) { + timeRange_ = builderForValue.build(); + onChanged(); + } else { + timeRangeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder mergeTimeRange(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange value) { + if (timeRangeBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008) && + timeRange_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.getDefaultInstance()) { + timeRange_ = + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.newBuilder(timeRange_).mergeFrom(value).buildPartial(); + } else { + timeRange_ = value; + } + onChanged(); + } else { + timeRangeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder clearTimeRange() { + if (timeRangeBuilder_ == null) { + timeRange_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.getDefaultInstance(); + onChanged(); + } else { + timeRangeBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.Builder getTimeRangeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getTimeRangeFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRangeOrBuilder getTimeRangeOrBuilder() { + if (timeRangeBuilder_ != null) { + return timeRangeBuilder_.getMessageOrBuilder(); + } else { + return timeRange_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRangeOrBuilder> + getTimeRangeFieldBuilder() { + if (timeRangeBuilder_ == null) { + timeRangeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRangeOrBuilder>( + timeRange_, + getParentForChildren(), + isClean()); + timeRange_ = null; + } + return timeRangeBuilder_; + } + + // optional int32 max_versions = 5; + private int maxVersions_ ; + public boolean hasMaxVersions() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public int getMaxVersions() { + return maxVersions_; + } + public Builder setMaxVersions(int value) { + bitField0_ |= 0x00000010; + maxVersions_ = value; + onChanged(); + return this; + } + public Builder clearMaxVersions() { + bitField0_ = (bitField0_ & ~0x00000010); + maxVersions_ = 0; + onChanged(); + return this; + } + + // optional bytes filter = 7; + private com.google.protobuf.ByteString filter_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasFilter() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + public com.google.protobuf.ByteString getFilter() { + return filter_; + } + public Builder setFilter(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + filter_ = value; + onChanged(); + return this; + } + public Builder clearFilter() { + bitField0_ = (bitField0_ & ~0x00000020); + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + + // optional string start_column = 8; + private java.lang.Object startColumn_ = ""; + public boolean hasStartColumn() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + public String getStartColumn() { + java.lang.Object ref = startColumn_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + startColumn_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setStartColumn(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + startColumn_ = value; + onChanged(); + return this; + } + public Builder clearStartColumn() { + bitField0_ = (bitField0_ & ~0x00000040); + startColumn_ = getDefaultInstance().getStartColumn(); + onChanged(); + return this; + } + void setStartColumn(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000040; + startColumn_ = value; + onChanged(); + } + + // optional string end_column = 9; + private java.lang.Object endColumn_ = ""; + public boolean hasEndColumn() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + public String getEndColumn() { + java.lang.Object ref = endColumn_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + endColumn_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setEndColumn(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000080; + endColumn_ = value; + onChanged(); + return this; + } + public Builder clearEndColumn() { + bitField0_ = (bitField0_ & ~0x00000080); + endColumn_ = getDefaultInstance().getEndColumn(); + onChanged(); + return this; + } + void setEndColumn(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000080; + endColumn_ = value; + onChanged(); + } + + // optional bytes token = 10; + private com.google.protobuf.ByteString token_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasToken() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + public com.google.protobuf.ByteString getToken() { + return token_; + } + public Builder setToken(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000100; + token_ = value; + onChanged(); + return this; + } + public Builder clearToken() { + bitField0_ = (bitField0_ & ~0x00000100); + token_ = getDefaultInstance().getToken(); + onChanged(); + return this; + } + + // optional string transaction_id = 11; + private java.lang.Object transactionId_ = ""; + public boolean hasTransactionId() { + return ((bitField0_ & 0x00000200) == 0x00000200); + } + public String getTransactionId() { + java.lang.Object ref = transactionId_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + transactionId_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setTransactionId(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + transactionId_ = value; + onChanged(); + return this; + } + public Builder clearTransactionId() { + bitField0_ = (bitField0_ & ~0x00000200); + transactionId_ = getDefaultInstance().getTransactionId(); + onChanged(); + return this; + } + void setTransactionId(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000200; + transactionId_ = value; + onChanged(); + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GetRowRequest) + } + + static { + defaultInstance = new GetRowRequest(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GetRowRequest) + } + + public interface GetRowResponseOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 1; + boolean hasConsumed(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder(); + + // required bytes row = 2; + boolean hasRow(); + com.google.protobuf.ByteString getRow(); + + // optional bytes next_token = 3; + boolean hasNextToken(); + com.google.protobuf.ByteString getNextToken(); + } + public static final class GetRowResponse extends + com.google.protobuf.GeneratedMessage + implements GetRowResponseOrBuilder { + // Use GetRowResponse.newBuilder() to construct. + private GetRowResponse(Builder builder) { + super(builder); + } + private GetRowResponse(boolean noInit) {} + + private static final GetRowResponse defaultInstance; + public static GetRowResponse getDefaultInstance() { + return defaultInstance; + } + + public GetRowResponse getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetRowResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetRowResponse_fieldAccessorTable; + } + + private int bitField0_; + // required .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 1; + public static final int CONSUMED_FIELD_NUMBER = 1; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity consumed_; + public boolean hasConsumed() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed() { + return consumed_; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder() { + return consumed_; + } + + // required bytes row = 2; + public static final int ROW_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString row_; + public boolean hasRow() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getRow() { + return row_; + } + + // optional bytes next_token = 3; + public static final int NEXT_TOKEN_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString nextToken_; + public boolean hasNextToken() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.google.protobuf.ByteString getNextToken() { + return nextToken_; + } + + private void initFields() { + consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); + row_ = com.google.protobuf.ByteString.EMPTY; + nextToken_ = com.google.protobuf.ByteString.EMPTY; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasConsumed()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasRow()) { + memoizedIsInitialized = 0; + return false; + } + if (!getConsumed().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(1, consumed_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, row_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeBytes(3, nextToken_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, consumed_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, row_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, nextToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetRowResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetRowResponse_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getConsumedFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (consumedBuilder_ == null) { + consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); + } else { + consumedBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + row_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + nextToken_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + if (consumedBuilder_ == null) { + result.consumed_ = consumed_; + } else { + result.consumed_ = consumedBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.row_ = row_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.nextToken_ = nextToken_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse.getDefaultInstance()) return this; + if (other.hasConsumed()) { + mergeConsumed(other.getConsumed()); + } + if (other.hasRow()) { + setRow(other.getRow()); + } + if (other.hasNextToken()) { + setNextToken(other.getNextToken()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasConsumed()) { + + return false; + } + if (!hasRow()) { + + return false; + } + if (!getConsumed().isInitialized()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.newBuilder(); + if (hasConsumed()) { + subBuilder.mergeFrom(getConsumed()); + } + input.readMessage(subBuilder, extensionRegistry); + setConsumed(subBuilder.buildPartial()); + break; + } + case 18: { + bitField0_ |= 0x00000002; + row_ = input.readBytes(); + break; + } + case 26: { + bitField0_ |= 0x00000004; + nextToken_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // required .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 1; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder> consumedBuilder_; + public boolean hasConsumed() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed() { + if (consumedBuilder_ == null) { + return consumed_; + } else { + return consumedBuilder_.getMessage(); + } + } + public Builder setConsumed(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity value) { + if (consumedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + consumed_ = value; + onChanged(); + } else { + consumedBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder setConsumed( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder builderForValue) { + if (consumedBuilder_ == null) { + consumed_ = builderForValue.build(); + onChanged(); + } else { + consumedBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder mergeConsumed(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity value) { + if (consumedBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001) && + consumed_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance()) { + consumed_ = + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.newBuilder(consumed_).mergeFrom(value).buildPartial(); + } else { + consumed_ = value; + } + onChanged(); + } else { + consumedBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder clearConsumed() { + if (consumedBuilder_ == null) { + consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); + onChanged(); + } else { + consumedBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder getConsumedBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getConsumedFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder() { + if (consumedBuilder_ != null) { + return consumedBuilder_.getMessageOrBuilder(); + } else { + return consumed_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder> + getConsumedFieldBuilder() { + if (consumedBuilder_ == null) { + consumedBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder>( + consumed_, + getParentForChildren(), + isClean()); + consumed_ = null; + } + return consumedBuilder_; + } + + // required bytes row = 2; + private com.google.protobuf.ByteString row_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasRow() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getRow() { + return row_; + } + public Builder setRow(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + row_ = value; + onChanged(); + return this; + } + public Builder clearRow() { + bitField0_ = (bitField0_ & ~0x00000002); + row_ = getDefaultInstance().getRow(); + onChanged(); + return this; + } + + // optional bytes next_token = 3; + private com.google.protobuf.ByteString nextToken_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasNextToken() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.google.protobuf.ByteString getNextToken() { + return nextToken_; + } + public Builder setNextToken(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + nextToken_ = value; + onChanged(); + return this; + } + public Builder clearNextToken() { + bitField0_ = (bitField0_ & ~0x00000004); + nextToken_ = getDefaultInstance().getNextToken(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GetRowResponse) + } + + static { + defaultInstance = new GetRowResponse(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GetRowResponse) + } + + public interface UpdateRowRequestOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string table_name = 1; + boolean hasTableName(); + String getTableName(); + + // required bytes row_change = 2; + boolean hasRowChange(); + com.google.protobuf.ByteString getRowChange(); + + // required .com.alicloud.openservices.tablestore.core.protocol.Condition condition = 3; + boolean hasCondition(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition getCondition(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConditionOrBuilder getConditionOrBuilder(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.ReturnContent return_content = 4; + boolean hasReturnContent(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent getReturnContent(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContentOrBuilder getReturnContentOrBuilder(); + + // optional string transaction_id = 5; + boolean hasTransactionId(); + String getTransactionId(); + } + public static final class UpdateRowRequest extends + com.google.protobuf.GeneratedMessage + implements UpdateRowRequestOrBuilder { + // Use UpdateRowRequest.newBuilder() to construct. + private UpdateRowRequest(Builder builder) { + super(builder); + } + private UpdateRowRequest(boolean noInit) {} + + private static final UpdateRowRequest defaultInstance; + public static UpdateRowRequest getDefaultInstance() { + return defaultInstance; + } + + public UpdateRowRequest getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateRowRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateRowRequest_fieldAccessorTable; + } + + private int bitField0_; + // required string table_name = 1; + public static final int TABLE_NAME_FIELD_NUMBER = 1; + private java.lang.Object tableName_; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + tableName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // required bytes row_change = 2; + public static final int ROW_CHANGE_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString rowChange_; + public boolean hasRowChange() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getRowChange() { + return rowChange_; + } + + // required .com.alicloud.openservices.tablestore.core.protocol.Condition condition = 3; + public static final int CONDITION_FIELD_NUMBER = 3; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition condition_; + public boolean hasCondition() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition getCondition() { + return condition_; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConditionOrBuilder getConditionOrBuilder() { + return condition_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.ReturnContent return_content = 4; + public static final int RETURN_CONTENT_FIELD_NUMBER = 4; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent returnContent_; + public boolean hasReturnContent() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent getReturnContent() { + return returnContent_; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContentOrBuilder getReturnContentOrBuilder() { + return returnContent_; + } + + // optional string transaction_id = 5; + public static final int TRANSACTION_ID_FIELD_NUMBER = 5; + private java.lang.Object transactionId_; + public boolean hasTransactionId() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public String getTransactionId() { + java.lang.Object ref = transactionId_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + transactionId_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTransactionIdBytes() { + java.lang.Object ref = transactionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + transactionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + tableName_ = ""; + rowChange_ = com.google.protobuf.ByteString.EMPTY; + condition_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.getDefaultInstance(); + returnContent_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.getDefaultInstance(); + transactionId_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasTableName()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasRowChange()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasCondition()) { + memoizedIsInitialized = 0; + return false; + } + if (!getCondition().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, rowChange_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeMessage(3, condition_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeMessage(4, returnContent_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeBytes(5, getTransactionIdBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, rowChange_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, condition_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, returnContent_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(5, getTransactionIdBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateRowRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateRowRequest_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getConditionFieldBuilder(); + getReturnContentFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + tableName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + rowChange_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + if (conditionBuilder_ == null) { + condition_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.getDefaultInstance(); + } else { + conditionBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + if (returnContentBuilder_ == null) { + returnContent_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.getDefaultInstance(); + } else { + returnContentBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + transactionId_ = ""; + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.tableName_ = tableName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.rowChange_ = rowChange_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + if (conditionBuilder_ == null) { + result.condition_ = condition_; + } else { + result.condition_ = conditionBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + if (returnContentBuilder_ == null) { + result.returnContent_ = returnContent_; + } else { + result.returnContent_ = returnContentBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + result.transactionId_ = transactionId_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest.getDefaultInstance()) return this; + if (other.hasTableName()) { + setTableName(other.getTableName()); + } + if (other.hasRowChange()) { + setRowChange(other.getRowChange()); + } + if (other.hasCondition()) { + mergeCondition(other.getCondition()); + } + if (other.hasReturnContent()) { + mergeReturnContent(other.getReturnContent()); + } + if (other.hasTransactionId()) { + setTransactionId(other.getTransactionId()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasTableName()) { + + return false; + } + if (!hasRowChange()) { + + return false; + } + if (!hasCondition()) { + + return false; + } + if (!getCondition().isInitialized()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + tableName_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + rowChange_ = input.readBytes(); + break; + } + case 26: { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.newBuilder(); + if (hasCondition()) { + subBuilder.mergeFrom(getCondition()); + } + input.readMessage(subBuilder, extensionRegistry); + setCondition(subBuilder.buildPartial()); + break; + } + case 34: { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.newBuilder(); + if (hasReturnContent()) { + subBuilder.mergeFrom(getReturnContent()); + } + input.readMessage(subBuilder, extensionRegistry); + setReturnContent(subBuilder.buildPartial()); + break; + } + case 42: { + bitField0_ |= 0x00000010; + transactionId_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // required string table_name = 1; + private java.lang.Object tableName_ = ""; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + tableName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setTableName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + return this; + } + public Builder clearTableName() { + bitField0_ = (bitField0_ & ~0x00000001); + tableName_ = getDefaultInstance().getTableName(); + onChanged(); + return this; + } + void setTableName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + } + + // required bytes row_change = 2; + private com.google.protobuf.ByteString rowChange_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasRowChange() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getRowChange() { + return rowChange_; + } + public Builder setRowChange(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + rowChange_ = value; + onChanged(); + return this; + } + public Builder clearRowChange() { + bitField0_ = (bitField0_ & ~0x00000002); + rowChange_ = getDefaultInstance().getRowChange(); + onChanged(); + return this; + } + + // required .com.alicloud.openservices.tablestore.core.protocol.Condition condition = 3; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition condition_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConditionOrBuilder> conditionBuilder_; + public boolean hasCondition() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition getCondition() { + if (conditionBuilder_ == null) { + return condition_; + } else { + return conditionBuilder_.getMessage(); + } + } + public Builder setCondition(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition value) { + if (conditionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + condition_ = value; + onChanged(); + } else { + conditionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder setCondition( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.Builder builderForValue) { + if (conditionBuilder_ == null) { + condition_ = builderForValue.build(); + onChanged(); + } else { + conditionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder mergeCondition(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition value) { + if (conditionBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004) && + condition_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.getDefaultInstance()) { + condition_ = + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.newBuilder(condition_).mergeFrom(value).buildPartial(); + } else { + condition_ = value; + } + onChanged(); + } else { + conditionBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder clearCondition() { + if (conditionBuilder_ == null) { + condition_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.getDefaultInstance(); + onChanged(); + } else { + conditionBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.Builder getConditionBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getConditionFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConditionOrBuilder getConditionOrBuilder() { + if (conditionBuilder_ != null) { + return conditionBuilder_.getMessageOrBuilder(); + } else { + return condition_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConditionOrBuilder> + getConditionFieldBuilder() { + if (conditionBuilder_ == null) { + conditionBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConditionOrBuilder>( + condition_, + getParentForChildren(), + isClean()); + condition_ = null; + } + return conditionBuilder_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.ReturnContent return_content = 4; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent returnContent_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContentOrBuilder> returnContentBuilder_; + public boolean hasReturnContent() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent getReturnContent() { + if (returnContentBuilder_ == null) { + return returnContent_; + } else { + return returnContentBuilder_.getMessage(); + } + } + public Builder setReturnContent(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent value) { + if (returnContentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + returnContent_ = value; + onChanged(); + } else { + returnContentBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder setReturnContent( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.Builder builderForValue) { + if (returnContentBuilder_ == null) { + returnContent_ = builderForValue.build(); + onChanged(); + } else { + returnContentBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder mergeReturnContent(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent value) { + if (returnContentBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008) && + returnContent_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.getDefaultInstance()) { + returnContent_ = + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.newBuilder(returnContent_).mergeFrom(value).buildPartial(); + } else { + returnContent_ = value; + } + onChanged(); + } else { + returnContentBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder clearReturnContent() { + if (returnContentBuilder_ == null) { + returnContent_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.getDefaultInstance(); + onChanged(); + } else { + returnContentBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.Builder getReturnContentBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getReturnContentFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContentOrBuilder getReturnContentOrBuilder() { + if (returnContentBuilder_ != null) { + return returnContentBuilder_.getMessageOrBuilder(); + } else { + return returnContent_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContentOrBuilder> + getReturnContentFieldBuilder() { + if (returnContentBuilder_ == null) { + returnContentBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContentOrBuilder>( + returnContent_, + getParentForChildren(), + isClean()); + returnContent_ = null; + } + return returnContentBuilder_; + } + + // optional string transaction_id = 5; + private java.lang.Object transactionId_ = ""; + public boolean hasTransactionId() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public String getTransactionId() { + java.lang.Object ref = transactionId_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + transactionId_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setTransactionId(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + transactionId_ = value; + onChanged(); + return this; + } + public Builder clearTransactionId() { + bitField0_ = (bitField0_ & ~0x00000010); + transactionId_ = getDefaultInstance().getTransactionId(); + onChanged(); + return this; + } + void setTransactionId(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000010; + transactionId_ = value; + onChanged(); + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.UpdateRowRequest) + } + + static { + defaultInstance = new UpdateRowRequest(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.UpdateRowRequest) + } + + public interface UpdateRowResponseOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 1; + boolean hasConsumed(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder(); + + // optional bytes row = 2; + boolean hasRow(); + com.google.protobuf.ByteString getRow(); + } + public static final class UpdateRowResponse extends + com.google.protobuf.GeneratedMessage + implements UpdateRowResponseOrBuilder { + // Use UpdateRowResponse.newBuilder() to construct. + private UpdateRowResponse(Builder builder) { + super(builder); + } + private UpdateRowResponse(boolean noInit) {} + + private static final UpdateRowResponse defaultInstance; + public static UpdateRowResponse getDefaultInstance() { + return defaultInstance; + } + + public UpdateRowResponse getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateRowResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateRowResponse_fieldAccessorTable; + } + + private int bitField0_; + // required .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 1; + public static final int CONSUMED_FIELD_NUMBER = 1; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity consumed_; + public boolean hasConsumed() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed() { + return consumed_; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder() { + return consumed_; + } + + // optional bytes row = 2; + public static final int ROW_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString row_; + public boolean hasRow() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getRow() { + return row_; + } + + private void initFields() { + consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); + row_ = com.google.protobuf.ByteString.EMPTY; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasConsumed()) { + memoizedIsInitialized = 0; + return false; + } + if (!getConsumed().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(1, consumed_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, row_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, consumed_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, row_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateRowResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateRowResponse_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getConsumedFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (consumedBuilder_ == null) { + consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); + } else { + consumedBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + row_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + if (consumedBuilder_ == null) { + result.consumed_ = consumed_; + } else { + result.consumed_ = consumedBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.row_ = row_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse.getDefaultInstance()) return this; + if (other.hasConsumed()) { + mergeConsumed(other.getConsumed()); + } + if (other.hasRow()) { + setRow(other.getRow()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasConsumed()) { + + return false; + } + if (!getConsumed().isInitialized()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.newBuilder(); + if (hasConsumed()) { + subBuilder.mergeFrom(getConsumed()); + } + input.readMessage(subBuilder, extensionRegistry); + setConsumed(subBuilder.buildPartial()); + break; + } + case 18: { + bitField0_ |= 0x00000002; + row_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // required .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 1; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder> consumedBuilder_; + public boolean hasConsumed() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed() { + if (consumedBuilder_ == null) { + return consumed_; + } else { + return consumedBuilder_.getMessage(); + } + } + public Builder setConsumed(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity value) { + if (consumedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + consumed_ = value; + onChanged(); + } else { + consumedBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder setConsumed( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder builderForValue) { + if (consumedBuilder_ == null) { + consumed_ = builderForValue.build(); + onChanged(); + } else { + consumedBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder mergeConsumed(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity value) { + if (consumedBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001) && + consumed_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance()) { + consumed_ = + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.newBuilder(consumed_).mergeFrom(value).buildPartial(); + } else { + consumed_ = value; + } + onChanged(); + } else { + consumedBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder clearConsumed() { + if (consumedBuilder_ == null) { + consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); + onChanged(); + } else { + consumedBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder getConsumedBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getConsumedFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder() { + if (consumedBuilder_ != null) { + return consumedBuilder_.getMessageOrBuilder(); + } else { + return consumed_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder> + getConsumedFieldBuilder() { + if (consumedBuilder_ == null) { + consumedBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder>( + consumed_, + getParentForChildren(), + isClean()); + consumed_ = null; + } + return consumedBuilder_; + } + + // optional bytes row = 2; + private com.google.protobuf.ByteString row_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasRow() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getRow() { + return row_; + } + public Builder setRow(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + row_ = value; + onChanged(); + return this; + } + public Builder clearRow() { + bitField0_ = (bitField0_ & ~0x00000002); + row_ = getDefaultInstance().getRow(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.UpdateRowResponse) + } + + static { + defaultInstance = new UpdateRowResponse(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.UpdateRowResponse) + } + + public interface PutRowRequestOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string table_name = 1; + boolean hasTableName(); + String getTableName(); + + // required bytes row = 2; + boolean hasRow(); + com.google.protobuf.ByteString getRow(); + + // required .com.alicloud.openservices.tablestore.core.protocol.Condition condition = 3; + boolean hasCondition(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition getCondition(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConditionOrBuilder getConditionOrBuilder(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.ReturnContent return_content = 4; + boolean hasReturnContent(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent getReturnContent(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContentOrBuilder getReturnContentOrBuilder(); + + // optional string transaction_id = 5; + boolean hasTransactionId(); + String getTransactionId(); + } + public static final class PutRowRequest extends + com.google.protobuf.GeneratedMessage + implements PutRowRequestOrBuilder { + // Use PutRowRequest.newBuilder() to construct. + private PutRowRequest(Builder builder) { + super(builder); + } + private PutRowRequest(boolean noInit) {} + + private static final PutRowRequest defaultInstance; + public static PutRowRequest getDefaultInstance() { + return defaultInstance; + } + + public PutRowRequest getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_PutRowRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_PutRowRequest_fieldAccessorTable; + } + + private int bitField0_; + // required string table_name = 1; + public static final int TABLE_NAME_FIELD_NUMBER = 1; + private java.lang.Object tableName_; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + tableName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // required bytes row = 2; + public static final int ROW_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString row_; + public boolean hasRow() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getRow() { + return row_; + } + + // required .com.alicloud.openservices.tablestore.core.protocol.Condition condition = 3; + public static final int CONDITION_FIELD_NUMBER = 3; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition condition_; + public boolean hasCondition() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition getCondition() { + return condition_; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConditionOrBuilder getConditionOrBuilder() { + return condition_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.ReturnContent return_content = 4; + public static final int RETURN_CONTENT_FIELD_NUMBER = 4; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent returnContent_; + public boolean hasReturnContent() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent getReturnContent() { + return returnContent_; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContentOrBuilder getReturnContentOrBuilder() { + return returnContent_; + } + + // optional string transaction_id = 5; + public static final int TRANSACTION_ID_FIELD_NUMBER = 5; + private java.lang.Object transactionId_; + public boolean hasTransactionId() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public String getTransactionId() { + java.lang.Object ref = transactionId_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + transactionId_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTransactionIdBytes() { + java.lang.Object ref = transactionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + transactionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + tableName_ = ""; + row_ = com.google.protobuf.ByteString.EMPTY; + condition_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.getDefaultInstance(); + returnContent_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.getDefaultInstance(); + transactionId_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasTableName()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasRow()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasCondition()) { + memoizedIsInitialized = 0; + return false; + } + if (!getCondition().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, row_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeMessage(3, condition_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeMessage(4, returnContent_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeBytes(5, getTransactionIdBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, row_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, condition_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, returnContent_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(5, getTransactionIdBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_PutRowRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_PutRowRequest_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getConditionFieldBuilder(); + getReturnContentFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + tableName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + row_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + if (conditionBuilder_ == null) { + condition_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.getDefaultInstance(); + } else { + conditionBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + if (returnContentBuilder_ == null) { + returnContent_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.getDefaultInstance(); + } else { + returnContentBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + transactionId_ = ""; + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.tableName_ = tableName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.row_ = row_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + if (conditionBuilder_ == null) { + result.condition_ = condition_; + } else { + result.condition_ = conditionBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + if (returnContentBuilder_ == null) { + result.returnContent_ = returnContent_; + } else { + result.returnContent_ = returnContentBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + result.transactionId_ = transactionId_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest.getDefaultInstance()) return this; + if (other.hasTableName()) { + setTableName(other.getTableName()); + } + if (other.hasRow()) { + setRow(other.getRow()); + } + if (other.hasCondition()) { + mergeCondition(other.getCondition()); + } + if (other.hasReturnContent()) { + mergeReturnContent(other.getReturnContent()); + } + if (other.hasTransactionId()) { + setTransactionId(other.getTransactionId()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasTableName()) { + + return false; + } + if (!hasRow()) { + + return false; + } + if (!hasCondition()) { + + return false; + } + if (!getCondition().isInitialized()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + tableName_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + row_ = input.readBytes(); + break; + } + case 26: { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.newBuilder(); + if (hasCondition()) { + subBuilder.mergeFrom(getCondition()); + } + input.readMessage(subBuilder, extensionRegistry); + setCondition(subBuilder.buildPartial()); + break; + } + case 34: { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.newBuilder(); + if (hasReturnContent()) { + subBuilder.mergeFrom(getReturnContent()); + } + input.readMessage(subBuilder, extensionRegistry); + setReturnContent(subBuilder.buildPartial()); + break; + } + case 42: { + bitField0_ |= 0x00000010; + transactionId_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // required string table_name = 1; + private java.lang.Object tableName_ = ""; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + tableName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setTableName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + return this; + } + public Builder clearTableName() { + bitField0_ = (bitField0_ & ~0x00000001); + tableName_ = getDefaultInstance().getTableName(); + onChanged(); + return this; + } + void setTableName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + } + + // required bytes row = 2; + private com.google.protobuf.ByteString row_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasRow() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getRow() { + return row_; + } + public Builder setRow(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + row_ = value; + onChanged(); + return this; + } + public Builder clearRow() { + bitField0_ = (bitField0_ & ~0x00000002); + row_ = getDefaultInstance().getRow(); + onChanged(); + return this; + } + + // required .com.alicloud.openservices.tablestore.core.protocol.Condition condition = 3; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition condition_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConditionOrBuilder> conditionBuilder_; + public boolean hasCondition() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition getCondition() { + if (conditionBuilder_ == null) { + return condition_; + } else { + return conditionBuilder_.getMessage(); + } + } + public Builder setCondition(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition value) { + if (conditionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + condition_ = value; + onChanged(); + } else { + conditionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder setCondition( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.Builder builderForValue) { + if (conditionBuilder_ == null) { + condition_ = builderForValue.build(); + onChanged(); + } else { + conditionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder mergeCondition(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition value) { + if (conditionBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004) && + condition_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.getDefaultInstance()) { + condition_ = + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.newBuilder(condition_).mergeFrom(value).buildPartial(); + } else { + condition_ = value; + } + onChanged(); + } else { + conditionBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder clearCondition() { + if (conditionBuilder_ == null) { + condition_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.getDefaultInstance(); + onChanged(); + } else { + conditionBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.Builder getConditionBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getConditionFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConditionOrBuilder getConditionOrBuilder() { + if (conditionBuilder_ != null) { + return conditionBuilder_.getMessageOrBuilder(); + } else { + return condition_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConditionOrBuilder> + getConditionFieldBuilder() { + if (conditionBuilder_ == null) { + conditionBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConditionOrBuilder>( + condition_, + getParentForChildren(), + isClean()); + condition_ = null; + } + return conditionBuilder_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.ReturnContent return_content = 4; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent returnContent_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContentOrBuilder> returnContentBuilder_; + public boolean hasReturnContent() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent getReturnContent() { + if (returnContentBuilder_ == null) { + return returnContent_; + } else { + return returnContentBuilder_.getMessage(); + } + } + public Builder setReturnContent(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent value) { + if (returnContentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + returnContent_ = value; + onChanged(); + } else { + returnContentBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder setReturnContent( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.Builder builderForValue) { + if (returnContentBuilder_ == null) { + returnContent_ = builderForValue.build(); + onChanged(); + } else { + returnContentBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder mergeReturnContent(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent value) { + if (returnContentBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008) && + returnContent_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.getDefaultInstance()) { + returnContent_ = + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.newBuilder(returnContent_).mergeFrom(value).buildPartial(); + } else { + returnContent_ = value; + } + onChanged(); + } else { + returnContentBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder clearReturnContent() { + if (returnContentBuilder_ == null) { + returnContent_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.getDefaultInstance(); + onChanged(); + } else { + returnContentBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.Builder getReturnContentBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getReturnContentFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContentOrBuilder getReturnContentOrBuilder() { + if (returnContentBuilder_ != null) { + return returnContentBuilder_.getMessageOrBuilder(); + } else { + return returnContent_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContentOrBuilder> + getReturnContentFieldBuilder() { + if (returnContentBuilder_ == null) { + returnContentBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContentOrBuilder>( + returnContent_, + getParentForChildren(), + isClean()); + returnContent_ = null; + } + return returnContentBuilder_; + } + + // optional string transaction_id = 5; + private java.lang.Object transactionId_ = ""; + public boolean hasTransactionId() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public String getTransactionId() { + java.lang.Object ref = transactionId_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + transactionId_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setTransactionId(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + transactionId_ = value; + onChanged(); + return this; + } + public Builder clearTransactionId() { + bitField0_ = (bitField0_ & ~0x00000010); + transactionId_ = getDefaultInstance().getTransactionId(); + onChanged(); + return this; + } + void setTransactionId(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000010; + transactionId_ = value; + onChanged(); + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.PutRowRequest) + } + + static { + defaultInstance = new PutRowRequest(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.PutRowRequest) + } + + public interface PutRowResponseOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 1; + boolean hasConsumed(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder(); + + // optional bytes row = 2; + boolean hasRow(); + com.google.protobuf.ByteString getRow(); + } + public static final class PutRowResponse extends + com.google.protobuf.GeneratedMessage + implements PutRowResponseOrBuilder { + // Use PutRowResponse.newBuilder() to construct. + private PutRowResponse(Builder builder) { + super(builder); + } + private PutRowResponse(boolean noInit) {} + + private static final PutRowResponse defaultInstance; + public static PutRowResponse getDefaultInstance() { + return defaultInstance; + } + + public PutRowResponse getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_PutRowResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_PutRowResponse_fieldAccessorTable; + } + + private int bitField0_; + // required .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 1; + public static final int CONSUMED_FIELD_NUMBER = 1; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity consumed_; + public boolean hasConsumed() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed() { + return consumed_; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder() { + return consumed_; + } + + // optional bytes row = 2; + public static final int ROW_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString row_; + public boolean hasRow() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getRow() { + return row_; + } + + private void initFields() { + consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); + row_ = com.google.protobuf.ByteString.EMPTY; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasConsumed()) { + memoizedIsInitialized = 0; + return false; + } + if (!getConsumed().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(1, consumed_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, row_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, consumed_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, row_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_PutRowResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_PutRowResponse_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getConsumedFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (consumedBuilder_ == null) { + consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); + } else { + consumedBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + row_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + if (consumedBuilder_ == null) { + result.consumed_ = consumed_; + } else { + result.consumed_ = consumedBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.row_ = row_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse.getDefaultInstance()) return this; + if (other.hasConsumed()) { + mergeConsumed(other.getConsumed()); + } + if (other.hasRow()) { + setRow(other.getRow()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasConsumed()) { + + return false; + } + if (!getConsumed().isInitialized()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.newBuilder(); + if (hasConsumed()) { + subBuilder.mergeFrom(getConsumed()); + } + input.readMessage(subBuilder, extensionRegistry); + setConsumed(subBuilder.buildPartial()); + break; + } + case 18: { + bitField0_ |= 0x00000002; + row_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // required .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 1; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder> consumedBuilder_; + public boolean hasConsumed() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed() { + if (consumedBuilder_ == null) { + return consumed_; + } else { + return consumedBuilder_.getMessage(); + } + } + public Builder setConsumed(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity value) { + if (consumedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + consumed_ = value; + onChanged(); + } else { + consumedBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder setConsumed( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder builderForValue) { + if (consumedBuilder_ == null) { + consumed_ = builderForValue.build(); + onChanged(); + } else { + consumedBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder mergeConsumed(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity value) { + if (consumedBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001) && + consumed_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance()) { + consumed_ = + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.newBuilder(consumed_).mergeFrom(value).buildPartial(); + } else { + consumed_ = value; + } + onChanged(); + } else { + consumedBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder clearConsumed() { + if (consumedBuilder_ == null) { + consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); + onChanged(); + } else { + consumedBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder getConsumedBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getConsumedFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder() { + if (consumedBuilder_ != null) { + return consumedBuilder_.getMessageOrBuilder(); + } else { + return consumed_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder> + getConsumedFieldBuilder() { + if (consumedBuilder_ == null) { + consumedBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder>( + consumed_, + getParentForChildren(), + isClean()); + consumed_ = null; + } + return consumedBuilder_; + } + + // optional bytes row = 2; + private com.google.protobuf.ByteString row_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasRow() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getRow() { + return row_; + } + public Builder setRow(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + row_ = value; + onChanged(); + return this; + } + public Builder clearRow() { + bitField0_ = (bitField0_ & ~0x00000002); + row_ = getDefaultInstance().getRow(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.PutRowResponse) + } + + static { + defaultInstance = new PutRowResponse(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.PutRowResponse) + } + + public interface DeleteRowRequestOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string table_name = 1; + boolean hasTableName(); + String getTableName(); + + // required bytes primary_key = 2; + boolean hasPrimaryKey(); + com.google.protobuf.ByteString getPrimaryKey(); + + // required .com.alicloud.openservices.tablestore.core.protocol.Condition condition = 3; + boolean hasCondition(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition getCondition(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConditionOrBuilder getConditionOrBuilder(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.ReturnContent return_content = 4; + boolean hasReturnContent(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent getReturnContent(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContentOrBuilder getReturnContentOrBuilder(); + + // optional string transaction_id = 5; + boolean hasTransactionId(); + String getTransactionId(); + } + public static final class DeleteRowRequest extends + com.google.protobuf.GeneratedMessage + implements DeleteRowRequestOrBuilder { + // Use DeleteRowRequest.newBuilder() to construct. + private DeleteRowRequest(Builder builder) { + super(builder); + } + private DeleteRowRequest(boolean noInit) {} + + private static final DeleteRowRequest defaultInstance; + public static DeleteRowRequest getDefaultInstance() { + return defaultInstance; + } + + public DeleteRowRequest getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteRowRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteRowRequest_fieldAccessorTable; + } + + private int bitField0_; + // required string table_name = 1; + public static final int TABLE_NAME_FIELD_NUMBER = 1; + private java.lang.Object tableName_; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + tableName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // required bytes primary_key = 2; + public static final int PRIMARY_KEY_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString primaryKey_; + public boolean hasPrimaryKey() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getPrimaryKey() { + return primaryKey_; + } + + // required .com.alicloud.openservices.tablestore.core.protocol.Condition condition = 3; + public static final int CONDITION_FIELD_NUMBER = 3; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition condition_; + public boolean hasCondition() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition getCondition() { + return condition_; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConditionOrBuilder getConditionOrBuilder() { + return condition_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.ReturnContent return_content = 4; + public static final int RETURN_CONTENT_FIELD_NUMBER = 4; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent returnContent_; + public boolean hasReturnContent() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent getReturnContent() { + return returnContent_; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContentOrBuilder getReturnContentOrBuilder() { + return returnContent_; + } + + // optional string transaction_id = 5; + public static final int TRANSACTION_ID_FIELD_NUMBER = 5; + private java.lang.Object transactionId_; + public boolean hasTransactionId() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public String getTransactionId() { + java.lang.Object ref = transactionId_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + transactionId_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTransactionIdBytes() { + java.lang.Object ref = transactionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + transactionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + tableName_ = ""; + primaryKey_ = com.google.protobuf.ByteString.EMPTY; + condition_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.getDefaultInstance(); + returnContent_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.getDefaultInstance(); + transactionId_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasTableName()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasPrimaryKey()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasCondition()) { + memoizedIsInitialized = 0; + return false; + } + if (!getCondition().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, primaryKey_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeMessage(3, condition_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeMessage(4, returnContent_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeBytes(5, getTransactionIdBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, primaryKey_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, condition_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, returnContent_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(5, getTransactionIdBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteRowRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteRowRequest_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getConditionFieldBuilder(); + getReturnContentFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + tableName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + primaryKey_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + if (conditionBuilder_ == null) { + condition_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.getDefaultInstance(); + } else { + conditionBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + if (returnContentBuilder_ == null) { + returnContent_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.getDefaultInstance(); + } else { + returnContentBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + transactionId_ = ""; + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.tableName_ = tableName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.primaryKey_ = primaryKey_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + if (conditionBuilder_ == null) { + result.condition_ = condition_; + } else { + result.condition_ = conditionBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + if (returnContentBuilder_ == null) { + result.returnContent_ = returnContent_; + } else { + result.returnContent_ = returnContentBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + result.transactionId_ = transactionId_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest.getDefaultInstance()) return this; + if (other.hasTableName()) { + setTableName(other.getTableName()); + } + if (other.hasPrimaryKey()) { + setPrimaryKey(other.getPrimaryKey()); + } + if (other.hasCondition()) { + mergeCondition(other.getCondition()); + } + if (other.hasReturnContent()) { + mergeReturnContent(other.getReturnContent()); + } + if (other.hasTransactionId()) { + setTransactionId(other.getTransactionId()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasTableName()) { + + return false; + } + if (!hasPrimaryKey()) { + + return false; + } + if (!hasCondition()) { + + return false; + } + if (!getCondition().isInitialized()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + tableName_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + primaryKey_ = input.readBytes(); + break; + } + case 26: { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.newBuilder(); + if (hasCondition()) { + subBuilder.mergeFrom(getCondition()); + } + input.readMessage(subBuilder, extensionRegistry); + setCondition(subBuilder.buildPartial()); + break; + } + case 34: { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.newBuilder(); + if (hasReturnContent()) { + subBuilder.mergeFrom(getReturnContent()); + } + input.readMessage(subBuilder, extensionRegistry); + setReturnContent(subBuilder.buildPartial()); + break; + } + case 42: { + bitField0_ |= 0x00000010; + transactionId_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // required string table_name = 1; + private java.lang.Object tableName_ = ""; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + tableName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setTableName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + return this; + } + public Builder clearTableName() { + bitField0_ = (bitField0_ & ~0x00000001); + tableName_ = getDefaultInstance().getTableName(); + onChanged(); + return this; + } + void setTableName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + } + + // required bytes primary_key = 2; + private com.google.protobuf.ByteString primaryKey_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasPrimaryKey() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getPrimaryKey() { + return primaryKey_; + } + public Builder setPrimaryKey(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + primaryKey_ = value; + onChanged(); + return this; + } + public Builder clearPrimaryKey() { + bitField0_ = (bitField0_ & ~0x00000002); + primaryKey_ = getDefaultInstance().getPrimaryKey(); + onChanged(); + return this; + } + + // required .com.alicloud.openservices.tablestore.core.protocol.Condition condition = 3; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition condition_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConditionOrBuilder> conditionBuilder_; + public boolean hasCondition() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition getCondition() { + if (conditionBuilder_ == null) { + return condition_; + } else { + return conditionBuilder_.getMessage(); + } + } + public Builder setCondition(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition value) { + if (conditionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + condition_ = value; + onChanged(); + } else { + conditionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder setCondition( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.Builder builderForValue) { + if (conditionBuilder_ == null) { + condition_ = builderForValue.build(); + onChanged(); + } else { + conditionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder mergeCondition(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition value) { + if (conditionBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004) && + condition_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.getDefaultInstance()) { + condition_ = + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.newBuilder(condition_).mergeFrom(value).buildPartial(); + } else { + condition_ = value; + } + onChanged(); + } else { + conditionBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder clearCondition() { + if (conditionBuilder_ == null) { + condition_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.getDefaultInstance(); + onChanged(); + } else { + conditionBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.Builder getConditionBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getConditionFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConditionOrBuilder getConditionOrBuilder() { + if (conditionBuilder_ != null) { + return conditionBuilder_.getMessageOrBuilder(); + } else { + return condition_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConditionOrBuilder> + getConditionFieldBuilder() { + if (conditionBuilder_ == null) { + conditionBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConditionOrBuilder>( + condition_, + getParentForChildren(), + isClean()); + condition_ = null; + } + return conditionBuilder_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.ReturnContent return_content = 4; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent returnContent_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContentOrBuilder> returnContentBuilder_; + public boolean hasReturnContent() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent getReturnContent() { + if (returnContentBuilder_ == null) { + return returnContent_; + } else { + return returnContentBuilder_.getMessage(); + } + } + public Builder setReturnContent(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent value) { + if (returnContentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + returnContent_ = value; + onChanged(); + } else { + returnContentBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder setReturnContent( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.Builder builderForValue) { + if (returnContentBuilder_ == null) { + returnContent_ = builderForValue.build(); + onChanged(); + } else { + returnContentBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder mergeReturnContent(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent value) { + if (returnContentBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008) && + returnContent_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.getDefaultInstance()) { + returnContent_ = + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.newBuilder(returnContent_).mergeFrom(value).buildPartial(); + } else { + returnContent_ = value; + } + onChanged(); + } else { + returnContentBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder clearReturnContent() { + if (returnContentBuilder_ == null) { + returnContent_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.getDefaultInstance(); + onChanged(); + } else { + returnContentBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.Builder getReturnContentBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getReturnContentFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContentOrBuilder getReturnContentOrBuilder() { + if (returnContentBuilder_ != null) { + return returnContentBuilder_.getMessageOrBuilder(); + } else { + return returnContent_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContentOrBuilder> + getReturnContentFieldBuilder() { + if (returnContentBuilder_ == null) { + returnContentBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContentOrBuilder>( + returnContent_, + getParentForChildren(), + isClean()); + returnContent_ = null; + } + return returnContentBuilder_; + } + + // optional string transaction_id = 5; + private java.lang.Object transactionId_ = ""; + public boolean hasTransactionId() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public String getTransactionId() { + java.lang.Object ref = transactionId_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + transactionId_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setTransactionId(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + transactionId_ = value; + onChanged(); + return this; + } + public Builder clearTransactionId() { + bitField0_ = (bitField0_ & ~0x00000010); + transactionId_ = getDefaultInstance().getTransactionId(); + onChanged(); + return this; + } + void setTransactionId(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000010; + transactionId_ = value; + onChanged(); + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.DeleteRowRequest) + } + + static { + defaultInstance = new DeleteRowRequest(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.DeleteRowRequest) + } + + public interface DeleteRowResponseOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 1; + boolean hasConsumed(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder(); + + // optional bytes row = 2; + boolean hasRow(); + com.google.protobuf.ByteString getRow(); + } + public static final class DeleteRowResponse extends + com.google.protobuf.GeneratedMessage + implements DeleteRowResponseOrBuilder { + // Use DeleteRowResponse.newBuilder() to construct. + private DeleteRowResponse(Builder builder) { + super(builder); + } + private DeleteRowResponse(boolean noInit) {} + + private static final DeleteRowResponse defaultInstance; + public static DeleteRowResponse getDefaultInstance() { + return defaultInstance; + } + + public DeleteRowResponse getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteRowResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteRowResponse_fieldAccessorTable; + } + + private int bitField0_; + // required .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 1; + public static final int CONSUMED_FIELD_NUMBER = 1; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity consumed_; + public boolean hasConsumed() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed() { + return consumed_; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder() { + return consumed_; + } + + // optional bytes row = 2; + public static final int ROW_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString row_; + public boolean hasRow() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getRow() { + return row_; + } + + private void initFields() { + consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); + row_ = com.google.protobuf.ByteString.EMPTY; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasConsumed()) { + memoizedIsInitialized = 0; + return false; + } + if (!getConsumed().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(1, consumed_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, row_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, consumed_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, row_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteRowResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteRowResponse_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getConsumedFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (consumedBuilder_ == null) { + consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); + } else { + consumedBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + row_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + if (consumedBuilder_ == null) { + result.consumed_ = consumed_; + } else { + result.consumed_ = consumedBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.row_ = row_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse.getDefaultInstance()) return this; + if (other.hasConsumed()) { + mergeConsumed(other.getConsumed()); + } + if (other.hasRow()) { + setRow(other.getRow()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasConsumed()) { + + return false; + } + if (!getConsumed().isInitialized()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.newBuilder(); + if (hasConsumed()) { + subBuilder.mergeFrom(getConsumed()); + } + input.readMessage(subBuilder, extensionRegistry); + setConsumed(subBuilder.buildPartial()); + break; + } + case 18: { + bitField0_ |= 0x00000002; + row_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // required .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 1; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder> consumedBuilder_; + public boolean hasConsumed() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed() { + if (consumedBuilder_ == null) { + return consumed_; + } else { + return consumedBuilder_.getMessage(); + } + } + public Builder setConsumed(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity value) { + if (consumedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + consumed_ = value; + onChanged(); + } else { + consumedBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder setConsumed( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder builderForValue) { + if (consumedBuilder_ == null) { + consumed_ = builderForValue.build(); + onChanged(); + } else { + consumedBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder mergeConsumed(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity value) { + if (consumedBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001) && + consumed_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance()) { + consumed_ = + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.newBuilder(consumed_).mergeFrom(value).buildPartial(); + } else { + consumed_ = value; + } + onChanged(); + } else { + consumedBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder clearConsumed() { + if (consumedBuilder_ == null) { + consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); + onChanged(); + } else { + consumedBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder getConsumedBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getConsumedFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder() { + if (consumedBuilder_ != null) { + return consumedBuilder_.getMessageOrBuilder(); + } else { + return consumed_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder> + getConsumedFieldBuilder() { + if (consumedBuilder_ == null) { + consumedBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder>( + consumed_, + getParentForChildren(), + isClean()); + consumed_ = null; + } + return consumedBuilder_; + } + + // optional bytes row = 2; + private com.google.protobuf.ByteString row_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasRow() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getRow() { + return row_; + } + public Builder setRow(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + row_ = value; + onChanged(); + return this; + } + public Builder clearRow() { + bitField0_ = (bitField0_ & ~0x00000002); + row_ = getDefaultInstance().getRow(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.DeleteRowResponse) + } + + static { + defaultInstance = new DeleteRowResponse(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.DeleteRowResponse) + } + + public interface TableInBatchGetRowRequestOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string table_name = 1; + boolean hasTableName(); + String getTableName(); + + // repeated bytes primary_key = 2; + java.util.List getPrimaryKeyList(); + int getPrimaryKeyCount(); + com.google.protobuf.ByteString getPrimaryKey(int index); + + // repeated bytes token = 3; + java.util.List getTokenList(); + int getTokenCount(); + com.google.protobuf.ByteString getToken(int index); + + // repeated string columns_to_get = 4; + java.util.List getColumnsToGetList(); + int getColumnsToGetCount(); + String getColumnsToGet(int index); + + // optional .com.alicloud.openservices.tablestore.core.protocol.TimeRange time_range = 5; + boolean hasTimeRange(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange getTimeRange(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRangeOrBuilder getTimeRangeOrBuilder(); + + // optional int32 max_versions = 6; + boolean hasMaxVersions(); + int getMaxVersions(); + + // optional bytes filter = 8; + boolean hasFilter(); + com.google.protobuf.ByteString getFilter(); + + // optional string start_column = 9; + boolean hasStartColumn(); + String getStartColumn(); + + // optional string end_column = 10; + boolean hasEndColumn(); + String getEndColumn(); + } + public static final class TableInBatchGetRowRequest extends + com.google.protobuf.GeneratedMessage + implements TableInBatchGetRowRequestOrBuilder { + // Use TableInBatchGetRowRequest.newBuilder() to construct. + private TableInBatchGetRowRequest(Builder builder) { + super(builder); + } + private TableInBatchGetRowRequest(boolean noInit) {} + + private static final TableInBatchGetRowRequest defaultInstance; + public static TableInBatchGetRowRequest getDefaultInstance() { + return defaultInstance; + } + + public TableInBatchGetRowRequest getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TableInBatchGetRowRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TableInBatchGetRowRequest_fieldAccessorTable; + } + + private int bitField0_; + // required string table_name = 1; + public static final int TABLE_NAME_FIELD_NUMBER = 1; + private java.lang.Object tableName_; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + tableName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // repeated bytes primary_key = 2; + public static final int PRIMARY_KEY_FIELD_NUMBER = 2; + private java.util.List primaryKey_; + public java.util.List + getPrimaryKeyList() { + return primaryKey_; + } + public int getPrimaryKeyCount() { + return primaryKey_.size(); + } + public com.google.protobuf.ByteString getPrimaryKey(int index) { + return primaryKey_.get(index); + } + + // repeated bytes token = 3; + public static final int TOKEN_FIELD_NUMBER = 3; + private java.util.List token_; + public java.util.List + getTokenList() { + return token_; + } + public int getTokenCount() { + return token_.size(); + } + public com.google.protobuf.ByteString getToken(int index) { + return token_.get(index); + } + + // repeated string columns_to_get = 4; + public static final int COLUMNS_TO_GET_FIELD_NUMBER = 4; + private com.google.protobuf.LazyStringList columnsToGet_; + public java.util.List + getColumnsToGetList() { + return columnsToGet_; + } + public int getColumnsToGetCount() { + return columnsToGet_.size(); + } + public String getColumnsToGet(int index) { + return columnsToGet_.get(index); + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.TimeRange time_range = 5; + public static final int TIME_RANGE_FIELD_NUMBER = 5; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange timeRange_; + public boolean hasTimeRange() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange getTimeRange() { + return timeRange_; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRangeOrBuilder getTimeRangeOrBuilder() { + return timeRange_; + } + + // optional int32 max_versions = 6; + public static final int MAX_VERSIONS_FIELD_NUMBER = 6; + private int maxVersions_; + public boolean hasMaxVersions() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public int getMaxVersions() { + return maxVersions_; + } + + // optional bytes filter = 8; + public static final int FILTER_FIELD_NUMBER = 8; + private com.google.protobuf.ByteString filter_; + public boolean hasFilter() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.google.protobuf.ByteString getFilter() { + return filter_; + } + + // optional string start_column = 9; + public static final int START_COLUMN_FIELD_NUMBER = 9; + private java.lang.Object startColumn_; + public boolean hasStartColumn() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public String getStartColumn() { + java.lang.Object ref = startColumn_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + startColumn_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getStartColumnBytes() { + java.lang.Object ref = startColumn_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + startColumn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional string end_column = 10; + public static final int END_COLUMN_FIELD_NUMBER = 10; + private java.lang.Object endColumn_; + public boolean hasEndColumn() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + public String getEndColumn() { + java.lang.Object ref = endColumn_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + endColumn_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getEndColumnBytes() { + java.lang.Object ref = endColumn_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + endColumn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + tableName_ = ""; + primaryKey_ = java.util.Collections.emptyList();; + token_ = java.util.Collections.emptyList();; + columnsToGet_ = com.google.protobuf.LazyStringArrayList.EMPTY; + timeRange_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.getDefaultInstance(); + maxVersions_ = 0; + filter_ = com.google.protobuf.ByteString.EMPTY; + startColumn_ = ""; + endColumn_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasTableName()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getTableNameBytes()); + } + for (int i = 0; i < primaryKey_.size(); i++) { + output.writeBytes(2, primaryKey_.get(i)); + } + for (int i = 0; i < token_.size(); i++) { + output.writeBytes(3, token_.get(i)); + } + for (int i = 0; i < columnsToGet_.size(); i++) { + output.writeBytes(4, columnsToGet_.getByteString(i)); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeMessage(5, timeRange_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeInt32(6, maxVersions_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeBytes(8, filter_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeBytes(9, getStartColumnBytes()); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeBytes(10, getEndColumnBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getTableNameBytes()); + } + { + int dataSize = 0; + for (int i = 0; i < primaryKey_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(primaryKey_.get(i)); + } + size += dataSize; + size += 1 * getPrimaryKeyList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < token_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(token_.get(i)); + } + size += dataSize; + size += 1 * getTokenList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < columnsToGet_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(columnsToGet_.getByteString(i)); + } + size += dataSize; + size += 1 * getColumnsToGetList().size(); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, timeRange_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(6, maxVersions_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(8, filter_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(9, getStartColumnBytes()); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(10, getEndColumnBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TableInBatchGetRowRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TableInBatchGetRowRequest_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getTimeRangeFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + tableName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + primaryKey_ = java.util.Collections.emptyList();; + bitField0_ = (bitField0_ & ~0x00000002); + token_ = java.util.Collections.emptyList();; + bitField0_ = (bitField0_ & ~0x00000004); + columnsToGet_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + if (timeRangeBuilder_ == null) { + timeRange_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.getDefaultInstance(); + } else { + timeRangeBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + maxVersions_ = 0; + bitField0_ = (bitField0_ & ~0x00000020); + filter_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000040); + startColumn_ = ""; + bitField0_ = (bitField0_ & ~0x00000080); + endColumn_ = ""; + bitField0_ = (bitField0_ & ~0x00000100); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.tableName_ = tableName_; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + primaryKey_ = java.util.Collections.unmodifiableList(primaryKey_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.primaryKey_ = primaryKey_; + if (((bitField0_ & 0x00000004) == 0x00000004)) { + token_ = java.util.Collections.unmodifiableList(token_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.token_ = token_; + if (((bitField0_ & 0x00000008) == 0x00000008)) { + columnsToGet_ = new com.google.protobuf.UnmodifiableLazyStringList( + columnsToGet_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.columnsToGet_ = columnsToGet_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000002; + } + if (timeRangeBuilder_ == null) { + result.timeRange_ = timeRange_; + } else { + result.timeRange_ = timeRangeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000004; + } + result.maxVersions_ = maxVersions_; + if (((from_bitField0_ & 0x00000040) == 0x00000040)) { + to_bitField0_ |= 0x00000008; + } + result.filter_ = filter_; + if (((from_bitField0_ & 0x00000080) == 0x00000080)) { + to_bitField0_ |= 0x00000010; + } + result.startColumn_ = startColumn_; + if (((from_bitField0_ & 0x00000100) == 0x00000100)) { + to_bitField0_ |= 0x00000020; + } + result.endColumn_ = endColumn_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest.getDefaultInstance()) return this; + if (other.hasTableName()) { + setTableName(other.getTableName()); + } + if (!other.primaryKey_.isEmpty()) { + if (primaryKey_.isEmpty()) { + primaryKey_ = other.primaryKey_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensurePrimaryKeyIsMutable(); + primaryKey_.addAll(other.primaryKey_); + } + onChanged(); + } + if (!other.token_.isEmpty()) { + if (token_.isEmpty()) { + token_ = other.token_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureTokenIsMutable(); + token_.addAll(other.token_); + } + onChanged(); + } + if (!other.columnsToGet_.isEmpty()) { + if (columnsToGet_.isEmpty()) { + columnsToGet_ = other.columnsToGet_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureColumnsToGetIsMutable(); + columnsToGet_.addAll(other.columnsToGet_); + } + onChanged(); + } + if (other.hasTimeRange()) { + mergeTimeRange(other.getTimeRange()); + } + if (other.hasMaxVersions()) { + setMaxVersions(other.getMaxVersions()); + } + if (other.hasFilter()) { + setFilter(other.getFilter()); + } + if (other.hasStartColumn()) { + setStartColumn(other.getStartColumn()); + } + if (other.hasEndColumn()) { + setEndColumn(other.getEndColumn()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasTableName()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + tableName_ = input.readBytes(); + break; + } + case 18: { + ensurePrimaryKeyIsMutable(); + primaryKey_.add(input.readBytes()); + break; + } + case 26: { + ensureTokenIsMutable(); + token_.add(input.readBytes()); + break; + } + case 34: { + ensureColumnsToGetIsMutable(); + columnsToGet_.add(input.readBytes()); + break; + } + case 42: { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.newBuilder(); + if (hasTimeRange()) { + subBuilder.mergeFrom(getTimeRange()); + } + input.readMessage(subBuilder, extensionRegistry); + setTimeRange(subBuilder.buildPartial()); + break; + } + case 48: { + bitField0_ |= 0x00000020; + maxVersions_ = input.readInt32(); + break; + } + case 66: { + bitField0_ |= 0x00000040; + filter_ = input.readBytes(); + break; + } + case 74: { + bitField0_ |= 0x00000080; + startColumn_ = input.readBytes(); + break; + } + case 82: { + bitField0_ |= 0x00000100; + endColumn_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // required string table_name = 1; + private java.lang.Object tableName_ = ""; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + tableName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setTableName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + return this; + } + public Builder clearTableName() { + bitField0_ = (bitField0_ & ~0x00000001); + tableName_ = getDefaultInstance().getTableName(); + onChanged(); + return this; + } + void setTableName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + } + + // repeated bytes primary_key = 2; + private java.util.List primaryKey_ = java.util.Collections.emptyList();; + private void ensurePrimaryKeyIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + primaryKey_ = new java.util.ArrayList(primaryKey_); + bitField0_ |= 0x00000002; + } + } + public java.util.List + getPrimaryKeyList() { + return java.util.Collections.unmodifiableList(primaryKey_); + } + public int getPrimaryKeyCount() { + return primaryKey_.size(); + } + public com.google.protobuf.ByteString getPrimaryKey(int index) { + return primaryKey_.get(index); + } + public Builder setPrimaryKey( + int index, com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePrimaryKeyIsMutable(); + primaryKey_.set(index, value); + onChanged(); + return this; + } + public Builder addPrimaryKey(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePrimaryKeyIsMutable(); + primaryKey_.add(value); + onChanged(); + return this; + } + public Builder addAllPrimaryKey( + java.lang.Iterable values) { + ensurePrimaryKeyIsMutable(); + super.addAll(values, primaryKey_); + onChanged(); + return this; + } + public Builder clearPrimaryKey() { + primaryKey_ = java.util.Collections.emptyList();; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + // repeated bytes token = 3; + private java.util.List token_ = java.util.Collections.emptyList();; + private void ensureTokenIsMutable() { + if (!((bitField0_ & 0x00000004) == 0x00000004)) { + token_ = new java.util.ArrayList(token_); + bitField0_ |= 0x00000004; + } + } + public java.util.List + getTokenList() { + return java.util.Collections.unmodifiableList(token_); + } + public int getTokenCount() { + return token_.size(); + } + public com.google.protobuf.ByteString getToken(int index) { + return token_.get(index); + } + public Builder setToken( + int index, com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTokenIsMutable(); + token_.set(index, value); + onChanged(); + return this; + } + public Builder addToken(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTokenIsMutable(); + token_.add(value); + onChanged(); + return this; + } + public Builder addAllToken( + java.lang.Iterable values) { + ensureTokenIsMutable(); + super.addAll(values, token_); + onChanged(); + return this; + } + public Builder clearToken() { + token_ = java.util.Collections.emptyList();; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + // repeated string columns_to_get = 4; + private com.google.protobuf.LazyStringList columnsToGet_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureColumnsToGetIsMutable() { + if (!((bitField0_ & 0x00000008) == 0x00000008)) { + columnsToGet_ = new com.google.protobuf.LazyStringArrayList(columnsToGet_); + bitField0_ |= 0x00000008; + } + } + public java.util.List + getColumnsToGetList() { + return java.util.Collections.unmodifiableList(columnsToGet_); + } + public int getColumnsToGetCount() { + return columnsToGet_.size(); + } + public String getColumnsToGet(int index) { + return columnsToGet_.get(index); + } + public Builder setColumnsToGet( + int index, String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureColumnsToGetIsMutable(); + columnsToGet_.set(index, value); + onChanged(); + return this; + } + public Builder addColumnsToGet(String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureColumnsToGetIsMutable(); + columnsToGet_.add(value); + onChanged(); + return this; + } + public Builder addAllColumnsToGet( + java.lang.Iterable values) { + ensureColumnsToGetIsMutable(); + super.addAll(values, columnsToGet_); + onChanged(); + return this; + } + public Builder clearColumnsToGet() { + columnsToGet_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + void addColumnsToGet(com.google.protobuf.ByteString value) { + ensureColumnsToGetIsMutable(); + columnsToGet_.add(value); + onChanged(); + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.TimeRange time_range = 5; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange timeRange_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRangeOrBuilder> timeRangeBuilder_; + public boolean hasTimeRange() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange getTimeRange() { + if (timeRangeBuilder_ == null) { + return timeRange_; + } else { + return timeRangeBuilder_.getMessage(); + } + } + public Builder setTimeRange(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange value) { + if (timeRangeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timeRange_ = value; + onChanged(); + } else { + timeRangeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + return this; + } + public Builder setTimeRange( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.Builder builderForValue) { + if (timeRangeBuilder_ == null) { + timeRange_ = builderForValue.build(); + onChanged(); + } else { + timeRangeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + return this; + } + public Builder mergeTimeRange(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange value) { + if (timeRangeBuilder_ == null) { + if (((bitField0_ & 0x00000010) == 0x00000010) && + timeRange_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.getDefaultInstance()) { + timeRange_ = + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.newBuilder(timeRange_).mergeFrom(value).buildPartial(); + } else { + timeRange_ = value; + } + onChanged(); + } else { + timeRangeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + return this; + } + public Builder clearTimeRange() { + if (timeRangeBuilder_ == null) { + timeRange_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.getDefaultInstance(); + onChanged(); + } else { + timeRangeBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.Builder getTimeRangeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getTimeRangeFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRangeOrBuilder getTimeRangeOrBuilder() { + if (timeRangeBuilder_ != null) { + return timeRangeBuilder_.getMessageOrBuilder(); + } else { + return timeRange_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRangeOrBuilder> + getTimeRangeFieldBuilder() { + if (timeRangeBuilder_ == null) { + timeRangeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRangeOrBuilder>( + timeRange_, + getParentForChildren(), + isClean()); + timeRange_ = null; + } + return timeRangeBuilder_; + } + + // optional int32 max_versions = 6; + private int maxVersions_ ; + public boolean hasMaxVersions() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + public int getMaxVersions() { + return maxVersions_; + } + public Builder setMaxVersions(int value) { + bitField0_ |= 0x00000020; + maxVersions_ = value; + onChanged(); + return this; + } + public Builder clearMaxVersions() { + bitField0_ = (bitField0_ & ~0x00000020); + maxVersions_ = 0; + onChanged(); + return this; + } + + // optional bytes filter = 8; + private com.google.protobuf.ByteString filter_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasFilter() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + public com.google.protobuf.ByteString getFilter() { + return filter_; + } + public Builder setFilter(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + filter_ = value; + onChanged(); + return this; + } + public Builder clearFilter() { + bitField0_ = (bitField0_ & ~0x00000040); + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + + // optional string start_column = 9; + private java.lang.Object startColumn_ = ""; + public boolean hasStartColumn() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + public String getStartColumn() { + java.lang.Object ref = startColumn_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + startColumn_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setStartColumn(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000080; + startColumn_ = value; + onChanged(); + return this; + } + public Builder clearStartColumn() { + bitField0_ = (bitField0_ & ~0x00000080); + startColumn_ = getDefaultInstance().getStartColumn(); + onChanged(); + return this; + } + void setStartColumn(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000080; + startColumn_ = value; + onChanged(); + } + + // optional string end_column = 10; + private java.lang.Object endColumn_ = ""; + public boolean hasEndColumn() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + public String getEndColumn() { + java.lang.Object ref = endColumn_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + endColumn_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setEndColumn(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000100; + endColumn_ = value; + onChanged(); + return this; + } + public Builder clearEndColumn() { + bitField0_ = (bitField0_ & ~0x00000100); + endColumn_ = getDefaultInstance().getEndColumn(); + onChanged(); + return this; + } + void setEndColumn(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000100; + endColumn_ = value; + onChanged(); + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.TableInBatchGetRowRequest) + } + + static { + defaultInstance = new TableInBatchGetRowRequest(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.TableInBatchGetRowRequest) + } + + public interface BatchGetRowRequestOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // repeated .com.alicloud.openservices.tablestore.core.protocol.TableInBatchGetRowRequest tables = 1; + java.util.List + getTablesList(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest getTables(int index); + int getTablesCount(); + java.util.List + getTablesOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequestOrBuilder getTablesOrBuilder( + int index); + } + public static final class BatchGetRowRequest extends + com.google.protobuf.GeneratedMessage + implements BatchGetRowRequestOrBuilder { + // Use BatchGetRowRequest.newBuilder() to construct. + private BatchGetRowRequest(Builder builder) { + super(builder); + } + private BatchGetRowRequest(boolean noInit) {} + + private static final BatchGetRowRequest defaultInstance; + public static BatchGetRowRequest getDefaultInstance() { + return defaultInstance; + } + + public BatchGetRowRequest getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_BatchGetRowRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_BatchGetRowRequest_fieldAccessorTable; + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.TableInBatchGetRowRequest tables = 1; + public static final int TABLES_FIELD_NUMBER = 1; + private java.util.List tables_; + public java.util.List getTablesList() { + return tables_; + } + public java.util.List + getTablesOrBuilderList() { + return tables_; + } + public int getTablesCount() { + return tables_.size(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest getTables(int index) { + return tables_.get(index); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequestOrBuilder getTablesOrBuilder( + int index) { + return tables_.get(index); + } + + private void initFields() { + tables_ = java.util.Collections.emptyList(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + for (int i = 0; i < getTablesCount(); i++) { + if (!getTables(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < tables_.size(); i++) { + output.writeMessage(1, tables_.get(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < tables_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, tables_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_BatchGetRowRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_BatchGetRowRequest_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getTablesFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (tablesBuilder_ == null) { + tables_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + tablesBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest(this); + int from_bitField0_ = bitField0_; + if (tablesBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + tables_ = java.util.Collections.unmodifiableList(tables_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.tables_ = tables_; + } else { + result.tables_ = tablesBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest.getDefaultInstance()) return this; + if (tablesBuilder_ == null) { + if (!other.tables_.isEmpty()) { + if (tables_.isEmpty()) { + tables_ = other.tables_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTablesIsMutable(); + tables_.addAll(other.tables_); + } + onChanged(); + } + } else { + if (!other.tables_.isEmpty()) { + if (tablesBuilder_.isEmpty()) { + tablesBuilder_.dispose(); + tablesBuilder_ = null; + tables_ = other.tables_; + bitField0_ = (bitField0_ & ~0x00000001); + tablesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getTablesFieldBuilder() : null; + } else { + tablesBuilder_.addAllMessages(other.tables_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + for (int i = 0; i < getTablesCount(); i++) { + if (!getTables(i).isInitialized()) { + + return false; + } + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addTables(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // repeated .com.alicloud.openservices.tablestore.core.protocol.TableInBatchGetRowRequest tables = 1; + private java.util.List tables_ = + java.util.Collections.emptyList(); + private void ensureTablesIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + tables_ = new java.util.ArrayList(tables_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequestOrBuilder> tablesBuilder_; + + public java.util.List getTablesList() { + if (tablesBuilder_ == null) { + return java.util.Collections.unmodifiableList(tables_); + } else { + return tablesBuilder_.getMessageList(); + } + } + public int getTablesCount() { + if (tablesBuilder_ == null) { + return tables_.size(); + } else { + return tablesBuilder_.getCount(); + } + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest getTables(int index) { + if (tablesBuilder_ == null) { + return tables_.get(index); + } else { + return tablesBuilder_.getMessage(index); + } + } + public Builder setTables( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest value) { + if (tablesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTablesIsMutable(); + tables_.set(index, value); + onChanged(); + } else { + tablesBuilder_.setMessage(index, value); + } + return this; + } + public Builder setTables( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest.Builder builderForValue) { + if (tablesBuilder_ == null) { + ensureTablesIsMutable(); + tables_.set(index, builderForValue.build()); + onChanged(); + } else { + tablesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + public Builder addTables(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest value) { + if (tablesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTablesIsMutable(); + tables_.add(value); + onChanged(); + } else { + tablesBuilder_.addMessage(value); + } + return this; + } + public Builder addTables( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest value) { + if (tablesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTablesIsMutable(); + tables_.add(index, value); + onChanged(); + } else { + tablesBuilder_.addMessage(index, value); + } + return this; + } + public Builder addTables( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest.Builder builderForValue) { + if (tablesBuilder_ == null) { + ensureTablesIsMutable(); + tables_.add(builderForValue.build()); + onChanged(); + } else { + tablesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + public Builder addTables( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest.Builder builderForValue) { + if (tablesBuilder_ == null) { + ensureTablesIsMutable(); + tables_.add(index, builderForValue.build()); + onChanged(); + } else { + tablesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAllTables( + java.lang.Iterable values) { + if (tablesBuilder_ == null) { + ensureTablesIsMutable(); + super.addAll(values, tables_); + onChanged(); + } else { + tablesBuilder_.addAllMessages(values); + } + return this; + } + public Builder clearTables() { + if (tablesBuilder_ == null) { + tables_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + tablesBuilder_.clear(); + } + return this; + } + public Builder removeTables(int index) { + if (tablesBuilder_ == null) { + ensureTablesIsMutable(); + tables_.remove(index); + onChanged(); + } else { + tablesBuilder_.remove(index); + } + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest.Builder getTablesBuilder( + int index) { + return getTablesFieldBuilder().getBuilder(index); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequestOrBuilder getTablesOrBuilder( + int index) { + if (tablesBuilder_ == null) { + return tables_.get(index); } else { + return tablesBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getTablesOrBuilderList() { + if (tablesBuilder_ != null) { + return tablesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(tables_); + } + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest.Builder addTablesBuilder() { + return getTablesFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest.getDefaultInstance()); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest.Builder addTablesBuilder( + int index) { + return getTablesFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest.getDefaultInstance()); + } + public java.util.List + getTablesBuilderList() { + return getTablesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequestOrBuilder> + getTablesFieldBuilder() { + if (tablesBuilder_ == null) { + tablesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequestOrBuilder>( + tables_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + tables_ = null; + } + return tablesBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.BatchGetRowRequest) + } + + static { + defaultInstance = new BatchGetRowRequest(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.BatchGetRowRequest) + } + + public interface RowInBatchGetRowResponseOrBuilder extends com.google.protobuf.MessageOrBuilder { - // optional int64 start_time = 1; - boolean hasStartTime(); - long getStartTime(); + // required bool is_ok = 1; + boolean hasIsOk(); + boolean getIsOk(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.Error error = 2; + boolean hasError(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error getError(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ErrorOrBuilder getErrorOrBuilder(); - // optional int64 end_time = 2; - boolean hasEndTime(); - long getEndTime(); + // optional .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 3; + boolean hasConsumed(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder(); - // optional int64 specific_time = 3; - boolean hasSpecificTime(); - long getSpecificTime(); + // optional bytes row = 4; + boolean hasRow(); + com.google.protobuf.ByteString getRow(); + + // optional bytes next_token = 5; + boolean hasNextToken(); + com.google.protobuf.ByteString getNextToken(); } - public static final class TimeRange extends + public static final class RowInBatchGetRowResponse extends com.google.protobuf.GeneratedMessage - implements TimeRangeOrBuilder { - // Use TimeRange.newBuilder() to construct. - private TimeRange(Builder builder) { + implements RowInBatchGetRowResponseOrBuilder { + // Use RowInBatchGetRowResponse.newBuilder() to construct. + private RowInBatchGetRowResponse(Builder builder) { super(builder); } - private TimeRange(boolean noInit) {} + private RowInBatchGetRowResponse(boolean noInit) {} - private static final TimeRange defaultInstance; - public static TimeRange getDefaultInstance() { + private static final RowInBatchGetRowResponse defaultInstance; + public static RowInBatchGetRowResponse getDefaultInstance() { return defaultInstance; } - public TimeRange getDefaultInstanceForType() { + public RowInBatchGetRowResponse getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TimeRange_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBatchGetRowResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TimeRange_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBatchGetRowResponse_fieldAccessorTable; } private int bitField0_; - // optional int64 start_time = 1; - public static final int START_TIME_FIELD_NUMBER = 1; - private long startTime_; - public boolean hasStartTime() { + // required bool is_ok = 1; + public static final int IS_OK_FIELD_NUMBER = 1; + private boolean isOk_; + public boolean hasIsOk() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public long getStartTime() { - return startTime_; + public boolean getIsOk() { + return isOk_; } - // optional int64 end_time = 2; - public static final int END_TIME_FIELD_NUMBER = 2; - private long endTime_; - public boolean hasEndTime() { + // optional .com.alicloud.openservices.tablestore.core.protocol.Error error = 2; + public static final int ERROR_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error error_; + public boolean hasError() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public long getEndTime() { - return endTime_; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error getError() { + return error_; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ErrorOrBuilder getErrorOrBuilder() { + return error_; } - // optional int64 specific_time = 3; - public static final int SPECIFIC_TIME_FIELD_NUMBER = 3; - private long specificTime_; - public boolean hasSpecificTime() { + // optional .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 3; + public static final int CONSUMED_FIELD_NUMBER = 3; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity consumed_; + public boolean hasConsumed() { return ((bitField0_ & 0x00000004) == 0x00000004); } - public long getSpecificTime() { - return specificTime_; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed() { + return consumed_; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder() { + return consumed_; + } + + // optional bytes row = 4; + public static final int ROW_FIELD_NUMBER = 4; + private com.google.protobuf.ByteString row_; + public boolean hasRow() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.google.protobuf.ByteString getRow() { + return row_; + } + + // optional bytes next_token = 5; + public static final int NEXT_TOKEN_FIELD_NUMBER = 5; + private com.google.protobuf.ByteString nextToken_; + public boolean hasNextToken() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public com.google.protobuf.ByteString getNextToken() { + return nextToken_; } private void initFields() { - startTime_ = 0L; - endTime_ = 0L; - specificTime_ = 0L; + isOk_ = false; + error_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.getDefaultInstance(); + consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); + row_ = com.google.protobuf.ByteString.EMPTY; + nextToken_ = com.google.protobuf.ByteString.EMPTY; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; + if (!hasIsOk()) { + memoizedIsInitialized = 0; + return false; + } + if (hasError()) { + if (!getError().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + if (hasConsumed()) { + if (!getConsumed().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } memoizedIsInitialized = 1; return true; } @@ -16676,13 +29915,19 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeInt64(1, startTime_); + output.writeBool(1, isOk_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeInt64(2, endTime_); + output.writeMessage(2, error_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeInt64(3, specificTime_); + output.writeMessage(3, consumed_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeBytes(4, row_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeBytes(5, nextToken_); } getUnknownFields().writeTo(output); } @@ -16695,15 +29940,23 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, startTime_); + .computeBoolSize(1, isOk_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeInt64Size(2, endTime_); + .computeMessageSize(2, error_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream - .computeInt64Size(3, specificTime_); + .computeMessageSize(3, consumed_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(4, row_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(5, nextToken_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -16717,41 +29970,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -16760,7 +30013,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -16771,12 +30024,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -16786,7 +30039,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -16799,18 +30052,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRangeOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TimeRange_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBatchGetRowResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TimeRange_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBatchGetRowResponse_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -16821,6 +30074,8 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getErrorFieldBuilder(); + getConsumedFieldBuilder(); } } private static Builder create() { @@ -16829,12 +30084,24 @@ private static Builder create() { public Builder clear() { super.clear(); - startTime_ = 0L; + isOk_ = false; bitField0_ = (bitField0_ & ~0x00000001); - endTime_ = 0L; + if (errorBuilder_ == null) { + error_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.getDefaultInstance(); + } else { + errorBuilder_.clear(); + } bitField0_ = (bitField0_ & ~0x00000002); - specificTime_ = 0L; + if (consumedBuilder_ == null) { + consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); + } else { + consumedBuilder_.clear(); + } bitField0_ = (bitField0_ & ~0x00000004); + row_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + nextToken_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000010); return this; } @@ -16844,24 +30111,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -16869,52 +30136,90 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRa return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange(this); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.startTime_ = startTime_; + result.isOk_ = isOk_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - result.endTime_ = endTime_; + if (errorBuilder_ == null) { + result.error_ = error_; + } else { + result.error_ = errorBuilder_.build(); + } if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } - result.specificTime_ = specificTime_; + if (consumedBuilder_ == null) { + result.consumed_ = consumed_; + } else { + result.consumed_ = consumedBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.row_ = row_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + result.nextToken_ = nextToken_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.getDefaultInstance()) return this; - if (other.hasStartTime()) { - setStartTime(other.getStartTime()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse.getDefaultInstance()) return this; + if (other.hasIsOk()) { + setIsOk(other.getIsOk()); } - if (other.hasEndTime()) { - setEndTime(other.getEndTime()); + if (other.hasError()) { + mergeError(other.getError()); } - if (other.hasSpecificTime()) { - setSpecificTime(other.getSpecificTime()); + if (other.hasConsumed()) { + mergeConsumed(other.getConsumed()); + } + if (other.hasRow()) { + setRow(other.getRow()); + } + if (other.hasNextToken()) { + setNextToken(other.getNextToken()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { + if (!hasIsOk()) { + + return false; + } + if (hasError()) { + if (!getError().isInitialized()) { + + return false; + } + } + if (hasConsumed()) { + if (!getConsumed().isInitialized()) { + + return false; + } + } return true; } @@ -16943,17 +30248,35 @@ public Builder mergeFrom( } case 8: { bitField0_ |= 0x00000001; - startTime_ = input.readInt64(); + isOk_ = input.readBool(); break; } - case 16: { - bitField0_ |= 0x00000002; - endTime_ = input.readInt64(); + case 18: { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.newBuilder(); + if (hasError()) { + subBuilder.mergeFrom(getError()); + } + input.readMessage(subBuilder, extensionRegistry); + setError(subBuilder.buildPartial()); break; } - case 24: { - bitField0_ |= 0x00000004; - specificTime_ = input.readInt64(); + case 26: { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.newBuilder(); + if (hasConsumed()) { + subBuilder.mergeFrom(getConsumed()); + } + input.readMessage(subBuilder, extensionRegistry); + setConsumed(subBuilder.buildPartial()); + break; + } + case 34: { + bitField0_ |= 0x00000008; + row_ = input.readBytes(); + break; + } + case 42: { + bitField0_ |= 0x00000010; + nextToken_ = input.readBytes(); break; } } @@ -16962,154 +30285,384 @@ public Builder mergeFrom( private int bitField0_; - // optional int64 start_time = 1; - private long startTime_ ; - public boolean hasStartTime() { + // required bool is_ok = 1; + private boolean isOk_ ; + public boolean hasIsOk() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public long getStartTime() { - return startTime_; + public boolean getIsOk() { + return isOk_; } - public Builder setStartTime(long value) { + public Builder setIsOk(boolean value) { bitField0_ |= 0x00000001; - startTime_ = value; + isOk_ = value; onChanged(); return this; } - public Builder clearStartTime() { + public Builder clearIsOk() { bitField0_ = (bitField0_ & ~0x00000001); - startTime_ = 0L; + isOk_ = false; + onChanged(); + return this; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.Error error = 2; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error error_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ErrorOrBuilder> errorBuilder_; + public boolean hasError() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error getError() { + if (errorBuilder_ == null) { + return error_; + } else { + return errorBuilder_.getMessage(); + } + } + public Builder setError(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + error_ = value; + onChanged(); + } else { + errorBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder setError( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.Builder builderForValue) { + if (errorBuilder_ == null) { + error_ = builderForValue.build(); + onChanged(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder mergeError(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error value) { + if (errorBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002) && + error_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.getDefaultInstance()) { + error_ = + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.newBuilder(error_).mergeFrom(value).buildPartial(); + } else { + error_ = value; + } + onChanged(); + } else { + errorBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder clearError() { + if (errorBuilder_ == null) { + error_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.getDefaultInstance(); + onChanged(); + } else { + errorBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.Builder getErrorBuilder() { + bitField0_ |= 0x00000002; onChanged(); + return getErrorFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ErrorOrBuilder getErrorOrBuilder() { + if (errorBuilder_ != null) { + return errorBuilder_.getMessageOrBuilder(); + } else { + return error_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ErrorOrBuilder> + getErrorFieldBuilder() { + if (errorBuilder_ == null) { + errorBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ErrorOrBuilder>( + error_, + getParentForChildren(), + isClean()); + error_ = null; + } + return errorBuilder_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 3; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder> consumedBuilder_; + public boolean hasConsumed() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed() { + if (consumedBuilder_ == null) { + return consumed_; + } else { + return consumedBuilder_.getMessage(); + } + } + public Builder setConsumed(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity value) { + if (consumedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + consumed_ = value; + onChanged(); + } else { + consumedBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder setConsumed( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder builderForValue) { + if (consumedBuilder_ == null) { + consumed_ = builderForValue.build(); + onChanged(); + } else { + consumedBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder mergeConsumed(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity value) { + if (consumedBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004) && + consumed_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance()) { + consumed_ = + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.newBuilder(consumed_).mergeFrom(value).buildPartial(); + } else { + consumed_ = value; + } + onChanged(); + } else { + consumedBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder clearConsumed() { + if (consumedBuilder_ == null) { + consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); + onChanged(); + } else { + consumedBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); return this; } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder getConsumedBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getConsumedFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder() { + if (consumedBuilder_ != null) { + return consumedBuilder_.getMessageOrBuilder(); + } else { + return consumed_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder> + getConsumedFieldBuilder() { + if (consumedBuilder_ == null) { + consumedBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder>( + consumed_, + getParentForChildren(), + isClean()); + consumed_ = null; + } + return consumedBuilder_; + } - // optional int64 end_time = 2; - private long endTime_ ; - public boolean hasEndTime() { - return ((bitField0_ & 0x00000002) == 0x00000002); + // optional bytes row = 4; + private com.google.protobuf.ByteString row_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasRow() { + return ((bitField0_ & 0x00000008) == 0x00000008); } - public long getEndTime() { - return endTime_; + public com.google.protobuf.ByteString getRow() { + return row_; } - public Builder setEndTime(long value) { - bitField0_ |= 0x00000002; - endTime_ = value; + public Builder setRow(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + row_ = value; onChanged(); return this; } - public Builder clearEndTime() { - bitField0_ = (bitField0_ & ~0x00000002); - endTime_ = 0L; + public Builder clearRow() { + bitField0_ = (bitField0_ & ~0x00000008); + row_ = getDefaultInstance().getRow(); onChanged(); return this; } - // optional int64 specific_time = 3; - private long specificTime_ ; - public boolean hasSpecificTime() { - return ((bitField0_ & 0x00000004) == 0x00000004); + // optional bytes next_token = 5; + private com.google.protobuf.ByteString nextToken_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasNextToken() { + return ((bitField0_ & 0x00000010) == 0x00000010); } - public long getSpecificTime() { - return specificTime_; + public com.google.protobuf.ByteString getNextToken() { + return nextToken_; } - public Builder setSpecificTime(long value) { - bitField0_ |= 0x00000004; - specificTime_ = value; + public Builder setNextToken(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + nextToken_ = value; onChanged(); return this; } - public Builder clearSpecificTime() { - bitField0_ = (bitField0_ & ~0x00000004); - specificTime_ = 0L; + public Builder clearNextToken() { + bitField0_ = (bitField0_ & ~0x00000010); + nextToken_ = getDefaultInstance().getNextToken(); onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.TimeRange) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.RowInBatchGetRowResponse) } static { - defaultInstance = new TimeRange(true); + defaultInstance = new RowInBatchGetRowResponse(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.TimeRange) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.RowInBatchGetRowResponse) } - public interface ReturnContentOrBuilder + public interface TableInBatchGetRowResponseOrBuilder extends com.google.protobuf.MessageOrBuilder { - // optional .com.alicloud.openservices.tablestore.core.protocol.ReturnType return_type = 1; - boolean hasReturnType(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnType getReturnType(); + // required string table_name = 1; + boolean hasTableName(); + String getTableName(); - // repeated string return_column_names = 2; - java.util.List getReturnColumnNamesList(); - int getReturnColumnNamesCount(); - String getReturnColumnNames(int index); + // repeated .com.alicloud.openservices.tablestore.core.protocol.RowInBatchGetRowResponse rows = 2; + java.util.List + getRowsList(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse getRows(int index); + int getRowsCount(); + java.util.List + getRowsOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponseOrBuilder getRowsOrBuilder( + int index); } - public static final class ReturnContent extends + public static final class TableInBatchGetRowResponse extends com.google.protobuf.GeneratedMessage - implements ReturnContentOrBuilder { - // Use ReturnContent.newBuilder() to construct. - private ReturnContent(Builder builder) { + implements TableInBatchGetRowResponseOrBuilder { + // Use TableInBatchGetRowResponse.newBuilder() to construct. + private TableInBatchGetRowResponse(Builder builder) { super(builder); } - private ReturnContent(boolean noInit) {} + private TableInBatchGetRowResponse(boolean noInit) {} - private static final ReturnContent defaultInstance; - public static ReturnContent getDefaultInstance() { + private static final TableInBatchGetRowResponse defaultInstance; + public static TableInBatchGetRowResponse getDefaultInstance() { return defaultInstance; } - public ReturnContent getDefaultInstanceForType() { + public TableInBatchGetRowResponse getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ReturnContent_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TableInBatchGetRowResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ReturnContent_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TableInBatchGetRowResponse_fieldAccessorTable; } private int bitField0_; - // optional .com.alicloud.openservices.tablestore.core.protocol.ReturnType return_type = 1; - public static final int RETURN_TYPE_FIELD_NUMBER = 1; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnType returnType_; - public boolean hasReturnType() { + // required string table_name = 1; + public static final int TABLE_NAME_FIELD_NUMBER = 1; + private java.lang.Object tableName_; + public boolean hasTableName() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnType getReturnType() { - return returnType_; + public String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + tableName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - // repeated string return_column_names = 2; - public static final int RETURN_COLUMN_NAMES_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList returnColumnNames_; - public java.util.List - getReturnColumnNamesList() { - return returnColumnNames_; + // repeated .com.alicloud.openservices.tablestore.core.protocol.RowInBatchGetRowResponse rows = 2; + public static final int ROWS_FIELD_NUMBER = 2; + private java.util.List rows_; + public java.util.List getRowsList() { + return rows_; } - public int getReturnColumnNamesCount() { - return returnColumnNames_.size(); + public java.util.List + getRowsOrBuilderList() { + return rows_; } - public String getReturnColumnNames(int index) { - return returnColumnNames_.get(index); + public int getRowsCount() { + return rows_.size(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse getRows(int index) { + return rows_.get(index); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponseOrBuilder getRowsOrBuilder( + int index) { + return rows_.get(index); } private void initFields() { - returnType_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnType.RT_NONE; - returnColumnNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + tableName_ = ""; + rows_ = java.util.Collections.emptyList(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; + if (!hasTableName()) { + memoizedIsInitialized = 0; + return false; + } + for (int i = 0; i < getRowsCount(); i++) { + if (!getRows(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } memoizedIsInitialized = 1; return true; } @@ -17118,10 +30671,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeEnum(1, returnType_.getNumber()); + output.writeBytes(1, getTableNameBytes()); } - for (int i = 0; i < returnColumnNames_.size(); i++) { - output.writeBytes(2, returnColumnNames_.getByteString(i)); + for (int i = 0; i < rows_.size(); i++) { + output.writeMessage(2, rows_.get(i)); } getUnknownFields().writeTo(output); } @@ -17134,16 +30687,11 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, returnType_.getNumber()); + .computeBytesSize(1, getTableNameBytes()); } - { - int dataSize = 0; - for (int i = 0; i < returnColumnNames_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeBytesSizeNoTag(returnColumnNames_.getByteString(i)); - } - size += dataSize; - size += 1 * getReturnColumnNamesList().size(); + for (int i = 0; i < rows_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, rows_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -17157,41 +30705,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -17200,7 +30748,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -17211,12 +30759,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -17226,7 +30774,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -17239,18 +30787,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContentOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ReturnContent_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TableInBatchGetRowResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ReturnContent_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TableInBatchGetRowResponse_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -17261,6 +30809,7 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getRowsFieldBuilder(); } } private static Builder create() { @@ -17269,10 +30818,14 @@ private static Builder create() { public Builder clear() { super.clear(); - returnType_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnType.RT_NONE; + tableName_ = ""; bitField0_ = (bitField0_ & ~0x00000001); - returnColumnNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); + if (rowsBuilder_ == null) { + rows_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + rowsBuilder_.clear(); + } return this; } @@ -17282,24 +30835,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -17307,54 +30860,83 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Return return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent(this); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.returnType_ = returnType_; - if (((bitField0_ & 0x00000002) == 0x00000002)) { - returnColumnNames_ = new com.google.protobuf.UnmodifiableLazyStringList( - returnColumnNames_); - bitField0_ = (bitField0_ & ~0x00000002); + result.tableName_ = tableName_; + if (rowsBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { + rows_ = java.util.Collections.unmodifiableList(rows_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.rows_ = rows_; + } else { + result.rows_ = rowsBuilder_.build(); } - result.returnColumnNames_ = returnColumnNames_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.getDefaultInstance()) return this; - if (other.hasReturnType()) { - setReturnType(other.getReturnType()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse.getDefaultInstance()) return this; + if (other.hasTableName()) { + setTableName(other.getTableName()); } - if (!other.returnColumnNames_.isEmpty()) { - if (returnColumnNames_.isEmpty()) { - returnColumnNames_ = other.returnColumnNames_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureReturnColumnNamesIsMutable(); - returnColumnNames_.addAll(other.returnColumnNames_); + if (rowsBuilder_ == null) { + if (!other.rows_.isEmpty()) { + if (rows_.isEmpty()) { + rows_ = other.rows_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureRowsIsMutable(); + rows_.addAll(other.rows_); + } + onChanged(); + } + } else { + if (!other.rows_.isEmpty()) { + if (rowsBuilder_.isEmpty()) { + rowsBuilder_.dispose(); + rowsBuilder_ = null; + rows_ = other.rows_; + bitField0_ = (bitField0_ & ~0x00000002); + rowsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getRowsFieldBuilder() : null; + } else { + rowsBuilder_.addAllMessages(other.rows_); + } } - onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { + if (!hasTableName()) { + + return false; + } + for (int i = 0; i < getRowsCount(); i++) { + if (!getRows(i).isInitialized()) { + + return false; + } + } return true; } @@ -17381,20 +30963,15 @@ public Builder mergeFrom( } break; } - case 8: { - int rawValue = input.readEnum(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnType value = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnType.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(1, rawValue); - } else { - bitField0_ |= 0x00000001; - returnType_ = value; - } + case 10: { + bitField0_ |= 0x00000001; + tableName_ = input.readBytes(); break; } case 18: { - ensureReturnColumnNamesIsMutable(); - returnColumnNames_.add(input.readBytes()); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addRows(subBuilder.buildPartial()); break; } } @@ -17403,390 +30980,314 @@ public Builder mergeFrom( private int bitField0_; - // optional .com.alicloud.openservices.tablestore.core.protocol.ReturnType return_type = 1; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnType returnType_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnType.RT_NONE; - public boolean hasReturnType() { + // required string table_name = 1; + private java.lang.Object tableName_ = ""; + public boolean hasTableName() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnType getReturnType() { - return returnType_; + public String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + tableName_ = s; + return s; + } else { + return (String) ref; + } } - public Builder setReturnType(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnType value) { + public Builder setTableName(String value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - returnType_ = value; + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; onChanged(); return this; } - public Builder clearReturnType() { + public Builder clearTableName() { bitField0_ = (bitField0_ & ~0x00000001); - returnType_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnType.RT_NONE; + tableName_ = getDefaultInstance().getTableName(); + onChanged(); + return this; + } + void setTableName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + tableName_ = value; onChanged(); + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.RowInBatchGetRowResponse rows = 2; + private java.util.List rows_ = + java.util.Collections.emptyList(); + private void ensureRowsIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + rows_ = new java.util.ArrayList(rows_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponseOrBuilder> rowsBuilder_; + + public java.util.List getRowsList() { + if (rowsBuilder_ == null) { + return java.util.Collections.unmodifiableList(rows_); + } else { + return rowsBuilder_.getMessageList(); + } + } + public int getRowsCount() { + if (rowsBuilder_ == null) { + return rows_.size(); + } else { + return rowsBuilder_.getCount(); + } + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse getRows(int index) { + if (rowsBuilder_ == null) { + return rows_.get(index); + } else { + return rowsBuilder_.getMessage(index); + } + } + public Builder setRows( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse value) { + if (rowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRowsIsMutable(); + rows_.set(index, value); + onChanged(); + } else { + rowsBuilder_.setMessage(index, value); + } + return this; + } + public Builder setRows( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse.Builder builderForValue) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + rows_.set(index, builderForValue.build()); + onChanged(); + } else { + rowsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + public Builder addRows(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse value) { + if (rowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRowsIsMutable(); + rows_.add(value); + onChanged(); + } else { + rowsBuilder_.addMessage(value); + } + return this; + } + public Builder addRows( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse value) { + if (rowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRowsIsMutable(); + rows_.add(index, value); + onChanged(); + } else { + rowsBuilder_.addMessage(index, value); + } + return this; + } + public Builder addRows( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse.Builder builderForValue) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + rows_.add(builderForValue.build()); + onChanged(); + } else { + rowsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + public Builder addRows( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse.Builder builderForValue) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + rows_.add(index, builderForValue.build()); + onChanged(); + } else { + rowsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAllRows( + java.lang.Iterable values) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + super.addAll(values, rows_); + onChanged(); + } else { + rowsBuilder_.addAllMessages(values); + } + return this; + } + public Builder clearRows() { + if (rowsBuilder_ == null) { + rows_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + rowsBuilder_.clear(); + } return this; } - - // repeated string return_column_names = 2; - private com.google.protobuf.LazyStringList returnColumnNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureReturnColumnNamesIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - returnColumnNames_ = new com.google.protobuf.LazyStringArrayList(returnColumnNames_); - bitField0_ |= 0x00000002; - } - } - public java.util.List - getReturnColumnNamesList() { - return java.util.Collections.unmodifiableList(returnColumnNames_); + public Builder removeRows(int index) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + rows_.remove(index); + onChanged(); + } else { + rowsBuilder_.remove(index); + } + return this; } - public int getReturnColumnNamesCount() { - return returnColumnNames_.size(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse.Builder getRowsBuilder( + int index) { + return getRowsFieldBuilder().getBuilder(index); } - public String getReturnColumnNames(int index) { - return returnColumnNames_.get(index); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponseOrBuilder getRowsOrBuilder( + int index) { + if (rowsBuilder_ == null) { + return rows_.get(index); } else { + return rowsBuilder_.getMessageOrBuilder(index); + } } - public Builder setReturnColumnNames( - int index, String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureReturnColumnNamesIsMutable(); - returnColumnNames_.set(index, value); - onChanged(); - return this; + public java.util.List + getRowsOrBuilderList() { + if (rowsBuilder_ != null) { + return rowsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rows_); + } } - public Builder addReturnColumnNames(String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureReturnColumnNamesIsMutable(); - returnColumnNames_.add(value); - onChanged(); - return this; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse.Builder addRowsBuilder() { + return getRowsFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse.getDefaultInstance()); } - public Builder addAllReturnColumnNames( - java.lang.Iterable values) { - ensureReturnColumnNamesIsMutable(); - super.addAll(values, returnColumnNames_); - onChanged(); - return this; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse.Builder addRowsBuilder( + int index) { + return getRowsFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse.getDefaultInstance()); } - public Builder clearReturnColumnNames() { - returnColumnNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; + public java.util.List + getRowsBuilderList() { + return getRowsFieldBuilder().getBuilderList(); } - void addReturnColumnNames(com.google.protobuf.ByteString value) { - ensureReturnColumnNamesIsMutable(); - returnColumnNames_.add(value); - onChanged(); + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponseOrBuilder> + getRowsFieldBuilder() { + if (rowsBuilder_ == null) { + rowsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponseOrBuilder>( + rows_, + ((bitField0_ & 0x00000002) == 0x00000002), + getParentForChildren(), + isClean()); + rows_ = null; + } + return rowsBuilder_; } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.ReturnContent) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.TableInBatchGetRowResponse) } static { - defaultInstance = new ReturnContent(true); + defaultInstance = new TableInBatchGetRowResponse(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.ReturnContent) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.TableInBatchGetRowResponse) } - public interface GetRowRequestOrBuilder + public interface BatchGetRowResponseOrBuilder extends com.google.protobuf.MessageOrBuilder { - // required string table_name = 1; - boolean hasTableName(); - String getTableName(); - - // required bytes primary_key = 2; - boolean hasPrimaryKey(); - com.google.protobuf.ByteString getPrimaryKey(); - - // repeated string columns_to_get = 3; - java.util.List getColumnsToGetList(); - int getColumnsToGetCount(); - String getColumnsToGet(int index); - - // optional .com.alicloud.openservices.tablestore.core.protocol.TimeRange time_range = 4; - boolean hasTimeRange(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange getTimeRange(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRangeOrBuilder getTimeRangeOrBuilder(); - - // optional int32 max_versions = 5; - boolean hasMaxVersions(); - int getMaxVersions(); - - // optional bytes filter = 7; - boolean hasFilter(); - com.google.protobuf.ByteString getFilter(); - - // optional string start_column = 8; - boolean hasStartColumn(); - String getStartColumn(); - - // optional string end_column = 9; - boolean hasEndColumn(); - String getEndColumn(); - - // optional bytes token = 10; - boolean hasToken(); - com.google.protobuf.ByteString getToken(); - - // optional string transaction_id = 11; - boolean hasTransactionId(); - String getTransactionId(); + // repeated .com.alicloud.openservices.tablestore.core.protocol.TableInBatchGetRowResponse tables = 1; + java.util.List + getTablesList(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse getTables(int index); + int getTablesCount(); + java.util.List + getTablesOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponseOrBuilder getTablesOrBuilder( + int index); } - public static final class GetRowRequest extends + public static final class BatchGetRowResponse extends com.google.protobuf.GeneratedMessage - implements GetRowRequestOrBuilder { - // Use GetRowRequest.newBuilder() to construct. - private GetRowRequest(Builder builder) { + implements BatchGetRowResponseOrBuilder { + // Use BatchGetRowResponse.newBuilder() to construct. + private BatchGetRowResponse(Builder builder) { super(builder); } - private GetRowRequest(boolean noInit) {} + private BatchGetRowResponse(boolean noInit) {} - private static final GetRowRequest defaultInstance; - public static GetRowRequest getDefaultInstance() { + private static final BatchGetRowResponse defaultInstance; + public static BatchGetRowResponse getDefaultInstance() { return defaultInstance; } - public GetRowRequest getDefaultInstanceForType() { + public BatchGetRowResponse getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetRowRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_BatchGetRowResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetRowRequest_fieldAccessorTable; - } - - private int bitField0_; - // required string table_name = 1; - public static final int TABLE_NAME_FIELD_NUMBER = 1; - private java.lang.Object tableName_; - public boolean hasTableName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getTableName() { - java.lang.Object ref = tableName_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - tableName_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getTableNameBytes() { - java.lang.Object ref = tableName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - tableName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // required bytes primary_key = 2; - public static final int PRIMARY_KEY_FIELD_NUMBER = 2; - private com.google.protobuf.ByteString primaryKey_; - public boolean hasPrimaryKey() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public com.google.protobuf.ByteString getPrimaryKey() { - return primaryKey_; - } - - // repeated string columns_to_get = 3; - public static final int COLUMNS_TO_GET_FIELD_NUMBER = 3; - private com.google.protobuf.LazyStringList columnsToGet_; - public java.util.List - getColumnsToGetList() { - return columnsToGet_; - } - public int getColumnsToGetCount() { - return columnsToGet_.size(); - } - public String getColumnsToGet(int index) { - return columnsToGet_.get(index); - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.TimeRange time_range = 4; - public static final int TIME_RANGE_FIELD_NUMBER = 4; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange timeRange_; - public boolean hasTimeRange() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange getTimeRange() { - return timeRange_; - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRangeOrBuilder getTimeRangeOrBuilder() { - return timeRange_; - } - - // optional int32 max_versions = 5; - public static final int MAX_VERSIONS_FIELD_NUMBER = 5; - private int maxVersions_; - public boolean hasMaxVersions() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public int getMaxVersions() { - return maxVersions_; - } - - // optional bytes filter = 7; - public static final int FILTER_FIELD_NUMBER = 7; - private com.google.protobuf.ByteString filter_; - public boolean hasFilter() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - public com.google.protobuf.ByteString getFilter() { - return filter_; - } - - // optional string start_column = 8; - public static final int START_COLUMN_FIELD_NUMBER = 8; - private java.lang.Object startColumn_; - public boolean hasStartColumn() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - public String getStartColumn() { - java.lang.Object ref = startColumn_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - startColumn_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getStartColumnBytes() { - java.lang.Object ref = startColumn_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - startColumn_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // optional string end_column = 9; - public static final int END_COLUMN_FIELD_NUMBER = 9; - private java.lang.Object endColumn_; - public boolean hasEndColumn() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - public String getEndColumn() { - java.lang.Object ref = endColumn_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - endColumn_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getEndColumnBytes() { - java.lang.Object ref = endColumn_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - endColumn_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_BatchGetRowResponse_fieldAccessorTable; } - // optional bytes token = 10; - public static final int TOKEN_FIELD_NUMBER = 10; - private com.google.protobuf.ByteString token_; - public boolean hasToken() { - return ((bitField0_ & 0x00000080) == 0x00000080); + // repeated .com.alicloud.openservices.tablestore.core.protocol.TableInBatchGetRowResponse tables = 1; + public static final int TABLES_FIELD_NUMBER = 1; + private java.util.List tables_; + public java.util.List getTablesList() { + return tables_; } - public com.google.protobuf.ByteString getToken() { - return token_; + public java.util.List + getTablesOrBuilderList() { + return tables_; } - - // optional string transaction_id = 11; - public static final int TRANSACTION_ID_FIELD_NUMBER = 11; - private java.lang.Object transactionId_; - public boolean hasTransactionId() { - return ((bitField0_ & 0x00000100) == 0x00000100); + public int getTablesCount() { + return tables_.size(); } - public String getTransactionId() { - java.lang.Object ref = transactionId_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - transactionId_ = s; - } - return s; - } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse getTables(int index) { + return tables_.get(index); } - private com.google.protobuf.ByteString getTransactionIdBytes() { - java.lang.Object ref = transactionId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - transactionId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponseOrBuilder getTablesOrBuilder( + int index) { + return tables_.get(index); } private void initFields() { - tableName_ = ""; - primaryKey_ = com.google.protobuf.ByteString.EMPTY; - columnsToGet_ = com.google.protobuf.LazyStringArrayList.EMPTY; - timeRange_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.getDefaultInstance(); - maxVersions_ = 0; - filter_ = com.google.protobuf.ByteString.EMPTY; - startColumn_ = ""; - endColumn_ = ""; - token_ = com.google.protobuf.ByteString.EMPTY; - transactionId_ = ""; + tables_ = java.util.Collections.emptyList(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - if (!hasTableName()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasPrimaryKey()) { - memoizedIsInitialized = 0; - return false; + for (int i = 0; i < getTablesCount(); i++) { + if (!getTables(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } } memoizedIsInitialized = 1; return true; @@ -17795,35 +31296,8 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getTableNameBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, primaryKey_); - } - for (int i = 0; i < columnsToGet_.size(); i++) { - output.writeBytes(3, columnsToGet_.getByteString(i)); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeMessage(4, timeRange_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeInt32(5, maxVersions_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeBytes(7, filter_); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - output.writeBytes(8, getStartColumnBytes()); - } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - output.writeBytes(9, getEndColumnBytes()); - } - if (((bitField0_ & 0x00000080) == 0x00000080)) { - output.writeBytes(10, token_); - } - if (((bitField0_ & 0x00000100) == 0x00000100)) { - output.writeBytes(11, getTransactionIdBytes()); + for (int i = 0; i < tables_.size(); i++) { + output.writeMessage(1, tables_.get(i)); } getUnknownFields().writeTo(output); } @@ -17834,50 +31308,9 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getTableNameBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, primaryKey_); - } - { - int dataSize = 0; - for (int i = 0; i < columnsToGet_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeBytesSizeNoTag(columnsToGet_.getByteString(i)); - } - size += dataSize; - size += 1 * getColumnsToGetList().size(); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, timeRange_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(5, maxVersions_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(7, filter_); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(8, getStartColumnBytes()); - } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(9, getEndColumnBytes()); - } - if (((bitField0_ & 0x00000080) == 0x00000080)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(10, token_); - } - if (((bitField0_ & 0x00000100) == 0x00000100)) { + for (int i = 0; i < tables_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(11, getTransactionIdBytes()); + .computeMessageSize(1, tables_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -17891,41 +31324,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -17934,7 +31367,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -17945,12 +31378,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -17960,7 +31393,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -17973,18 +31406,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequestOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetRowRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_BatchGetRowResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetRowRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_BatchGetRowResponse_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -17995,7 +31428,7 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getTimeRangeFieldBuilder(); + getTablesFieldBuilder(); } } private static Builder create() { @@ -18004,30 +31437,12 @@ private static Builder create() { public Builder clear() { super.clear(); - tableName_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - primaryKey_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - columnsToGet_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - if (timeRangeBuilder_ == null) { - timeRange_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.getDefaultInstance(); + if (tablesBuilder_ == null) { + tables_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); } else { - timeRangeBuilder_.clear(); + tablesBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000008); - maxVersions_ = 0; - bitField0_ = (bitField0_ & ~0x00000010); - filter_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000020); - startColumn_ = ""; - bitField0_ = (bitField0_ & ~0x00000040); - endColumn_ = ""; - bitField0_ = (bitField0_ & ~0x00000080); - token_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000100); - transactionId_ = ""; - bitField0_ = (bitField0_ & ~0x00000200); return this; } @@ -18037,24 +31452,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -18062,121 +31477,69 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRow return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest(this); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse(this); int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.tableName_ = tableName_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.primaryKey_ = primaryKey_; - if (((bitField0_ & 0x00000004) == 0x00000004)) { - columnsToGet_ = new com.google.protobuf.UnmodifiableLazyStringList( - columnsToGet_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.columnsToGet_ = columnsToGet_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000004; - } - if (timeRangeBuilder_ == null) { - result.timeRange_ = timeRange_; + if (tablesBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + tables_ = java.util.Collections.unmodifiableList(tables_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.tables_ = tables_; } else { - result.timeRange_ = timeRangeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000008; - } - result.maxVersions_ = maxVersions_; - if (((from_bitField0_ & 0x00000020) == 0x00000020)) { - to_bitField0_ |= 0x00000010; - } - result.filter_ = filter_; - if (((from_bitField0_ & 0x00000040) == 0x00000040)) { - to_bitField0_ |= 0x00000020; - } - result.startColumn_ = startColumn_; - if (((from_bitField0_ & 0x00000080) == 0x00000080)) { - to_bitField0_ |= 0x00000040; - } - result.endColumn_ = endColumn_; - if (((from_bitField0_ & 0x00000100) == 0x00000100)) { - to_bitField0_ |= 0x00000080; - } - result.token_ = token_; - if (((from_bitField0_ & 0x00000200) == 0x00000200)) { - to_bitField0_ |= 0x00000100; + result.tables_ = tablesBuilder_.build(); } - result.transactionId_ = transactionId_; - result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest.getDefaultInstance()) return this; - if (other.hasTableName()) { - setTableName(other.getTableName()); - } - if (other.hasPrimaryKey()) { - setPrimaryKey(other.getPrimaryKey()); - } - if (!other.columnsToGet_.isEmpty()) { - if (columnsToGet_.isEmpty()) { - columnsToGet_ = other.columnsToGet_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureColumnsToGetIsMutable(); - columnsToGet_.addAll(other.columnsToGet_); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse.getDefaultInstance()) return this; + if (tablesBuilder_ == null) { + if (!other.tables_.isEmpty()) { + if (tables_.isEmpty()) { + tables_ = other.tables_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTablesIsMutable(); + tables_.addAll(other.tables_); + } + onChanged(); + } + } else { + if (!other.tables_.isEmpty()) { + if (tablesBuilder_.isEmpty()) { + tablesBuilder_.dispose(); + tablesBuilder_ = null; + tables_ = other.tables_; + bitField0_ = (bitField0_ & ~0x00000001); + tablesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getTablesFieldBuilder() : null; + } else { + tablesBuilder_.addAllMessages(other.tables_); + } } - onChanged(); - } - if (other.hasTimeRange()) { - mergeTimeRange(other.getTimeRange()); - } - if (other.hasMaxVersions()) { - setMaxVersions(other.getMaxVersions()); - } - if (other.hasFilter()) { - setFilter(other.getFilter()); - } - if (other.hasStartColumn()) { - setStartColumn(other.getStartColumn()); - } - if (other.hasEndColumn()) { - setEndColumn(other.getEndColumn()); - } - if (other.hasToken()) { - setToken(other.getToken()); - } - if (other.hasTransactionId()) { - setTransactionId(other.getTransactionId()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { - if (!hasTableName()) { - - return false; - } - if (!hasPrimaryKey()) { - - return false; + for (int i = 0; i < getTablesCount(); i++) { + if (!getTables(i).isInitialized()) { + + return false; + } } return true; } @@ -18205,57 +31568,9 @@ public Builder mergeFrom( break; } case 10: { - bitField0_ |= 0x00000001; - tableName_ = input.readBytes(); - break; - } - case 18: { - bitField0_ |= 0x00000002; - primaryKey_ = input.readBytes(); - break; - } - case 26: { - ensureColumnsToGetIsMutable(); - columnsToGet_.add(input.readBytes()); - break; - } - case 34: { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.newBuilder(); - if (hasTimeRange()) { - subBuilder.mergeFrom(getTimeRange()); - } + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse.newBuilder(); input.readMessage(subBuilder, extensionRegistry); - setTimeRange(subBuilder.buildPartial()); - break; - } - case 40: { - bitField0_ |= 0x00000010; - maxVersions_ = input.readInt32(); - break; - } - case 58: { - bitField0_ |= 0x00000020; - filter_ = input.readBytes(); - break; - } - case 66: { - bitField0_ |= 0x00000040; - startColumn_ = input.readBytes(); - break; - } - case 74: { - bitField0_ |= 0x00000080; - endColumn_ = input.readBytes(); - break; - } - case 82: { - bitField0_ |= 0x00000100; - token_ = input.readBytes(); - break; - } - case 90: { - bitField0_ |= 0x00000200; - transactionId_ = input.readBytes(); + addTables(subBuilder.buildPartial()); break; } } @@ -18264,497 +31579,323 @@ public Builder mergeFrom( private int bitField0_; - // required string table_name = 1; - private java.lang.Object tableName_ = ""; - public boolean hasTableName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getTableName() { - java.lang.Object ref = tableName_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - tableName_ = s; - return s; - } else { - return (String) ref; - } - } - public Builder setTableName(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - tableName_ = value; - onChanged(); - return this; - } - public Builder clearTableName() { - bitField0_ = (bitField0_ & ~0x00000001); - tableName_ = getDefaultInstance().getTableName(); - onChanged(); - return this; - } - void setTableName(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; - tableName_ = value; - onChanged(); - } - - // required bytes primary_key = 2; - private com.google.protobuf.ByteString primaryKey_ = com.google.protobuf.ByteString.EMPTY; - public boolean hasPrimaryKey() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public com.google.protobuf.ByteString getPrimaryKey() { - return primaryKey_; - } - public Builder setPrimaryKey(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - primaryKey_ = value; - onChanged(); - return this; - } - public Builder clearPrimaryKey() { - bitField0_ = (bitField0_ & ~0x00000002); - primaryKey_ = getDefaultInstance().getPrimaryKey(); - onChanged(); - return this; - } - - // repeated string columns_to_get = 3; - private com.google.protobuf.LazyStringList columnsToGet_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureColumnsToGetIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { - columnsToGet_ = new com.google.protobuf.LazyStringArrayList(columnsToGet_); - bitField0_ |= 0x00000004; + // repeated .com.alicloud.openservices.tablestore.core.protocol.TableInBatchGetRowResponse tables = 1; + private java.util.List tables_ = + java.util.Collections.emptyList(); + private void ensureTablesIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + tables_ = new java.util.ArrayList(tables_); + bitField0_ |= 0x00000001; } } - public java.util.List - getColumnsToGetList() { - return java.util.Collections.unmodifiableList(columnsToGet_); - } - public int getColumnsToGetCount() { - return columnsToGet_.size(); - } - public String getColumnsToGet(int index) { - return columnsToGet_.get(index); - } - public Builder setColumnsToGet( - int index, String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureColumnsToGetIsMutable(); - columnsToGet_.set(index, value); - onChanged(); - return this; - } - public Builder addColumnsToGet(String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureColumnsToGetIsMutable(); - columnsToGet_.add(value); - onChanged(); - return this; - } - public Builder addAllColumnsToGet( - java.lang.Iterable values) { - ensureColumnsToGetIsMutable(); - super.addAll(values, columnsToGet_); - onChanged(); - return this; - } - public Builder clearColumnsToGet() { - columnsToGet_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - void addColumnsToGet(com.google.protobuf.ByteString value) { - ensureColumnsToGetIsMutable(); - columnsToGet_.add(value); - onChanged(); - } - // optional .com.alicloud.openservices.tablestore.core.protocol.TimeRange time_range = 4; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange timeRange_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRangeOrBuilder> timeRangeBuilder_; - public boolean hasTimeRange() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange getTimeRange() { - if (timeRangeBuilder_ == null) { - return timeRange_; + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponseOrBuilder> tablesBuilder_; + + public java.util.List getTablesList() { + if (tablesBuilder_ == null) { + return java.util.Collections.unmodifiableList(tables_); } else { - return timeRangeBuilder_.getMessage(); + return tablesBuilder_.getMessageList(); } } - public Builder setTimeRange(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange value) { - if (timeRangeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - timeRange_ = value; - onChanged(); + public int getTablesCount() { + if (tablesBuilder_ == null) { + return tables_.size(); } else { - timeRangeBuilder_.setMessage(value); + return tablesBuilder_.getCount(); } - bitField0_ |= 0x00000008; - return this; } - public Builder setTimeRange( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.Builder builderForValue) { - if (timeRangeBuilder_ == null) { - timeRange_ = builderForValue.build(); - onChanged(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse getTables(int index) { + if (tablesBuilder_ == null) { + return tables_.get(index); } else { - timeRangeBuilder_.setMessage(builderForValue.build()); + return tablesBuilder_.getMessage(index); } - bitField0_ |= 0x00000008; - return this; } - public Builder mergeTimeRange(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange value) { - if (timeRangeBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008) && - timeRange_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.getDefaultInstance()) { - timeRange_ = - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.newBuilder(timeRange_).mergeFrom(value).buildPartial(); - } else { - timeRange_ = value; + public Builder setTables( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse value) { + if (tablesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } + ensureTablesIsMutable(); + tables_.set(index, value); onChanged(); } else { - timeRangeBuilder_.mergeFrom(value); + tablesBuilder_.setMessage(index, value); } - bitField0_ |= 0x00000008; return this; } - public Builder clearTimeRange() { - if (timeRangeBuilder_ == null) { - timeRange_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.getDefaultInstance(); + public Builder setTables( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse.Builder builderForValue) { + if (tablesBuilder_ == null) { + ensureTablesIsMutable(); + tables_.set(index, builderForValue.build()); onChanged(); } else { - timeRangeBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - return this; - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.Builder getTimeRangeBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getTimeRangeFieldBuilder().getBuilder(); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRangeOrBuilder getTimeRangeOrBuilder() { - if (timeRangeBuilder_ != null) { - return timeRangeBuilder_.getMessageOrBuilder(); - } else { - return timeRange_; - } - } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRangeOrBuilder> - getTimeRangeFieldBuilder() { - if (timeRangeBuilder_ == null) { - timeRangeBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRangeOrBuilder>( - timeRange_, - getParentForChildren(), - isClean()); - timeRange_ = null; + tablesBuilder_.setMessage(index, builderForValue.build()); } - return timeRangeBuilder_; - } - - // optional int32 max_versions = 5; - private int maxVersions_ ; - public boolean hasMaxVersions() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - public int getMaxVersions() { - return maxVersions_; - } - public Builder setMaxVersions(int value) { - bitField0_ |= 0x00000010; - maxVersions_ = value; - onChanged(); - return this; - } - public Builder clearMaxVersions() { - bitField0_ = (bitField0_ & ~0x00000010); - maxVersions_ = 0; - onChanged(); - return this; - } - - // optional bytes filter = 7; - private com.google.protobuf.ByteString filter_ = com.google.protobuf.ByteString.EMPTY; - public boolean hasFilter() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - public com.google.protobuf.ByteString getFilter() { - return filter_; - } - public Builder setFilter(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000020; - filter_ = value; - onChanged(); - return this; - } - public Builder clearFilter() { - bitField0_ = (bitField0_ & ~0x00000020); - filter_ = getDefaultInstance().getFilter(); - onChanged(); return this; } - - // optional string start_column = 8; - private java.lang.Object startColumn_ = ""; - public boolean hasStartColumn() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - public String getStartColumn() { - java.lang.Object ref = startColumn_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - startColumn_ = s; - return s; + public Builder addTables(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse value) { + if (tablesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTablesIsMutable(); + tables_.add(value); + onChanged(); } else { - return (String) ref; + tablesBuilder_.addMessage(value); } - } - public Builder setStartColumn(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000040; - startColumn_ = value; - onChanged(); return this; } - public Builder clearStartColumn() { - bitField0_ = (bitField0_ & ~0x00000040); - startColumn_ = getDefaultInstance().getStartColumn(); - onChanged(); + public Builder addTables( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse value) { + if (tablesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTablesIsMutable(); + tables_.add(index, value); + onChanged(); + } else { + tablesBuilder_.addMessage(index, value); + } return this; } - void setStartColumn(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000040; - startColumn_ = value; - onChanged(); - } - - // optional string end_column = 9; - private java.lang.Object endColumn_ = ""; - public boolean hasEndColumn() { - return ((bitField0_ & 0x00000080) == 0x00000080); - } - public String getEndColumn() { - java.lang.Object ref = endColumn_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - endColumn_ = s; - return s; + public Builder addTables( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse.Builder builderForValue) { + if (tablesBuilder_ == null) { + ensureTablesIsMutable(); + tables_.add(builderForValue.build()); + onChanged(); } else { - return (String) ref; + tablesBuilder_.addMessage(builderForValue.build()); } - } - public Builder setEndColumn(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000080; - endColumn_ = value; - onChanged(); return this; } - public Builder clearEndColumn() { - bitField0_ = (bitField0_ & ~0x00000080); - endColumn_ = getDefaultInstance().getEndColumn(); - onChanged(); + public Builder addTables( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse.Builder builderForValue) { + if (tablesBuilder_ == null) { + ensureTablesIsMutable(); + tables_.add(index, builderForValue.build()); + onChanged(); + } else { + tablesBuilder_.addMessage(index, builderForValue.build()); + } return this; } - void setEndColumn(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000080; - endColumn_ = value; - onChanged(); - } - - // optional bytes token = 10; - private com.google.protobuf.ByteString token_ = com.google.protobuf.ByteString.EMPTY; - public boolean hasToken() { - return ((bitField0_ & 0x00000100) == 0x00000100); - } - public com.google.protobuf.ByteString getToken() { - return token_; + public Builder addAllTables( + java.lang.Iterable values) { + if (tablesBuilder_ == null) { + ensureTablesIsMutable(); + super.addAll(values, tables_); + onChanged(); + } else { + tablesBuilder_.addAllMessages(values); + } + return this; } - public Builder setToken(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000100; - token_ = value; - onChanged(); + public Builder clearTables() { + if (tablesBuilder_ == null) { + tables_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + tablesBuilder_.clear(); + } return this; } - public Builder clearToken() { - bitField0_ = (bitField0_ & ~0x00000100); - token_ = getDefaultInstance().getToken(); - onChanged(); + public Builder removeTables(int index) { + if (tablesBuilder_ == null) { + ensureTablesIsMutable(); + tables_.remove(index); + onChanged(); + } else { + tablesBuilder_.remove(index); + } return this; } - - // optional string transaction_id = 11; - private java.lang.Object transactionId_ = ""; - public boolean hasTransactionId() { - return ((bitField0_ & 0x00000200) == 0x00000200); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse.Builder getTablesBuilder( + int index) { + return getTablesFieldBuilder().getBuilder(index); } - public String getTransactionId() { - java.lang.Object ref = transactionId_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - transactionId_ = s; - return s; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponseOrBuilder getTablesOrBuilder( + int index) { + if (tablesBuilder_ == null) { + return tables_.get(index); } else { + return tablesBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getTablesOrBuilderList() { + if (tablesBuilder_ != null) { + return tablesBuilder_.getMessageOrBuilderList(); } else { - return (String) ref; + return java.util.Collections.unmodifiableList(tables_); } } - public Builder setTransactionId(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000200; - transactionId_ = value; - onChanged(); - return this; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse.Builder addTablesBuilder() { + return getTablesFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse.getDefaultInstance()); } - public Builder clearTransactionId() { - bitField0_ = (bitField0_ & ~0x00000200); - transactionId_ = getDefaultInstance().getTransactionId(); - onChanged(); - return this; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse.Builder addTablesBuilder( + int index) { + return getTablesFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse.getDefaultInstance()); } - void setTransactionId(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000200; - transactionId_ = value; - onChanged(); + public java.util.List + getTablesBuilderList() { + return getTablesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponseOrBuilder> + getTablesFieldBuilder() { + if (tablesBuilder_ == null) { + tablesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponseOrBuilder>( + tables_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + tables_ = null; + } + return tablesBuilder_; } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GetRowRequest) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.BatchGetRowResponse) } static { - defaultInstance = new GetRowRequest(true); + defaultInstance = new BatchGetRowResponse(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GetRowRequest) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.BatchGetRowResponse) } - public interface GetRowResponseOrBuilder + public interface RowInBatchWriteRowRequestOrBuilder extends com.google.protobuf.MessageOrBuilder { - // required .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 1; - boolean hasConsumed(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder(); + // required .com.alicloud.openservices.tablestore.core.protocol.OperationType type = 1; + boolean hasType(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.OperationType getType(); - // required bytes row = 2; - boolean hasRow(); - com.google.protobuf.ByteString getRow(); + // required bytes row_change = 2; + boolean hasRowChange(); + com.google.protobuf.ByteString getRowChange(); - // optional bytes next_token = 3; - boolean hasNextToken(); - com.google.protobuf.ByteString getNextToken(); + // required .com.alicloud.openservices.tablestore.core.protocol.Condition condition = 3; + boolean hasCondition(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition getCondition(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConditionOrBuilder getConditionOrBuilder(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.ReturnContent return_content = 4; + boolean hasReturnContent(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent getReturnContent(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContentOrBuilder getReturnContentOrBuilder(); } - public static final class GetRowResponse extends + public static final class RowInBatchWriteRowRequest extends com.google.protobuf.GeneratedMessage - implements GetRowResponseOrBuilder { - // Use GetRowResponse.newBuilder() to construct. - private GetRowResponse(Builder builder) { + implements RowInBatchWriteRowRequestOrBuilder { + // Use RowInBatchWriteRowRequest.newBuilder() to construct. + private RowInBatchWriteRowRequest(Builder builder) { super(builder); } - private GetRowResponse(boolean noInit) {} + private RowInBatchWriteRowRequest(boolean noInit) {} - private static final GetRowResponse defaultInstance; - public static GetRowResponse getDefaultInstance() { + private static final RowInBatchWriteRowRequest defaultInstance; + public static RowInBatchWriteRowRequest getDefaultInstance() { return defaultInstance; } - public GetRowResponse getDefaultInstanceForType() { + public RowInBatchWriteRowRequest getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetRowResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBatchWriteRowRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetRowResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBatchWriteRowRequest_fieldAccessorTable; } private int bitField0_; - // required .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 1; - public static final int CONSUMED_FIELD_NUMBER = 1; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity consumed_; - public boolean hasConsumed() { + // required .com.alicloud.openservices.tablestore.core.protocol.OperationType type = 1; + public static final int TYPE_FIELD_NUMBER = 1; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.OperationType type_; + public boolean hasType() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed() { - return consumed_; - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder() { - return consumed_; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.OperationType getType() { + return type_; } - // required bytes row = 2; - public static final int ROW_FIELD_NUMBER = 2; - private com.google.protobuf.ByteString row_; - public boolean hasRow() { + // required bytes row_change = 2; + public static final int ROW_CHANGE_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString rowChange_; + public boolean hasRowChange() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public com.google.protobuf.ByteString getRow() { - return row_; + public com.google.protobuf.ByteString getRowChange() { + return rowChange_; } - // optional bytes next_token = 3; - public static final int NEXT_TOKEN_FIELD_NUMBER = 3; - private com.google.protobuf.ByteString nextToken_; - public boolean hasNextToken() { + // required .com.alicloud.openservices.tablestore.core.protocol.Condition condition = 3; + public static final int CONDITION_FIELD_NUMBER = 3; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition condition_; + public boolean hasCondition() { return ((bitField0_ & 0x00000004) == 0x00000004); } - public com.google.protobuf.ByteString getNextToken() { - return nextToken_; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition getCondition() { + return condition_; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConditionOrBuilder getConditionOrBuilder() { + return condition_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.ReturnContent return_content = 4; + public static final int RETURN_CONTENT_FIELD_NUMBER = 4; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent returnContent_; + public boolean hasReturnContent() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent getReturnContent() { + return returnContent_; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContentOrBuilder getReturnContentOrBuilder() { + return returnContent_; } private void initFields() { - consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); - row_ = com.google.protobuf.ByteString.EMPTY; - nextToken_ = com.google.protobuf.ByteString.EMPTY; + type_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.OperationType.PUT; + rowChange_ = com.google.protobuf.ByteString.EMPTY; + condition_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.getDefaultInstance(); + returnContent_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - if (!hasConsumed()) { + if (!hasType()) { memoizedIsInitialized = 0; return false; } - if (!hasRow()) { + if (!hasRowChange()) { memoizedIsInitialized = 0; return false; } - if (!getConsumed().isInitialized()) { + if (!hasCondition()) { + memoizedIsInitialized = 0; + return false; + } + if (!getCondition().isInitialized()) { memoizedIsInitialized = 0; return false; } @@ -18766,13 +31907,16 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeMessage(1, consumed_); + output.writeEnum(1, type_.getNumber()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, row_); + output.writeBytes(2, rowChange_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeBytes(3, nextToken_); + output.writeMessage(3, condition_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeMessage(4, returnContent_); } getUnknownFields().writeTo(output); } @@ -18785,15 +31929,19 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, consumed_); + .computeEnumSize(1, type_.getNumber()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, row_); + .computeBytesSize(2, rowChange_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(3, nextToken_); + .computeMessageSize(3, condition_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, returnContent_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -18807,41 +31955,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -18850,7 +31998,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -18861,12 +32009,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -18876,7 +32024,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -18889,18 +32037,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponseOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetRowResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBatchWriteRowRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetRowResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBatchWriteRowRequest_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -18911,7 +32059,8 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getConsumedFieldBuilder(); + getConditionFieldBuilder(); + getReturnContentFieldBuilder(); } } private static Builder create() { @@ -18920,16 +32069,22 @@ private static Builder create() { public Builder clear() { super.clear(); - if (consumedBuilder_ == null) { - consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); - } else { - consumedBuilder_.clear(); - } + type_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.OperationType.PUT; bitField0_ = (bitField0_ & ~0x00000001); - row_ = com.google.protobuf.ByteString.EMPTY; + rowChange_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); - nextToken_ = com.google.protobuf.ByteString.EMPTY; + if (conditionBuilder_ == null) { + condition_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.getDefaultInstance(); + } else { + conditionBuilder_.clear(); + } bitField0_ = (bitField0_ & ~0x00000004); + if (returnContentBuilder_ == null) { + returnContent_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.getDefaultInstance(); + } else { + returnContentBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -18939,24 +32094,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -18964,65 +32119,80 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRow return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse(this); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - if (consumedBuilder_ == null) { - result.consumed_ = consumed_; - } else { - result.consumed_ = consumedBuilder_.build(); - } + result.type_ = type_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - result.row_ = row_; + result.rowChange_ = rowChange_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } - result.nextToken_ = nextToken_; + if (conditionBuilder_ == null) { + result.condition_ = condition_; + } else { + result.condition_ = conditionBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + if (returnContentBuilder_ == null) { + result.returnContent_ = returnContent_; + } else { + result.returnContent_ = returnContentBuilder_.build(); + } result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse.getDefaultInstance()) return this; - if (other.hasConsumed()) { - mergeConsumed(other.getConsumed()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest.getDefaultInstance()) return this; + if (other.hasType()) { + setType(other.getType()); } - if (other.hasRow()) { - setRow(other.getRow()); + if (other.hasRowChange()) { + setRowChange(other.getRowChange()); } - if (other.hasNextToken()) { - setNextToken(other.getNextToken()); + if (other.hasCondition()) { + mergeCondition(other.getCondition()); + } + if (other.hasReturnContent()) { + mergeReturnContent(other.getReturnContent()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { - if (!hasConsumed()) { + if (!hasType()) { return false; } - if (!hasRow()) { + if (!hasRowChange()) { return false; } - if (!getConsumed().isInitialized()) { + if (!hasCondition()) { + + return false; + } + if (!getCondition().isInitialized()) { return false; } @@ -19052,231 +32222,328 @@ public Builder mergeFrom( } break; } - case 10: { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.newBuilder(); - if (hasConsumed()) { - subBuilder.mergeFrom(getConsumed()); + case 8: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.OperationType value = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.OperationType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + type_ = value; } - input.readMessage(subBuilder, extensionRegistry); - setConsumed(subBuilder.buildPartial()); break; } case 18: { bitField0_ |= 0x00000002; - row_ = input.readBytes(); + rowChange_ = input.readBytes(); break; } case 26: { - bitField0_ |= 0x00000004; - nextToken_ = input.readBytes(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.newBuilder(); + if (hasCondition()) { + subBuilder.mergeFrom(getCondition()); + } + input.readMessage(subBuilder, extensionRegistry); + setCondition(subBuilder.buildPartial()); + break; + } + case 34: { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.newBuilder(); + if (hasReturnContent()) { + subBuilder.mergeFrom(getReturnContent()); + } + input.readMessage(subBuilder, extensionRegistry); + setReturnContent(subBuilder.buildPartial()); break; } } } } - private int bitField0_; + private int bitField0_; + + // required .com.alicloud.openservices.tablestore.core.protocol.OperationType type = 1; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.OperationType type_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.OperationType.PUT; + public boolean hasType() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.OperationType getType() { + return type_; + } + public Builder setType(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.OperationType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + type_ = value; + onChanged(); + return this; + } + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000001); + type_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.OperationType.PUT; + onChanged(); + return this; + } + + // required bytes row_change = 2; + private com.google.protobuf.ByteString rowChange_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasRowChange() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getRowChange() { + return rowChange_; + } + public Builder setRowChange(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + rowChange_ = value; + onChanged(); + return this; + } + public Builder clearRowChange() { + bitField0_ = (bitField0_ & ~0x00000002); + rowChange_ = getDefaultInstance().getRowChange(); + onChanged(); + return this; + } - // required .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 1; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); + // required .com.alicloud.openservices.tablestore.core.protocol.Condition condition = 3; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition condition_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder> consumedBuilder_; - public boolean hasConsumed() { - return ((bitField0_ & 0x00000001) == 0x00000001); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConditionOrBuilder> conditionBuilder_; + public boolean hasCondition() { + return ((bitField0_ & 0x00000004) == 0x00000004); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed() { - if (consumedBuilder_ == null) { - return consumed_; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition getCondition() { + if (conditionBuilder_ == null) { + return condition_; } else { - return consumedBuilder_.getMessage(); + return conditionBuilder_.getMessage(); } } - public Builder setConsumed(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity value) { - if (consumedBuilder_ == null) { + public Builder setCondition(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition value) { + if (conditionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - consumed_ = value; + condition_ = value; onChanged(); } else { - consumedBuilder_.setMessage(value); + conditionBuilder_.setMessage(value); } - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000004; return this; } - public Builder setConsumed( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder builderForValue) { - if (consumedBuilder_ == null) { - consumed_ = builderForValue.build(); + public Builder setCondition( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.Builder builderForValue) { + if (conditionBuilder_ == null) { + condition_ = builderForValue.build(); onChanged(); } else { - consumedBuilder_.setMessage(builderForValue.build()); + conditionBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000004; return this; } - public Builder mergeConsumed(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity value) { - if (consumedBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001) && - consumed_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance()) { - consumed_ = - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.newBuilder(consumed_).mergeFrom(value).buildPartial(); + public Builder mergeCondition(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition value) { + if (conditionBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004) && + condition_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.getDefaultInstance()) { + condition_ = + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.newBuilder(condition_).mergeFrom(value).buildPartial(); } else { - consumed_ = value; + condition_ = value; } onChanged(); } else { - consumedBuilder_.mergeFrom(value); + conditionBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000004; return this; } - public Builder clearConsumed() { - if (consumedBuilder_ == null) { - consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); + public Builder clearCondition() { + if (conditionBuilder_ == null) { + condition_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.getDefaultInstance(); onChanged(); } else { - consumedBuilder_.clear(); + conditionBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); return this; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder getConsumedBuilder() { - bitField0_ |= 0x00000001; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.Builder getConditionBuilder() { + bitField0_ |= 0x00000004; onChanged(); - return getConsumedFieldBuilder().getBuilder(); + return getConditionFieldBuilder().getBuilder(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder() { - if (consumedBuilder_ != null) { - return consumedBuilder_.getMessageOrBuilder(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConditionOrBuilder getConditionOrBuilder() { + if (conditionBuilder_ != null) { + return conditionBuilder_.getMessageOrBuilder(); } else { - return consumed_; + return condition_; } } private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder> - getConsumedFieldBuilder() { - if (consumedBuilder_ == null) { - consumedBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder>( - consumed_, + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConditionOrBuilder> + getConditionFieldBuilder() { + if (conditionBuilder_ == null) { + conditionBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConditionOrBuilder>( + condition_, getParentForChildren(), isClean()); - consumed_ = null; + condition_ = null; } - return consumedBuilder_; + return conditionBuilder_; } - // required bytes row = 2; - private com.google.protobuf.ByteString row_ = com.google.protobuf.ByteString.EMPTY; - public boolean hasRow() { - return ((bitField0_ & 0x00000002) == 0x00000002); + // optional .com.alicloud.openservices.tablestore.core.protocol.ReturnContent return_content = 4; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent returnContent_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContentOrBuilder> returnContentBuilder_; + public boolean hasReturnContent() { + return ((bitField0_ & 0x00000008) == 0x00000008); } - public com.google.protobuf.ByteString getRow() { - return row_; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent getReturnContent() { + if (returnContentBuilder_ == null) { + return returnContent_; + } else { + return returnContentBuilder_.getMessage(); + } } - public Builder setRow(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - row_ = value; - onChanged(); + public Builder setReturnContent(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent value) { + if (returnContentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + returnContent_ = value; + onChanged(); + } else { + returnContentBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; return this; } - public Builder clearRow() { - bitField0_ = (bitField0_ & ~0x00000002); - row_ = getDefaultInstance().getRow(); - onChanged(); + public Builder setReturnContent( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.Builder builderForValue) { + if (returnContentBuilder_ == null) { + returnContent_ = builderForValue.build(); + onChanged(); + } else { + returnContentBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; return this; } - - // optional bytes next_token = 3; - private com.google.protobuf.ByteString nextToken_ = com.google.protobuf.ByteString.EMPTY; - public boolean hasNextToken() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public com.google.protobuf.ByteString getNextToken() { - return nextToken_; + public Builder mergeReturnContent(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent value) { + if (returnContentBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008) && + returnContent_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.getDefaultInstance()) { + returnContent_ = + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.newBuilder(returnContent_).mergeFrom(value).buildPartial(); + } else { + returnContent_ = value; + } + onChanged(); + } else { + returnContentBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + return this; } - public Builder setNextToken(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - nextToken_ = value; - onChanged(); + public Builder clearReturnContent() { + if (returnContentBuilder_ == null) { + returnContent_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.getDefaultInstance(); + onChanged(); + } else { + returnContentBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); return this; } - public Builder clearNextToken() { - bitField0_ = (bitField0_ & ~0x00000004); - nextToken_ = getDefaultInstance().getNextToken(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.Builder getReturnContentBuilder() { + bitField0_ |= 0x00000008; onChanged(); - return this; + return getReturnContentFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContentOrBuilder getReturnContentOrBuilder() { + if (returnContentBuilder_ != null) { + return returnContentBuilder_.getMessageOrBuilder(); + } else { + return returnContent_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContentOrBuilder> + getReturnContentFieldBuilder() { + if (returnContentBuilder_ == null) { + returnContentBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContentOrBuilder>( + returnContent_, + getParentForChildren(), + isClean()); + returnContent_ = null; + } + return returnContentBuilder_; } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GetRowResponse) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.RowInBatchWriteRowRequest) } static { - defaultInstance = new GetRowResponse(true); + defaultInstance = new RowInBatchWriteRowRequest(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GetRowResponse) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.RowInBatchWriteRowRequest) } - public interface UpdateRowRequestOrBuilder + public interface TableInBatchWriteRowRequestOrBuilder extends com.google.protobuf.MessageOrBuilder { // required string table_name = 1; boolean hasTableName(); String getTableName(); - // required bytes row_change = 2; - boolean hasRowChange(); - com.google.protobuf.ByteString getRowChange(); - - // required .com.alicloud.openservices.tablestore.core.protocol.Condition condition = 3; - boolean hasCondition(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition getCondition(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConditionOrBuilder getConditionOrBuilder(); - - // optional .com.alicloud.openservices.tablestore.core.protocol.ReturnContent return_content = 4; - boolean hasReturnContent(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent getReturnContent(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContentOrBuilder getReturnContentOrBuilder(); - - // optional string transaction_id = 5; - boolean hasTransactionId(); - String getTransactionId(); + // repeated .com.alicloud.openservices.tablestore.core.protocol.RowInBatchWriteRowRequest rows = 2; + java.util.List + getRowsList(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest getRows(int index); + int getRowsCount(); + java.util.List + getRowsOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequestOrBuilder getRowsOrBuilder( + int index); } - public static final class UpdateRowRequest extends + public static final class TableInBatchWriteRowRequest extends com.google.protobuf.GeneratedMessage - implements UpdateRowRequestOrBuilder { - // Use UpdateRowRequest.newBuilder() to construct. - private UpdateRowRequest(Builder builder) { + implements TableInBatchWriteRowRequestOrBuilder { + // Use TableInBatchWriteRowRequest.newBuilder() to construct. + private TableInBatchWriteRowRequest(Builder builder) { super(builder); } - private UpdateRowRequest(boolean noInit) {} + private TableInBatchWriteRowRequest(boolean noInit) {} - private static final UpdateRowRequest defaultInstance; - public static UpdateRowRequest getDefaultInstance() { + private static final TableInBatchWriteRowRequest defaultInstance; + public static TableInBatchWriteRowRequest getDefaultInstance() { return defaultInstance; } - public UpdateRowRequest getDefaultInstanceForType() { + public TableInBatchWriteRowRequest getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateRowRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TableInBatchWriteRowRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateRowRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TableInBatchWriteRowRequest_fieldAccessorTable; } private int bitField0_; @@ -19312,80 +32579,30 @@ private com.google.protobuf.ByteString getTableNameBytes() { } } - // required bytes row_change = 2; - public static final int ROW_CHANGE_FIELD_NUMBER = 2; - private com.google.protobuf.ByteString rowChange_; - public boolean hasRowChange() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public com.google.protobuf.ByteString getRowChange() { - return rowChange_; - } - - // required .com.alicloud.openservices.tablestore.core.protocol.Condition condition = 3; - public static final int CONDITION_FIELD_NUMBER = 3; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition condition_; - public boolean hasCondition() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition getCondition() { - return condition_; - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConditionOrBuilder getConditionOrBuilder() { - return condition_; - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.ReturnContent return_content = 4; - public static final int RETURN_CONTENT_FIELD_NUMBER = 4; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent returnContent_; - public boolean hasReturnContent() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent getReturnContent() { - return returnContent_; + // repeated .com.alicloud.openservices.tablestore.core.protocol.RowInBatchWriteRowRequest rows = 2; + public static final int ROWS_FIELD_NUMBER = 2; + private java.util.List rows_; + public java.util.List getRowsList() { + return rows_; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContentOrBuilder getReturnContentOrBuilder() { - return returnContent_; + public java.util.List + getRowsOrBuilderList() { + return rows_; } - - // optional string transaction_id = 5; - public static final int TRANSACTION_ID_FIELD_NUMBER = 5; - private java.lang.Object transactionId_; - public boolean hasTransactionId() { - return ((bitField0_ & 0x00000010) == 0x00000010); + public int getRowsCount() { + return rows_.size(); } - public String getTransactionId() { - java.lang.Object ref = transactionId_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - transactionId_ = s; - } - return s; - } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest getRows(int index) { + return rows_.get(index); } - private com.google.protobuf.ByteString getTransactionIdBytes() { - java.lang.Object ref = transactionId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - transactionId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequestOrBuilder getRowsOrBuilder( + int index) { + return rows_.get(index); } private void initFields() { tableName_ = ""; - rowChange_ = com.google.protobuf.ByteString.EMPTY; - condition_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.getDefaultInstance(); - returnContent_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.getDefaultInstance(); - transactionId_ = ""; + rows_ = java.util.Collections.emptyList(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -19396,17 +32613,11 @@ public final boolean isInitialized() { memoizedIsInitialized = 0; return false; } - if (!hasRowChange()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasCondition()) { - memoizedIsInitialized = 0; - return false; - } - if (!getCondition().isInitialized()) { - memoizedIsInitialized = 0; - return false; + for (int i = 0; i < getRowsCount(); i++) { + if (!getRows(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } } memoizedIsInitialized = 1; return true; @@ -19418,17 +32629,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getTableNameBytes()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, rowChange_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeMessage(3, condition_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeMessage(4, returnContent_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeBytes(5, getTransactionIdBytes()); + for (int i = 0; i < rows_.size(); i++) { + output.writeMessage(2, rows_.get(i)); } getUnknownFields().writeTo(output); } @@ -19443,21 +32645,9 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, getTableNameBytes()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, rowChange_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, condition_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, returnContent_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { + for (int i = 0; i < rows_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(5, getTransactionIdBytes()); + .computeMessageSize(2, rows_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -19471,41 +32661,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -19514,7 +32704,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -19525,12 +32715,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -19540,7 +32730,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -19553,18 +32743,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequestOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateRowRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TableInBatchWriteRowRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateRowRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TableInBatchWriteRowRequest_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -19575,8 +32765,7 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getConditionFieldBuilder(); - getReturnContentFieldBuilder(); + getRowsFieldBuilder(); } } private static Builder create() { @@ -19587,22 +32776,12 @@ public Builder clear() { super.clear(); tableName_ = ""; bitField0_ = (bitField0_ & ~0x00000001); - rowChange_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - if (conditionBuilder_ == null) { - condition_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.getDefaultInstance(); - } else { - conditionBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - if (returnContentBuilder_ == null) { - returnContent_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.getDefaultInstance(); + if (rowsBuilder_ == null) { + rows_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); } else { - returnContentBuilder_.clear(); + rowsBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000008); - transactionId_ = ""; - bitField0_ = (bitField0_ & ~0x00000010); return this; } @@ -19612,24 +32791,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -19637,68 +32816,67 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Update return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest(this); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest(this); int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.tableName_ = tableName_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.rowChange_ = rowChange_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - if (conditionBuilder_ == null) { - result.condition_ = condition_; - } else { - result.condition_ = conditionBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; } - if (returnContentBuilder_ == null) { - result.returnContent_ = returnContent_; + result.tableName_ = tableName_; + if (rowsBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { + rows_ = java.util.Collections.unmodifiableList(rows_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.rows_ = rows_; } else { - result.returnContent_ = returnContentBuilder_.build(); - } - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000010; + result.rows_ = rowsBuilder_.build(); } - result.transactionId_ = transactionId_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest.getDefaultInstance()) return this; + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest.getDefaultInstance()) return this; if (other.hasTableName()) { setTableName(other.getTableName()); } - if (other.hasRowChange()) { - setRowChange(other.getRowChange()); - } - if (other.hasCondition()) { - mergeCondition(other.getCondition()); - } - if (other.hasReturnContent()) { - mergeReturnContent(other.getReturnContent()); - } - if (other.hasTransactionId()) { - setTransactionId(other.getTransactionId()); + if (rowsBuilder_ == null) { + if (!other.rows_.isEmpty()) { + if (rows_.isEmpty()) { + rows_ = other.rows_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureRowsIsMutable(); + rows_.addAll(other.rows_); + } + onChanged(); + } + } else { + if (!other.rows_.isEmpty()) { + if (rowsBuilder_.isEmpty()) { + rowsBuilder_.dispose(); + rowsBuilder_ = null; + rows_ = other.rows_; + bitField0_ = (bitField0_ & ~0x00000002); + rowsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getRowsFieldBuilder() : null; + } else { + rowsBuilder_.addAllMessages(other.rows_); + } + } } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -19709,17 +32887,11 @@ public final boolean isInitialized() { return false; } - if (!hasRowChange()) { - - return false; - } - if (!hasCondition()) { - - return false; - } - if (!getCondition().isInitialized()) { - - return false; + for (int i = 0; i < getRowsCount(); i++) { + if (!getRows(i).isInitialized()) { + + return false; + } } return true; } @@ -19753,31 +32925,9 @@ public Builder mergeFrom( break; } case 18: { - bitField0_ |= 0x00000002; - rowChange_ = input.readBytes(); - break; - } - case 26: { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.newBuilder(); - if (hasCondition()) { - subBuilder.mergeFrom(getCondition()); - } - input.readMessage(subBuilder, extensionRegistry); - setCondition(subBuilder.buildPartial()); - break; - } - case 34: { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.newBuilder(); - if (hasReturnContent()) { - subBuilder.mergeFrom(getReturnContent()); - } + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest.newBuilder(); input.readMessage(subBuilder, extensionRegistry); - setReturnContent(subBuilder.buildPartial()); - break; - } - case 42: { - bitField0_ |= 0x00000010; - transactionId_ = input.readBytes(); + addRows(subBuilder.buildPartial()); break; } } @@ -19822,337 +32972,331 @@ void setTableName(com.google.protobuf.ByteString value) { onChanged(); } - // required bytes row_change = 2; - private com.google.protobuf.ByteString rowChange_ = com.google.protobuf.ByteString.EMPTY; - public boolean hasRowChange() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public com.google.protobuf.ByteString getRowChange() { - return rowChange_; - } - public Builder setRowChange(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - rowChange_ = value; - onChanged(); - return this; - } - public Builder clearRowChange() { - bitField0_ = (bitField0_ & ~0x00000002); - rowChange_ = getDefaultInstance().getRowChange(); - onChanged(); - return this; + // repeated .com.alicloud.openservices.tablestore.core.protocol.RowInBatchWriteRowRequest rows = 2; + private java.util.List rows_ = + java.util.Collections.emptyList(); + private void ensureRowsIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + rows_ = new java.util.ArrayList(rows_); + bitField0_ |= 0x00000002; + } } - // required .com.alicloud.openservices.tablestore.core.protocol.Condition condition = 3; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition condition_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConditionOrBuilder> conditionBuilder_; - public boolean hasCondition() { - return ((bitField0_ & 0x00000004) == 0x00000004); + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequestOrBuilder> rowsBuilder_; + + public java.util.List getRowsList() { + if (rowsBuilder_ == null) { + return java.util.Collections.unmodifiableList(rows_); + } else { + return rowsBuilder_.getMessageList(); + } } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition getCondition() { - if (conditionBuilder_ == null) { - return condition_; + public int getRowsCount() { + if (rowsBuilder_ == null) { + return rows_.size(); } else { - return conditionBuilder_.getMessage(); + return rowsBuilder_.getCount(); } } - public Builder setCondition(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition value) { - if (conditionBuilder_ == null) { + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest getRows(int index) { + if (rowsBuilder_ == null) { + return rows_.get(index); + } else { + return rowsBuilder_.getMessage(index); + } + } + public Builder setRows( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest value) { + if (rowsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - condition_ = value; + ensureRowsIsMutable(); + rows_.set(index, value); onChanged(); } else { - conditionBuilder_.setMessage(value); + rowsBuilder_.setMessage(index, value); } - bitField0_ |= 0x00000004; return this; } - public Builder setCondition( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.Builder builderForValue) { - if (conditionBuilder_ == null) { - condition_ = builderForValue.build(); + public Builder setRows( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest.Builder builderForValue) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + rows_.set(index, builderForValue.build()); onChanged(); } else { - conditionBuilder_.setMessage(builderForValue.build()); + rowsBuilder_.setMessage(index, builderForValue.build()); } - bitField0_ |= 0x00000004; return this; } - public Builder mergeCondition(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition value) { - if (conditionBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004) && - condition_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.getDefaultInstance()) { - condition_ = - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.newBuilder(condition_).mergeFrom(value).buildPartial(); - } else { - condition_ = value; + public Builder addRows(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest value) { + if (rowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } + ensureRowsIsMutable(); + rows_.add(value); onChanged(); } else { - conditionBuilder_.mergeFrom(value); + rowsBuilder_.addMessage(value); } - bitField0_ |= 0x00000004; return this; } - public Builder clearCondition() { - if (conditionBuilder_ == null) { - condition_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.getDefaultInstance(); + public Builder addRows( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest value) { + if (rowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRowsIsMutable(); + rows_.add(index, value); onChanged(); } else { - conditionBuilder_.clear(); + rowsBuilder_.addMessage(index, value); } - bitField0_ = (bitField0_ & ~0x00000004); return this; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.Builder getConditionBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getConditionFieldBuilder().getBuilder(); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConditionOrBuilder getConditionOrBuilder() { - if (conditionBuilder_ != null) { - return conditionBuilder_.getMessageOrBuilder(); - } else { - return condition_; - } - } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConditionOrBuilder> - getConditionFieldBuilder() { - if (conditionBuilder_ == null) { - conditionBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConditionOrBuilder>( - condition_, - getParentForChildren(), - isClean()); - condition_ = null; - } - return conditionBuilder_; - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.ReturnContent return_content = 4; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent returnContent_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContentOrBuilder> returnContentBuilder_; - public boolean hasReturnContent() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent getReturnContent() { - if (returnContentBuilder_ == null) { - return returnContent_; + public Builder addRows( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest.Builder builderForValue) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + rows_.add(builderForValue.build()); + onChanged(); } else { - return returnContentBuilder_.getMessage(); + rowsBuilder_.addMessage(builderForValue.build()); } + return this; } - public Builder setReturnContent(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent value) { - if (returnContentBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - returnContent_ = value; + public Builder addRows( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest.Builder builderForValue) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + rows_.add(index, builderForValue.build()); onChanged(); } else { - returnContentBuilder_.setMessage(value); + rowsBuilder_.addMessage(index, builderForValue.build()); } - bitField0_ |= 0x00000008; return this; } - public Builder setReturnContent( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.Builder builderForValue) { - if (returnContentBuilder_ == null) { - returnContent_ = builderForValue.build(); + public Builder addAllRows( + java.lang.Iterable values) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + super.addAll(values, rows_); onChanged(); } else { - returnContentBuilder_.setMessage(builderForValue.build()); + rowsBuilder_.addAllMessages(values); } - bitField0_ |= 0x00000008; return this; } - public Builder mergeReturnContent(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent value) { - if (returnContentBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008) && - returnContent_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.getDefaultInstance()) { - returnContent_ = - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.newBuilder(returnContent_).mergeFrom(value).buildPartial(); - } else { - returnContent_ = value; - } + public Builder clearRows() { + if (rowsBuilder_ == null) { + rows_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { - returnContentBuilder_.mergeFrom(value); + rowsBuilder_.clear(); } - bitField0_ |= 0x00000008; return this; } - public Builder clearReturnContent() { - if (returnContentBuilder_ == null) { - returnContent_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.getDefaultInstance(); + public Builder removeRows(int index) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + rows_.remove(index); onChanged(); } else { - returnContentBuilder_.clear(); + rowsBuilder_.remove(index); } - bitField0_ = (bitField0_ & ~0x00000008); return this; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.Builder getReturnContentBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getReturnContentFieldBuilder().getBuilder(); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContentOrBuilder getReturnContentOrBuilder() { - if (returnContentBuilder_ != null) { - return returnContentBuilder_.getMessageOrBuilder(); - } else { - return returnContent_; - } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest.Builder getRowsBuilder( + int index) { + return getRowsFieldBuilder().getBuilder(index); } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContentOrBuilder> - getReturnContentFieldBuilder() { - if (returnContentBuilder_ == null) { - returnContentBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContentOrBuilder>( - returnContent_, - getParentForChildren(), - isClean()); - returnContent_ = null; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequestOrBuilder getRowsOrBuilder( + int index) { + if (rowsBuilder_ == null) { + return rows_.get(index); } else { + return rowsBuilder_.getMessageOrBuilder(index); } - return returnContentBuilder_; - } - - // optional string transaction_id = 5; - private java.lang.Object transactionId_ = ""; - public boolean hasTransactionId() { - return ((bitField0_ & 0x00000010) == 0x00000010); } - public String getTransactionId() { - java.lang.Object ref = transactionId_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - transactionId_ = s; - return s; + public java.util.List + getRowsOrBuilderList() { + if (rowsBuilder_ != null) { + return rowsBuilder_.getMessageOrBuilderList(); } else { - return (String) ref; + return java.util.Collections.unmodifiableList(rows_); } } - public Builder setTransactionId(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; - transactionId_ = value; - onChanged(); - return this; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest.Builder addRowsBuilder() { + return getRowsFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest.getDefaultInstance()); } - public Builder clearTransactionId() { - bitField0_ = (bitField0_ & ~0x00000010); - transactionId_ = getDefaultInstance().getTransactionId(); - onChanged(); - return this; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest.Builder addRowsBuilder( + int index) { + return getRowsFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest.getDefaultInstance()); } - void setTransactionId(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000010; - transactionId_ = value; - onChanged(); + public java.util.List + getRowsBuilderList() { + return getRowsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequestOrBuilder> + getRowsFieldBuilder() { + if (rowsBuilder_ == null) { + rowsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequestOrBuilder>( + rows_, + ((bitField0_ & 0x00000002) == 0x00000002), + getParentForChildren(), + isClean()); + rows_ = null; + } + return rowsBuilder_; } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.UpdateRowRequest) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.TableInBatchWriteRowRequest) } static { - defaultInstance = new UpdateRowRequest(true); + defaultInstance = new TableInBatchWriteRowRequest(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.UpdateRowRequest) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.TableInBatchWriteRowRequest) } - public interface UpdateRowResponseOrBuilder + public interface BatchWriteRowRequestOrBuilder extends com.google.protobuf.MessageOrBuilder { - // required .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 1; - boolean hasConsumed(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder(); + // repeated .com.alicloud.openservices.tablestore.core.protocol.TableInBatchWriteRowRequest tables = 1; + java.util.List + getTablesList(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest getTables(int index); + int getTablesCount(); + java.util.List + getTablesOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequestOrBuilder getTablesOrBuilder( + int index); - // optional bytes row = 2; - boolean hasRow(); - com.google.protobuf.ByteString getRow(); + // optional string transaction_id = 2; + boolean hasTransactionId(); + String getTransactionId(); + + // optional bool is_atomic = 3; + boolean hasIsAtomic(); + boolean getIsAtomic(); } - public static final class UpdateRowResponse extends + public static final class BatchWriteRowRequest extends com.google.protobuf.GeneratedMessage - implements UpdateRowResponseOrBuilder { - // Use UpdateRowResponse.newBuilder() to construct. - private UpdateRowResponse(Builder builder) { + implements BatchWriteRowRequestOrBuilder { + // Use BatchWriteRowRequest.newBuilder() to construct. + private BatchWriteRowRequest(Builder builder) { super(builder); } - private UpdateRowResponse(boolean noInit) {} + private BatchWriteRowRequest(boolean noInit) {} - private static final UpdateRowResponse defaultInstance; - public static UpdateRowResponse getDefaultInstance() { + private static final BatchWriteRowRequest defaultInstance; + public static BatchWriteRowRequest getDefaultInstance() { return defaultInstance; } - public UpdateRowResponse getDefaultInstanceForType() { + public BatchWriteRowRequest getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateRowResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_BatchWriteRowRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateRowResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_BatchWriteRowRequest_fieldAccessorTable; } private int bitField0_; - // required .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 1; - public static final int CONSUMED_FIELD_NUMBER = 1; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity consumed_; - public boolean hasConsumed() { + // repeated .com.alicloud.openservices.tablestore.core.protocol.TableInBatchWriteRowRequest tables = 1; + public static final int TABLES_FIELD_NUMBER = 1; + private java.util.List tables_; + public java.util.List getTablesList() { + return tables_; + } + public java.util.List + getTablesOrBuilderList() { + return tables_; + } + public int getTablesCount() { + return tables_.size(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest getTables(int index) { + return tables_.get(index); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequestOrBuilder getTablesOrBuilder( + int index) { + return tables_.get(index); + } + + // optional string transaction_id = 2; + public static final int TRANSACTION_ID_FIELD_NUMBER = 2; + private java.lang.Object transactionId_; + public boolean hasTransactionId() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed() { - return consumed_; + public String getTransactionId() { + java.lang.Object ref = transactionId_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + transactionId_ = s; + } + return s; + } } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder() { - return consumed_; + private com.google.protobuf.ByteString getTransactionIdBytes() { + java.lang.Object ref = transactionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + transactionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - // optional bytes row = 2; - public static final int ROW_FIELD_NUMBER = 2; - private com.google.protobuf.ByteString row_; - public boolean hasRow() { + // optional bool is_atomic = 3; + public static final int IS_ATOMIC_FIELD_NUMBER = 3; + private boolean isAtomic_; + public boolean hasIsAtomic() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public com.google.protobuf.ByteString getRow() { - return row_; + public boolean getIsAtomic() { + return isAtomic_; } private void initFields() { - consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); - row_ = com.google.protobuf.ByteString.EMPTY; + tables_ = java.util.Collections.emptyList(); + transactionId_ = ""; + isAtomic_ = false; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - if (!hasConsumed()) { - memoizedIsInitialized = 0; - return false; - } - if (!getConsumed().isInitialized()) { - memoizedIsInitialized = 0; - return false; + for (int i = 0; i < getTablesCount(); i++) { + if (!getTables(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } } memoizedIsInitialized = 1; return true; @@ -20161,11 +33305,14 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); + for (int i = 0; i < tables_.size(); i++) { + output.writeMessage(1, tables_.get(i)); + } if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeMessage(1, consumed_); + output.writeBytes(2, getTransactionIdBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, row_); + output.writeBool(3, isAtomic_); } getUnknownFields().writeTo(output); } @@ -20176,13 +33323,17 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; + for (int i = 0; i < tables_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, tables_.get(i)); + } if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, consumed_); + .computeBytesSize(2, getTransactionIdBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, row_); + .computeBoolSize(3, isAtomic_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -20196,41 +33347,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -20239,7 +33390,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -20250,12 +33401,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -20265,7 +33416,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -20278,18 +33429,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponseOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateRowResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_BatchWriteRowRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateRowResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_BatchWriteRowRequest_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -20300,7 +33451,7 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getConsumedFieldBuilder(); + getTablesFieldBuilder(); } } private static Builder create() { @@ -20309,14 +33460,16 @@ private static Builder create() { public Builder clear() { super.clear(); - if (consumedBuilder_ == null) { - consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); + if (tablesBuilder_ == null) { + tables_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); } else { - consumedBuilder_.clear(); + tablesBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000001); - row_ = com.google.protobuf.ByteString.EMPTY; + transactionId_ = ""; bitField0_ = (bitField0_ & ~0x00000002); + isAtomic_ = false; + bitField0_ = (bitField0_ & ~0x00000004); return this; } @@ -20326,24 +33479,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -20351,56 +33504,85 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Update return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse(this); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - if (consumedBuilder_ == null) { - result.consumed_ = consumed_; + if (tablesBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + tables_ = java.util.Collections.unmodifiableList(tables_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.tables_ = tables_; } else { - result.consumed_ = consumedBuilder_.build(); + result.tables_ = tablesBuilder_.build(); } if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000001; + } + result.transactionId_ = transactionId_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000002; } - result.row_ = row_; + result.isAtomic_ = isAtomic_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse.getDefaultInstance()) return this; - if (other.hasConsumed()) { - mergeConsumed(other.getConsumed()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest.getDefaultInstance()) return this; + if (tablesBuilder_ == null) { + if (!other.tables_.isEmpty()) { + if (tables_.isEmpty()) { + tables_ = other.tables_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTablesIsMutable(); + tables_.addAll(other.tables_); + } + onChanged(); + } + } else { + if (!other.tables_.isEmpty()) { + if (tablesBuilder_.isEmpty()) { + tablesBuilder_.dispose(); + tablesBuilder_ = null; + tables_ = other.tables_; + bitField0_ = (bitField0_ & ~0x00000001); + tablesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getTablesFieldBuilder() : null; + } else { + tablesBuilder_.addAllMessages(other.tables_); + } + } } - if (other.hasRow()) { - setRow(other.getRow()); + if (other.hasTransactionId()) { + setTransactionId(other.getTransactionId()); + } + if (other.hasIsAtomic()) { + setIsAtomic(other.getIsAtomic()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { - if (!hasConsumed()) { - - return false; - } - if (!getConsumed().isInitialized()) { - - return false; + for (int i = 0; i < getTablesCount(); i++) { + if (!getTables(i).isInitialized()) { + + return false; + } } return true; } @@ -20429,17 +33611,19 @@ public Builder mergeFrom( break; } case 10: { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.newBuilder(); - if (hasConsumed()) { - subBuilder.mergeFrom(getConsumed()); - } + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest.newBuilder(); input.readMessage(subBuilder, extensionRegistry); - setConsumed(subBuilder.buildPartial()); + addTables(subBuilder.buildPartial()); break; } case 18: { bitField0_ |= 0x00000002; - row_ = input.readBytes(); + transactionId_ = input.readBytes(); + break; + } + case 24: { + bitField0_ |= 0x00000004; + isAtomic_ = input.readBool(); break; } } @@ -20448,312 +33632,382 @@ public Builder mergeFrom( private int bitField0_; - // required .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 1; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder> consumedBuilder_; - public boolean hasConsumed() { - return ((bitField0_ & 0x00000001) == 0x00000001); + // repeated .com.alicloud.openservices.tablestore.core.protocol.TableInBatchWriteRowRequest tables = 1; + private java.util.List tables_ = + java.util.Collections.emptyList(); + private void ensureTablesIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + tables_ = new java.util.ArrayList(tables_); + bitField0_ |= 0x00000001; + } } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed() { - if (consumedBuilder_ == null) { - return consumed_; + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequestOrBuilder> tablesBuilder_; + + public java.util.List getTablesList() { + if (tablesBuilder_ == null) { + return java.util.Collections.unmodifiableList(tables_); } else { - return consumedBuilder_.getMessage(); + return tablesBuilder_.getMessageList(); } } - public Builder setConsumed(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity value) { - if (consumedBuilder_ == null) { + public int getTablesCount() { + if (tablesBuilder_ == null) { + return tables_.size(); + } else { + return tablesBuilder_.getCount(); + } + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest getTables(int index) { + if (tablesBuilder_ == null) { + return tables_.get(index); + } else { + return tablesBuilder_.getMessage(index); + } + } + public Builder setTables( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest value) { + if (tablesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - consumed_ = value; + ensureTablesIsMutable(); + tables_.set(index, value); onChanged(); } else { - consumedBuilder_.setMessage(value); + tablesBuilder_.setMessage(index, value); } - bitField0_ |= 0x00000001; return this; } - public Builder setConsumed( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder builderForValue) { - if (consumedBuilder_ == null) { - consumed_ = builderForValue.build(); + public Builder setTables( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest.Builder builderForValue) { + if (tablesBuilder_ == null) { + ensureTablesIsMutable(); + tables_.set(index, builderForValue.build()); onChanged(); } else { - consumedBuilder_.setMessage(builderForValue.build()); + tablesBuilder_.setMessage(index, builderForValue.build()); } - bitField0_ |= 0x00000001; return this; } - public Builder mergeConsumed(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity value) { - if (consumedBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001) && - consumed_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance()) { - consumed_ = - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.newBuilder(consumed_).mergeFrom(value).buildPartial(); - } else { - consumed_ = value; + public Builder addTables(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest value) { + if (tablesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } + ensureTablesIsMutable(); + tables_.add(value); onChanged(); } else { - consumedBuilder_.mergeFrom(value); + tablesBuilder_.addMessage(value); } - bitField0_ |= 0x00000001; return this; } - public Builder clearConsumed() { - if (consumedBuilder_ == null) { - consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); + public Builder addTables( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest value) { + if (tablesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTablesIsMutable(); + tables_.add(index, value); onChanged(); } else { - consumedBuilder_.clear(); + tablesBuilder_.addMessage(index, value); } - bitField0_ = (bitField0_ & ~0x00000001); return this; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder getConsumedBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getConsumedFieldBuilder().getBuilder(); + public Builder addTables( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest.Builder builderForValue) { + if (tablesBuilder_ == null) { + ensureTablesIsMutable(); + tables_.add(builderForValue.build()); + onChanged(); + } else { + tablesBuilder_.addMessage(builderForValue.build()); + } + return this; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder() { - if (consumedBuilder_ != null) { - return consumedBuilder_.getMessageOrBuilder(); + public Builder addTables( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest.Builder builderForValue) { + if (tablesBuilder_ == null) { + ensureTablesIsMutable(); + tables_.add(index, builderForValue.build()); + onChanged(); } else { - return consumed_; + tablesBuilder_.addMessage(index, builderForValue.build()); } + return this; } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder> - getConsumedFieldBuilder() { - if (consumedBuilder_ == null) { - consumedBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder>( - consumed_, + public Builder addAllTables( + java.lang.Iterable values) { + if (tablesBuilder_ == null) { + ensureTablesIsMutable(); + super.addAll(values, tables_); + onChanged(); + } else { + tablesBuilder_.addAllMessages(values); + } + return this; + } + public Builder clearTables() { + if (tablesBuilder_ == null) { + tables_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + tablesBuilder_.clear(); + } + return this; + } + public Builder removeTables(int index) { + if (tablesBuilder_ == null) { + ensureTablesIsMutable(); + tables_.remove(index); + onChanged(); + } else { + tablesBuilder_.remove(index); + } + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest.Builder getTablesBuilder( + int index) { + return getTablesFieldBuilder().getBuilder(index); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequestOrBuilder getTablesOrBuilder( + int index) { + if (tablesBuilder_ == null) { + return tables_.get(index); } else { + return tablesBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getTablesOrBuilderList() { + if (tablesBuilder_ != null) { + return tablesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(tables_); + } + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest.Builder addTablesBuilder() { + return getTablesFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest.getDefaultInstance()); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest.Builder addTablesBuilder( + int index) { + return getTablesFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest.getDefaultInstance()); + } + public java.util.List + getTablesBuilderList() { + return getTablesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequestOrBuilder> + getTablesFieldBuilder() { + if (tablesBuilder_ == null) { + tablesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequestOrBuilder>( + tables_, + ((bitField0_ & 0x00000001) == 0x00000001), getParentForChildren(), isClean()); - consumed_ = null; + tables_ = null; } - return consumedBuilder_; + return tablesBuilder_; } - // optional bytes row = 2; - private com.google.protobuf.ByteString row_ = com.google.protobuf.ByteString.EMPTY; - public boolean hasRow() { + // optional string transaction_id = 2; + private java.lang.Object transactionId_ = ""; + public boolean hasTransactionId() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public com.google.protobuf.ByteString getRow() { - return row_; + public String getTransactionId() { + java.lang.Object ref = transactionId_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + transactionId_ = s; + return s; + } else { + return (String) ref; + } } - public Builder setRow(com.google.protobuf.ByteString value) { + public Builder setTransactionId(String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; - row_ = value; + transactionId_ = value; onChanged(); return this; } - public Builder clearRow() { + public Builder clearTransactionId() { bitField0_ = (bitField0_ & ~0x00000002); - row_ = getDefaultInstance().getRow(); + transactionId_ = getDefaultInstance().getTransactionId(); onChanged(); return this; } + void setTransactionId(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000002; + transactionId_ = value; + onChanged(); + } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.UpdateRowResponse) + // optional bool is_atomic = 3; + private boolean isAtomic_ ; + public boolean hasIsAtomic() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public boolean getIsAtomic() { + return isAtomic_; + } + public Builder setIsAtomic(boolean value) { + bitField0_ |= 0x00000004; + isAtomic_ = value; + onChanged(); + return this; + } + public Builder clearIsAtomic() { + bitField0_ = (bitField0_ & ~0x00000004); + isAtomic_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.BatchWriteRowRequest) } static { - defaultInstance = new UpdateRowResponse(true); + defaultInstance = new BatchWriteRowRequest(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.UpdateRowResponse) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.BatchWriteRowRequest) } - public interface PutRowRequestOrBuilder + public interface RowInBatchWriteRowResponseOrBuilder extends com.google.protobuf.MessageOrBuilder { - // required string table_name = 1; - boolean hasTableName(); - String getTableName(); - - // required bytes row = 2; - boolean hasRow(); - com.google.protobuf.ByteString getRow(); + // required bool is_ok = 1; + boolean hasIsOk(); + boolean getIsOk(); - // required .com.alicloud.openservices.tablestore.core.protocol.Condition condition = 3; - boolean hasCondition(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition getCondition(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConditionOrBuilder getConditionOrBuilder(); + // optional .com.alicloud.openservices.tablestore.core.protocol.Error error = 2; + boolean hasError(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error getError(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ErrorOrBuilder getErrorOrBuilder(); - // optional .com.alicloud.openservices.tablestore.core.protocol.ReturnContent return_content = 4; - boolean hasReturnContent(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent getReturnContent(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContentOrBuilder getReturnContentOrBuilder(); + // optional .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 3; + boolean hasConsumed(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder(); - // optional string transaction_id = 5; - boolean hasTransactionId(); - String getTransactionId(); + // optional bytes row = 4; + boolean hasRow(); + com.google.protobuf.ByteString getRow(); } - public static final class PutRowRequest extends + public static final class RowInBatchWriteRowResponse extends com.google.protobuf.GeneratedMessage - implements PutRowRequestOrBuilder { - // Use PutRowRequest.newBuilder() to construct. - private PutRowRequest(Builder builder) { + implements RowInBatchWriteRowResponseOrBuilder { + // Use RowInBatchWriteRowResponse.newBuilder() to construct. + private RowInBatchWriteRowResponse(Builder builder) { super(builder); } - private PutRowRequest(boolean noInit) {} + private RowInBatchWriteRowResponse(boolean noInit) {} - private static final PutRowRequest defaultInstance; - public static PutRowRequest getDefaultInstance() { + private static final RowInBatchWriteRowResponse defaultInstance; + public static RowInBatchWriteRowResponse getDefaultInstance() { return defaultInstance; } - public PutRowRequest getDefaultInstanceForType() { + public RowInBatchWriteRowResponse getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_PutRowRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBatchWriteRowResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_PutRowRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBatchWriteRowResponse_fieldAccessorTable; } private int bitField0_; - // required string table_name = 1; - public static final int TABLE_NAME_FIELD_NUMBER = 1; - private java.lang.Object tableName_; - public boolean hasTableName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getTableName() { - java.lang.Object ref = tableName_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - tableName_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getTableNameBytes() { - java.lang.Object ref = tableName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - tableName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + // required bool is_ok = 1; + public static final int IS_OK_FIELD_NUMBER = 1; + private boolean isOk_; + public boolean hasIsOk() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public boolean getIsOk() { + return isOk_; } - // required bytes row = 2; - public static final int ROW_FIELD_NUMBER = 2; - private com.google.protobuf.ByteString row_; - public boolean hasRow() { + // optional .com.alicloud.openservices.tablestore.core.protocol.Error error = 2; + public static final int ERROR_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error error_; + public boolean hasError() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public com.google.protobuf.ByteString getRow() { - return row_; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error getError() { + return error_; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ErrorOrBuilder getErrorOrBuilder() { + return error_; } - // required .com.alicloud.openservices.tablestore.core.protocol.Condition condition = 3; - public static final int CONDITION_FIELD_NUMBER = 3; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition condition_; - public boolean hasCondition() { + // optional .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 3; + public static final int CONSUMED_FIELD_NUMBER = 3; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity consumed_; + public boolean hasConsumed() { return ((bitField0_ & 0x00000004) == 0x00000004); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition getCondition() { - return condition_; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed() { + return consumed_; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConditionOrBuilder getConditionOrBuilder() { - return condition_; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder() { + return consumed_; } - // optional .com.alicloud.openservices.tablestore.core.protocol.ReturnContent return_content = 4; - public static final int RETURN_CONTENT_FIELD_NUMBER = 4; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent returnContent_; - public boolean hasReturnContent() { + // optional bytes row = 4; + public static final int ROW_FIELD_NUMBER = 4; + private com.google.protobuf.ByteString row_; + public boolean hasRow() { return ((bitField0_ & 0x00000008) == 0x00000008); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent getReturnContent() { - return returnContent_; - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContentOrBuilder getReturnContentOrBuilder() { - return returnContent_; - } - - // optional string transaction_id = 5; - public static final int TRANSACTION_ID_FIELD_NUMBER = 5; - private java.lang.Object transactionId_; - public boolean hasTransactionId() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - public String getTransactionId() { - java.lang.Object ref = transactionId_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - transactionId_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getTransactionIdBytes() { - java.lang.Object ref = transactionId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - transactionId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public com.google.protobuf.ByteString getRow() { + return row_; } private void initFields() { - tableName_ = ""; + isOk_ = false; + error_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.getDefaultInstance(); + consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); row_ = com.google.protobuf.ByteString.EMPTY; - condition_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.getDefaultInstance(); - returnContent_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.getDefaultInstance(); - transactionId_ = ""; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - if (!hasTableName()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasRow()) { + if (!hasIsOk()) { memoizedIsInitialized = 0; return false; } - if (!hasCondition()) { - memoizedIsInitialized = 0; - return false; + if (hasError()) { + if (!getError().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } } - if (!getCondition().isInitialized()) { - memoizedIsInitialized = 0; - return false; + if (hasConsumed()) { + if (!getConsumed().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } } memoizedIsInitialized = 1; return true; @@ -20763,19 +34017,16 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getTableNameBytes()); + output.writeBool(1, isOk_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, row_); + output.writeMessage(2, error_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeMessage(3, condition_); + output.writeMessage(3, consumed_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeMessage(4, returnContent_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeBytes(5, getTransactionIdBytes()); + output.writeBytes(4, row_); } getUnknownFields().writeTo(output); } @@ -20788,23 +34039,19 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getTableNameBytes()); + .computeBoolSize(1, isOk_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, row_); + .computeMessageSize(2, error_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, condition_); + .computeMessageSize(3, consumed_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, returnContent_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(5, getTransactionIdBytes()); + .computeBytesSize(4, row_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -20818,41 +34065,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -20861,7 +34108,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -20872,12 +34119,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -20887,7 +34134,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -20900,18 +34147,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequestOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_PutRowRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBatchWriteRowResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_PutRowRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBatchWriteRowResponse_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -20922,8 +34169,8 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getConditionFieldBuilder(); - getReturnContentFieldBuilder(); + getErrorFieldBuilder(); + getConsumedFieldBuilder(); } } private static Builder create() { @@ -20932,24 +34179,22 @@ private static Builder create() { public Builder clear() { super.clear(); - tableName_ = ""; + isOk_ = false; bitField0_ = (bitField0_ & ~0x00000001); - row_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - if (conditionBuilder_ == null) { - condition_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.getDefaultInstance(); + if (errorBuilder_ == null) { + error_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.getDefaultInstance(); } else { - conditionBuilder_.clear(); + errorBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000004); - if (returnContentBuilder_ == null) { - returnContent_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.getDefaultInstance(); + bitField0_ = (bitField0_ & ~0x00000002); + if (consumedBuilder_ == null) { + consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); } else { - returnContentBuilder_.clear(); + consumedBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000004); + row_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000008); - transactionId_ = ""; - bitField0_ = (bitField0_ & ~0x00000010); return this; } @@ -20959,24 +34204,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -20984,89 +34229,82 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRow return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest(this); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.tableName_ = tableName_; + result.isOk_ = isOk_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - result.row_ = row_; + if (errorBuilder_ == null) { + result.error_ = error_; + } else { + result.error_ = errorBuilder_.build(); + } if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } - if (conditionBuilder_ == null) { - result.condition_ = condition_; + if (consumedBuilder_ == null) { + result.consumed_ = consumed_; } else { - result.condition_ = conditionBuilder_.build(); + result.consumed_ = consumedBuilder_.build(); } if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; } - if (returnContentBuilder_ == null) { - result.returnContent_ = returnContent_; - } else { - result.returnContent_ = returnContentBuilder_.build(); - } - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000010; - } - result.transactionId_ = transactionId_; + result.row_ = row_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest.getDefaultInstance()) return this; - if (other.hasTableName()) { - setTableName(other.getTableName()); - } - if (other.hasRow()) { - setRow(other.getRow()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse.getDefaultInstance()) return this; + if (other.hasIsOk()) { + setIsOk(other.getIsOk()); } - if (other.hasCondition()) { - mergeCondition(other.getCondition()); + if (other.hasError()) { + mergeError(other.getError()); } - if (other.hasReturnContent()) { - mergeReturnContent(other.getReturnContent()); + if (other.hasConsumed()) { + mergeConsumed(other.getConsumed()); } - if (other.hasTransactionId()) { - setTransactionId(other.getTransactionId()); + if (other.hasRow()) { + setRow(other.getRow()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { - if (!hasTableName()) { - - return false; - } - if (!hasRow()) { + if (!hasIsOk()) { return false; } - if (!hasCondition()) { - - return false; + if (hasError()) { + if (!getError().isInitialized()) { + + return false; + } } - if (!getCondition().isInitialized()) { - - return false; + if (hasConsumed()) { + if (!getConsumed().isInitialized()) { + + return false; + } } return true; } @@ -21094,37 +34332,32 @@ public Builder mergeFrom( } break; } - case 10: { + case 8: { bitField0_ |= 0x00000001; - tableName_ = input.readBytes(); + isOk_ = input.readBool(); break; } case 18: { - bitField0_ |= 0x00000002; - row_ = input.readBytes(); - break; - } - case 26: { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.newBuilder(); - if (hasCondition()) { - subBuilder.mergeFrom(getCondition()); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.newBuilder(); + if (hasError()) { + subBuilder.mergeFrom(getError()); } input.readMessage(subBuilder, extensionRegistry); - setCondition(subBuilder.buildPartial()); + setError(subBuilder.buildPartial()); break; } - case 34: { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.newBuilder(); - if (hasReturnContent()) { - subBuilder.mergeFrom(getReturnContent()); + case 26: { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.newBuilder(); + if (hasConsumed()) { + subBuilder.mergeFrom(getConsumed()); } input.readMessage(subBuilder, extensionRegistry); - setReturnContent(subBuilder.buildPartial()); + setConsumed(subBuilder.buildPartial()); break; } - case 42: { - bitField0_ |= 0x00000010; - transactionId_ = input.readBytes(); + case 34: { + bitField0_ |= 0x00000008; + row_ = input.readBytes(); break; } } @@ -21133,373 +34366,359 @@ public Builder mergeFrom( private int bitField0_; - // required string table_name = 1; - private java.lang.Object tableName_ = ""; - public boolean hasTableName() { + // required bool is_ok = 1; + private boolean isOk_ ; + public boolean hasIsOk() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getTableName() { - java.lang.Object ref = tableName_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - tableName_ = s; - return s; - } else { - return (String) ref; - } - } - public Builder setTableName(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - tableName_ = value; - onChanged(); - return this; - } - public Builder clearTableName() { - bitField0_ = (bitField0_ & ~0x00000001); - tableName_ = getDefaultInstance().getTableName(); - onChanged(); - return this; + public boolean getIsOk() { + return isOk_; } - void setTableName(com.google.protobuf.ByteString value) { + public Builder setIsOk(boolean value) { bitField0_ |= 0x00000001; - tableName_ = value; - onChanged(); - } - - // required bytes row = 2; - private com.google.protobuf.ByteString row_ = com.google.protobuf.ByteString.EMPTY; - public boolean hasRow() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public com.google.protobuf.ByteString getRow() { - return row_; - } - public Builder setRow(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - row_ = value; + isOk_ = value; onChanged(); return this; } - public Builder clearRow() { - bitField0_ = (bitField0_ & ~0x00000002); - row_ = getDefaultInstance().getRow(); + public Builder clearIsOk() { + bitField0_ = (bitField0_ & ~0x00000001); + isOk_ = false; onChanged(); return this; } - // required .com.alicloud.openservices.tablestore.core.protocol.Condition condition = 3; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition condition_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.getDefaultInstance(); + // optional .com.alicloud.openservices.tablestore.core.protocol.Error error = 2; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error error_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConditionOrBuilder> conditionBuilder_; - public boolean hasCondition() { - return ((bitField0_ & 0x00000004) == 0x00000004); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ErrorOrBuilder> errorBuilder_; + public boolean hasError() { + return ((bitField0_ & 0x00000002) == 0x00000002); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition getCondition() { - if (conditionBuilder_ == null) { - return condition_; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error getError() { + if (errorBuilder_ == null) { + return error_; } else { - return conditionBuilder_.getMessage(); + return errorBuilder_.getMessage(); } } - public Builder setCondition(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition value) { - if (conditionBuilder_ == null) { + public Builder setError(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error value) { + if (errorBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - condition_ = value; + error_ = value; onChanged(); } else { - conditionBuilder_.setMessage(value); + errorBuilder_.setMessage(value); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; return this; } - public Builder setCondition( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.Builder builderForValue) { - if (conditionBuilder_ == null) { - condition_ = builderForValue.build(); + public Builder setError( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.Builder builderForValue) { + if (errorBuilder_ == null) { + error_ = builderForValue.build(); onChanged(); } else { - conditionBuilder_.setMessage(builderForValue.build()); + errorBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; return this; } - public Builder mergeCondition(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition value) { - if (conditionBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004) && - condition_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.getDefaultInstance()) { - condition_ = - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.newBuilder(condition_).mergeFrom(value).buildPartial(); + public Builder mergeError(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error value) { + if (errorBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002) && + error_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.getDefaultInstance()) { + error_ = + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.newBuilder(error_).mergeFrom(value).buildPartial(); } else { - condition_ = value; + error_ = value; } onChanged(); } else { - conditionBuilder_.mergeFrom(value); + errorBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; return this; } - public Builder clearCondition() { - if (conditionBuilder_ == null) { - condition_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.getDefaultInstance(); + public Builder clearError() { + if (errorBuilder_ == null) { + error_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.getDefaultInstance(); onChanged(); } else { - conditionBuilder_.clear(); + errorBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000002); return this; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.Builder getConditionBuilder() { - bitField0_ |= 0x00000004; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.Builder getErrorBuilder() { + bitField0_ |= 0x00000002; onChanged(); - return getConditionFieldBuilder().getBuilder(); + return getErrorFieldBuilder().getBuilder(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConditionOrBuilder getConditionOrBuilder() { - if (conditionBuilder_ != null) { - return conditionBuilder_.getMessageOrBuilder(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ErrorOrBuilder getErrorOrBuilder() { + if (errorBuilder_ != null) { + return errorBuilder_.getMessageOrBuilder(); } else { - return condition_; + return error_; } } private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConditionOrBuilder> - getConditionFieldBuilder() { - if (conditionBuilder_ == null) { - conditionBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConditionOrBuilder>( - condition_, + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ErrorOrBuilder> + getErrorFieldBuilder() { + if (errorBuilder_ == null) { + errorBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ErrorOrBuilder>( + error_, getParentForChildren(), isClean()); - condition_ = null; + error_ = null; } - return conditionBuilder_; + return errorBuilder_; } - // optional .com.alicloud.openservices.tablestore.core.protocol.ReturnContent return_content = 4; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent returnContent_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.getDefaultInstance(); + // optional .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 3; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContentOrBuilder> returnContentBuilder_; - public boolean hasReturnContent() { - return ((bitField0_ & 0x00000008) == 0x00000008); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder> consumedBuilder_; + public boolean hasConsumed() { + return ((bitField0_ & 0x00000004) == 0x00000004); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent getReturnContent() { - if (returnContentBuilder_ == null) { - return returnContent_; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed() { + if (consumedBuilder_ == null) { + return consumed_; } else { - return returnContentBuilder_.getMessage(); + return consumedBuilder_.getMessage(); } } - public Builder setReturnContent(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent value) { - if (returnContentBuilder_ == null) { + public Builder setConsumed(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity value) { + if (consumedBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - returnContent_ = value; + consumed_ = value; onChanged(); } else { - returnContentBuilder_.setMessage(value); + consumedBuilder_.setMessage(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000004; return this; } - public Builder setReturnContent( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.Builder builderForValue) { - if (returnContentBuilder_ == null) { - returnContent_ = builderForValue.build(); + public Builder setConsumed( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder builderForValue) { + if (consumedBuilder_ == null) { + consumed_ = builderForValue.build(); onChanged(); } else { - returnContentBuilder_.setMessage(builderForValue.build()); + consumedBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000004; return this; } - public Builder mergeReturnContent(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent value) { - if (returnContentBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008) && - returnContent_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.getDefaultInstance()) { - returnContent_ = - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.newBuilder(returnContent_).mergeFrom(value).buildPartial(); + public Builder mergeConsumed(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity value) { + if (consumedBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004) && + consumed_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance()) { + consumed_ = + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.newBuilder(consumed_).mergeFrom(value).buildPartial(); } else { - returnContent_ = value; + consumed_ = value; } onChanged(); } else { - returnContentBuilder_.mergeFrom(value); + consumedBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000004; return this; } - public Builder clearReturnContent() { - if (returnContentBuilder_ == null) { - returnContent_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.getDefaultInstance(); + public Builder clearConsumed() { + if (consumedBuilder_ == null) { + consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); onChanged(); } else { - returnContentBuilder_.clear(); + consumedBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000004); return this; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.Builder getReturnContentBuilder() { - bitField0_ |= 0x00000008; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder getConsumedBuilder() { + bitField0_ |= 0x00000004; onChanged(); - return getReturnContentFieldBuilder().getBuilder(); + return getConsumedFieldBuilder().getBuilder(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContentOrBuilder getReturnContentOrBuilder() { - if (returnContentBuilder_ != null) { - return returnContentBuilder_.getMessageOrBuilder(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder() { + if (consumedBuilder_ != null) { + return consumedBuilder_.getMessageOrBuilder(); } else { - return returnContent_; + return consumed_; } } private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContentOrBuilder> - getReturnContentFieldBuilder() { - if (returnContentBuilder_ == null) { - returnContentBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContentOrBuilder>( - returnContent_, + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder> + getConsumedFieldBuilder() { + if (consumedBuilder_ == null) { + consumedBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder>( + consumed_, getParentForChildren(), isClean()); - returnContent_ = null; + consumed_ = null; } - return returnContentBuilder_; + return consumedBuilder_; } - // optional string transaction_id = 5; - private java.lang.Object transactionId_ = ""; - public boolean hasTransactionId() { - return ((bitField0_ & 0x00000010) == 0x00000010); + // optional bytes row = 4; + private com.google.protobuf.ByteString row_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasRow() { + return ((bitField0_ & 0x00000008) == 0x00000008); } - public String getTransactionId() { - java.lang.Object ref = transactionId_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - transactionId_ = s; - return s; - } else { - return (String) ref; - } + public com.google.protobuf.ByteString getRow() { + return row_; } - public Builder setTransactionId(String value) { + public Builder setRow(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000010; - transactionId_ = value; + bitField0_ |= 0x00000008; + row_ = value; onChanged(); return this; } - public Builder clearTransactionId() { - bitField0_ = (bitField0_ & ~0x00000010); - transactionId_ = getDefaultInstance().getTransactionId(); + public Builder clearRow() { + bitField0_ = (bitField0_ & ~0x00000008); + row_ = getDefaultInstance().getRow(); onChanged(); return this; } - void setTransactionId(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000010; - transactionId_ = value; - onChanged(); - } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.PutRowRequest) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.RowInBatchWriteRowResponse) } static { - defaultInstance = new PutRowRequest(true); + defaultInstance = new RowInBatchWriteRowResponse(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.PutRowRequest) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.RowInBatchWriteRowResponse) } - public interface PutRowResponseOrBuilder + public interface TableInBatchWriteRowResponseOrBuilder extends com.google.protobuf.MessageOrBuilder { - // required .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 1; - boolean hasConsumed(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder(); + // required string table_name = 1; + boolean hasTableName(); + String getTableName(); - // optional bytes row = 2; - boolean hasRow(); - com.google.protobuf.ByteString getRow(); + // repeated .com.alicloud.openservices.tablestore.core.protocol.RowInBatchWriteRowResponse rows = 2; + java.util.List + getRowsList(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse getRows(int index); + int getRowsCount(); + java.util.List + getRowsOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponseOrBuilder getRowsOrBuilder( + int index); } - public static final class PutRowResponse extends + public static final class TableInBatchWriteRowResponse extends com.google.protobuf.GeneratedMessage - implements PutRowResponseOrBuilder { - // Use PutRowResponse.newBuilder() to construct. - private PutRowResponse(Builder builder) { + implements TableInBatchWriteRowResponseOrBuilder { + // Use TableInBatchWriteRowResponse.newBuilder() to construct. + private TableInBatchWriteRowResponse(Builder builder) { super(builder); } - private PutRowResponse(boolean noInit) {} + private TableInBatchWriteRowResponse(boolean noInit) {} - private static final PutRowResponse defaultInstance; - public static PutRowResponse getDefaultInstance() { + private static final TableInBatchWriteRowResponse defaultInstance; + public static TableInBatchWriteRowResponse getDefaultInstance() { return defaultInstance; } - public PutRowResponse getDefaultInstanceForType() { + public TableInBatchWriteRowResponse getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_PutRowResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TableInBatchWriteRowResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_PutRowResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TableInBatchWriteRowResponse_fieldAccessorTable; } private int bitField0_; - // required .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 1; - public static final int CONSUMED_FIELD_NUMBER = 1; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity consumed_; - public boolean hasConsumed() { + // required string table_name = 1; + public static final int TABLE_NAME_FIELD_NUMBER = 1; + private java.lang.Object tableName_; + public boolean hasTableName() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed() { - return consumed_; + public String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + tableName_ = s; + } + return s; + } } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder() { - return consumed_; + private com.google.protobuf.ByteString getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - // optional bytes row = 2; - public static final int ROW_FIELD_NUMBER = 2; - private com.google.protobuf.ByteString row_; - public boolean hasRow() { - return ((bitField0_ & 0x00000002) == 0x00000002); + // repeated .com.alicloud.openservices.tablestore.core.protocol.RowInBatchWriteRowResponse rows = 2; + public static final int ROWS_FIELD_NUMBER = 2; + private java.util.List rows_; + public java.util.List getRowsList() { + return rows_; } - public com.google.protobuf.ByteString getRow() { - return row_; + public java.util.List + getRowsOrBuilderList() { + return rows_; + } + public int getRowsCount() { + return rows_.size(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse getRows(int index) { + return rows_.get(index); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponseOrBuilder getRowsOrBuilder( + int index) { + return rows_.get(index); } private void initFields() { - consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); - row_ = com.google.protobuf.ByteString.EMPTY; + tableName_ = ""; + rows_ = java.util.Collections.emptyList(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - if (!hasConsumed()) { + if (!hasTableName()) { memoizedIsInitialized = 0; return false; } - if (!getConsumed().isInitialized()) { - memoizedIsInitialized = 0; - return false; + for (int i = 0; i < getRowsCount(); i++) { + if (!getRows(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } } memoizedIsInitialized = 1; return true; @@ -21509,10 +34728,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeMessage(1, consumed_); + output.writeBytes(1, getTableNameBytes()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, row_); + for (int i = 0; i < rows_.size(); i++) { + output.writeMessage(2, rows_.get(i)); } getUnknownFields().writeTo(output); } @@ -21525,11 +34744,11 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, consumed_); + .computeBytesSize(1, getTableNameBytes()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { + for (int i = 0; i < rows_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, row_); + .computeMessageSize(2, rows_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -21543,41 +34762,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -21586,7 +34805,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -21597,12 +34816,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -21612,7 +34831,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -21625,18 +34844,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponseOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_PutRowResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TableInBatchWriteRowResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_PutRowResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TableInBatchWriteRowResponse_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -21647,7 +34866,7 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getConsumedFieldBuilder(); + getRowsFieldBuilder(); } } private static Builder create() { @@ -21656,14 +34875,14 @@ private static Builder create() { public Builder clear() { super.clear(); - if (consumedBuilder_ == null) { - consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); + tableName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + if (rowsBuilder_ == null) { + rows_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); } else { - consumedBuilder_.clear(); + rowsBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000001); - row_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -21673,24 +34892,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -21698,56 +34917,82 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRow return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse(this); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - if (consumedBuilder_ == null) { - result.consumed_ = consumed_; + result.tableName_ = tableName_; + if (rowsBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { + rows_ = java.util.Collections.unmodifiableList(rows_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.rows_ = rows_; } else { - result.consumed_ = consumedBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; + result.rows_ = rowsBuilder_.build(); } - result.row_ = row_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse.getDefaultInstance()) return this; - if (other.hasConsumed()) { - mergeConsumed(other.getConsumed()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse.getDefaultInstance()) return this; + if (other.hasTableName()) { + setTableName(other.getTableName()); } - if (other.hasRow()) { - setRow(other.getRow()); + if (rowsBuilder_ == null) { + if (!other.rows_.isEmpty()) { + if (rows_.isEmpty()) { + rows_ = other.rows_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureRowsIsMutable(); + rows_.addAll(other.rows_); + } + onChanged(); + } + } else { + if (!other.rows_.isEmpty()) { + if (rowsBuilder_.isEmpty()) { + rowsBuilder_.dispose(); + rowsBuilder_ = null; + rows_ = other.rows_; + bitField0_ = (bitField0_ & ~0x00000002); + rowsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getRowsFieldBuilder() : null; + } else { + rowsBuilder_.addAllMessages(other.rows_); + } + } } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { - if (!hasConsumed()) { + if (!hasTableName()) { return false; } - if (!getConsumed().isInitialized()) { - - return false; + for (int i = 0; i < getRowsCount(); i++) { + if (!getRows(i).isInitialized()) { + + return false; + } } return true; } @@ -21776,17 +35021,14 @@ public Builder mergeFrom( break; } case 10: { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.newBuilder(); - if (hasConsumed()) { - subBuilder.mergeFrom(getConsumed()); - } - input.readMessage(subBuilder, extensionRegistry); - setConsumed(subBuilder.buildPartial()); + bitField0_ |= 0x00000001; + tableName_ = input.readBytes(); break; } case 18: { - bitField0_ |= 0x00000002; - row_ = input.readBytes(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addRows(subBuilder.buildPartial()); break; } } @@ -21795,312 +35037,314 @@ public Builder mergeFrom( private int bitField0_; - // required .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 1; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder> consumedBuilder_; - public boolean hasConsumed() { + // required string table_name = 1; + private java.lang.Object tableName_ = ""; + public boolean hasTableName() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed() { - if (consumedBuilder_ == null) { - return consumed_; + public String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + tableName_ = s; + return s; } else { - return consumedBuilder_.getMessage(); + return (String) ref; } } - public Builder setConsumed(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity value) { - if (consumedBuilder_ == null) { + public Builder setTableName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + return this; + } + public Builder clearTableName() { + bitField0_ = (bitField0_ & ~0x00000001); + tableName_ = getDefaultInstance().getTableName(); + onChanged(); + return this; + } + void setTableName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.RowInBatchWriteRowResponse rows = 2; + private java.util.List rows_ = + java.util.Collections.emptyList(); + private void ensureRowsIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + rows_ = new java.util.ArrayList(rows_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponseOrBuilder> rowsBuilder_; + + public java.util.List getRowsList() { + if (rowsBuilder_ == null) { + return java.util.Collections.unmodifiableList(rows_); + } else { + return rowsBuilder_.getMessageList(); + } + } + public int getRowsCount() { + if (rowsBuilder_ == null) { + return rows_.size(); + } else { + return rowsBuilder_.getCount(); + } + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse getRows(int index) { + if (rowsBuilder_ == null) { + return rows_.get(index); + } else { + return rowsBuilder_.getMessage(index); + } + } + public Builder setRows( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse value) { + if (rowsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - consumed_ = value; + ensureRowsIsMutable(); + rows_.set(index, value); onChanged(); } else { - consumedBuilder_.setMessage(value); + rowsBuilder_.setMessage(index, value); } - bitField0_ |= 0x00000001; return this; } - public Builder setConsumed( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder builderForValue) { - if (consumedBuilder_ == null) { - consumed_ = builderForValue.build(); + public Builder setRows( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse.Builder builderForValue) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + rows_.set(index, builderForValue.build()); + onChanged(); + } else { + rowsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + public Builder addRows(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse value) { + if (rowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRowsIsMutable(); + rows_.add(value); + onChanged(); + } else { + rowsBuilder_.addMessage(value); + } + return this; + } + public Builder addRows( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse value) { + if (rowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRowsIsMutable(); + rows_.add(index, value); + onChanged(); + } else { + rowsBuilder_.addMessage(index, value); + } + return this; + } + public Builder addRows( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse.Builder builderForValue) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + rows_.add(builderForValue.build()); + onChanged(); + } else { + rowsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + public Builder addRows( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse.Builder builderForValue) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + rows_.add(index, builderForValue.build()); + onChanged(); + } else { + rowsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAllRows( + java.lang.Iterable values) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + super.addAll(values, rows_); onChanged(); } else { - consumedBuilder_.setMessage(builderForValue.build()); + rowsBuilder_.addAllMessages(values); } - bitField0_ |= 0x00000001; return this; } - public Builder mergeConsumed(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity value) { - if (consumedBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001) && - consumed_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance()) { - consumed_ = - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.newBuilder(consumed_).mergeFrom(value).buildPartial(); - } else { - consumed_ = value; - } + public Builder clearRows() { + if (rowsBuilder_ == null) { + rows_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { - consumedBuilder_.mergeFrom(value); + rowsBuilder_.clear(); } - bitField0_ |= 0x00000001; return this; } - public Builder clearConsumed() { - if (consumedBuilder_ == null) { - consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); + public Builder removeRows(int index) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + rows_.remove(index); onChanged(); } else { - consumedBuilder_.clear(); + rowsBuilder_.remove(index); } - bitField0_ = (bitField0_ & ~0x00000001); return this; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder getConsumedBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getConsumedFieldBuilder().getBuilder(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse.Builder getRowsBuilder( + int index) { + return getRowsFieldBuilder().getBuilder(index); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder() { - if (consumedBuilder_ != null) { - return consumedBuilder_.getMessageOrBuilder(); - } else { - return consumed_; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponseOrBuilder getRowsOrBuilder( + int index) { + if (rowsBuilder_ == null) { + return rows_.get(index); } else { + return rowsBuilder_.getMessageOrBuilder(index); } } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder> - getConsumedFieldBuilder() { - if (consumedBuilder_ == null) { - consumedBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder>( - consumed_, - getParentForChildren(), - isClean()); - consumed_ = null; + public java.util.List + getRowsOrBuilderList() { + if (rowsBuilder_ != null) { + return rowsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rows_); } - return consumedBuilder_; } - - // optional bytes row = 2; - private com.google.protobuf.ByteString row_ = com.google.protobuf.ByteString.EMPTY; - public boolean hasRow() { - return ((bitField0_ & 0x00000002) == 0x00000002); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse.Builder addRowsBuilder() { + return getRowsFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse.getDefaultInstance()); } - public com.google.protobuf.ByteString getRow() { - return row_; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse.Builder addRowsBuilder( + int index) { + return getRowsFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse.getDefaultInstance()); } - public Builder setRow(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - row_ = value; - onChanged(); - return this; + public java.util.List + getRowsBuilderList() { + return getRowsFieldBuilder().getBuilderList(); } - public Builder clearRow() { - bitField0_ = (bitField0_ & ~0x00000002); - row_ = getDefaultInstance().getRow(); - onChanged(); - return this; + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponseOrBuilder> + getRowsFieldBuilder() { + if (rowsBuilder_ == null) { + rowsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponseOrBuilder>( + rows_, + ((bitField0_ & 0x00000002) == 0x00000002), + getParentForChildren(), + isClean()); + rows_ = null; + } + return rowsBuilder_; } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.PutRowResponse) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.TableInBatchWriteRowResponse) } static { - defaultInstance = new PutRowResponse(true); + defaultInstance = new TableInBatchWriteRowResponse(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.PutRowResponse) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.TableInBatchWriteRowResponse) } - public interface DeleteRowRequestOrBuilder + public interface BatchWriteRowResponseOrBuilder extends com.google.protobuf.MessageOrBuilder { - // required string table_name = 1; - boolean hasTableName(); - String getTableName(); - - // required bytes primary_key = 2; - boolean hasPrimaryKey(); - com.google.protobuf.ByteString getPrimaryKey(); - - // required .com.alicloud.openservices.tablestore.core.protocol.Condition condition = 3; - boolean hasCondition(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition getCondition(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConditionOrBuilder getConditionOrBuilder(); - - // optional .com.alicloud.openservices.tablestore.core.protocol.ReturnContent return_content = 4; - boolean hasReturnContent(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent getReturnContent(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContentOrBuilder getReturnContentOrBuilder(); - - // optional string transaction_id = 5; - boolean hasTransactionId(); - String getTransactionId(); + // repeated .com.alicloud.openservices.tablestore.core.protocol.TableInBatchWriteRowResponse tables = 1; + java.util.List + getTablesList(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse getTables(int index); + int getTablesCount(); + java.util.List + getTablesOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponseOrBuilder getTablesOrBuilder( + int index); } - public static final class DeleteRowRequest extends + public static final class BatchWriteRowResponse extends com.google.protobuf.GeneratedMessage - implements DeleteRowRequestOrBuilder { - // Use DeleteRowRequest.newBuilder() to construct. - private DeleteRowRequest(Builder builder) { + implements BatchWriteRowResponseOrBuilder { + // Use BatchWriteRowResponse.newBuilder() to construct. + private BatchWriteRowResponse(Builder builder) { super(builder); } - private DeleteRowRequest(boolean noInit) {} + private BatchWriteRowResponse(boolean noInit) {} - private static final DeleteRowRequest defaultInstance; - public static DeleteRowRequest getDefaultInstance() { + private static final BatchWriteRowResponse defaultInstance; + public static BatchWriteRowResponse getDefaultInstance() { return defaultInstance; } - public DeleteRowRequest getDefaultInstanceForType() { + public BatchWriteRowResponse getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteRowRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_BatchWriteRowResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteRowRequest_fieldAccessorTable; - } - - private int bitField0_; - // required string table_name = 1; - public static final int TABLE_NAME_FIELD_NUMBER = 1; - private java.lang.Object tableName_; - public boolean hasTableName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getTableName() { - java.lang.Object ref = tableName_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - tableName_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getTableNameBytes() { - java.lang.Object ref = tableName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - tableName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // required bytes primary_key = 2; - public static final int PRIMARY_KEY_FIELD_NUMBER = 2; - private com.google.protobuf.ByteString primaryKey_; - public boolean hasPrimaryKey() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public com.google.protobuf.ByteString getPrimaryKey() { - return primaryKey_; - } - - // required .com.alicloud.openservices.tablestore.core.protocol.Condition condition = 3; - public static final int CONDITION_FIELD_NUMBER = 3; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition condition_; - public boolean hasCondition() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition getCondition() { - return condition_; - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConditionOrBuilder getConditionOrBuilder() { - return condition_; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_BatchWriteRowResponse_fieldAccessorTable; } - // optional .com.alicloud.openservices.tablestore.core.protocol.ReturnContent return_content = 4; - public static final int RETURN_CONTENT_FIELD_NUMBER = 4; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent returnContent_; - public boolean hasReturnContent() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent getReturnContent() { - return returnContent_; + // repeated .com.alicloud.openservices.tablestore.core.protocol.TableInBatchWriteRowResponse tables = 1; + public static final int TABLES_FIELD_NUMBER = 1; + private java.util.List tables_; + public java.util.List getTablesList() { + return tables_; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContentOrBuilder getReturnContentOrBuilder() { - return returnContent_; + public java.util.List + getTablesOrBuilderList() { + return tables_; } - - // optional string transaction_id = 5; - public static final int TRANSACTION_ID_FIELD_NUMBER = 5; - private java.lang.Object transactionId_; - public boolean hasTransactionId() { - return ((bitField0_ & 0x00000010) == 0x00000010); + public int getTablesCount() { + return tables_.size(); } - public String getTransactionId() { - java.lang.Object ref = transactionId_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - transactionId_ = s; - } - return s; - } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse getTables(int index) { + return tables_.get(index); } - private com.google.protobuf.ByteString getTransactionIdBytes() { - java.lang.Object ref = transactionId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - transactionId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponseOrBuilder getTablesOrBuilder( + int index) { + return tables_.get(index); } private void initFields() { - tableName_ = ""; - primaryKey_ = com.google.protobuf.ByteString.EMPTY; - condition_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.getDefaultInstance(); - returnContent_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.getDefaultInstance(); - transactionId_ = ""; + tables_ = java.util.Collections.emptyList(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - if (!hasTableName()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasPrimaryKey()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasCondition()) { - memoizedIsInitialized = 0; - return false; - } - if (!getCondition().isInitialized()) { - memoizedIsInitialized = 0; - return false; + for (int i = 0; i < getTablesCount(); i++) { + if (!getTables(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } } memoizedIsInitialized = 1; return true; @@ -22109,20 +35353,8 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getTableNameBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, primaryKey_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeMessage(3, condition_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeMessage(4, returnContent_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeBytes(5, getTransactionIdBytes()); + for (int i = 0; i < tables_.size(); i++) { + output.writeMessage(1, tables_.get(i)); } getUnknownFields().writeTo(output); } @@ -22133,25 +35365,9 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getTableNameBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, primaryKey_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, condition_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, returnContent_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { + for (int i = 0; i < tables_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(5, getTransactionIdBytes()); + .computeMessageSize(1, tables_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -22165,41 +35381,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -22208,7 +35424,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -22219,12 +35435,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -22234,7 +35450,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -22247,18 +35463,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequestOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteRowRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_BatchWriteRowResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteRowRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_BatchWriteRowResponse_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -22269,8 +35485,7 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getConditionFieldBuilder(); - getReturnContentFieldBuilder(); + getTablesFieldBuilder(); } } private static Builder create() { @@ -22279,24 +35494,12 @@ private static Builder create() { public Builder clear() { super.clear(); - tableName_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - primaryKey_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - if (conditionBuilder_ == null) { - condition_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.getDefaultInstance(); - } else { - conditionBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - if (returnContentBuilder_ == null) { - returnContent_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.getDefaultInstance(); + if (tablesBuilder_ == null) { + tables_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); } else { - returnContentBuilder_.clear(); + tablesBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000008); - transactionId_ = ""; - bitField0_ = (bitField0_ & ~0x00000010); return this; } @@ -22306,24 +35509,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -22331,89 +35534,69 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Delete return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest(this); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse(this); int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.tableName_ = tableName_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.primaryKey_ = primaryKey_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - if (conditionBuilder_ == null) { - result.condition_ = condition_; - } else { - result.condition_ = conditionBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - if (returnContentBuilder_ == null) { - result.returnContent_ = returnContent_; + if (tablesBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + tables_ = java.util.Collections.unmodifiableList(tables_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.tables_ = tables_; } else { - result.returnContent_ = returnContentBuilder_.build(); - } - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000010; + result.tables_ = tablesBuilder_.build(); } - result.transactionId_ = transactionId_; - result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest.getDefaultInstance()) return this; - if (other.hasTableName()) { - setTableName(other.getTableName()); - } - if (other.hasPrimaryKey()) { - setPrimaryKey(other.getPrimaryKey()); - } - if (other.hasCondition()) { - mergeCondition(other.getCondition()); - } - if (other.hasReturnContent()) { - mergeReturnContent(other.getReturnContent()); - } - if (other.hasTransactionId()) { - setTransactionId(other.getTransactionId()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse.getDefaultInstance()) return this; + if (tablesBuilder_ == null) { + if (!other.tables_.isEmpty()) { + if (tables_.isEmpty()) { + tables_ = other.tables_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTablesIsMutable(); + tables_.addAll(other.tables_); + } + onChanged(); + } + } else { + if (!other.tables_.isEmpty()) { + if (tablesBuilder_.isEmpty()) { + tablesBuilder_.dispose(); + tablesBuilder_ = null; + tables_ = other.tables_; + bitField0_ = (bitField0_ & ~0x00000001); + tablesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getTablesFieldBuilder() : null; + } else { + tablesBuilder_.addAllMessages(other.tables_); + } + } } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { - if (!hasTableName()) { - - return false; - } - if (!hasPrimaryKey()) { - - return false; - } - if (!hasCondition()) { - - return false; - } - if (!getCondition().isInitialized()) { - - return false; + for (int i = 0; i < getTablesCount(); i++) { + if (!getTables(i).isInitialized()) { + + return false; + } } return true; } @@ -22442,36 +35625,9 @@ public Builder mergeFrom( break; } case 10: { - bitField0_ |= 0x00000001; - tableName_ = input.readBytes(); - break; - } - case 18: { - bitField0_ |= 0x00000002; - primaryKey_ = input.readBytes(); - break; - } - case 26: { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.newBuilder(); - if (hasCondition()) { - subBuilder.mergeFrom(getCondition()); - } - input.readMessage(subBuilder, extensionRegistry); - setCondition(subBuilder.buildPartial()); - break; - } - case 34: { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.newBuilder(); - if (hasReturnContent()) { - subBuilder.mergeFrom(getReturnContent()); - } + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse.newBuilder(); input.readMessage(subBuilder, extensionRegistry); - setReturnContent(subBuilder.buildPartial()); - break; - } - case 42: { - bitField0_ |= 0x00000010; - transactionId_ = input.readBytes(); + addTables(subBuilder.buildPartial()); break; } } @@ -22480,371 +35636,547 @@ public Builder mergeFrom( private int bitField0_; - // required string table_name = 1; - private java.lang.Object tableName_ = ""; - public boolean hasTableName() { - return ((bitField0_ & 0x00000001) == 0x00000001); + // repeated .com.alicloud.openservices.tablestore.core.protocol.TableInBatchWriteRowResponse tables = 1; + private java.util.List tables_ = + java.util.Collections.emptyList(); + private void ensureTablesIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + tables_ = new java.util.ArrayList(tables_); + bitField0_ |= 0x00000001; + } } - public String getTableName() { - java.lang.Object ref = tableName_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - tableName_ = s; - return s; + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponseOrBuilder> tablesBuilder_; + + public java.util.List getTablesList() { + if (tablesBuilder_ == null) { + return java.util.Collections.unmodifiableList(tables_); } else { - return (String) ref; + return tablesBuilder_.getMessageList(); } } - public Builder setTableName(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - tableName_ = value; - onChanged(); - return this; - } - public Builder clearTableName() { - bitField0_ = (bitField0_ & ~0x00000001); - tableName_ = getDefaultInstance().getTableName(); - onChanged(); - return this; - } - void setTableName(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; - tableName_ = value; - onChanged(); - } - - // required bytes primary_key = 2; - private com.google.protobuf.ByteString primaryKey_ = com.google.protobuf.ByteString.EMPTY; - public boolean hasPrimaryKey() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public com.google.protobuf.ByteString getPrimaryKey() { - return primaryKey_; - } - public Builder setPrimaryKey(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - primaryKey_ = value; - onChanged(); - return this; - } - public Builder clearPrimaryKey() { - bitField0_ = (bitField0_ & ~0x00000002); - primaryKey_ = getDefaultInstance().getPrimaryKey(); - onChanged(); - return this; - } - - // required .com.alicloud.openservices.tablestore.core.protocol.Condition condition = 3; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition condition_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConditionOrBuilder> conditionBuilder_; - public boolean hasCondition() { - return ((bitField0_ & 0x00000004) == 0x00000004); + public int getTablesCount() { + if (tablesBuilder_ == null) { + return tables_.size(); + } else { + return tablesBuilder_.getCount(); + } } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition getCondition() { - if (conditionBuilder_ == null) { - return condition_; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse getTables(int index) { + if (tablesBuilder_ == null) { + return tables_.get(index); } else { - return conditionBuilder_.getMessage(); + return tablesBuilder_.getMessage(index); } } - public Builder setCondition(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition value) { - if (conditionBuilder_ == null) { + public Builder setTables( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse value) { + if (tablesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - condition_ = value; + ensureTablesIsMutable(); + tables_.set(index, value); onChanged(); } else { - conditionBuilder_.setMessage(value); + tablesBuilder_.setMessage(index, value); } - bitField0_ |= 0x00000004; return this; } - public Builder setCondition( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.Builder builderForValue) { - if (conditionBuilder_ == null) { - condition_ = builderForValue.build(); + public Builder setTables( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse.Builder builderForValue) { + if (tablesBuilder_ == null) { + ensureTablesIsMutable(); + tables_.set(index, builderForValue.build()); onChanged(); } else { - conditionBuilder_.setMessage(builderForValue.build()); + tablesBuilder_.setMessage(index, builderForValue.build()); } - bitField0_ |= 0x00000004; return this; } - public Builder mergeCondition(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition value) { - if (conditionBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004) && - condition_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.getDefaultInstance()) { - condition_ = - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.newBuilder(condition_).mergeFrom(value).buildPartial(); - } else { - condition_ = value; + public Builder addTables(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse value) { + if (tablesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } + ensureTablesIsMutable(); + tables_.add(value); onChanged(); } else { - conditionBuilder_.mergeFrom(value); + tablesBuilder_.addMessage(value); } - bitField0_ |= 0x00000004; return this; } - public Builder clearCondition() { - if (conditionBuilder_ == null) { - condition_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.getDefaultInstance(); + public Builder addTables( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse value) { + if (tablesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTablesIsMutable(); + tables_.add(index, value); onChanged(); } else { - conditionBuilder_.clear(); + tablesBuilder_.addMessage(index, value); } - bitField0_ = (bitField0_ & ~0x00000004); return this; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.Builder getConditionBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getConditionFieldBuilder().getBuilder(); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConditionOrBuilder getConditionOrBuilder() { - if (conditionBuilder_ != null) { - return conditionBuilder_.getMessageOrBuilder(); - } else { - return condition_; - } - } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConditionOrBuilder> - getConditionFieldBuilder() { - if (conditionBuilder_ == null) { - conditionBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConditionOrBuilder>( - condition_, - getParentForChildren(), - isClean()); - condition_ = null; - } - return conditionBuilder_; - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.ReturnContent return_content = 4; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent returnContent_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContentOrBuilder> returnContentBuilder_; - public boolean hasReturnContent() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent getReturnContent() { - if (returnContentBuilder_ == null) { - return returnContent_; + public Builder addTables( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse.Builder builderForValue) { + if (tablesBuilder_ == null) { + ensureTablesIsMutable(); + tables_.add(builderForValue.build()); + onChanged(); } else { - return returnContentBuilder_.getMessage(); + tablesBuilder_.addMessage(builderForValue.build()); } + return this; } - public Builder setReturnContent(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent value) { - if (returnContentBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - returnContent_ = value; + public Builder addTables( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse.Builder builderForValue) { + if (tablesBuilder_ == null) { + ensureTablesIsMutable(); + tables_.add(index, builderForValue.build()); onChanged(); } else { - returnContentBuilder_.setMessage(value); + tablesBuilder_.addMessage(index, builderForValue.build()); } - bitField0_ |= 0x00000008; return this; } - public Builder setReturnContent( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.Builder builderForValue) { - if (returnContentBuilder_ == null) { - returnContent_ = builderForValue.build(); + public Builder addAllTables( + java.lang.Iterable values) { + if (tablesBuilder_ == null) { + ensureTablesIsMutable(); + super.addAll(values, tables_); onChanged(); } else { - returnContentBuilder_.setMessage(builderForValue.build()); + tablesBuilder_.addAllMessages(values); } - bitField0_ |= 0x00000008; return this; } - public Builder mergeReturnContent(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent value) { - if (returnContentBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008) && - returnContent_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.getDefaultInstance()) { - returnContent_ = - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.newBuilder(returnContent_).mergeFrom(value).buildPartial(); - } else { - returnContent_ = value; - } + public Builder clearTables() { + if (tablesBuilder_ == null) { + tables_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { - returnContentBuilder_.mergeFrom(value); + tablesBuilder_.clear(); } - bitField0_ |= 0x00000008; return this; } - public Builder clearReturnContent() { - if (returnContentBuilder_ == null) { - returnContent_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.getDefaultInstance(); + public Builder removeTables(int index) { + if (tablesBuilder_ == null) { + ensureTablesIsMutable(); + tables_.remove(index); onChanged(); } else { - returnContentBuilder_.clear(); + tablesBuilder_.remove(index); } - bitField0_ = (bitField0_ & ~0x00000008); return this; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.Builder getReturnContentBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getReturnContentFieldBuilder().getBuilder(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse.Builder getTablesBuilder( + int index) { + return getTablesFieldBuilder().getBuilder(index); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContentOrBuilder getReturnContentOrBuilder() { - if (returnContentBuilder_ != null) { - return returnContentBuilder_.getMessageOrBuilder(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponseOrBuilder getTablesOrBuilder( + int index) { + if (tablesBuilder_ == null) { + return tables_.get(index); } else { + return tablesBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getTablesOrBuilderList() { + if (tablesBuilder_ != null) { + return tablesBuilder_.getMessageOrBuilderList(); } else { - return returnContent_; + return java.util.Collections.unmodifiableList(tables_); } } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContentOrBuilder> - getReturnContentFieldBuilder() { - if (returnContentBuilder_ == null) { - returnContentBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContentOrBuilder>( - returnContent_, + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse.Builder addTablesBuilder() { + return getTablesFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse.getDefaultInstance()); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse.Builder addTablesBuilder( + int index) { + return getTablesFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse.getDefaultInstance()); + } + public java.util.List + getTablesBuilderList() { + return getTablesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponseOrBuilder> + getTablesFieldBuilder() { + if (tablesBuilder_ == null) { + tablesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponseOrBuilder>( + tables_, + ((bitField0_ & 0x00000001) == 0x00000001), getParentForChildren(), isClean()); - returnContent_ = null; + tables_ = null; } - return returnContentBuilder_; + return tablesBuilder_; } - // optional string transaction_id = 5; - private java.lang.Object transactionId_ = ""; - public boolean hasTransactionId() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - public String getTransactionId() { - java.lang.Object ref = transactionId_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - transactionId_ = s; - return s; - } else { - return (String) ref; - } - } - public Builder setTransactionId(String value) { - if (value == null) { - throw new NullPointerException(); + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.BatchWriteRowResponse) + } + + static { + defaultInstance = new BatchWriteRowResponse(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.BatchWriteRowResponse) } - bitField0_ |= 0x00000010; - transactionId_ = value; - onChanged(); - return this; - } - public Builder clearTransactionId() { - bitField0_ = (bitField0_ & ~0x00000010); - transactionId_ = getDefaultInstance().getTransactionId(); - onChanged(); - return this; + + public interface GetRangeRequestOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string table_name = 1; + boolean hasTableName(); + String getTableName(); + + // required .com.alicloud.openservices.tablestore.core.protocol.Direction direction = 2; + boolean hasDirection(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Direction getDirection(); + + // repeated string columns_to_get = 3; + java.util.List getColumnsToGetList(); + int getColumnsToGetCount(); + String getColumnsToGet(int index); + + // optional .com.alicloud.openservices.tablestore.core.protocol.TimeRange time_range = 4; + boolean hasTimeRange(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange getTimeRange(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRangeOrBuilder getTimeRangeOrBuilder(); + + // optional int32 max_versions = 5; + boolean hasMaxVersions(); + int getMaxVersions(); + + // optional int32 limit = 6; + boolean hasLimit(); + int getLimit(); + + // required bytes inclusive_start_primary_key = 7; + boolean hasInclusiveStartPrimaryKey(); + com.google.protobuf.ByteString getInclusiveStartPrimaryKey(); + + // required bytes exclusive_end_primary_key = 8; + boolean hasExclusiveEndPrimaryKey(); + com.google.protobuf.ByteString getExclusiveEndPrimaryKey(); + + // optional bytes filter = 10; + boolean hasFilter(); + com.google.protobuf.ByteString getFilter(); + + // optional string start_column = 11; + boolean hasStartColumn(); + String getStartColumn(); + + // optional string end_column = 12; + boolean hasEndColumn(); + String getEndColumn(); + + // optional bytes token = 13; + boolean hasToken(); + com.google.protobuf.ByteString getToken(); + + // optional string transaction_id = 14; + boolean hasTransactionId(); + String getTransactionId(); + } + public static final class GetRangeRequest extends + com.google.protobuf.GeneratedMessage + implements GetRangeRequestOrBuilder { + // Use GetRangeRequest.newBuilder() to construct. + private GetRangeRequest(Builder builder) { + super(builder); + } + private GetRangeRequest(boolean noInit) {} + + private static final GetRangeRequest defaultInstance; + public static GetRangeRequest getDefaultInstance() { + return defaultInstance; + } + + public GetRangeRequest getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetRangeRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetRangeRequest_fieldAccessorTable; + } + + private int bitField0_; + // required string table_name = 1; + public static final int TABLE_NAME_FIELD_NUMBER = 1; + private java.lang.Object tableName_; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + tableName_ = s; + } + return s; } - void setTransactionId(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000010; - transactionId_ = value; - onChanged(); + } + private com.google.protobuf.ByteString getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.DeleteRowRequest) } - - static { - defaultInstance = new DeleteRowRequest(true); - defaultInstance.initFields(); + + // required .com.alicloud.openservices.tablestore.core.protocol.Direction direction = 2; + public static final int DIRECTION_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Direction direction_; + public boolean hasDirection() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Direction getDirection() { + return direction_; + } + + // repeated string columns_to_get = 3; + public static final int COLUMNS_TO_GET_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList columnsToGet_; + public java.util.List + getColumnsToGetList() { + return columnsToGet_; + } + public int getColumnsToGetCount() { + return columnsToGet_.size(); + } + public String getColumnsToGet(int index) { + return columnsToGet_.get(index); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.DeleteRowRequest) - } - - public interface DeleteRowResponseOrBuilder - extends com.google.protobuf.MessageOrBuilder { + // optional .com.alicloud.openservices.tablestore.core.protocol.TimeRange time_range = 4; + public static final int TIME_RANGE_FIELD_NUMBER = 4; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange timeRange_; + public boolean hasTimeRange() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange getTimeRange() { + return timeRange_; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRangeOrBuilder getTimeRangeOrBuilder() { + return timeRange_; + } - // required .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 1; - boolean hasConsumed(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder(); + // optional int32 max_versions = 5; + public static final int MAX_VERSIONS_FIELD_NUMBER = 5; + private int maxVersions_; + public boolean hasMaxVersions() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public int getMaxVersions() { + return maxVersions_; + } - // optional bytes row = 2; - boolean hasRow(); - com.google.protobuf.ByteString getRow(); - } - public static final class DeleteRowResponse extends - com.google.protobuf.GeneratedMessage - implements DeleteRowResponseOrBuilder { - // Use DeleteRowResponse.newBuilder() to construct. - private DeleteRowResponse(Builder builder) { - super(builder); + // optional int32 limit = 6; + public static final int LIMIT_FIELD_NUMBER = 6; + private int limit_; + public boolean hasLimit() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public int getLimit() { + return limit_; } - private DeleteRowResponse(boolean noInit) {} - private static final DeleteRowResponse defaultInstance; - public static DeleteRowResponse getDefaultInstance() { - return defaultInstance; + // required bytes inclusive_start_primary_key = 7; + public static final int INCLUSIVE_START_PRIMARY_KEY_FIELD_NUMBER = 7; + private com.google.protobuf.ByteString inclusiveStartPrimaryKey_; + public boolean hasInclusiveStartPrimaryKey() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + public com.google.protobuf.ByteString getInclusiveStartPrimaryKey() { + return inclusiveStartPrimaryKey_; } - public DeleteRowResponse getDefaultInstanceForType() { - return defaultInstance; + // required bytes exclusive_end_primary_key = 8; + public static final int EXCLUSIVE_END_PRIMARY_KEY_FIELD_NUMBER = 8; + private com.google.protobuf.ByteString exclusiveEndPrimaryKey_; + public boolean hasExclusiveEndPrimaryKey() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + public com.google.protobuf.ByteString getExclusiveEndPrimaryKey() { + return exclusiveEndPrimaryKey_; } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteRowResponse_descriptor; + // optional bytes filter = 10; + public static final int FILTER_FIELD_NUMBER = 10; + private com.google.protobuf.ByteString filter_; + public boolean hasFilter() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + public com.google.protobuf.ByteString getFilter() { + return filter_; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteRowResponse_fieldAccessorTable; + // optional string start_column = 11; + public static final int START_COLUMN_FIELD_NUMBER = 11; + private java.lang.Object startColumn_; + public boolean hasStartColumn() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + public String getStartColumn() { + java.lang.Object ref = startColumn_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + startColumn_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getStartColumnBytes() { + java.lang.Object ref = startColumn_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + startColumn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - private int bitField0_; - // required .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 1; - public static final int CONSUMED_FIELD_NUMBER = 1; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity consumed_; - public boolean hasConsumed() { - return ((bitField0_ & 0x00000001) == 0x00000001); + // optional string end_column = 12; + public static final int END_COLUMN_FIELD_NUMBER = 12; + private java.lang.Object endColumn_; + public boolean hasEndColumn() { + return ((bitField0_ & 0x00000200) == 0x00000200); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed() { - return consumed_; + public String getEndColumn() { + java.lang.Object ref = endColumn_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + endColumn_ = s; + } + return s; + } } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder() { - return consumed_; + private com.google.protobuf.ByteString getEndColumnBytes() { + java.lang.Object ref = endColumn_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + endColumn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - // optional bytes row = 2; - public static final int ROW_FIELD_NUMBER = 2; - private com.google.protobuf.ByteString row_; - public boolean hasRow() { - return ((bitField0_ & 0x00000002) == 0x00000002); + // optional bytes token = 13; + public static final int TOKEN_FIELD_NUMBER = 13; + private com.google.protobuf.ByteString token_; + public boolean hasToken() { + return ((bitField0_ & 0x00000400) == 0x00000400); } - public com.google.protobuf.ByteString getRow() { - return row_; + public com.google.protobuf.ByteString getToken() { + return token_; + } + + // optional string transaction_id = 14; + public static final int TRANSACTION_ID_FIELD_NUMBER = 14; + private java.lang.Object transactionId_; + public boolean hasTransactionId() { + return ((bitField0_ & 0x00000800) == 0x00000800); + } + public String getTransactionId() { + java.lang.Object ref = transactionId_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + transactionId_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTransactionIdBytes() { + java.lang.Object ref = transactionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + transactionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } private void initFields() { - consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); - row_ = com.google.protobuf.ByteString.EMPTY; + tableName_ = ""; + direction_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Direction.FORWARD; + columnsToGet_ = com.google.protobuf.LazyStringArrayList.EMPTY; + timeRange_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.getDefaultInstance(); + maxVersions_ = 0; + limit_ = 0; + inclusiveStartPrimaryKey_ = com.google.protobuf.ByteString.EMPTY; + exclusiveEndPrimaryKey_ = com.google.protobuf.ByteString.EMPTY; + filter_ = com.google.protobuf.ByteString.EMPTY; + startColumn_ = ""; + endColumn_ = ""; + token_ = com.google.protobuf.ByteString.EMPTY; + transactionId_ = ""; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - if (!hasConsumed()) { + if (!hasTableName()) { memoizedIsInitialized = 0; return false; } - if (!getConsumed().isInitialized()) { + if (!hasDirection()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasInclusiveStartPrimaryKey()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasExclusiveEndPrimaryKey()) { memoizedIsInitialized = 0; return false; } @@ -22856,10 +36188,43 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeMessage(1, consumed_); + output.writeBytes(1, getTableNameBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, row_); + output.writeEnum(2, direction_.getNumber()); + } + for (int i = 0; i < columnsToGet_.size(); i++) { + output.writeBytes(3, columnsToGet_.getByteString(i)); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeMessage(4, timeRange_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeInt32(5, maxVersions_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeInt32(6, limit_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeBytes(7, inclusiveStartPrimaryKey_); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + output.writeBytes(8, exclusiveEndPrimaryKey_); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + output.writeBytes(10, filter_); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + output.writeBytes(11, getStartColumnBytes()); + } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + output.writeBytes(12, getEndColumnBytes()); + } + if (((bitField0_ & 0x00000400) == 0x00000400)) { + output.writeBytes(13, token_); + } + if (((bitField0_ & 0x00000800) == 0x00000800)) { + output.writeBytes(14, getTransactionIdBytes()); } getUnknownFields().writeTo(output); } @@ -22872,11 +36237,60 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, consumed_); + .computeBytesSize(1, getTableNameBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, row_); + .computeEnumSize(2, direction_.getNumber()); + } + { + int dataSize = 0; + for (int i = 0; i < columnsToGet_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(columnsToGet_.getByteString(i)); + } + size += dataSize; + size += 1 * getColumnsToGetList().size(); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, timeRange_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(5, maxVersions_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(6, limit_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(7, inclusiveStartPrimaryKey_); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(8, exclusiveEndPrimaryKey_); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(10, filter_); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(11, getStartColumnBytes()); + } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(12, getEndColumnBytes()); + } + if (((bitField0_ & 0x00000400) == 0x00000400)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(13, token_); + } + if (((bitField0_ & 0x00000800) == 0x00000800)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(14, getTransactionIdBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -22890,41 +36304,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -22933,7 +36347,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -22944,12 +36358,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -22959,7 +36373,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -22972,18 +36386,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponseOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteRowResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetRangeRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteRowResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetRangeRequest_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -22994,7 +36408,7 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getConsumedFieldBuilder(); + getTimeRangeFieldBuilder(); } } private static Builder create() { @@ -23003,14 +36417,36 @@ private static Builder create() { public Builder clear() { super.clear(); - if (consumedBuilder_ == null) { - consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); - } else { - consumedBuilder_.clear(); - } + tableName_ = ""; bitField0_ = (bitField0_ & ~0x00000001); - row_ = com.google.protobuf.ByteString.EMPTY; + direction_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Direction.FORWARD; bitField0_ = (bitField0_ & ~0x00000002); + columnsToGet_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + if (timeRangeBuilder_ == null) { + timeRange_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.getDefaultInstance(); + } else { + timeRangeBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + maxVersions_ = 0; + bitField0_ = (bitField0_ & ~0x00000010); + limit_ = 0; + bitField0_ = (bitField0_ & ~0x00000020); + inclusiveStartPrimaryKey_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000040); + exclusiveEndPrimaryKey_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000080); + filter_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000100); + startColumn_ = ""; + bitField0_ = (bitField0_ & ~0x00000200); + endColumn_ = ""; + bitField0_ = (bitField0_ & ~0x00000400); + token_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000800); + transactionId_ = ""; + bitField0_ = (bitField0_ & ~0x00001000); return this; } @@ -23020,24 +36456,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -23045,54 +36481,148 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Delete return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse(this); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - if (consumedBuilder_ == null) { - result.consumed_ = consumed_; - } else { - result.consumed_ = consumedBuilder_.build(); - } + result.tableName_ = tableName_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - result.row_ = row_; + result.direction_ = direction_; + if (((bitField0_ & 0x00000004) == 0x00000004)) { + columnsToGet_ = new com.google.protobuf.UnmodifiableLazyStringList( + columnsToGet_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.columnsToGet_ = columnsToGet_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000004; + } + if (timeRangeBuilder_ == null) { + result.timeRange_ = timeRange_; + } else { + result.timeRange_ = timeRangeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000008; + } + result.maxVersions_ = maxVersions_; + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000010; + } + result.limit_ = limit_; + if (((from_bitField0_ & 0x00000040) == 0x00000040)) { + to_bitField0_ |= 0x00000020; + } + result.inclusiveStartPrimaryKey_ = inclusiveStartPrimaryKey_; + if (((from_bitField0_ & 0x00000080) == 0x00000080)) { + to_bitField0_ |= 0x00000040; + } + result.exclusiveEndPrimaryKey_ = exclusiveEndPrimaryKey_; + if (((from_bitField0_ & 0x00000100) == 0x00000100)) { + to_bitField0_ |= 0x00000080; + } + result.filter_ = filter_; + if (((from_bitField0_ & 0x00000200) == 0x00000200)) { + to_bitField0_ |= 0x00000100; + } + result.startColumn_ = startColumn_; + if (((from_bitField0_ & 0x00000400) == 0x00000400)) { + to_bitField0_ |= 0x00000200; + } + result.endColumn_ = endColumn_; + if (((from_bitField0_ & 0x00000800) == 0x00000800)) { + to_bitField0_ |= 0x00000400; + } + result.token_ = token_; + if (((from_bitField0_ & 0x00001000) == 0x00001000)) { + to_bitField0_ |= 0x00000800; + } + result.transactionId_ = transactionId_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest)other); } else { super.mergeFrom(other); return this; } - } - - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse.getDefaultInstance()) return this; - if (other.hasConsumed()) { - mergeConsumed(other.getConsumed()); + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest.getDefaultInstance()) return this; + if (other.hasTableName()) { + setTableName(other.getTableName()); + } + if (other.hasDirection()) { + setDirection(other.getDirection()); + } + if (!other.columnsToGet_.isEmpty()) { + if (columnsToGet_.isEmpty()) { + columnsToGet_ = other.columnsToGet_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureColumnsToGetIsMutable(); + columnsToGet_.addAll(other.columnsToGet_); + } + onChanged(); + } + if (other.hasTimeRange()) { + mergeTimeRange(other.getTimeRange()); + } + if (other.hasMaxVersions()) { + setMaxVersions(other.getMaxVersions()); + } + if (other.hasLimit()) { + setLimit(other.getLimit()); + } + if (other.hasInclusiveStartPrimaryKey()) { + setInclusiveStartPrimaryKey(other.getInclusiveStartPrimaryKey()); + } + if (other.hasExclusiveEndPrimaryKey()) { + setExclusiveEndPrimaryKey(other.getExclusiveEndPrimaryKey()); + } + if (other.hasFilter()) { + setFilter(other.getFilter()); + } + if (other.hasStartColumn()) { + setStartColumn(other.getStartColumn()); + } + if (other.hasEndColumn()) { + setEndColumn(other.getEndColumn()); + } + if (other.hasToken()) { + setToken(other.getToken()); } - if (other.hasRow()) { - setRow(other.getRow()); + if (other.hasTransactionId()) { + setTransactionId(other.getTransactionId()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { - if (!hasConsumed()) { + if (!hasTableName()) { return false; } - if (!getConsumed().isInitialized()) { + if (!hasDirection()) { + + return false; + } + if (!hasInclusiveStartPrimaryKey()) { + + return false; + } + if (!hasExclusiveEndPrimaryKey()) { return false; } @@ -23123,17 +36653,78 @@ public Builder mergeFrom( break; } case 10: { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.newBuilder(); - if (hasConsumed()) { - subBuilder.mergeFrom(getConsumed()); + bitField0_ |= 0x00000001; + tableName_ = input.readBytes(); + break; + } + case 16: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Direction value = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Direction.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(2, rawValue); + } else { + bitField0_ |= 0x00000002; + direction_ = value; + } + break; + } + case 26: { + ensureColumnsToGetIsMutable(); + columnsToGet_.add(input.readBytes()); + break; + } + case 34: { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.newBuilder(); + if (hasTimeRange()) { + subBuilder.mergeFrom(getTimeRange()); } input.readMessage(subBuilder, extensionRegistry); - setConsumed(subBuilder.buildPartial()); + setTimeRange(subBuilder.buildPartial()); break; } - case 18: { - bitField0_ |= 0x00000002; - row_ = input.readBytes(); + case 40: { + bitField0_ |= 0x00000010; + maxVersions_ = input.readInt32(); + break; + } + case 48: { + bitField0_ |= 0x00000020; + limit_ = input.readInt32(); + break; + } + case 58: { + bitField0_ |= 0x00000040; + inclusiveStartPrimaryKey_ = input.readBytes(); + break; + } + case 66: { + bitField0_ |= 0x00000080; + exclusiveEndPrimaryKey_ = input.readBytes(); + break; + } + case 82: { + bitField0_ |= 0x00000100; + filter_ = input.readBytes(); + break; + } + case 90: { + bitField0_ |= 0x00000200; + startColumn_ = input.readBytes(); + break; + } + case 98: { + bitField0_ |= 0x00000400; + endColumn_ = input.readBytes(); + break; + } + case 106: { + bitField0_ |= 0x00000800; + token_ = input.readBytes(); + break; + } + case 114: { + bitField0_ |= 0x00001000; + transactionId_ = input.readBytes(); break; } } @@ -23142,391 +36733,581 @@ public Builder mergeFrom( private int bitField0_; - // required .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 1; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder> consumedBuilder_; - public boolean hasConsumed() { + // required string table_name = 1; + private java.lang.Object tableName_ = ""; + public boolean hasTableName() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed() { - if (consumedBuilder_ == null) { - return consumed_; + public String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + tableName_ = s; + return s; } else { - return consumedBuilder_.getMessage(); + return (String) ref; } } - public Builder setConsumed(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity value) { - if (consumedBuilder_ == null) { + public Builder setTableName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + return this; + } + public Builder clearTableName() { + bitField0_ = (bitField0_ & ~0x00000001); + tableName_ = getDefaultInstance().getTableName(); + onChanged(); + return this; + } + void setTableName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + } + + // required .com.alicloud.openservices.tablestore.core.protocol.Direction direction = 2; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Direction direction_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Direction.FORWARD; + public boolean hasDirection() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Direction getDirection() { + return direction_; + } + public Builder setDirection(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Direction value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + direction_ = value; + onChanged(); + return this; + } + public Builder clearDirection() { + bitField0_ = (bitField0_ & ~0x00000002); + direction_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Direction.FORWARD; + onChanged(); + return this; + } + + // repeated string columns_to_get = 3; + private com.google.protobuf.LazyStringList columnsToGet_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureColumnsToGetIsMutable() { + if (!((bitField0_ & 0x00000004) == 0x00000004)) { + columnsToGet_ = new com.google.protobuf.LazyStringArrayList(columnsToGet_); + bitField0_ |= 0x00000004; + } + } + public java.util.List + getColumnsToGetList() { + return java.util.Collections.unmodifiableList(columnsToGet_); + } + public int getColumnsToGetCount() { + return columnsToGet_.size(); + } + public String getColumnsToGet(int index) { + return columnsToGet_.get(index); + } + public Builder setColumnsToGet( + int index, String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureColumnsToGetIsMutable(); + columnsToGet_.set(index, value); + onChanged(); + return this; + } + public Builder addColumnsToGet(String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureColumnsToGetIsMutable(); + columnsToGet_.add(value); + onChanged(); + return this; + } + public Builder addAllColumnsToGet( + java.lang.Iterable values) { + ensureColumnsToGetIsMutable(); + super.addAll(values, columnsToGet_); + onChanged(); + return this; + } + public Builder clearColumnsToGet() { + columnsToGet_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + void addColumnsToGet(com.google.protobuf.ByteString value) { + ensureColumnsToGetIsMutable(); + columnsToGet_.add(value); + onChanged(); + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.TimeRange time_range = 4; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange timeRange_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRangeOrBuilder> timeRangeBuilder_; + public boolean hasTimeRange() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange getTimeRange() { + if (timeRangeBuilder_ == null) { + return timeRange_; + } else { + return timeRangeBuilder_.getMessage(); + } + } + public Builder setTimeRange(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange value) { + if (timeRangeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - consumed_ = value; + timeRange_ = value; onChanged(); } else { - consumedBuilder_.setMessage(value); + timeRangeBuilder_.setMessage(value); } - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000008; return this; } - public Builder setConsumed( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder builderForValue) { - if (consumedBuilder_ == null) { - consumed_ = builderForValue.build(); + public Builder setTimeRange( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.Builder builderForValue) { + if (timeRangeBuilder_ == null) { + timeRange_ = builderForValue.build(); onChanged(); } else { - consumedBuilder_.setMessage(builderForValue.build()); + timeRangeBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000008; return this; } - public Builder mergeConsumed(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity value) { - if (consumedBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001) && - consumed_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance()) { - consumed_ = - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.newBuilder(consumed_).mergeFrom(value).buildPartial(); + public Builder mergeTimeRange(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange value) { + if (timeRangeBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008) && + timeRange_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.getDefaultInstance()) { + timeRange_ = + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.newBuilder(timeRange_).mergeFrom(value).buildPartial(); } else { - consumed_ = value; + timeRange_ = value; } onChanged(); } else { - consumedBuilder_.mergeFrom(value); + timeRangeBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000008; return this; } - public Builder clearConsumed() { - if (consumedBuilder_ == null) { - consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); + public Builder clearTimeRange() { + if (timeRangeBuilder_ == null) { + timeRange_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.getDefaultInstance(); onChanged(); } else { - consumedBuilder_.clear(); + timeRangeBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.Builder getTimeRangeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getTimeRangeFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRangeOrBuilder getTimeRangeOrBuilder() { + if (timeRangeBuilder_ != null) { + return timeRangeBuilder_.getMessageOrBuilder(); + } else { + return timeRange_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRangeOrBuilder> + getTimeRangeFieldBuilder() { + if (timeRangeBuilder_ == null) { + timeRangeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRangeOrBuilder>( + timeRange_, + getParentForChildren(), + isClean()); + timeRange_ = null; + } + return timeRangeBuilder_; + } + + // optional int32 max_versions = 5; + private int maxVersions_ ; + public boolean hasMaxVersions() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public int getMaxVersions() { + return maxVersions_; + } + public Builder setMaxVersions(int value) { + bitField0_ |= 0x00000010; + maxVersions_ = value; + onChanged(); + return this; + } + public Builder clearMaxVersions() { + bitField0_ = (bitField0_ & ~0x00000010); + maxVersions_ = 0; + onChanged(); + return this; + } + + // optional int32 limit = 6; + private int limit_ ; + public boolean hasLimit() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + public int getLimit() { + return limit_; + } + public Builder setLimit(int value) { + bitField0_ |= 0x00000020; + limit_ = value; + onChanged(); + return this; + } + public Builder clearLimit() { + bitField0_ = (bitField0_ & ~0x00000020); + limit_ = 0; + onChanged(); + return this; + } + + // required bytes inclusive_start_primary_key = 7; + private com.google.protobuf.ByteString inclusiveStartPrimaryKey_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasInclusiveStartPrimaryKey() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + public com.google.protobuf.ByteString getInclusiveStartPrimaryKey() { + return inclusiveStartPrimaryKey_; + } + public Builder setInclusiveStartPrimaryKey(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + inclusiveStartPrimaryKey_ = value; + onChanged(); + return this; + } + public Builder clearInclusiveStartPrimaryKey() { + bitField0_ = (bitField0_ & ~0x00000040); + inclusiveStartPrimaryKey_ = getDefaultInstance().getInclusiveStartPrimaryKey(); + onChanged(); + return this; + } + + // required bytes exclusive_end_primary_key = 8; + private com.google.protobuf.ByteString exclusiveEndPrimaryKey_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasExclusiveEndPrimaryKey() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + public com.google.protobuf.ByteString getExclusiveEndPrimaryKey() { + return exclusiveEndPrimaryKey_; + } + public Builder setExclusiveEndPrimaryKey(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000080; + exclusiveEndPrimaryKey_ = value; + onChanged(); + return this; + } + public Builder clearExclusiveEndPrimaryKey() { + bitField0_ = (bitField0_ & ~0x00000080); + exclusiveEndPrimaryKey_ = getDefaultInstance().getExclusiveEndPrimaryKey(); + onChanged(); + return this; + } + + // optional bytes filter = 10; + private com.google.protobuf.ByteString filter_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasFilter() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + public com.google.protobuf.ByteString getFilter() { + return filter_; + } + public Builder setFilter(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000100; + filter_ = value; + onChanged(); + return this; + } + public Builder clearFilter() { + bitField0_ = (bitField0_ & ~0x00000100); + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + + // optional string start_column = 11; + private java.lang.Object startColumn_ = ""; + public boolean hasStartColumn() { + return ((bitField0_ & 0x00000200) == 0x00000200); + } + public String getStartColumn() { + java.lang.Object ref = startColumn_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + startColumn_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setStartColumn(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + startColumn_ = value; + onChanged(); + return this; + } + public Builder clearStartColumn() { + bitField0_ = (bitField0_ & ~0x00000200); + startColumn_ = getDefaultInstance().getStartColumn(); + onChanged(); + return this; + } + void setStartColumn(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000200; + startColumn_ = value; + onChanged(); + } + + // optional string end_column = 12; + private java.lang.Object endColumn_ = ""; + public boolean hasEndColumn() { + return ((bitField0_ & 0x00000400) == 0x00000400); + } + public String getEndColumn() { + java.lang.Object ref = endColumn_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + endColumn_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setEndColumn(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000400; + endColumn_ = value; + onChanged(); + return this; + } + public Builder clearEndColumn() { + bitField0_ = (bitField0_ & ~0x00000400); + endColumn_ = getDefaultInstance().getEndColumn(); + onChanged(); + return this; + } + void setEndColumn(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000400; + endColumn_ = value; + onChanged(); + } + + // optional bytes token = 13; + private com.google.protobuf.ByteString token_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasToken() { + return ((bitField0_ & 0x00000800) == 0x00000800); + } + public com.google.protobuf.ByteString getToken() { + return token_; + } + public Builder setToken(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000800; + token_ = value; + onChanged(); return this; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder getConsumedBuilder() { - bitField0_ |= 0x00000001; + public Builder clearToken() { + bitField0_ = (bitField0_ & ~0x00000800); + token_ = getDefaultInstance().getToken(); onChanged(); - return getConsumedFieldBuilder().getBuilder(); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder() { - if (consumedBuilder_ != null) { - return consumedBuilder_.getMessageOrBuilder(); - } else { - return consumed_; - } - } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder> - getConsumedFieldBuilder() { - if (consumedBuilder_ == null) { - consumedBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder>( - consumed_, - getParentForChildren(), - isClean()); - consumed_ = null; - } - return consumedBuilder_; + return this; } - // optional bytes row = 2; - private com.google.protobuf.ByteString row_ = com.google.protobuf.ByteString.EMPTY; - public boolean hasRow() { - return ((bitField0_ & 0x00000002) == 0x00000002); + // optional string transaction_id = 14; + private java.lang.Object transactionId_ = ""; + public boolean hasTransactionId() { + return ((bitField0_ & 0x00001000) == 0x00001000); } - public com.google.protobuf.ByteString getRow() { - return row_; + public String getTransactionId() { + java.lang.Object ref = transactionId_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + transactionId_ = s; + return s; + } else { + return (String) ref; + } } - public Builder setRow(com.google.protobuf.ByteString value) { + public Builder setTransactionId(String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000002; - row_ = value; + bitField0_ |= 0x00001000; + transactionId_ = value; onChanged(); return this; } - public Builder clearRow() { - bitField0_ = (bitField0_ & ~0x00000002); - row_ = getDefaultInstance().getRow(); + public Builder clearTransactionId() { + bitField0_ = (bitField0_ & ~0x00001000); + transactionId_ = getDefaultInstance().getTransactionId(); onChanged(); return this; } + void setTransactionId(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00001000; + transactionId_ = value; + onChanged(); + } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.DeleteRowResponse) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GetRangeRequest) } static { - defaultInstance = new DeleteRowResponse(true); + defaultInstance = new GetRangeRequest(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.DeleteRowResponse) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GetRangeRequest) } - public interface TableInBatchGetRowRequestOrBuilder + public interface GetRangeResponseOrBuilder extends com.google.protobuf.MessageOrBuilder { - // required string table_name = 1; - boolean hasTableName(); - String getTableName(); - - // repeated bytes primary_key = 2; - java.util.List getPrimaryKeyList(); - int getPrimaryKeyCount(); - com.google.protobuf.ByteString getPrimaryKey(int index); - - // repeated bytes token = 3; - java.util.List getTokenList(); - int getTokenCount(); - com.google.protobuf.ByteString getToken(int index); - - // repeated string columns_to_get = 4; - java.util.List getColumnsToGetList(); - int getColumnsToGetCount(); - String getColumnsToGet(int index); - - // optional .com.alicloud.openservices.tablestore.core.protocol.TimeRange time_range = 5; - boolean hasTimeRange(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange getTimeRange(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRangeOrBuilder getTimeRangeOrBuilder(); - - // optional int32 max_versions = 6; - boolean hasMaxVersions(); - int getMaxVersions(); + // required .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 1; + boolean hasConsumed(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder(); - // optional bytes filter = 8; - boolean hasFilter(); - com.google.protobuf.ByteString getFilter(); + // required bytes rows = 2; + boolean hasRows(); + com.google.protobuf.ByteString getRows(); - // optional string start_column = 9; - boolean hasStartColumn(); - String getStartColumn(); + // optional bytes next_start_primary_key = 3; + boolean hasNextStartPrimaryKey(); + com.google.protobuf.ByteString getNextStartPrimaryKey(); - // optional string end_column = 10; - boolean hasEndColumn(); - String getEndColumn(); + // optional bytes next_token = 4; + boolean hasNextToken(); + com.google.protobuf.ByteString getNextToken(); } - public static final class TableInBatchGetRowRequest extends + public static final class GetRangeResponse extends com.google.protobuf.GeneratedMessage - implements TableInBatchGetRowRequestOrBuilder { - // Use TableInBatchGetRowRequest.newBuilder() to construct. - private TableInBatchGetRowRequest(Builder builder) { + implements GetRangeResponseOrBuilder { + // Use GetRangeResponse.newBuilder() to construct. + private GetRangeResponse(Builder builder) { super(builder); } - private TableInBatchGetRowRequest(boolean noInit) {} + private GetRangeResponse(boolean noInit) {} - private static final TableInBatchGetRowRequest defaultInstance; - public static TableInBatchGetRowRequest getDefaultInstance() { + private static final GetRangeResponse defaultInstance; + public static GetRangeResponse getDefaultInstance() { return defaultInstance; } - public TableInBatchGetRowRequest getDefaultInstanceForType() { + public GetRangeResponse getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TableInBatchGetRowRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetRangeResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TableInBatchGetRowRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetRangeResponse_fieldAccessorTable; } private int bitField0_; - // required string table_name = 1; - public static final int TABLE_NAME_FIELD_NUMBER = 1; - private java.lang.Object tableName_; - public boolean hasTableName() { + // required .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 1; + public static final int CONSUMED_FIELD_NUMBER = 1; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity consumed_; + public boolean hasConsumed() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getTableName() { - java.lang.Object ref = tableName_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - tableName_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getTableNameBytes() { - java.lang.Object ref = tableName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - tableName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // repeated bytes primary_key = 2; - public static final int PRIMARY_KEY_FIELD_NUMBER = 2; - private java.util.List primaryKey_; - public java.util.List - getPrimaryKeyList() { - return primaryKey_; - } - public int getPrimaryKeyCount() { - return primaryKey_.size(); - } - public com.google.protobuf.ByteString getPrimaryKey(int index) { - return primaryKey_.get(index); - } - - // repeated bytes token = 3; - public static final int TOKEN_FIELD_NUMBER = 3; - private java.util.List token_; - public java.util.List - getTokenList() { - return token_; - } - public int getTokenCount() { - return token_.size(); - } - public com.google.protobuf.ByteString getToken(int index) { - return token_.get(index); - } - - // repeated string columns_to_get = 4; - public static final int COLUMNS_TO_GET_FIELD_NUMBER = 4; - private com.google.protobuf.LazyStringList columnsToGet_; - public java.util.List - getColumnsToGetList() { - return columnsToGet_; - } - public int getColumnsToGetCount() { - return columnsToGet_.size(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed() { + return consumed_; } - public String getColumnsToGet(int index) { - return columnsToGet_.get(index); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder() { + return consumed_; } - // optional .com.alicloud.openservices.tablestore.core.protocol.TimeRange time_range = 5; - public static final int TIME_RANGE_FIELD_NUMBER = 5; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange timeRange_; - public boolean hasTimeRange() { + // required bytes rows = 2; + public static final int ROWS_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString rows_; + public boolean hasRows() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange getTimeRange() { - return timeRange_; - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRangeOrBuilder getTimeRangeOrBuilder() { - return timeRange_; + public com.google.protobuf.ByteString getRows() { + return rows_; } - // optional int32 max_versions = 6; - public static final int MAX_VERSIONS_FIELD_NUMBER = 6; - private int maxVersions_; - public boolean hasMaxVersions() { + // optional bytes next_start_primary_key = 3; + public static final int NEXT_START_PRIMARY_KEY_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString nextStartPrimaryKey_; + public boolean hasNextStartPrimaryKey() { return ((bitField0_ & 0x00000004) == 0x00000004); } - public int getMaxVersions() { - return maxVersions_; + public com.google.protobuf.ByteString getNextStartPrimaryKey() { + return nextStartPrimaryKey_; } - // optional bytes filter = 8; - public static final int FILTER_FIELD_NUMBER = 8; - private com.google.protobuf.ByteString filter_; - public boolean hasFilter() { + // optional bytes next_token = 4; + public static final int NEXT_TOKEN_FIELD_NUMBER = 4; + private com.google.protobuf.ByteString nextToken_; + public boolean hasNextToken() { return ((bitField0_ & 0x00000008) == 0x00000008); } - public com.google.protobuf.ByteString getFilter() { - return filter_; - } - - // optional string start_column = 9; - public static final int START_COLUMN_FIELD_NUMBER = 9; - private java.lang.Object startColumn_; - public boolean hasStartColumn() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - public String getStartColumn() { - java.lang.Object ref = startColumn_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - startColumn_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getStartColumnBytes() { - java.lang.Object ref = startColumn_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - startColumn_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // optional string end_column = 10; - public static final int END_COLUMN_FIELD_NUMBER = 10; - private java.lang.Object endColumn_; - public boolean hasEndColumn() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - public String getEndColumn() { - java.lang.Object ref = endColumn_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - endColumn_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getEndColumnBytes() { - java.lang.Object ref = endColumn_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - endColumn_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public com.google.protobuf.ByteString getNextToken() { + return nextToken_; } private void initFields() { - tableName_ = ""; - primaryKey_ = java.util.Collections.emptyList();; - token_ = java.util.Collections.emptyList();; - columnsToGet_ = com.google.protobuf.LazyStringArrayList.EMPTY; - timeRange_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.getDefaultInstance(); - maxVersions_ = 0; - filter_ = com.google.protobuf.ByteString.EMPTY; - startColumn_ = ""; - endColumn_ = ""; + consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); + rows_ = com.google.protobuf.ByteString.EMPTY; + nextStartPrimaryKey_ = com.google.protobuf.ByteString.EMPTY; + nextToken_ = com.google.protobuf.ByteString.EMPTY; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - if (!hasTableName()) { + if (!hasConsumed()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasRows()) { + memoizedIsInitialized = 0; + return false; + } + if (!getConsumed().isInitialized()) { memoizedIsInitialized = 0; return false; } @@ -23538,31 +37319,16 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getTableNameBytes()); - } - for (int i = 0; i < primaryKey_.size(); i++) { - output.writeBytes(2, primaryKey_.get(i)); - } - for (int i = 0; i < token_.size(); i++) { - output.writeBytes(3, token_.get(i)); - } - for (int i = 0; i < columnsToGet_.size(); i++) { - output.writeBytes(4, columnsToGet_.getByteString(i)); + output.writeMessage(1, consumed_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeMessage(5, timeRange_); + output.writeBytes(2, rows_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeInt32(6, maxVersions_); + output.writeBytes(3, nextStartPrimaryKey_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeBytes(8, filter_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeBytes(9, getStartColumnBytes()); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - output.writeBytes(10, getEndColumnBytes()); + output.writeBytes(4, nextToken_); } getUnknownFields().writeTo(output); } @@ -23575,54 +37341,19 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getTableNameBytes()); - } - { - int dataSize = 0; - for (int i = 0; i < primaryKey_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeBytesSizeNoTag(primaryKey_.get(i)); - } - size += dataSize; - size += 1 * getPrimaryKeyList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < token_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeBytesSizeNoTag(token_.get(i)); - } - size += dataSize; - size += 1 * getTokenList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < columnsToGet_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeBytesSizeNoTag(columnsToGet_.getByteString(i)); - } - size += dataSize; - size += 1 * getColumnsToGetList().size(); + .computeMessageSize(1, consumed_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, timeRange_); + .computeBytesSize(2, rows_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream - .computeInt32Size(6, maxVersions_); + .computeBytesSize(3, nextStartPrimaryKey_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(8, filter_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(9, getStartColumnBytes()); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(10, getEndColumnBytes()); + .computeBytesSize(4, nextToken_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -23636,41 +37367,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -23679,7 +37410,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -23690,12 +37421,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -23705,7 +37436,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -23718,18 +37449,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequestOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TableInBatchGetRowRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetRangeResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TableInBatchGetRowRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetRangeResponse_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -23740,7 +37471,7 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getTimeRangeFieldBuilder(); + getConsumedFieldBuilder(); } } private static Builder create() { @@ -23749,28 +37480,18 @@ private static Builder create() { public Builder clear() { super.clear(); - tableName_ = ""; + if (consumedBuilder_ == null) { + consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); + } else { + consumedBuilder_.clear(); + } bitField0_ = (bitField0_ & ~0x00000001); - primaryKey_ = java.util.Collections.emptyList();; + rows_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); - token_ = java.util.Collections.emptyList();; + nextStartPrimaryKey_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000004); - columnsToGet_ = com.google.protobuf.LazyStringArrayList.EMPTY; + nextToken_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000008); - if (timeRangeBuilder_ == null) { - timeRange_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.getDefaultInstance(); - } else { - timeRangeBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000010); - maxVersions_ = 0; - bitField0_ = (bitField0_ & ~0x00000020); - filter_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000040); - startColumn_ = ""; - bitField0_ = (bitField0_ & ~0x00000080); - endColumn_ = ""; - bitField0_ = (bitField0_ & ~0x00000100); return this; } @@ -23780,24 +37501,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -23805,124 +37526,72 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableI return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest(this); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.tableName_ = tableName_; - if (((bitField0_ & 0x00000002) == 0x00000002)) { - primaryKey_ = java.util.Collections.unmodifiableList(primaryKey_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.primaryKey_ = primaryKey_; - if (((bitField0_ & 0x00000004) == 0x00000004)) { - token_ = java.util.Collections.unmodifiableList(token_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.token_ = token_; - if (((bitField0_ & 0x00000008) == 0x00000008)) { - columnsToGet_ = new com.google.protobuf.UnmodifiableLazyStringList( - columnsToGet_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.columnsToGet_ = columnsToGet_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000002; - } - if (timeRangeBuilder_ == null) { - result.timeRange_ = timeRange_; + if (consumedBuilder_ == null) { + result.consumed_ = consumed_; } else { - result.timeRange_ = timeRangeBuilder_.build(); + result.consumed_ = consumedBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; } - if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + result.rows_ = rows_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } - result.maxVersions_ = maxVersions_; - if (((from_bitField0_ & 0x00000040) == 0x00000040)) { + result.nextStartPrimaryKey_ = nextStartPrimaryKey_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; } - result.filter_ = filter_; - if (((from_bitField0_ & 0x00000080) == 0x00000080)) { - to_bitField0_ |= 0x00000010; - } - result.startColumn_ = startColumn_; - if (((from_bitField0_ & 0x00000100) == 0x00000100)) { - to_bitField0_ |= 0x00000020; - } - result.endColumn_ = endColumn_; + result.nextToken_ = nextToken_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest.getDefaultInstance()) return this; - if (other.hasTableName()) { - setTableName(other.getTableName()); - } - if (!other.primaryKey_.isEmpty()) { - if (primaryKey_.isEmpty()) { - primaryKey_ = other.primaryKey_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensurePrimaryKeyIsMutable(); - primaryKey_.addAll(other.primaryKey_); - } - onChanged(); - } - if (!other.token_.isEmpty()) { - if (token_.isEmpty()) { - token_ = other.token_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureTokenIsMutable(); - token_.addAll(other.token_); - } - onChanged(); - } - if (!other.columnsToGet_.isEmpty()) { - if (columnsToGet_.isEmpty()) { - columnsToGet_ = other.columnsToGet_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureColumnsToGetIsMutable(); - columnsToGet_.addAll(other.columnsToGet_); - } - onChanged(); - } - if (other.hasTimeRange()) { - mergeTimeRange(other.getTimeRange()); - } - if (other.hasMaxVersions()) { - setMaxVersions(other.getMaxVersions()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse.getDefaultInstance()) return this; + if (other.hasConsumed()) { + mergeConsumed(other.getConsumed()); } - if (other.hasFilter()) { - setFilter(other.getFilter()); + if (other.hasRows()) { + setRows(other.getRows()); } - if (other.hasStartColumn()) { - setStartColumn(other.getStartColumn()); + if (other.hasNextStartPrimaryKey()) { + setNextStartPrimaryKey(other.getNextStartPrimaryKey()); } - if (other.hasEndColumn()) { - setEndColumn(other.getEndColumn()); + if (other.hasNextToken()) { + setNextToken(other.getNextToken()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { - if (!hasTableName()) { + if (!hasConsumed()) { + + return false; + } + if (!hasRows()) { + + return false; + } + if (!getConsumed().isInitialized()) { return false; } @@ -23953,52 +37622,27 @@ public Builder mergeFrom( break; } case 10: { - bitField0_ |= 0x00000001; - tableName_ = input.readBytes(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.newBuilder(); + if (hasConsumed()) { + subBuilder.mergeFrom(getConsumed()); + } + input.readMessage(subBuilder, extensionRegistry); + setConsumed(subBuilder.buildPartial()); break; } case 18: { - ensurePrimaryKeyIsMutable(); - primaryKey_.add(input.readBytes()); + bitField0_ |= 0x00000002; + rows_ = input.readBytes(); break; } case 26: { - ensureTokenIsMutable(); - token_.add(input.readBytes()); + bitField0_ |= 0x00000004; + nextStartPrimaryKey_ = input.readBytes(); break; } case 34: { - ensureColumnsToGetIsMutable(); - columnsToGet_.add(input.readBytes()); - break; - } - case 42: { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.newBuilder(); - if (hasTimeRange()) { - subBuilder.mergeFrom(getTimeRange()); - } - input.readMessage(subBuilder, extensionRegistry); - setTimeRange(subBuilder.buildPartial()); - break; - } - case 48: { - bitField0_ |= 0x00000020; - maxVersions_ = input.readInt32(); - break; - } - case 66: { - bitField0_ |= 0x00000040; - filter_ = input.readBytes(); - break; - } - case 74: { - bitField0_ |= 0x00000080; - startColumn_ = input.readBytes(); - break; - } - case 82: { - bitField0_ |= 0x00000100; - endColumn_ = input.readBytes(); + bitField0_ |= 0x00000008; + nextToken_ = input.readBytes(); break; } } @@ -24007,493 +37651,277 @@ public Builder mergeFrom( private int bitField0_; - // required string table_name = 1; - private java.lang.Object tableName_ = ""; - public boolean hasTableName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getTableName() { - java.lang.Object ref = tableName_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - tableName_ = s; - return s; - } else { - return (String) ref; - } - } - public Builder setTableName(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - tableName_ = value; - onChanged(); - return this; - } - public Builder clearTableName() { - bitField0_ = (bitField0_ & ~0x00000001); - tableName_ = getDefaultInstance().getTableName(); - onChanged(); - return this; - } - void setTableName(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; - tableName_ = value; - onChanged(); - } - - // repeated bytes primary_key = 2; - private java.util.List primaryKey_ = java.util.Collections.emptyList();; - private void ensurePrimaryKeyIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - primaryKey_ = new java.util.ArrayList(primaryKey_); - bitField0_ |= 0x00000002; - } - } - public java.util.List - getPrimaryKeyList() { - return java.util.Collections.unmodifiableList(primaryKey_); - } - public int getPrimaryKeyCount() { - return primaryKey_.size(); - } - public com.google.protobuf.ByteString getPrimaryKey(int index) { - return primaryKey_.get(index); - } - public Builder setPrimaryKey( - int index, com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - ensurePrimaryKeyIsMutable(); - primaryKey_.set(index, value); - onChanged(); - return this; - } - public Builder addPrimaryKey(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - ensurePrimaryKeyIsMutable(); - primaryKey_.add(value); - onChanged(); - return this; - } - public Builder addAllPrimaryKey( - java.lang.Iterable values) { - ensurePrimaryKeyIsMutable(); - super.addAll(values, primaryKey_); - onChanged(); - return this; - } - public Builder clearPrimaryKey() { - primaryKey_ = java.util.Collections.emptyList();; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - - // repeated bytes token = 3; - private java.util.List token_ = java.util.Collections.emptyList();; - private void ensureTokenIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { - token_ = new java.util.ArrayList(token_); - bitField0_ |= 0x00000004; - } - } - public java.util.List - getTokenList() { - return java.util.Collections.unmodifiableList(token_); - } - public int getTokenCount() { - return token_.size(); - } - public com.google.protobuf.ByteString getToken(int index) { - return token_.get(index); - } - public Builder setToken( - int index, com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - ensureTokenIsMutable(); - token_.set(index, value); - onChanged(); - return this; - } - public Builder addToken(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - ensureTokenIsMutable(); - token_.add(value); - onChanged(); - return this; - } - public Builder addAllToken( - java.lang.Iterable values) { - ensureTokenIsMutable(); - super.addAll(values, token_); - onChanged(); - return this; - } - public Builder clearToken() { - token_ = java.util.Collections.emptyList();; - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - - // repeated string columns_to_get = 4; - private com.google.protobuf.LazyStringList columnsToGet_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureColumnsToGetIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { - columnsToGet_ = new com.google.protobuf.LazyStringArrayList(columnsToGet_); - bitField0_ |= 0x00000008; - } - } - public java.util.List - getColumnsToGetList() { - return java.util.Collections.unmodifiableList(columnsToGet_); - } - public int getColumnsToGetCount() { - return columnsToGet_.size(); - } - public String getColumnsToGet(int index) { - return columnsToGet_.get(index); - } - public Builder setColumnsToGet( - int index, String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureColumnsToGetIsMutable(); - columnsToGet_.set(index, value); - onChanged(); - return this; - } - public Builder addColumnsToGet(String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureColumnsToGetIsMutable(); - columnsToGet_.add(value); - onChanged(); - return this; - } - public Builder addAllColumnsToGet( - java.lang.Iterable values) { - ensureColumnsToGetIsMutable(); - super.addAll(values, columnsToGet_); - onChanged(); - return this; - } - public Builder clearColumnsToGet() { - columnsToGet_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - void addColumnsToGet(com.google.protobuf.ByteString value) { - ensureColumnsToGetIsMutable(); - columnsToGet_.add(value); - onChanged(); - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.TimeRange time_range = 5; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange timeRange_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.getDefaultInstance(); + // required .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 1; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRangeOrBuilder> timeRangeBuilder_; - public boolean hasTimeRange() { - return ((bitField0_ & 0x00000010) == 0x00000010); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder> consumedBuilder_; + public boolean hasConsumed() { + return ((bitField0_ & 0x00000001) == 0x00000001); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange getTimeRange() { - if (timeRangeBuilder_ == null) { - return timeRange_; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed() { + if (consumedBuilder_ == null) { + return consumed_; } else { - return timeRangeBuilder_.getMessage(); + return consumedBuilder_.getMessage(); } } - public Builder setTimeRange(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange value) { - if (timeRangeBuilder_ == null) { + public Builder setConsumed(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity value) { + if (consumedBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - timeRange_ = value; + consumed_ = value; onChanged(); } else { - timeRangeBuilder_.setMessage(value); + consumedBuilder_.setMessage(value); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000001; return this; } - public Builder setTimeRange( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.Builder builderForValue) { - if (timeRangeBuilder_ == null) { - timeRange_ = builderForValue.build(); + public Builder setConsumed( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder builderForValue) { + if (consumedBuilder_ == null) { + consumed_ = builderForValue.build(); onChanged(); } else { - timeRangeBuilder_.setMessage(builderForValue.build()); + consumedBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000001; return this; } - public Builder mergeTimeRange(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange value) { - if (timeRangeBuilder_ == null) { - if (((bitField0_ & 0x00000010) == 0x00000010) && - timeRange_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.getDefaultInstance()) { - timeRange_ = - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.newBuilder(timeRange_).mergeFrom(value).buildPartial(); + public Builder mergeConsumed(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity value) { + if (consumedBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001) && + consumed_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance()) { + consumed_ = + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.newBuilder(consumed_).mergeFrom(value).buildPartial(); } else { - timeRange_ = value; + consumed_ = value; } onChanged(); } else { - timeRangeBuilder_.mergeFrom(value); + consumedBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000001; return this; } - public Builder clearTimeRange() { - if (timeRangeBuilder_ == null) { - timeRange_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.getDefaultInstance(); + public Builder clearConsumed() { + if (consumedBuilder_ == null) { + consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); onChanged(); } else { - timeRangeBuilder_.clear(); + consumedBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000001); return this; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.Builder getTimeRangeBuilder() { - bitField0_ |= 0x00000010; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder getConsumedBuilder() { + bitField0_ |= 0x00000001; onChanged(); - return getTimeRangeFieldBuilder().getBuilder(); + return getConsumedFieldBuilder().getBuilder(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRangeOrBuilder getTimeRangeOrBuilder() { - if (timeRangeBuilder_ != null) { - return timeRangeBuilder_.getMessageOrBuilder(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder() { + if (consumedBuilder_ != null) { + return consumedBuilder_.getMessageOrBuilder(); } else { - return timeRange_; + return consumed_; } } private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRangeOrBuilder> - getTimeRangeFieldBuilder() { - if (timeRangeBuilder_ == null) { - timeRangeBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRangeOrBuilder>( - timeRange_, + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder> + getConsumedFieldBuilder() { + if (consumedBuilder_ == null) { + consumedBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder>( + consumed_, getParentForChildren(), isClean()); - timeRange_ = null; + consumed_ = null; } - return timeRangeBuilder_; - } - - // optional int32 max_versions = 6; - private int maxVersions_ ; - public boolean hasMaxVersions() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - public int getMaxVersions() { - return maxVersions_; - } - public Builder setMaxVersions(int value) { - bitField0_ |= 0x00000020; - maxVersions_ = value; - onChanged(); - return this; - } - public Builder clearMaxVersions() { - bitField0_ = (bitField0_ & ~0x00000020); - maxVersions_ = 0; - onChanged(); - return this; + return consumedBuilder_; } - // optional bytes filter = 8; - private com.google.protobuf.ByteString filter_ = com.google.protobuf.ByteString.EMPTY; - public boolean hasFilter() { - return ((bitField0_ & 0x00000040) == 0x00000040); + // required bytes rows = 2; + private com.google.protobuf.ByteString rows_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasRows() { + return ((bitField0_ & 0x00000002) == 0x00000002); } - public com.google.protobuf.ByteString getFilter() { - return filter_; + public com.google.protobuf.ByteString getRows() { + return rows_; } - public Builder setFilter(com.google.protobuf.ByteString value) { + public Builder setRows(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000040; - filter_ = value; + bitField0_ |= 0x00000002; + rows_ = value; onChanged(); return this; } - public Builder clearFilter() { - bitField0_ = (bitField0_ & ~0x00000040); - filter_ = getDefaultInstance().getFilter(); + public Builder clearRows() { + bitField0_ = (bitField0_ & ~0x00000002); + rows_ = getDefaultInstance().getRows(); onChanged(); return this; } - // optional string start_column = 9; - private java.lang.Object startColumn_ = ""; - public boolean hasStartColumn() { - return ((bitField0_ & 0x00000080) == 0x00000080); + // optional bytes next_start_primary_key = 3; + private com.google.protobuf.ByteString nextStartPrimaryKey_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasNextStartPrimaryKey() { + return ((bitField0_ & 0x00000004) == 0x00000004); } - public String getStartColumn() { - java.lang.Object ref = startColumn_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - startColumn_ = s; - return s; - } else { - return (String) ref; - } + public com.google.protobuf.ByteString getNextStartPrimaryKey() { + return nextStartPrimaryKey_; } - public Builder setStartColumn(String value) { + public Builder setNextStartPrimaryKey(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000080; - startColumn_ = value; - onChanged(); - return this; - } - public Builder clearStartColumn() { - bitField0_ = (bitField0_ & ~0x00000080); - startColumn_ = getDefaultInstance().getStartColumn(); + bitField0_ |= 0x00000004; + nextStartPrimaryKey_ = value; onChanged(); return this; } - void setStartColumn(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000080; - startColumn_ = value; + public Builder clearNextStartPrimaryKey() { + bitField0_ = (bitField0_ & ~0x00000004); + nextStartPrimaryKey_ = getDefaultInstance().getNextStartPrimaryKey(); onChanged(); + return this; } - // optional string end_column = 10; - private java.lang.Object endColumn_ = ""; - public boolean hasEndColumn() { - return ((bitField0_ & 0x00000100) == 0x00000100); + // optional bytes next_token = 4; + private com.google.protobuf.ByteString nextToken_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasNextToken() { + return ((bitField0_ & 0x00000008) == 0x00000008); } - public String getEndColumn() { - java.lang.Object ref = endColumn_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - endColumn_ = s; - return s; - } else { - return (String) ref; - } + public com.google.protobuf.ByteString getNextToken() { + return nextToken_; } - public Builder setEndColumn(String value) { + public Builder setNextToken(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000100; - endColumn_ = value; + bitField0_ |= 0x00000008; + nextToken_ = value; onChanged(); return this; } - public Builder clearEndColumn() { - bitField0_ = (bitField0_ & ~0x00000100); - endColumn_ = getDefaultInstance().getEndColumn(); + public Builder clearNextToken() { + bitField0_ = (bitField0_ & ~0x00000008); + nextToken_ = getDefaultInstance().getNextToken(); onChanged(); return this; } - void setEndColumn(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000100; - endColumn_ = value; - onChanged(); - } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.TableInBatchGetRowRequest) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GetRangeResponse) } static { - defaultInstance = new TableInBatchGetRowRequest(true); + defaultInstance = new GetRangeResponse(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.TableInBatchGetRowRequest) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GetRangeResponse) } - public interface BatchGetRowRequestOrBuilder + public interface StartLocalTransactionRequestOrBuilder extends com.google.protobuf.MessageOrBuilder { - // repeated .com.alicloud.openservices.tablestore.core.protocol.TableInBatchGetRowRequest tables = 1; - java.util.List - getTablesList(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest getTables(int index); - int getTablesCount(); - java.util.List - getTablesOrBuilderList(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequestOrBuilder getTablesOrBuilder( - int index); + // required string table_name = 1; + boolean hasTableName(); + String getTableName(); + + // required bytes key = 2; + boolean hasKey(); + com.google.protobuf.ByteString getKey(); } - public static final class BatchGetRowRequest extends + public static final class StartLocalTransactionRequest extends com.google.protobuf.GeneratedMessage - implements BatchGetRowRequestOrBuilder { - // Use BatchGetRowRequest.newBuilder() to construct. - private BatchGetRowRequest(Builder builder) { + implements StartLocalTransactionRequestOrBuilder { + // Use StartLocalTransactionRequest.newBuilder() to construct. + private StartLocalTransactionRequest(Builder builder) { super(builder); } - private BatchGetRowRequest(boolean noInit) {} + private StartLocalTransactionRequest(boolean noInit) {} - private static final BatchGetRowRequest defaultInstance; - public static BatchGetRowRequest getDefaultInstance() { + private static final StartLocalTransactionRequest defaultInstance; + public static StartLocalTransactionRequest getDefaultInstance() { return defaultInstance; } - public BatchGetRowRequest getDefaultInstanceForType() { + public StartLocalTransactionRequest getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_BatchGetRowRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_StartLocalTransactionRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_BatchGetRowRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_StartLocalTransactionRequest_fieldAccessorTable; } - // repeated .com.alicloud.openservices.tablestore.core.protocol.TableInBatchGetRowRequest tables = 1; - public static final int TABLES_FIELD_NUMBER = 1; - private java.util.List tables_; - public java.util.List getTablesList() { - return tables_; + private int bitField0_; + // required string table_name = 1; + public static final int TABLE_NAME_FIELD_NUMBER = 1; + private java.lang.Object tableName_; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); } - public java.util.List - getTablesOrBuilderList() { - return tables_; + public String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + tableName_ = s; + } + return s; + } } - public int getTablesCount() { - return tables_.size(); + private com.google.protobuf.ByteString getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest getTables(int index) { - return tables_.get(index); + + // required bytes key = 2; + public static final int KEY_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString key_; + public boolean hasKey() { + return ((bitField0_ & 0x00000002) == 0x00000002); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequestOrBuilder getTablesOrBuilder( - int index) { - return tables_.get(index); + public com.google.protobuf.ByteString getKey() { + return key_; } private void initFields() { - tables_ = java.util.Collections.emptyList(); + tableName_ = ""; + key_ = com.google.protobuf.ByteString.EMPTY; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - for (int i = 0; i < getTablesCount(); i++) { - if (!getTables(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } + if (!hasTableName()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasKey()) { + memoizedIsInitialized = 0; + return false; } memoizedIsInitialized = 1; return true; @@ -24502,8 +37930,11 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - for (int i = 0; i < tables_.size(); i++) { - output.writeMessage(1, tables_.get(i)); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, key_); } getUnknownFields().writeTo(output); } @@ -24514,9 +37945,13 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - for (int i = 0; i < tables_.size(); i++) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, tables_.get(i)); + .computeBytesSize(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, key_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -24530,41 +37965,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -24573,7 +38008,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -24584,12 +38019,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -24599,7 +38034,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -24612,18 +38047,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequestOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_BatchGetRowRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_StartLocalTransactionRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_BatchGetRowRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_StartLocalTransactionRequest_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -24634,7 +38069,6 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getTablesFieldBuilder(); } } private static Builder create() { @@ -24643,12 +38077,10 @@ private static Builder create() { public Builder clear() { super.clear(); - if (tablesBuilder_ == null) { - tables_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - tablesBuilder_.clear(); - } + tableName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + key_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -24658,24 +38090,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -24683,69 +38115,52 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchG return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest(this); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest(this); int from_bitField0_ = bitField0_; - if (tablesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - tables_ = java.util.Collections.unmodifiableList(tables_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.tables_ = tables_; - } else { - result.tables_ = tablesBuilder_.build(); + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.tableName_ = tableName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; } + result.key_ = key_; + result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest.getDefaultInstance()) return this; - if (tablesBuilder_ == null) { - if (!other.tables_.isEmpty()) { - if (tables_.isEmpty()) { - tables_ = other.tables_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureTablesIsMutable(); - tables_.addAll(other.tables_); - } - onChanged(); - } - } else { - if (!other.tables_.isEmpty()) { - if (tablesBuilder_.isEmpty()) { - tablesBuilder_.dispose(); - tablesBuilder_ = null; - tables_ = other.tables_; - bitField0_ = (bitField0_ & ~0x00000001); - tablesBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getTablesFieldBuilder() : null; - } else { - tablesBuilder_.addAllMessages(other.tables_); - } - } + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest.getDefaultInstance()) return this; + if (other.hasTableName()) { + setTableName(other.getTableName()); + } + if (other.hasKey()) { + setKey(other.getKey()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { - for (int i = 0; i < getTablesCount(); i++) { - if (!getTables(i).isInitialized()) { - - return false; - } + if (!hasTableName()) { + + return false; + } + if (!hasKey()) { + + return false; } return true; } @@ -24774,9 +38189,13 @@ public Builder mergeFrom( break; } case 10: { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest.newBuilder(); - input.readMessage(subBuilder, extensionRegistry); - addTables(subBuilder.buildPartial()); + bitField0_ |= 0x00000001; + tableName_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + key_ = input.readBytes(); break; } } @@ -24785,341 +38204,157 @@ public Builder mergeFrom( private int bitField0_; - // repeated .com.alicloud.openservices.tablestore.core.protocol.TableInBatchGetRowRequest tables = 1; - private java.util.List tables_ = - java.util.Collections.emptyList(); - private void ensureTablesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - tables_ = new java.util.ArrayList(tables_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequestOrBuilder> tablesBuilder_; - - public java.util.List getTablesList() { - if (tablesBuilder_ == null) { - return java.util.Collections.unmodifiableList(tables_); - } else { - return tablesBuilder_.getMessageList(); - } - } - public int getTablesCount() { - if (tablesBuilder_ == null) { - return tables_.size(); - } else { - return tablesBuilder_.getCount(); - } - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest getTables(int index) { - if (tablesBuilder_ == null) { - return tables_.get(index); - } else { - return tablesBuilder_.getMessage(index); - } - } - public Builder setTables( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest value) { - if (tablesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTablesIsMutable(); - tables_.set(index, value); - onChanged(); - } else { - tablesBuilder_.setMessage(index, value); - } - return this; - } - public Builder setTables( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest.Builder builderForValue) { - if (tablesBuilder_ == null) { - ensureTablesIsMutable(); - tables_.set(index, builderForValue.build()); - onChanged(); - } else { - tablesBuilder_.setMessage(index, builderForValue.build()); - } - return this; + // required string table_name = 1; + private java.lang.Object tableName_ = ""; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); } - public Builder addTables(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest value) { - if (tablesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTablesIsMutable(); - tables_.add(value); - onChanged(); + public String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + tableName_ = s; + return s; } else { - tablesBuilder_.addMessage(value); + return (String) ref; } - return this; } - public Builder addTables( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest value) { - if (tablesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTablesIsMutable(); - tables_.add(index, value); - onChanged(); - } else { - tablesBuilder_.addMessage(index, value); - } + public Builder setTableName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); return this; } - public Builder addTables( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest.Builder builderForValue) { - if (tablesBuilder_ == null) { - ensureTablesIsMutable(); - tables_.add(builderForValue.build()); - onChanged(); - } else { - tablesBuilder_.addMessage(builderForValue.build()); - } + public Builder clearTableName() { + bitField0_ = (bitField0_ & ~0x00000001); + tableName_ = getDefaultInstance().getTableName(); + onChanged(); return this; } - public Builder addTables( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest.Builder builderForValue) { - if (tablesBuilder_ == null) { - ensureTablesIsMutable(); - tables_.add(index, builderForValue.build()); - onChanged(); - } else { - tablesBuilder_.addMessage(index, builderForValue.build()); - } - return this; + void setTableName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); } - public Builder addAllTables( - java.lang.Iterable values) { - if (tablesBuilder_ == null) { - ensureTablesIsMutable(); - super.addAll(values, tables_); - onChanged(); - } else { - tablesBuilder_.addAllMessages(values); - } - return this; + + // required bytes key = 2; + private com.google.protobuf.ByteString key_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasKey() { + return ((bitField0_ & 0x00000002) == 0x00000002); } - public Builder clearTables() { - if (tablesBuilder_ == null) { - tables_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - tablesBuilder_.clear(); - } - return this; + public com.google.protobuf.ByteString getKey() { + return key_; } - public Builder removeTables(int index) { - if (tablesBuilder_ == null) { - ensureTablesIsMutable(); - tables_.remove(index); - onChanged(); - } else { - tablesBuilder_.remove(index); - } + public Builder setKey(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + key_ = value; + onChanged(); return this; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest.Builder getTablesBuilder( - int index) { - return getTablesFieldBuilder().getBuilder(index); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequestOrBuilder getTablesOrBuilder( - int index) { - if (tablesBuilder_ == null) { - return tables_.get(index); } else { - return tablesBuilder_.getMessageOrBuilder(index); - } - } - public java.util.List - getTablesOrBuilderList() { - if (tablesBuilder_ != null) { - return tablesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(tables_); - } - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest.Builder addTablesBuilder() { - return getTablesFieldBuilder().addBuilder( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest.getDefaultInstance()); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest.Builder addTablesBuilder( - int index) { - return getTablesFieldBuilder().addBuilder( - index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest.getDefaultInstance()); - } - public java.util.List - getTablesBuilderList() { - return getTablesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequestOrBuilder> - getTablesFieldBuilder() { - if (tablesBuilder_ == null) { - tablesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequestOrBuilder>( - tables_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); - tables_ = null; - } - return tablesBuilder_; + public Builder clearKey() { + bitField0_ = (bitField0_ & ~0x00000002); + key_ = getDefaultInstance().getKey(); + onChanged(); + return this; } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.BatchGetRowRequest) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.StartLocalTransactionRequest) } static { - defaultInstance = new BatchGetRowRequest(true); + defaultInstance = new StartLocalTransactionRequest(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.BatchGetRowRequest) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.StartLocalTransactionRequest) } - public interface RowInBatchGetRowResponseOrBuilder + public interface StartLocalTransactionResponseOrBuilder extends com.google.protobuf.MessageOrBuilder { - // required bool is_ok = 1; - boolean hasIsOk(); - boolean getIsOk(); - - // optional .com.alicloud.openservices.tablestore.core.protocol.Error error = 2; - boolean hasError(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error getError(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ErrorOrBuilder getErrorOrBuilder(); - - // optional .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 3; - boolean hasConsumed(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder(); - - // optional bytes row = 4; - boolean hasRow(); - com.google.protobuf.ByteString getRow(); - - // optional bytes next_token = 5; - boolean hasNextToken(); - com.google.protobuf.ByteString getNextToken(); + // required string transaction_id = 1; + boolean hasTransactionId(); + String getTransactionId(); } - public static final class RowInBatchGetRowResponse extends + public static final class StartLocalTransactionResponse extends com.google.protobuf.GeneratedMessage - implements RowInBatchGetRowResponseOrBuilder { - // Use RowInBatchGetRowResponse.newBuilder() to construct. - private RowInBatchGetRowResponse(Builder builder) { + implements StartLocalTransactionResponseOrBuilder { + // Use StartLocalTransactionResponse.newBuilder() to construct. + private StartLocalTransactionResponse(Builder builder) { super(builder); } - private RowInBatchGetRowResponse(boolean noInit) {} + private StartLocalTransactionResponse(boolean noInit) {} - private static final RowInBatchGetRowResponse defaultInstance; - public static RowInBatchGetRowResponse getDefaultInstance() { + private static final StartLocalTransactionResponse defaultInstance; + public static StartLocalTransactionResponse getDefaultInstance() { return defaultInstance; } - public RowInBatchGetRowResponse getDefaultInstanceForType() { + public StartLocalTransactionResponse getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBatchGetRowResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_StartLocalTransactionResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBatchGetRowResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_StartLocalTransactionResponse_fieldAccessorTable; } private int bitField0_; - // required bool is_ok = 1; - public static final int IS_OK_FIELD_NUMBER = 1; - private boolean isOk_; - public boolean hasIsOk() { + // required string transaction_id = 1; + public static final int TRANSACTION_ID_FIELD_NUMBER = 1; + private java.lang.Object transactionId_; + public boolean hasTransactionId() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public boolean getIsOk() { - return isOk_; - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.Error error = 2; - public static final int ERROR_FIELD_NUMBER = 2; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error error_; - public boolean hasError() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error getError() { - return error_; - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ErrorOrBuilder getErrorOrBuilder() { - return error_; - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 3; - public static final int CONSUMED_FIELD_NUMBER = 3; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity consumed_; - public boolean hasConsumed() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed() { - return consumed_; - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder() { - return consumed_; - } - - // optional bytes row = 4; - public static final int ROW_FIELD_NUMBER = 4; - private com.google.protobuf.ByteString row_; - public boolean hasRow() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public com.google.protobuf.ByteString getRow() { - return row_; - } - - // optional bytes next_token = 5; - public static final int NEXT_TOKEN_FIELD_NUMBER = 5; - private com.google.protobuf.ByteString nextToken_; - public boolean hasNextToken() { - return ((bitField0_ & 0x00000010) == 0x00000010); + public String getTransactionId() { + java.lang.Object ref = transactionId_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + transactionId_ = s; + } + return s; + } } - public com.google.protobuf.ByteString getNextToken() { - return nextToken_; + private com.google.protobuf.ByteString getTransactionIdBytes() { + java.lang.Object ref = transactionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + transactionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } private void initFields() { - isOk_ = false; - error_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.getDefaultInstance(); - consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); - row_ = com.google.protobuf.ByteString.EMPTY; - nextToken_ = com.google.protobuf.ByteString.EMPTY; + transactionId_ = ""; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - if (!hasIsOk()) { + if (!hasTransactionId()) { memoizedIsInitialized = 0; return false; } - if (hasError()) { - if (!getError().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - if (hasConsumed()) { - if (!getConsumed().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } memoizedIsInitialized = 1; return true; } @@ -25128,19 +38363,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBool(1, isOk_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeMessage(2, error_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeMessage(3, consumed_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeBytes(4, row_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeBytes(5, nextToken_); + output.writeBytes(1, getTransactionIdBytes()); } getUnknownFields().writeTo(output); } @@ -25153,23 +38376,7 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeBoolSize(1, isOk_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, error_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, consumed_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(4, row_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(5, nextToken_); + .computeBytesSize(1, getTransactionIdBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -25183,41 +38390,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -25226,7 +38433,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -25237,12 +38444,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -25252,7 +38459,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -25265,18 +38472,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponseOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBatchGetRowResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_StartLocalTransactionResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBatchGetRowResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_StartLocalTransactionResponse_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -25287,8 +38494,6 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getErrorFieldBuilder(); - getConsumedFieldBuilder(); } } private static Builder create() { @@ -25297,24 +38502,8 @@ private static Builder create() { public Builder clear() { super.clear(); - isOk_ = false; + transactionId_ = ""; bitField0_ = (bitField0_ & ~0x00000001); - if (errorBuilder_ == null) { - error_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.getDefaultInstance(); - } else { - errorBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - if (consumedBuilder_ == null) { - consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); - } else { - consumedBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - row_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000008); - nextToken_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000010); return this; } @@ -25324,24 +38513,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -25349,90 +38538,42 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInB return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse(this); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.isOk_ = isOk_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - if (errorBuilder_ == null) { - result.error_ = error_; - } else { - result.error_ = errorBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - if (consumedBuilder_ == null) { - result.consumed_ = consumed_; - } else { - result.consumed_ = consumedBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - result.row_ = row_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000010; - } - result.nextToken_ = nextToken_; + result.transactionId_ = transactionId_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse.getDefaultInstance()) return this; - if (other.hasIsOk()) { - setIsOk(other.getIsOk()); - } - if (other.hasError()) { - mergeError(other.getError()); - } - if (other.hasConsumed()) { - mergeConsumed(other.getConsumed()); - } - if (other.hasRow()) { - setRow(other.getRow()); - } - if (other.hasNextToken()) { - setNextToken(other.getNextToken()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse.getDefaultInstance()) return this; + if (other.hasTransactionId()) { + setTransactionId(other.getTransactionId()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { - if (!hasIsOk()) { + if (!hasTransactionId()) { return false; } - if (hasError()) { - if (!getError().isInitialized()) { - - return false; - } - } - if (hasConsumed()) { - if (!getConsumed().isInitialized()) { - - return false; - } - } return true; } @@ -25459,359 +38600,108 @@ public Builder mergeFrom( } break; } - case 8: { + case 10: { bitField0_ |= 0x00000001; - isOk_ = input.readBool(); - break; - } - case 18: { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.newBuilder(); - if (hasError()) { - subBuilder.mergeFrom(getError()); - } - input.readMessage(subBuilder, extensionRegistry); - setError(subBuilder.buildPartial()); - break; - } - case 26: { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.newBuilder(); - if (hasConsumed()) { - subBuilder.mergeFrom(getConsumed()); - } - input.readMessage(subBuilder, extensionRegistry); - setConsumed(subBuilder.buildPartial()); - break; - } - case 34: { - bitField0_ |= 0x00000008; - row_ = input.readBytes(); - break; - } - case 42: { - bitField0_ |= 0x00000010; - nextToken_ = input.readBytes(); + transactionId_ = input.readBytes(); break; } } } } - - private int bitField0_; - - // required bool is_ok = 1; - private boolean isOk_ ; - public boolean hasIsOk() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public boolean getIsOk() { - return isOk_; - } - public Builder setIsOk(boolean value) { - bitField0_ |= 0x00000001; - isOk_ = value; - onChanged(); - return this; - } - public Builder clearIsOk() { - bitField0_ = (bitField0_ & ~0x00000001); - isOk_ = false; - onChanged(); - return this; - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.Error error = 2; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error error_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ErrorOrBuilder> errorBuilder_; - public boolean hasError() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error getError() { - if (errorBuilder_ == null) { - return error_; - } else { - return errorBuilder_.getMessage(); - } - } - public Builder setError(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error value) { - if (errorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - error_ = value; - onChanged(); - } else { - errorBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - return this; - } - public Builder setError( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.Builder builderForValue) { - if (errorBuilder_ == null) { - error_ = builderForValue.build(); - onChanged(); - } else { - errorBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - return this; - } - public Builder mergeError(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error value) { - if (errorBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002) && - error_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.getDefaultInstance()) { - error_ = - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.newBuilder(error_).mergeFrom(value).buildPartial(); - } else { - error_ = value; - } - onChanged(); - } else { - errorBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - return this; - } - public Builder clearError() { - if (errorBuilder_ == null) { - error_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.getDefaultInstance(); - onChanged(); - } else { - errorBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.Builder getErrorBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getErrorFieldBuilder().getBuilder(); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ErrorOrBuilder getErrorOrBuilder() { - if (errorBuilder_ != null) { - return errorBuilder_.getMessageOrBuilder(); - } else { - return error_; - } - } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ErrorOrBuilder> - getErrorFieldBuilder() { - if (errorBuilder_ == null) { - errorBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ErrorOrBuilder>( - error_, - getParentForChildren(), - isClean()); - error_ = null; - } - return errorBuilder_; - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 3; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder> consumedBuilder_; - public boolean hasConsumed() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed() { - if (consumedBuilder_ == null) { - return consumed_; - } else { - return consumedBuilder_.getMessage(); - } - } - public Builder setConsumed(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity value) { - if (consumedBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - consumed_ = value; - onChanged(); - } else { - consumedBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - return this; - } - public Builder setConsumed( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder builderForValue) { - if (consumedBuilder_ == null) { - consumed_ = builderForValue.build(); - onChanged(); - } else { - consumedBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - return this; - } - public Builder mergeConsumed(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity value) { - if (consumedBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004) && - consumed_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance()) { - consumed_ = - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.newBuilder(consumed_).mergeFrom(value).buildPartial(); - } else { - consumed_ = value; - } - onChanged(); - } else { - consumedBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - return this; - } - public Builder clearConsumed() { - if (consumedBuilder_ == null) { - consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); - onChanged(); - } else { - consumedBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder getConsumedBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getConsumedFieldBuilder().getBuilder(); + + private int bitField0_; + + // required string transaction_id = 1; + private java.lang.Object transactionId_ = ""; + public boolean hasTransactionId() { + return ((bitField0_ & 0x00000001) == 0x00000001); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder() { - if (consumedBuilder_ != null) { - return consumedBuilder_.getMessageOrBuilder(); + public String getTransactionId() { + java.lang.Object ref = transactionId_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + transactionId_ = s; + return s; } else { - return consumed_; - } - } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder> - getConsumedFieldBuilder() { - if (consumedBuilder_ == null) { - consumedBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder>( - consumed_, - getParentForChildren(), - isClean()); - consumed_ = null; + return (String) ref; } - return consumedBuilder_; - } - - // optional bytes row = 4; - private com.google.protobuf.ByteString row_ = com.google.protobuf.ByteString.EMPTY; - public boolean hasRow() { - return ((bitField0_ & 0x00000008) == 0x00000008); } - public com.google.protobuf.ByteString getRow() { - return row_; - } - public Builder setRow(com.google.protobuf.ByteString value) { + public Builder setTransactionId(String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000008; - row_ = value; - onChanged(); - return this; - } - public Builder clearRow() { - bitField0_ = (bitField0_ & ~0x00000008); - row_ = getDefaultInstance().getRow(); + bitField0_ |= 0x00000001; + transactionId_ = value; onChanged(); return this; } - - // optional bytes next_token = 5; - private com.google.protobuf.ByteString nextToken_ = com.google.protobuf.ByteString.EMPTY; - public boolean hasNextToken() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - public com.google.protobuf.ByteString getNextToken() { - return nextToken_; - } - public Builder setNextToken(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; - nextToken_ = value; + public Builder clearTransactionId() { + bitField0_ = (bitField0_ & ~0x00000001); + transactionId_ = getDefaultInstance().getTransactionId(); onChanged(); return this; } - public Builder clearNextToken() { - bitField0_ = (bitField0_ & ~0x00000010); - nextToken_ = getDefaultInstance().getNextToken(); + void setTransactionId(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + transactionId_ = value; onChanged(); - return this; } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.RowInBatchGetRowResponse) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.StartLocalTransactionResponse) } static { - defaultInstance = new RowInBatchGetRowResponse(true); + defaultInstance = new StartLocalTransactionResponse(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.RowInBatchGetRowResponse) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.StartLocalTransactionResponse) } - public interface TableInBatchGetRowResponseOrBuilder + public interface CommitTransactionRequestOrBuilder extends com.google.protobuf.MessageOrBuilder { - // required string table_name = 1; - boolean hasTableName(); - String getTableName(); - - // repeated .com.alicloud.openservices.tablestore.core.protocol.RowInBatchGetRowResponse rows = 2; - java.util.List - getRowsList(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse getRows(int index); - int getRowsCount(); - java.util.List - getRowsOrBuilderList(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponseOrBuilder getRowsOrBuilder( - int index); + // required string transaction_id = 1; + boolean hasTransactionId(); + String getTransactionId(); } - public static final class TableInBatchGetRowResponse extends + public static final class CommitTransactionRequest extends com.google.protobuf.GeneratedMessage - implements TableInBatchGetRowResponseOrBuilder { - // Use TableInBatchGetRowResponse.newBuilder() to construct. - private TableInBatchGetRowResponse(Builder builder) { + implements CommitTransactionRequestOrBuilder { + // Use CommitTransactionRequest.newBuilder() to construct. + private CommitTransactionRequest(Builder builder) { super(builder); } - private TableInBatchGetRowResponse(boolean noInit) {} + private CommitTransactionRequest(boolean noInit) {} - private static final TableInBatchGetRowResponse defaultInstance; - public static TableInBatchGetRowResponse getDefaultInstance() { + private static final CommitTransactionRequest defaultInstance; + public static CommitTransactionRequest getDefaultInstance() { return defaultInstance; } - public TableInBatchGetRowResponse getDefaultInstanceForType() { + public CommitTransactionRequest getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TableInBatchGetRowResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CommitTransactionRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TableInBatchGetRowResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CommitTransactionRequest_fieldAccessorTable; } private int bitField0_; - // required string table_name = 1; - public static final int TABLE_NAME_FIELD_NUMBER = 1; - private java.lang.Object tableName_; - public boolean hasTableName() { + // required string transaction_id = 1; + public static final int TRANSACTION_ID_FIELD_NUMBER = 1; + private java.lang.Object transactionId_; + public boolean hasTransactionId() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getTableName() { - java.lang.Object ref = tableName_; + public String getTransactionId() { + java.lang.Object ref = transactionId_; if (ref instanceof String) { return (String) ref; } else { @@ -25819,63 +38709,35 @@ public String getTableName() { (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); if (com.google.protobuf.Internal.isValidUtf8(bs)) { - tableName_ = s; + transactionId_ = s; } return s; } } - private com.google.protobuf.ByteString getTableNameBytes() { - java.lang.Object ref = tableName_; + private com.google.protobuf.ByteString getTransactionIdBytes() { + java.lang.Object ref = transactionId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((String) ref); - tableName_ = b; + transactionId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - // repeated .com.alicloud.openservices.tablestore.core.protocol.RowInBatchGetRowResponse rows = 2; - public static final int ROWS_FIELD_NUMBER = 2; - private java.util.List rows_; - public java.util.List getRowsList() { - return rows_; - } - public java.util.List - getRowsOrBuilderList() { - return rows_; - } - public int getRowsCount() { - return rows_.size(); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse getRows(int index) { - return rows_.get(index); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponseOrBuilder getRowsOrBuilder( - int index) { - return rows_.get(index); - } - private void initFields() { - tableName_ = ""; - rows_ = java.util.Collections.emptyList(); + transactionId_ = ""; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - if (!hasTableName()) { + if (!hasTransactionId()) { memoizedIsInitialized = 0; return false; } - for (int i = 0; i < getRowsCount(); i++) { - if (!getRows(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } memoizedIsInitialized = 1; return true; } @@ -25884,10 +38746,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getTableNameBytes()); - } - for (int i = 0; i < rows_.size(); i++) { - output.writeMessage(2, rows_.get(i)); + output.writeBytes(1, getTransactionIdBytes()); } getUnknownFields().writeTo(output); } @@ -25900,11 +38759,7 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getTableNameBytes()); - } - for (int i = 0; i < rows_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, rows_.get(i)); + .computeBytesSize(1, getTransactionIdBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -25918,41 +38773,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -25961,7 +38816,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -25972,12 +38827,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -25987,7 +38842,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -26000,18 +38855,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponseOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TableInBatchGetRowResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CommitTransactionRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TableInBatchGetRowResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CommitTransactionRequest_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -26022,7 +38877,6 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getRowsFieldBuilder(); } } private static Builder create() { @@ -26031,14 +38885,8 @@ private static Builder create() { public Builder clear() { super.clear(); - tableName_ = ""; + transactionId_ = ""; bitField0_ = (bitField0_ & ~0x00000001); - if (rowsBuilder_ == null) { - rows_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - rowsBuilder_.clear(); - } return this; } @@ -26048,24 +38896,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -26073,83 +38921,42 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableI return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse(this); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.tableName_ = tableName_; - if (rowsBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { - rows_ = java.util.Collections.unmodifiableList(rows_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.rows_ = rows_; - } else { - result.rows_ = rowsBuilder_.build(); - } + result.transactionId_ = transactionId_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse.getDefaultInstance()) return this; - if (other.hasTableName()) { - setTableName(other.getTableName()); - } - if (rowsBuilder_ == null) { - if (!other.rows_.isEmpty()) { - if (rows_.isEmpty()) { - rows_ = other.rows_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureRowsIsMutable(); - rows_.addAll(other.rows_); - } - onChanged(); - } - } else { - if (!other.rows_.isEmpty()) { - if (rowsBuilder_.isEmpty()) { - rowsBuilder_.dispose(); - rowsBuilder_ = null; - rows_ = other.rows_; - bitField0_ = (bitField0_ & ~0x00000002); - rowsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getRowsFieldBuilder() : null; - } else { - rowsBuilder_.addAllMessages(other.rows_); - } - } + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest.getDefaultInstance()) return this; + if (other.hasTransactionId()) { + setTransactionId(other.getTransactionId()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { - if (!hasTableName()) { + if (!hasTransactionId()) { return false; } - for (int i = 0; i < getRowsCount(); i++) { - if (!getRows(i).isInitialized()) { - - return false; - } - } return true; } @@ -26178,330 +38985,100 @@ public Builder mergeFrom( } case 10: { bitField0_ |= 0x00000001; - tableName_ = input.readBytes(); - break; - } - case 18: { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse.newBuilder(); - input.readMessage(subBuilder, extensionRegistry); - addRows(subBuilder.buildPartial()); + transactionId_ = input.readBytes(); break; } } } } - private int bitField0_; - - // required string table_name = 1; - private java.lang.Object tableName_ = ""; - public boolean hasTableName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getTableName() { - java.lang.Object ref = tableName_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - tableName_ = s; - return s; - } else { - return (String) ref; - } - } - public Builder setTableName(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - tableName_ = value; - onChanged(); - return this; - } - public Builder clearTableName() { - bitField0_ = (bitField0_ & ~0x00000001); - tableName_ = getDefaultInstance().getTableName(); - onChanged(); - return this; - } - void setTableName(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; - tableName_ = value; - onChanged(); - } - - // repeated .com.alicloud.openservices.tablestore.core.protocol.RowInBatchGetRowResponse rows = 2; - private java.util.List rows_ = - java.util.Collections.emptyList(); - private void ensureRowsIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - rows_ = new java.util.ArrayList(rows_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponseOrBuilder> rowsBuilder_; - - public java.util.List getRowsList() { - if (rowsBuilder_ == null) { - return java.util.Collections.unmodifiableList(rows_); - } else { - return rowsBuilder_.getMessageList(); - } - } - public int getRowsCount() { - if (rowsBuilder_ == null) { - return rows_.size(); - } else { - return rowsBuilder_.getCount(); - } - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse getRows(int index) { - if (rowsBuilder_ == null) { - return rows_.get(index); - } else { - return rowsBuilder_.getMessage(index); - } - } - public Builder setRows( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse value) { - if (rowsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRowsIsMutable(); - rows_.set(index, value); - onChanged(); - } else { - rowsBuilder_.setMessage(index, value); - } - return this; - } - public Builder setRows( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse.Builder builderForValue) { - if (rowsBuilder_ == null) { - ensureRowsIsMutable(); - rows_.set(index, builderForValue.build()); - onChanged(); - } else { - rowsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - public Builder addRows(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse value) { - if (rowsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRowsIsMutable(); - rows_.add(value); - onChanged(); - } else { - rowsBuilder_.addMessage(value); - } - return this; - } - public Builder addRows( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse value) { - if (rowsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRowsIsMutable(); - rows_.add(index, value); - onChanged(); - } else { - rowsBuilder_.addMessage(index, value); - } - return this; - } - public Builder addRows( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse.Builder builderForValue) { - if (rowsBuilder_ == null) { - ensureRowsIsMutable(); - rows_.add(builderForValue.build()); - onChanged(); - } else { - rowsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - public Builder addRows( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse.Builder builderForValue) { - if (rowsBuilder_ == null) { - ensureRowsIsMutable(); - rows_.add(index, builderForValue.build()); - onChanged(); - } else { - rowsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - public Builder addAllRows( - java.lang.Iterable values) { - if (rowsBuilder_ == null) { - ensureRowsIsMutable(); - super.addAll(values, rows_); - onChanged(); - } else { - rowsBuilder_.addAllMessages(values); - } - return this; - } - public Builder clearRows() { - if (rowsBuilder_ == null) { - rows_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - rowsBuilder_.clear(); - } - return this; - } - public Builder removeRows(int index) { - if (rowsBuilder_ == null) { - ensureRowsIsMutable(); - rows_.remove(index); - onChanged(); - } else { - rowsBuilder_.remove(index); - } - return this; - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse.Builder getRowsBuilder( - int index) { - return getRowsFieldBuilder().getBuilder(index); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponseOrBuilder getRowsOrBuilder( - int index) { - if (rowsBuilder_ == null) { - return rows_.get(index); } else { - return rowsBuilder_.getMessageOrBuilder(index); - } + private int bitField0_; + + // required string transaction_id = 1; + private java.lang.Object transactionId_ = ""; + public boolean hasTransactionId() { + return ((bitField0_ & 0x00000001) == 0x00000001); } - public java.util.List - getRowsOrBuilderList() { - if (rowsBuilder_ != null) { - return rowsBuilder_.getMessageOrBuilderList(); + public String getTransactionId() { + java.lang.Object ref = transactionId_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + transactionId_ = s; + return s; } else { - return java.util.Collections.unmodifiableList(rows_); + return (String) ref; } } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse.Builder addRowsBuilder() { - return getRowsFieldBuilder().addBuilder( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse.getDefaultInstance()); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse.Builder addRowsBuilder( - int index) { - return getRowsFieldBuilder().addBuilder( - index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse.getDefaultInstance()); + public Builder setTransactionId(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + transactionId_ = value; + onChanged(); + return this; } - public java.util.List - getRowsBuilderList() { - return getRowsFieldBuilder().getBuilderList(); + public Builder clearTransactionId() { + bitField0_ = (bitField0_ & ~0x00000001); + transactionId_ = getDefaultInstance().getTransactionId(); + onChanged(); + return this; } - private com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponseOrBuilder> - getRowsFieldBuilder() { - if (rowsBuilder_ == null) { - rowsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponseOrBuilder>( - rows_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); - rows_ = null; - } - return rowsBuilder_; + void setTransactionId(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + transactionId_ = value; + onChanged(); } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.TableInBatchGetRowResponse) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.CommitTransactionRequest) } static { - defaultInstance = new TableInBatchGetRowResponse(true); + defaultInstance = new CommitTransactionRequest(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.TableInBatchGetRowResponse) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.CommitTransactionRequest) } - public interface BatchGetRowResponseOrBuilder + public interface CommitTransactionResponseOrBuilder extends com.google.protobuf.MessageOrBuilder { - - // repeated .com.alicloud.openservices.tablestore.core.protocol.TableInBatchGetRowResponse tables = 1; - java.util.List - getTablesList(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse getTables(int index); - int getTablesCount(); - java.util.List - getTablesOrBuilderList(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponseOrBuilder getTablesOrBuilder( - int index); } - public static final class BatchGetRowResponse extends + public static final class CommitTransactionResponse extends com.google.protobuf.GeneratedMessage - implements BatchGetRowResponseOrBuilder { - // Use BatchGetRowResponse.newBuilder() to construct. - private BatchGetRowResponse(Builder builder) { + implements CommitTransactionResponseOrBuilder { + // Use CommitTransactionResponse.newBuilder() to construct. + private CommitTransactionResponse(Builder builder) { super(builder); } - private BatchGetRowResponse(boolean noInit) {} + private CommitTransactionResponse(boolean noInit) {} - private static final BatchGetRowResponse defaultInstance; - public static BatchGetRowResponse getDefaultInstance() { + private static final CommitTransactionResponse defaultInstance; + public static CommitTransactionResponse getDefaultInstance() { return defaultInstance; } - public BatchGetRowResponse getDefaultInstanceForType() { + public CommitTransactionResponse getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_BatchGetRowResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CommitTransactionResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_BatchGetRowResponse_fieldAccessorTable; - } - - // repeated .com.alicloud.openservices.tablestore.core.protocol.TableInBatchGetRowResponse tables = 1; - public static final int TABLES_FIELD_NUMBER = 1; - private java.util.List tables_; - public java.util.List getTablesList() { - return tables_; - } - public java.util.List - getTablesOrBuilderList() { - return tables_; - } - public int getTablesCount() { - return tables_.size(); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse getTables(int index) { - return tables_.get(index); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponseOrBuilder getTablesOrBuilder( - int index) { - return tables_.get(index); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CommitTransactionResponse_fieldAccessorTable; } private void initFields() { - tables_ = java.util.Collections.emptyList(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - for (int i = 0; i < getTablesCount(); i++) { - if (!getTables(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } memoizedIsInitialized = 1; return true; } @@ -26509,9 +39086,6 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - for (int i = 0; i < tables_.size(); i++) { - output.writeMessage(1, tables_.get(i)); - } getUnknownFields().writeTo(output); } @@ -26521,10 +39095,6 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - for (int i = 0; i < tables_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, tables_.get(i)); - } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -26537,41 +39107,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -26580,7 +39150,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -26591,12 +39161,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -26606,7 +39176,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -26619,18 +39189,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponseOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_BatchGetRowResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CommitTransactionResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_BatchGetRowResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CommitTransactionResponse_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -26641,7 +39211,6 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getTablesFieldBuilder(); } } private static Builder create() { @@ -26650,12 +39219,6 @@ private static Builder create() { public Builder clear() { super.clear(); - if (tablesBuilder_ == null) { - tables_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - tablesBuilder_.clear(); - } return this; } @@ -26665,24 +39228,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -26690,70 +39253,28 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchG return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse(this); - int from_bitField0_ = bitField0_; - if (tablesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - tables_ = java.util.Collections.unmodifiableList(tables_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.tables_ = tables_; - } else { - result.tables_ = tablesBuilder_.build(); - } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse(this); onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse.getDefaultInstance()) return this; - if (tablesBuilder_ == null) { - if (!other.tables_.isEmpty()) { - if (tables_.isEmpty()) { - tables_ = other.tables_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureTablesIsMutable(); - tables_.addAll(other.tables_); - } - onChanged(); - } - } else { - if (!other.tables_.isEmpty()) { - if (tablesBuilder_.isEmpty()) { - tablesBuilder_.dispose(); - tablesBuilder_ = null; - tables_ = other.tables_; - bitField0_ = (bitField0_ & ~0x00000001); - tablesBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getTablesFieldBuilder() : null; - } else { - tablesBuilder_.addAllMessages(other.tables_); - } - } - } + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse.getDefaultInstance()) return this; this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { - for (int i = 0; i < getTablesCount(); i++) { - if (!getTables(i).isInitialized()) { - - return false; - } - } return true; } @@ -26780,335 +39301,99 @@ public Builder mergeFrom( } break; } - case 10: { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse.newBuilder(); - input.readMessage(subBuilder, extensionRegistry); - addTables(subBuilder.buildPartial()); - break; - } } } } - private int bitField0_; - - // repeated .com.alicloud.openservices.tablestore.core.protocol.TableInBatchGetRowResponse tables = 1; - private java.util.List tables_ = - java.util.Collections.emptyList(); - private void ensureTablesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - tables_ = new java.util.ArrayList(tables_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponseOrBuilder> tablesBuilder_; - - public java.util.List getTablesList() { - if (tablesBuilder_ == null) { - return java.util.Collections.unmodifiableList(tables_); - } else { - return tablesBuilder_.getMessageList(); - } - } - public int getTablesCount() { - if (tablesBuilder_ == null) { - return tables_.size(); - } else { - return tablesBuilder_.getCount(); - } - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse getTables(int index) { - if (tablesBuilder_ == null) { - return tables_.get(index); - } else { - return tablesBuilder_.getMessage(index); - } - } - public Builder setTables( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse value) { - if (tablesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTablesIsMutable(); - tables_.set(index, value); - onChanged(); - } else { - tablesBuilder_.setMessage(index, value); - } - return this; - } - public Builder setTables( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse.Builder builderForValue) { - if (tablesBuilder_ == null) { - ensureTablesIsMutable(); - tables_.set(index, builderForValue.build()); - onChanged(); - } else { - tablesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - public Builder addTables(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse value) { - if (tablesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTablesIsMutable(); - tables_.add(value); - onChanged(); - } else { - tablesBuilder_.addMessage(value); - } - return this; - } - public Builder addTables( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse value) { - if (tablesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTablesIsMutable(); - tables_.add(index, value); - onChanged(); - } else { - tablesBuilder_.addMessage(index, value); - } - return this; - } - public Builder addTables( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse.Builder builderForValue) { - if (tablesBuilder_ == null) { - ensureTablesIsMutable(); - tables_.add(builderForValue.build()); - onChanged(); - } else { - tablesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - public Builder addTables( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse.Builder builderForValue) { - if (tablesBuilder_ == null) { - ensureTablesIsMutable(); - tables_.add(index, builderForValue.build()); - onChanged(); - } else { - tablesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - public Builder addAllTables( - java.lang.Iterable values) { - if (tablesBuilder_ == null) { - ensureTablesIsMutable(); - super.addAll(values, tables_); - onChanged(); - } else { - tablesBuilder_.addAllMessages(values); - } - return this; - } - public Builder clearTables() { - if (tablesBuilder_ == null) { - tables_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - tablesBuilder_.clear(); - } - return this; - } - public Builder removeTables(int index) { - if (tablesBuilder_ == null) { - ensureTablesIsMutable(); - tables_.remove(index); - onChanged(); - } else { - tablesBuilder_.remove(index); - } - return this; - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse.Builder getTablesBuilder( - int index) { - return getTablesFieldBuilder().getBuilder(index); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponseOrBuilder getTablesOrBuilder( - int index) { - if (tablesBuilder_ == null) { - return tables_.get(index); } else { - return tablesBuilder_.getMessageOrBuilder(index); - } - } - public java.util.List - getTablesOrBuilderList() { - if (tablesBuilder_ != null) { - return tablesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(tables_); - } - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse.Builder addTablesBuilder() { - return getTablesFieldBuilder().addBuilder( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse.getDefaultInstance()); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse.Builder addTablesBuilder( - int index) { - return getTablesFieldBuilder().addBuilder( - index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse.getDefaultInstance()); - } - public java.util.List - getTablesBuilderList() { - return getTablesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponseOrBuilder> - getTablesFieldBuilder() { - if (tablesBuilder_ == null) { - tablesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponseOrBuilder>( - tables_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); - tables_ = null; - } - return tablesBuilder_; - } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.BatchGetRowResponse) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.CommitTransactionResponse) } static { - defaultInstance = new BatchGetRowResponse(true); + defaultInstance = new CommitTransactionResponse(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.BatchGetRowResponse) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.CommitTransactionResponse) } - public interface RowInBatchWriteRowRequestOrBuilder + public interface AbortTransactionRequestOrBuilder extends com.google.protobuf.MessageOrBuilder { - // required .com.alicloud.openservices.tablestore.core.protocol.OperationType type = 1; - boolean hasType(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.OperationType getType(); - - // required bytes row_change = 2; - boolean hasRowChange(); - com.google.protobuf.ByteString getRowChange(); - - // required .com.alicloud.openservices.tablestore.core.protocol.Condition condition = 3; - boolean hasCondition(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition getCondition(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConditionOrBuilder getConditionOrBuilder(); - - // optional .com.alicloud.openservices.tablestore.core.protocol.ReturnContent return_content = 4; - boolean hasReturnContent(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent getReturnContent(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContentOrBuilder getReturnContentOrBuilder(); + // required string transaction_id = 1; + boolean hasTransactionId(); + String getTransactionId(); } - public static final class RowInBatchWriteRowRequest extends + public static final class AbortTransactionRequest extends com.google.protobuf.GeneratedMessage - implements RowInBatchWriteRowRequestOrBuilder { - // Use RowInBatchWriteRowRequest.newBuilder() to construct. - private RowInBatchWriteRowRequest(Builder builder) { + implements AbortTransactionRequestOrBuilder { + // Use AbortTransactionRequest.newBuilder() to construct. + private AbortTransactionRequest(Builder builder) { super(builder); } - private RowInBatchWriteRowRequest(boolean noInit) {} + private AbortTransactionRequest(boolean noInit) {} - private static final RowInBatchWriteRowRequest defaultInstance; - public static RowInBatchWriteRowRequest getDefaultInstance() { + private static final AbortTransactionRequest defaultInstance; + public static AbortTransactionRequest getDefaultInstance() { return defaultInstance; } - public RowInBatchWriteRowRequest getDefaultInstanceForType() { + public AbortTransactionRequest getDefaultInstanceForType() { return defaultInstance; } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBatchWriteRowRequest_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBatchWriteRowRequest_fieldAccessorTable; - } - - private int bitField0_; - // required .com.alicloud.openservices.tablestore.core.protocol.OperationType type = 1; - public static final int TYPE_FIELD_NUMBER = 1; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.OperationType type_; - public boolean hasType() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.OperationType getType() { - return type_; - } - - // required bytes row_change = 2; - public static final int ROW_CHANGE_FIELD_NUMBER = 2; - private com.google.protobuf.ByteString rowChange_; - public boolean hasRowChange() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public com.google.protobuf.ByteString getRowChange() { - return rowChange_; - } - - // required .com.alicloud.openservices.tablestore.core.protocol.Condition condition = 3; - public static final int CONDITION_FIELD_NUMBER = 3; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition condition_; - public boolean hasCondition() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition getCondition() { - return condition_; + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_AbortTransactionRequest_descriptor; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConditionOrBuilder getConditionOrBuilder() { - return condition_; + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_AbortTransactionRequest_fieldAccessorTable; } - // optional .com.alicloud.openservices.tablestore.core.protocol.ReturnContent return_content = 4; - public static final int RETURN_CONTENT_FIELD_NUMBER = 4; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent returnContent_; - public boolean hasReturnContent() { - return ((bitField0_ & 0x00000008) == 0x00000008); + private int bitField0_; + // required string transaction_id = 1; + public static final int TRANSACTION_ID_FIELD_NUMBER = 1; + private java.lang.Object transactionId_; + public boolean hasTransactionId() { + return ((bitField0_ & 0x00000001) == 0x00000001); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent getReturnContent() { - return returnContent_; + public String getTransactionId() { + java.lang.Object ref = transactionId_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + transactionId_ = s; + } + return s; + } } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContentOrBuilder getReturnContentOrBuilder() { - return returnContent_; + private com.google.protobuf.ByteString getTransactionIdBytes() { + java.lang.Object ref = transactionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + transactionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } private void initFields() { - type_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.OperationType.PUT; - rowChange_ = com.google.protobuf.ByteString.EMPTY; - condition_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.getDefaultInstance(); - returnContent_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.getDefaultInstance(); + transactionId_ = ""; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - if (!hasType()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasRowChange()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasCondition()) { - memoizedIsInitialized = 0; - return false; - } - if (!getCondition().isInitialized()) { + if (!hasTransactionId()) { memoizedIsInitialized = 0; return false; } @@ -27120,16 +39405,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeEnum(1, type_.getNumber()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, rowChange_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeMessage(3, condition_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeMessage(4, returnContent_); + output.writeBytes(1, getTransactionIdBytes()); } getUnknownFields().writeTo(output); } @@ -27142,19 +39418,7 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, type_.getNumber()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, rowChange_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, condition_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, returnContent_); + .computeBytesSize(1, getTransactionIdBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -27168,41 +39432,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -27211,7 +39475,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -27222,12 +39486,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -27237,7 +39501,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -27250,18 +39514,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequestOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBatchWriteRowRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_AbortTransactionRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBatchWriteRowRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_AbortTransactionRequest_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -27272,8 +39536,6 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getConditionFieldBuilder(); - getReturnContentFieldBuilder(); } } private static Builder create() { @@ -27282,22 +39544,8 @@ private static Builder create() { public Builder clear() { super.clear(); - type_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.OperationType.PUT; + transactionId_ = ""; bitField0_ = (bitField0_ & ~0x00000001); - rowChange_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - if (conditionBuilder_ == null) { - condition_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.getDefaultInstance(); - } else { - conditionBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - if (returnContentBuilder_ == null) { - returnContent_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.getDefaultInstance(); - } else { - returnContentBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -27307,24 +39555,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -27332,80 +39580,39 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInB return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest(this); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.type_ = type_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.rowChange_ = rowChange_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - if (conditionBuilder_ == null) { - result.condition_ = condition_; - } else { - result.condition_ = conditionBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - if (returnContentBuilder_ == null) { - result.returnContent_ = returnContent_; - } else { - result.returnContent_ = returnContentBuilder_.build(); - } + result.transactionId_ = transactionId_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest.getDefaultInstance()) return this; - if (other.hasType()) { - setType(other.getType()); - } - if (other.hasRowChange()) { - setRowChange(other.getRowChange()); - } - if (other.hasCondition()) { - mergeCondition(other.getCondition()); - } - if (other.hasReturnContent()) { - mergeReturnContent(other.getReturnContent()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest.getDefaultInstance()) return this; + if (other.hasTransactionId()) { + setTransactionId(other.getTransactionId()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { - if (!hasType()) { - - return false; - } - if (!hasRowChange()) { - - return false; - } - if (!hasCondition()) { - - return false; - } - if (!getCondition().isInitialized()) { + if (!hasTransactionId()) { return false; } @@ -27435,38 +39642,9 @@ public Builder mergeFrom( } break; } - case 8: { - int rawValue = input.readEnum(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.OperationType value = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.OperationType.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(1, rawValue); - } else { - bitField0_ |= 0x00000001; - type_ = value; - } - break; - } - case 18: { - bitField0_ |= 0x00000002; - rowChange_ = input.readBytes(); - break; - } - case 26: { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.newBuilder(); - if (hasCondition()) { - subBuilder.mergeFrom(getCondition()); - } - input.readMessage(subBuilder, extensionRegistry); - setCondition(subBuilder.buildPartial()); - break; - } - case 34: { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.newBuilder(); - if (hasReturnContent()) { - subBuilder.mergeFrom(getReturnContent()); - } - input.readMessage(subBuilder, extensionRegistry); - setReturnContent(subBuilder.buildPartial()); + case 10: { + bitField0_ |= 0x00000001; + transactionId_ = input.readBytes(); break; } } @@ -27475,363 +39653,91 @@ public Builder mergeFrom( private int bitField0_; - // required .com.alicloud.openservices.tablestore.core.protocol.OperationType type = 1; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.OperationType type_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.OperationType.PUT; - public boolean hasType() { + // required string transaction_id = 1; + private java.lang.Object transactionId_ = ""; + public boolean hasTransactionId() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.OperationType getType() { - return type_; - } - public Builder setType(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.OperationType value) { - if (value == null) { - throw new NullPointerException(); + public String getTransactionId() { + java.lang.Object ref = transactionId_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + transactionId_ = s; + return s; + } else { + return (String) ref; } - bitField0_ |= 0x00000001; - type_ = value; - onChanged(); - return this; - } - public Builder clearType() { - bitField0_ = (bitField0_ & ~0x00000001); - type_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.OperationType.PUT; - onChanged(); - return this; - } - - // required bytes row_change = 2; - private com.google.protobuf.ByteString rowChange_ = com.google.protobuf.ByteString.EMPTY; - public boolean hasRowChange() { - return ((bitField0_ & 0x00000002) == 0x00000002); } - public com.google.protobuf.ByteString getRowChange() { - return rowChange_; - } - public Builder setRowChange(com.google.protobuf.ByteString value) { + public Builder setTransactionId(String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000002; - rowChange_ = value; - onChanged(); - return this; - } - public Builder clearRowChange() { - bitField0_ = (bitField0_ & ~0x00000002); - rowChange_ = getDefaultInstance().getRowChange(); + bitField0_ |= 0x00000001; + transactionId_ = value; onChanged(); return this; } - - // required .com.alicloud.openservices.tablestore.core.protocol.Condition condition = 3; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition condition_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConditionOrBuilder> conditionBuilder_; - public boolean hasCondition() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition getCondition() { - if (conditionBuilder_ == null) { - return condition_; - } else { - return conditionBuilder_.getMessage(); - } - } - public Builder setCondition(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition value) { - if (conditionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - condition_ = value; - onChanged(); - } else { - conditionBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - return this; - } - public Builder setCondition( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.Builder builderForValue) { - if (conditionBuilder_ == null) { - condition_ = builderForValue.build(); - onChanged(); - } else { - conditionBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - return this; - } - public Builder mergeCondition(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition value) { - if (conditionBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004) && - condition_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.getDefaultInstance()) { - condition_ = - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.newBuilder(condition_).mergeFrom(value).buildPartial(); - } else { - condition_ = value; - } - onChanged(); - } else { - conditionBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - return this; - } - public Builder clearCondition() { - if (conditionBuilder_ == null) { - condition_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.getDefaultInstance(); - onChanged(); - } else { - conditionBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.Builder getConditionBuilder() { - bitField0_ |= 0x00000004; + public Builder clearTransactionId() { + bitField0_ = (bitField0_ & ~0x00000001); + transactionId_ = getDefaultInstance().getTransactionId(); onChanged(); - return getConditionFieldBuilder().getBuilder(); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConditionOrBuilder getConditionOrBuilder() { - if (conditionBuilder_ != null) { - return conditionBuilder_.getMessageOrBuilder(); - } else { - return condition_; - } - } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConditionOrBuilder> - getConditionFieldBuilder() { - if (conditionBuilder_ == null) { - conditionBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConditionOrBuilder>( - condition_, - getParentForChildren(), - isClean()); - condition_ = null; - } - return conditionBuilder_; - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.ReturnContent return_content = 4; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent returnContent_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContentOrBuilder> returnContentBuilder_; - public boolean hasReturnContent() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent getReturnContent() { - if (returnContentBuilder_ == null) { - return returnContent_; - } else { - return returnContentBuilder_.getMessage(); - } - } - public Builder setReturnContent(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent value) { - if (returnContentBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - returnContent_ = value; - onChanged(); - } else { - returnContentBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - return this; - } - public Builder setReturnContent( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.Builder builderForValue) { - if (returnContentBuilder_ == null) { - returnContent_ = builderForValue.build(); - onChanged(); - } else { - returnContentBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - return this; - } - public Builder mergeReturnContent(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent value) { - if (returnContentBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008) && - returnContent_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.getDefaultInstance()) { - returnContent_ = - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.newBuilder(returnContent_).mergeFrom(value).buildPartial(); - } else { - returnContent_ = value; - } - onChanged(); - } else { - returnContentBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000008; return this; } - public Builder clearReturnContent() { - if (returnContentBuilder_ == null) { - returnContent_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.getDefaultInstance(); - onChanged(); - } else { - returnContentBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - return this; - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.Builder getReturnContentBuilder() { - bitField0_ |= 0x00000008; + void setTransactionId(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + transactionId_ = value; onChanged(); - return getReturnContentFieldBuilder().getBuilder(); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContentOrBuilder getReturnContentOrBuilder() { - if (returnContentBuilder_ != null) { - return returnContentBuilder_.getMessageOrBuilder(); - } else { - return returnContent_; - } - } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContentOrBuilder> - getReturnContentFieldBuilder() { - if (returnContentBuilder_ == null) { - returnContentBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContentOrBuilder>( - returnContent_, - getParentForChildren(), - isClean()); - returnContent_ = null; - } - return returnContentBuilder_; } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.RowInBatchWriteRowRequest) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.AbortTransactionRequest) } static { - defaultInstance = new RowInBatchWriteRowRequest(true); + defaultInstance = new AbortTransactionRequest(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.RowInBatchWriteRowRequest) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.AbortTransactionRequest) } - public interface TableInBatchWriteRowRequestOrBuilder + public interface AbortTransactionResponseOrBuilder extends com.google.protobuf.MessageOrBuilder { - - // required string table_name = 1; - boolean hasTableName(); - String getTableName(); - - // repeated .com.alicloud.openservices.tablestore.core.protocol.RowInBatchWriteRowRequest rows = 2; - java.util.List - getRowsList(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest getRows(int index); - int getRowsCount(); - java.util.List - getRowsOrBuilderList(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequestOrBuilder getRowsOrBuilder( - int index); } - public static final class TableInBatchWriteRowRequest extends + public static final class AbortTransactionResponse extends com.google.protobuf.GeneratedMessage - implements TableInBatchWriteRowRequestOrBuilder { - // Use TableInBatchWriteRowRequest.newBuilder() to construct. - private TableInBatchWriteRowRequest(Builder builder) { + implements AbortTransactionResponseOrBuilder { + // Use AbortTransactionResponse.newBuilder() to construct. + private AbortTransactionResponse(Builder builder) { super(builder); } - private TableInBatchWriteRowRequest(boolean noInit) {} + private AbortTransactionResponse(boolean noInit) {} - private static final TableInBatchWriteRowRequest defaultInstance; - public static TableInBatchWriteRowRequest getDefaultInstance() { + private static final AbortTransactionResponse defaultInstance; + public static AbortTransactionResponse getDefaultInstance() { return defaultInstance; } - public TableInBatchWriteRowRequest getDefaultInstanceForType() { + public AbortTransactionResponse getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TableInBatchWriteRowRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_AbortTransactionResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TableInBatchWriteRowRequest_fieldAccessorTable; - } - - private int bitField0_; - // required string table_name = 1; - public static final int TABLE_NAME_FIELD_NUMBER = 1; - private java.lang.Object tableName_; - public boolean hasTableName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getTableName() { - java.lang.Object ref = tableName_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - tableName_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getTableNameBytes() { - java.lang.Object ref = tableName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - tableName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // repeated .com.alicloud.openservices.tablestore.core.protocol.RowInBatchWriteRowRequest rows = 2; - public static final int ROWS_FIELD_NUMBER = 2; - private java.util.List rows_; - public java.util.List getRowsList() { - return rows_; - } - public java.util.List - getRowsOrBuilderList() { - return rows_; - } - public int getRowsCount() { - return rows_.size(); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest getRows(int index) { - return rows_.get(index); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequestOrBuilder getRowsOrBuilder( - int index) { - return rows_.get(index); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_AbortTransactionResponse_fieldAccessorTable; } private void initFields() { - tableName_ = ""; - rows_ = java.util.Collections.emptyList(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - if (!hasTableName()) { - memoizedIsInitialized = 0; - return false; - } - for (int i = 0; i < getRowsCount(); i++) { - if (!getRows(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } memoizedIsInitialized = 1; return true; } @@ -27839,12 +39745,6 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getTableNameBytes()); - } - for (int i = 0; i < rows_.size(); i++) { - output.writeMessage(2, rows_.get(i)); - } getUnknownFields().writeTo(output); } @@ -27854,14 +39754,6 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getTableNameBytes()); - } - for (int i = 0; i < rows_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, rows_.get(i)); - } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -27874,41 +39766,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -27917,7 +39809,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -27928,12 +39820,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -27943,7 +39835,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -27956,18 +39848,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequestOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TableInBatchWriteRowRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_AbortTransactionResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TableInBatchWriteRowRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_AbortTransactionResponse_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -27978,7 +39870,6 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getRowsFieldBuilder(); } } private static Builder create() { @@ -27987,14 +39878,6 @@ private static Builder create() { public Builder clear() { super.clear(); - tableName_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - if (rowsBuilder_ == null) { - rows_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - rowsBuilder_.clear(); - } return this; } @@ -28004,24 +39887,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -28029,83 +39912,28 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableI return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.tableName_ = tableName_; - if (rowsBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { - rows_ = java.util.Collections.unmodifiableList(rows_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.rows_ = rows_; - } else { - result.rows_ = rowsBuilder_.build(); - } - result.bitField0_ = to_bitField0_; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse(this); onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest.getDefaultInstance()) return this; - if (other.hasTableName()) { - setTableName(other.getTableName()); - } - if (rowsBuilder_ == null) { - if (!other.rows_.isEmpty()) { - if (rows_.isEmpty()) { - rows_ = other.rows_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureRowsIsMutable(); - rows_.addAll(other.rows_); - } - onChanged(); - } - } else { - if (!other.rows_.isEmpty()) { - if (rowsBuilder_.isEmpty()) { - rowsBuilder_.dispose(); - rowsBuilder_ = null; - rows_ = other.rows_; - bitField0_ = (bitField0_ & ~0x00000002); - rowsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getRowsFieldBuilder() : null; - } else { - rowsBuilder_.addAllMessages(other.rows_); - } - } - } + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse.getDefaultInstance()) return this; this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { - if (!hasTableName()) { - - return false; - } - for (int i = 0; i < getRowsCount(); i++) { - if (!getRows(i).isInitialized()) { - - return false; - } - } return true; } @@ -28132,331 +39960,66 @@ public Builder mergeFrom( } break; } - case 10: { - bitField0_ |= 0x00000001; - tableName_ = input.readBytes(); - break; - } - case 18: { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest.newBuilder(); - input.readMessage(subBuilder, extensionRegistry); - addRows(subBuilder.buildPartial()); - break; - } } } } - private int bitField0_; - - // required string table_name = 1; - private java.lang.Object tableName_ = ""; - public boolean hasTableName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getTableName() { - java.lang.Object ref = tableName_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - tableName_ = s; - return s; - } else { - return (String) ref; - } - } - public Builder setTableName(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - tableName_ = value; - onChanged(); - return this; - } - public Builder clearTableName() { - bitField0_ = (bitField0_ & ~0x00000001); - tableName_ = getDefaultInstance().getTableName(); - onChanged(); - return this; - } - void setTableName(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; - tableName_ = value; - onChanged(); - } - - // repeated .com.alicloud.openservices.tablestore.core.protocol.RowInBatchWriteRowRequest rows = 2; - private java.util.List rows_ = - java.util.Collections.emptyList(); - private void ensureRowsIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - rows_ = new java.util.ArrayList(rows_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequestOrBuilder> rowsBuilder_; - - public java.util.List getRowsList() { - if (rowsBuilder_ == null) { - return java.util.Collections.unmodifiableList(rows_); - } else { - return rowsBuilder_.getMessageList(); - } - } - public int getRowsCount() { - if (rowsBuilder_ == null) { - return rows_.size(); - } else { - return rowsBuilder_.getCount(); - } - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest getRows(int index) { - if (rowsBuilder_ == null) { - return rows_.get(index); - } else { - return rowsBuilder_.getMessage(index); - } - } - public Builder setRows( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest value) { - if (rowsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRowsIsMutable(); - rows_.set(index, value); - onChanged(); - } else { - rowsBuilder_.setMessage(index, value); - } - return this; - } - public Builder setRows( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest.Builder builderForValue) { - if (rowsBuilder_ == null) { - ensureRowsIsMutable(); - rows_.set(index, builderForValue.build()); - onChanged(); - } else { - rowsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - public Builder addRows(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest value) { - if (rowsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRowsIsMutable(); - rows_.add(value); - onChanged(); - } else { - rowsBuilder_.addMessage(value); - } - return this; - } - public Builder addRows( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest value) { - if (rowsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRowsIsMutable(); - rows_.add(index, value); - onChanged(); - } else { - rowsBuilder_.addMessage(index, value); - } - return this; - } - public Builder addRows( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest.Builder builderForValue) { - if (rowsBuilder_ == null) { - ensureRowsIsMutable(); - rows_.add(builderForValue.build()); - onChanged(); - } else { - rowsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - public Builder addRows( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest.Builder builderForValue) { - if (rowsBuilder_ == null) { - ensureRowsIsMutable(); - rows_.add(index, builderForValue.build()); - onChanged(); - } else { - rowsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - public Builder addAllRows( - java.lang.Iterable values) { - if (rowsBuilder_ == null) { - ensureRowsIsMutable(); - super.addAll(values, rows_); - onChanged(); - } else { - rowsBuilder_.addAllMessages(values); - } - return this; - } - public Builder clearRows() { - if (rowsBuilder_ == null) { - rows_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - rowsBuilder_.clear(); - } - return this; - } - public Builder removeRows(int index) { - if (rowsBuilder_ == null) { - ensureRowsIsMutable(); - rows_.remove(index); - onChanged(); - } else { - rowsBuilder_.remove(index); - } - return this; - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest.Builder getRowsBuilder( - int index) { - return getRowsFieldBuilder().getBuilder(index); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequestOrBuilder getRowsOrBuilder( - int index) { - if (rowsBuilder_ == null) { - return rows_.get(index); } else { - return rowsBuilder_.getMessageOrBuilder(index); - } - } - public java.util.List - getRowsOrBuilderList() { - if (rowsBuilder_ != null) { - return rowsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(rows_); - } - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest.Builder addRowsBuilder() { - return getRowsFieldBuilder().addBuilder( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest.getDefaultInstance()); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest.Builder addRowsBuilder( - int index) { - return getRowsFieldBuilder().addBuilder( - index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest.getDefaultInstance()); - } - public java.util.List - getRowsBuilderList() { - return getRowsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequestOrBuilder> - getRowsFieldBuilder() { - if (rowsBuilder_ == null) { - rowsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequestOrBuilder>( - rows_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); - rows_ = null; - } - return rowsBuilder_; - } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.TableInBatchWriteRowRequest) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.AbortTransactionResponse) } static { - defaultInstance = new TableInBatchWriteRowRequest(true); + defaultInstance = new AbortTransactionResponse(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.TableInBatchWriteRowRequest) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.AbortTransactionResponse) } - public interface BatchWriteRowRequestOrBuilder + public interface ListStreamRequestOrBuilder extends com.google.protobuf.MessageOrBuilder { - // repeated .com.alicloud.openservices.tablestore.core.protocol.TableInBatchWriteRowRequest tables = 1; - java.util.List - getTablesList(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest getTables(int index); - int getTablesCount(); - java.util.List - getTablesOrBuilderList(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequestOrBuilder getTablesOrBuilder( - int index); - - // optional string transaction_id = 2; - boolean hasTransactionId(); - String getTransactionId(); + // optional string table_name = 1; + boolean hasTableName(); + String getTableName(); } - public static final class BatchWriteRowRequest extends + public static final class ListStreamRequest extends com.google.protobuf.GeneratedMessage - implements BatchWriteRowRequestOrBuilder { - // Use BatchWriteRowRequest.newBuilder() to construct. - private BatchWriteRowRequest(Builder builder) { + implements ListStreamRequestOrBuilder { + // Use ListStreamRequest.newBuilder() to construct. + private ListStreamRequest(Builder builder) { super(builder); } - private BatchWriteRowRequest(boolean noInit) {} - - private static final BatchWriteRowRequest defaultInstance; - public static BatchWriteRowRequest getDefaultInstance() { - return defaultInstance; - } - - public BatchWriteRowRequest getDefaultInstanceForType() { - return defaultInstance; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_BatchWriteRowRequest_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_BatchWriteRowRequest_fieldAccessorTable; - } + private ListStreamRequest(boolean noInit) {} - private int bitField0_; - // repeated .com.alicloud.openservices.tablestore.core.protocol.TableInBatchWriteRowRequest tables = 1; - public static final int TABLES_FIELD_NUMBER = 1; - private java.util.List tables_; - public java.util.List getTablesList() { - return tables_; - } - public java.util.List - getTablesOrBuilderList() { - return tables_; + private static final ListStreamRequest defaultInstance; + public static ListStreamRequest getDefaultInstance() { + return defaultInstance; } - public int getTablesCount() { - return tables_.size(); + + public ListStreamRequest getDefaultInstanceForType() { + return defaultInstance; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest getTables(int index) { - return tables_.get(index); + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListStreamRequest_descriptor; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequestOrBuilder getTablesOrBuilder( - int index) { - return tables_.get(index); + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListStreamRequest_fieldAccessorTable; } - // optional string transaction_id = 2; - public static final int TRANSACTION_ID_FIELD_NUMBER = 2; - private java.lang.Object transactionId_; - public boolean hasTransactionId() { + private int bitField0_; + // optional string table_name = 1; + public static final int TABLE_NAME_FIELD_NUMBER = 1; + private java.lang.Object tableName_; + public boolean hasTableName() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getTransactionId() { - java.lang.Object ref = transactionId_; + public String getTableName() { + java.lang.Object ref = tableName_; if (ref instanceof String) { return (String) ref; } else { @@ -28464,17 +40027,17 @@ public String getTransactionId() { (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); if (com.google.protobuf.Internal.isValidUtf8(bs)) { - transactionId_ = s; + tableName_ = s; } return s; } } - private com.google.protobuf.ByteString getTransactionIdBytes() { - java.lang.Object ref = transactionId_; + private com.google.protobuf.ByteString getTableNameBytes() { + java.lang.Object ref = tableName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((String) ref); - transactionId_ = b; + tableName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -28482,20 +40045,13 @@ private com.google.protobuf.ByteString getTransactionIdBytes() { } private void initFields() { - tables_ = java.util.Collections.emptyList(); - transactionId_ = ""; + tableName_ = ""; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - for (int i = 0; i < getTablesCount(); i++) { - if (!getTables(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } memoizedIsInitialized = 1; return true; } @@ -28503,11 +40059,8 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - for (int i = 0; i < tables_.size(); i++) { - output.writeMessage(1, tables_.get(i)); - } if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(2, getTransactionIdBytes()); + output.writeBytes(1, getTableNameBytes()); } getUnknownFields().writeTo(output); } @@ -28518,13 +40071,9 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - for (int i = 0; i < tables_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, tables_.get(i)); - } if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getTransactionIdBytes()); + .computeBytesSize(1, getTableNameBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -28538,41 +40087,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -28581,7 +40130,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -28592,12 +40141,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -28607,7 +40156,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -28620,18 +40169,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequestOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_BatchWriteRowRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListStreamRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_BatchWriteRowRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListStreamRequest_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -28642,7 +40191,6 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getTablesFieldBuilder(); } } private static Builder create() { @@ -28651,14 +40199,8 @@ private static Builder create() { public Builder clear() { super.clear(); - if (tablesBuilder_ == null) { - tables_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - tablesBuilder_.clear(); - } - transactionId_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); + tableName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -28668,24 +40210,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -28693,79 +40235,38 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchW return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest(this); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; - if (tablesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - tables_ = java.util.Collections.unmodifiableList(tables_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.tables_ = tables_; - } else { - result.tables_ = tablesBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.transactionId_ = transactionId_; + result.tableName_ = tableName_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest.getDefaultInstance()) return this; - if (tablesBuilder_ == null) { - if (!other.tables_.isEmpty()) { - if (tables_.isEmpty()) { - tables_ = other.tables_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureTablesIsMutable(); - tables_.addAll(other.tables_); - } - onChanged(); - } - } else { - if (!other.tables_.isEmpty()) { - if (tablesBuilder_.isEmpty()) { - tablesBuilder_.dispose(); - tablesBuilder_ = null; - tables_ = other.tables_; - bitField0_ = (bitField0_ & ~0x00000001); - tablesBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getTablesFieldBuilder() : null; - } else { - tablesBuilder_.addAllMessages(other.tables_); - } - } - } - if (other.hasTransactionId()) { - setTransactionId(other.getTransactionId()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest.getDefaultInstance()) return this; + if (other.hasTableName()) { + setTableName(other.getTableName()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { - for (int i = 0; i < getTablesCount(); i++) { - if (!getTables(i).isInitialized()) { - - return false; - } - } return true; } @@ -28793,14 +40294,8 @@ public Builder mergeFrom( break; } case 10: { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest.newBuilder(); - input.readMessage(subBuilder, extensionRegistry); - addTables(subBuilder.buildPartial()); - break; - } - case 18: { - bitField0_ |= 0x00000002; - transactionId_ = input.readBytes(); + bitField0_ |= 0x00000001; + tableName_ = input.readBytes(); break; } } @@ -28809,361 +40304,192 @@ public Builder mergeFrom( private int bitField0_; - // repeated .com.alicloud.openservices.tablestore.core.protocol.TableInBatchWriteRowRequest tables = 1; - private java.util.List tables_ = - java.util.Collections.emptyList(); - private void ensureTablesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - tables_ = new java.util.ArrayList(tables_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequestOrBuilder> tablesBuilder_; - - public java.util.List getTablesList() { - if (tablesBuilder_ == null) { - return java.util.Collections.unmodifiableList(tables_); - } else { - return tablesBuilder_.getMessageList(); - } - } - public int getTablesCount() { - if (tablesBuilder_ == null) { - return tables_.size(); - } else { - return tablesBuilder_.getCount(); - } - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest getTables(int index) { - if (tablesBuilder_ == null) { - return tables_.get(index); - } else { - return tablesBuilder_.getMessage(index); - } - } - public Builder setTables( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest value) { - if (tablesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTablesIsMutable(); - tables_.set(index, value); - onChanged(); - } else { - tablesBuilder_.setMessage(index, value); - } - return this; - } - public Builder setTables( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest.Builder builderForValue) { - if (tablesBuilder_ == null) { - ensureTablesIsMutable(); - tables_.set(index, builderForValue.build()); - onChanged(); - } else { - tablesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - public Builder addTables(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest value) { - if (tablesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTablesIsMutable(); - tables_.add(value); - onChanged(); - } else { - tablesBuilder_.addMessage(value); - } - return this; - } - public Builder addTables( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest value) { - if (tablesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTablesIsMutable(); - tables_.add(index, value); - onChanged(); - } else { - tablesBuilder_.addMessage(index, value); - } - return this; - } - public Builder addTables( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest.Builder builderForValue) { - if (tablesBuilder_ == null) { - ensureTablesIsMutable(); - tables_.add(builderForValue.build()); - onChanged(); - } else { - tablesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - public Builder addTables( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest.Builder builderForValue) { - if (tablesBuilder_ == null) { - ensureTablesIsMutable(); - tables_.add(index, builderForValue.build()); - onChanged(); - } else { - tablesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - public Builder addAllTables( - java.lang.Iterable values) { - if (tablesBuilder_ == null) { - ensureTablesIsMutable(); - super.addAll(values, tables_); - onChanged(); - } else { - tablesBuilder_.addAllMessages(values); - } - return this; - } - public Builder clearTables() { - if (tablesBuilder_ == null) { - tables_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - tablesBuilder_.clear(); - } - return this; - } - public Builder removeTables(int index) { - if (tablesBuilder_ == null) { - ensureTablesIsMutable(); - tables_.remove(index); - onChanged(); - } else { - tablesBuilder_.remove(index); - } - return this; - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest.Builder getTablesBuilder( - int index) { - return getTablesFieldBuilder().getBuilder(index); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequestOrBuilder getTablesOrBuilder( - int index) { - if (tablesBuilder_ == null) { - return tables_.get(index); } else { - return tablesBuilder_.getMessageOrBuilder(index); - } - } - public java.util.List - getTablesOrBuilderList() { - if (tablesBuilder_ != null) { - return tablesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(tables_); - } - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest.Builder addTablesBuilder() { - return getTablesFieldBuilder().addBuilder( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest.getDefaultInstance()); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest.Builder addTablesBuilder( - int index) { - return getTablesFieldBuilder().addBuilder( - index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest.getDefaultInstance()); - } - public java.util.List - getTablesBuilderList() { - return getTablesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequestOrBuilder> - getTablesFieldBuilder() { - if (tablesBuilder_ == null) { - tablesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequestOrBuilder>( - tables_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); - tables_ = null; - } - return tablesBuilder_; - } - - // optional string transaction_id = 2; - private java.lang.Object transactionId_ = ""; - public boolean hasTransactionId() { - return ((bitField0_ & 0x00000002) == 0x00000002); + // optional string table_name = 1; + private java.lang.Object tableName_ = ""; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getTransactionId() { - java.lang.Object ref = transactionId_; + public String getTableName() { + java.lang.Object ref = tableName_; if (!(ref instanceof String)) { String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - transactionId_ = s; + tableName_ = s; return s; } else { return (String) ref; } } - public Builder setTransactionId(String value) { + public Builder setTableName(String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000002; - transactionId_ = value; + bitField0_ |= 0x00000001; + tableName_ = value; onChanged(); return this; } - public Builder clearTransactionId() { - bitField0_ = (bitField0_ & ~0x00000002); - transactionId_ = getDefaultInstance().getTransactionId(); + public Builder clearTableName() { + bitField0_ = (bitField0_ & ~0x00000001); + tableName_ = getDefaultInstance().getTableName(); onChanged(); return this; } - void setTransactionId(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000002; - transactionId_ = value; + void setTableName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + tableName_ = value; onChanged(); } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.BatchWriteRowRequest) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.ListStreamRequest) } static { - defaultInstance = new BatchWriteRowRequest(true); + defaultInstance = new ListStreamRequest(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.BatchWriteRowRequest) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.ListStreamRequest) } - public interface RowInBatchWriteRowResponseOrBuilder + public interface StreamOrBuilder extends com.google.protobuf.MessageOrBuilder { - // required bool is_ok = 1; - boolean hasIsOk(); - boolean getIsOk(); - - // optional .com.alicloud.openservices.tablestore.core.protocol.Error error = 2; - boolean hasError(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error getError(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ErrorOrBuilder getErrorOrBuilder(); + // required string stream_id = 1; + boolean hasStreamId(); + String getStreamId(); - // optional .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 3; - boolean hasConsumed(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder(); + // required string table_name = 2; + boolean hasTableName(); + String getTableName(); - // optional bytes row = 4; - boolean hasRow(); - com.google.protobuf.ByteString getRow(); + // required int64 creation_time = 3; + boolean hasCreationTime(); + long getCreationTime(); } - public static final class RowInBatchWriteRowResponse extends + public static final class Stream extends com.google.protobuf.GeneratedMessage - implements RowInBatchWriteRowResponseOrBuilder { - // Use RowInBatchWriteRowResponse.newBuilder() to construct. - private RowInBatchWriteRowResponse(Builder builder) { + implements StreamOrBuilder { + // Use Stream.newBuilder() to construct. + private Stream(Builder builder) { super(builder); } - private RowInBatchWriteRowResponse(boolean noInit) {} + private Stream(boolean noInit) {} - private static final RowInBatchWriteRowResponse defaultInstance; - public static RowInBatchWriteRowResponse getDefaultInstance() { + private static final Stream defaultInstance; + public static Stream getDefaultInstance() { return defaultInstance; } - public RowInBatchWriteRowResponse getDefaultInstanceForType() { + public Stream getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBatchWriteRowResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_Stream_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBatchWriteRowResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_Stream_fieldAccessorTable; } private int bitField0_; - // required bool is_ok = 1; - public static final int IS_OK_FIELD_NUMBER = 1; - private boolean isOk_; - public boolean hasIsOk() { + // required string stream_id = 1; + public static final int STREAM_ID_FIELD_NUMBER = 1; + private java.lang.Object streamId_; + public boolean hasStreamId() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public boolean getIsOk() { - return isOk_; - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.Error error = 2; - public static final int ERROR_FIELD_NUMBER = 2; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error error_; - public boolean hasError() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error getError() { - return error_; + public String getStreamId() { + java.lang.Object ref = streamId_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + streamId_ = s; + } + return s; + } } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ErrorOrBuilder getErrorOrBuilder() { - return error_; + private com.google.protobuf.ByteString getStreamIdBytes() { + java.lang.Object ref = streamId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + streamId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - // optional .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 3; - public static final int CONSUMED_FIELD_NUMBER = 3; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity consumed_; - public boolean hasConsumed() { - return ((bitField0_ & 0x00000004) == 0x00000004); + // required string table_name = 2; + public static final int TABLE_NAME_FIELD_NUMBER = 2; + private java.lang.Object tableName_; + public boolean hasTableName() { + return ((bitField0_ & 0x00000002) == 0x00000002); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed() { - return consumed_; + public String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + tableName_ = s; + } + return s; + } } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder() { - return consumed_; + private com.google.protobuf.ByteString getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - // optional bytes row = 4; - public static final int ROW_FIELD_NUMBER = 4; - private com.google.protobuf.ByteString row_; - public boolean hasRow() { - return ((bitField0_ & 0x00000008) == 0x00000008); + // required int64 creation_time = 3; + public static final int CREATION_TIME_FIELD_NUMBER = 3; + private long creationTime_; + public boolean hasCreationTime() { + return ((bitField0_ & 0x00000004) == 0x00000004); } - public com.google.protobuf.ByteString getRow() { - return row_; + public long getCreationTime() { + return creationTime_; } private void initFields() { - isOk_ = false; - error_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.getDefaultInstance(); - consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); - row_ = com.google.protobuf.ByteString.EMPTY; + streamId_ = ""; + tableName_ = ""; + creationTime_ = 0L; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - if (!hasIsOk()) { + if (!hasStreamId()) { memoizedIsInitialized = 0; return false; } - if (hasError()) { - if (!getError().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } + if (!hasTableName()) { + memoizedIsInitialized = 0; + return false; } - if (hasConsumed()) { - if (!getConsumed().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } + if (!hasCreationTime()) { + memoizedIsInitialized = 0; + return false; } memoizedIsInitialized = 1; return true; @@ -29173,16 +40499,13 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBool(1, isOk_); + output.writeBytes(1, getStreamIdBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeMessage(2, error_); + output.writeBytes(2, getTableNameBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeMessage(3, consumed_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeBytes(4, row_); + output.writeInt64(3, creationTime_); } getUnknownFields().writeTo(output); } @@ -29195,19 +40518,15 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeBoolSize(1, isOk_); + .computeBytesSize(1, getStreamIdBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, error_); + .computeBytesSize(2, getTableNameBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, consumed_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(4, row_); + .computeInt64Size(3, creationTime_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -29221,41 +40540,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -29264,7 +40583,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -29275,12 +40594,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -29290,7 +40609,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -29303,18 +40622,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponseOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBatchWriteRowResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_Stream_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBatchWriteRowResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_Stream_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -29325,8 +40644,6 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getErrorFieldBuilder(); - getConsumedFieldBuilder(); } } private static Builder create() { @@ -29335,22 +40652,12 @@ private static Builder create() { public Builder clear() { super.clear(); - isOk_ = false; + streamId_ = ""; bitField0_ = (bitField0_ & ~0x00000001); - if (errorBuilder_ == null) { - error_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.getDefaultInstance(); - } else { - errorBuilder_.clear(); - } + tableName_ = ""; bitField0_ = (bitField0_ & ~0x00000002); - if (consumedBuilder_ == null) { - consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); - } else { - consumedBuilder_.clear(); - } + creationTime_ = 0L; bitField0_ = (bitField0_ & ~0x00000004); - row_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -29360,24 +40667,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -29385,82 +40692,63 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInB return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse(this); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.isOk_ = isOk_; + result.streamId_ = streamId_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - if (errorBuilder_ == null) { - result.error_ = error_; - } else { - result.error_ = errorBuilder_.build(); - } + result.tableName_ = tableName_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } - if (consumedBuilder_ == null) { - result.consumed_ = consumed_; - } else { - result.consumed_ = consumedBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - result.row_ = row_; + result.creationTime_ = creationTime_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse.getDefaultInstance()) return this; - if (other.hasIsOk()) { - setIsOk(other.getIsOk()); - } - if (other.hasError()) { - mergeError(other.getError()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream.getDefaultInstance()) return this; + if (other.hasStreamId()) { + setStreamId(other.getStreamId()); } - if (other.hasConsumed()) { - mergeConsumed(other.getConsumed()); + if (other.hasTableName()) { + setTableName(other.getTableName()); } - if (other.hasRow()) { - setRow(other.getRow()); + if (other.hasCreationTime()) { + setCreationTime(other.getCreationTime()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { - if (!hasIsOk()) { + if (!hasStreamId()) { return false; } - if (hasError()) { - if (!getError().isInitialized()) { - - return false; - } + if (!hasTableName()) { + + return false; } - if (hasConsumed()) { - if (!getConsumed().isInitialized()) { - - return false; - } + if (!hasCreationTime()) { + + return false; } return true; } @@ -29488,32 +40776,19 @@ public Builder mergeFrom( } break; } - case 8: { + case 10: { bitField0_ |= 0x00000001; - isOk_ = input.readBool(); + streamId_ = input.readBytes(); break; } case 18: { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.newBuilder(); - if (hasError()) { - subBuilder.mergeFrom(getError()); - } - input.readMessage(subBuilder, extensionRegistry); - setError(subBuilder.buildPartial()); - break; - } - case 26: { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.newBuilder(); - if (hasConsumed()) { - subBuilder.mergeFrom(getConsumed()); - } - input.readMessage(subBuilder, extensionRegistry); - setConsumed(subBuilder.buildPartial()); + bitField0_ |= 0x00000002; + tableName_ = input.readBytes(); break; } - case 34: { - bitField0_ |= 0x00000008; - row_ = input.readBytes(); + case 24: { + bitField0_ |= 0x00000004; + creationTime_ = input.readInt64(); break; } } @@ -29522,356 +40797,182 @@ public Builder mergeFrom( private int bitField0_; - // required bool is_ok = 1; - private boolean isOk_ ; - public boolean hasIsOk() { + // required string stream_id = 1; + private java.lang.Object streamId_ = ""; + public boolean hasStreamId() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public boolean getIsOk() { - return isOk_; + public String getStreamId() { + java.lang.Object ref = streamId_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + streamId_ = s; + return s; + } else { + return (String) ref; + } } - public Builder setIsOk(boolean value) { - bitField0_ |= 0x00000001; - isOk_ = value; + public Builder setStreamId(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + streamId_ = value; onChanged(); return this; } - public Builder clearIsOk() { + public Builder clearStreamId() { bitField0_ = (bitField0_ & ~0x00000001); - isOk_ = false; + streamId_ = getDefaultInstance().getStreamId(); onChanged(); return this; } + void setStreamId(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + streamId_ = value; + onChanged(); + } - // optional .com.alicloud.openservices.tablestore.core.protocol.Error error = 2; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error error_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ErrorOrBuilder> errorBuilder_; - public boolean hasError() { + // required string table_name = 2; + private java.lang.Object tableName_ = ""; + public boolean hasTableName() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error getError() { - if (errorBuilder_ == null) { - return error_; - } else { - return errorBuilder_.getMessage(); - } - } - public Builder setError(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error value) { - if (errorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - error_ = value; - onChanged(); - } else { - errorBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - return this; - } - public Builder setError( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.Builder builderForValue) { - if (errorBuilder_ == null) { - error_ = builderForValue.build(); - onChanged(); + public String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + tableName_ = s; + return s; } else { - errorBuilder_.setMessage(builderForValue.build()); + return (String) ref; } - bitField0_ |= 0x00000002; - return this; } - public Builder mergeError(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error value) { - if (errorBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002) && - error_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.getDefaultInstance()) { - error_ = - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.newBuilder(error_).mergeFrom(value).buildPartial(); - } else { - error_ = value; - } - onChanged(); - } else { - errorBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; + public Builder setTableName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + tableName_ = value; + onChanged(); return this; } - public Builder clearError() { - if (errorBuilder_ == null) { - error_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.getDefaultInstance(); - onChanged(); - } else { - errorBuilder_.clear(); - } + public Builder clearTableName() { bitField0_ = (bitField0_ & ~0x00000002); + tableName_ = getDefaultInstance().getTableName(); + onChanged(); return this; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.Builder getErrorBuilder() { + void setTableName(com.google.protobuf.ByteString value) { bitField0_ |= 0x00000002; + tableName_ = value; onChanged(); - return getErrorFieldBuilder().getBuilder(); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ErrorOrBuilder getErrorOrBuilder() { - if (errorBuilder_ != null) { - return errorBuilder_.getMessageOrBuilder(); - } else { - return error_; - } - } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ErrorOrBuilder> - getErrorFieldBuilder() { - if (errorBuilder_ == null) { - errorBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ErrorOrBuilder>( - error_, - getParentForChildren(), - isClean()); - error_ = null; - } - return errorBuilder_; } - // optional .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 3; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder> consumedBuilder_; - public boolean hasConsumed() { + // required int64 creation_time = 3; + private long creationTime_ ; + public boolean hasCreationTime() { return ((bitField0_ & 0x00000004) == 0x00000004); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed() { - if (consumedBuilder_ == null) { - return consumed_; - } else { - return consumedBuilder_.getMessage(); - } - } - public Builder setConsumed(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity value) { - if (consumedBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - consumed_ = value; - onChanged(); - } else { - consumedBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - return this; - } - public Builder setConsumed( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder builderForValue) { - if (consumedBuilder_ == null) { - consumed_ = builderForValue.build(); - onChanged(); - } else { - consumedBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - return this; - } - public Builder mergeConsumed(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity value) { - if (consumedBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004) && - consumed_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance()) { - consumed_ = - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.newBuilder(consumed_).mergeFrom(value).buildPartial(); - } else { - consumed_ = value; - } - onChanged(); - } else { - consumedBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - return this; - } - public Builder clearConsumed() { - if (consumedBuilder_ == null) { - consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); - onChanged(); - } else { - consumedBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - return this; + public long getCreationTime() { + return creationTime_; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder getConsumedBuilder() { + public Builder setCreationTime(long value) { bitField0_ |= 0x00000004; - onChanged(); - return getConsumedFieldBuilder().getBuilder(); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder() { - if (consumedBuilder_ != null) { - return consumedBuilder_.getMessageOrBuilder(); - } else { - return consumed_; - } - } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder> - getConsumedFieldBuilder() { - if (consumedBuilder_ == null) { - consumedBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder>( - consumed_, - getParentForChildren(), - isClean()); - consumed_ = null; - } - return consumedBuilder_; - } - - // optional bytes row = 4; - private com.google.protobuf.ByteString row_ = com.google.protobuf.ByteString.EMPTY; - public boolean hasRow() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public com.google.protobuf.ByteString getRow() { - return row_; - } - public Builder setRow(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - row_ = value; + creationTime_ = value; onChanged(); return this; } - public Builder clearRow() { - bitField0_ = (bitField0_ & ~0x00000008); - row_ = getDefaultInstance().getRow(); + public Builder clearCreationTime() { + bitField0_ = (bitField0_ & ~0x00000004); + creationTime_ = 0L; onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.RowInBatchWriteRowResponse) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.Stream) } static { - defaultInstance = new RowInBatchWriteRowResponse(true); + defaultInstance = new Stream(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.RowInBatchWriteRowResponse) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.Stream) } - public interface TableInBatchWriteRowResponseOrBuilder + public interface ListStreamResponseOrBuilder extends com.google.protobuf.MessageOrBuilder { - // required string table_name = 1; - boolean hasTableName(); - String getTableName(); - - // repeated .com.alicloud.openservices.tablestore.core.protocol.RowInBatchWriteRowResponse rows = 2; - java.util.List - getRowsList(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse getRows(int index); - int getRowsCount(); - java.util.List - getRowsOrBuilderList(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponseOrBuilder getRowsOrBuilder( + // repeated .com.alicloud.openservices.tablestore.core.protocol.Stream streams = 1; + java.util.List + getStreamsList(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream getStreams(int index); + int getStreamsCount(); + java.util.List + getStreamsOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamOrBuilder getStreamsOrBuilder( int index); } - public static final class TableInBatchWriteRowResponse extends + public static final class ListStreamResponse extends com.google.protobuf.GeneratedMessage - implements TableInBatchWriteRowResponseOrBuilder { - // Use TableInBatchWriteRowResponse.newBuilder() to construct. - private TableInBatchWriteRowResponse(Builder builder) { + implements ListStreamResponseOrBuilder { + // Use ListStreamResponse.newBuilder() to construct. + private ListStreamResponse(Builder builder) { super(builder); } - private TableInBatchWriteRowResponse(boolean noInit) {} + private ListStreamResponse(boolean noInit) {} - private static final TableInBatchWriteRowResponse defaultInstance; - public static TableInBatchWriteRowResponse getDefaultInstance() { + private static final ListStreamResponse defaultInstance; + public static ListStreamResponse getDefaultInstance() { return defaultInstance; } - public TableInBatchWriteRowResponse getDefaultInstanceForType() { + public ListStreamResponse getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TableInBatchWriteRowResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListStreamResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TableInBatchWriteRowResponse_fieldAccessorTable; - } - - private int bitField0_; - // required string table_name = 1; - public static final int TABLE_NAME_FIELD_NUMBER = 1; - private java.lang.Object tableName_; - public boolean hasTableName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getTableName() { - java.lang.Object ref = tableName_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - tableName_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getTableNameBytes() { - java.lang.Object ref = tableName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - tableName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListStreamResponse_fieldAccessorTable; } - // repeated .com.alicloud.openservices.tablestore.core.protocol.RowInBatchWriteRowResponse rows = 2; - public static final int ROWS_FIELD_NUMBER = 2; - private java.util.List rows_; - public java.util.List getRowsList() { - return rows_; + // repeated .com.alicloud.openservices.tablestore.core.protocol.Stream streams = 1; + public static final int STREAMS_FIELD_NUMBER = 1; + private java.util.List streams_; + public java.util.List getStreamsList() { + return streams_; } - public java.util.List - getRowsOrBuilderList() { - return rows_; + public java.util.List + getStreamsOrBuilderList() { + return streams_; } - public int getRowsCount() { - return rows_.size(); + public int getStreamsCount() { + return streams_.size(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse getRows(int index) { - return rows_.get(index); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream getStreams(int index) { + return streams_.get(index); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponseOrBuilder getRowsOrBuilder( + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamOrBuilder getStreamsOrBuilder( int index) { - return rows_.get(index); + return streams_.get(index); } private void initFields() { - tableName_ = ""; - rows_ = java.util.Collections.emptyList(); + streams_ = java.util.Collections.emptyList(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - if (!hasTableName()) { - memoizedIsInitialized = 0; - return false; - } - for (int i = 0; i < getRowsCount(); i++) { - if (!getRows(i).isInitialized()) { + for (int i = 0; i < getStreamsCount(); i++) { + if (!getStreams(i).isInitialized()) { memoizedIsInitialized = 0; return false; } @@ -29883,11 +40984,8 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getTableNameBytes()); - } - for (int i = 0; i < rows_.size(); i++) { - output.writeMessage(2, rows_.get(i)); + for (int i = 0; i < streams_.size(); i++) { + output.writeMessage(1, streams_.get(i)); } getUnknownFields().writeTo(output); } @@ -29898,13 +40996,9 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getTableNameBytes()); - } - for (int i = 0; i < rows_.size(); i++) { + for (int i = 0; i < streams_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, rows_.get(i)); + .computeMessageSize(1, streams_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -29918,41 +41012,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -29961,7 +41055,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -29972,12 +41066,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -29987,7 +41081,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -30000,18 +41094,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponseOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TableInBatchWriteRowResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListStreamResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TableInBatchWriteRowResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListStreamResponse_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -30022,7 +41116,7 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getRowsFieldBuilder(); + getStreamsFieldBuilder(); } } private static Builder create() { @@ -30031,13 +41125,11 @@ private static Builder create() { public Builder clear() { super.clear(); - tableName_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - if (rowsBuilder_ == null) { - rows_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); + if (streamsBuilder_ == null) { + streams_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); } else { - rowsBuilder_.clear(); + streamsBuilder_.clear(); } return this; } @@ -30048,24 +41140,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -30073,65 +41165,56 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableI return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse(this); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse(this); int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.tableName_ = tableName_; - if (rowsBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { - rows_ = java.util.Collections.unmodifiableList(rows_); - bitField0_ = (bitField0_ & ~0x00000002); + if (streamsBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + streams_ = java.util.Collections.unmodifiableList(streams_); + bitField0_ = (bitField0_ & ~0x00000001); } - result.rows_ = rows_; + result.streams_ = streams_; } else { - result.rows_ = rowsBuilder_.build(); + result.streams_ = streamsBuilder_.build(); } - result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse.getDefaultInstance()) return this; - if (other.hasTableName()) { - setTableName(other.getTableName()); - } - if (rowsBuilder_ == null) { - if (!other.rows_.isEmpty()) { - if (rows_.isEmpty()) { - rows_ = other.rows_; - bitField0_ = (bitField0_ & ~0x00000002); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse.getDefaultInstance()) return this; + if (streamsBuilder_ == null) { + if (!other.streams_.isEmpty()) { + if (streams_.isEmpty()) { + streams_ = other.streams_; + bitField0_ = (bitField0_ & ~0x00000001); } else { - ensureRowsIsMutable(); - rows_.addAll(other.rows_); + ensureStreamsIsMutable(); + streams_.addAll(other.streams_); } onChanged(); } } else { - if (!other.rows_.isEmpty()) { - if (rowsBuilder_.isEmpty()) { - rowsBuilder_.dispose(); - rowsBuilder_ = null; - rows_ = other.rows_; - bitField0_ = (bitField0_ & ~0x00000002); - rowsBuilder_ = + if (!other.streams_.isEmpty()) { + if (streamsBuilder_.isEmpty()) { + streamsBuilder_.dispose(); + streamsBuilder_ = null; + streams_ = other.streams_; + bitField0_ = (bitField0_ & ~0x00000001); + streamsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getRowsFieldBuilder() : null; + getStreamsFieldBuilder() : null; } else { - rowsBuilder_.addAllMessages(other.rows_); + streamsBuilder_.addAllMessages(other.streams_); } } } @@ -30140,12 +41223,8 @@ public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsI } public final boolean isInitialized() { - if (!hasTableName()) { - - return false; - } - for (int i = 0; i < getRowsCount(); i++) { - if (!getRows(i).isInitialized()) { + for (int i = 0; i < getStreamsCount(); i++) { + if (!getStreams(i).isInitialized()) { return false; } @@ -30177,14 +41256,9 @@ public Builder mergeFrom( break; } case 10: { - bitField0_ |= 0x00000001; - tableName_ = input.readBytes(); - break; - } - case 18: { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse.newBuilder(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream.newBuilder(); input.readMessage(subBuilder, extensionRegistry); - addRows(subBuilder.buildPartial()); + addStreams(subBuilder.buildPartial()); break; } } @@ -30193,314 +41267,356 @@ public Builder mergeFrom( private int bitField0_; - // required string table_name = 1; - private java.lang.Object tableName_ = ""; - public boolean hasTableName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getTableName() { - java.lang.Object ref = tableName_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - tableName_ = s; - return s; - } else { - return (String) ref; - } - } - public Builder setTableName(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - tableName_ = value; - onChanged(); - return this; - } - public Builder clearTableName() { - bitField0_ = (bitField0_ & ~0x00000001); - tableName_ = getDefaultInstance().getTableName(); - onChanged(); - return this; - } - void setTableName(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; - tableName_ = value; - onChanged(); - } - - // repeated .com.alicloud.openservices.tablestore.core.protocol.RowInBatchWriteRowResponse rows = 2; - private java.util.List rows_ = + // repeated .com.alicloud.openservices.tablestore.core.protocol.Stream streams = 1; + private java.util.List streams_ = java.util.Collections.emptyList(); - private void ensureRowsIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - rows_ = new java.util.ArrayList(rows_); - bitField0_ |= 0x00000002; + private void ensureStreamsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + streams_ = new java.util.ArrayList(streams_); + bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponseOrBuilder> rowsBuilder_; + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamOrBuilder> streamsBuilder_; - public java.util.List getRowsList() { - if (rowsBuilder_ == null) { - return java.util.Collections.unmodifiableList(rows_); + public java.util.List getStreamsList() { + if (streamsBuilder_ == null) { + return java.util.Collections.unmodifiableList(streams_); } else { - return rowsBuilder_.getMessageList(); + return streamsBuilder_.getMessageList(); } } - public int getRowsCount() { - if (rowsBuilder_ == null) { - return rows_.size(); + public int getStreamsCount() { + if (streamsBuilder_ == null) { + return streams_.size(); } else { - return rowsBuilder_.getCount(); + return streamsBuilder_.getCount(); } } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse getRows(int index) { - if (rowsBuilder_ == null) { - return rows_.get(index); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream getStreams(int index) { + if (streamsBuilder_ == null) { + return streams_.get(index); } else { - return rowsBuilder_.getMessage(index); + return streamsBuilder_.getMessage(index); } } - public Builder setRows( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse value) { - if (rowsBuilder_ == null) { + public Builder setStreams( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream value) { + if (streamsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureRowsIsMutable(); - rows_.set(index, value); + ensureStreamsIsMutable(); + streams_.set(index, value); onChanged(); } else { - rowsBuilder_.setMessage(index, value); + streamsBuilder_.setMessage(index, value); } return this; } - public Builder setRows( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse.Builder builderForValue) { - if (rowsBuilder_ == null) { - ensureRowsIsMutable(); - rows_.set(index, builderForValue.build()); + public Builder setStreams( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream.Builder builderForValue) { + if (streamsBuilder_ == null) { + ensureStreamsIsMutable(); + streams_.set(index, builderForValue.build()); onChanged(); } else { - rowsBuilder_.setMessage(index, builderForValue.build()); + streamsBuilder_.setMessage(index, builderForValue.build()); } return this; } - public Builder addRows(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse value) { - if (rowsBuilder_ == null) { + public Builder addStreams(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream value) { + if (streamsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureRowsIsMutable(); - rows_.add(value); + ensureStreamsIsMutable(); + streams_.add(value); onChanged(); } else { - rowsBuilder_.addMessage(value); + streamsBuilder_.addMessage(value); } return this; } - public Builder addRows( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse value) { - if (rowsBuilder_ == null) { + public Builder addStreams( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream value) { + if (streamsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureRowsIsMutable(); - rows_.add(index, value); + ensureStreamsIsMutable(); + streams_.add(index, value); onChanged(); } else { - rowsBuilder_.addMessage(index, value); + streamsBuilder_.addMessage(index, value); } return this; } - public Builder addRows( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse.Builder builderForValue) { - if (rowsBuilder_ == null) { - ensureRowsIsMutable(); - rows_.add(builderForValue.build()); + public Builder addStreams( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream.Builder builderForValue) { + if (streamsBuilder_ == null) { + ensureStreamsIsMutable(); + streams_.add(builderForValue.build()); onChanged(); } else { - rowsBuilder_.addMessage(builderForValue.build()); + streamsBuilder_.addMessage(builderForValue.build()); } return this; } - public Builder addRows( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse.Builder builderForValue) { - if (rowsBuilder_ == null) { - ensureRowsIsMutable(); - rows_.add(index, builderForValue.build()); + public Builder addStreams( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream.Builder builderForValue) { + if (streamsBuilder_ == null) { + ensureStreamsIsMutable(); + streams_.add(index, builderForValue.build()); onChanged(); } else { - rowsBuilder_.addMessage(index, builderForValue.build()); + streamsBuilder_.addMessage(index, builderForValue.build()); } return this; } - public Builder addAllRows( - java.lang.Iterable values) { - if (rowsBuilder_ == null) { - ensureRowsIsMutable(); - super.addAll(values, rows_); + public Builder addAllStreams( + java.lang.Iterable values) { + if (streamsBuilder_ == null) { + ensureStreamsIsMutable(); + super.addAll(values, streams_); onChanged(); } else { - rowsBuilder_.addAllMessages(values); + streamsBuilder_.addAllMessages(values); } return this; } - public Builder clearRows() { - if (rowsBuilder_ == null) { - rows_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); + public Builder clearStreams() { + if (streamsBuilder_ == null) { + streams_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { - rowsBuilder_.clear(); + streamsBuilder_.clear(); } return this; } - public Builder removeRows(int index) { - if (rowsBuilder_ == null) { - ensureRowsIsMutable(); - rows_.remove(index); + public Builder removeStreams(int index) { + if (streamsBuilder_ == null) { + ensureStreamsIsMutable(); + streams_.remove(index); onChanged(); } else { - rowsBuilder_.remove(index); + streamsBuilder_.remove(index); } return this; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse.Builder getRowsBuilder( + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream.Builder getStreamsBuilder( int index) { - return getRowsFieldBuilder().getBuilder(index); + return getStreamsFieldBuilder().getBuilder(index); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponseOrBuilder getRowsOrBuilder( + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamOrBuilder getStreamsOrBuilder( int index) { - if (rowsBuilder_ == null) { - return rows_.get(index); } else { - return rowsBuilder_.getMessageOrBuilder(index); + if (streamsBuilder_ == null) { + return streams_.get(index); } else { + return streamsBuilder_.getMessageOrBuilder(index); } } - public java.util.List - getRowsOrBuilderList() { - if (rowsBuilder_ != null) { - return rowsBuilder_.getMessageOrBuilderList(); + public java.util.List + getStreamsOrBuilderList() { + if (streamsBuilder_ != null) { + return streamsBuilder_.getMessageOrBuilderList(); } else { - return java.util.Collections.unmodifiableList(rows_); + return java.util.Collections.unmodifiableList(streams_); } } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse.Builder addRowsBuilder() { - return getRowsFieldBuilder().addBuilder( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse.getDefaultInstance()); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream.Builder addStreamsBuilder() { + return getStreamsFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream.getDefaultInstance()); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse.Builder addRowsBuilder( + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream.Builder addStreamsBuilder( int index) { - return getRowsFieldBuilder().addBuilder( - index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse.getDefaultInstance()); + return getStreamsFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream.getDefaultInstance()); } - public java.util.List - getRowsBuilderList() { - return getRowsFieldBuilder().getBuilderList(); + public java.util.List + getStreamsBuilderList() { + return getStreamsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponseOrBuilder> - getRowsFieldBuilder() { - if (rowsBuilder_ == null) { - rowsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponseOrBuilder>( - rows_, - ((bitField0_ & 0x00000002) == 0x00000002), + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamOrBuilder> + getStreamsFieldBuilder() { + if (streamsBuilder_ == null) { + streamsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamOrBuilder>( + streams_, + ((bitField0_ & 0x00000001) == 0x00000001), getParentForChildren(), isClean()); - rows_ = null; + streams_ = null; } - return rowsBuilder_; + return streamsBuilder_; } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.TableInBatchWriteRowResponse) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.ListStreamResponse) } static { - defaultInstance = new TableInBatchWriteRowResponse(true); + defaultInstance = new ListStreamResponse(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.TableInBatchWriteRowResponse) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.ListStreamResponse) } - public interface BatchWriteRowResponseOrBuilder + public interface StreamShardOrBuilder extends com.google.protobuf.MessageOrBuilder { - // repeated .com.alicloud.openservices.tablestore.core.protocol.TableInBatchWriteRowResponse tables = 1; - java.util.List - getTablesList(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse getTables(int index); - int getTablesCount(); - java.util.List - getTablesOrBuilderList(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponseOrBuilder getTablesOrBuilder( - int index); + // required string shard_id = 1; + boolean hasShardId(); + String getShardId(); + + // optional string parent_id = 2; + boolean hasParentId(); + String getParentId(); + + // optional string parent_sibling_id = 3; + boolean hasParentSiblingId(); + String getParentSiblingId(); } - public static final class BatchWriteRowResponse extends + public static final class StreamShard extends com.google.protobuf.GeneratedMessage - implements BatchWriteRowResponseOrBuilder { - // Use BatchWriteRowResponse.newBuilder() to construct. - private BatchWriteRowResponse(Builder builder) { + implements StreamShardOrBuilder { + // Use StreamShard.newBuilder() to construct. + private StreamShard(Builder builder) { super(builder); } - private BatchWriteRowResponse(boolean noInit) {} + private StreamShard(boolean noInit) {} - private static final BatchWriteRowResponse defaultInstance; - public static BatchWriteRowResponse getDefaultInstance() { + private static final StreamShard defaultInstance; + public static StreamShard getDefaultInstance() { return defaultInstance; } - public BatchWriteRowResponse getDefaultInstanceForType() { + public StreamShard getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_BatchWriteRowResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_StreamShard_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_BatchWriteRowResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_StreamShard_fieldAccessorTable; } - // repeated .com.alicloud.openservices.tablestore.core.protocol.TableInBatchWriteRowResponse tables = 1; - public static final int TABLES_FIELD_NUMBER = 1; - private java.util.List tables_; - public java.util.List getTablesList() { - return tables_; + private int bitField0_; + // required string shard_id = 1; + public static final int SHARD_ID_FIELD_NUMBER = 1; + private java.lang.Object shardId_; + public boolean hasShardId() { + return ((bitField0_ & 0x00000001) == 0x00000001); } - public java.util.List - getTablesOrBuilderList() { - return tables_; + public String getShardId() { + java.lang.Object ref = shardId_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + shardId_ = s; + } + return s; + } } - public int getTablesCount() { - return tables_.size(); + private com.google.protobuf.ByteString getShardIdBytes() { + java.lang.Object ref = shardId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + shardId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse getTables(int index) { - return tables_.get(index); + + // optional string parent_id = 2; + public static final int PARENT_ID_FIELD_NUMBER = 2; + private java.lang.Object parentId_; + public boolean hasParentId() { + return ((bitField0_ & 0x00000002) == 0x00000002); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponseOrBuilder getTablesOrBuilder( - int index) { - return tables_.get(index); + public String getParentId() { + java.lang.Object ref = parentId_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + parentId_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getParentIdBytes() { + java.lang.Object ref = parentId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + parentId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional string parent_sibling_id = 3; + public static final int PARENT_SIBLING_ID_FIELD_NUMBER = 3; + private java.lang.Object parentSiblingId_; + public boolean hasParentSiblingId() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public String getParentSiblingId() { + java.lang.Object ref = parentSiblingId_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + parentSiblingId_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getParentSiblingIdBytes() { + java.lang.Object ref = parentSiblingId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + parentSiblingId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } private void initFields() { - tables_ = java.util.Collections.emptyList(); + shardId_ = ""; + parentId_ = ""; + parentSiblingId_ = ""; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - for (int i = 0; i < getTablesCount(); i++) { - if (!getTables(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } + if (!hasShardId()) { + memoizedIsInitialized = 0; + return false; } memoizedIsInitialized = 1; return true; @@ -30509,8 +41625,14 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - for (int i = 0; i < tables_.size(); i++) { - output.writeMessage(1, tables_.get(i)); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getShardIdBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getParentIdBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeBytes(3, getParentSiblingIdBytes()); } getUnknownFields().writeTo(output); } @@ -30521,9 +41643,17 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - for (int i = 0; i < tables_.size(); i++) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, tables_.get(i)); + .computeBytesSize(1, getShardIdBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getParentIdBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, getParentSiblingIdBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -30537,41 +41667,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -30580,7 +41710,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -30591,12 +41721,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -30606,7 +41736,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -30619,18 +41749,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponseOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShardOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_BatchWriteRowResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_StreamShard_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_BatchWriteRowResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_StreamShard_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -30641,7 +41771,6 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getTablesFieldBuilder(); } } private static Builder create() { @@ -30650,12 +41779,12 @@ private static Builder create() { public Builder clear() { super.clear(); - if (tablesBuilder_ == null) { - tables_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - tablesBuilder_.clear(); - } + shardId_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + parentId_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + parentSiblingId_ = ""; + bitField0_ = (bitField0_ & ~0x00000004); return this; } @@ -30665,24 +41794,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -30690,69 +41819,55 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchW return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse(this); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard(this); int from_bitField0_ = bitField0_; - if (tablesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - tables_ = java.util.Collections.unmodifiableList(tables_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.tables_ = tables_; - } else { - result.tables_ = tablesBuilder_.build(); + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.shardId_ = shardId_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.parentId_ = parentId_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; } + result.parentSiblingId_ = parentSiblingId_; + result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse.getDefaultInstance()) return this; - if (tablesBuilder_ == null) { - if (!other.tables_.isEmpty()) { - if (tables_.isEmpty()) { - tables_ = other.tables_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureTablesIsMutable(); - tables_.addAll(other.tables_); - } - onChanged(); - } - } else { - if (!other.tables_.isEmpty()) { - if (tablesBuilder_.isEmpty()) { - tablesBuilder_.dispose(); - tablesBuilder_ = null; - tables_ = other.tables_; - bitField0_ = (bitField0_ & ~0x00000001); - tablesBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getTablesFieldBuilder() : null; - } else { - tablesBuilder_.addAllMessages(other.tables_); - } - } + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard.getDefaultInstance()) return this; + if (other.hasShardId()) { + setShardId(other.getShardId()); + } + if (other.hasParentId()) { + setParentId(other.getParentId()); + } + if (other.hasParentSiblingId()) { + setParentSiblingId(other.getParentSiblingId()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { - for (int i = 0; i < getTablesCount(); i++) { - if (!getTables(i).isInitialized()) { - - return false; - } + if (!hasShardId()) { + + return false; } return true; } @@ -30781,9 +41896,18 @@ public Builder mergeFrom( break; } case 10: { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse.newBuilder(); - input.readMessage(subBuilder, extensionRegistry); - addTables(subBuilder.buildPartial()); + bitField0_ |= 0x00000001; + shardId_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + parentId_ = input.readBytes(); + break; + } + case 26: { + bitField0_ |= 0x00000004; + parentSiblingId_ = input.readBytes(); break; } } @@ -30792,297 +41916,177 @@ public Builder mergeFrom( private int bitField0_; - // repeated .com.alicloud.openservices.tablestore.core.protocol.TableInBatchWriteRowResponse tables = 1; - private java.util.List tables_ = - java.util.Collections.emptyList(); - private void ensureTablesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - tables_ = new java.util.ArrayList(tables_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponseOrBuilder> tablesBuilder_; - - public java.util.List getTablesList() { - if (tablesBuilder_ == null) { - return java.util.Collections.unmodifiableList(tables_); - } else { - return tablesBuilder_.getMessageList(); - } - } - public int getTablesCount() { - if (tablesBuilder_ == null) { - return tables_.size(); - } else { - return tablesBuilder_.getCount(); - } - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse getTables(int index) { - if (tablesBuilder_ == null) { - return tables_.get(index); - } else { - return tablesBuilder_.getMessage(index); - } - } - public Builder setTables( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse value) { - if (tablesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTablesIsMutable(); - tables_.set(index, value); - onChanged(); - } else { - tablesBuilder_.setMessage(index, value); - } - return this; + // required string shard_id = 1; + private java.lang.Object shardId_ = ""; + public boolean hasShardId() { + return ((bitField0_ & 0x00000001) == 0x00000001); } - public Builder setTables( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse.Builder builderForValue) { - if (tablesBuilder_ == null) { - ensureTablesIsMutable(); - tables_.set(index, builderForValue.build()); - onChanged(); + public String getShardId() { + java.lang.Object ref = shardId_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + shardId_ = s; + return s; } else { - tablesBuilder_.setMessage(index, builderForValue.build()); + return (String) ref; } - return this; } - public Builder addTables(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse value) { - if (tablesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTablesIsMutable(); - tables_.add(value); - onChanged(); - } else { - tablesBuilder_.addMessage(value); - } + public Builder setShardId(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + shardId_ = value; + onChanged(); return this; } - public Builder addTables( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse value) { - if (tablesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTablesIsMutable(); - tables_.add(index, value); - onChanged(); - } else { - tablesBuilder_.addMessage(index, value); - } + public Builder clearShardId() { + bitField0_ = (bitField0_ & ~0x00000001); + shardId_ = getDefaultInstance().getShardId(); + onChanged(); return this; } - public Builder addTables( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse.Builder builderForValue) { - if (tablesBuilder_ == null) { - ensureTablesIsMutable(); - tables_.add(builderForValue.build()); - onChanged(); - } else { - tablesBuilder_.addMessage(builderForValue.build()); - } - return this; + void setShardId(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + shardId_ = value; + onChanged(); } - public Builder addTables( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse.Builder builderForValue) { - if (tablesBuilder_ == null) { - ensureTablesIsMutable(); - tables_.add(index, builderForValue.build()); - onChanged(); - } else { - tablesBuilder_.addMessage(index, builderForValue.build()); - } - return this; + + // optional string parent_id = 2; + private java.lang.Object parentId_ = ""; + public boolean hasParentId() { + return ((bitField0_ & 0x00000002) == 0x00000002); } - public Builder addAllTables( - java.lang.Iterable values) { - if (tablesBuilder_ == null) { - ensureTablesIsMutable(); - super.addAll(values, tables_); - onChanged(); + public String getParentId() { + java.lang.Object ref = parentId_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + parentId_ = s; + return s; } else { - tablesBuilder_.addAllMessages(values); + return (String) ref; } - return this; } - public Builder clearTables() { - if (tablesBuilder_ == null) { - tables_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - tablesBuilder_.clear(); - } + public Builder setParentId(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + parentId_ = value; + onChanged(); return this; } - public Builder removeTables(int index) { - if (tablesBuilder_ == null) { - ensureTablesIsMutable(); - tables_.remove(index); - onChanged(); - } else { - tablesBuilder_.remove(index); - } + public Builder clearParentId() { + bitField0_ = (bitField0_ & ~0x00000002); + parentId_ = getDefaultInstance().getParentId(); + onChanged(); return this; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse.Builder getTablesBuilder( - int index) { - return getTablesFieldBuilder().getBuilder(index); + void setParentId(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000002; + parentId_ = value; + onChanged(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponseOrBuilder getTablesOrBuilder( - int index) { - if (tablesBuilder_ == null) { - return tables_.get(index); } else { - return tablesBuilder_.getMessageOrBuilder(index); - } + + // optional string parent_sibling_id = 3; + private java.lang.Object parentSiblingId_ = ""; + public boolean hasParentSiblingId() { + return ((bitField0_ & 0x00000004) == 0x00000004); } - public java.util.List - getTablesOrBuilderList() { - if (tablesBuilder_ != null) { - return tablesBuilder_.getMessageOrBuilderList(); + public String getParentSiblingId() { + java.lang.Object ref = parentSiblingId_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + parentSiblingId_ = s; + return s; } else { - return java.util.Collections.unmodifiableList(tables_); + return (String) ref; } } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse.Builder addTablesBuilder() { - return getTablesFieldBuilder().addBuilder( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse.getDefaultInstance()); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse.Builder addTablesBuilder( - int index) { - return getTablesFieldBuilder().addBuilder( - index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse.getDefaultInstance()); + public Builder setParentSiblingId(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + parentSiblingId_ = value; + onChanged(); + return this; } - public java.util.List - getTablesBuilderList() { - return getTablesFieldBuilder().getBuilderList(); + public Builder clearParentSiblingId() { + bitField0_ = (bitField0_ & ~0x00000004); + parentSiblingId_ = getDefaultInstance().getParentSiblingId(); + onChanged(); + return this; } - private com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponseOrBuilder> - getTablesFieldBuilder() { - if (tablesBuilder_ == null) { - tablesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponseOrBuilder>( - tables_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); - tables_ = null; - } - return tablesBuilder_; + void setParentSiblingId(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000004; + parentSiblingId_ = value; + onChanged(); } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.BatchWriteRowResponse) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.StreamShard) } static { - defaultInstance = new BatchWriteRowResponse(true); + defaultInstance = new StreamShard(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.BatchWriteRowResponse) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.StreamShard) } - public interface GetRangeRequestOrBuilder + public interface DescribeStreamRequestOrBuilder extends com.google.protobuf.MessageOrBuilder { - // required string table_name = 1; - boolean hasTableName(); - String getTableName(); - - // required .com.alicloud.openservices.tablestore.core.protocol.Direction direction = 2; - boolean hasDirection(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Direction getDirection(); - - // repeated string columns_to_get = 3; - java.util.List getColumnsToGetList(); - int getColumnsToGetCount(); - String getColumnsToGet(int index); - - // optional .com.alicloud.openservices.tablestore.core.protocol.TimeRange time_range = 4; - boolean hasTimeRange(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange getTimeRange(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRangeOrBuilder getTimeRangeOrBuilder(); - - // optional int32 max_versions = 5; - boolean hasMaxVersions(); - int getMaxVersions(); - - // optional int32 limit = 6; - boolean hasLimit(); - int getLimit(); - - // required bytes inclusive_start_primary_key = 7; - boolean hasInclusiveStartPrimaryKey(); - com.google.protobuf.ByteString getInclusiveStartPrimaryKey(); - - // required bytes exclusive_end_primary_key = 8; - boolean hasExclusiveEndPrimaryKey(); - com.google.protobuf.ByteString getExclusiveEndPrimaryKey(); - - // optional bytes filter = 10; - boolean hasFilter(); - com.google.protobuf.ByteString getFilter(); - - // optional string start_column = 11; - boolean hasStartColumn(); - String getStartColumn(); - - // optional string end_column = 12; - boolean hasEndColumn(); - String getEndColumn(); + // required string stream_id = 1; + boolean hasStreamId(); + String getStreamId(); - // optional bytes token = 13; - boolean hasToken(); - com.google.protobuf.ByteString getToken(); + // optional string inclusive_start_shard_id = 2; + boolean hasInclusiveStartShardId(); + String getInclusiveStartShardId(); - // optional string transaction_id = 14; - boolean hasTransactionId(); - String getTransactionId(); + // optional int32 shard_limit = 3; + boolean hasShardLimit(); + int getShardLimit(); } - public static final class GetRangeRequest extends + public static final class DescribeStreamRequest extends com.google.protobuf.GeneratedMessage - implements GetRangeRequestOrBuilder { - // Use GetRangeRequest.newBuilder() to construct. - private GetRangeRequest(Builder builder) { + implements DescribeStreamRequestOrBuilder { + // Use DescribeStreamRequest.newBuilder() to construct. + private DescribeStreamRequest(Builder builder) { super(builder); } - private GetRangeRequest(boolean noInit) {} + private DescribeStreamRequest(boolean noInit) {} - private static final GetRangeRequest defaultInstance; - public static GetRangeRequest getDefaultInstance() { + private static final DescribeStreamRequest defaultInstance; + public static DescribeStreamRequest getDefaultInstance() { return defaultInstance; } - public GetRangeRequest getDefaultInstanceForType() { + public DescribeStreamRequest getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetRangeRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeStreamRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetRangeRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeStreamRequest_fieldAccessorTable; } private int bitField0_; - // required string table_name = 1; - public static final int TABLE_NAME_FIELD_NUMBER = 1; - private java.lang.Object tableName_; - public boolean hasTableName() { + // required string stream_id = 1; + public static final int STREAM_ID_FIELD_NUMBER = 1; + private java.lang.Object streamId_; + public boolean hasStreamId() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getTableName() { - java.lang.Object ref = tableName_; + public String getStreamId() { + java.lang.Object ref = streamId_; if (ref instanceof String) { return (String) ref; } else { @@ -31090,150 +42094,31 @@ public String getTableName() { (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); if (com.google.protobuf.Internal.isValidUtf8(bs)) { - tableName_ = s; + streamId_ = s; } return s; } } - private com.google.protobuf.ByteString getTableNameBytes() { - java.lang.Object ref = tableName_; + private com.google.protobuf.ByteString getStreamIdBytes() { + java.lang.Object ref = streamId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((String) ref); - tableName_ = b; + streamId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - // required .com.alicloud.openservices.tablestore.core.protocol.Direction direction = 2; - public static final int DIRECTION_FIELD_NUMBER = 2; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Direction direction_; - public boolean hasDirection() { + // optional string inclusive_start_shard_id = 2; + public static final int INCLUSIVE_START_SHARD_ID_FIELD_NUMBER = 2; + private java.lang.Object inclusiveStartShardId_; + public boolean hasInclusiveStartShardId() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Direction getDirection() { - return direction_; - } - - // repeated string columns_to_get = 3; - public static final int COLUMNS_TO_GET_FIELD_NUMBER = 3; - private com.google.protobuf.LazyStringList columnsToGet_; - public java.util.List - getColumnsToGetList() { - return columnsToGet_; - } - public int getColumnsToGetCount() { - return columnsToGet_.size(); - } - public String getColumnsToGet(int index) { - return columnsToGet_.get(index); - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.TimeRange time_range = 4; - public static final int TIME_RANGE_FIELD_NUMBER = 4; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange timeRange_; - public boolean hasTimeRange() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange getTimeRange() { - return timeRange_; - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRangeOrBuilder getTimeRangeOrBuilder() { - return timeRange_; - } - - // optional int32 max_versions = 5; - public static final int MAX_VERSIONS_FIELD_NUMBER = 5; - private int maxVersions_; - public boolean hasMaxVersions() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public int getMaxVersions() { - return maxVersions_; - } - - // optional int32 limit = 6; - public static final int LIMIT_FIELD_NUMBER = 6; - private int limit_; - public boolean hasLimit() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - public int getLimit() { - return limit_; - } - - // required bytes inclusive_start_primary_key = 7; - public static final int INCLUSIVE_START_PRIMARY_KEY_FIELD_NUMBER = 7; - private com.google.protobuf.ByteString inclusiveStartPrimaryKey_; - public boolean hasInclusiveStartPrimaryKey() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - public com.google.protobuf.ByteString getInclusiveStartPrimaryKey() { - return inclusiveStartPrimaryKey_; - } - - // required bytes exclusive_end_primary_key = 8; - public static final int EXCLUSIVE_END_PRIMARY_KEY_FIELD_NUMBER = 8; - private com.google.protobuf.ByteString exclusiveEndPrimaryKey_; - public boolean hasExclusiveEndPrimaryKey() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - public com.google.protobuf.ByteString getExclusiveEndPrimaryKey() { - return exclusiveEndPrimaryKey_; - } - - // optional bytes filter = 10; - public static final int FILTER_FIELD_NUMBER = 10; - private com.google.protobuf.ByteString filter_; - public boolean hasFilter() { - return ((bitField0_ & 0x00000080) == 0x00000080); - } - public com.google.protobuf.ByteString getFilter() { - return filter_; - } - - // optional string start_column = 11; - public static final int START_COLUMN_FIELD_NUMBER = 11; - private java.lang.Object startColumn_; - public boolean hasStartColumn() { - return ((bitField0_ & 0x00000100) == 0x00000100); - } - public String getStartColumn() { - java.lang.Object ref = startColumn_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - startColumn_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getStartColumnBytes() { - java.lang.Object ref = startColumn_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - startColumn_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // optional string end_column = 12; - public static final int END_COLUMN_FIELD_NUMBER = 12; - private java.lang.Object endColumn_; - public boolean hasEndColumn() { - return ((bitField0_ & 0x00000200) == 0x00000200); - } - public String getEndColumn() { - java.lang.Object ref = endColumn_; + public String getInclusiveStartShardId() { + java.lang.Object ref = inclusiveStartShardId_; if (ref instanceof String) { return (String) ref; } else { @@ -31241,98 +42126,44 @@ public String getEndColumn() { (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); if (com.google.protobuf.Internal.isValidUtf8(bs)) { - endColumn_ = s; + inclusiveStartShardId_ = s; } return s; } } - private com.google.protobuf.ByteString getEndColumnBytes() { - java.lang.Object ref = endColumn_; + private com.google.protobuf.ByteString getInclusiveStartShardIdBytes() { + java.lang.Object ref = inclusiveStartShardId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((String) ref); - endColumn_ = b; + inclusiveStartShardId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - // optional bytes token = 13; - public static final int TOKEN_FIELD_NUMBER = 13; - private com.google.protobuf.ByteString token_; - public boolean hasToken() { - return ((bitField0_ & 0x00000400) == 0x00000400); - } - public com.google.protobuf.ByteString getToken() { - return token_; - } - - // optional string transaction_id = 14; - public static final int TRANSACTION_ID_FIELD_NUMBER = 14; - private java.lang.Object transactionId_; - public boolean hasTransactionId() { - return ((bitField0_ & 0x00000800) == 0x00000800); - } - public String getTransactionId() { - java.lang.Object ref = transactionId_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - transactionId_ = s; - } - return s; - } + // optional int32 shard_limit = 3; + public static final int SHARD_LIMIT_FIELD_NUMBER = 3; + private int shardLimit_; + public boolean hasShardLimit() { + return ((bitField0_ & 0x00000004) == 0x00000004); } - private com.google.protobuf.ByteString getTransactionIdBytes() { - java.lang.Object ref = transactionId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - transactionId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public int getShardLimit() { + return shardLimit_; } private void initFields() { - tableName_ = ""; - direction_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Direction.FORWARD; - columnsToGet_ = com.google.protobuf.LazyStringArrayList.EMPTY; - timeRange_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.getDefaultInstance(); - maxVersions_ = 0; - limit_ = 0; - inclusiveStartPrimaryKey_ = com.google.protobuf.ByteString.EMPTY; - exclusiveEndPrimaryKey_ = com.google.protobuf.ByteString.EMPTY; - filter_ = com.google.protobuf.ByteString.EMPTY; - startColumn_ = ""; - endColumn_ = ""; - token_ = com.google.protobuf.ByteString.EMPTY; - transactionId_ = ""; + streamId_ = ""; + inclusiveStartShardId_ = ""; + shardLimit_ = 0; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - if (!hasTableName()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasDirection()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasInclusiveStartPrimaryKey()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasExclusiveEndPrimaryKey()) { + if (!hasStreamId()) { memoizedIsInitialized = 0; return false; } @@ -31344,43 +42175,13 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getTableNameBytes()); + output.writeBytes(1, getStreamIdBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeEnum(2, direction_.getNumber()); - } - for (int i = 0; i < columnsToGet_.size(); i++) { - output.writeBytes(3, columnsToGet_.getByteString(i)); + output.writeBytes(2, getInclusiveStartShardIdBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeMessage(4, timeRange_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeInt32(5, maxVersions_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeInt32(6, limit_); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - output.writeBytes(7, inclusiveStartPrimaryKey_); - } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - output.writeBytes(8, exclusiveEndPrimaryKey_); - } - if (((bitField0_ & 0x00000080) == 0x00000080)) { - output.writeBytes(10, filter_); - } - if (((bitField0_ & 0x00000100) == 0x00000100)) { - output.writeBytes(11, getStartColumnBytes()); - } - if (((bitField0_ & 0x00000200) == 0x00000200)) { - output.writeBytes(12, getEndColumnBytes()); - } - if (((bitField0_ & 0x00000400) == 0x00000400)) { - output.writeBytes(13, token_); - } - if (((bitField0_ & 0x00000800) == 0x00000800)) { - output.writeBytes(14, getTransactionIdBytes()); + output.writeInt32(3, shardLimit_); } getUnknownFields().writeTo(output); } @@ -31393,60 +42194,15 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getTableNameBytes()); + .computeBytesSize(1, getStreamIdBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, direction_.getNumber()); - } - { - int dataSize = 0; - for (int i = 0; i < columnsToGet_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeBytesSizeNoTag(columnsToGet_.getByteString(i)); - } - size += dataSize; - size += 1 * getColumnsToGetList().size(); + .computeBytesSize(2, getInclusiveStartShardIdBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, timeRange_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(5, maxVersions_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(6, limit_); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(7, inclusiveStartPrimaryKey_); - } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(8, exclusiveEndPrimaryKey_); - } - if (((bitField0_ & 0x00000080) == 0x00000080)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(10, filter_); - } - if (((bitField0_ & 0x00000100) == 0x00000100)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(11, getStartColumnBytes()); - } - if (((bitField0_ & 0x00000200) == 0x00000200)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(12, getEndColumnBytes()); - } - if (((bitField0_ & 0x00000400) == 0x00000400)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(13, token_); - } - if (((bitField0_ & 0x00000800) == 0x00000800)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(14, getTransactionIdBytes()); + .computeInt32Size(3, shardLimit_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -31460,41 +42216,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -31503,7 +42259,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -31514,12 +42270,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -31529,7 +42285,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -31542,18 +42298,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequestOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetRangeRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeStreamRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetRangeRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeStreamRequest_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -31564,7 +42320,6 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getTimeRangeFieldBuilder(); } } private static Builder create() { @@ -31573,36 +42328,12 @@ private static Builder create() { public Builder clear() { super.clear(); - tableName_ = ""; + streamId_ = ""; bitField0_ = (bitField0_ & ~0x00000001); - direction_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Direction.FORWARD; + inclusiveStartShardId_ = ""; bitField0_ = (bitField0_ & ~0x00000002); - columnsToGet_ = com.google.protobuf.LazyStringArrayList.EMPTY; + shardLimit_ = 0; bitField0_ = (bitField0_ & ~0x00000004); - if (timeRangeBuilder_ == null) { - timeRange_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.getDefaultInstance(); - } else { - timeRangeBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - maxVersions_ = 0; - bitField0_ = (bitField0_ & ~0x00000010); - limit_ = 0; - bitField0_ = (bitField0_ & ~0x00000020); - inclusiveStartPrimaryKey_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000040); - exclusiveEndPrimaryKey_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000080); - filter_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000100); - startColumn_ = ""; - bitField0_ = (bitField0_ & ~0x00000200); - endColumn_ = ""; - bitField0_ = (bitField0_ & ~0x00000400); - token_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000800); - transactionId_ = ""; - bitField0_ = (bitField0_ & ~0x00001000); return this; } @@ -31612,24 +42343,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -31637,148 +42368,53 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRan return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest(this); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.tableName_ = tableName_; + result.streamId_ = streamId_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - result.direction_ = direction_; - if (((bitField0_ & 0x00000004) == 0x00000004)) { - columnsToGet_ = new com.google.protobuf.UnmodifiableLazyStringList( - columnsToGet_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.columnsToGet_ = columnsToGet_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + result.inclusiveStartShardId_ = inclusiveStartShardId_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } - if (timeRangeBuilder_ == null) { - result.timeRange_ = timeRange_; - } else { - result.timeRange_ = timeRangeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000008; - } - result.maxVersions_ = maxVersions_; - if (((from_bitField0_ & 0x00000020) == 0x00000020)) { - to_bitField0_ |= 0x00000010; - } - result.limit_ = limit_; - if (((from_bitField0_ & 0x00000040) == 0x00000040)) { - to_bitField0_ |= 0x00000020; - } - result.inclusiveStartPrimaryKey_ = inclusiveStartPrimaryKey_; - if (((from_bitField0_ & 0x00000080) == 0x00000080)) { - to_bitField0_ |= 0x00000040; - } - result.exclusiveEndPrimaryKey_ = exclusiveEndPrimaryKey_; - if (((from_bitField0_ & 0x00000100) == 0x00000100)) { - to_bitField0_ |= 0x00000080; - } - result.filter_ = filter_; - if (((from_bitField0_ & 0x00000200) == 0x00000200)) { - to_bitField0_ |= 0x00000100; - } - result.startColumn_ = startColumn_; - if (((from_bitField0_ & 0x00000400) == 0x00000400)) { - to_bitField0_ |= 0x00000200; - } - result.endColumn_ = endColumn_; - if (((from_bitField0_ & 0x00000800) == 0x00000800)) { - to_bitField0_ |= 0x00000400; - } - result.token_ = token_; - if (((from_bitField0_ & 0x00001000) == 0x00001000)) { - to_bitField0_ |= 0x00000800; - } - result.transactionId_ = transactionId_; + result.shardLimit_ = shardLimit_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest.getDefaultInstance()) return this; - if (other.hasTableName()) { - setTableName(other.getTableName()); - } - if (other.hasDirection()) { - setDirection(other.getDirection()); - } - if (!other.columnsToGet_.isEmpty()) { - if (columnsToGet_.isEmpty()) { - columnsToGet_ = other.columnsToGet_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureColumnsToGetIsMutable(); - columnsToGet_.addAll(other.columnsToGet_); - } - onChanged(); - } - if (other.hasTimeRange()) { - mergeTimeRange(other.getTimeRange()); - } - if (other.hasMaxVersions()) { - setMaxVersions(other.getMaxVersions()); - } - if (other.hasLimit()) { - setLimit(other.getLimit()); - } - if (other.hasInclusiveStartPrimaryKey()) { - setInclusiveStartPrimaryKey(other.getInclusiveStartPrimaryKey()); - } - if (other.hasExclusiveEndPrimaryKey()) { - setExclusiveEndPrimaryKey(other.getExclusiveEndPrimaryKey()); - } - if (other.hasFilter()) { - setFilter(other.getFilter()); - } - if (other.hasStartColumn()) { - setStartColumn(other.getStartColumn()); - } - if (other.hasEndColumn()) { - setEndColumn(other.getEndColumn()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest.getDefaultInstance()) return this; + if (other.hasStreamId()) { + setStreamId(other.getStreamId()); } - if (other.hasToken()) { - setToken(other.getToken()); + if (other.hasInclusiveStartShardId()) { + setInclusiveStartShardId(other.getInclusiveStartShardId()); } - if (other.hasTransactionId()) { - setTransactionId(other.getTransactionId()); + if (other.hasShardLimit()) { + setShardLimit(other.getShardLimit()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { - if (!hasTableName()) { - - return false; - } - if (!hasDirection()) { - - return false; - } - if (!hasInclusiveStartPrimaryKey()) { - - return false; - } - if (!hasExclusiveEndPrimaryKey()) { + if (!hasStreamId()) { return false; } @@ -31803,670 +42439,389 @@ public Builder mergeFrom( if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 10: { - bitField0_ |= 0x00000001; - tableName_ = input.readBytes(); - break; - } - case 16: { - int rawValue = input.readEnum(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Direction value = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Direction.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(2, rawValue); - } else { - bitField0_ |= 0x00000002; - direction_ = value; - } - break; - } - case 26: { - ensureColumnsToGetIsMutable(); - columnsToGet_.add(input.readBytes()); - break; - } - case 34: { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.newBuilder(); - if (hasTimeRange()) { - subBuilder.mergeFrom(getTimeRange()); - } - input.readMessage(subBuilder, extensionRegistry); - setTimeRange(subBuilder.buildPartial()); - break; - } - case 40: { - bitField0_ |= 0x00000010; - maxVersions_ = input.readInt32(); - break; - } - case 48: { - bitField0_ |= 0x00000020; - limit_ = input.readInt32(); - break; - } - case 58: { - bitField0_ |= 0x00000040; - inclusiveStartPrimaryKey_ = input.readBytes(); - break; - } - case 66: { - bitField0_ |= 0x00000080; - exclusiveEndPrimaryKey_ = input.readBytes(); - break; - } - case 82: { - bitField0_ |= 0x00000100; - filter_ = input.readBytes(); - break; - } - case 90: { - bitField0_ |= 0x00000200; - startColumn_ = input.readBytes(); - break; - } - case 98: { - bitField0_ |= 0x00000400; - endColumn_ = input.readBytes(); - break; - } - case 106: { - bitField0_ |= 0x00000800; - token_ = input.readBytes(); - break; - } - case 114: { - bitField0_ |= 0x00001000; - transactionId_ = input.readBytes(); - break; - } - } - } - } - - private int bitField0_; - - // required string table_name = 1; - private java.lang.Object tableName_ = ""; - public boolean hasTableName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getTableName() { - java.lang.Object ref = tableName_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - tableName_ = s; - return s; - } else { - return (String) ref; - } - } - public Builder setTableName(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - tableName_ = value; - onChanged(); - return this; - } - public Builder clearTableName() { - bitField0_ = (bitField0_ & ~0x00000001); - tableName_ = getDefaultInstance().getTableName(); - onChanged(); - return this; - } - void setTableName(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; - tableName_ = value; - onChanged(); - } - - // required .com.alicloud.openservices.tablestore.core.protocol.Direction direction = 2; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Direction direction_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Direction.FORWARD; - public boolean hasDirection() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Direction getDirection() { - return direction_; - } - public Builder setDirection(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Direction value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - direction_ = value; - onChanged(); - return this; - } - public Builder clearDirection() { - bitField0_ = (bitField0_ & ~0x00000002); - direction_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Direction.FORWARD; - onChanged(); - return this; - } - - // repeated string columns_to_get = 3; - private com.google.protobuf.LazyStringList columnsToGet_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureColumnsToGetIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { - columnsToGet_ = new com.google.protobuf.LazyStringArrayList(columnsToGet_); - bitField0_ |= 0x00000004; - } - } - public java.util.List - getColumnsToGetList() { - return java.util.Collections.unmodifiableList(columnsToGet_); - } - public int getColumnsToGetCount() { - return columnsToGet_.size(); - } - public String getColumnsToGet(int index) { - return columnsToGet_.get(index); - } - public Builder setColumnsToGet( - int index, String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureColumnsToGetIsMutable(); - columnsToGet_.set(index, value); - onChanged(); - return this; - } - public Builder addColumnsToGet(String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureColumnsToGetIsMutable(); - columnsToGet_.add(value); - onChanged(); - return this; - } - public Builder addAllColumnsToGet( - java.lang.Iterable values) { - ensureColumnsToGetIsMutable(); - super.addAll(values, columnsToGet_); - onChanged(); - return this; - } - public Builder clearColumnsToGet() { - columnsToGet_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - void addColumnsToGet(com.google.protobuf.ByteString value) { - ensureColumnsToGetIsMutable(); - columnsToGet_.add(value); - onChanged(); - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.TimeRange time_range = 4; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange timeRange_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRangeOrBuilder> timeRangeBuilder_; - public boolean hasTimeRange() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange getTimeRange() { - if (timeRangeBuilder_ == null) { - return timeRange_; - } else { - return timeRangeBuilder_.getMessage(); - } - } - public Builder setTimeRange(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange value) { - if (timeRangeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - timeRange_ = value; - onChanged(); - } else { - timeRangeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - return this; - } - public Builder setTimeRange( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.Builder builderForValue) { - if (timeRangeBuilder_ == null) { - timeRange_ = builderForValue.build(); - onChanged(); - } else { - timeRangeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - return this; - } - public Builder mergeTimeRange(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange value) { - if (timeRangeBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008) && - timeRange_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.getDefaultInstance()) { - timeRange_ = - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.newBuilder(timeRange_).mergeFrom(value).buildPartial(); - } else { - timeRange_ = value; - } - onChanged(); - } else { - timeRangeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000008; - return this; - } - public Builder clearTimeRange() { - if (timeRangeBuilder_ == null) { - timeRange_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.getDefaultInstance(); - onChanged(); - } else { - timeRangeBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - return this; - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.Builder getTimeRangeBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getTimeRangeFieldBuilder().getBuilder(); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRangeOrBuilder getTimeRangeOrBuilder() { - if (timeRangeBuilder_ != null) { - return timeRangeBuilder_.getMessageOrBuilder(); - } else { - return timeRange_; - } - } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRangeOrBuilder> - getTimeRangeFieldBuilder() { - if (timeRangeBuilder_ == null) { - timeRangeBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRangeOrBuilder>( - timeRange_, - getParentForChildren(), - isClean()); - timeRange_ = null; - } - return timeRangeBuilder_; - } - - // optional int32 max_versions = 5; - private int maxVersions_ ; - public boolean hasMaxVersions() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - public int getMaxVersions() { - return maxVersions_; - } - public Builder setMaxVersions(int value) { - bitField0_ |= 0x00000010; - maxVersions_ = value; - onChanged(); - return this; - } - public Builder clearMaxVersions() { - bitField0_ = (bitField0_ & ~0x00000010); - maxVersions_ = 0; - onChanged(); - return this; - } - - // optional int32 limit = 6; - private int limit_ ; - public boolean hasLimit() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - public int getLimit() { - return limit_; - } - public Builder setLimit(int value) { - bitField0_ |= 0x00000020; - limit_ = value; - onChanged(); - return this; - } - public Builder clearLimit() { - bitField0_ = (bitField0_ & ~0x00000020); - limit_ = 0; - onChanged(); - return this; - } - - // required bytes inclusive_start_primary_key = 7; - private com.google.protobuf.ByteString inclusiveStartPrimaryKey_ = com.google.protobuf.ByteString.EMPTY; - public boolean hasInclusiveStartPrimaryKey() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - public com.google.protobuf.ByteString getInclusiveStartPrimaryKey() { - return inclusiveStartPrimaryKey_; - } - public Builder setInclusiveStartPrimaryKey(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000040; - inclusiveStartPrimaryKey_ = value; - onChanged(); - return this; - } - public Builder clearInclusiveStartPrimaryKey() { - bitField0_ = (bitField0_ & ~0x00000040); - inclusiveStartPrimaryKey_ = getDefaultInstance().getInclusiveStartPrimaryKey(); - onChanged(); - return this; - } - - // required bytes exclusive_end_primary_key = 8; - private com.google.protobuf.ByteString exclusiveEndPrimaryKey_ = com.google.protobuf.ByteString.EMPTY; - public boolean hasExclusiveEndPrimaryKey() { - return ((bitField0_ & 0x00000080) == 0x00000080); - } - public com.google.protobuf.ByteString getExclusiveEndPrimaryKey() { - return exclusiveEndPrimaryKey_; - } - public Builder setExclusiveEndPrimaryKey(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000080; - exclusiveEndPrimaryKey_ = value; - onChanged(); - return this; - } - public Builder clearExclusiveEndPrimaryKey() { - bitField0_ = (bitField0_ & ~0x00000080); - exclusiveEndPrimaryKey_ = getDefaultInstance().getExclusiveEndPrimaryKey(); - onChanged(); - return this; + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + streamId_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + inclusiveStartShardId_ = input.readBytes(); + break; + } + case 24: { + bitField0_ |= 0x00000004; + shardLimit_ = input.readInt32(); + break; + } + } + } } - // optional bytes filter = 10; - private com.google.protobuf.ByteString filter_ = com.google.protobuf.ByteString.EMPTY; - public boolean hasFilter() { - return ((bitField0_ & 0x00000100) == 0x00000100); - } - public com.google.protobuf.ByteString getFilter() { - return filter_; - } - public Builder setFilter(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000100; - filter_ = value; - onChanged(); - return this; - } - public Builder clearFilter() { - bitField0_ = (bitField0_ & ~0x00000100); - filter_ = getDefaultInstance().getFilter(); - onChanged(); - return this; - } + private int bitField0_; - // optional string start_column = 11; - private java.lang.Object startColumn_ = ""; - public boolean hasStartColumn() { - return ((bitField0_ & 0x00000200) == 0x00000200); + // required string stream_id = 1; + private java.lang.Object streamId_ = ""; + public boolean hasStreamId() { + return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getStartColumn() { - java.lang.Object ref = startColumn_; + public String getStreamId() { + java.lang.Object ref = streamId_; if (!(ref instanceof String)) { String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - startColumn_ = s; + streamId_ = s; return s; } else { return (String) ref; } } - public Builder setStartColumn(String value) { + public Builder setStreamId(String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000200; - startColumn_ = value; + bitField0_ |= 0x00000001; + streamId_ = value; onChanged(); return this; } - public Builder clearStartColumn() { - bitField0_ = (bitField0_ & ~0x00000200); - startColumn_ = getDefaultInstance().getStartColumn(); + public Builder clearStreamId() { + bitField0_ = (bitField0_ & ~0x00000001); + streamId_ = getDefaultInstance().getStreamId(); onChanged(); return this; } - void setStartColumn(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000200; - startColumn_ = value; + void setStreamId(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + streamId_ = value; onChanged(); } - // optional string end_column = 12; - private java.lang.Object endColumn_ = ""; - public boolean hasEndColumn() { - return ((bitField0_ & 0x00000400) == 0x00000400); + // optional string inclusive_start_shard_id = 2; + private java.lang.Object inclusiveStartShardId_ = ""; + public boolean hasInclusiveStartShardId() { + return ((bitField0_ & 0x00000002) == 0x00000002); } - public String getEndColumn() { - java.lang.Object ref = endColumn_; + public String getInclusiveStartShardId() { + java.lang.Object ref = inclusiveStartShardId_; if (!(ref instanceof String)) { String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - endColumn_ = s; + inclusiveStartShardId_ = s; return s; } else { return (String) ref; } } - public Builder setEndColumn(String value) { + public Builder setInclusiveStartShardId(String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000400; - endColumn_ = value; - onChanged(); - return this; - } - public Builder clearEndColumn() { - bitField0_ = (bitField0_ & ~0x00000400); - endColumn_ = getDefaultInstance().getEndColumn(); + bitField0_ |= 0x00000002; + inclusiveStartShardId_ = value; onChanged(); return this; } - void setEndColumn(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000400; - endColumn_ = value; - onChanged(); - } - - // optional bytes token = 13; - private com.google.protobuf.ByteString token_ = com.google.protobuf.ByteString.EMPTY; - public boolean hasToken() { - return ((bitField0_ & 0x00000800) == 0x00000800); - } - public com.google.protobuf.ByteString getToken() { - return token_; - } - public Builder setToken(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000800; - token_ = value; + public Builder clearInclusiveStartShardId() { + bitField0_ = (bitField0_ & ~0x00000002); + inclusiveStartShardId_ = getDefaultInstance().getInclusiveStartShardId(); onChanged(); return this; } - public Builder clearToken() { - bitField0_ = (bitField0_ & ~0x00000800); - token_ = getDefaultInstance().getToken(); + void setInclusiveStartShardId(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000002; + inclusiveStartShardId_ = value; onChanged(); - return this; } - // optional string transaction_id = 14; - private java.lang.Object transactionId_ = ""; - public boolean hasTransactionId() { - return ((bitField0_ & 0x00001000) == 0x00001000); + // optional int32 shard_limit = 3; + private int shardLimit_ ; + public boolean hasShardLimit() { + return ((bitField0_ & 0x00000004) == 0x00000004); } - public String getTransactionId() { - java.lang.Object ref = transactionId_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - transactionId_ = s; - return s; - } else { - return (String) ref; - } + public int getShardLimit() { + return shardLimit_; } - public Builder setTransactionId(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00001000; - transactionId_ = value; + public Builder setShardLimit(int value) { + bitField0_ |= 0x00000004; + shardLimit_ = value; onChanged(); return this; } - public Builder clearTransactionId() { - bitField0_ = (bitField0_ & ~0x00001000); - transactionId_ = getDefaultInstance().getTransactionId(); + public Builder clearShardLimit() { + bitField0_ = (bitField0_ & ~0x00000004); + shardLimit_ = 0; onChanged(); return this; } - void setTransactionId(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00001000; - transactionId_ = value; - onChanged(); - } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GetRangeRequest) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.DescribeStreamRequest) } static { - defaultInstance = new GetRangeRequest(true); + defaultInstance = new DescribeStreamRequest(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GetRangeRequest) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.DescribeStreamRequest) } - public interface GetRangeResponseOrBuilder + public interface DescribeStreamResponseOrBuilder extends com.google.protobuf.MessageOrBuilder { - // required .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 1; - boolean hasConsumed(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder(); + // required string stream_id = 1; + boolean hasStreamId(); + String getStreamId(); - // required bytes rows = 2; - boolean hasRows(); - com.google.protobuf.ByteString getRows(); + // required int32 expiration_time = 2; + boolean hasExpirationTime(); + int getExpirationTime(); - // optional bytes next_start_primary_key = 3; - boolean hasNextStartPrimaryKey(); - com.google.protobuf.ByteString getNextStartPrimaryKey(); + // required string table_name = 3; + boolean hasTableName(); + String getTableName(); - // optional bytes next_token = 4; - boolean hasNextToken(); - com.google.protobuf.ByteString getNextToken(); + // required int64 creation_time = 4; + boolean hasCreationTime(); + long getCreationTime(); + + // required .com.alicloud.openservices.tablestore.core.protocol.StreamStatus stream_status = 5; + boolean hasStreamStatus(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamStatus getStreamStatus(); + + // repeated .com.alicloud.openservices.tablestore.core.protocol.StreamShard shards = 6; + java.util.List + getShardsList(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard getShards(int index); + int getShardsCount(); + java.util.List + getShardsOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShardOrBuilder getShardsOrBuilder( + int index); + + // optional string next_shard_id = 7; + boolean hasNextShardId(); + String getNextShardId(); } - public static final class GetRangeResponse extends + public static final class DescribeStreamResponse extends com.google.protobuf.GeneratedMessage - implements GetRangeResponseOrBuilder { - // Use GetRangeResponse.newBuilder() to construct. - private GetRangeResponse(Builder builder) { + implements DescribeStreamResponseOrBuilder { + // Use DescribeStreamResponse.newBuilder() to construct. + private DescribeStreamResponse(Builder builder) { super(builder); } - private GetRangeResponse(boolean noInit) {} + private DescribeStreamResponse(boolean noInit) {} - private static final GetRangeResponse defaultInstance; - public static GetRangeResponse getDefaultInstance() { + private static final DescribeStreamResponse defaultInstance; + public static DescribeStreamResponse getDefaultInstance() { return defaultInstance; } - public GetRangeResponse getDefaultInstanceForType() { + public DescribeStreamResponse getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetRangeResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeStreamResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetRangeResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeStreamResponse_fieldAccessorTable; } private int bitField0_; - // required .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 1; - public static final int CONSUMED_FIELD_NUMBER = 1; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity consumed_; - public boolean hasConsumed() { + // required string stream_id = 1; + public static final int STREAM_ID_FIELD_NUMBER = 1; + private java.lang.Object streamId_; + public boolean hasStreamId() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed() { - return consumed_; + public String getStreamId() { + java.lang.Object ref = streamId_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + streamId_ = s; + } + return s; + } } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder() { - return consumed_; + private com.google.protobuf.ByteString getStreamIdBytes() { + java.lang.Object ref = streamId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + streamId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - // required bytes rows = 2; - public static final int ROWS_FIELD_NUMBER = 2; - private com.google.protobuf.ByteString rows_; - public boolean hasRows() { + // required int32 expiration_time = 2; + public static final int EXPIRATION_TIME_FIELD_NUMBER = 2; + private int expirationTime_; + public boolean hasExpirationTime() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public com.google.protobuf.ByteString getRows() { - return rows_; + public int getExpirationTime() { + return expirationTime_; } - // optional bytes next_start_primary_key = 3; - public static final int NEXT_START_PRIMARY_KEY_FIELD_NUMBER = 3; - private com.google.protobuf.ByteString nextStartPrimaryKey_; - public boolean hasNextStartPrimaryKey() { + // required string table_name = 3; + public static final int TABLE_NAME_FIELD_NUMBER = 3; + private java.lang.Object tableName_; + public boolean hasTableName() { return ((bitField0_ & 0x00000004) == 0x00000004); } - public com.google.protobuf.ByteString getNextStartPrimaryKey() { - return nextStartPrimaryKey_; + public String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + tableName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - // optional bytes next_token = 4; - public static final int NEXT_TOKEN_FIELD_NUMBER = 4; - private com.google.protobuf.ByteString nextToken_; - public boolean hasNextToken() { + // required int64 creation_time = 4; + public static final int CREATION_TIME_FIELD_NUMBER = 4; + private long creationTime_; + public boolean hasCreationTime() { return ((bitField0_ & 0x00000008) == 0x00000008); } - public com.google.protobuf.ByteString getNextToken() { - return nextToken_; + public long getCreationTime() { + return creationTime_; + } + + // required .com.alicloud.openservices.tablestore.core.protocol.StreamStatus stream_status = 5; + public static final int STREAM_STATUS_FIELD_NUMBER = 5; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamStatus streamStatus_; + public boolean hasStreamStatus() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamStatus getStreamStatus() { + return streamStatus_; + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.StreamShard shards = 6; + public static final int SHARDS_FIELD_NUMBER = 6; + private java.util.List shards_; + public java.util.List getShardsList() { + return shards_; + } + public java.util.List + getShardsOrBuilderList() { + return shards_; + } + public int getShardsCount() { + return shards_.size(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard getShards(int index) { + return shards_.get(index); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShardOrBuilder getShardsOrBuilder( + int index) { + return shards_.get(index); + } + + // optional string next_shard_id = 7; + public static final int NEXT_SHARD_ID_FIELD_NUMBER = 7; + private java.lang.Object nextShardId_; + public boolean hasNextShardId() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + public String getNextShardId() { + java.lang.Object ref = nextShardId_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + nextShardId_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getNextShardIdBytes() { + java.lang.Object ref = nextShardId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + nextShardId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } private void initFields() { - consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); - rows_ = com.google.protobuf.ByteString.EMPTY; - nextStartPrimaryKey_ = com.google.protobuf.ByteString.EMPTY; - nextToken_ = com.google.protobuf.ByteString.EMPTY; + streamId_ = ""; + expirationTime_ = 0; + tableName_ = ""; + creationTime_ = 0L; + streamStatus_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamStatus.STREAM_ENABLING; + shards_ = java.util.Collections.emptyList(); + nextShardId_ = ""; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - if (!hasConsumed()) { + if (!hasStreamId()) { memoizedIsInitialized = 0; return false; } - if (!hasRows()) { + if (!hasExpirationTime()) { memoizedIsInitialized = 0; return false; } - if (!getConsumed().isInitialized()) { + if (!hasTableName()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasCreationTime()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasStreamStatus()) { memoizedIsInitialized = 0; return false; } + for (int i = 0; i < getShardsCount(); i++) { + if (!getShards(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } memoizedIsInitialized = 1; return true; } @@ -32475,16 +42830,25 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeMessage(1, consumed_); + output.writeBytes(1, getStreamIdBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, rows_); + output.writeInt32(2, expirationTime_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeBytes(3, nextStartPrimaryKey_); + output.writeBytes(3, getTableNameBytes()); } if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeBytes(4, nextToken_); + output.writeInt64(4, creationTime_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeEnum(5, streamStatus_.getNumber()); + } + for (int i = 0; i < shards_.size(); i++) { + output.writeMessage(6, shards_.get(i)); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeBytes(7, getNextShardIdBytes()); } getUnknownFields().writeTo(output); } @@ -32497,19 +42861,31 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, consumed_); + .computeBytesSize(1, getStreamIdBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, rows_); + .computeInt32Size(2, expirationTime_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(3, nextStartPrimaryKey_); + .computeBytesSize(3, getTableNameBytes()); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(4, nextToken_); + .computeInt64Size(4, creationTime_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(5, streamStatus_.getNumber()); + } + for (int i = 0; i < shards_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, shards_.get(i)); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(7, getNextShardIdBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -32523,41 +42899,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -32566,7 +42942,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -32577,12 +42953,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -32592,7 +42968,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -32605,18 +42981,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponseOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetRangeResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeStreamResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetRangeResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeStreamResponse_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -32627,7 +43003,7 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getConsumedFieldBuilder(); + getShardsFieldBuilder(); } } private static Builder create() { @@ -32636,18 +43012,24 @@ private static Builder create() { public Builder clear() { super.clear(); - if (consumedBuilder_ == null) { - consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); - } else { - consumedBuilder_.clear(); - } + streamId_ = ""; bitField0_ = (bitField0_ & ~0x00000001); - rows_ = com.google.protobuf.ByteString.EMPTY; + expirationTime_ = 0; bitField0_ = (bitField0_ & ~0x00000002); - nextStartPrimaryKey_ = com.google.protobuf.ByteString.EMPTY; + tableName_ = ""; bitField0_ = (bitField0_ & ~0x00000004); - nextToken_ = com.google.protobuf.ByteString.EMPTY; + creationTime_ = 0L; bitField0_ = (bitField0_ & ~0x00000008); + streamStatus_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamStatus.STREAM_ENABLING; + bitField0_ = (bitField0_ & ~0x00000010); + if (shardsBuilder_ == null) { + shards_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + } else { + shardsBuilder_.clear(); + } + nextShardId_ = ""; + bitField0_ = (bitField0_ & ~0x00000040); return this; } @@ -32657,24 +43039,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -32682,75 +43064,134 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRan return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse(this); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - if (consumedBuilder_ == null) { - result.consumed_ = consumed_; - } else { - result.consumed_ = consumedBuilder_.build(); - } + result.streamId_ = streamId_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - result.rows_ = rows_; + result.expirationTime_ = expirationTime_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } - result.nextStartPrimaryKey_ = nextStartPrimaryKey_; + result.tableName_ = tableName_; if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; } - result.nextToken_ = nextToken_; + result.creationTime_ = creationTime_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + result.streamStatus_ = streamStatus_; + if (shardsBuilder_ == null) { + if (((bitField0_ & 0x00000020) == 0x00000020)) { + shards_ = java.util.Collections.unmodifiableList(shards_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.shards_ = shards_; + } else { + result.shards_ = shardsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) == 0x00000040)) { + to_bitField0_ |= 0x00000020; + } + result.nextShardId_ = nextShardId_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse.getDefaultInstance()) return this; - if (other.hasConsumed()) { - mergeConsumed(other.getConsumed()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse.getDefaultInstance()) return this; + if (other.hasStreamId()) { + setStreamId(other.getStreamId()); } - if (other.hasRows()) { - setRows(other.getRows()); + if (other.hasExpirationTime()) { + setExpirationTime(other.getExpirationTime()); } - if (other.hasNextStartPrimaryKey()) { - setNextStartPrimaryKey(other.getNextStartPrimaryKey()); + if (other.hasTableName()) { + setTableName(other.getTableName()); } - if (other.hasNextToken()) { - setNextToken(other.getNextToken()); + if (other.hasCreationTime()) { + setCreationTime(other.getCreationTime()); + } + if (other.hasStreamStatus()) { + setStreamStatus(other.getStreamStatus()); + } + if (shardsBuilder_ == null) { + if (!other.shards_.isEmpty()) { + if (shards_.isEmpty()) { + shards_ = other.shards_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureShardsIsMutable(); + shards_.addAll(other.shards_); + } + onChanged(); + } + } else { + if (!other.shards_.isEmpty()) { + if (shardsBuilder_.isEmpty()) { + shardsBuilder_.dispose(); + shardsBuilder_ = null; + shards_ = other.shards_; + bitField0_ = (bitField0_ & ~0x00000020); + shardsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getShardsFieldBuilder() : null; + } else { + shardsBuilder_.addAllMessages(other.shards_); + } + } + } + if (other.hasNextShardId()) { + setNextShardId(other.getNextShardId()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { - if (!hasConsumed()) { + if (!hasStreamId()) { return false; } - if (!hasRows()) { + if (!hasExpirationTime()) { return false; } - if (!getConsumed().isInitialized()) { + if (!hasTableName()) { + + return false; + } + if (!hasCreationTime()) { + + return false; + } + if (!hasStreamStatus()) { return false; } + for (int i = 0; i < getShardsCount(); i++) { + if (!getShards(i).isInitialized()) { + + return false; + } + } return true; } @@ -32778,27 +43219,45 @@ public Builder mergeFrom( break; } case 10: { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.newBuilder(); - if (hasConsumed()) { - subBuilder.mergeFrom(getConsumed()); - } - input.readMessage(subBuilder, extensionRegistry); - setConsumed(subBuilder.buildPartial()); + bitField0_ |= 0x00000001; + streamId_ = input.readBytes(); break; } - case 18: { + case 16: { bitField0_ |= 0x00000002; - rows_ = input.readBytes(); + expirationTime_ = input.readInt32(); break; } case 26: { bitField0_ |= 0x00000004; - nextStartPrimaryKey_ = input.readBytes(); + tableName_ = input.readBytes(); break; } - case 34: { + case 32: { bitField0_ |= 0x00000008; - nextToken_ = input.readBytes(); + creationTime_ = input.readInt64(); + break; + } + case 40: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamStatus value = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamStatus.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(5, rawValue); + } else { + bitField0_ |= 0x00000010; + streamStatus_ = value; + } + break; + } + case 50: { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addShards(subBuilder.buildPartial()); + break; + } + case 58: { + bitField0_ |= 0x00000040; + nextShardId_ = input.readBytes(); break; } } @@ -32807,227 +43266,433 @@ public Builder mergeFrom( private int bitField0_; - // required .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 1; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder> consumedBuilder_; - public boolean hasConsumed() { + // required string stream_id = 1; + private java.lang.Object streamId_ = ""; + public boolean hasStreamId() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed() { - if (consumedBuilder_ == null) { - return consumed_; + public String getStreamId() { + java.lang.Object ref = streamId_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + streamId_ = s; + return s; } else { - return consumedBuilder_.getMessage(); + return (String) ref; } } - public Builder setConsumed(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity value) { - if (consumedBuilder_ == null) { + public Builder setStreamId(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + streamId_ = value; + onChanged(); + return this; + } + public Builder clearStreamId() { + bitField0_ = (bitField0_ & ~0x00000001); + streamId_ = getDefaultInstance().getStreamId(); + onChanged(); + return this; + } + void setStreamId(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + streamId_ = value; + onChanged(); + } + + // required int32 expiration_time = 2; + private int expirationTime_ ; + public boolean hasExpirationTime() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public int getExpirationTime() { + return expirationTime_; + } + public Builder setExpirationTime(int value) { + bitField0_ |= 0x00000002; + expirationTime_ = value; + onChanged(); + return this; + } + public Builder clearExpirationTime() { + bitField0_ = (bitField0_ & ~0x00000002); + expirationTime_ = 0; + onChanged(); + return this; + } + + // required string table_name = 3; + private java.lang.Object tableName_ = ""; + public boolean hasTableName() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + tableName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setTableName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + tableName_ = value; + onChanged(); + return this; + } + public Builder clearTableName() { + bitField0_ = (bitField0_ & ~0x00000004); + tableName_ = getDefaultInstance().getTableName(); + onChanged(); + return this; + } + void setTableName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000004; + tableName_ = value; + onChanged(); + } + + // required int64 creation_time = 4; + private long creationTime_ ; + public boolean hasCreationTime() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public long getCreationTime() { + return creationTime_; + } + public Builder setCreationTime(long value) { + bitField0_ |= 0x00000008; + creationTime_ = value; + onChanged(); + return this; + } + public Builder clearCreationTime() { + bitField0_ = (bitField0_ & ~0x00000008); + creationTime_ = 0L; + onChanged(); + return this; + } + + // required .com.alicloud.openservices.tablestore.core.protocol.StreamStatus stream_status = 5; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamStatus streamStatus_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamStatus.STREAM_ENABLING; + public boolean hasStreamStatus() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamStatus getStreamStatus() { + return streamStatus_; + } + public Builder setStreamStatus(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamStatus value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + streamStatus_ = value; + onChanged(); + return this; + } + public Builder clearStreamStatus() { + bitField0_ = (bitField0_ & ~0x00000010); + streamStatus_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamStatus.STREAM_ENABLING; + onChanged(); + return this; + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.StreamShard shards = 6; + private java.util.List shards_ = + java.util.Collections.emptyList(); + private void ensureShardsIsMutable() { + if (!((bitField0_ & 0x00000020) == 0x00000020)) { + shards_ = new java.util.ArrayList(shards_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShardOrBuilder> shardsBuilder_; + + public java.util.List getShardsList() { + if (shardsBuilder_ == null) { + return java.util.Collections.unmodifiableList(shards_); + } else { + return shardsBuilder_.getMessageList(); + } + } + public int getShardsCount() { + if (shardsBuilder_ == null) { + return shards_.size(); + } else { + return shardsBuilder_.getCount(); + } + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard getShards(int index) { + if (shardsBuilder_ == null) { + return shards_.get(index); + } else { + return shardsBuilder_.getMessage(index); + } + } + public Builder setShards( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard value) { + if (shardsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - consumed_ = value; + ensureShardsIsMutable(); + shards_.set(index, value); onChanged(); } else { - consumedBuilder_.setMessage(value); + shardsBuilder_.setMessage(index, value); } - bitField0_ |= 0x00000001; return this; } - public Builder setConsumed( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder builderForValue) { - if (consumedBuilder_ == null) { - consumed_ = builderForValue.build(); + public Builder setShards( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard.Builder builderForValue) { + if (shardsBuilder_ == null) { + ensureShardsIsMutable(); + shards_.set(index, builderForValue.build()); onChanged(); } else { - consumedBuilder_.setMessage(builderForValue.build()); + shardsBuilder_.setMessage(index, builderForValue.build()); } - bitField0_ |= 0x00000001; return this; } - public Builder mergeConsumed(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity value) { - if (consumedBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001) && - consumed_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance()) { - consumed_ = - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.newBuilder(consumed_).mergeFrom(value).buildPartial(); - } else { - consumed_ = value; + public Builder addShards(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard value) { + if (shardsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } + ensureShardsIsMutable(); + shards_.add(value); onChanged(); } else { - consumedBuilder_.mergeFrom(value); + shardsBuilder_.addMessage(value); } - bitField0_ |= 0x00000001; return this; } - public Builder clearConsumed() { - if (consumedBuilder_ == null) { - consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); + public Builder addShards( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard value) { + if (shardsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureShardsIsMutable(); + shards_.add(index, value); onChanged(); } else { - consumedBuilder_.clear(); + shardsBuilder_.addMessage(index, value); } - bitField0_ = (bitField0_ & ~0x00000001); return this; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder getConsumedBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getConsumedFieldBuilder().getBuilder(); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder() { - if (consumedBuilder_ != null) { - return consumedBuilder_.getMessageOrBuilder(); + public Builder addShards( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard.Builder builderForValue) { + if (shardsBuilder_ == null) { + ensureShardsIsMutable(); + shards_.add(builderForValue.build()); + onChanged(); } else { - return consumed_; + shardsBuilder_.addMessage(builderForValue.build()); } + return this; } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder> - getConsumedFieldBuilder() { - if (consumedBuilder_ == null) { - consumedBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder>( - consumed_, - getParentForChildren(), - isClean()); - consumed_ = null; + public Builder addShards( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard.Builder builderForValue) { + if (shardsBuilder_ == null) { + ensureShardsIsMutable(); + shards_.add(index, builderForValue.build()); + onChanged(); + } else { + shardsBuilder_.addMessage(index, builderForValue.build()); } - return consumedBuilder_; - } - - // required bytes rows = 2; - private com.google.protobuf.ByteString rows_ = com.google.protobuf.ByteString.EMPTY; - public boolean hasRows() { - return ((bitField0_ & 0x00000002) == 0x00000002); + return this; } - public com.google.protobuf.ByteString getRows() { - return rows_; + public Builder addAllShards( + java.lang.Iterable values) { + if (shardsBuilder_ == null) { + ensureShardsIsMutable(); + super.addAll(values, shards_); + onChanged(); + } else { + shardsBuilder_.addAllMessages(values); + } + return this; } - public Builder setRows(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - rows_ = value; - onChanged(); + public Builder clearShards() { + if (shardsBuilder_ == null) { + shards_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + shardsBuilder_.clear(); + } return this; } - public Builder clearRows() { - bitField0_ = (bitField0_ & ~0x00000002); - rows_ = getDefaultInstance().getRows(); - onChanged(); + public Builder removeShards(int index) { + if (shardsBuilder_ == null) { + ensureShardsIsMutable(); + shards_.remove(index); + onChanged(); + } else { + shardsBuilder_.remove(index); + } return this; } - - // optional bytes next_start_primary_key = 3; - private com.google.protobuf.ByteString nextStartPrimaryKey_ = com.google.protobuf.ByteString.EMPTY; - public boolean hasNextStartPrimaryKey() { - return ((bitField0_ & 0x00000004) == 0x00000004); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard.Builder getShardsBuilder( + int index) { + return getShardsFieldBuilder().getBuilder(index); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShardOrBuilder getShardsOrBuilder( + int index) { + if (shardsBuilder_ == null) { + return shards_.get(index); } else { + return shardsBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getShardsOrBuilderList() { + if (shardsBuilder_ != null) { + return shardsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(shards_); + } + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard.Builder addShardsBuilder() { + return getShardsFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard.getDefaultInstance()); } - public com.google.protobuf.ByteString getNextStartPrimaryKey() { - return nextStartPrimaryKey_; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard.Builder addShardsBuilder( + int index) { + return getShardsFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard.getDefaultInstance()); } - public Builder setNextStartPrimaryKey(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - nextStartPrimaryKey_ = value; - onChanged(); - return this; + public java.util.List + getShardsBuilderList() { + return getShardsFieldBuilder().getBuilderList(); } - public Builder clearNextStartPrimaryKey() { - bitField0_ = (bitField0_ & ~0x00000004); - nextStartPrimaryKey_ = getDefaultInstance().getNextStartPrimaryKey(); - onChanged(); - return this; + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShardOrBuilder> + getShardsFieldBuilder() { + if (shardsBuilder_ == null) { + shardsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShardOrBuilder>( + shards_, + ((bitField0_ & 0x00000020) == 0x00000020), + getParentForChildren(), + isClean()); + shards_ = null; + } + return shardsBuilder_; } - // optional bytes next_token = 4; - private com.google.protobuf.ByteString nextToken_ = com.google.protobuf.ByteString.EMPTY; - public boolean hasNextToken() { - return ((bitField0_ & 0x00000008) == 0x00000008); + // optional string next_shard_id = 7; + private java.lang.Object nextShardId_ = ""; + public boolean hasNextShardId() { + return ((bitField0_ & 0x00000040) == 0x00000040); } - public com.google.protobuf.ByteString getNextToken() { - return nextToken_; + public String getNextShardId() { + java.lang.Object ref = nextShardId_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + nextShardId_ = s; + return s; + } else { + return (String) ref; + } } - public Builder setNextToken(com.google.protobuf.ByteString value) { + public Builder setNextShardId(String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000008; - nextToken_ = value; + bitField0_ |= 0x00000040; + nextShardId_ = value; onChanged(); return this; } - public Builder clearNextToken() { - bitField0_ = (bitField0_ & ~0x00000008); - nextToken_ = getDefaultInstance().getNextToken(); + public Builder clearNextShardId() { + bitField0_ = (bitField0_ & ~0x00000040); + nextShardId_ = getDefaultInstance().getNextShardId(); onChanged(); return this; } + void setNextShardId(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000040; + nextShardId_ = value; + onChanged(); + } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GetRangeResponse) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.DescribeStreamResponse) } static { - defaultInstance = new GetRangeResponse(true); + defaultInstance = new DescribeStreamResponse(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GetRangeResponse) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.DescribeStreamResponse) } - public interface StartLocalTransactionRequestOrBuilder + public interface GetShardIteratorRequestOrBuilder extends com.google.protobuf.MessageOrBuilder { - // required string table_name = 1; - boolean hasTableName(); - String getTableName(); + // required string stream_id = 1; + boolean hasStreamId(); + String getStreamId(); - // required bytes key = 2; - boolean hasKey(); - com.google.protobuf.ByteString getKey(); + // required string shard_id = 2; + boolean hasShardId(); + String getShardId(); + + // optional int64 timestamp = 3; + boolean hasTimestamp(); + long getTimestamp(); + + // optional string token = 4; + boolean hasToken(); + String getToken(); } - public static final class StartLocalTransactionRequest extends + public static final class GetShardIteratorRequest extends com.google.protobuf.GeneratedMessage - implements StartLocalTransactionRequestOrBuilder { - // Use StartLocalTransactionRequest.newBuilder() to construct. - private StartLocalTransactionRequest(Builder builder) { + implements GetShardIteratorRequestOrBuilder { + // Use GetShardIteratorRequest.newBuilder() to construct. + private GetShardIteratorRequest(Builder builder) { super(builder); } - private StartLocalTransactionRequest(boolean noInit) {} + private GetShardIteratorRequest(boolean noInit) {} - private static final StartLocalTransactionRequest defaultInstance; - public static StartLocalTransactionRequest getDefaultInstance() { + private static final GetShardIteratorRequest defaultInstance; + public static GetShardIteratorRequest getDefaultInstance() { return defaultInstance; } - public StartLocalTransactionRequest getDefaultInstanceForType() { + public GetShardIteratorRequest getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_StartLocalTransactionRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetShardIteratorRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_StartLocalTransactionRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetShardIteratorRequest_fieldAccessorTable; } private int bitField0_; - // required string table_name = 1; - public static final int TABLE_NAME_FIELD_NUMBER = 1; - private java.lang.Object tableName_; - public boolean hasTableName() { + // required string stream_id = 1; + public static final int STREAM_ID_FIELD_NUMBER = 1; + private java.lang.Object streamId_; + public boolean hasStreamId() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getTableName() { - java.lang.Object ref = tableName_; + public String getStreamId() { + java.lang.Object ref = streamId_; if (ref instanceof String) { return (String) ref; } else { @@ -33035,47 +43700,113 @@ public String getTableName() { (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); if (com.google.protobuf.Internal.isValidUtf8(bs)) { - tableName_ = s; + streamId_ = s; } return s; } } - private com.google.protobuf.ByteString getTableNameBytes() { - java.lang.Object ref = tableName_; + private com.google.protobuf.ByteString getStreamIdBytes() { + java.lang.Object ref = streamId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((String) ref); - tableName_ = b; + streamId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - // required bytes key = 2; - public static final int KEY_FIELD_NUMBER = 2; - private com.google.protobuf.ByteString key_; - public boolean hasKey() { + // required string shard_id = 2; + public static final int SHARD_ID_FIELD_NUMBER = 2; + private java.lang.Object shardId_; + public boolean hasShardId() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public com.google.protobuf.ByteString getKey() { - return key_; + public String getShardId() { + java.lang.Object ref = shardId_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + shardId_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getShardIdBytes() { + java.lang.Object ref = shardId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + shardId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional int64 timestamp = 3; + public static final int TIMESTAMP_FIELD_NUMBER = 3; + private long timestamp_; + public boolean hasTimestamp() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public long getTimestamp() { + return timestamp_; + } + + // optional string token = 4; + public static final int TOKEN_FIELD_NUMBER = 4; + private java.lang.Object token_; + public boolean hasToken() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public String getToken() { + java.lang.Object ref = token_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + token_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTokenBytes() { + java.lang.Object ref = token_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + token_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } private void initFields() { - tableName_ = ""; - key_ = com.google.protobuf.ByteString.EMPTY; + streamId_ = ""; + shardId_ = ""; + timestamp_ = 0L; + token_ = ""; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - if (!hasTableName()) { + if (!hasStreamId()) { memoizedIsInitialized = 0; return false; } - if (!hasKey()) { + if (!hasShardId()) { memoizedIsInitialized = 0; return false; } @@ -33087,10 +43818,16 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getTableNameBytes()); + output.writeBytes(1, getStreamIdBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, key_); + output.writeBytes(2, getShardIdBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeInt64(3, timestamp_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeBytes(4, getTokenBytes()); } getUnknownFields().writeTo(output); } @@ -33103,11 +43840,19 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getTableNameBytes()); + .computeBytesSize(1, getStreamIdBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, key_); + .computeBytesSize(2, getShardIdBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, timestamp_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(4, getTokenBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -33121,41 +43866,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -33164,7 +43909,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -33175,12 +43920,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -33190,7 +43935,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -33203,18 +43948,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequestOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_StartLocalTransactionRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetShardIteratorRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_StartLocalTransactionRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetShardIteratorRequest_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -33233,10 +43978,14 @@ private static Builder create() { public Builder clear() { super.clear(); - tableName_ = ""; + streamId_ = ""; bitField0_ = (bitField0_ & ~0x00000001); - key_ = com.google.protobuf.ByteString.EMPTY; + shardId_ = ""; bitField0_ = (bitField0_ & ~0x00000002); + timestamp_ = 0L; + bitField0_ = (bitField0_ & ~0x00000004); + token_ = ""; + bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -33246,24 +43995,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -33271,50 +44020,64 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartL return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest(this); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.tableName_ = tableName_; + result.streamId_ = streamId_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - result.key_ = key_; + result.shardId_ = shardId_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.timestamp_ = timestamp_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.token_ = token_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest.getDefaultInstance()) return this; - if (other.hasTableName()) { - setTableName(other.getTableName()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest.getDefaultInstance()) return this; + if (other.hasStreamId()) { + setStreamId(other.getStreamId()); } - if (other.hasKey()) { - setKey(other.getKey()); + if (other.hasShardId()) { + setShardId(other.getShardId()); + } + if (other.hasTimestamp()) { + setTimestamp(other.getTimestamp()); + } + if (other.hasToken()) { + setToken(other.getToken()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { - if (!hasTableName()) { + if (!hasStreamId()) { return false; } - if (!hasKey()) { + if (!hasShardId()) { return false; } @@ -33346,12 +44109,22 @@ public Builder mergeFrom( } case 10: { bitField0_ |= 0x00000001; - tableName_ = input.readBytes(); + streamId_ = input.readBytes(); break; } case 18: { bitField0_ |= 0x00000002; - key_ = input.readBytes(); + shardId_ = input.readBytes(); + break; + } + case 24: { + bitField0_ |= 0x00000004; + timestamp_ = input.readInt64(); + break; + } + case 34: { + bitField0_ |= 0x00000008; + token_ = input.readBytes(); break; } } @@ -33360,121 +44133,194 @@ public Builder mergeFrom( private int bitField0_; - // required string table_name = 1; - private java.lang.Object tableName_ = ""; - public boolean hasTableName() { + // required string stream_id = 1; + private java.lang.Object streamId_ = ""; + public boolean hasStreamId() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getTableName() { - java.lang.Object ref = tableName_; + public String getStreamId() { + java.lang.Object ref = streamId_; if (!(ref instanceof String)) { String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - tableName_ = s; + streamId_ = s; return s; } else { return (String) ref; } } - public Builder setTableName(String value) { + public Builder setStreamId(String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; - tableName_ = value; + streamId_ = value; onChanged(); return this; } - public Builder clearTableName() { + public Builder clearStreamId() { bitField0_ = (bitField0_ & ~0x00000001); - tableName_ = getDefaultInstance().getTableName(); + streamId_ = getDefaultInstance().getStreamId(); onChanged(); return this; } - void setTableName(com.google.protobuf.ByteString value) { + void setStreamId(com.google.protobuf.ByteString value) { bitField0_ |= 0x00000001; - tableName_ = value; + streamId_ = value; onChanged(); } - // required bytes key = 2; - private com.google.protobuf.ByteString key_ = com.google.protobuf.ByteString.EMPTY; - public boolean hasKey() { + // required string shard_id = 2; + private java.lang.Object shardId_ = ""; + public boolean hasShardId() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public com.google.protobuf.ByteString getKey() { - return key_; + public String getShardId() { + java.lang.Object ref = shardId_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + shardId_ = s; + return s; + } else { + return (String) ref; + } } - public Builder setKey(com.google.protobuf.ByteString value) { + public Builder setShardId(String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; - key_ = value; + shardId_ = value; onChanged(); return this; } - public Builder clearKey() { + public Builder clearShardId() { bitField0_ = (bitField0_ & ~0x00000002); - key_ = getDefaultInstance().getKey(); + shardId_ = getDefaultInstance().getShardId(); onChanged(); return this; } + void setShardId(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000002; + shardId_ = value; + onChanged(); + } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.StartLocalTransactionRequest) + // optional int64 timestamp = 3; + private long timestamp_ ; + public boolean hasTimestamp() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public long getTimestamp() { + return timestamp_; + } + public Builder setTimestamp(long value) { + bitField0_ |= 0x00000004; + timestamp_ = value; + onChanged(); + return this; + } + public Builder clearTimestamp() { + bitField0_ = (bitField0_ & ~0x00000004); + timestamp_ = 0L; + onChanged(); + return this; + } + + // optional string token = 4; + private java.lang.Object token_ = ""; + public boolean hasToken() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public String getToken() { + java.lang.Object ref = token_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + token_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setToken(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + token_ = value; + onChanged(); + return this; + } + public Builder clearToken() { + bitField0_ = (bitField0_ & ~0x00000008); + token_ = getDefaultInstance().getToken(); + onChanged(); + return this; + } + void setToken(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000008; + token_ = value; + onChanged(); + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GetShardIteratorRequest) } static { - defaultInstance = new StartLocalTransactionRequest(true); + defaultInstance = new GetShardIteratorRequest(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.StartLocalTransactionRequest) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GetShardIteratorRequest) } - public interface StartLocalTransactionResponseOrBuilder + public interface GetShardIteratorResponseOrBuilder extends com.google.protobuf.MessageOrBuilder { - // required string transaction_id = 1; - boolean hasTransactionId(); - String getTransactionId(); + // required string shard_iterator = 1; + boolean hasShardIterator(); + String getShardIterator(); + + // optional string next_token = 2; + boolean hasNextToken(); + String getNextToken(); } - public static final class StartLocalTransactionResponse extends + public static final class GetShardIteratorResponse extends com.google.protobuf.GeneratedMessage - implements StartLocalTransactionResponseOrBuilder { - // Use StartLocalTransactionResponse.newBuilder() to construct. - private StartLocalTransactionResponse(Builder builder) { + implements GetShardIteratorResponseOrBuilder { + // Use GetShardIteratorResponse.newBuilder() to construct. + private GetShardIteratorResponse(Builder builder) { super(builder); } - private StartLocalTransactionResponse(boolean noInit) {} + private GetShardIteratorResponse(boolean noInit) {} - private static final StartLocalTransactionResponse defaultInstance; - public static StartLocalTransactionResponse getDefaultInstance() { + private static final GetShardIteratorResponse defaultInstance; + public static GetShardIteratorResponse getDefaultInstance() { return defaultInstance; } - public StartLocalTransactionResponse getDefaultInstanceForType() { + public GetShardIteratorResponse getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_StartLocalTransactionResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetShardIteratorResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_StartLocalTransactionResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetShardIteratorResponse_fieldAccessorTable; } private int bitField0_; - // required string transaction_id = 1; - public static final int TRANSACTION_ID_FIELD_NUMBER = 1; - private java.lang.Object transactionId_; - public boolean hasTransactionId() { + // required string shard_iterator = 1; + public static final int SHARD_ITERATOR_FIELD_NUMBER = 1; + private java.lang.Object shardIterator_; + public boolean hasShardIterator() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getTransactionId() { - java.lang.Object ref = transactionId_; + public String getShardIterator() { + java.lang.Object ref = shardIterator_; if (ref instanceof String) { return (String) ref; } else { @@ -33482,17 +44328,49 @@ public String getTransactionId() { (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); if (com.google.protobuf.Internal.isValidUtf8(bs)) { - transactionId_ = s; + shardIterator_ = s; } return s; } } - private com.google.protobuf.ByteString getTransactionIdBytes() { - java.lang.Object ref = transactionId_; + private com.google.protobuf.ByteString getShardIteratorBytes() { + java.lang.Object ref = shardIterator_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((String) ref); - transactionId_ = b; + shardIterator_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional string next_token = 2; + public static final int NEXT_TOKEN_FIELD_NUMBER = 2; + private java.lang.Object nextToken_; + public boolean hasNextToken() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getNextToken() { + java.lang.Object ref = nextToken_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + nextToken_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getNextTokenBytes() { + java.lang.Object ref = nextToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + nextToken_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -33500,14 +44378,15 @@ private com.google.protobuf.ByteString getTransactionIdBytes() { } private void initFields() { - transactionId_ = ""; + shardIterator_ = ""; + nextToken_ = ""; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - if (!hasTransactionId()) { + if (!hasShardIterator()) { memoizedIsInitialized = 0; return false; } @@ -33519,7 +44398,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getTransactionIdBytes()); + output.writeBytes(1, getShardIteratorBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getNextTokenBytes()); } getUnknownFields().writeTo(output); } @@ -33532,7 +44414,11 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getTransactionIdBytes()); + .computeBytesSize(1, getShardIteratorBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getNextTokenBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -33546,41 +44432,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -33589,7 +44475,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -33600,12 +44486,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -33615,7 +44501,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -33628,18 +44514,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponseOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_StartLocalTransactionResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetShardIteratorResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_StartLocalTransactionResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetShardIteratorResponse_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -33658,8 +44544,10 @@ private static Builder create() { public Builder clear() { super.clear(); - transactionId_ = ""; + shardIterator_ = ""; bitField0_ = (bitField0_ & ~0x00000001); + nextToken_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -33669,24 +44557,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -33694,39 +44582,46 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartL return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse(this); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.transactionId_ = transactionId_; + result.shardIterator_ = shardIterator_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.nextToken_ = nextToken_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse.getDefaultInstance()) return this; - if (other.hasTransactionId()) { - setTransactionId(other.getTransactionId()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse.getDefaultInstance()) return this; + if (other.hasShardIterator()) { + setShardIterator(other.getShardIterator()); + } + if (other.hasNextToken()) { + setNextToken(other.getNextToken()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { - if (!hasTransactionId()) { + if (!hasShardIterator()) { return false; } @@ -33758,7 +44653,12 @@ public Builder mergeFrom( } case 10: { bitField0_ |= 0x00000001; - transactionId_ = input.readBytes(); + shardIterator_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + nextToken_ = input.readBytes(); break; } } @@ -33767,97 +44667,137 @@ public Builder mergeFrom( private int bitField0_; - // required string transaction_id = 1; - private java.lang.Object transactionId_ = ""; - public boolean hasTransactionId() { + // required string shard_iterator = 1; + private java.lang.Object shardIterator_ = ""; + public boolean hasShardIterator() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getTransactionId() { - java.lang.Object ref = transactionId_; + public String getShardIterator() { + java.lang.Object ref = shardIterator_; if (!(ref instanceof String)) { String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - transactionId_ = s; + shardIterator_ = s; return s; } else { return (String) ref; } } - public Builder setTransactionId(String value) { + public Builder setShardIterator(String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; - transactionId_ = value; + shardIterator_ = value; onChanged(); return this; } - public Builder clearTransactionId() { + public Builder clearShardIterator() { bitField0_ = (bitField0_ & ~0x00000001); - transactionId_ = getDefaultInstance().getTransactionId(); + shardIterator_ = getDefaultInstance().getShardIterator(); onChanged(); return this; } - void setTransactionId(com.google.protobuf.ByteString value) { + void setShardIterator(com.google.protobuf.ByteString value) { bitField0_ |= 0x00000001; - transactionId_ = value; + shardIterator_ = value; onChanged(); } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.StartLocalTransactionResponse) + // optional string next_token = 2; + private java.lang.Object nextToken_ = ""; + public boolean hasNextToken() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getNextToken() { + java.lang.Object ref = nextToken_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + nextToken_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setNextToken(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + nextToken_ = value; + onChanged(); + return this; + } + public Builder clearNextToken() { + bitField0_ = (bitField0_ & ~0x00000002); + nextToken_ = getDefaultInstance().getNextToken(); + onChanged(); + return this; + } + void setNextToken(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000002; + nextToken_ = value; + onChanged(); + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GetShardIteratorResponse) } static { - defaultInstance = new StartLocalTransactionResponse(true); + defaultInstance = new GetShardIteratorResponse(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.StartLocalTransactionResponse) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GetShardIteratorResponse) } - public interface CommitTransactionRequestOrBuilder + public interface GetStreamRecordRequestOrBuilder extends com.google.protobuf.MessageOrBuilder { - // required string transaction_id = 1; - boolean hasTransactionId(); - String getTransactionId(); + // required string shard_iterator = 1; + boolean hasShardIterator(); + String getShardIterator(); + + // optional int32 limit = 2; + boolean hasLimit(); + int getLimit(); } - public static final class CommitTransactionRequest extends + public static final class GetStreamRecordRequest extends com.google.protobuf.GeneratedMessage - implements CommitTransactionRequestOrBuilder { - // Use CommitTransactionRequest.newBuilder() to construct. - private CommitTransactionRequest(Builder builder) { + implements GetStreamRecordRequestOrBuilder { + // Use GetStreamRecordRequest.newBuilder() to construct. + private GetStreamRecordRequest(Builder builder) { super(builder); } - private CommitTransactionRequest(boolean noInit) {} + private GetStreamRecordRequest(boolean noInit) {} - private static final CommitTransactionRequest defaultInstance; - public static CommitTransactionRequest getDefaultInstance() { + private static final GetStreamRecordRequest defaultInstance; + public static GetStreamRecordRequest getDefaultInstance() { return defaultInstance; } - public CommitTransactionRequest getDefaultInstanceForType() { + public GetStreamRecordRequest getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CommitTransactionRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetStreamRecordRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CommitTransactionRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetStreamRecordRequest_fieldAccessorTable; } private int bitField0_; - // required string transaction_id = 1; - public static final int TRANSACTION_ID_FIELD_NUMBER = 1; - private java.lang.Object transactionId_; - public boolean hasTransactionId() { + // required string shard_iterator = 1; + public static final int SHARD_ITERATOR_FIELD_NUMBER = 1; + private java.lang.Object shardIterator_; + public boolean hasShardIterator() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getTransactionId() { - java.lang.Object ref = transactionId_; + public String getShardIterator() { + java.lang.Object ref = shardIterator_; if (ref instanceof String) { return (String) ref; } else { @@ -33865,32 +44805,43 @@ public String getTransactionId() { (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); if (com.google.protobuf.Internal.isValidUtf8(bs)) { - transactionId_ = s; + shardIterator_ = s; } return s; } } - private com.google.protobuf.ByteString getTransactionIdBytes() { - java.lang.Object ref = transactionId_; + private com.google.protobuf.ByteString getShardIteratorBytes() { + java.lang.Object ref = shardIterator_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((String) ref); - transactionId_ = b; + shardIterator_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + // optional int32 limit = 2; + public static final int LIMIT_FIELD_NUMBER = 2; + private int limit_; + public boolean hasLimit() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public int getLimit() { + return limit_; + } + private void initFields() { - transactionId_ = ""; + shardIterator_ = ""; + limit_ = 0; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - if (!hasTransactionId()) { + if (!hasShardIterator()) { memoizedIsInitialized = 0; return false; } @@ -33902,7 +44853,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getTransactionIdBytes()); + output.writeBytes(1, getShardIteratorBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeInt32(2, limit_); } getUnknownFields().writeTo(output); } @@ -33915,7 +44869,11 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getTransactionIdBytes()); + .computeBytesSize(1, getShardIteratorBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, limit_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -33929,41 +44887,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -33972,7 +44930,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -33983,12 +44941,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -33998,7 +44956,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -34011,18 +44969,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequestOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CommitTransactionRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetStreamRecordRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CommitTransactionRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetStreamRecordRequest_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -34041,8 +44999,10 @@ private static Builder create() { public Builder clear() { super.clear(); - transactionId_ = ""; + shardIterator_ = ""; bitField0_ = (bitField0_ & ~0x00000001); + limit_ = 0; + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -34052,24 +45012,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -34077,39 +45037,46 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Commit return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest(this); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.transactionId_ = transactionId_; + result.shardIterator_ = shardIterator_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.limit_ = limit_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest.getDefaultInstance()) return this; - if (other.hasTransactionId()) { - setTransactionId(other.getTransactionId()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest.getDefaultInstance()) return this; + if (other.hasShardIterator()) { + setShardIterator(other.getShardIterator()); + } + if (other.hasLimit()) { + setLimit(other.getLimit()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { - if (!hasTransactionId()) { + if (!hasShardIterator()) { return false; } @@ -34141,7 +45108,12 @@ public Builder mergeFrom( } case 10: { bitField0_ |= 0x00000001; - transactionId_ = input.readBytes(); + shardIterator_ = input.readBytes(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + limit_ = input.readInt32(); break; } } @@ -34150,373 +45122,572 @@ public Builder mergeFrom( private int bitField0_; - // required string transaction_id = 1; - private java.lang.Object transactionId_ = ""; - public boolean hasTransactionId() { + // required string shard_iterator = 1; + private java.lang.Object shardIterator_ = ""; + public boolean hasShardIterator() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getTransactionId() { - java.lang.Object ref = transactionId_; + public String getShardIterator() { + java.lang.Object ref = shardIterator_; if (!(ref instanceof String)) { String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - transactionId_ = s; + shardIterator_ = s; return s; } else { return (String) ref; } } - public Builder setTransactionId(String value) { + public Builder setShardIterator(String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; - transactionId_ = value; + shardIterator_ = value; onChanged(); return this; } - public Builder clearTransactionId() { + public Builder clearShardIterator() { bitField0_ = (bitField0_ & ~0x00000001); - transactionId_ = getDefaultInstance().getTransactionId(); + shardIterator_ = getDefaultInstance().getShardIterator(); onChanged(); return this; } - void setTransactionId(com.google.protobuf.ByteString value) { + void setShardIterator(com.google.protobuf.ByteString value) { bitField0_ |= 0x00000001; - transactionId_ = value; + shardIterator_ = value; onChanged(); } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.CommitTransactionRequest) + // optional int32 limit = 2; + private int limit_ ; + public boolean hasLimit() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public int getLimit() { + return limit_; + } + public Builder setLimit(int value) { + bitField0_ |= 0x00000002; + limit_ = value; + onChanged(); + return this; + } + public Builder clearLimit() { + bitField0_ = (bitField0_ & ~0x00000002); + limit_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GetStreamRecordRequest) } static { - defaultInstance = new CommitTransactionRequest(true); + defaultInstance = new GetStreamRecordRequest(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.CommitTransactionRequest) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GetStreamRecordRequest) } - public interface CommitTransactionResponseOrBuilder + public interface GetStreamRecordResponseOrBuilder extends com.google.protobuf.MessageOrBuilder { + + // repeated .com.alicloud.openservices.tablestore.core.protocol.GetStreamRecordResponse.StreamRecord stream_records = 1; + java.util.List + getStreamRecordsList(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord getStreamRecords(int index); + int getStreamRecordsCount(); + java.util.List + getStreamRecordsOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecordOrBuilder getStreamRecordsOrBuilder( + int index); + + // optional string next_shard_iterator = 2; + boolean hasNextShardIterator(); + String getNextShardIterator(); } - public static final class CommitTransactionResponse extends + public static final class GetStreamRecordResponse extends com.google.protobuf.GeneratedMessage - implements CommitTransactionResponseOrBuilder { - // Use CommitTransactionResponse.newBuilder() to construct. - private CommitTransactionResponse(Builder builder) { + implements GetStreamRecordResponseOrBuilder { + // Use GetStreamRecordResponse.newBuilder() to construct. + private GetStreamRecordResponse(Builder builder) { super(builder); } - private CommitTransactionResponse(boolean noInit) {} + private GetStreamRecordResponse(boolean noInit) {} - private static final CommitTransactionResponse defaultInstance; - public static CommitTransactionResponse getDefaultInstance() { + private static final GetStreamRecordResponse defaultInstance; + public static GetStreamRecordResponse getDefaultInstance() { return defaultInstance; } - public CommitTransactionResponse getDefaultInstanceForType() { + public GetStreamRecordResponse getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CommitTransactionResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetStreamRecordResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CommitTransactionResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetStreamRecordResponse_fieldAccessorTable; } - private void initFields() { - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; + public interface StreamRecordOrBuilder + extends com.google.protobuf.MessageOrBuilder { - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; + // required .com.alicloud.openservices.tablestore.core.protocol.ActionType action_type = 1; + boolean hasActionType(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ActionType getActionType(); + + // required bytes record = 2; + boolean hasRecord(); + com.google.protobuf.ByteString getRecord(); } - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponseOrBuilder { + public static final class StreamRecord extends + com.google.protobuf.GeneratedMessage + implements StreamRecordOrBuilder { + // Use StreamRecord.newBuilder() to construct. + private StreamRecord(Builder builder) { + super(builder); + } + private StreamRecord(boolean noInit) {} + + private static final StreamRecord defaultInstance; + public static StreamRecord getDefaultInstance() { + return defaultInstance; + } + + public StreamRecord getDefaultInstanceForType() { + return defaultInstance; + } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CommitTransactionResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetStreamRecordResponse_StreamRecord_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CommitTransactionResponse_fieldAccessorTable; - } - - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetStreamRecordResponse_StreamRecord_fieldAccessorTable; } - private Builder(BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } + private int bitField0_; + // required .com.alicloud.openservices.tablestore.core.protocol.ActionType action_type = 1; + public static final int ACTION_TYPE_FIELD_NUMBER = 1; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ActionType actionType_; + public boolean hasActionType() { + return ((bitField0_ & 0x00000001) == 0x00000001); } - private static Builder create() { - return new Builder(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ActionType getActionType() { + return actionType_; } - public Builder clear() { - super.clear(); - return this; + // required bytes record = 2; + public static final int RECORD_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString record_; + public boolean hasRecord() { + return ((bitField0_ & 0x00000002) == 0x00000002); } - - public Builder clone() { - return create().mergeFrom(buildPartial()); + public com.google.protobuf.ByteString getRecord() { + return record_; } - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse.getDescriptor(); + private void initFields() { + actionType_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ActionType.PUT_ROW; + record_ = com.google.protobuf.ByteString.EMPTY; } - - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse.getDefaultInstance(); + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasActionType()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasRecord()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeEnum(1, actionType_.getNumber()); } - return result; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, record_); + } + getUnknownFields().writeTo(output); } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, actionType_.getNumber()); } - return result; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, record_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse(this); - onBuilt(); - return result; + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); } - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse)other); + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); } else { - super.mergeFrom(other); - return this; + return null; } } - - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse.getDefaultInstance()) return this; - this.mergeUnknownFields(other.getUnknownFields()); - return this; + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } } - - public final boolean isInitialized() { - return true; + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); } - - public Builder mergeFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecordOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetStreamRecordResponse_StreamRecord_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetStreamRecordResponse_StreamRecord_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + actionType_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ActionType.PUT_ROW; + bitField0_ = (bitField0_ & ~0x00000001); + record_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.actionType_ = actionType_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.record_ = record_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord.getDefaultInstance()) return this; + if (other.hasActionType()) { + setActionType(other.getActionType()); + } + if (other.hasRecord()) { + setRecord(other.getRecord()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasActionType()) { + + return false; + } + if (!hasRecord()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: this.setUnknownFields(unknownFields.build()); onChanged(); return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ActionType value = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ActionType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + actionType_ = value; + } + break; + } + case 18: { + bitField0_ |= 0x00000002; + record_ = input.readBytes(); + break; } - break; } } } + + private int bitField0_; + + // required .com.alicloud.openservices.tablestore.core.protocol.ActionType action_type = 1; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ActionType actionType_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ActionType.PUT_ROW; + public boolean hasActionType() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ActionType getActionType() { + return actionType_; + } + public Builder setActionType(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ActionType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + actionType_ = value; + onChanged(); + return this; + } + public Builder clearActionType() { + bitField0_ = (bitField0_ & ~0x00000001); + actionType_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ActionType.PUT_ROW; + onChanged(); + return this; + } + + // required bytes record = 2; + private com.google.protobuf.ByteString record_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasRecord() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getRecord() { + return record_; + } + public Builder setRecord(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + record_ = value; + onChanged(); + return this; + } + public Builder clearRecord() { + bitField0_ = (bitField0_ & ~0x00000002); + record_ = getDefaultInstance().getRecord(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GetStreamRecordResponse.StreamRecord) } + static { + defaultInstance = new StreamRecord(true); + defaultInstance.initFields(); + } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.CommitTransactionResponse) - } - - static { - defaultInstance = new CommitTransactionResponse(true); - defaultInstance.initFields(); + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GetStreamRecordResponse.StreamRecord) } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.CommitTransactionResponse) - } - - public interface AbortTransactionRequestOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required string transaction_id = 1; - boolean hasTransactionId(); - String getTransactionId(); - } - public static final class AbortTransactionRequest extends - com.google.protobuf.GeneratedMessage - implements AbortTransactionRequestOrBuilder { - // Use AbortTransactionRequest.newBuilder() to construct. - private AbortTransactionRequest(Builder builder) { - super(builder); + private int bitField0_; + // repeated .com.alicloud.openservices.tablestore.core.protocol.GetStreamRecordResponse.StreamRecord stream_records = 1; + public static final int STREAM_RECORDS_FIELD_NUMBER = 1; + private java.util.List streamRecords_; + public java.util.List getStreamRecordsList() { + return streamRecords_; } - private AbortTransactionRequest(boolean noInit) {} - - private static final AbortTransactionRequest defaultInstance; - public static AbortTransactionRequest getDefaultInstance() { - return defaultInstance; + public java.util.List + getStreamRecordsOrBuilderList() { + return streamRecords_; } - - public AbortTransactionRequest getDefaultInstanceForType() { - return defaultInstance; + public int getStreamRecordsCount() { + return streamRecords_.size(); } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_AbortTransactionRequest_descriptor; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord getStreamRecords(int index) { + return streamRecords_.get(index); } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_AbortTransactionRequest_fieldAccessorTable; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecordOrBuilder getStreamRecordsOrBuilder( + int index) { + return streamRecords_.get(index); } - private int bitField0_; - // required string transaction_id = 1; - public static final int TRANSACTION_ID_FIELD_NUMBER = 1; - private java.lang.Object transactionId_; - public boolean hasTransactionId() { + // optional string next_shard_iterator = 2; + public static final int NEXT_SHARD_ITERATOR_FIELD_NUMBER = 2; + private java.lang.Object nextShardIterator_; + public boolean hasNextShardIterator() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getTransactionId() { - java.lang.Object ref = transactionId_; + public String getNextShardIterator() { + java.lang.Object ref = nextShardIterator_; if (ref instanceof String) { return (String) ref; } else { @@ -34524,17 +45695,17 @@ public String getTransactionId() { (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); if (com.google.protobuf.Internal.isValidUtf8(bs)) { - transactionId_ = s; + nextShardIterator_ = s; } return s; } } - private com.google.protobuf.ByteString getTransactionIdBytes() { - java.lang.Object ref = transactionId_; + private com.google.protobuf.ByteString getNextShardIteratorBytes() { + java.lang.Object ref = nextShardIterator_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((String) ref); - transactionId_ = b; + nextShardIterator_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -34542,16 +45713,19 @@ private com.google.protobuf.ByteString getTransactionIdBytes() { } private void initFields() { - transactionId_ = ""; + streamRecords_ = java.util.Collections.emptyList(); + nextShardIterator_ = ""; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - if (!hasTransactionId()) { - memoizedIsInitialized = 0; - return false; + for (int i = 0; i < getStreamRecordsCount(); i++) { + if (!getStreamRecords(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } } memoizedIsInitialized = 1; return true; @@ -34560,8 +45734,11 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); + for (int i = 0; i < streamRecords_.size(); i++) { + output.writeMessage(1, streamRecords_.get(i)); + } if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getTransactionIdBytes()); + output.writeBytes(2, getNextShardIteratorBytes()); } getUnknownFields().writeTo(output); } @@ -34572,9 +45749,13 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; + for (int i = 0; i < streamRecords_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, streamRecords_.get(i)); + } if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getTransactionIdBytes()); + .computeBytesSize(2, getNextShardIteratorBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -34588,41 +45769,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -34631,7 +45812,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -34642,12 +45823,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -34657,7 +45838,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -34670,18 +45851,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequestOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_AbortTransactionRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetStreamRecordResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_AbortTransactionRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetStreamRecordResponse_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -34692,6 +45873,7 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getStreamRecordsFieldBuilder(); } } private static Builder create() { @@ -34700,8 +45882,14 @@ private static Builder create() { public Builder clear() { super.clear(); - transactionId_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); + if (streamRecordsBuilder_ == null) { + streamRecords_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + streamRecordsBuilder_.clear(); + } + nextShardIterator_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -34711,24 +45899,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -34736,41 +45924,78 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortT return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest(this); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + if (streamRecordsBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + streamRecords_ = java.util.Collections.unmodifiableList(streamRecords_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.streamRecords_ = streamRecords_; + } else { + result.streamRecords_ = streamRecordsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000001; } - result.transactionId_ = transactionId_; + result.nextShardIterator_ = nextShardIterator_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest.getDefaultInstance()) return this; - if (other.hasTransactionId()) { - setTransactionId(other.getTransactionId()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.getDefaultInstance()) return this; + if (streamRecordsBuilder_ == null) { + if (!other.streamRecords_.isEmpty()) { + if (streamRecords_.isEmpty()) { + streamRecords_ = other.streamRecords_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureStreamRecordsIsMutable(); + streamRecords_.addAll(other.streamRecords_); + } + onChanged(); + } + } else { + if (!other.streamRecords_.isEmpty()) { + if (streamRecordsBuilder_.isEmpty()) { + streamRecordsBuilder_.dispose(); + streamRecordsBuilder_ = null; + streamRecords_ = other.streamRecords_; + bitField0_ = (bitField0_ & ~0x00000001); + streamRecordsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getStreamRecordsFieldBuilder() : null; + } else { + streamRecordsBuilder_.addAllMessages(other.streamRecords_); + } + } + } + if (other.hasNextShardIterator()) { + setNextShardIterator(other.getNextShardIterator()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { - if (!hasTransactionId()) { - - return false; + for (int i = 0; i < getStreamRecordsCount(); i++) { + if (!getStreamRecords(i).isInitialized()) { + + return false; + } } return true; } @@ -34799,8 +46024,14 @@ public Builder mergeFrom( break; } case 10: { - bitField0_ |= 0x00000001; - transactionId_ = input.readBytes(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addStreamRecords(subBuilder.buildPartial()); + break; + } + case 18: { + bitField0_ |= 0x00000002; + nextShardIterator_ = input.readBytes(); break; } } @@ -34809,366 +46040,288 @@ public Builder mergeFrom( private int bitField0_; - // required string transaction_id = 1; - private java.lang.Object transactionId_ = ""; - public boolean hasTransactionId() { - return ((bitField0_ & 0x00000001) == 0x00000001); + // repeated .com.alicloud.openservices.tablestore.core.protocol.GetStreamRecordResponse.StreamRecord stream_records = 1; + private java.util.List streamRecords_ = + java.util.Collections.emptyList(); + private void ensureStreamRecordsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + streamRecords_ = new java.util.ArrayList(streamRecords_); + bitField0_ |= 0x00000001; + } } - public String getTransactionId() { - java.lang.Object ref = transactionId_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - transactionId_ = s; - return s; + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecordOrBuilder> streamRecordsBuilder_; + + public java.util.List getStreamRecordsList() { + if (streamRecordsBuilder_ == null) { + return java.util.Collections.unmodifiableList(streamRecords_); } else { - return (String) ref; + return streamRecordsBuilder_.getMessageList(); } } - public Builder setTransactionId(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - transactionId_ = value; - onChanged(); - return this; - } - public Builder clearTransactionId() { - bitField0_ = (bitField0_ & ~0x00000001); - transactionId_ = getDefaultInstance().getTransactionId(); - onChanged(); - return this; - } - void setTransactionId(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; - transactionId_ = value; - onChanged(); + public int getStreamRecordsCount() { + if (streamRecordsBuilder_ == null) { + return streamRecords_.size(); + } else { + return streamRecordsBuilder_.getCount(); + } } - - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.AbortTransactionRequest) - } - - static { - defaultInstance = new AbortTransactionRequest(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.AbortTransactionRequest) - } - - public interface AbortTransactionResponseOrBuilder - extends com.google.protobuf.MessageOrBuilder { - } - public static final class AbortTransactionResponse extends - com.google.protobuf.GeneratedMessage - implements AbortTransactionResponseOrBuilder { - // Use AbortTransactionResponse.newBuilder() to construct. - private AbortTransactionResponse(Builder builder) { - super(builder); - } - private AbortTransactionResponse(boolean noInit) {} - - private static final AbortTransactionResponse defaultInstance; - public static AbortTransactionResponse getDefaultInstance() { - return defaultInstance; - } - - public AbortTransactionResponse getDefaultInstanceForType() { - return defaultInstance; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_AbortTransactionResponse_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_AbortTransactionResponse_fieldAccessorTable; - } - - private void initFields() { - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord getStreamRecords(int index) { + if (streamRecordsBuilder_ == null) { + return streamRecords_.get(index); + } else { + return streamRecordsBuilder_.getMessage(index); + } } - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; + public Builder setStreamRecords( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord value) { + if (streamRecordsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStreamRecordsIsMutable(); + streamRecords_.set(index, value); + onChanged(); + } else { + streamRecordsBuilder_.setMessage(index, value); + } + return this; } - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_AbortTransactionResponse_descriptor; + public Builder setStreamRecords( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord.Builder builderForValue) { + if (streamRecordsBuilder_ == null) { + ensureStreamRecordsIsMutable(); + streamRecords_.set(index, builderForValue.build()); + onChanged(); + } else { + streamRecordsBuilder_.setMessage(index, builderForValue.build()); + } + return this; } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_AbortTransactionResponse_fieldAccessorTable; + public Builder addStreamRecords(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord value) { + if (streamRecordsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStreamRecordsIsMutable(); + streamRecords_.add(value); + onChanged(); + } else { + streamRecordsBuilder_.addMessage(value); + } + return this; } - - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); + public Builder addStreamRecords( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord value) { + if (streamRecordsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStreamRecordsIsMutable(); + streamRecords_.add(index, value); + onChanged(); + } else { + streamRecordsBuilder_.addMessage(index, value); + } + return this; } - - private Builder(BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); + public Builder addStreamRecords( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord.Builder builderForValue) { + if (streamRecordsBuilder_ == null) { + ensureStreamRecordsIsMutable(); + streamRecords_.add(builderForValue.build()); + onChanged(); + } else { + streamRecordsBuilder_.addMessage(builderForValue.build()); + } + return this; } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + public Builder addStreamRecords( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord.Builder builderForValue) { + if (streamRecordsBuilder_ == null) { + ensureStreamRecordsIsMutable(); + streamRecords_.add(index, builderForValue.build()); + onChanged(); + } else { + streamRecordsBuilder_.addMessage(index, builderForValue.build()); } + return this; } - private static Builder create() { - return new Builder(); + public Builder addAllStreamRecords( + java.lang.Iterable values) { + if (streamRecordsBuilder_ == null) { + ensureStreamRecordsIsMutable(); + super.addAll(values, streamRecords_); + onChanged(); + } else { + streamRecordsBuilder_.addAllMessages(values); + } + return this; } - - public Builder clear() { - super.clear(); + public Builder clearStreamRecords() { + if (streamRecordsBuilder_ == null) { + streamRecords_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + streamRecordsBuilder_.clear(); + } return this; } - - public Builder clone() { - return create().mergeFrom(buildPartial()); + public Builder removeStreamRecords(int index) { + if (streamRecordsBuilder_ == null) { + ensureStreamRecordsIsMutable(); + streamRecords_.remove(index); + onChanged(); + } else { + streamRecordsBuilder_.remove(index); + } + return this; } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse.getDescriptor(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord.Builder getStreamRecordsBuilder( + int index) { + return getStreamRecordsFieldBuilder().getBuilder(index); } - - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecordOrBuilder getStreamRecordsOrBuilder( + int index) { + if (streamRecordsBuilder_ == null) { + return streamRecords_.get(index); } else { + return streamRecordsBuilder_.getMessageOrBuilder(index); + } } - - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); + public java.util.List + getStreamRecordsOrBuilderList() { + if (streamRecordsBuilder_ != null) { + return streamRecordsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(streamRecords_); } - return result; } - - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord.Builder addStreamRecordsBuilder() { + return getStreamRecordsFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord.getDefaultInstance()); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord.Builder addStreamRecordsBuilder( + int index) { + return getStreamRecordsFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord.getDefaultInstance()); + } + public java.util.List + getStreamRecordsBuilderList() { + return getStreamRecordsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecordOrBuilder> + getStreamRecordsFieldBuilder() { + if (streamRecordsBuilder_ == null) { + streamRecordsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecordOrBuilder>( + streamRecords_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + streamRecords_ = null; } - return result; + return streamRecordsBuilder_; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse(this); - onBuilt(); - return result; + // optional string next_shard_iterator = 2; + private java.lang.Object nextShardIterator_ = ""; + public boolean hasNextShardIterator() { + return ((bitField0_ & 0x00000002) == 0x00000002); } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse)other); + public String getNextShardIterator() { + java.lang.Object ref = nextShardIterator_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + nextShardIterator_ = s; + return s; } else { - super.mergeFrom(other); - return this; + return (String) ref; } } - - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse.getDefaultInstance()) return this; - this.mergeUnknownFields(other.getUnknownFields()); + public Builder setNextShardIterator(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + nextShardIterator_ = value; + onChanged(); return this; } - - public final boolean isInitialized() { - return true; + public Builder clearNextShardIterator() { + bitField0_ = (bitField0_ & ~0x00000002); + nextShardIterator_ = getDefaultInstance().getNextShardIterator(); + onChanged(); + return this; } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - } - } + void setNextShardIterator(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000002; + nextShardIterator_ = value; + onChanged(); } - - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.AbortTransactionResponse) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GetStreamRecordResponse) } static { - defaultInstance = new AbortTransactionResponse(true); + defaultInstance = new GetStreamRecordResponse(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.AbortTransactionResponse) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GetStreamRecordResponse) } - public interface ListStreamRequestOrBuilder + public interface ComputeSplitPointsBySizeRequestOrBuilder extends com.google.protobuf.MessageOrBuilder { - // optional string table_name = 1; + // required string table_name = 1; boolean hasTableName(); String getTableName(); + + // required int64 split_size = 2; + boolean hasSplitSize(); + long getSplitSize(); + + // optional int64 split_size_unit_in_byte = 3; + boolean hasSplitSizeUnitInByte(); + long getSplitSizeUnitInByte(); + + // optional int32 split_point_limit = 4; + boolean hasSplitPointLimit(); + int getSplitPointLimit(); } - public static final class ListStreamRequest extends + public static final class ComputeSplitPointsBySizeRequest extends com.google.protobuf.GeneratedMessage - implements ListStreamRequestOrBuilder { - // Use ListStreamRequest.newBuilder() to construct. - private ListStreamRequest(Builder builder) { + implements ComputeSplitPointsBySizeRequestOrBuilder { + // Use ComputeSplitPointsBySizeRequest.newBuilder() to construct. + private ComputeSplitPointsBySizeRequest(Builder builder) { super(builder); } - private ListStreamRequest(boolean noInit) {} + private ComputeSplitPointsBySizeRequest(boolean noInit) {} - private static final ListStreamRequest defaultInstance; - public static ListStreamRequest getDefaultInstance() { + private static final ComputeSplitPointsBySizeRequest defaultInstance; + public static ComputeSplitPointsBySizeRequest getDefaultInstance() { return defaultInstance; } - public ListStreamRequest getDefaultInstanceForType() { + public ComputeSplitPointsBySizeRequest getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListStreamRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ComputeSplitPointsBySizeRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListStreamRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ComputeSplitPointsBySizeRequest_fieldAccessorTable; } private int bitField0_; - // optional string table_name = 1; + // required string table_name = 1; public static final int TABLE_NAME_FIELD_NUMBER = 1; private java.lang.Object tableName_; public boolean hasTableName() { @@ -35200,14 +46353,55 @@ private com.google.protobuf.ByteString getTableNameBytes() { } } + // required int64 split_size = 2; + public static final int SPLIT_SIZE_FIELD_NUMBER = 2; + private long splitSize_; + public boolean hasSplitSize() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public long getSplitSize() { + return splitSize_; + } + + // optional int64 split_size_unit_in_byte = 3; + public static final int SPLIT_SIZE_UNIT_IN_BYTE_FIELD_NUMBER = 3; + private long splitSizeUnitInByte_; + public boolean hasSplitSizeUnitInByte() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public long getSplitSizeUnitInByte() { + return splitSizeUnitInByte_; + } + + // optional int32 split_point_limit = 4; + public static final int SPLIT_POINT_LIMIT_FIELD_NUMBER = 4; + private int splitPointLimit_; + public boolean hasSplitPointLimit() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public int getSplitPointLimit() { + return splitPointLimit_; + } + private void initFields() { tableName_ = ""; + splitSize_ = 0L; + splitSizeUnitInByte_ = 0L; + splitPointLimit_ = 0; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; + if (!hasTableName()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasSplitSize()) { + memoizedIsInitialized = 0; + return false; + } memoizedIsInitialized = 1; return true; } @@ -35218,6 +46412,15 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getTableNameBytes()); } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeInt64(2, splitSize_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeInt64(3, splitSizeUnitInByte_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeInt32(4, splitPointLimit_); + } getUnknownFields().writeTo(output); } @@ -35231,6 +46434,18 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, getTableNameBytes()); } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, splitSize_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, splitSizeUnitInByte_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, splitPointLimit_); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -35243,41 +46458,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -35286,7 +46501,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -35297,12 +46512,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -35312,7 +46527,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -35325,18 +46540,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequestOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListStreamRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ComputeSplitPointsBySizeRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListStreamRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ComputeSplitPointsBySizeRequest_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -35357,6 +46572,12 @@ public Builder clear() { super.clear(); tableName_ = ""; bitField0_ = (bitField0_ & ~0x00000001); + splitSize_ = 0L; + bitField0_ = (bitField0_ & ~0x00000002); + splitSizeUnitInByte_ = 0L; + bitField0_ = (bitField0_ & ~0x00000004); + splitPointLimit_ = 0; + bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -35366,24 +46587,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -35391,38 +46612,67 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListSt return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest(this); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.tableName_ = tableName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.splitSize_ = splitSize_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.splitSizeUnitInByte_ = splitSizeUnitInByte_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.splitPointLimit_ = splitPointLimit_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest.getDefaultInstance()) return this; + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest.getDefaultInstance()) return this; if (other.hasTableName()) { setTableName(other.getTableName()); } + if (other.hasSplitSize()) { + setSplitSize(other.getSplitSize()); + } + if (other.hasSplitSizeUnitInByte()) { + setSplitSizeUnitInByte(other.getSplitSizeUnitInByte()); + } + if (other.hasSplitPointLimit()) { + setSplitPointLimit(other.getSplitPointLimit()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { + if (!hasTableName()) { + + return false; + } + if (!hasSplitSize()) { + + return false; + } return true; } @@ -35454,13 +46704,28 @@ public Builder mergeFrom( tableName_ = input.readBytes(); break; } + case 16: { + bitField0_ |= 0x00000002; + splitSize_ = input.readInt64(); + break; + } + case 24: { + bitField0_ |= 0x00000004; + splitSizeUnitInByte_ = input.readInt64(); + break; + } + case 32: { + bitField0_ |= 0x00000008; + splitPointLimit_ = input.readInt32(); + break; + } } } } private int bitField0_; - // optional string table_name = 1; + // required string table_name = 1; private java.lang.Object tableName_ = ""; public boolean hasTableName() { return ((bitField0_ & 0x00000001) == 0x00000001); @@ -35496,639 +46761,686 @@ void setTableName(com.google.protobuf.ByteString value) { onChanged(); } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.ListStreamRequest) - } - - static { - defaultInstance = new ListStreamRequest(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.ListStreamRequest) - } - - public interface StreamOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required string stream_id = 1; - boolean hasStreamId(); - String getStreamId(); - - // required string table_name = 2; - boolean hasTableName(); - String getTableName(); - - // required int64 creation_time = 3; - boolean hasCreationTime(); - long getCreationTime(); - } - public static final class Stream extends - com.google.protobuf.GeneratedMessage - implements StreamOrBuilder { - // Use Stream.newBuilder() to construct. - private Stream(Builder builder) { - super(builder); - } - private Stream(boolean noInit) {} - - private static final Stream defaultInstance; - public static Stream getDefaultInstance() { - return defaultInstance; - } - - public Stream getDefaultInstanceForType() { - return defaultInstance; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_Stream_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_Stream_fieldAccessorTable; - } - - private int bitField0_; - // required string stream_id = 1; - public static final int STREAM_ID_FIELD_NUMBER = 1; - private java.lang.Object streamId_; - public boolean hasStreamId() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getStreamId() { - java.lang.Object ref = streamId_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - streamId_ = s; - } - return s; + // required int64 split_size = 2; + private long splitSize_ ; + public boolean hasSplitSize() { + return ((bitField0_ & 0x00000002) == 0x00000002); } - } - private com.google.protobuf.ByteString getStreamIdBytes() { - java.lang.Object ref = streamId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - streamId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + public long getSplitSize() { + return splitSize_; } - } - - // required string table_name = 2; - public static final int TABLE_NAME_FIELD_NUMBER = 2; - private java.lang.Object tableName_; - public boolean hasTableName() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public String getTableName() { - java.lang.Object ref = tableName_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - tableName_ = s; - } - return s; + public Builder setSplitSize(long value) { + bitField0_ |= 0x00000002; + splitSize_ = value; + onChanged(); + return this; } - } - private com.google.protobuf.ByteString getTableNameBytes() { - java.lang.Object ref = tableName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - tableName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + public Builder clearSplitSize() { + bitField0_ = (bitField0_ & ~0x00000002); + splitSize_ = 0L; + onChanged(); + return this; } - } - - // required int64 creation_time = 3; - public static final int CREATION_TIME_FIELD_NUMBER = 3; - private long creationTime_; - public boolean hasCreationTime() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public long getCreationTime() { - return creationTime_; - } - - private void initFields() { - streamId_ = ""; - tableName_ = ""; - creationTime_ = 0L; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - if (!hasStreamId()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasTableName()) { - memoizedIsInitialized = 0; - return false; + // optional int64 split_size_unit_in_byte = 3; + private long splitSizeUnitInByte_ ; + public boolean hasSplitSizeUnitInByte() { + return ((bitField0_ & 0x00000004) == 0x00000004); } - if (!hasCreationTime()) { - memoizedIsInitialized = 0; - return false; + public long getSplitSizeUnitInByte() { + return splitSizeUnitInByte_; } - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getStreamIdBytes()); + public Builder setSplitSizeUnitInByte(long value) { + bitField0_ |= 0x00000004; + splitSizeUnitInByte_ = value; + onChanged(); + return this; } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getTableNameBytes()); + public Builder clearSplitSizeUnitInByte() { + bitField0_ = (bitField0_ & ~0x00000004); + splitSizeUnitInByte_ = 0L; + onChanged(); + return this; } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeInt64(3, creationTime_); + + // optional int32 split_point_limit = 4; + private int splitPointLimit_ ; + public boolean hasSplitPointLimit() { + return ((bitField0_ & 0x00000008) == 0x00000008); } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getStreamIdBytes()); + public int getSplitPointLimit() { + return splitPointLimit_; } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getTableNameBytes()); + public Builder setSplitPointLimit(int value) { + bitField0_ |= 0x00000008; + splitPointLimit_ = value; + onChanged(); + return this; } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(3, creationTime_); + public Builder clearSplitPointLimit() { + bitField0_ = (bitField0_ & ~0x00000008); + splitPointLimit_ = 0; + onChanged(); + return this; } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.ComputeSplitPointsBySizeRequest) } - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); + static { + defaultInstance = new ComputeSplitPointsBySizeRequest(true); + defaultInstance.initFields(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream parseFrom(java.io.InputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.ComputeSplitPointsBySizeRequest) + } + + public interface ComputeSplitPointsBySizeResponseOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 1; + boolean hasConsumed(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder(); + + // repeated .com.alicloud.openservices.tablestore.core.protocol.PrimaryKeySchema schema = 2; + java.util.List + getSchemaList(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchema getSchema(int index); + int getSchemaCount(); + java.util.List + getSchemaOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchemaOrBuilder getSchemaOrBuilder( + int index); + + // repeated bytes split_points = 3; + java.util.List getSplitPointsList(); + int getSplitPointsCount(); + com.google.protobuf.ByteString getSplitPoints(int index); + + // repeated .com.alicloud.openservices.tablestore.core.protocol.ComputeSplitPointsBySizeResponse.SplitLocation locations = 4; + java.util.List + getLocationsList(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation getLocations(int index); + int getLocationsCount(); + java.util.List + getLocationsOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocationOrBuilder getLocationsOrBuilder( + int index); + } + public static final class ComputeSplitPointsBySizeResponse extends + com.google.protobuf.GeneratedMessage + implements ComputeSplitPointsBySizeResponseOrBuilder { + // Use ComputeSplitPointsBySizeResponse.newBuilder() to construct. + private ComputeSplitPointsBySizeResponse(Builder builder) { + super(builder); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } + private ComputeSplitPointsBySizeResponse(boolean noInit) {} + + private static final ComputeSplitPointsBySizeResponse defaultInstance; + public static ComputeSplitPointsBySizeResponse getDefaultInstance() { + return defaultInstance; } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); + + public ComputeSplitPointsBySizeResponse getDefaultInstanceForType() { + return defaultInstance; } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ComputeSplitPointsBySizeResponse_descriptor; } - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream prototype) { - return newBuilder().mergeFrom(prototype); + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ComputeSplitPointsBySizeResponse_fieldAccessorTable; } - public Builder toBuilder() { return newBuilder(this); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; + public interface SplitLocationOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string location = 1; + boolean hasLocation(); + String getLocation(); + + // required sint64 repeat = 2; + boolean hasRepeat(); + long getRepeat(); } - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamOrBuilder { + public static final class SplitLocation extends + com.google.protobuf.GeneratedMessage + implements SplitLocationOrBuilder { + // Use SplitLocation.newBuilder() to construct. + private SplitLocation(Builder builder) { + super(builder); + } + private SplitLocation(boolean noInit) {} + + private static final SplitLocation defaultInstance; + public static SplitLocation getDefaultInstance() { + return defaultInstance; + } + + public SplitLocation getDefaultInstanceForType() { + return defaultInstance; + } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_Stream_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ComputeSplitPointsBySizeResponse_SplitLocation_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_Stream_fieldAccessorTable; - } - - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ComputeSplitPointsBySizeResponse_SplitLocation_fieldAccessorTable; } - private Builder(BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); + private int bitField0_; + // required string location = 1; + public static final int LOCATION_FIELD_NUMBER = 1; + private java.lang.Object location_; + public boolean hasLocation() { + return ((bitField0_ & 0x00000001) == 0x00000001); } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + public String getLocation() { + java.lang.Object ref = location_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + location_ = s; + } + return s; } } - private static Builder create() { - return new Builder(); + private com.google.protobuf.ByteString getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - public Builder clear() { - super.clear(); - streamId_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - tableName_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); - creationTime_ = 0L; - bitField0_ = (bitField0_ & ~0x00000004); - return this; + // required sint64 repeat = 2; + public static final int REPEAT_FIELD_NUMBER = 2; + private long repeat_; + public boolean hasRepeat() { + return ((bitField0_ & 0x00000002) == 0x00000002); } - - public Builder clone() { - return create().mergeFrom(buildPartial()); + public long getRepeat() { + return repeat_; } - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream.getDescriptor(); + private void initFields() { + location_ = ""; + repeat_ = 0L; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasLocation()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasRepeat()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream.getDefaultInstance(); + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getLocationBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeSInt64(2, repeat_); + } + getUnknownFields().writeTo(output); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getLocationBytes()); } - return result; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeSInt64Size(2, repeat_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream buildParsed() + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation parseFrom( + com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; } - return result; + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ComputeSplitPointsBySizeResponse_SplitLocation_descriptor; } - result.streamId_ = streamId_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ComputeSplitPointsBySizeResponse_SplitLocation_fieldAccessorTable; } - result.tableName_ = tableName_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; + + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); } - result.creationTime_ = creationTime_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream)other); - } else { - super.mergeFrom(other); + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + location_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + repeat_ = 0L; + bitField0_ = (bitField0_ & ~0x00000002); return this; } - } - - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream.getDefaultInstance()) return this; - if (other.hasStreamId()) { - setStreamId(other.getStreamId()); + + public Builder clone() { + return create().mergeFrom(buildPartial()); } - if (other.hasTableName()) { - setTableName(other.getTableName()); + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation.getDescriptor(); } - if (other.hasCreationTime()) { - setCreationTime(other.getCreationTime()); + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation.getDefaultInstance(); } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - if (!hasStreamId()) { - - return false; + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.location_ = location_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.repeat_ = repeat_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation)other); + } else { + super.mergeFrom(other); + return this; + } } - if (!hasTableName()) { - - return false; + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation.getDefaultInstance()) return this; + if (other.hasLocation()) { + setLocation(other.getLocation()); + } + if (other.hasRepeat()) { + setRepeat(other.getRepeat()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; } - if (!hasCreationTime()) { - - return false; + + public final boolean isInitialized() { + if (!hasLocation()) { + + return false; + } + if (!hasRepeat()) { + + return false; + } + return true; } - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: this.setUnknownFields(unknownFields.build()); onChanged(); return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + location_ = input.readBytes(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + repeat_ = input.readSInt64(); + break; } - break; - } - case 10: { - bitField0_ |= 0x00000001; - streamId_ = input.readBytes(); - break; - } - case 18: { - bitField0_ |= 0x00000002; - tableName_ = input.readBytes(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - creationTime_ = input.readInt64(); - break; } } } - } - - private int bitField0_; - - // required string stream_id = 1; - private java.lang.Object streamId_ = ""; - public boolean hasStreamId() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getStreamId() { - java.lang.Object ref = streamId_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - streamId_ = s; - return s; - } else { - return (String) ref; + + private int bitField0_; + + // required string location = 1; + private java.lang.Object location_ = ""; + public boolean hasLocation() { + return ((bitField0_ & 0x00000001) == 0x00000001); } - } - public Builder setStreamId(String value) { - if (value == null) { + public String getLocation() { + java.lang.Object ref = location_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + location_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setLocation(String value) { + if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; - streamId_ = value; - onChanged(); - return this; - } - public Builder clearStreamId() { - bitField0_ = (bitField0_ & ~0x00000001); - streamId_ = getDefaultInstance().getStreamId(); - onChanged(); - return this; - } - void setStreamId(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; - streamId_ = value; - onChanged(); - } - - // required string table_name = 2; - private java.lang.Object tableName_ = ""; - public boolean hasTableName() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public String getTableName() { - java.lang.Object ref = tableName_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - tableName_ = s; - return s; - } else { - return (String) ref; + location_ = value; + onChanged(); + return this; } - } - public Builder setTableName(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - tableName_ = value; - onChanged(); - return this; - } - public Builder clearTableName() { - bitField0_ = (bitField0_ & ~0x00000002); - tableName_ = getDefaultInstance().getTableName(); - onChanged(); - return this; - } - void setTableName(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000002; - tableName_ = value; - onChanged(); + public Builder clearLocation() { + bitField0_ = (bitField0_ & ~0x00000001); + location_ = getDefaultInstance().getLocation(); + onChanged(); + return this; + } + void setLocation(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + location_ = value; + onChanged(); + } + + // required sint64 repeat = 2; + private long repeat_ ; + public boolean hasRepeat() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public long getRepeat() { + return repeat_; + } + public Builder setRepeat(long value) { + bitField0_ |= 0x00000002; + repeat_ = value; + onChanged(); + return this; + } + public Builder clearRepeat() { + bitField0_ = (bitField0_ & ~0x00000002); + repeat_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.ComputeSplitPointsBySizeResponse.SplitLocation) } - // required int64 creation_time = 3; - private long creationTime_ ; - public boolean hasCreationTime() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public long getCreationTime() { - return creationTime_; - } - public Builder setCreationTime(long value) { - bitField0_ |= 0x00000004; - creationTime_ = value; - onChanged(); - return this; - } - public Builder clearCreationTime() { - bitField0_ = (bitField0_ & ~0x00000004); - creationTime_ = 0L; - onChanged(); - return this; + static { + defaultInstance = new SplitLocation(true); + defaultInstance.initFields(); } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.Stream) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.ComputeSplitPointsBySizeResponse.SplitLocation) } - static { - defaultInstance = new Stream(true); - defaultInstance.initFields(); + private int bitField0_; + // required .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 1; + public static final int CONSUMED_FIELD_NUMBER = 1; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity consumed_; + public boolean hasConsumed() { + return ((bitField0_ & 0x00000001) == 0x00000001); } - - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.Stream) - } - - public interface ListStreamResponseOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // repeated .com.alicloud.openservices.tablestore.core.protocol.Stream streams = 1; - java.util.List - getStreamsList(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream getStreams(int index); - int getStreamsCount(); - java.util.List - getStreamsOrBuilderList(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamOrBuilder getStreamsOrBuilder( - int index); - } - public static final class ListStreamResponse extends - com.google.protobuf.GeneratedMessage - implements ListStreamResponseOrBuilder { - // Use ListStreamResponse.newBuilder() to construct. - private ListStreamResponse(Builder builder) { - super(builder); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed() { + return consumed_; } - private ListStreamResponse(boolean noInit) {} - - private static final ListStreamResponse defaultInstance; - public static ListStreamResponse getDefaultInstance() { - return defaultInstance; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder() { + return consumed_; } - public ListStreamResponse getDefaultInstanceForType() { - return defaultInstance; + // repeated .com.alicloud.openservices.tablestore.core.protocol.PrimaryKeySchema schema = 2; + public static final int SCHEMA_FIELD_NUMBER = 2; + private java.util.List schema_; + public java.util.List getSchemaList() { + return schema_; } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListStreamResponse_descriptor; + public java.util.List + getSchemaOrBuilderList() { + return schema_; + } + public int getSchemaCount() { + return schema_.size(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchema getSchema(int index) { + return schema_.get(index); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchemaOrBuilder getSchemaOrBuilder( + int index) { + return schema_.get(index); } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListStreamResponse_fieldAccessorTable; + // repeated bytes split_points = 3; + public static final int SPLIT_POINTS_FIELD_NUMBER = 3; + private java.util.List splitPoints_; + public java.util.List + getSplitPointsList() { + return splitPoints_; + } + public int getSplitPointsCount() { + return splitPoints_.size(); + } + public com.google.protobuf.ByteString getSplitPoints(int index) { + return splitPoints_.get(index); } - // repeated .com.alicloud.openservices.tablestore.core.protocol.Stream streams = 1; - public static final int STREAMS_FIELD_NUMBER = 1; - private java.util.List streams_; - public java.util.List getStreamsList() { - return streams_; + // repeated .com.alicloud.openservices.tablestore.core.protocol.ComputeSplitPointsBySizeResponse.SplitLocation locations = 4; + public static final int LOCATIONS_FIELD_NUMBER = 4; + private java.util.List locations_; + public java.util.List getLocationsList() { + return locations_; } - public java.util.List - getStreamsOrBuilderList() { - return streams_; + public java.util.List + getLocationsOrBuilderList() { + return locations_; } - public int getStreamsCount() { - return streams_.size(); + public int getLocationsCount() { + return locations_.size(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream getStreams(int index) { - return streams_.get(index); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation getLocations(int index) { + return locations_.get(index); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamOrBuilder getStreamsOrBuilder( + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocationOrBuilder getLocationsOrBuilder( int index) { - return streams_.get(index); + return locations_.get(index); } private void initFields() { - streams_ = java.util.Collections.emptyList(); + consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); + schema_ = java.util.Collections.emptyList(); + splitPoints_ = java.util.Collections.emptyList();; + locations_ = java.util.Collections.emptyList(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - for (int i = 0; i < getStreamsCount(); i++) { - if (!getStreams(i).isInitialized()) { + if (!hasConsumed()) { + memoizedIsInitialized = 0; + return false; + } + if (!getConsumed().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + for (int i = 0; i < getSchemaCount(); i++) { + if (!getSchema(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + for (int i = 0; i < getLocationsCount(); i++) { + if (!getLocations(i).isInitialized()) { memoizedIsInitialized = 0; return false; } @@ -36140,8 +47452,17 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - for (int i = 0; i < streams_.size(); i++) { - output.writeMessage(1, streams_.get(i)); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(1, consumed_); + } + for (int i = 0; i < schema_.size(); i++) { + output.writeMessage(2, schema_.get(i)); + } + for (int i = 0; i < splitPoints_.size(); i++) { + output.writeBytes(3, splitPoints_.get(i)); + } + for (int i = 0; i < locations_.size(); i++) { + output.writeMessage(4, locations_.get(i)); } getUnknownFields().writeTo(output); } @@ -36152,9 +47473,26 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - for (int i = 0; i < streams_.size(); i++) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, streams_.get(i)); + .computeMessageSize(1, consumed_); + } + for (int i = 0; i < schema_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, schema_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < splitPoints_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(splitPoints_.get(i)); + } + size += dataSize; + size += 1 * getSplitPointsList().size(); + } + for (int i = 0; i < locations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, locations_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -36168,41 +47506,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -36211,7 +47549,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -36222,12 +47560,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -36237,7 +47575,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -36250,18 +47588,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponseOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListStreamResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ComputeSplitPointsBySizeResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListStreamResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ComputeSplitPointsBySizeResponse_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -36272,7 +47610,9 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getStreamsFieldBuilder(); + getConsumedFieldBuilder(); + getSchemaFieldBuilder(); + getLocationsFieldBuilder(); } } private static Builder create() { @@ -36281,11 +47621,25 @@ private static Builder create() { public Builder clear() { super.clear(); - if (streamsBuilder_ == null) { - streams_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + if (consumedBuilder_ == null) { + consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); } else { - streamsBuilder_.clear(); + consumedBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (schemaBuilder_ == null) { + schema_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + schemaBuilder_.clear(); + } + splitPoints_ = java.util.Collections.emptyList();; + bitField0_ = (bitField0_ & ~0x00000004); + if (locationsBuilder_ == null) { + locations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + locationsBuilder_.clear(); } return this; } @@ -36296,24 +47650,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -36321,56 +47675,119 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListSt return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse(this); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse(this); int from_bitField0_ = bitField0_; - if (streamsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - streams_ = java.util.Collections.unmodifiableList(streams_); - bitField0_ = (bitField0_ & ~0x00000001); + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + if (consumedBuilder_ == null) { + result.consumed_ = consumed_; + } else { + result.consumed_ = consumedBuilder_.build(); + } + if (schemaBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { + schema_ = java.util.Collections.unmodifiableList(schema_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.schema_ = schema_; + } else { + result.schema_ = schemaBuilder_.build(); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + splitPoints_ = java.util.Collections.unmodifiableList(splitPoints_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.splitPoints_ = splitPoints_; + if (locationsBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008)) { + locations_ = java.util.Collections.unmodifiableList(locations_); + bitField0_ = (bitField0_ & ~0x00000008); } - result.streams_ = streams_; + result.locations_ = locations_; } else { - result.streams_ = streamsBuilder_.build(); + result.locations_ = locationsBuilder_.build(); } + result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse.getDefaultInstance()) return this; - if (streamsBuilder_ == null) { - if (!other.streams_.isEmpty()) { - if (streams_.isEmpty()) { - streams_ = other.streams_; - bitField0_ = (bitField0_ & ~0x00000001); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.getDefaultInstance()) return this; + if (other.hasConsumed()) { + mergeConsumed(other.getConsumed()); + } + if (schemaBuilder_ == null) { + if (!other.schema_.isEmpty()) { + if (schema_.isEmpty()) { + schema_ = other.schema_; + bitField0_ = (bitField0_ & ~0x00000002); } else { - ensureStreamsIsMutable(); - streams_.addAll(other.streams_); + ensureSchemaIsMutable(); + schema_.addAll(other.schema_); } onChanged(); } } else { - if (!other.streams_.isEmpty()) { - if (streamsBuilder_.isEmpty()) { - streamsBuilder_.dispose(); - streamsBuilder_ = null; - streams_ = other.streams_; - bitField0_ = (bitField0_ & ~0x00000001); - streamsBuilder_ = + if (!other.schema_.isEmpty()) { + if (schemaBuilder_.isEmpty()) { + schemaBuilder_.dispose(); + schemaBuilder_ = null; + schema_ = other.schema_; + bitField0_ = (bitField0_ & ~0x00000002); + schemaBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getStreamsFieldBuilder() : null; + getSchemaFieldBuilder() : null; } else { - streamsBuilder_.addAllMessages(other.streams_); + schemaBuilder_.addAllMessages(other.schema_); + } + } + } + if (!other.splitPoints_.isEmpty()) { + if (splitPoints_.isEmpty()) { + splitPoints_ = other.splitPoints_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureSplitPointsIsMutable(); + splitPoints_.addAll(other.splitPoints_); + } + onChanged(); + } + if (locationsBuilder_ == null) { + if (!other.locations_.isEmpty()) { + if (locations_.isEmpty()) { + locations_ = other.locations_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureLocationsIsMutable(); + locations_.addAll(other.locations_); + } + onChanged(); + } + } else { + if (!other.locations_.isEmpty()) { + if (locationsBuilder_.isEmpty()) { + locationsBuilder_.dispose(); + locationsBuilder_ = null; + locations_ = other.locations_; + bitField0_ = (bitField0_ & ~0x00000008); + locationsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getLocationsFieldBuilder() : null; + } else { + locationsBuilder_.addAllMessages(other.locations_); } } } @@ -36379,8 +47796,22 @@ public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsI } public final boolean isInitialized() { - for (int i = 0; i < getStreamsCount(); i++) { - if (!getStreams(i).isInitialized()) { + if (!hasConsumed()) { + + return false; + } + if (!getConsumed().isInitialized()) { + + return false; + } + for (int i = 0; i < getSchemaCount(); i++) { + if (!getSchema(i).isInitialized()) { + + return false; + } + } + for (int i = 0; i < getLocationsCount(); i++) { + if (!getLocations(i).isInitialized()) { return false; } @@ -36412,9 +47843,29 @@ public Builder mergeFrom( break; } case 10: { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream.newBuilder(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.newBuilder(); + if (hasConsumed()) { + subBuilder.mergeFrom(getConsumed()); + } input.readMessage(subBuilder, extensionRegistry); - addStreams(subBuilder.buildPartial()); + setConsumed(subBuilder.buildPartial()); + break; + } + case 18: { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchema.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchema.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addSchema(subBuilder.buildPartial()); + break; + } + case 26: { + ensureSplitPointsIsMutable(); + splitPoints_.add(input.readBytes()); + break; + } + case 34: { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addLocations(subBuilder.buildPartial()); break; } } @@ -36423,255 +47874,595 @@ public Builder mergeFrom( private int bitField0_; - // repeated .com.alicloud.openservices.tablestore.core.protocol.Stream streams = 1; - private java.util.List streams_ = + // required .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 1; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder> consumedBuilder_; + public boolean hasConsumed() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed() { + if (consumedBuilder_ == null) { + return consumed_; + } else { + return consumedBuilder_.getMessage(); + } + } + public Builder setConsumed(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity value) { + if (consumedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + consumed_ = value; + onChanged(); + } else { + consumedBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder setConsumed( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder builderForValue) { + if (consumedBuilder_ == null) { + consumed_ = builderForValue.build(); + onChanged(); + } else { + consumedBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder mergeConsumed(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity value) { + if (consumedBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001) && + consumed_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance()) { + consumed_ = + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.newBuilder(consumed_).mergeFrom(value).buildPartial(); + } else { + consumed_ = value; + } + onChanged(); + } else { + consumedBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder clearConsumed() { + if (consumedBuilder_ == null) { + consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); + onChanged(); + } else { + consumedBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder getConsumedBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getConsumedFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder() { + if (consumedBuilder_ != null) { + return consumedBuilder_.getMessageOrBuilder(); + } else { + return consumed_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder> + getConsumedFieldBuilder() { + if (consumedBuilder_ == null) { + consumedBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder>( + consumed_, + getParentForChildren(), + isClean()); + consumed_ = null; + } + return consumedBuilder_; + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.PrimaryKeySchema schema = 2; + private java.util.List schema_ = java.util.Collections.emptyList(); - private void ensureStreamsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - streams_ = new java.util.ArrayList(streams_); - bitField0_ |= 0x00000001; + private void ensureSchemaIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + schema_ = new java.util.ArrayList(schema_); + bitField0_ |= 0x00000002; } } private com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamOrBuilder> streamsBuilder_; + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchema, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchema.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchemaOrBuilder> schemaBuilder_; - public java.util.List getStreamsList() { - if (streamsBuilder_ == null) { - return java.util.Collections.unmodifiableList(streams_); + public java.util.List getSchemaList() { + if (schemaBuilder_ == null) { + return java.util.Collections.unmodifiableList(schema_); } else { - return streamsBuilder_.getMessageList(); + return schemaBuilder_.getMessageList(); } } - public int getStreamsCount() { - if (streamsBuilder_ == null) { - return streams_.size(); + public int getSchemaCount() { + if (schemaBuilder_ == null) { + return schema_.size(); } else { - return streamsBuilder_.getCount(); + return schemaBuilder_.getCount(); } } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream getStreams(int index) { - if (streamsBuilder_ == null) { - return streams_.get(index); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchema getSchema(int index) { + if (schemaBuilder_ == null) { + return schema_.get(index); } else { - return streamsBuilder_.getMessage(index); + return schemaBuilder_.getMessage(index); } } - public Builder setStreams( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream value) { - if (streamsBuilder_ == null) { + public Builder setSchema( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchema value) { + if (schemaBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureStreamsIsMutable(); - streams_.set(index, value); + ensureSchemaIsMutable(); + schema_.set(index, value); onChanged(); } else { - streamsBuilder_.setMessage(index, value); + schemaBuilder_.setMessage(index, value); } return this; } - public Builder setStreams( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream.Builder builderForValue) { - if (streamsBuilder_ == null) { - ensureStreamsIsMutable(); - streams_.set(index, builderForValue.build()); + public Builder setSchema( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchema.Builder builderForValue) { + if (schemaBuilder_ == null) { + ensureSchemaIsMutable(); + schema_.set(index, builderForValue.build()); + onChanged(); + } else { + schemaBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + public Builder addSchema(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchema value) { + if (schemaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSchemaIsMutable(); + schema_.add(value); + onChanged(); + } else { + schemaBuilder_.addMessage(value); + } + return this; + } + public Builder addSchema( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchema value) { + if (schemaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSchemaIsMutable(); + schema_.add(index, value); + onChanged(); + } else { + schemaBuilder_.addMessage(index, value); + } + return this; + } + public Builder addSchema( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchema.Builder builderForValue) { + if (schemaBuilder_ == null) { + ensureSchemaIsMutable(); + schema_.add(builderForValue.build()); + onChanged(); + } else { + schemaBuilder_.addMessage(builderForValue.build()); + } + return this; + } + public Builder addSchema( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchema.Builder builderForValue) { + if (schemaBuilder_ == null) { + ensureSchemaIsMutable(); + schema_.add(index, builderForValue.build()); + onChanged(); + } else { + schemaBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAllSchema( + java.lang.Iterable values) { + if (schemaBuilder_ == null) { + ensureSchemaIsMutable(); + super.addAll(values, schema_); + onChanged(); + } else { + schemaBuilder_.addAllMessages(values); + } + return this; + } + public Builder clearSchema() { + if (schemaBuilder_ == null) { + schema_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + schemaBuilder_.clear(); + } + return this; + } + public Builder removeSchema(int index) { + if (schemaBuilder_ == null) { + ensureSchemaIsMutable(); + schema_.remove(index); + onChanged(); + } else { + schemaBuilder_.remove(index); + } + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchema.Builder getSchemaBuilder( + int index) { + return getSchemaFieldBuilder().getBuilder(index); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchemaOrBuilder getSchemaOrBuilder( + int index) { + if (schemaBuilder_ == null) { + return schema_.get(index); } else { + return schemaBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getSchemaOrBuilderList() { + if (schemaBuilder_ != null) { + return schemaBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(schema_); + } + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchema.Builder addSchemaBuilder() { + return getSchemaFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchema.getDefaultInstance()); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchema.Builder addSchemaBuilder( + int index) { + return getSchemaFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchema.getDefaultInstance()); + } + public java.util.List + getSchemaBuilderList() { + return getSchemaFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchema, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchema.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchemaOrBuilder> + getSchemaFieldBuilder() { + if (schemaBuilder_ == null) { + schemaBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchema, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchema.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchemaOrBuilder>( + schema_, + ((bitField0_ & 0x00000002) == 0x00000002), + getParentForChildren(), + isClean()); + schema_ = null; + } + return schemaBuilder_; + } + + // repeated bytes split_points = 3; + private java.util.List splitPoints_ = java.util.Collections.emptyList();; + private void ensureSplitPointsIsMutable() { + if (!((bitField0_ & 0x00000004) == 0x00000004)) { + splitPoints_ = new java.util.ArrayList(splitPoints_); + bitField0_ |= 0x00000004; + } + } + public java.util.List + getSplitPointsList() { + return java.util.Collections.unmodifiableList(splitPoints_); + } + public int getSplitPointsCount() { + return splitPoints_.size(); + } + public com.google.protobuf.ByteString getSplitPoints(int index) { + return splitPoints_.get(index); + } + public Builder setSplitPoints( + int index, com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSplitPointsIsMutable(); + splitPoints_.set(index, value); + onChanged(); + return this; + } + public Builder addSplitPoints(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSplitPointsIsMutable(); + splitPoints_.add(value); + onChanged(); + return this; + } + public Builder addAllSplitPoints( + java.lang.Iterable values) { + ensureSplitPointsIsMutable(); + super.addAll(values, splitPoints_); + onChanged(); + return this; + } + public Builder clearSplitPoints() { + splitPoints_ = java.util.Collections.emptyList();; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.ComputeSplitPointsBySizeResponse.SplitLocation locations = 4; + private java.util.List locations_ = + java.util.Collections.emptyList(); + private void ensureLocationsIsMutable() { + if (!((bitField0_ & 0x00000008) == 0x00000008)) { + locations_ = new java.util.ArrayList(locations_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocationOrBuilder> locationsBuilder_; + + public java.util.List getLocationsList() { + if (locationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(locations_); + } else { + return locationsBuilder_.getMessageList(); + } + } + public int getLocationsCount() { + if (locationsBuilder_ == null) { + return locations_.size(); + } else { + return locationsBuilder_.getCount(); + } + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation getLocations(int index) { + if (locationsBuilder_ == null) { + return locations_.get(index); + } else { + return locationsBuilder_.getMessage(index); + } + } + public Builder setLocations( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation value) { + if (locationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocationsIsMutable(); + locations_.set(index, value); + onChanged(); + } else { + locationsBuilder_.setMessage(index, value); + } + return this; + } + public Builder setLocations( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation.Builder builderForValue) { + if (locationsBuilder_ == null) { + ensureLocationsIsMutable(); + locations_.set(index, builderForValue.build()); onChanged(); } else { - streamsBuilder_.setMessage(index, builderForValue.build()); + locationsBuilder_.setMessage(index, builderForValue.build()); } return this; } - public Builder addStreams(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream value) { - if (streamsBuilder_ == null) { + public Builder addLocations(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation value) { + if (locationsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureStreamsIsMutable(); - streams_.add(value); + ensureLocationsIsMutable(); + locations_.add(value); onChanged(); } else { - streamsBuilder_.addMessage(value); + locationsBuilder_.addMessage(value); } return this; } - public Builder addStreams( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream value) { - if (streamsBuilder_ == null) { + public Builder addLocations( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation value) { + if (locationsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureStreamsIsMutable(); - streams_.add(index, value); + ensureLocationsIsMutable(); + locations_.add(index, value); onChanged(); } else { - streamsBuilder_.addMessage(index, value); + locationsBuilder_.addMessage(index, value); } return this; } - public Builder addStreams( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream.Builder builderForValue) { - if (streamsBuilder_ == null) { - ensureStreamsIsMutable(); - streams_.add(builderForValue.build()); + public Builder addLocations( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation.Builder builderForValue) { + if (locationsBuilder_ == null) { + ensureLocationsIsMutable(); + locations_.add(builderForValue.build()); onChanged(); } else { - streamsBuilder_.addMessage(builderForValue.build()); + locationsBuilder_.addMessage(builderForValue.build()); } return this; } - public Builder addStreams( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream.Builder builderForValue) { - if (streamsBuilder_ == null) { - ensureStreamsIsMutable(); - streams_.add(index, builderForValue.build()); + public Builder addLocations( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation.Builder builderForValue) { + if (locationsBuilder_ == null) { + ensureLocationsIsMutable(); + locations_.add(index, builderForValue.build()); onChanged(); } else { - streamsBuilder_.addMessage(index, builderForValue.build()); + locationsBuilder_.addMessage(index, builderForValue.build()); } return this; } - public Builder addAllStreams( - java.lang.Iterable values) { - if (streamsBuilder_ == null) { - ensureStreamsIsMutable(); - super.addAll(values, streams_); + public Builder addAllLocations( + java.lang.Iterable values) { + if (locationsBuilder_ == null) { + ensureLocationsIsMutable(); + super.addAll(values, locations_); onChanged(); } else { - streamsBuilder_.addAllMessages(values); + locationsBuilder_.addAllMessages(values); } return this; } - public Builder clearStreams() { - if (streamsBuilder_ == null) { - streams_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + public Builder clearLocations() { + if (locationsBuilder_ == null) { + locations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); } else { - streamsBuilder_.clear(); + locationsBuilder_.clear(); } return this; } - public Builder removeStreams(int index) { - if (streamsBuilder_ == null) { - ensureStreamsIsMutable(); - streams_.remove(index); + public Builder removeLocations(int index) { + if (locationsBuilder_ == null) { + ensureLocationsIsMutable(); + locations_.remove(index); onChanged(); } else { - streamsBuilder_.remove(index); + locationsBuilder_.remove(index); } return this; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream.Builder getStreamsBuilder( + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation.Builder getLocationsBuilder( int index) { - return getStreamsFieldBuilder().getBuilder(index); + return getLocationsFieldBuilder().getBuilder(index); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamOrBuilder getStreamsOrBuilder( + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocationOrBuilder getLocationsOrBuilder( int index) { - if (streamsBuilder_ == null) { - return streams_.get(index); } else { - return streamsBuilder_.getMessageOrBuilder(index); + if (locationsBuilder_ == null) { + return locations_.get(index); } else { + return locationsBuilder_.getMessageOrBuilder(index); } } - public java.util.List - getStreamsOrBuilderList() { - if (streamsBuilder_ != null) { - return streamsBuilder_.getMessageOrBuilderList(); + public java.util.List + getLocationsOrBuilderList() { + if (locationsBuilder_ != null) { + return locationsBuilder_.getMessageOrBuilderList(); } else { - return java.util.Collections.unmodifiableList(streams_); + return java.util.Collections.unmodifiableList(locations_); } } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream.Builder addStreamsBuilder() { - return getStreamsFieldBuilder().addBuilder( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream.getDefaultInstance()); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation.Builder addLocationsBuilder() { + return getLocationsFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation.getDefaultInstance()); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream.Builder addStreamsBuilder( + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation.Builder addLocationsBuilder( int index) { - return getStreamsFieldBuilder().addBuilder( - index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream.getDefaultInstance()); + return getLocationsFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation.getDefaultInstance()); } - public java.util.List - getStreamsBuilderList() { - return getStreamsFieldBuilder().getBuilderList(); + public java.util.List + getLocationsBuilderList() { + return getLocationsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamOrBuilder> - getStreamsFieldBuilder() { - if (streamsBuilder_ == null) { - streamsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamOrBuilder>( - streams_, - ((bitField0_ & 0x00000001) == 0x00000001), + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocationOrBuilder> + getLocationsFieldBuilder() { + if (locationsBuilder_ == null) { + locationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocationOrBuilder>( + locations_, + ((bitField0_ & 0x00000008) == 0x00000008), getParentForChildren(), isClean()); - streams_ = null; + locations_ = null; } - return streamsBuilder_; + return locationsBuilder_; } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.ListStreamResponse) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.ComputeSplitPointsBySizeResponse) } static { - defaultInstance = new ListStreamResponse(true); + defaultInstance = new ComputeSplitPointsBySizeResponse(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.ListStreamResponse) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.ComputeSplitPointsBySizeResponse) } - public interface StreamShardOrBuilder + public interface BulkExportRequestOrBuilder extends com.google.protobuf.MessageOrBuilder { - // required string shard_id = 1; - boolean hasShardId(); - String getShardId(); + // required string table_name = 1; + boolean hasTableName(); + String getTableName(); - // optional string parent_id = 2; - boolean hasParentId(); - String getParentId(); + // repeated string columns_to_get = 2; + java.util.List getColumnsToGetList(); + int getColumnsToGetCount(); + String getColumnsToGet(int index); - // optional string parent_sibling_id = 3; - boolean hasParentSiblingId(); - String getParentSiblingId(); + // required bytes inclusive_start_primary_key = 3; + boolean hasInclusiveStartPrimaryKey(); + com.google.protobuf.ByteString getInclusiveStartPrimaryKey(); + + // required bytes exclusive_end_primary_key = 4; + boolean hasExclusiveEndPrimaryKey(); + com.google.protobuf.ByteString getExclusiveEndPrimaryKey(); + + // optional bytes filter = 5; + boolean hasFilter(); + com.google.protobuf.ByteString getFilter(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.DataBlockType data_block_type_hint = 6 [default = DBT_SIMPLE_ROW_MATRIX]; + boolean hasDataBlockTypeHint(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DataBlockType getDataBlockTypeHint(); } - public static final class StreamShard extends + public static final class BulkExportRequest extends com.google.protobuf.GeneratedMessage - implements StreamShardOrBuilder { - // Use StreamShard.newBuilder() to construct. - private StreamShard(Builder builder) { + implements BulkExportRequestOrBuilder { + // Use BulkExportRequest.newBuilder() to construct. + private BulkExportRequest(Builder builder) { super(builder); } - private StreamShard(boolean noInit) {} + private BulkExportRequest(boolean noInit) {} - private static final StreamShard defaultInstance; - public static StreamShard getDefaultInstance() { + private static final BulkExportRequest defaultInstance; + public static BulkExportRequest getDefaultInstance() { return defaultInstance; } - public StreamShard getDefaultInstanceForType() { + public BulkExportRequest getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_StreamShard_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_BulkExportRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_StreamShard_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_BulkExportRequest_fieldAccessorTable; } private int bitField0_; - // required string shard_id = 1; - public static final int SHARD_ID_FIELD_NUMBER = 1; - private java.lang.Object shardId_; - public boolean hasShardId() { + // required string table_name = 1; + public static final int TABLE_NAME_FIELD_NUMBER = 1; + private java.lang.Object tableName_; + public boolean hasTableName() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getShardId() { - java.lang.Object ref = shardId_; + public String getTableName() { + java.lang.Object ref = tableName_; if (ref instanceof String) { return (String) ref; } else { @@ -36679,98 +48470,99 @@ public String getShardId() { (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); if (com.google.protobuf.Internal.isValidUtf8(bs)) { - shardId_ = s; + tableName_ = s; } return s; } } - private com.google.protobuf.ByteString getShardIdBytes() { - java.lang.Object ref = shardId_; + private com.google.protobuf.ByteString getTableNameBytes() { + java.lang.Object ref = tableName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((String) ref); - shardId_ = b; + tableName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - // optional string parent_id = 2; - public static final int PARENT_ID_FIELD_NUMBER = 2; - private java.lang.Object parentId_; - public boolean hasParentId() { - return ((bitField0_ & 0x00000002) == 0x00000002); + // repeated string columns_to_get = 2; + public static final int COLUMNS_TO_GET_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList columnsToGet_; + public java.util.List + getColumnsToGetList() { + return columnsToGet_; } - public String getParentId() { - java.lang.Object ref = parentId_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - parentId_ = s; - } - return s; - } + public int getColumnsToGetCount() { + return columnsToGet_.size(); } - private com.google.protobuf.ByteString getParentIdBytes() { - java.lang.Object ref = parentId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - parentId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public String getColumnsToGet(int index) { + return columnsToGet_.get(index); } - // optional string parent_sibling_id = 3; - public static final int PARENT_SIBLING_ID_FIELD_NUMBER = 3; - private java.lang.Object parentSiblingId_; - public boolean hasParentSiblingId() { + // required bytes inclusive_start_primary_key = 3; + public static final int INCLUSIVE_START_PRIMARY_KEY_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString inclusiveStartPrimaryKey_; + public boolean hasInclusiveStartPrimaryKey() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getInclusiveStartPrimaryKey() { + return inclusiveStartPrimaryKey_; + } + + // required bytes exclusive_end_primary_key = 4; + public static final int EXCLUSIVE_END_PRIMARY_KEY_FIELD_NUMBER = 4; + private com.google.protobuf.ByteString exclusiveEndPrimaryKey_; + public boolean hasExclusiveEndPrimaryKey() { return ((bitField0_ & 0x00000004) == 0x00000004); } - public String getParentSiblingId() { - java.lang.Object ref = parentSiblingId_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - parentSiblingId_ = s; - } - return s; - } + public com.google.protobuf.ByteString getExclusiveEndPrimaryKey() { + return exclusiveEndPrimaryKey_; } - private com.google.protobuf.ByteString getParentSiblingIdBytes() { - java.lang.Object ref = parentSiblingId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - parentSiblingId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + + // optional bytes filter = 5; + public static final int FILTER_FIELD_NUMBER = 5; + private com.google.protobuf.ByteString filter_; + public boolean hasFilter() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.google.protobuf.ByteString getFilter() { + return filter_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.DataBlockType data_block_type_hint = 6 [default = DBT_SIMPLE_ROW_MATRIX]; + public static final int DATA_BLOCK_TYPE_HINT_FIELD_NUMBER = 6; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DataBlockType dataBlockTypeHint_; + public boolean hasDataBlockTypeHint() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DataBlockType getDataBlockTypeHint() { + return dataBlockTypeHint_; } private void initFields() { - shardId_ = ""; - parentId_ = ""; - parentSiblingId_ = ""; + tableName_ = ""; + columnsToGet_ = com.google.protobuf.LazyStringArrayList.EMPTY; + inclusiveStartPrimaryKey_ = com.google.protobuf.ByteString.EMPTY; + exclusiveEndPrimaryKey_ = com.google.protobuf.ByteString.EMPTY; + filter_ = com.google.protobuf.ByteString.EMPTY; + dataBlockTypeHint_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DataBlockType.DBT_SIMPLE_ROW_MATRIX; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - if (!hasShardId()) { + if (!hasTableName()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasInclusiveStartPrimaryKey()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasExclusiveEndPrimaryKey()) { memoizedIsInitialized = 0; return false; } @@ -36782,13 +48574,22 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getShardIdBytes()); + output.writeBytes(1, getTableNameBytes()); + } + for (int i = 0; i < columnsToGet_.size(); i++) { + output.writeBytes(2, columnsToGet_.getByteString(i)); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getParentIdBytes()); + output.writeBytes(3, inclusiveStartPrimaryKey_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeBytes(3, getParentSiblingIdBytes()); + output.writeBytes(4, exclusiveEndPrimaryKey_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeBytes(5, filter_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeEnum(6, dataBlockTypeHint_.getNumber()); } getUnknownFields().writeTo(output); } @@ -36801,15 +48602,32 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getShardIdBytes()); + .computeBytesSize(1, getTableNameBytes()); + } + { + int dataSize = 0; + for (int i = 0; i < columnsToGet_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(columnsToGet_.getByteString(i)); + } + size += dataSize; + size += 1 * getColumnsToGetList().size(); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getParentIdBytes()); + .computeBytesSize(3, inclusiveStartPrimaryKey_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(3, getParentSiblingIdBytes()); + .computeBytesSize(4, exclusiveEndPrimaryKey_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(5, filter_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(6, dataBlockTypeHint_.getNumber()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -36823,41 +48641,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -36866,7 +48684,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -36877,12 +48695,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -36892,7 +48710,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportRequest prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -36905,18 +48723,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShardOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_StreamShard_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_BulkExportRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_StreamShard_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_BulkExportRequest_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -36935,12 +48753,18 @@ private static Builder create() { public Builder clear() { super.clear(); - shardId_ = ""; + tableName_ = ""; bitField0_ = (bitField0_ & ~0x00000001); - parentId_ = ""; + columnsToGet_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); - parentSiblingId_ = ""; + inclusiveStartPrimaryKey_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000004); + exclusiveEndPrimaryKey_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + filter_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000010); + dataBlockTypeHint_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DataBlockType.DBT_SIMPLE_ROW_MATRIX; + bitField0_ = (bitField0_ & ~0x00000020); return this; } @@ -36950,24 +48774,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportRequest.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportRequest.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportRequest build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportRequest buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -36975,53 +48799,91 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard(this); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportRequest(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.shardId_ = shardId_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; + result.tableName_ = tableName_; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + columnsToGet_ = new com.google.protobuf.UnmodifiableLazyStringList( + columnsToGet_); + bitField0_ = (bitField0_ & ~0x00000002); } - result.parentId_ = parentId_; + result.columnsToGet_ = columnsToGet_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000002; + } + result.inclusiveStartPrimaryKey_ = inclusiveStartPrimaryKey_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000004; } - result.parentSiblingId_ = parentSiblingId_; + result.exclusiveEndPrimaryKey_ = exclusiveEndPrimaryKey_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000008; + } + result.filter_ = filter_; + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000010; + } + result.dataBlockTypeHint_ = dataBlockTypeHint_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportRequest)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard.getDefaultInstance()) return this; - if (other.hasShardId()) { - setShardId(other.getShardId()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportRequest.getDefaultInstance()) return this; + if (other.hasTableName()) { + setTableName(other.getTableName()); } - if (other.hasParentId()) { - setParentId(other.getParentId()); + if (!other.columnsToGet_.isEmpty()) { + if (columnsToGet_.isEmpty()) { + columnsToGet_ = other.columnsToGet_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureColumnsToGetIsMutable(); + columnsToGet_.addAll(other.columnsToGet_); + } + onChanged(); } - if (other.hasParentSiblingId()) { - setParentSiblingId(other.getParentSiblingId()); + if (other.hasInclusiveStartPrimaryKey()) { + setInclusiveStartPrimaryKey(other.getInclusiveStartPrimaryKey()); + } + if (other.hasExclusiveEndPrimaryKey()) { + setExclusiveEndPrimaryKey(other.getExclusiveEndPrimaryKey()); + } + if (other.hasFilter()) { + setFilter(other.getFilter()); + } + if (other.hasDataBlockTypeHint()) { + setDataBlockTypeHint(other.getDataBlockTypeHint()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { - if (!hasShardId()) { + if (!hasTableName()) { + + return false; + } + if (!hasInclusiveStartPrimaryKey()) { + + return false; + } + if (!hasExclusiveEndPrimaryKey()) { return false; } @@ -37053,17 +48915,38 @@ public Builder mergeFrom( } case 10: { bitField0_ |= 0x00000001; - shardId_ = input.readBytes(); + tableName_ = input.readBytes(); break; } case 18: { - bitField0_ |= 0x00000002; - parentId_ = input.readBytes(); + ensureColumnsToGetIsMutable(); + columnsToGet_.add(input.readBytes()); break; } case 26: { bitField0_ |= 0x00000004; - parentSiblingId_ = input.readBytes(); + inclusiveStartPrimaryKey_ = input.readBytes(); + break; + } + case 34: { + bitField0_ |= 0x00000008; + exclusiveEndPrimaryKey_ = input.readBytes(); + break; + } + case 42: { + bitField0_ |= 0x00000010; + filter_ = input.readBytes(); + break; + } + case 48: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DataBlockType value = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DataBlockType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(6, rawValue); + } else { + bitField0_ |= 0x00000020; + dataBlockTypeHint_ = value; + } break; } } @@ -37072,254 +48955,317 @@ public Builder mergeFrom( private int bitField0_; - // required string shard_id = 1; - private java.lang.Object shardId_ = ""; - public boolean hasShardId() { + // required string table_name = 1; + private java.lang.Object tableName_ = ""; + public boolean hasTableName() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getShardId() { - java.lang.Object ref = shardId_; + public String getTableName() { + java.lang.Object ref = tableName_; if (!(ref instanceof String)) { String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - shardId_ = s; + tableName_ = s; return s; } else { return (String) ref; } } - public Builder setShardId(String value) { + public Builder setTableName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + return this; + } + public Builder clearTableName() { + bitField0_ = (bitField0_ & ~0x00000001); + tableName_ = getDefaultInstance().getTableName(); + onChanged(); + return this; + } + void setTableName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + } + + // repeated string columns_to_get = 2; + private com.google.protobuf.LazyStringList columnsToGet_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureColumnsToGetIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + columnsToGet_ = new com.google.protobuf.LazyStringArrayList(columnsToGet_); + bitField0_ |= 0x00000002; + } + } + public java.util.List + getColumnsToGetList() { + return java.util.Collections.unmodifiableList(columnsToGet_); + } + public int getColumnsToGetCount() { + return columnsToGet_.size(); + } + public String getColumnsToGet(int index) { + return columnsToGet_.get(index); + } + public Builder setColumnsToGet( + int index, String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureColumnsToGetIsMutable(); + columnsToGet_.set(index, value); + onChanged(); + return this; + } + public Builder addColumnsToGet(String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000001; - shardId_ = value; + ensureColumnsToGetIsMutable(); + columnsToGet_.add(value); onChanged(); return this; } - public Builder clearShardId() { - bitField0_ = (bitField0_ & ~0x00000001); - shardId_ = getDefaultInstance().getShardId(); + public Builder addAllColumnsToGet( + java.lang.Iterable values) { + ensureColumnsToGetIsMutable(); + super.addAll(values, columnsToGet_); onChanged(); return this; } - void setShardId(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; - shardId_ = value; + public Builder clearColumnsToGet() { + columnsToGet_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + void addColumnsToGet(com.google.protobuf.ByteString value) { + ensureColumnsToGetIsMutable(); + columnsToGet_.add(value); onChanged(); } - // optional string parent_id = 2; - private java.lang.Object parentId_ = ""; - public boolean hasParentId() { - return ((bitField0_ & 0x00000002) == 0x00000002); + // required bytes inclusive_start_primary_key = 3; + private com.google.protobuf.ByteString inclusiveStartPrimaryKey_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasInclusiveStartPrimaryKey() { + return ((bitField0_ & 0x00000004) == 0x00000004); } - public String getParentId() { - java.lang.Object ref = parentId_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - parentId_ = s; - return s; - } else { - return (String) ref; - } + public com.google.protobuf.ByteString getInclusiveStartPrimaryKey() { + return inclusiveStartPrimaryKey_; } - public Builder setParentId(String value) { + public Builder setInclusiveStartPrimaryKey(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000002; - parentId_ = value; + bitField0_ |= 0x00000004; + inclusiveStartPrimaryKey_ = value; onChanged(); return this; } - public Builder clearParentId() { - bitField0_ = (bitField0_ & ~0x00000002); - parentId_ = getDefaultInstance().getParentId(); + public Builder clearInclusiveStartPrimaryKey() { + bitField0_ = (bitField0_ & ~0x00000004); + inclusiveStartPrimaryKey_ = getDefaultInstance().getInclusiveStartPrimaryKey(); onChanged(); return this; } - void setParentId(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000002; - parentId_ = value; + + // required bytes exclusive_end_primary_key = 4; + private com.google.protobuf.ByteString exclusiveEndPrimaryKey_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasExclusiveEndPrimaryKey() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.google.protobuf.ByteString getExclusiveEndPrimaryKey() { + return exclusiveEndPrimaryKey_; + } + public Builder setExclusiveEndPrimaryKey(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + exclusiveEndPrimaryKey_ = value; + onChanged(); + return this; + } + public Builder clearExclusiveEndPrimaryKey() { + bitField0_ = (bitField0_ & ~0x00000008); + exclusiveEndPrimaryKey_ = getDefaultInstance().getExclusiveEndPrimaryKey(); onChanged(); + return this; } - // optional string parent_sibling_id = 3; - private java.lang.Object parentSiblingId_ = ""; - public boolean hasParentSiblingId() { - return ((bitField0_ & 0x00000004) == 0x00000004); + // optional bytes filter = 5; + private com.google.protobuf.ByteString filter_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasFilter() { + return ((bitField0_ & 0x00000010) == 0x00000010); } - public String getParentSiblingId() { - java.lang.Object ref = parentSiblingId_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - parentSiblingId_ = s; - return s; - } else { - return (String) ref; - } + public com.google.protobuf.ByteString getFilter() { + return filter_; } - public Builder setParentSiblingId(String value) { + public Builder setFilter(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000004; - parentSiblingId_ = value; + bitField0_ |= 0x00000010; + filter_ = value; onChanged(); return this; } - public Builder clearParentSiblingId() { - bitField0_ = (bitField0_ & ~0x00000004); - parentSiblingId_ = getDefaultInstance().getParentSiblingId(); + public Builder clearFilter() { + bitField0_ = (bitField0_ & ~0x00000010); + filter_ = getDefaultInstance().getFilter(); onChanged(); return this; } - void setParentSiblingId(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000004; - parentSiblingId_ = value; + + // optional .com.alicloud.openservices.tablestore.core.protocol.DataBlockType data_block_type_hint = 6 [default = DBT_SIMPLE_ROW_MATRIX]; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DataBlockType dataBlockTypeHint_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DataBlockType.DBT_SIMPLE_ROW_MATRIX; + public boolean hasDataBlockTypeHint() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DataBlockType getDataBlockTypeHint() { + return dataBlockTypeHint_; + } + public Builder setDataBlockTypeHint(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DataBlockType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + dataBlockTypeHint_ = value; + onChanged(); + return this; + } + public Builder clearDataBlockTypeHint() { + bitField0_ = (bitField0_ & ~0x00000020); + dataBlockTypeHint_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DataBlockType.DBT_SIMPLE_ROW_MATRIX; onChanged(); + return this; } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.StreamShard) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.BulkExportRequest) } static { - defaultInstance = new StreamShard(true); + defaultInstance = new BulkExportRequest(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.StreamShard) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.BulkExportRequest) } - public interface DescribeStreamRequestOrBuilder + public interface BulkExportResponseOrBuilder extends com.google.protobuf.MessageOrBuilder { - // required string stream_id = 1; - boolean hasStreamId(); - String getStreamId(); + // required .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 1; + boolean hasConsumed(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder(); - // optional string inclusive_start_shard_id = 2; - boolean hasInclusiveStartShardId(); - String getInclusiveStartShardId(); + // required bytes rows = 2; + boolean hasRows(); + com.google.protobuf.ByteString getRows(); - // optional int32 shard_limit = 3; - boolean hasShardLimit(); - int getShardLimit(); + // optional bytes next_start_primary_key = 3; + boolean hasNextStartPrimaryKey(); + com.google.protobuf.ByteString getNextStartPrimaryKey(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.DataBlockType data_block_type = 4; + boolean hasDataBlockType(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DataBlockType getDataBlockType(); } - public static final class DescribeStreamRequest extends + public static final class BulkExportResponse extends com.google.protobuf.GeneratedMessage - implements DescribeStreamRequestOrBuilder { - // Use DescribeStreamRequest.newBuilder() to construct. - private DescribeStreamRequest(Builder builder) { + implements BulkExportResponseOrBuilder { + // Use BulkExportResponse.newBuilder() to construct. + private BulkExportResponse(Builder builder) { super(builder); } - private DescribeStreamRequest(boolean noInit) {} + private BulkExportResponse(boolean noInit) {} - private static final DescribeStreamRequest defaultInstance; - public static DescribeStreamRequest getDefaultInstance() { + private static final BulkExportResponse defaultInstance; + public static BulkExportResponse getDefaultInstance() { return defaultInstance; } - public DescribeStreamRequest getDefaultInstanceForType() { + public BulkExportResponse getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeStreamRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_BulkExportResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeStreamRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_BulkExportResponse_fieldAccessorTable; } private int bitField0_; - // required string stream_id = 1; - public static final int STREAM_ID_FIELD_NUMBER = 1; - private java.lang.Object streamId_; - public boolean hasStreamId() { + // required .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 1; + public static final int CONSUMED_FIELD_NUMBER = 1; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity consumed_; + public boolean hasConsumed() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getStreamId() { - java.lang.Object ref = streamId_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - streamId_ = s; - } - return s; - } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed() { + return consumed_; } - private com.google.protobuf.ByteString getStreamIdBytes() { - java.lang.Object ref = streamId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - streamId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder() { + return consumed_; } - // optional string inclusive_start_shard_id = 2; - public static final int INCLUSIVE_START_SHARD_ID_FIELD_NUMBER = 2; - private java.lang.Object inclusiveStartShardId_; - public boolean hasInclusiveStartShardId() { + // required bytes rows = 2; + public static final int ROWS_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString rows_; + public boolean hasRows() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public String getInclusiveStartShardId() { - java.lang.Object ref = inclusiveStartShardId_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - inclusiveStartShardId_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getInclusiveStartShardIdBytes() { - java.lang.Object ref = inclusiveStartShardId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - inclusiveStartShardId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public com.google.protobuf.ByteString getRows() { + return rows_; } - // optional int32 shard_limit = 3; - public static final int SHARD_LIMIT_FIELD_NUMBER = 3; - private int shardLimit_; - public boolean hasShardLimit() { + // optional bytes next_start_primary_key = 3; + public static final int NEXT_START_PRIMARY_KEY_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString nextStartPrimaryKey_; + public boolean hasNextStartPrimaryKey() { return ((bitField0_ & 0x00000004) == 0x00000004); } - public int getShardLimit() { - return shardLimit_; + public com.google.protobuf.ByteString getNextStartPrimaryKey() { + return nextStartPrimaryKey_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.DataBlockType data_block_type = 4; + public static final int DATA_BLOCK_TYPE_FIELD_NUMBER = 4; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DataBlockType dataBlockType_; + public boolean hasDataBlockType() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DataBlockType getDataBlockType() { + return dataBlockType_; } private void initFields() { - streamId_ = ""; - inclusiveStartShardId_ = ""; - shardLimit_ = 0; + consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); + rows_ = com.google.protobuf.ByteString.EMPTY; + nextStartPrimaryKey_ = com.google.protobuf.ByteString.EMPTY; + dataBlockType_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DataBlockType.DBT_PLAIN_BUFFER; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - if (!hasStreamId()) { + if (!hasConsumed()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasRows()) { + memoizedIsInitialized = 0; + return false; + } + if (!getConsumed().isInitialized()) { memoizedIsInitialized = 0; return false; } @@ -37331,13 +49277,16 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getStreamIdBytes()); + output.writeMessage(1, consumed_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getInclusiveStartShardIdBytes()); + output.writeBytes(2, rows_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeInt32(3, shardLimit_); + output.writeBytes(3, nextStartPrimaryKey_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeEnum(4, dataBlockType_.getNumber()); } getUnknownFields().writeTo(output); } @@ -37350,15 +49299,19 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getStreamIdBytes()); + .computeMessageSize(1, consumed_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getInclusiveStartShardIdBytes()); + .computeBytesSize(2, rows_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, shardLimit_); + .computeBytesSize(3, nextStartPrimaryKey_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, dataBlockType_.getNumber()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -37372,41 +49325,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -37415,7 +49368,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -37426,12 +49379,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -37441,7 +49394,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportResponse prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -37454,18 +49407,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequestOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeStreamRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_BulkExportResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeStreamRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_BulkExportResponse_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -37476,6 +49429,7 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getConsumedFieldBuilder(); } } private static Builder create() { @@ -37484,12 +49438,18 @@ private static Builder create() { public Builder clear() { super.clear(); - streamId_ = ""; + if (consumedBuilder_ == null) { + consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); + } else { + consumedBuilder_.clear(); + } bitField0_ = (bitField0_ & ~0x00000001); - inclusiveStartShardId_ = ""; + rows_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); - shardLimit_ = 0; + nextStartPrimaryKey_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000004); + dataBlockType_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DataBlockType.DBT_PLAIN_BUFFER; + bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -37499,24 +49459,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportResponse.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportResponse.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportResponse build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportResponse buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -37524,53 +49484,72 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Descri return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest(this); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportResponse(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.streamId_ = streamId_; + if (consumedBuilder_ == null) { + result.consumed_ = consumed_; + } else { + result.consumed_ = consumedBuilder_.build(); + } if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - result.inclusiveStartShardId_ = inclusiveStartShardId_; + result.rows_ = rows_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } - result.shardLimit_ = shardLimit_; + result.nextStartPrimaryKey_ = nextStartPrimaryKey_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.dataBlockType_ = dataBlockType_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportResponse)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest.getDefaultInstance()) return this; - if (other.hasStreamId()) { - setStreamId(other.getStreamId()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportResponse.getDefaultInstance()) return this; + if (other.hasConsumed()) { + mergeConsumed(other.getConsumed()); } - if (other.hasInclusiveStartShardId()) { - setInclusiveStartShardId(other.getInclusiveStartShardId()); + if (other.hasRows()) { + setRows(other.getRows()); } - if (other.hasShardLimit()) { - setShardLimit(other.getShardLimit()); + if (other.hasNextStartPrimaryKey()) { + setNextStartPrimaryKey(other.getNextStartPrimaryKey()); + } + if (other.hasDataBlockType()) { + setDataBlockType(other.getDataBlockType()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { - if (!hasStreamId()) { + if (!hasConsumed()) { + + return false; + } + if (!hasRows()) { + + return false; + } + if (!getConsumed().isInitialized()) { return false; } @@ -37601,18 +49580,33 @@ public Builder mergeFrom( break; } case 10: { - bitField0_ |= 0x00000001; - streamId_ = input.readBytes(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.newBuilder(); + if (hasConsumed()) { + subBuilder.mergeFrom(getConsumed()); + } + input.readMessage(subBuilder, extensionRegistry); + setConsumed(subBuilder.buildPartial()); break; } case 18: { bitField0_ |= 0x00000002; - inclusiveStartShardId_ = input.readBytes(); + rows_ = input.readBytes(); break; } - case 24: { + case 26: { bitField0_ |= 0x00000004; - shardLimit_ = input.readInt32(); + nextStartPrimaryKey_ = input.readBytes(); + break; + } + case 32: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DataBlockType value = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DataBlockType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(4, rawValue); + } else { + bitField0_ |= 0x00000008; + dataBlockType_ = value; + } break; } } @@ -37621,223 +49615,230 @@ public Builder mergeFrom( private int bitField0_; - // required string stream_id = 1; - private java.lang.Object streamId_ = ""; - public boolean hasStreamId() { + // required .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 1; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder> consumedBuilder_; + public boolean hasConsumed() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getStreamId() { - java.lang.Object ref = streamId_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - streamId_ = s; - return s; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed() { + if (consumedBuilder_ == null) { + return consumed_; } else { - return (String) ref; + return consumedBuilder_.getMessage(); } } - public Builder setStreamId(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - streamId_ = value; - onChanged(); + public Builder setConsumed(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity value) { + if (consumedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + consumed_ = value; + onChanged(); + } else { + consumedBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; return this; } - public Builder clearStreamId() { + public Builder setConsumed( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder builderForValue) { + if (consumedBuilder_ == null) { + consumed_ = builderForValue.build(); + onChanged(); + } else { + consumedBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder mergeConsumed(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity value) { + if (consumedBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001) && + consumed_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance()) { + consumed_ = + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.newBuilder(consumed_).mergeFrom(value).buildPartial(); + } else { + consumed_ = value; + } + onChanged(); + } else { + consumedBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder clearConsumed() { + if (consumedBuilder_ == null) { + consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); + onChanged(); + } else { + consumedBuilder_.clear(); + } bitField0_ = (bitField0_ & ~0x00000001); - streamId_ = getDefaultInstance().getStreamId(); - onChanged(); return this; } - void setStreamId(com.google.protobuf.ByteString value) { + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder getConsumedBuilder() { bitField0_ |= 0x00000001; - streamId_ = value; onChanged(); + return getConsumedFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder() { + if (consumedBuilder_ != null) { + return consumedBuilder_.getMessageOrBuilder(); + } else { + return consumed_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder> + getConsumedFieldBuilder() { + if (consumedBuilder_ == null) { + consumedBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder>( + consumed_, + getParentForChildren(), + isClean()); + consumed_ = null; + } + return consumedBuilder_; } - // optional string inclusive_start_shard_id = 2; - private java.lang.Object inclusiveStartShardId_ = ""; - public boolean hasInclusiveStartShardId() { + // required bytes rows = 2; + private com.google.protobuf.ByteString rows_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasRows() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public String getInclusiveStartShardId() { - java.lang.Object ref = inclusiveStartShardId_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - inclusiveStartShardId_ = s; - return s; - } else { - return (String) ref; - } + public com.google.protobuf.ByteString getRows() { + return rows_; + } + public Builder setRows(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + rows_ = value; + onChanged(); + return this; + } + public Builder clearRows() { + bitField0_ = (bitField0_ & ~0x00000002); + rows_ = getDefaultInstance().getRows(); + onChanged(); + return this; } - public Builder setInclusiveStartShardId(String value) { + + // optional bytes next_start_primary_key = 3; + private com.google.protobuf.ByteString nextStartPrimaryKey_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasNextStartPrimaryKey() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.google.protobuf.ByteString getNextStartPrimaryKey() { + return nextStartPrimaryKey_; + } + public Builder setNextStartPrimaryKey(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000002; - inclusiveStartShardId_ = value; + bitField0_ |= 0x00000004; + nextStartPrimaryKey_ = value; onChanged(); return this; } - public Builder clearInclusiveStartShardId() { - bitField0_ = (bitField0_ & ~0x00000002); - inclusiveStartShardId_ = getDefaultInstance().getInclusiveStartShardId(); + public Builder clearNextStartPrimaryKey() { + bitField0_ = (bitField0_ & ~0x00000004); + nextStartPrimaryKey_ = getDefaultInstance().getNextStartPrimaryKey(); onChanged(); return this; } - void setInclusiveStartShardId(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000002; - inclusiveStartShardId_ = value; - onChanged(); - } - // optional int32 shard_limit = 3; - private int shardLimit_ ; - public boolean hasShardLimit() { - return ((bitField0_ & 0x00000004) == 0x00000004); + // optional .com.alicloud.openservices.tablestore.core.protocol.DataBlockType data_block_type = 4; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DataBlockType dataBlockType_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DataBlockType.DBT_PLAIN_BUFFER; + public boolean hasDataBlockType() { + return ((bitField0_ & 0x00000008) == 0x00000008); } - public int getShardLimit() { - return shardLimit_; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DataBlockType getDataBlockType() { + return dataBlockType_; } - public Builder setShardLimit(int value) { - bitField0_ |= 0x00000004; - shardLimit_ = value; + public Builder setDataBlockType(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DataBlockType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + dataBlockType_ = value; onChanged(); return this; } - public Builder clearShardLimit() { - bitField0_ = (bitField0_ & ~0x00000004); - shardLimit_ = 0; + public Builder clearDataBlockType() { + bitField0_ = (bitField0_ & ~0x00000008); + dataBlockType_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DataBlockType.DBT_PLAIN_BUFFER; onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.DescribeStreamRequest) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.BulkExportResponse) } static { - defaultInstance = new DescribeStreamRequest(true); + defaultInstance = new BulkExportResponse(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.DescribeStreamRequest) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.BulkExportResponse) } - public interface DescribeStreamResponseOrBuilder + public interface BulkImportRequestOrBuilder extends com.google.protobuf.MessageOrBuilder { - // required string stream_id = 1; - boolean hasStreamId(); - String getStreamId(); - - // required int32 expiration_time = 2; - boolean hasExpirationTime(); - int getExpirationTime(); - - // required string table_name = 3; + // required string table_name = 1; boolean hasTableName(); String getTableName(); - // required int64 creation_time = 4; - boolean hasCreationTime(); - long getCreationTime(); - - // required .com.alicloud.openservices.tablestore.core.protocol.StreamStatus stream_status = 5; - boolean hasStreamStatus(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamStatus getStreamStatus(); - - // repeated .com.alicloud.openservices.tablestore.core.protocol.StreamShard shards = 6; - java.util.List - getShardsList(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard getShards(int index); - int getShardsCount(); - java.util.List - getShardsOrBuilderList(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShardOrBuilder getShardsOrBuilder( + // repeated .com.alicloud.openservices.tablestore.core.protocol.RowInBulkImportRequest rows = 2; + java.util.List + getRowsList(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequest getRows(int index); + int getRowsCount(); + java.util.List + getRowsOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequestOrBuilder getRowsOrBuilder( int index); - - // optional string next_shard_id = 7; - boolean hasNextShardId(); - String getNextShardId(); } - public static final class DescribeStreamResponse extends + public static final class BulkImportRequest extends com.google.protobuf.GeneratedMessage - implements DescribeStreamResponseOrBuilder { - // Use DescribeStreamResponse.newBuilder() to construct. - private DescribeStreamResponse(Builder builder) { + implements BulkImportRequestOrBuilder { + // Use BulkImportRequest.newBuilder() to construct. + private BulkImportRequest(Builder builder) { super(builder); } - private DescribeStreamResponse(boolean noInit) {} + private BulkImportRequest(boolean noInit) {} - private static final DescribeStreamResponse defaultInstance; - public static DescribeStreamResponse getDefaultInstance() { + private static final BulkImportRequest defaultInstance; + public static BulkImportRequest getDefaultInstance() { return defaultInstance; } - public DescribeStreamResponse getDefaultInstanceForType() { + public BulkImportRequest getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeStreamResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_BulkImportRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeStreamResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_BulkImportRequest_fieldAccessorTable; } private int bitField0_; - // required string stream_id = 1; - public static final int STREAM_ID_FIELD_NUMBER = 1; - private java.lang.Object streamId_; - public boolean hasStreamId() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getStreamId() { - java.lang.Object ref = streamId_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - streamId_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getStreamIdBytes() { - java.lang.Object ref = streamId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - streamId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // required int32 expiration_time = 2; - public static final int EXPIRATION_TIME_FIELD_NUMBER = 2; - private int expirationTime_; - public boolean hasExpirationTime() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public int getExpirationTime() { - return expirationTime_; - } - - // required string table_name = 3; - public static final int TABLE_NAME_FIELD_NUMBER = 3; + // required string table_name = 1; + public static final int TABLE_NAME_FIELD_NUMBER = 1; private java.lang.Object tableName_; public boolean hasTableName() { - return ((bitField0_ & 0x00000004) == 0x00000004); + return ((bitField0_ & 0x00000001) == 0x00000001); } public String getTableName() { java.lang.Object ref = tableName_; @@ -37865,115 +49866,42 @@ private com.google.protobuf.ByteString getTableNameBytes() { } } - // required int64 creation_time = 4; - public static final int CREATION_TIME_FIELD_NUMBER = 4; - private long creationTime_; - public boolean hasCreationTime() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public long getCreationTime() { - return creationTime_; - } - - // required .com.alicloud.openservices.tablestore.core.protocol.StreamStatus stream_status = 5; - public static final int STREAM_STATUS_FIELD_NUMBER = 5; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamStatus streamStatus_; - public boolean hasStreamStatus() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamStatus getStreamStatus() { - return streamStatus_; - } - - // repeated .com.alicloud.openservices.tablestore.core.protocol.StreamShard shards = 6; - public static final int SHARDS_FIELD_NUMBER = 6; - private java.util.List shards_; - public java.util.List getShardsList() { - return shards_; + // repeated .com.alicloud.openservices.tablestore.core.protocol.RowInBulkImportRequest rows = 2; + public static final int ROWS_FIELD_NUMBER = 2; + private java.util.List rows_; + public java.util.List getRowsList() { + return rows_; } - public java.util.List - getShardsOrBuilderList() { - return shards_; + public java.util.List + getRowsOrBuilderList() { + return rows_; } - public int getShardsCount() { - return shards_.size(); + public int getRowsCount() { + return rows_.size(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard getShards(int index) { - return shards_.get(index); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequest getRows(int index) { + return rows_.get(index); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShardOrBuilder getShardsOrBuilder( + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequestOrBuilder getRowsOrBuilder( int index) { - return shards_.get(index); - } - - // optional string next_shard_id = 7; - public static final int NEXT_SHARD_ID_FIELD_NUMBER = 7; - private java.lang.Object nextShardId_; - public boolean hasNextShardId() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - public String getNextShardId() { - java.lang.Object ref = nextShardId_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - nextShardId_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getNextShardIdBytes() { - java.lang.Object ref = nextShardId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - nextShardId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + return rows_.get(index); } private void initFields() { - streamId_ = ""; - expirationTime_ = 0; tableName_ = ""; - creationTime_ = 0L; - streamStatus_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamStatus.STREAM_ENABLING; - shards_ = java.util.Collections.emptyList(); - nextShardId_ = ""; + rows_ = java.util.Collections.emptyList(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - if (!hasStreamId()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasExpirationTime()) { - memoizedIsInitialized = 0; - return false; - } if (!hasTableName()) { memoizedIsInitialized = 0; return false; } - if (!hasCreationTime()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasStreamStatus()) { - memoizedIsInitialized = 0; - return false; - } - for (int i = 0; i < getShardsCount(); i++) { - if (!getShards(i).isInitialized()) { + for (int i = 0; i < getRowsCount(); i++) { + if (!getRows(i).isInitialized()) { memoizedIsInitialized = 0; return false; } @@ -37986,25 +49914,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getStreamIdBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeInt32(2, expirationTime_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeBytes(3, getTableNameBytes()); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeInt64(4, creationTime_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeEnum(5, streamStatus_.getNumber()); - } - for (int i = 0; i < shards_.size(); i++) { - output.writeMessage(6, shards_.get(i)); + output.writeBytes(1, getTableNameBytes()); } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - output.writeBytes(7, getNextShardIdBytes()); + for (int i = 0; i < rows_.size(); i++) { + output.writeMessage(2, rows_.get(i)); } getUnknownFields().writeTo(output); } @@ -38017,31 +49930,11 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getStreamIdBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, expirationTime_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(3, getTableNameBytes()); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(4, creationTime_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(5, streamStatus_.getNumber()); - } - for (int i = 0; i < shards_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, shards_.get(i)); + .computeBytesSize(1, getTableNameBytes()); } - if (((bitField0_ & 0x00000020) == 0x00000020)) { + for (int i = 0; i < rows_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(7, getNextShardIdBytes()); + .computeMessageSize(2, rows_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -38055,41 +49948,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -38098,7 +49991,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -38109,12 +50002,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -38124,7 +50017,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportRequest prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -38137,18 +50030,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponseOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeStreamResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_BulkImportRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeStreamResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_BulkImportRequest_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -38159,7 +50052,7 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getShardsFieldBuilder(); + getRowsFieldBuilder(); } } private static Builder create() { @@ -38168,24 +50061,14 @@ private static Builder create() { public Builder clear() { super.clear(); - streamId_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - expirationTime_ = 0; - bitField0_ = (bitField0_ & ~0x00000002); tableName_ = ""; - bitField0_ = (bitField0_ & ~0x00000004); - creationTime_ = 0L; - bitField0_ = (bitField0_ & ~0x00000008); - streamStatus_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamStatus.STREAM_ENABLING; - bitField0_ = (bitField0_ & ~0x00000010); - if (shardsBuilder_ == null) { - shards_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000001); + if (rowsBuilder_ == null) { + rows_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); } else { - shardsBuilder_.clear(); + rowsBuilder_.clear(); } - nextShardId_ = ""; - bitField0_ = (bitField0_ & ~0x00000040); return this; } @@ -38195,24 +50078,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportRequest.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportRequest.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportRequest build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportRequest buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -38220,130 +50103,79 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Descri return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse(this); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportRequest(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.streamId_ = streamId_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.expirationTime_ = expirationTime_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } result.tableName_ = tableName_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - result.creationTime_ = creationTime_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000010; - } - result.streamStatus_ = streamStatus_; - if (shardsBuilder_ == null) { - if (((bitField0_ & 0x00000020) == 0x00000020)) { - shards_ = java.util.Collections.unmodifiableList(shards_); - bitField0_ = (bitField0_ & ~0x00000020); + if (rowsBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { + rows_ = java.util.Collections.unmodifiableList(rows_); + bitField0_ = (bitField0_ & ~0x00000002); } - result.shards_ = shards_; + result.rows_ = rows_; } else { - result.shards_ = shardsBuilder_.build(); - } - if (((from_bitField0_ & 0x00000040) == 0x00000040)) { - to_bitField0_ |= 0x00000020; + result.rows_ = rowsBuilder_.build(); } - result.nextShardId_ = nextShardId_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportRequest)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse.getDefaultInstance()) return this; - if (other.hasStreamId()) { - setStreamId(other.getStreamId()); - } - if (other.hasExpirationTime()) { - setExpirationTime(other.getExpirationTime()); - } + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportRequest.getDefaultInstance()) return this; if (other.hasTableName()) { setTableName(other.getTableName()); } - if (other.hasCreationTime()) { - setCreationTime(other.getCreationTime()); - } - if (other.hasStreamStatus()) { - setStreamStatus(other.getStreamStatus()); - } - if (shardsBuilder_ == null) { - if (!other.shards_.isEmpty()) { - if (shards_.isEmpty()) { - shards_ = other.shards_; - bitField0_ = (bitField0_ & ~0x00000020); + if (rowsBuilder_ == null) { + if (!other.rows_.isEmpty()) { + if (rows_.isEmpty()) { + rows_ = other.rows_; + bitField0_ = (bitField0_ & ~0x00000002); } else { - ensureShardsIsMutable(); - shards_.addAll(other.shards_); + ensureRowsIsMutable(); + rows_.addAll(other.rows_); } onChanged(); } } else { - if (!other.shards_.isEmpty()) { - if (shardsBuilder_.isEmpty()) { - shardsBuilder_.dispose(); - shardsBuilder_ = null; - shards_ = other.shards_; - bitField0_ = (bitField0_ & ~0x00000020); - shardsBuilder_ = + if (!other.rows_.isEmpty()) { + if (rowsBuilder_.isEmpty()) { + rowsBuilder_.dispose(); + rowsBuilder_ = null; + rows_ = other.rows_; + bitField0_ = (bitField0_ & ~0x00000002); + rowsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getShardsFieldBuilder() : null; + getRowsFieldBuilder() : null; } else { - shardsBuilder_.addAllMessages(other.shards_); + rowsBuilder_.addAllMessages(other.rows_); } } } - if (other.hasNextShardId()) { - setNextShardId(other.getNextShardId()); - } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { - if (!hasStreamId()) { - - return false; - } - if (!hasExpirationTime()) { - - return false; - } if (!hasTableName()) { return false; } - if (!hasCreationTime()) { - - return false; - } - if (!hasStreamStatus()) { - - return false; - } - for (int i = 0; i < getShardsCount(); i++) { - if (!getShards(i).isInitialized()) { + for (int i = 0; i < getRowsCount(); i++) { + if (!getRows(i).isInitialized()) { return false; } @@ -38376,113 +50208,25 @@ public Builder mergeFrom( } case 10: { bitField0_ |= 0x00000001; - streamId_ = input.readBytes(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - expirationTime_ = input.readInt32(); - break; - } - case 26: { - bitField0_ |= 0x00000004; tableName_ = input.readBytes(); break; } - case 32: { - bitField0_ |= 0x00000008; - creationTime_ = input.readInt64(); - break; - } - case 40: { - int rawValue = input.readEnum(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamStatus value = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamStatus.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(5, rawValue); - } else { - bitField0_ |= 0x00000010; - streamStatus_ = value; - } - break; - } - case 50: { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard.newBuilder(); + case 18: { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequest.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequest.newBuilder(); input.readMessage(subBuilder, extensionRegistry); - addShards(subBuilder.buildPartial()); - break; - } - case 58: { - bitField0_ |= 0x00000040; - nextShardId_ = input.readBytes(); + addRows(subBuilder.buildPartial()); break; } } - } - } - - private int bitField0_; - - // required string stream_id = 1; - private java.lang.Object streamId_ = ""; - public boolean hasStreamId() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getStreamId() { - java.lang.Object ref = streamId_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - streamId_ = s; - return s; - } else { - return (String) ref; - } - } - public Builder setStreamId(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - streamId_ = value; - onChanged(); - return this; - } - public Builder clearStreamId() { - bitField0_ = (bitField0_ & ~0x00000001); - streamId_ = getDefaultInstance().getStreamId(); - onChanged(); - return this; - } - void setStreamId(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; - streamId_ = value; - onChanged(); + } } - // required int32 expiration_time = 2; - private int expirationTime_ ; - public boolean hasExpirationTime() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public int getExpirationTime() { - return expirationTime_; - } - public Builder setExpirationTime(int value) { - bitField0_ |= 0x00000002; - expirationTime_ = value; - onChanged(); - return this; - } - public Builder clearExpirationTime() { - bitField0_ = (bitField0_ & ~0x00000002); - expirationTime_ = 0; - onChanged(); - return this; - } + private int bitField0_; - // required string table_name = 3; + // required string table_name = 1; private java.lang.Object tableName_ = ""; public boolean hasTableName() { - return ((bitField0_ & 0x00000004) == 0x00000004); + return ((bitField0_ & 0x00000001) == 0x00000001); } public String getTableName() { java.lang.Object ref = tableName_; @@ -38498,419 +50242,294 @@ public Builder setTableName(String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000001; tableName_ = value; onChanged(); return this; } public Builder clearTableName() { - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000001); tableName_ = getDefaultInstance().getTableName(); onChanged(); return this; } void setTableName(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000001; tableName_ = value; onChanged(); } - // required int64 creation_time = 4; - private long creationTime_ ; - public boolean hasCreationTime() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public long getCreationTime() { - return creationTime_; - } - public Builder setCreationTime(long value) { - bitField0_ |= 0x00000008; - creationTime_ = value; - onChanged(); - return this; - } - public Builder clearCreationTime() { - bitField0_ = (bitField0_ & ~0x00000008); - creationTime_ = 0L; - onChanged(); - return this; - } - - // required .com.alicloud.openservices.tablestore.core.protocol.StreamStatus stream_status = 5; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamStatus streamStatus_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamStatus.STREAM_ENABLING; - public boolean hasStreamStatus() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamStatus getStreamStatus() { - return streamStatus_; - } - public Builder setStreamStatus(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamStatus value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; - streamStatus_ = value; - onChanged(); - return this; - } - public Builder clearStreamStatus() { - bitField0_ = (bitField0_ & ~0x00000010); - streamStatus_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamStatus.STREAM_ENABLING; - onChanged(); - return this; - } - - // repeated .com.alicloud.openservices.tablestore.core.protocol.StreamShard shards = 6; - private java.util.List shards_ = + // repeated .com.alicloud.openservices.tablestore.core.protocol.RowInBulkImportRequest rows = 2; + private java.util.List rows_ = java.util.Collections.emptyList(); - private void ensureShardsIsMutable() { - if (!((bitField0_ & 0x00000020) == 0x00000020)) { - shards_ = new java.util.ArrayList(shards_); - bitField0_ |= 0x00000020; + private void ensureRowsIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + rows_ = new java.util.ArrayList(rows_); + bitField0_ |= 0x00000002; } } private com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShardOrBuilder> shardsBuilder_; + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequest, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequest.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequestOrBuilder> rowsBuilder_; - public java.util.List getShardsList() { - if (shardsBuilder_ == null) { - return java.util.Collections.unmodifiableList(shards_); + public java.util.List getRowsList() { + if (rowsBuilder_ == null) { + return java.util.Collections.unmodifiableList(rows_); } else { - return shardsBuilder_.getMessageList(); + return rowsBuilder_.getMessageList(); } } - public int getShardsCount() { - if (shardsBuilder_ == null) { - return shards_.size(); + public int getRowsCount() { + if (rowsBuilder_ == null) { + return rows_.size(); } else { - return shardsBuilder_.getCount(); + return rowsBuilder_.getCount(); } } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard getShards(int index) { - if (shardsBuilder_ == null) { - return shards_.get(index); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequest getRows(int index) { + if (rowsBuilder_ == null) { + return rows_.get(index); } else { - return shardsBuilder_.getMessage(index); + return rowsBuilder_.getMessage(index); } } - public Builder setShards( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard value) { - if (shardsBuilder_ == null) { + public Builder setRows( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequest value) { + if (rowsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureShardsIsMutable(); - shards_.set(index, value); + ensureRowsIsMutable(); + rows_.set(index, value); onChanged(); } else { - shardsBuilder_.setMessage(index, value); + rowsBuilder_.setMessage(index, value); } return this; } - public Builder setShards( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard.Builder builderForValue) { - if (shardsBuilder_ == null) { - ensureShardsIsMutable(); - shards_.set(index, builderForValue.build()); + public Builder setRows( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequest.Builder builderForValue) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + rows_.set(index, builderForValue.build()); onChanged(); } else { - shardsBuilder_.setMessage(index, builderForValue.build()); + rowsBuilder_.setMessage(index, builderForValue.build()); } return this; } - public Builder addShards(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard value) { - if (shardsBuilder_ == null) { + public Builder addRows(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequest value) { + if (rowsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureShardsIsMutable(); - shards_.add(value); + ensureRowsIsMutable(); + rows_.add(value); onChanged(); } else { - shardsBuilder_.addMessage(value); + rowsBuilder_.addMessage(value); } return this; } - public Builder addShards( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard value) { - if (shardsBuilder_ == null) { + public Builder addRows( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequest value) { + if (rowsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureShardsIsMutable(); - shards_.add(index, value); + ensureRowsIsMutable(); + rows_.add(index, value); onChanged(); } else { - shardsBuilder_.addMessage(index, value); + rowsBuilder_.addMessage(index, value); } return this; } - public Builder addShards( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard.Builder builderForValue) { - if (shardsBuilder_ == null) { - ensureShardsIsMutable(); - shards_.add(builderForValue.build()); + public Builder addRows( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequest.Builder builderForValue) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + rows_.add(builderForValue.build()); onChanged(); } else { - shardsBuilder_.addMessage(builderForValue.build()); + rowsBuilder_.addMessage(builderForValue.build()); } return this; } - public Builder addShards( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard.Builder builderForValue) { - if (shardsBuilder_ == null) { - ensureShardsIsMutable(); - shards_.add(index, builderForValue.build()); + public Builder addRows( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequest.Builder builderForValue) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + rows_.add(index, builderForValue.build()); onChanged(); } else { - shardsBuilder_.addMessage(index, builderForValue.build()); + rowsBuilder_.addMessage(index, builderForValue.build()); } return this; } - public Builder addAllShards( - java.lang.Iterable values) { - if (shardsBuilder_ == null) { - ensureShardsIsMutable(); - super.addAll(values, shards_); + public Builder addAllRows( + java.lang.Iterable values) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + super.addAll(values, rows_); onChanged(); } else { - shardsBuilder_.addAllMessages(values); + rowsBuilder_.addAllMessages(values); } return this; } - public Builder clearShards() { - if (shardsBuilder_ == null) { - shards_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); + public Builder clearRows() { + if (rowsBuilder_ == null) { + rows_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { - shardsBuilder_.clear(); + rowsBuilder_.clear(); } return this; } - public Builder removeShards(int index) { - if (shardsBuilder_ == null) { - ensureShardsIsMutable(); - shards_.remove(index); + public Builder removeRows(int index) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + rows_.remove(index); onChanged(); } else { - shardsBuilder_.remove(index); + rowsBuilder_.remove(index); } return this; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard.Builder getShardsBuilder( + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequest.Builder getRowsBuilder( int index) { - return getShardsFieldBuilder().getBuilder(index); + return getRowsFieldBuilder().getBuilder(index); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShardOrBuilder getShardsOrBuilder( + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequestOrBuilder getRowsOrBuilder( int index) { - if (shardsBuilder_ == null) { - return shards_.get(index); } else { - return shardsBuilder_.getMessageOrBuilder(index); + if (rowsBuilder_ == null) { + return rows_.get(index); } else { + return rowsBuilder_.getMessageOrBuilder(index); } } - public java.util.List - getShardsOrBuilderList() { - if (shardsBuilder_ != null) { - return shardsBuilder_.getMessageOrBuilderList(); + public java.util.List + getRowsOrBuilderList() { + if (rowsBuilder_ != null) { + return rowsBuilder_.getMessageOrBuilderList(); } else { - return java.util.Collections.unmodifiableList(shards_); + return java.util.Collections.unmodifiableList(rows_); } } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard.Builder addShardsBuilder() { - return getShardsFieldBuilder().addBuilder( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard.getDefaultInstance()); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequest.Builder addRowsBuilder() { + return getRowsFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequest.getDefaultInstance()); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard.Builder addShardsBuilder( + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequest.Builder addRowsBuilder( int index) { - return getShardsFieldBuilder().addBuilder( - index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard.getDefaultInstance()); + return getRowsFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequest.getDefaultInstance()); } - public java.util.List - getShardsBuilderList() { - return getShardsFieldBuilder().getBuilderList(); + public java.util.List + getRowsBuilderList() { + return getRowsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShardOrBuilder> - getShardsFieldBuilder() { - if (shardsBuilder_ == null) { - shardsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShardOrBuilder>( - shards_, - ((bitField0_ & 0x00000020) == 0x00000020), + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequest, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequest.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequestOrBuilder> + getRowsFieldBuilder() { + if (rowsBuilder_ == null) { + rowsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequest, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequest.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequestOrBuilder>( + rows_, + ((bitField0_ & 0x00000002) == 0x00000002), getParentForChildren(), isClean()); - shards_ = null; - } - return shardsBuilder_; - } - - // optional string next_shard_id = 7; - private java.lang.Object nextShardId_ = ""; - public boolean hasNextShardId() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - public String getNextShardId() { - java.lang.Object ref = nextShardId_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - nextShardId_ = s; - return s; - } else { - return (String) ref; + rows_ = null; } - } - public Builder setNextShardId(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000040; - nextShardId_ = value; - onChanged(); - return this; - } - public Builder clearNextShardId() { - bitField0_ = (bitField0_ & ~0x00000040); - nextShardId_ = getDefaultInstance().getNextShardId(); - onChanged(); - return this; - } - void setNextShardId(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000040; - nextShardId_ = value; - onChanged(); + return rowsBuilder_; } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.DescribeStreamResponse) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.BulkImportRequest) } static { - defaultInstance = new DescribeStreamResponse(true); + defaultInstance = new BulkImportRequest(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.DescribeStreamResponse) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.BulkImportRequest) } - public interface GetShardIteratorRequestOrBuilder + public interface RowInBulkImportRequestOrBuilder extends com.google.protobuf.MessageOrBuilder { - // required string stream_id = 1; - boolean hasStreamId(); - String getStreamId(); + // required .com.alicloud.openservices.tablestore.core.protocol.OperationType type = 1; + boolean hasType(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.OperationType getType(); - // required string shard_id = 2; - boolean hasShardId(); - String getShardId(); + // required bytes row_change = 2; + boolean hasRowChange(); + com.google.protobuf.ByteString getRowChange(); } - public static final class GetShardIteratorRequest extends + public static final class RowInBulkImportRequest extends com.google.protobuf.GeneratedMessage - implements GetShardIteratorRequestOrBuilder { - // Use GetShardIteratorRequest.newBuilder() to construct. - private GetShardIteratorRequest(Builder builder) { + implements RowInBulkImportRequestOrBuilder { + // Use RowInBulkImportRequest.newBuilder() to construct. + private RowInBulkImportRequest(Builder builder) { super(builder); } - private GetShardIteratorRequest(boolean noInit) {} + private RowInBulkImportRequest(boolean noInit) {} - private static final GetShardIteratorRequest defaultInstance; - public static GetShardIteratorRequest getDefaultInstance() { + private static final RowInBulkImportRequest defaultInstance; + public static RowInBulkImportRequest getDefaultInstance() { return defaultInstance; } - public GetShardIteratorRequest getDefaultInstanceForType() { + public RowInBulkImportRequest getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetShardIteratorRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBulkImportRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetShardIteratorRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBulkImportRequest_fieldAccessorTable; } private int bitField0_; - // required string stream_id = 1; - public static final int STREAM_ID_FIELD_NUMBER = 1; - private java.lang.Object streamId_; - public boolean hasStreamId() { + // required .com.alicloud.openservices.tablestore.core.protocol.OperationType type = 1; + public static final int TYPE_FIELD_NUMBER = 1; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.OperationType type_; + public boolean hasType() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getStreamId() { - java.lang.Object ref = streamId_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - streamId_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getStreamIdBytes() { - java.lang.Object ref = streamId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - streamId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.OperationType getType() { + return type_; } - // required string shard_id = 2; - public static final int SHARD_ID_FIELD_NUMBER = 2; - private java.lang.Object shardId_; - public boolean hasShardId() { + // required bytes row_change = 2; + public static final int ROW_CHANGE_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString rowChange_; + public boolean hasRowChange() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public String getShardId() { - java.lang.Object ref = shardId_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - shardId_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getShardIdBytes() { - java.lang.Object ref = shardId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - shardId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public com.google.protobuf.ByteString getRowChange() { + return rowChange_; } private void initFields() { - streamId_ = ""; - shardId_ = ""; + type_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.OperationType.PUT; + rowChange_ = com.google.protobuf.ByteString.EMPTY; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - if (!hasStreamId()) { + if (!hasType()) { memoizedIsInitialized = 0; return false; } - if (!hasShardId()) { + if (!hasRowChange()) { memoizedIsInitialized = 0; return false; } @@ -38922,10 +50541,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getStreamIdBytes()); + output.writeEnum(1, type_.getNumber()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getShardIdBytes()); + output.writeBytes(2, rowChange_); } getUnknownFields().writeTo(output); } @@ -38938,11 +50557,11 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getStreamIdBytes()); + .computeEnumSize(1, type_.getNumber()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getShardIdBytes()); + .computeBytesSize(2, rowChange_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -38956,41 +50575,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -38999,7 +50618,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -39010,12 +50629,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -39025,7 +50644,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequest prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -39038,18 +50657,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequestOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetShardIteratorRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBulkImportRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetShardIteratorRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBulkImportRequest_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -39068,9 +50687,9 @@ private static Builder create() { public Builder clear() { super.clear(); - streamId_ = ""; + type_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.OperationType.PUT; bitField0_ = (bitField0_ & ~0x00000001); - shardId_ = ""; + rowChange_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -39081,24 +50700,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequest.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequest.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequest build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequest buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -39106,50 +50725,50 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetSha return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest(this); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequest(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.streamId_ = streamId_; + result.type_ = type_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - result.shardId_ = shardId_; + result.rowChange_ = rowChange_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequest)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest.getDefaultInstance()) return this; - if (other.hasStreamId()) { - setStreamId(other.getStreamId()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequest.getDefaultInstance()) return this; + if (other.hasType()) { + setType(other.getType()); } - if (other.hasShardId()) { - setShardId(other.getShardId()); + if (other.hasRowChange()) { + setRowChange(other.getRowChange()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { - if (!hasStreamId()) { + if (!hasType()) { return false; } - if (!hasShardId()) { + if (!hasRowChange()) { return false; } @@ -39179,14 +50798,20 @@ public Builder mergeFrom( } break; } - case 10: { - bitField0_ |= 0x00000001; - streamId_ = input.readBytes(); + case 8: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.OperationType value = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.OperationType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + type_ = value; + } break; } case 18: { bitField0_ |= 0x00000002; - shardId_ = input.readBytes(); + rowChange_ = input.readBytes(); break; } } @@ -39195,133 +50820,119 @@ public Builder mergeFrom( private int bitField0_; - // required string stream_id = 1; - private java.lang.Object streamId_ = ""; - public boolean hasStreamId() { + // required .com.alicloud.openservices.tablestore.core.protocol.OperationType type = 1; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.OperationType type_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.OperationType.PUT; + public boolean hasType() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getStreamId() { - java.lang.Object ref = streamId_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - streamId_ = s; - return s; - } else { - return (String) ref; - } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.OperationType getType() { + return type_; } - public Builder setStreamId(String value) { + public Builder setType(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.OperationType value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - streamId_ = value; + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + type_ = value; onChanged(); return this; } - public Builder clearStreamId() { + public Builder clearType() { bitField0_ = (bitField0_ & ~0x00000001); - streamId_ = getDefaultInstance().getStreamId(); + type_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.OperationType.PUT; onChanged(); return this; } - void setStreamId(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; - streamId_ = value; - onChanged(); - } - // required string shard_id = 2; - private java.lang.Object shardId_ = ""; - public boolean hasShardId() { + // required bytes row_change = 2; + private com.google.protobuf.ByteString rowChange_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasRowChange() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public String getShardId() { - java.lang.Object ref = shardId_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - shardId_ = s; - return s; - } else { - return (String) ref; - } - } - public Builder setShardId(String value) { + public com.google.protobuf.ByteString getRowChange() { + return rowChange_; + } + public Builder setRowChange(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; - shardId_ = value; + rowChange_ = value; onChanged(); return this; } - public Builder clearShardId() { + public Builder clearRowChange() { bitField0_ = (bitField0_ & ~0x00000002); - shardId_ = getDefaultInstance().getShardId(); + rowChange_ = getDefaultInstance().getRowChange(); onChanged(); return this; } - void setShardId(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000002; - shardId_ = value; - onChanged(); - } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GetShardIteratorRequest) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.RowInBulkImportRequest) } static { - defaultInstance = new GetShardIteratorRequest(true); + defaultInstance = new RowInBulkImportRequest(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GetShardIteratorRequest) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.RowInBulkImportRequest) } - public interface GetShardIteratorResponseOrBuilder + public interface BulkImportResponseOrBuilder extends com.google.protobuf.MessageOrBuilder { - // required string shard_iterator = 1; - boolean hasShardIterator(); - String getShardIterator(); + // required string table_name = 1; + boolean hasTableName(); + String getTableName(); + + // repeated .com.alicloud.openservices.tablestore.core.protocol.RowInBulkImportResponse rows = 2; + java.util.List + getRowsList(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponse getRows(int index); + int getRowsCount(); + java.util.List + getRowsOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponseOrBuilder getRowsOrBuilder( + int index); } - public static final class GetShardIteratorResponse extends + public static final class BulkImportResponse extends com.google.protobuf.GeneratedMessage - implements GetShardIteratorResponseOrBuilder { - // Use GetShardIteratorResponse.newBuilder() to construct. - private GetShardIteratorResponse(Builder builder) { + implements BulkImportResponseOrBuilder { + // Use BulkImportResponse.newBuilder() to construct. + private BulkImportResponse(Builder builder) { super(builder); } - private GetShardIteratorResponse(boolean noInit) {} + private BulkImportResponse(boolean noInit) {} - private static final GetShardIteratorResponse defaultInstance; - public static GetShardIteratorResponse getDefaultInstance() { + private static final BulkImportResponse defaultInstance; + public static BulkImportResponse getDefaultInstance() { return defaultInstance; } - public GetShardIteratorResponse getDefaultInstanceForType() { + public BulkImportResponse getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetShardIteratorResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_BulkImportResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetShardIteratorResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_BulkImportResponse_fieldAccessorTable; } private int bitField0_; - // required string shard_iterator = 1; - public static final int SHARD_ITERATOR_FIELD_NUMBER = 1; - private java.lang.Object shardIterator_; - public boolean hasShardIterator() { + // required string table_name = 1; + public static final int TABLE_NAME_FIELD_NUMBER = 1; + private java.lang.Object tableName_; + public boolean hasTableName() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getShardIterator() { - java.lang.Object ref = shardIterator_; + public String getTableName() { + java.lang.Object ref = tableName_; if (ref instanceof String) { return (String) ref; } else { @@ -39329,35 +50940,63 @@ public String getShardIterator() { (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); if (com.google.protobuf.Internal.isValidUtf8(bs)) { - shardIterator_ = s; + tableName_ = s; } return s; } } - private com.google.protobuf.ByteString getShardIteratorBytes() { - java.lang.Object ref = shardIterator_; + private com.google.protobuf.ByteString getTableNameBytes() { + java.lang.Object ref = tableName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((String) ref); - shardIterator_ = b; + tableName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + // repeated .com.alicloud.openservices.tablestore.core.protocol.RowInBulkImportResponse rows = 2; + public static final int ROWS_FIELD_NUMBER = 2; + private java.util.List rows_; + public java.util.List getRowsList() { + return rows_; + } + public java.util.List + getRowsOrBuilderList() { + return rows_; + } + public int getRowsCount() { + return rows_.size(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponse getRows(int index) { + return rows_.get(index); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponseOrBuilder getRowsOrBuilder( + int index) { + return rows_.get(index); + } + private void initFields() { - shardIterator_ = ""; + tableName_ = ""; + rows_ = java.util.Collections.emptyList(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - if (!hasShardIterator()) { + if (!hasTableName()) { memoizedIsInitialized = 0; return false; } + for (int i = 0; i < getRowsCount(); i++) { + if (!getRows(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } memoizedIsInitialized = 1; return true; } @@ -39366,7 +51005,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getShardIteratorBytes()); + output.writeBytes(1, getTableNameBytes()); + } + for (int i = 0; i < rows_.size(); i++) { + output.writeMessage(2, rows_.get(i)); } getUnknownFields().writeTo(output); } @@ -39379,7 +51021,11 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getShardIteratorBytes()); + .computeBytesSize(1, getTableNameBytes()); + } + for (int i = 0; i < rows_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, rows_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -39393,41 +51039,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -39436,7 +51082,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -39447,12 +51093,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -39462,7 +51108,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportResponse prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -39475,18 +51121,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponseOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetShardIteratorResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_BulkImportResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetShardIteratorResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_BulkImportResponse_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -39497,6 +51143,7 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getRowsFieldBuilder(); } } private static Builder create() { @@ -39505,8 +51152,14 @@ private static Builder create() { public Builder clear() { super.clear(); - shardIterator_ = ""; + tableName_ = ""; bitField0_ = (bitField0_ & ~0x00000001); + if (rowsBuilder_ == null) { + rows_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + rowsBuilder_.clear(); + } return this; } @@ -39516,24 +51169,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportResponse.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportResponse.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportResponse build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportResponse buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -39541,42 +51194,83 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetSha return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse(this); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportResponse(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.shardIterator_ = shardIterator_; + result.tableName_ = tableName_; + if (rowsBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { + rows_ = java.util.Collections.unmodifiableList(rows_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.rows_ = rows_; + } else { + result.rows_ = rowsBuilder_.build(); + } result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportResponse)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse.getDefaultInstance()) return this; - if (other.hasShardIterator()) { - setShardIterator(other.getShardIterator()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportResponse.getDefaultInstance()) return this; + if (other.hasTableName()) { + setTableName(other.getTableName()); + } + if (rowsBuilder_ == null) { + if (!other.rows_.isEmpty()) { + if (rows_.isEmpty()) { + rows_ = other.rows_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureRowsIsMutable(); + rows_.addAll(other.rows_); + } + onChanged(); + } + } else { + if (!other.rows_.isEmpty()) { + if (rowsBuilder_.isEmpty()) { + rowsBuilder_.dispose(); + rowsBuilder_ = null; + rows_ = other.rows_; + bitField0_ = (bitField0_ & ~0x00000002); + rowsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getRowsFieldBuilder() : null; + } else { + rowsBuilder_.addAllMessages(other.rows_); + } + } } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { - if (!hasShardIterator()) { + if (!hasTableName()) { return false; } + for (int i = 0; i < getRowsCount(); i++) { + if (!getRows(i).isInitialized()) { + + return false; + } + } return true; } @@ -39605,7 +51299,13 @@ public Builder mergeFrom( } case 10: { bitField0_ |= 0x00000001; - shardIterator_ = input.readBytes(); + tableName_ = input.readBytes(); + break; + } + case 18: { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponse.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponse.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addRows(subBuilder.buildPartial()); break; } } @@ -39614,148 +51314,347 @@ public Builder mergeFrom( private int bitField0_; - // required string shard_iterator = 1; - private java.lang.Object shardIterator_ = ""; - public boolean hasShardIterator() { + // required string table_name = 1; + private java.lang.Object tableName_ = ""; + public boolean hasTableName() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getShardIterator() { - java.lang.Object ref = shardIterator_; + public String getTableName() { + java.lang.Object ref = tableName_; if (!(ref instanceof String)) { String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - shardIterator_ = s; + tableName_ = s; return s; } else { return (String) ref; } } - public Builder setShardIterator(String value) { + public Builder setTableName(String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; - shardIterator_ = value; + tableName_ = value; onChanged(); return this; } - public Builder clearShardIterator() { + public Builder clearTableName() { bitField0_ = (bitField0_ & ~0x00000001); - shardIterator_ = getDefaultInstance().getShardIterator(); + tableName_ = getDefaultInstance().getTableName(); onChanged(); return this; } - void setShardIterator(com.google.protobuf.ByteString value) { + void setTableName(com.google.protobuf.ByteString value) { bitField0_ |= 0x00000001; - shardIterator_ = value; + tableName_ = value; onChanged(); } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GetShardIteratorResponse) + // repeated .com.alicloud.openservices.tablestore.core.protocol.RowInBulkImportResponse rows = 2; + private java.util.List rows_ = + java.util.Collections.emptyList(); + private void ensureRowsIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + rows_ = new java.util.ArrayList(rows_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponse, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponse.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponseOrBuilder> rowsBuilder_; + + public java.util.List getRowsList() { + if (rowsBuilder_ == null) { + return java.util.Collections.unmodifiableList(rows_); + } else { + return rowsBuilder_.getMessageList(); + } + } + public int getRowsCount() { + if (rowsBuilder_ == null) { + return rows_.size(); + } else { + return rowsBuilder_.getCount(); + } + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponse getRows(int index) { + if (rowsBuilder_ == null) { + return rows_.get(index); + } else { + return rowsBuilder_.getMessage(index); + } + } + public Builder setRows( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponse value) { + if (rowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRowsIsMutable(); + rows_.set(index, value); + onChanged(); + } else { + rowsBuilder_.setMessage(index, value); + } + return this; + } + public Builder setRows( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponse.Builder builderForValue) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + rows_.set(index, builderForValue.build()); + onChanged(); + } else { + rowsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + public Builder addRows(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponse value) { + if (rowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRowsIsMutable(); + rows_.add(value); + onChanged(); + } else { + rowsBuilder_.addMessage(value); + } + return this; + } + public Builder addRows( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponse value) { + if (rowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRowsIsMutable(); + rows_.add(index, value); + onChanged(); + } else { + rowsBuilder_.addMessage(index, value); + } + return this; + } + public Builder addRows( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponse.Builder builderForValue) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + rows_.add(builderForValue.build()); + onChanged(); + } else { + rowsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + public Builder addRows( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponse.Builder builderForValue) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + rows_.add(index, builderForValue.build()); + onChanged(); + } else { + rowsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAllRows( + java.lang.Iterable values) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + super.addAll(values, rows_); + onChanged(); + } else { + rowsBuilder_.addAllMessages(values); + } + return this; + } + public Builder clearRows() { + if (rowsBuilder_ == null) { + rows_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + rowsBuilder_.clear(); + } + return this; + } + public Builder removeRows(int index) { + if (rowsBuilder_ == null) { + ensureRowsIsMutable(); + rows_.remove(index); + onChanged(); + } else { + rowsBuilder_.remove(index); + } + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponse.Builder getRowsBuilder( + int index) { + return getRowsFieldBuilder().getBuilder(index); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponseOrBuilder getRowsOrBuilder( + int index) { + if (rowsBuilder_ == null) { + return rows_.get(index); } else { + return rowsBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getRowsOrBuilderList() { + if (rowsBuilder_ != null) { + return rowsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rows_); + } + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponse.Builder addRowsBuilder() { + return getRowsFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponse.getDefaultInstance()); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponse.Builder addRowsBuilder( + int index) { + return getRowsFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponse.getDefaultInstance()); + } + public java.util.List + getRowsBuilderList() { + return getRowsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponse, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponse.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponseOrBuilder> + getRowsFieldBuilder() { + if (rowsBuilder_ == null) { + rowsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponse, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponse.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponseOrBuilder>( + rows_, + ((bitField0_ & 0x00000002) == 0x00000002), + getParentForChildren(), + isClean()); + rows_ = null; + } + return rowsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.BulkImportResponse) } static { - defaultInstance = new GetShardIteratorResponse(true); + defaultInstance = new BulkImportResponse(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GetShardIteratorResponse) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.BulkImportResponse) } - public interface GetStreamRecordRequestOrBuilder + public interface RowInBulkImportResponseOrBuilder extends com.google.protobuf.MessageOrBuilder { - // required string shard_iterator = 1; - boolean hasShardIterator(); - String getShardIterator(); + // required bool is_ok = 1; + boolean hasIsOk(); + boolean getIsOk(); - // optional int32 limit = 2; - boolean hasLimit(); - int getLimit(); + // optional .com.alicloud.openservices.tablestore.core.protocol.Error error = 2; + boolean hasError(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error getError(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ErrorOrBuilder getErrorOrBuilder(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 3; + boolean hasConsumed(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder(); } - public static final class GetStreamRecordRequest extends + public static final class RowInBulkImportResponse extends com.google.protobuf.GeneratedMessage - implements GetStreamRecordRequestOrBuilder { - // Use GetStreamRecordRequest.newBuilder() to construct. - private GetStreamRecordRequest(Builder builder) { + implements RowInBulkImportResponseOrBuilder { + // Use RowInBulkImportResponse.newBuilder() to construct. + private RowInBulkImportResponse(Builder builder) { super(builder); } - private GetStreamRecordRequest(boolean noInit) {} + private RowInBulkImportResponse(boolean noInit) {} - private static final GetStreamRecordRequest defaultInstance; - public static GetStreamRecordRequest getDefaultInstance() { + private static final RowInBulkImportResponse defaultInstance; + public static RowInBulkImportResponse getDefaultInstance() { return defaultInstance; } - public GetStreamRecordRequest getDefaultInstanceForType() { + public RowInBulkImportResponse getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetStreamRecordRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBulkImportResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetStreamRecordRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBulkImportResponse_fieldAccessorTable; } private int bitField0_; - // required string shard_iterator = 1; - public static final int SHARD_ITERATOR_FIELD_NUMBER = 1; - private java.lang.Object shardIterator_; - public boolean hasShardIterator() { + // required bool is_ok = 1; + public static final int IS_OK_FIELD_NUMBER = 1; + private boolean isOk_; + public boolean hasIsOk() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getShardIterator() { - java.lang.Object ref = shardIterator_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - shardIterator_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getShardIteratorBytes() { - java.lang.Object ref = shardIterator_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - shardIterator_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public boolean getIsOk() { + return isOk_; } - // optional int32 limit = 2; - public static final int LIMIT_FIELD_NUMBER = 2; - private int limit_; - public boolean hasLimit() { + // optional .com.alicloud.openservices.tablestore.core.protocol.Error error = 2; + public static final int ERROR_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error error_; + public boolean hasError() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public int getLimit() { - return limit_; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error getError() { + return error_; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ErrorOrBuilder getErrorOrBuilder() { + return error_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 3; + public static final int CONSUMED_FIELD_NUMBER = 3; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity consumed_; + public boolean hasConsumed() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed() { + return consumed_; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder() { + return consumed_; } private void initFields() { - shardIterator_ = ""; - limit_ = 0; + isOk_ = false; + error_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.getDefaultInstance(); + consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - if (!hasShardIterator()) { + if (!hasIsOk()) { memoizedIsInitialized = 0; return false; } + if (hasError()) { + if (!getError().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + if (hasConsumed()) { + if (!getConsumed().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } memoizedIsInitialized = 1; return true; } @@ -39764,10 +51663,13 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getShardIteratorBytes()); + output.writeBool(1, isOk_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeInt32(2, limit_); + output.writeMessage(2, error_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeMessage(3, consumed_); } getUnknownFields().writeTo(output); } @@ -39780,11 +51682,15 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getShardIteratorBytes()); + .computeBoolSize(1, isOk_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, limit_); + .computeMessageSize(2, error_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, consumed_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -39798,41 +51704,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -39841,7 +51747,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -39852,12 +51758,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -39867,7 +51773,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponse prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -39880,18 +51786,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequestOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetStreamRecordRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBulkImportResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetStreamRecordRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBulkImportResponse_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -39902,6 +51808,8 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getErrorFieldBuilder(); + getConsumedFieldBuilder(); } } private static Builder create() { @@ -39910,10 +51818,20 @@ private static Builder create() { public Builder clear() { super.clear(); - shardIterator_ = ""; + isOk_ = false; bitField0_ = (bitField0_ & ~0x00000001); - limit_ = 0; + if (errorBuilder_ == null) { + error_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.getDefaultInstance(); + } else { + errorBuilder_.clear(); + } bitField0_ = (bitField0_ & ~0x00000002); + if (consumedBuilder_ == null) { + consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); + } else { + consumedBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); return this; } @@ -39923,24 +51841,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponse.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponse.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponse build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponse buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -39948,49 +51866,76 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStr return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest(this); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponse(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.shardIterator_ = shardIterator_; + result.isOk_ = isOk_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - result.limit_ = limit_; + if (errorBuilder_ == null) { + result.error_ = error_; + } else { + result.error_ = errorBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + if (consumedBuilder_ == null) { + result.consumed_ = consumed_; + } else { + result.consumed_ = consumedBuilder_.build(); + } result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponse)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest.getDefaultInstance()) return this; - if (other.hasShardIterator()) { - setShardIterator(other.getShardIterator()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponse.getDefaultInstance()) return this; + if (other.hasIsOk()) { + setIsOk(other.getIsOk()); } - if (other.hasLimit()) { - setLimit(other.getLimit()); + if (other.hasError()) { + mergeError(other.getError()); + } + if (other.hasConsumed()) { + mergeConsumed(other.getConsumed()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { - if (!hasShardIterator()) { + if (!hasIsOk()) { return false; } + if (hasError()) { + if (!getError().isInitialized()) { + + return false; + } + } + if (hasConsumed()) { + if (!getConsumed().isInitialized()) { + + return false; + } + } return true; } @@ -40017,14 +51962,27 @@ public Builder mergeFrom( } break; } - case 10: { + case 8: { bitField0_ |= 0x00000001; - shardIterator_ = input.readBytes(); + isOk_ = input.readBool(); break; } - case 16: { - bitField0_ |= 0x00000002; - limit_ = input.readInt32(); + case 18: { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.newBuilder(); + if (hasError()) { + subBuilder.mergeFrom(getError()); + } + input.readMessage(subBuilder, extensionRegistry); + setError(subBuilder.buildPartial()); + break; + } + case 26: { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.newBuilder(); + if (hasConsumed()) { + subBuilder.mergeFrom(getConsumed()); + } + input.readMessage(subBuilder, extensionRegistry); + setConsumed(subBuilder.buildPartial()); break; } } @@ -40033,572 +51991,780 @@ public Builder mergeFrom( private int bitField0_; - // required string shard_iterator = 1; - private java.lang.Object shardIterator_ = ""; - public boolean hasShardIterator() { + // required bool is_ok = 1; + private boolean isOk_ ; + public boolean hasIsOk() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getShardIterator() { - java.lang.Object ref = shardIterator_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - shardIterator_ = s; - return s; - } else { - return (String) ref; - } + public boolean getIsOk() { + return isOk_; } - public Builder setShardIterator(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - shardIterator_ = value; + public Builder setIsOk(boolean value) { + bitField0_ |= 0x00000001; + isOk_ = value; onChanged(); return this; } - public Builder clearShardIterator() { + public Builder clearIsOk() { bitField0_ = (bitField0_ & ~0x00000001); - shardIterator_ = getDefaultInstance().getShardIterator(); + isOk_ = false; onChanged(); return this; } - void setShardIterator(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; - shardIterator_ = value; - onChanged(); - } - // optional int32 limit = 2; - private int limit_ ; - public boolean hasLimit() { + // optional .com.alicloud.openservices.tablestore.core.protocol.Error error = 2; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error error_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ErrorOrBuilder> errorBuilder_; + public boolean hasError() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public int getLimit() { - return limit_; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error getError() { + if (errorBuilder_ == null) { + return error_; + } else { + return errorBuilder_.getMessage(); + } } - public Builder setLimit(int value) { + public Builder setError(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + error_ = value; + onChanged(); + } else { + errorBuilder_.setMessage(value); + } bitField0_ |= 0x00000002; - limit_ = value; - onChanged(); return this; } - public Builder clearLimit() { + public Builder setError( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.Builder builderForValue) { + if (errorBuilder_ == null) { + error_ = builderForValue.build(); + onChanged(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder mergeError(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error value) { + if (errorBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002) && + error_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.getDefaultInstance()) { + error_ = + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.newBuilder(error_).mergeFrom(value).buildPartial(); + } else { + error_ = value; + } + onChanged(); + } else { + errorBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder clearError() { + if (errorBuilder_ == null) { + error_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.getDefaultInstance(); + onChanged(); + } else { + errorBuilder_.clear(); + } bitField0_ = (bitField0_ & ~0x00000002); - limit_ = 0; + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.Builder getErrorBuilder() { + bitField0_ |= 0x00000002; onChanged(); + return getErrorFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ErrorOrBuilder getErrorOrBuilder() { + if (errorBuilder_ != null) { + return errorBuilder_.getMessageOrBuilder(); + } else { + return error_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ErrorOrBuilder> + getErrorFieldBuilder() { + if (errorBuilder_ == null) { + errorBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Error.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ErrorOrBuilder>( + error_, + getParentForChildren(), + isClean()); + error_ = null; + } + return errorBuilder_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 3; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder> consumedBuilder_; + public boolean hasConsumed() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed() { + if (consumedBuilder_ == null) { + return consumed_; + } else { + return consumedBuilder_.getMessage(); + } + } + public Builder setConsumed(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity value) { + if (consumedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + consumed_ = value; + onChanged(); + } else { + consumedBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder setConsumed( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder builderForValue) { + if (consumedBuilder_ == null) { + consumed_ = builderForValue.build(); + onChanged(); + } else { + consumedBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder mergeConsumed(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity value) { + if (consumedBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004) && + consumed_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance()) { + consumed_ = + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.newBuilder(consumed_).mergeFrom(value).buildPartial(); + } else { + consumed_ = value; + } + onChanged(); + } else { + consumedBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder clearConsumed() { + if (consumedBuilder_ == null) { + consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); + onChanged(); + } else { + consumedBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); return this; } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder getConsumedBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getConsumedFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder() { + if (consumedBuilder_ != null) { + return consumedBuilder_.getMessageOrBuilder(); + } else { + return consumed_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder> + getConsumedFieldBuilder() { + if (consumedBuilder_ == null) { + consumedBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder>( + consumed_, + getParentForChildren(), + isClean()); + consumed_ = null; + } + return consumedBuilder_; + } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GetStreamRecordRequest) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.RowInBulkImportResponse) } static { - defaultInstance = new GetStreamRecordRequest(true); + defaultInstance = new RowInBulkImportResponse(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GetStreamRecordRequest) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.RowInBulkImportResponse) } - public interface GetStreamRecordResponseOrBuilder + public interface ComputeSplitsRequestOrBuilder extends com.google.protobuf.MessageOrBuilder { - // repeated .com.alicloud.openservices.tablestore.core.protocol.GetStreamRecordResponse.StreamRecord stream_records = 1; - java.util.List - getStreamRecordsList(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord getStreamRecords(int index); - int getStreamRecordsCount(); - java.util.List - getStreamRecordsOrBuilderList(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecordOrBuilder getStreamRecordsOrBuilder( - int index); + // optional string table_name = 1; + boolean hasTableName(); + String getTableName(); - // optional string next_shard_iterator = 2; - boolean hasNextShardIterator(); - String getNextShardIterator(); + // optional .com.alicloud.openservices.tablestore.core.protocol.SearchIndexSplitsOptions search_index_splits_options = 2; + boolean hasSearchIndexSplitsOptions(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions getSearchIndexSplitsOptions(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptionsOrBuilder getSearchIndexSplitsOptionsOrBuilder(); } - public static final class GetStreamRecordResponse extends + public static final class ComputeSplitsRequest extends com.google.protobuf.GeneratedMessage - implements GetStreamRecordResponseOrBuilder { - // Use GetStreamRecordResponse.newBuilder() to construct. - private GetStreamRecordResponse(Builder builder) { + implements ComputeSplitsRequestOrBuilder { + // Use ComputeSplitsRequest.newBuilder() to construct. + private ComputeSplitsRequest(Builder builder) { super(builder); } - private GetStreamRecordResponse(boolean noInit) {} + private ComputeSplitsRequest(boolean noInit) {} - private static final GetStreamRecordResponse defaultInstance; - public static GetStreamRecordResponse getDefaultInstance() { + private static final ComputeSplitsRequest defaultInstance; + public static ComputeSplitsRequest getDefaultInstance() { return defaultInstance; } - public GetStreamRecordResponse getDefaultInstanceForType() { + public ComputeSplitsRequest getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetStreamRecordResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ComputeSplitsRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetStreamRecordResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ComputeSplitsRequest_fieldAccessorTable; } - public interface StreamRecordOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required .com.alicloud.openservices.tablestore.core.protocol.ActionType action_type = 1; - boolean hasActionType(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ActionType getActionType(); - - // required bytes record = 2; - boolean hasRecord(); - com.google.protobuf.ByteString getRecord(); + private int bitField0_; + // optional string table_name = 1; + public static final int TABLE_NAME_FIELD_NUMBER = 1; + private java.lang.Object tableName_; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); } - public static final class StreamRecord extends - com.google.protobuf.GeneratedMessage - implements StreamRecordOrBuilder { - // Use StreamRecord.newBuilder() to construct. - private StreamRecord(Builder builder) { - super(builder); + public String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + tableName_ = s; + } + return s; } - private StreamRecord(boolean noInit) {} - - private static final StreamRecord defaultInstance; - public static StreamRecord getDefaultInstance() { - return defaultInstance; + } + private com.google.protobuf.ByteString getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.SearchIndexSplitsOptions search_index_splits_options = 2; + public static final int SEARCH_INDEX_SPLITS_OPTIONS_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions searchIndexSplitsOptions_; + public boolean hasSearchIndexSplitsOptions() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions getSearchIndexSplitsOptions() { + return searchIndexSplitsOptions_; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptionsOrBuilder getSearchIndexSplitsOptionsOrBuilder() { + return searchIndexSplitsOptions_; + } + + private void initFields() { + tableName_ = ""; + searchIndexSplitsOptions_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; - public StreamRecord getDefaultInstanceForType() { - return defaultInstance; + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getTableNameBytes()); } - + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeMessage(2, searchIndexSplitsOptions_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, searchIndexSplitsOptions_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsRequest prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetStreamRecordResponse_StreamRecord_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ComputeSplitsRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetStreamRecordResponse_StreamRecord_fieldAccessorTable; - } - - private int bitField0_; - // required .com.alicloud.openservices.tablestore.core.protocol.ActionType action_type = 1; - public static final int ACTION_TYPE_FIELD_NUMBER = 1; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ActionType actionType_; - public boolean hasActionType() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ActionType getActionType() { - return actionType_; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ComputeSplitsRequest_fieldAccessorTable; } - // required bytes record = 2; - public static final int RECORD_FIELD_NUMBER = 2; - private com.google.protobuf.ByteString record_; - public boolean hasRecord() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public com.google.protobuf.ByteString getRecord() { - return record_; + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); } - private void initFields() { - actionType_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ActionType.PUT_ROW; - record_ = com.google.protobuf.ByteString.EMPTY; + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasActionType()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasRecord()) { - memoizedIsInitialized = 0; - return false; + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getSearchIndexSplitsOptionsFieldBuilder(); } - memoizedIsInitialized = 1; - return true; } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeEnum(1, actionType_.getNumber()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, record_); - } - getUnknownFields().writeTo(output); + private static Builder create() { + return new Builder(); } - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, actionType_.getNumber()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, record_); + public Builder clear() { + super.clear(); + tableName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + if (searchIndexSplitsOptionsBuilder_ == null) { + searchIndexSplitsOptions_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions.getDefaultInstance(); + } else { + searchIndexSplitsOptionsBuilder_.clear(); } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; + bitField0_ = (bitField0_ & ~0x00000002); + return this; } - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); + public Builder clone() { + return create().mergeFrom(buildPartial()); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsRequest.getDescriptor(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsRequest.getDefaultInstance(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsRequest build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) + + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsRequest buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord parseFrom(java.io.InputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.tableName_ = tableName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + if (searchIndexSplitsOptionsBuilder_ == null) { + result.searchIndexSplitsOptions_ = searchIndexSplitsOptions_; } else { - return null; + result.searchIndexSplitsOptions_ = searchIndexSplitsOptionsBuilder_.build(); } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsRequest)other); } else { - return null; + super.mergeFrom(other); + return this; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord prototype) { - return newBuilder().mergeFrom(prototype); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsRequest.getDefaultInstance()) return this; + if (other.hasTableName()) { + setTableName(other.getTableName()); + } + if (other.hasSearchIndexSplitsOptions()) { + mergeSearchIndexSplitsOptions(other.getSearchIndexSplitsOptions()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; } - public Builder toBuilder() { return newBuilder(this); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; + public final boolean isInitialized() { + return true; } - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecordOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetStreamRecordResponse_StreamRecord_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetStreamRecordResponse_StreamRecord_fieldAccessorTable; - } - - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - actionType_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ActionType.PUT_ROW; - bitField0_ = (bitField0_ & ~0x00000001); - record_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord.getDescriptor(); - } - - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord.getDefaultInstance(); - } - - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.actionType_ = actionType_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.record_ = record_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord.getDefaultInstance()) return this; - if (other.hasActionType()) { - setActionType(other.getActionType()); - } - if (other.hasRecord()) { - setRecord(other.getRecord()); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - if (!hasActionType()) { - - return false; - } - if (!hasRecord()) { - - return false; - } - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); onChanged(); return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 8: { - int rawValue = input.readEnum(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ActionType value = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ActionType.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(1, rawValue); - } else { - bitField0_ |= 0x00000001; - actionType_ = value; - } - break; } - case 18: { - bitField0_ |= 0x00000002; - record_ = input.readBytes(); - break; + break; + } + case 10: { + bitField0_ |= 0x00000001; + tableName_ = input.readBytes(); + break; + } + case 18: { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions.newBuilder(); + if (hasSearchIndexSplitsOptions()) { + subBuilder.mergeFrom(getSearchIndexSplitsOptions()); } + input.readMessage(subBuilder, extensionRegistry); + setSearchIndexSplitsOptions(subBuilder.buildPartial()); + break; } } } - - private int bitField0_; - - // required .com.alicloud.openservices.tablestore.core.protocol.ActionType action_type = 1; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ActionType actionType_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ActionType.PUT_ROW; - public boolean hasActionType() { - return ((bitField0_ & 0x00000001) == 0x00000001); + } + + private int bitField0_; + + // optional string table_name = 1; + private java.lang.Object tableName_ = ""; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + tableName_ = s; + return s; + } else { + return (String) ref; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ActionType getActionType() { - return actionType_; + } + public Builder setTableName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + return this; + } + public Builder clearTableName() { + bitField0_ = (bitField0_ & ~0x00000001); + tableName_ = getDefaultInstance().getTableName(); + onChanged(); + return this; + } + void setTableName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.SearchIndexSplitsOptions search_index_splits_options = 2; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions searchIndexSplitsOptions_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptionsOrBuilder> searchIndexSplitsOptionsBuilder_; + public boolean hasSearchIndexSplitsOptions() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions getSearchIndexSplitsOptions() { + if (searchIndexSplitsOptionsBuilder_ == null) { + return searchIndexSplitsOptions_; + } else { + return searchIndexSplitsOptionsBuilder_.getMessage(); } - public Builder setActionType(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ActionType value) { + } + public Builder setSearchIndexSplitsOptions(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions value) { + if (searchIndexSplitsOptionsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000001; - actionType_ = value; + searchIndexSplitsOptions_ = value; onChanged(); - return this; + } else { + searchIndexSplitsOptionsBuilder_.setMessage(value); } - public Builder clearActionType() { - bitField0_ = (bitField0_ & ~0x00000001); - actionType_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ActionType.PUT_ROW; + bitField0_ |= 0x00000002; + return this; + } + public Builder setSearchIndexSplitsOptions( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions.Builder builderForValue) { + if (searchIndexSplitsOptionsBuilder_ == null) { + searchIndexSplitsOptions_ = builderForValue.build(); onChanged(); - return this; - } - - // required bytes record = 2; - private com.google.protobuf.ByteString record_ = com.google.protobuf.ByteString.EMPTY; - public boolean hasRecord() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public com.google.protobuf.ByteString getRecord() { - return record_; + } else { + searchIndexSplitsOptionsBuilder_.setMessage(builderForValue.build()); } - public Builder setRecord(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - record_ = value; + bitField0_ |= 0x00000002; + return this; + } + public Builder mergeSearchIndexSplitsOptions(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions value) { + if (searchIndexSplitsOptionsBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002) && + searchIndexSplitsOptions_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions.getDefaultInstance()) { + searchIndexSplitsOptions_ = + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions.newBuilder(searchIndexSplitsOptions_).mergeFrom(value).buildPartial(); + } else { + searchIndexSplitsOptions_ = value; + } onChanged(); - return this; + } else { + searchIndexSplitsOptionsBuilder_.mergeFrom(value); } - public Builder clearRecord() { - bitField0_ = (bitField0_ & ~0x00000002); - record_ = getDefaultInstance().getRecord(); + bitField0_ |= 0x00000002; + return this; + } + public Builder clearSearchIndexSplitsOptions() { + if (searchIndexSplitsOptionsBuilder_ == null) { + searchIndexSplitsOptions_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions.getDefaultInstance(); onChanged(); - return this; + } else { + searchIndexSplitsOptionsBuilder_.clear(); } - - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GetStreamRecordResponse.StreamRecord) + bitField0_ = (bitField0_ & ~0x00000002); + return this; } - - static { - defaultInstance = new StreamRecord(true); - defaultInstance.initFields(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions.Builder getSearchIndexSplitsOptionsBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getSearchIndexSplitsOptionsFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptionsOrBuilder getSearchIndexSplitsOptionsOrBuilder() { + if (searchIndexSplitsOptionsBuilder_ != null) { + return searchIndexSplitsOptionsBuilder_.getMessageOrBuilder(); + } else { + return searchIndexSplitsOptions_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptionsOrBuilder> + getSearchIndexSplitsOptionsFieldBuilder() { + if (searchIndexSplitsOptionsBuilder_ == null) { + searchIndexSplitsOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptionsOrBuilder>( + searchIndexSplitsOptions_, + getParentForChildren(), + isClean()); + searchIndexSplitsOptions_ = null; + } + return searchIndexSplitsOptionsBuilder_; } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GetStreamRecordResponse.StreamRecord) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.ComputeSplitsRequest) + } + + static { + defaultInstance = new ComputeSplitsRequest(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.ComputeSplitsRequest) + } + + public interface SearchIndexSplitsOptionsOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string index_name = 1; + boolean hasIndexName(); + String getIndexName(); + } + public static final class SearchIndexSplitsOptions extends + com.google.protobuf.GeneratedMessage + implements SearchIndexSplitsOptionsOrBuilder { + // Use SearchIndexSplitsOptions.newBuilder() to construct. + private SearchIndexSplitsOptions(Builder builder) { + super(builder); } + private SearchIndexSplitsOptions(boolean noInit) {} - private int bitField0_; - // repeated .com.alicloud.openservices.tablestore.core.protocol.GetStreamRecordResponse.StreamRecord stream_records = 1; - public static final int STREAM_RECORDS_FIELD_NUMBER = 1; - private java.util.List streamRecords_; - public java.util.List getStreamRecordsList() { - return streamRecords_; - } - public java.util.List - getStreamRecordsOrBuilderList() { - return streamRecords_; + private static final SearchIndexSplitsOptions defaultInstance; + public static SearchIndexSplitsOptions getDefaultInstance() { + return defaultInstance; } - public int getStreamRecordsCount() { - return streamRecords_.size(); + + public SearchIndexSplitsOptions getDefaultInstanceForType() { + return defaultInstance; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord getStreamRecords(int index) { - return streamRecords_.get(index); + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_SearchIndexSplitsOptions_descriptor; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecordOrBuilder getStreamRecordsOrBuilder( - int index) { - return streamRecords_.get(index); + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_SearchIndexSplitsOptions_fieldAccessorTable; } - // optional string next_shard_iterator = 2; - public static final int NEXT_SHARD_ITERATOR_FIELD_NUMBER = 2; - private java.lang.Object nextShardIterator_; - public boolean hasNextShardIterator() { + private int bitField0_; + // optional string index_name = 1; + public static final int INDEX_NAME_FIELD_NUMBER = 1; + private java.lang.Object indexName_; + public boolean hasIndexName() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getNextShardIterator() { - java.lang.Object ref = nextShardIterator_; + public String getIndexName() { + java.lang.Object ref = indexName_; if (ref instanceof String) { return (String) ref; } else { @@ -40606,17 +52772,17 @@ public String getNextShardIterator() { (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); if (com.google.protobuf.Internal.isValidUtf8(bs)) { - nextShardIterator_ = s; + indexName_ = s; } return s; } } - private com.google.protobuf.ByteString getNextShardIteratorBytes() { - java.lang.Object ref = nextShardIterator_; + private com.google.protobuf.ByteString getIndexNameBytes() { + java.lang.Object ref = indexName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((String) ref); - nextShardIterator_ = b; + indexName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -40624,20 +52790,13 @@ private com.google.protobuf.ByteString getNextShardIteratorBytes() { } private void initFields() { - streamRecords_ = java.util.Collections.emptyList(); - nextShardIterator_ = ""; + indexName_ = ""; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - for (int i = 0; i < getStreamRecordsCount(); i++) { - if (!getStreamRecords(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } memoizedIsInitialized = 1; return true; } @@ -40645,11 +52804,8 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - for (int i = 0; i < streamRecords_.size(); i++) { - output.writeMessage(1, streamRecords_.get(i)); - } if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(2, getNextShardIteratorBytes()); + output.writeBytes(1, getIndexNameBytes()); } getUnknownFields().writeTo(output); } @@ -40660,13 +52816,9 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - for (int i = 0; i < streamRecords_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, streamRecords_.get(i)); - } if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getNextShardIteratorBytes()); + .computeBytesSize(1, getIndexNameBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -40680,41 +52832,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -40723,7 +52875,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -40734,12 +52886,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -40749,7 +52901,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -40762,18 +52914,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponseOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptionsOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetStreamRecordResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_SearchIndexSplitsOptions_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetStreamRecordResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_SearchIndexSplitsOptions_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -40784,7 +52936,6 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getStreamRecordsFieldBuilder(); } } private static Builder create() { @@ -40793,14 +52944,8 @@ private static Builder create() { public Builder clear() { super.clear(); - if (streamRecordsBuilder_ == null) { - streamRecords_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - streamRecordsBuilder_.clear(); - } - nextShardIterator_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); + indexName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -40810,24 +52955,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -40835,79 +52980,38 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStr return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse(this); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; - if (streamRecordsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - streamRecords_ = java.util.Collections.unmodifiableList(streamRecords_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.streamRecords_ = streamRecords_; - } else { - result.streamRecords_ = streamRecordsBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.nextShardIterator_ = nextShardIterator_; + result.indexName_ = indexName_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.getDefaultInstance()) return this; - if (streamRecordsBuilder_ == null) { - if (!other.streamRecords_.isEmpty()) { - if (streamRecords_.isEmpty()) { - streamRecords_ = other.streamRecords_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureStreamRecordsIsMutable(); - streamRecords_.addAll(other.streamRecords_); - } - onChanged(); - } - } else { - if (!other.streamRecords_.isEmpty()) { - if (streamRecordsBuilder_.isEmpty()) { - streamRecordsBuilder_.dispose(); - streamRecordsBuilder_ = null; - streamRecords_ = other.streamRecords_; - bitField0_ = (bitField0_ & ~0x00000001); - streamRecordsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getStreamRecordsFieldBuilder() : null; - } else { - streamRecordsBuilder_.addAllMessages(other.streamRecords_); - } - } - } - if (other.hasNextShardIterator()) { - setNextShardIterator(other.getNextShardIterator()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions.getDefaultInstance()) return this; + if (other.hasIndexName()) { + setIndexName(other.getIndexName()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { - for (int i = 0; i < getStreamRecordsCount(); i++) { - if (!getStreamRecords(i).isInitialized()) { - - return false; - } - } return true; } @@ -40935,14 +53039,8 @@ public Builder mergeFrom( break; } case 10: { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord.newBuilder(); - input.readMessage(subBuilder, extensionRegistry); - addStreamRecords(subBuilder.buildPartial()); - break; - } - case 18: { - bitField0_ |= 0x00000002; - nextShardIterator_ = input.readBytes(); + bitField0_ |= 0x00000001; + indexName_ = input.readBytes(); break; } } @@ -40951,291 +53049,499 @@ public Builder mergeFrom( private int bitField0_; - // repeated .com.alicloud.openservices.tablestore.core.protocol.GetStreamRecordResponse.StreamRecord stream_records = 1; - private java.util.List streamRecords_ = - java.util.Collections.emptyList(); - private void ensureStreamRecordsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - streamRecords_ = new java.util.ArrayList(streamRecords_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecordOrBuilder> streamRecordsBuilder_; - - public java.util.List getStreamRecordsList() { - if (streamRecordsBuilder_ == null) { - return java.util.Collections.unmodifiableList(streamRecords_); - } else { - return streamRecordsBuilder_.getMessageList(); - } - } - public int getStreamRecordsCount() { - if (streamRecordsBuilder_ == null) { - return streamRecords_.size(); - } else { - return streamRecordsBuilder_.getCount(); - } + // optional string index_name = 1; + private java.lang.Object indexName_ = ""; + public boolean hasIndexName() { + return ((bitField0_ & 0x00000001) == 0x00000001); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord getStreamRecords(int index) { - if (streamRecordsBuilder_ == null) { - return streamRecords_.get(index); + public String getIndexName() { + java.lang.Object ref = indexName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + indexName_ = s; + return s; } else { - return streamRecordsBuilder_.getMessage(index); + return (String) ref; } } - public Builder setStreamRecords( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord value) { - if (streamRecordsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureStreamRecordsIsMutable(); - streamRecords_.set(index, value); - onChanged(); - } else { - streamRecordsBuilder_.setMessage(index, value); - } + public Builder setIndexName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + indexName_ = value; + onChanged(); return this; } - public Builder setStreamRecords( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord.Builder builderForValue) { - if (streamRecordsBuilder_ == null) { - ensureStreamRecordsIsMutable(); - streamRecords_.set(index, builderForValue.build()); - onChanged(); - } else { - streamRecordsBuilder_.setMessage(index, builderForValue.build()); - } + public Builder clearIndexName() { + bitField0_ = (bitField0_ & ~0x00000001); + indexName_ = getDefaultInstance().getIndexName(); + onChanged(); return this; } - public Builder addStreamRecords(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord value) { - if (streamRecordsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureStreamRecordsIsMutable(); - streamRecords_.add(value); - onChanged(); - } else { - streamRecordsBuilder_.addMessage(value); - } - return this; + void setIndexName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + indexName_ = value; + onChanged(); } - public Builder addStreamRecords( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord value) { - if (streamRecordsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureStreamRecordsIsMutable(); - streamRecords_.add(index, value); - onChanged(); - } else { - streamRecordsBuilder_.addMessage(index, value); - } - return this; + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.SearchIndexSplitsOptions) + } + + static { + defaultInstance = new SearchIndexSplitsOptions(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.SearchIndexSplitsOptions) + } + + public interface ComputeSplitsResponseOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional bytes session_id = 1; + boolean hasSessionId(); + com.google.protobuf.ByteString getSessionId(); + + // optional int32 splits_size = 2; + boolean hasSplitsSize(); + int getSplitsSize(); + } + public static final class ComputeSplitsResponse extends + com.google.protobuf.GeneratedMessage + implements ComputeSplitsResponseOrBuilder { + // Use ComputeSplitsResponse.newBuilder() to construct. + private ComputeSplitsResponse(Builder builder) { + super(builder); + } + private ComputeSplitsResponse(boolean noInit) {} + + private static final ComputeSplitsResponse defaultInstance; + public static ComputeSplitsResponse getDefaultInstance() { + return defaultInstance; + } + + public ComputeSplitsResponse getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ComputeSplitsResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ComputeSplitsResponse_fieldAccessorTable; + } + + private int bitField0_; + // optional bytes session_id = 1; + public static final int SESSION_ID_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString sessionId_; + public boolean hasSessionId() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.google.protobuf.ByteString getSessionId() { + return sessionId_; + } + + // optional int32 splits_size = 2; + public static final int SPLITS_SIZE_FIELD_NUMBER = 2; + private int splitsSize_; + public boolean hasSplitsSize() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public int getSplitsSize() { + return splitsSize_; + } + + private void initFields() { + sessionId_ = com.google.protobuf.ByteString.EMPTY; + splitsSize_ = 0; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, sessionId_); } - public Builder addStreamRecords( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord.Builder builderForValue) { - if (streamRecordsBuilder_ == null) { - ensureStreamRecordsIsMutable(); - streamRecords_.add(builderForValue.build()); - onChanged(); - } else { - streamRecordsBuilder_.addMessage(builderForValue.build()); - } - return this; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeInt32(2, splitsSize_); } - public Builder addStreamRecords( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord.Builder builderForValue) { - if (streamRecordsBuilder_ == null) { - ensureStreamRecordsIsMutable(); - streamRecords_.add(index, builderForValue.build()); - onChanged(); - } else { - streamRecordsBuilder_.addMessage(index, builderForValue.build()); - } - return this; + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, sessionId_); } - public Builder addAllStreamRecords( - java.lang.Iterable values) { - if (streamRecordsBuilder_ == null) { - ensureStreamRecordsIsMutable(); - super.addAll(values, streamRecords_); - onChanged(); - } else { - streamRecordsBuilder_.addAllMessages(values); - } - return this; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, splitsSize_); } - public Builder clearStreamRecords() { - if (streamRecordsBuilder_ == null) { - streamRecords_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - streamRecordsBuilder_.clear(); + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsResponse prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ComputeSplitsResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ComputeSplitsResponse_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + sessionId_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + splitsSize_ = 0; + bitField0_ = (bitField0_ & ~0x00000002); return this; } - public Builder removeStreamRecords(int index) { - if (streamRecordsBuilder_ == null) { - ensureStreamRecordsIsMutable(); - streamRecords_.remove(index); - onChanged(); - } else { - streamRecordsBuilder_.remove(index); + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsResponse.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsResponse.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsResponse build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); } - return this; + return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord.Builder getStreamRecordsBuilder( - int index) { - return getStreamRecordsFieldBuilder().getBuilder(index); + + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsResponse buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecordOrBuilder getStreamRecordsOrBuilder( - int index) { - if (streamRecordsBuilder_ == null) { - return streamRecords_.get(index); } else { - return streamRecordsBuilder_.getMessageOrBuilder(index); + + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsResponse(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.sessionId_ = sessionId_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; } + result.splitsSize_ = splitsSize_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; } - public java.util.List - getStreamRecordsOrBuilderList() { - if (streamRecordsBuilder_ != null) { - return streamRecordsBuilder_.getMessageOrBuilderList(); + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsResponse)other); } else { - return java.util.Collections.unmodifiableList(streamRecords_); + super.mergeFrom(other); + return this; } } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord.Builder addStreamRecordsBuilder() { - return getStreamRecordsFieldBuilder().addBuilder( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord.getDefaultInstance()); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord.Builder addStreamRecordsBuilder( - int index) { - return getStreamRecordsFieldBuilder().addBuilder( - index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord.getDefaultInstance()); + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsResponse.getDefaultInstance()) return this; + if (other.hasSessionId()) { + setSessionId(other.getSessionId()); + } + if (other.hasSplitsSize()) { + setSplitsSize(other.getSplitsSize()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; } - public java.util.List - getStreamRecordsBuilderList() { - return getStreamRecordsFieldBuilder().getBuilderList(); + + public final boolean isInitialized() { + return true; } - private com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecordOrBuilder> - getStreamRecordsFieldBuilder() { - if (streamRecordsBuilder_ == null) { - streamRecordsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecordOrBuilder>( - streamRecords_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); - streamRecords_ = null; + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + sessionId_ = input.readBytes(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + splitsSize_ = input.readInt32(); + break; + } + } } - return streamRecordsBuilder_; } - // optional string next_shard_iterator = 2; - private java.lang.Object nextShardIterator_ = ""; - public boolean hasNextShardIterator() { - return ((bitField0_ & 0x00000002) == 0x00000002); + private int bitField0_; + + // optional bytes session_id = 1; + private com.google.protobuf.ByteString sessionId_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasSessionId() { + return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getNextShardIterator() { - java.lang.Object ref = nextShardIterator_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - nextShardIterator_ = s; - return s; - } else { - return (String) ref; - } + public com.google.protobuf.ByteString getSessionId() { + return sessionId_; } - public Builder setNextShardIterator(String value) { + public Builder setSessionId(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000002; - nextShardIterator_ = value; + bitField0_ |= 0x00000001; + sessionId_ = value; onChanged(); return this; } - public Builder clearNextShardIterator() { - bitField0_ = (bitField0_ & ~0x00000002); - nextShardIterator_ = getDefaultInstance().getNextShardIterator(); + public Builder clearSessionId() { + bitField0_ = (bitField0_ & ~0x00000001); + sessionId_ = getDefaultInstance().getSessionId(); onChanged(); return this; } - void setNextShardIterator(com.google.protobuf.ByteString value) { + + // optional int32 splits_size = 2; + private int splitsSize_ ; + public boolean hasSplitsSize() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public int getSplitsSize() { + return splitsSize_; + } + public Builder setSplitsSize(int value) { bitField0_ |= 0x00000002; - nextShardIterator_ = value; + splitsSize_ = value; + onChanged(); + return this; + } + public Builder clearSplitsSize() { + bitField0_ = (bitField0_ & ~0x00000002); + splitsSize_ = 0; onChanged(); + return this; } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GetStreamRecordResponse) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.ComputeSplitsResponse) } static { - defaultInstance = new GetStreamRecordResponse(true); + defaultInstance = new ComputeSplitsResponse(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GetStreamRecordResponse) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.ComputeSplitsResponse) } - public interface ComputeSplitPointsBySizeRequestOrBuilder + public interface SQLQueryRequestOrBuilder extends com.google.protobuf.MessageOrBuilder { - // required string table_name = 1; - boolean hasTableName(); - String getTableName(); - - // required int64 split_size = 2; - boolean hasSplitSize(); - long getSplitSize(); + // required string query = 1; + boolean hasQuery(); + String getQuery(); - // optional int64 split_size_unit_in_byte = 3; - boolean hasSplitSizeUnitInByte(); - long getSplitSizeUnitInByte(); + // optional .com.alicloud.openservices.tablestore.core.protocol.SQLPayloadVersion version = 2; + boolean hasVersion(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLPayloadVersion getVersion(); } - public static final class ComputeSplitPointsBySizeRequest extends + public static final class SQLQueryRequest extends com.google.protobuf.GeneratedMessage - implements ComputeSplitPointsBySizeRequestOrBuilder { - // Use ComputeSplitPointsBySizeRequest.newBuilder() to construct. - private ComputeSplitPointsBySizeRequest(Builder builder) { + implements SQLQueryRequestOrBuilder { + // Use SQLQueryRequest.newBuilder() to construct. + private SQLQueryRequest(Builder builder) { super(builder); } - private ComputeSplitPointsBySizeRequest(boolean noInit) {} + private SQLQueryRequest(boolean noInit) {} - private static final ComputeSplitPointsBySizeRequest defaultInstance; - public static ComputeSplitPointsBySizeRequest getDefaultInstance() { + private static final SQLQueryRequest defaultInstance; + public static SQLQueryRequest getDefaultInstance() { return defaultInstance; } - public ComputeSplitPointsBySizeRequest getDefaultInstanceForType() { + public SQLQueryRequest getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ComputeSplitPointsBySizeRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_SQLQueryRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ComputeSplitPointsBySizeRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_SQLQueryRequest_fieldAccessorTable; } private int bitField0_; - // required string table_name = 1; - public static final int TABLE_NAME_FIELD_NUMBER = 1; - private java.lang.Object tableName_; - public boolean hasTableName() { + // required string query = 1; + public static final int QUERY_FIELD_NUMBER = 1; + private java.lang.Object query_; + public boolean hasQuery() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getTableName() { - java.lang.Object ref = tableName_; + public String getQuery() { + java.lang.Object ref = query_; if (ref instanceof String) { return (String) ref; } else { @@ -41243,58 +53549,43 @@ public String getTableName() { (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); if (com.google.protobuf.Internal.isValidUtf8(bs)) { - tableName_ = s; + query_ = s; } return s; } } - private com.google.protobuf.ByteString getTableNameBytes() { - java.lang.Object ref = tableName_; + private com.google.protobuf.ByteString getQueryBytes() { + java.lang.Object ref = query_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((String) ref); - tableName_ = b; + query_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - // required int64 split_size = 2; - public static final int SPLIT_SIZE_FIELD_NUMBER = 2; - private long splitSize_; - public boolean hasSplitSize() { + // optional .com.alicloud.openservices.tablestore.core.protocol.SQLPayloadVersion version = 2; + public static final int VERSION_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLPayloadVersion version_; + public boolean hasVersion() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public long getSplitSize() { - return splitSize_; - } - - // optional int64 split_size_unit_in_byte = 3; - public static final int SPLIT_SIZE_UNIT_IN_BYTE_FIELD_NUMBER = 3; - private long splitSizeUnitInByte_; - public boolean hasSplitSizeUnitInByte() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public long getSplitSizeUnitInByte() { - return splitSizeUnitInByte_; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLPayloadVersion getVersion() { + return version_; } private void initFields() { - tableName_ = ""; - splitSize_ = 0L; - splitSizeUnitInByte_ = 0L; + query_ = ""; + version_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLPayloadVersion.SQL_PLAIN_BUFFER; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - if (!hasTableName()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasSplitSize()) { + if (!hasQuery()) { memoizedIsInitialized = 0; return false; } @@ -41306,13 +53597,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getTableNameBytes()); + output.writeBytes(1, getQueryBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeInt64(2, splitSize_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeInt64(3, splitSizeUnitInByte_); + output.writeEnum(2, version_.getNumber()); } getUnknownFields().writeTo(output); } @@ -41325,15 +53613,11 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getTableNameBytes()); + .computeBytesSize(1, getQueryBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeInt64Size(2, splitSize_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(3, splitSizeUnitInByte_); + .computeEnumSize(2, version_.getNumber()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -41347,41 +53631,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -41390,7 +53674,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -41401,12 +53685,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -41416,7 +53700,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryRequest prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -41429,18 +53713,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequestOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ComputeSplitPointsBySizeRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_SQLQueryRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ComputeSplitPointsBySizeRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_SQLQueryRequest_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -41459,12 +53743,10 @@ private static Builder create() { public Builder clear() { super.clear(); - tableName_ = ""; + query_ = ""; bitField0_ = (bitField0_ & ~0x00000001); - splitSize_ = 0L; + version_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLPayloadVersion.SQL_PLAIN_BUFFER; bitField0_ = (bitField0_ & ~0x00000002); - splitSizeUnitInByte_ = 0L; - bitField0_ = (bitField0_ & ~0x00000004); return this; } @@ -41474,24 +53756,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryRequest.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryRequest.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryRequest build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryRequest buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -41499,57 +53781,46 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Comput return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest(this); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryRequest result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryRequest(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.tableName_ = tableName_; + result.query_ = query_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - result.splitSize_ = splitSize_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.splitSizeUnitInByte_ = splitSizeUnitInByte_; + result.version_ = version_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryRequest)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest.getDefaultInstance()) return this; - if (other.hasTableName()) { - setTableName(other.getTableName()); - } - if (other.hasSplitSize()) { - setSplitSize(other.getSplitSize()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryRequest.getDefaultInstance()) return this; + if (other.hasQuery()) { + setQuery(other.getQuery()); } - if (other.hasSplitSizeUnitInByte()) { - setSplitSizeUnitInByte(other.getSplitSizeUnitInByte()); + if (other.hasVersion()) { + setVersion(other.getVersion()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { - if (!hasTableName()) { - - return false; - } - if (!hasSplitSize()) { + if (!hasQuery()) { return false; } @@ -41581,17 +53852,18 @@ public Builder mergeFrom( } case 10: { bitField0_ |= 0x00000001; - tableName_ = input.readBytes(); + query_ = input.readBytes(); break; } case 16: { - bitField0_ |= 0x00000002; - splitSize_ = input.readInt64(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - splitSizeUnitInByte_ = input.readInt64(); + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLPayloadVersion value = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLPayloadVersion.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(2, rawValue); + } else { + bitField0_ |= 0x00000002; + version_ = value; + } break; } } @@ -41600,701 +53872,880 @@ public Builder mergeFrom( private int bitField0_; - // required string table_name = 1; - private java.lang.Object tableName_ = ""; - public boolean hasTableName() { + // required string query = 1; + private java.lang.Object query_ = ""; + public boolean hasQuery() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getTableName() { - java.lang.Object ref = tableName_; + public String getQuery() { + java.lang.Object ref = query_; if (!(ref instanceof String)) { String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - tableName_ = s; + query_ = s; return s; } else { return (String) ref; } } - public Builder setTableName(String value) { + public Builder setQuery(String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; - tableName_ = value; + query_ = value; onChanged(); return this; } - public Builder clearTableName() { + public Builder clearQuery() { bitField0_ = (bitField0_ & ~0x00000001); - tableName_ = getDefaultInstance().getTableName(); + query_ = getDefaultInstance().getQuery(); onChanged(); return this; } - void setTableName(com.google.protobuf.ByteString value) { + void setQuery(com.google.protobuf.ByteString value) { bitField0_ |= 0x00000001; - tableName_ = value; + query_ = value; onChanged(); } - // required int64 split_size = 2; - private long splitSize_ ; - public boolean hasSplitSize() { + // optional .com.alicloud.openservices.tablestore.core.protocol.SQLPayloadVersion version = 2; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLPayloadVersion version_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLPayloadVersion.SQL_PLAIN_BUFFER; + public boolean hasVersion() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public long getSplitSize() { - return splitSize_; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLPayloadVersion getVersion() { + return version_; } - public Builder setSplitSize(long value) { + public Builder setVersion(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLPayloadVersion value) { + if (value == null) { + throw new NullPointerException(); + } bitField0_ |= 0x00000002; - splitSize_ = value; + version_ = value; onChanged(); return this; } - public Builder clearSplitSize() { + public Builder clearVersion() { bitField0_ = (bitField0_ & ~0x00000002); - splitSize_ = 0L; - onChanged(); - return this; - } - - // optional int64 split_size_unit_in_byte = 3; - private long splitSizeUnitInByte_ ; - public boolean hasSplitSizeUnitInByte() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public long getSplitSizeUnitInByte() { - return splitSizeUnitInByte_; - } - public Builder setSplitSizeUnitInByte(long value) { - bitField0_ |= 0x00000004; - splitSizeUnitInByte_ = value; - onChanged(); - return this; - } - public Builder clearSplitSizeUnitInByte() { - bitField0_ = (bitField0_ & ~0x00000004); - splitSizeUnitInByte_ = 0L; + version_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLPayloadVersion.SQL_PLAIN_BUFFER; onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.ComputeSplitPointsBySizeRequest) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.SQLQueryRequest) } static { - defaultInstance = new ComputeSplitPointsBySizeRequest(true); + defaultInstance = new SQLQueryRequest(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.ComputeSplitPointsBySizeRequest) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.SQLQueryRequest) } - public interface ComputeSplitPointsBySizeResponseOrBuilder + public interface TableConsumedCapacityOrBuilder extends com.google.protobuf.MessageOrBuilder { - // required .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 1; + // optional string table_name = 1; + boolean hasTableName(); + String getTableName(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 2; boolean hasConsumed(); com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed(); com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder(); - // repeated .com.alicloud.openservices.tablestore.core.protocol.PrimaryKeySchema schema = 2; - java.util.List - getSchemaList(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchema getSchema(int index); - int getSchemaCount(); - java.util.List - getSchemaOrBuilderList(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchemaOrBuilder getSchemaOrBuilder( - int index); - - // repeated bytes split_points = 3; - java.util.List getSplitPointsList(); - int getSplitPointsCount(); - com.google.protobuf.ByteString getSplitPoints(int index); - - // repeated .com.alicloud.openservices.tablestore.core.protocol.ComputeSplitPointsBySizeResponse.SplitLocation locations = 4; - java.util.List - getLocationsList(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation getLocations(int index); - int getLocationsCount(); - java.util.List - getLocationsOrBuilderList(); - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocationOrBuilder getLocationsOrBuilder( - int index); + // optional .com.alicloud.openservices.tablestore.core.protocol.ReservedThroughput reserved_throughput = 3; + boolean hasReservedThroughput(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput getReservedThroughput(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputOrBuilder getReservedThroughputOrBuilder(); } - public static final class ComputeSplitPointsBySizeResponse extends + public static final class TableConsumedCapacity extends com.google.protobuf.GeneratedMessage - implements ComputeSplitPointsBySizeResponseOrBuilder { - // Use ComputeSplitPointsBySizeResponse.newBuilder() to construct. - private ComputeSplitPointsBySizeResponse(Builder builder) { + implements TableConsumedCapacityOrBuilder { + // Use TableConsumedCapacity.newBuilder() to construct. + private TableConsumedCapacity(Builder builder) { super(builder); } - private ComputeSplitPointsBySizeResponse(boolean noInit) {} - - private static final ComputeSplitPointsBySizeResponse defaultInstance; - public static ComputeSplitPointsBySizeResponse getDefaultInstance() { - return defaultInstance; + private TableConsumedCapacity(boolean noInit) {} + + private static final TableConsumedCapacity defaultInstance; + public static TableConsumedCapacity getDefaultInstance() { + return defaultInstance; + } + + public TableConsumedCapacity getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TableConsumedCapacity_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TableConsumedCapacity_fieldAccessorTable; + } + + private int bitField0_; + // optional string table_name = 1; + public static final int TABLE_NAME_FIELD_NUMBER = 1; + private java.lang.Object tableName_; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + tableName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 2; + public static final int CONSUMED_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity consumed_; + public boolean hasConsumed() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed() { + return consumed_; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder() { + return consumed_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.ReservedThroughput reserved_throughput = 3; + public static final int RESERVED_THROUGHPUT_FIELD_NUMBER = 3; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput reservedThroughput_; + public boolean hasReservedThroughput() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput getReservedThroughput() { + return reservedThroughput_; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputOrBuilder getReservedThroughputOrBuilder() { + return reservedThroughput_; + } + + private void initFields() { + tableName_ = ""; + consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); + reservedThroughput_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (hasConsumed()) { + if (!getConsumed().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + if (hasReservedThroughput()) { + if (!getReservedThroughput().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeMessage(2, consumed_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeMessage(3, reservedThroughput_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, consumed_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, reservedThroughput_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacity parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacity parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacity parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacity parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacity parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacity parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacity parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacity parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } } - - public ComputeSplitPointsBySizeResponse getDefaultInstanceForType() { - return defaultInstance; + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacity parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ComputeSplitPointsBySizeResponse_descriptor; + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacity parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ComputeSplitPointsBySizeResponse_fieldAccessorTable; + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacity prototype) { + return newBuilder().mergeFrom(prototype); } + public Builder toBuilder() { return newBuilder(this); } - public interface SplitLocationOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required string location = 1; - boolean hasLocation(); - String getLocation(); - - // required sint64 repeat = 2; - boolean hasRepeat(); - long getRepeat(); + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; } - public static final class SplitLocation extends - com.google.protobuf.GeneratedMessage - implements SplitLocationOrBuilder { - // Use SplitLocation.newBuilder() to construct. - private SplitLocation(Builder builder) { - super(builder); - } - private SplitLocation(boolean noInit) {} - - private static final SplitLocation defaultInstance; - public static SplitLocation getDefaultInstance() { - return defaultInstance; - } - - public SplitLocation getDefaultInstanceForType() { - return defaultInstance; - } - + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacityOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ComputeSplitPointsBySizeResponse_SplitLocation_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TableConsumedCapacity_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ComputeSplitPointsBySizeResponse_SplitLocation_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TableConsumedCapacity_fieldAccessorTable; } - private int bitField0_; - // required string location = 1; - public static final int LOCATION_FIELD_NUMBER = 1; - private java.lang.Object location_; - public boolean hasLocation() { - return ((bitField0_ & 0x00000001) == 0x00000001); + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacity.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); } - public String getLocation() { - java.lang.Object ref = location_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - location_ = s; - } - return s; - } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); } - private com.google.protobuf.ByteString getLocationBytes() { - java.lang.Object ref = location_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - location_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getConsumedFieldBuilder(); + getReservedThroughputFieldBuilder(); } } - - // required sint64 repeat = 2; - public static final int REPEAT_FIELD_NUMBER = 2; - private long repeat_; - public boolean hasRepeat() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public long getRepeat() { - return repeat_; + private static Builder create() { + return new Builder(); } - private void initFields() { - location_ = ""; - repeat_ = 0L; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasLocation()) { - memoizedIsInitialized = 0; - return false; + public Builder clear() { + super.clear(); + tableName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + if (consumedBuilder_ == null) { + consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); + } else { + consumedBuilder_.clear(); } - if (!hasRepeat()) { - memoizedIsInitialized = 0; - return false; + bitField0_ = (bitField0_ & ~0x00000002); + if (reservedThroughputBuilder_ == null) { + reservedThroughput_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.getDefaultInstance(); + } else { + reservedThroughputBuilder_.clear(); } - memoizedIsInitialized = 1; - return true; + bitField0_ = (bitField0_ & ~0x00000004); + return this; } - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getLocationBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeSInt64(2, repeat_); - } - getUnknownFields().writeTo(output); + public Builder clone() { + return create().mergeFrom(buildPartial()); } - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getLocationBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeSInt64Size(2, repeat_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacity.getDescriptor(); } - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacity getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacity.getDefaultInstance(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacity build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacity result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); } - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); + return result; } - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation prototype) { - return newBuilder().mergeFrom(prototype); + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacity buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacity result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; } - public Builder toBuilder() { return newBuilder(this); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ComputeSplitPointsBySizeResponse_SplitLocation_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ComputeSplitPointsBySizeResponse_SplitLocation_fieldAccessorTable; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacity buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacity result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacity(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; } - - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); + result.tableName_ = tableName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; } - - private Builder(BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); + if (consumedBuilder_ == null) { + result.consumed_ = consumed_; + } else { + result.consumed_ = consumedBuilder_.build(); } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; } - private static Builder create() { - return new Builder(); + if (reservedThroughputBuilder_ == null) { + result.reservedThroughput_ = reservedThroughput_; + } else { + result.reservedThroughput_ = reservedThroughputBuilder_.build(); } - - public Builder clear() { - super.clear(); - location_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - repeat_ = 0L; - bitField0_ = (bitField0_ & ~0x00000002); + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacity) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacity)other); + } else { + super.mergeFrom(other); return this; } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation.getDescriptor(); - } - - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation.getDefaultInstance(); - } - - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.location_ = location_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.repeat_ = repeat_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacity other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacity.getDefaultInstance()) return this; + if (other.hasTableName()) { + setTableName(other.getTableName()); } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation)other); - } else { - super.mergeFrom(other); - return this; - } + if (other.hasConsumed()) { + mergeConsumed(other.getConsumed()); } - - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation.getDefaultInstance()) return this; - if (other.hasLocation()) { - setLocation(other.getLocation()); - } - if (other.hasRepeat()) { - setRepeat(other.getRepeat()); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; + if (other.hasReservedThroughput()) { + mergeReservedThroughput(other.getReservedThroughput()); } - - public final boolean isInitialized() { - if (!hasLocation()) { + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (hasConsumed()) { + if (!getConsumed().isInitialized()) { return false; } - if (!hasRepeat()) { + } + if (hasReservedThroughput()) { + if (!getReservedThroughput().isInitialized()) { return false; } - return true; } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); onChanged(); return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; } - case 10: { - bitField0_ |= 0x00000001; - location_ = input.readBytes(); - break; + break; + } + case 10: { + bitField0_ |= 0x00000001; + tableName_ = input.readBytes(); + break; + } + case 18: { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.newBuilder(); + if (hasConsumed()) { + subBuilder.mergeFrom(getConsumed()); } - case 16: { - bitField0_ |= 0x00000002; - repeat_ = input.readSInt64(); - break; + input.readMessage(subBuilder, extensionRegistry); + setConsumed(subBuilder.buildPartial()); + break; + } + case 26: { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.newBuilder(); + if (hasReservedThroughput()) { + subBuilder.mergeFrom(getReservedThroughput()); } + input.readMessage(subBuilder, extensionRegistry); + setReservedThroughput(subBuilder.buildPartial()); + break; } } } - - private int bitField0_; - - // required string location = 1; - private java.lang.Object location_ = ""; - public boolean hasLocation() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getLocation() { - java.lang.Object ref = location_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - location_ = s; - return s; - } else { - return (String) ref; - } + } + + private int bitField0_; + + // optional string table_name = 1; + private java.lang.Object tableName_ = ""; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + tableName_ = s; + return s; + } else { + return (String) ref; } - public Builder setLocation(String value) { - if (value == null) { + } + public Builder setTableName(String value) { + if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; - location_ = value; + tableName_ = value; + onChanged(); + return this; + } + public Builder clearTableName() { + bitField0_ = (bitField0_ & ~0x00000001); + tableName_ = getDefaultInstance().getTableName(); + onChanged(); + return this; + } + void setTableName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 2; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder> consumedBuilder_; + public boolean hasConsumed() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed() { + if (consumedBuilder_ == null) { + return consumed_; + } else { + return consumedBuilder_.getMessage(); + } + } + public Builder setConsumed(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity value) { + if (consumedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + consumed_ = value; onChanged(); - return this; + } else { + consumedBuilder_.setMessage(value); } - public Builder clearLocation() { - bitField0_ = (bitField0_ & ~0x00000001); - location_ = getDefaultInstance().getLocation(); + bitField0_ |= 0x00000002; + return this; + } + public Builder setConsumed( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder builderForValue) { + if (consumedBuilder_ == null) { + consumed_ = builderForValue.build(); onChanged(); - return this; + } else { + consumedBuilder_.setMessage(builderForValue.build()); } - void setLocation(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; - location_ = value; + bitField0_ |= 0x00000002; + return this; + } + public Builder mergeConsumed(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity value) { + if (consumedBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002) && + consumed_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance()) { + consumed_ = + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.newBuilder(consumed_).mergeFrom(value).buildPartial(); + } else { + consumed_ = value; + } onChanged(); + } else { + consumedBuilder_.mergeFrom(value); } - - // required sint64 repeat = 2; - private long repeat_ ; - public boolean hasRepeat() { - return ((bitField0_ & 0x00000002) == 0x00000002); + bitField0_ |= 0x00000002; + return this; + } + public Builder clearConsumed() { + if (consumedBuilder_ == null) { + consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); + onChanged(); + } else { + consumedBuilder_.clear(); } - public long getRepeat() { - return repeat_; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder getConsumedBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getConsumedFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder() { + if (consumedBuilder_ != null) { + return consumedBuilder_.getMessageOrBuilder(); + } else { + return consumed_; } - public Builder setRepeat(long value) { - bitField0_ |= 0x00000002; - repeat_ = value; + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder> + getConsumedFieldBuilder() { + if (consumedBuilder_ == null) { + consumedBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder>( + consumed_, + getParentForChildren(), + isClean()); + consumed_ = null; + } + return consumedBuilder_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.ReservedThroughput reserved_throughput = 3; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput reservedThroughput_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputOrBuilder> reservedThroughputBuilder_; + public boolean hasReservedThroughput() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput getReservedThroughput() { + if (reservedThroughputBuilder_ == null) { + return reservedThroughput_; + } else { + return reservedThroughputBuilder_.getMessage(); + } + } + public Builder setReservedThroughput(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput value) { + if (reservedThroughputBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + reservedThroughput_ = value; onChanged(); - return this; + } else { + reservedThroughputBuilder_.setMessage(value); } - public Builder clearRepeat() { - bitField0_ = (bitField0_ & ~0x00000002); - repeat_ = 0L; + bitField0_ |= 0x00000004; + return this; + } + public Builder setReservedThroughput( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.Builder builderForValue) { + if (reservedThroughputBuilder_ == null) { + reservedThroughput_ = builderForValue.build(); onChanged(); - return this; + } else { + reservedThroughputBuilder_.setMessage(builderForValue.build()); } - - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.ComputeSplitPointsBySizeResponse.SplitLocation) + bitField0_ |= 0x00000004; + return this; } - - static { - defaultInstance = new SplitLocation(true); - defaultInstance.initFields(); + public Builder mergeReservedThroughput(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput value) { + if (reservedThroughputBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004) && + reservedThroughput_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.getDefaultInstance()) { + reservedThroughput_ = + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.newBuilder(reservedThroughput_).mergeFrom(value).buildPartial(); + } else { + reservedThroughput_ = value; + } + onChanged(); + } else { + reservedThroughputBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder clearReservedThroughput() { + if (reservedThroughputBuilder_ == null) { + reservedThroughput_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.getDefaultInstance(); + onChanged(); + } else { + reservedThroughputBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.Builder getReservedThroughputBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getReservedThroughputFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputOrBuilder getReservedThroughputOrBuilder() { + if (reservedThroughputBuilder_ != null) { + return reservedThroughputBuilder_.getMessageOrBuilder(); + } else { + return reservedThroughput_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputOrBuilder> + getReservedThroughputFieldBuilder() { + if (reservedThroughputBuilder_ == null) { + reservedThroughputBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputOrBuilder>( + reservedThroughput_, + getParentForChildren(), + isClean()); + reservedThroughput_ = null; + } + return reservedThroughputBuilder_; } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.ComputeSplitPointsBySizeResponse.SplitLocation) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.TableConsumedCapacity) } - private int bitField0_; - // required .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 1; - public static final int CONSUMED_FIELD_NUMBER = 1; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity consumed_; - public boolean hasConsumed() { - return ((bitField0_ & 0x00000001) == 0x00000001); + static { + defaultInstance = new TableConsumedCapacity(true); + defaultInstance.initFields(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed() { - return consumed_; + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.TableConsumedCapacity) + } + + public interface SQLQueryResponseOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // repeated .com.alicloud.openservices.tablestore.core.protocol.TableConsumedCapacity consumes = 1; + java.util.List + getConsumesList(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacity getConsumes(int index); + int getConsumesCount(); + java.util.List + getConsumesOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacityOrBuilder getConsumesOrBuilder( + int index); + + // optional bytes rows = 2; + boolean hasRows(); + com.google.protobuf.ByteString getRows(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.SQLPayloadVersion version = 3; + boolean hasVersion(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLPayloadVersion getVersion(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.SQLStatementType type = 4; + boolean hasType(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLStatementType getType(); + } + public static final class SQLQueryResponse extends + com.google.protobuf.GeneratedMessage + implements SQLQueryResponseOrBuilder { + // Use SQLQueryResponse.newBuilder() to construct. + private SQLQueryResponse(Builder builder) { + super(builder); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder() { - return consumed_; + private SQLQueryResponse(boolean noInit) {} + + private static final SQLQueryResponse defaultInstance; + public static SQLQueryResponse getDefaultInstance() { + return defaultInstance; } - // repeated .com.alicloud.openservices.tablestore.core.protocol.PrimaryKeySchema schema = 2; - public static final int SCHEMA_FIELD_NUMBER = 2; - private java.util.List schema_; - public java.util.List getSchemaList() { - return schema_; + public SQLQueryResponse getDefaultInstanceForType() { + return defaultInstance; } - public java.util.List - getSchemaOrBuilderList() { - return schema_; + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_SQLQueryResponse_descriptor; } - public int getSchemaCount() { - return schema_.size(); + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_SQLQueryResponse_fieldAccessorTable; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchema getSchema(int index) { - return schema_.get(index); + + private int bitField0_; + // repeated .com.alicloud.openservices.tablestore.core.protocol.TableConsumedCapacity consumes = 1; + public static final int CONSUMES_FIELD_NUMBER = 1; + private java.util.List consumes_; + public java.util.List getConsumesList() { + return consumes_; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchemaOrBuilder getSchemaOrBuilder( - int index) { - return schema_.get(index); + public java.util.List + getConsumesOrBuilderList() { + return consumes_; } - - // repeated bytes split_points = 3; - public static final int SPLIT_POINTS_FIELD_NUMBER = 3; - private java.util.List splitPoints_; - public java.util.List - getSplitPointsList() { - return splitPoints_; + public int getConsumesCount() { + return consumes_.size(); } - public int getSplitPointsCount() { - return splitPoints_.size(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacity getConsumes(int index) { + return consumes_.get(index); } - public com.google.protobuf.ByteString getSplitPoints(int index) { - return splitPoints_.get(index); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacityOrBuilder getConsumesOrBuilder( + int index) { + return consumes_.get(index); } - // repeated .com.alicloud.openservices.tablestore.core.protocol.ComputeSplitPointsBySizeResponse.SplitLocation locations = 4; - public static final int LOCATIONS_FIELD_NUMBER = 4; - private java.util.List locations_; - public java.util.List getLocationsList() { - return locations_; + // optional bytes rows = 2; + public static final int ROWS_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString rows_; + public boolean hasRows() { + return ((bitField0_ & 0x00000001) == 0x00000001); } - public java.util.List - getLocationsOrBuilderList() { - return locations_; + public com.google.protobuf.ByteString getRows() { + return rows_; } - public int getLocationsCount() { - return locations_.size(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.SQLPayloadVersion version = 3; + public static final int VERSION_FIELD_NUMBER = 3; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLPayloadVersion version_; + public boolean hasVersion() { + return ((bitField0_ & 0x00000002) == 0x00000002); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation getLocations(int index) { - return locations_.get(index); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLPayloadVersion getVersion() { + return version_; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocationOrBuilder getLocationsOrBuilder( - int index) { - return locations_.get(index); + + // optional .com.alicloud.openservices.tablestore.core.protocol.SQLStatementType type = 4; + public static final int TYPE_FIELD_NUMBER = 4; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLStatementType type_; + public boolean hasType() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLStatementType getType() { + return type_; } private void initFields() { - consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); - schema_ = java.util.Collections.emptyList(); - splitPoints_ = java.util.Collections.emptyList();; - locations_ = java.util.Collections.emptyList(); + consumes_ = java.util.Collections.emptyList(); + rows_ = com.google.protobuf.ByteString.EMPTY; + version_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLPayloadVersion.SQL_PLAIN_BUFFER; + type_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLStatementType.SQL_SELECT; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - if (!hasConsumed()) { - memoizedIsInitialized = 0; - return false; - } - if (!getConsumed().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - for (int i = 0; i < getSchemaCount(); i++) { - if (!getSchema(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - for (int i = 0; i < getLocationsCount(); i++) { - if (!getLocations(i).isInitialized()) { + for (int i = 0; i < getConsumesCount(); i++) { + if (!getConsumes(i).isInitialized()) { memoizedIsInitialized = 0; return false; } @@ -42306,17 +54757,17 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeMessage(1, consumed_); + for (int i = 0; i < consumes_.size(); i++) { + output.writeMessage(1, consumes_.get(i)); } - for (int i = 0; i < schema_.size(); i++) { - output.writeMessage(2, schema_.get(i)); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(2, rows_); } - for (int i = 0; i < splitPoints_.size(); i++) { - output.writeBytes(3, splitPoints_.get(i)); + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeEnum(3, version_.getNumber()); } - for (int i = 0; i < locations_.size(); i++) { - output.writeMessage(4, locations_.get(i)); + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeEnum(4, type_.getNumber()); } getUnknownFields().writeTo(output); } @@ -42327,26 +54778,21 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { + for (int i = 0; i < consumes_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, consumed_); + .computeMessageSize(1, consumes_.get(i)); } - for (int i = 0; i < schema_.size(); i++) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, schema_.get(i)); + .computeBytesSize(2, rows_); } - { - int dataSize = 0; - for (int i = 0; i < splitPoints_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeBytesSizeNoTag(splitPoints_.get(i)); - } - size += dataSize; - size += 1 * getSplitPointsList().size(); + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, version_.getNumber()); } - for (int i = 0; i < locations_.size(); i++) { + if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, locations_.get(i)); + .computeEnumSize(4, type_.getNumber()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -42360,41 +54806,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -42403,7 +54849,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -42414,12 +54860,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -42429,7 +54875,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi. public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryResponse prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -42442,18 +54888,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponseOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ComputeSplitPointsBySizeResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_SQLQueryResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ComputeSplitPointsBySizeResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_SQLQueryResponse_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -42464,9 +54910,7 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getConsumedFieldBuilder(); - getSchemaFieldBuilder(); - getLocationsFieldBuilder(); + getConsumesFieldBuilder(); } } private static Builder create() { @@ -42475,26 +54919,18 @@ private static Builder create() { public Builder clear() { super.clear(); - if (consumedBuilder_ == null) { - consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); - } else { - consumedBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - if (schemaBuilder_ == null) { - schema_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); + if (consumesBuilder_ == null) { + consumes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); } else { - schemaBuilder_.clear(); + consumesBuilder_.clear(); } - splitPoints_ = java.util.Collections.emptyList();; + rows_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + version_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLPayloadVersion.SQL_PLAIN_BUFFER; bitField0_ = (bitField0_ & ~0x00000004); - if (locationsBuilder_ == null) { - locations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - } else { - locationsBuilder_.clear(); - } + type_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLStatementType.SQL_SELECT; + bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -42504,24 +54940,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryResponse.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryResponse.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse build() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryResponse build() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryResponse buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -42529,143 +54965,89 @@ private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Comput return result; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse(this); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryResponse result = new com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryResponse(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - if (consumedBuilder_ == null) { - result.consumed_ = consumed_; - } else { - result.consumed_ = consumedBuilder_.build(); - } - if (schemaBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { - schema_ = java.util.Collections.unmodifiableList(schema_); - bitField0_ = (bitField0_ & ~0x00000002); + if (consumesBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + consumes_ = java.util.Collections.unmodifiableList(consumes_); + bitField0_ = (bitField0_ & ~0x00000001); } - result.schema_ = schema_; + result.consumes_ = consumes_; } else { - result.schema_ = schemaBuilder_.build(); + result.consumes_ = consumesBuilder_.build(); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - splitPoints_ = java.util.Collections.unmodifiableList(splitPoints_); - bitField0_ = (bitField0_ & ~0x00000004); + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000001; } - result.splitPoints_ = splitPoints_; - if (locationsBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008)) { - locations_ = java.util.Collections.unmodifiableList(locations_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.locations_ = locations_; - } else { - result.locations_ = locationsBuilder_.build(); + result.rows_ = rows_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000002; + } + result.version_ = version_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000004; } + result.type_ = type_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.getDefaultInstance()) return this; - if (other.hasConsumed()) { - mergeConsumed(other.getConsumed()); - } - if (schemaBuilder_ == null) { - if (!other.schema_.isEmpty()) { - if (schema_.isEmpty()) { - schema_ = other.schema_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureSchemaIsMutable(); - schema_.addAll(other.schema_); - } - onChanged(); - } + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryResponse)other); } else { - if (!other.schema_.isEmpty()) { - if (schemaBuilder_.isEmpty()) { - schemaBuilder_.dispose(); - schemaBuilder_ = null; - schema_ = other.schema_; - bitField0_ = (bitField0_ & ~0x00000002); - schemaBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getSchemaFieldBuilder() : null; - } else { - schemaBuilder_.addAllMessages(other.schema_); - } - } - } - if (!other.splitPoints_.isEmpty()) { - if (splitPoints_.isEmpty()) { - splitPoints_ = other.splitPoints_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureSplitPointsIsMutable(); - splitPoints_.addAll(other.splitPoints_); - } - onChanged(); - } - if (locationsBuilder_ == null) { - if (!other.locations_.isEmpty()) { - if (locations_.isEmpty()) { - locations_ = other.locations_; - bitField0_ = (bitField0_ & ~0x00000008); + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryResponse.getDefaultInstance()) return this; + if (consumesBuilder_ == null) { + if (!other.consumes_.isEmpty()) { + if (consumes_.isEmpty()) { + consumes_ = other.consumes_; + bitField0_ = (bitField0_ & ~0x00000001); } else { - ensureLocationsIsMutable(); - locations_.addAll(other.locations_); + ensureConsumesIsMutable(); + consumes_.addAll(other.consumes_); } onChanged(); } } else { - if (!other.locations_.isEmpty()) { - if (locationsBuilder_.isEmpty()) { - locationsBuilder_.dispose(); - locationsBuilder_ = null; - locations_ = other.locations_; - bitField0_ = (bitField0_ & ~0x00000008); - locationsBuilder_ = + if (!other.consumes_.isEmpty()) { + if (consumesBuilder_.isEmpty()) { + consumesBuilder_.dispose(); + consumesBuilder_ = null; + consumes_ = other.consumes_; + bitField0_ = (bitField0_ & ~0x00000001); + consumesBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getLocationsFieldBuilder() : null; + getConsumesFieldBuilder() : null; } else { - locationsBuilder_.addAllMessages(other.locations_); + consumesBuilder_.addAllMessages(other.consumes_); } } } + if (other.hasRows()) { + setRows(other.getRows()); + } + if (other.hasVersion()) { + setVersion(other.getVersion()); + } + if (other.hasType()) { + setType(other.getType()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { - if (!hasConsumed()) { - - return false; - } - if (!getConsumed().isInitialized()) { - - return false; - } - for (int i = 0; i < getSchemaCount(); i++) { - if (!getSchema(i).isInitialized()) { - - return false; - } - } - for (int i = 0; i < getLocationsCount(); i++) { - if (!getLocations(i).isInitialized()) { + for (int i = 0; i < getConsumesCount(); i++) { + if (!getConsumes(i).isInitialized()) { return false; } @@ -42697,29 +55079,36 @@ public Builder mergeFrom( break; } case 10: { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.newBuilder(); - if (hasConsumed()) { - subBuilder.mergeFrom(getConsumed()); - } + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacity.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacity.newBuilder(); input.readMessage(subBuilder, extensionRegistry); - setConsumed(subBuilder.buildPartial()); + addConsumes(subBuilder.buildPartial()); break; } case 18: { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchema.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchema.newBuilder(); - input.readMessage(subBuilder, extensionRegistry); - addSchema(subBuilder.buildPartial()); + bitField0_ |= 0x00000002; + rows_ = input.readBytes(); break; } - case 26: { - ensureSplitPointsIsMutable(); - splitPoints_.add(input.readBytes()); + case 24: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLPayloadVersion value = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLPayloadVersion.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(3, rawValue); + } else { + bitField0_ |= 0x00000004; + version_ = value; + } break; } - case 34: { - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation.newBuilder(); - input.readMessage(subBuilder, extensionRegistry); - addLocations(subBuilder.buildPartial()); + case 32: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLStatementType value = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLStatementType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(4, rawValue); + } else { + bitField0_ |= 0x00000008; + type_ = value; + } break; } } @@ -42728,528 +55117,273 @@ public Builder mergeFrom( private int bitField0_; - // required .com.alicloud.openservices.tablestore.core.protocol.ConsumedCapacity consumed = 1; - private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder> consumedBuilder_; - public boolean hasConsumed() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity getConsumed() { - if (consumedBuilder_ == null) { - return consumed_; - } else { - return consumedBuilder_.getMessage(); - } - } - public Builder setConsumed(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity value) { - if (consumedBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - consumed_ = value; - onChanged(); - } else { - consumedBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - return this; - } - public Builder setConsumed( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder builderForValue) { - if (consumedBuilder_ == null) { - consumed_ = builderForValue.build(); - onChanged(); - } else { - consumedBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - return this; - } - public Builder mergeConsumed(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity value) { - if (consumedBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001) && - consumed_ != com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance()) { - consumed_ = - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.newBuilder(consumed_).mergeFrom(value).buildPartial(); - } else { - consumed_ = value; - } - onChanged(); - } else { - consumedBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - return this; - } - public Builder clearConsumed() { - if (consumedBuilder_ == null) { - consumed_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.getDefaultInstance(); - onChanged(); - } else { - consumedBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder getConsumedBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getConsumedFieldBuilder().getBuilder(); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder getConsumedOrBuilder() { - if (consumedBuilder_ != null) { - return consumedBuilder_.getMessageOrBuilder(); - } else { - return consumed_; - } - } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder> - getConsumedFieldBuilder() { - if (consumedBuilder_ == null) { - consumedBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacityOrBuilder>( - consumed_, - getParentForChildren(), - isClean()); - consumed_ = null; - } - return consumedBuilder_; - } - - // repeated .com.alicloud.openservices.tablestore.core.protocol.PrimaryKeySchema schema = 2; - private java.util.List schema_ = + // repeated .com.alicloud.openservices.tablestore.core.protocol.TableConsumedCapacity consumes = 1; + private java.util.List consumes_ = java.util.Collections.emptyList(); - private void ensureSchemaIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - schema_ = new java.util.ArrayList(schema_); - bitField0_ |= 0x00000002; + private void ensureConsumesIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + consumes_ = new java.util.ArrayList(consumes_); + bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchema, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchema.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchemaOrBuilder> schemaBuilder_; + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacityOrBuilder> consumesBuilder_; - public java.util.List getSchemaList() { - if (schemaBuilder_ == null) { - return java.util.Collections.unmodifiableList(schema_); + public java.util.List getConsumesList() { + if (consumesBuilder_ == null) { + return java.util.Collections.unmodifiableList(consumes_); } else { - return schemaBuilder_.getMessageList(); + return consumesBuilder_.getMessageList(); } } - public int getSchemaCount() { - if (schemaBuilder_ == null) { - return schema_.size(); + public int getConsumesCount() { + if (consumesBuilder_ == null) { + return consumes_.size(); } else { - return schemaBuilder_.getCount(); + return consumesBuilder_.getCount(); } } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchema getSchema(int index) { - if (schemaBuilder_ == null) { - return schema_.get(index); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacity getConsumes(int index) { + if (consumesBuilder_ == null) { + return consumes_.get(index); } else { - return schemaBuilder_.getMessage(index); + return consumesBuilder_.getMessage(index); } } - public Builder setSchema( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchema value) { - if (schemaBuilder_ == null) { + public Builder setConsumes( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacity value) { + if (consumesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureSchemaIsMutable(); - schema_.set(index, value); + ensureConsumesIsMutable(); + consumes_.set(index, value); onChanged(); } else { - schemaBuilder_.setMessage(index, value); + consumesBuilder_.setMessage(index, value); } return this; } - public Builder setSchema( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchema.Builder builderForValue) { - if (schemaBuilder_ == null) { - ensureSchemaIsMutable(); - schema_.set(index, builderForValue.build()); + public Builder setConsumes( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacity.Builder builderForValue) { + if (consumesBuilder_ == null) { + ensureConsumesIsMutable(); + consumes_.set(index, builderForValue.build()); onChanged(); } else { - schemaBuilder_.setMessage(index, builderForValue.build()); + consumesBuilder_.setMessage(index, builderForValue.build()); } return this; } - public Builder addSchema(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchema value) { - if (schemaBuilder_ == null) { + public Builder addConsumes(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacity value) { + if (consumesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureSchemaIsMutable(); - schema_.add(value); + ensureConsumesIsMutable(); + consumes_.add(value); onChanged(); } else { - schemaBuilder_.addMessage(value); + consumesBuilder_.addMessage(value); } return this; } - public Builder addSchema( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchema value) { - if (schemaBuilder_ == null) { + public Builder addConsumes( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacity value) { + if (consumesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureSchemaIsMutable(); - schema_.add(index, value); + ensureConsumesIsMutable(); + consumes_.add(index, value); onChanged(); } else { - schemaBuilder_.addMessage(index, value); + consumesBuilder_.addMessage(index, value); } return this; } - public Builder addSchema( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchema.Builder builderForValue) { - if (schemaBuilder_ == null) { - ensureSchemaIsMutable(); - schema_.add(builderForValue.build()); + public Builder addConsumes( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacity.Builder builderForValue) { + if (consumesBuilder_ == null) { + ensureConsumesIsMutable(); + consumes_.add(builderForValue.build()); onChanged(); } else { - schemaBuilder_.addMessage(builderForValue.build()); + consumesBuilder_.addMessage(builderForValue.build()); } return this; } - public Builder addSchema( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchema.Builder builderForValue) { - if (schemaBuilder_ == null) { - ensureSchemaIsMutable(); - schema_.add(index, builderForValue.build()); + public Builder addConsumes( + int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacity.Builder builderForValue) { + if (consumesBuilder_ == null) { + ensureConsumesIsMutable(); + consumes_.add(index, builderForValue.build()); onChanged(); } else { - schemaBuilder_.addMessage(index, builderForValue.build()); + consumesBuilder_.addMessage(index, builderForValue.build()); } return this; } - public Builder addAllSchema( - java.lang.Iterable values) { - if (schemaBuilder_ == null) { - ensureSchemaIsMutable(); - super.addAll(values, schema_); + public Builder addAllConsumes( + java.lang.Iterable values) { + if (consumesBuilder_ == null) { + ensureConsumesIsMutable(); + super.addAll(values, consumes_); onChanged(); } else { - schemaBuilder_.addAllMessages(values); + consumesBuilder_.addAllMessages(values); } return this; } - public Builder clearSchema() { - if (schemaBuilder_ == null) { - schema_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); + public Builder clearConsumes() { + if (consumesBuilder_ == null) { + consumes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { - schemaBuilder_.clear(); + consumesBuilder_.clear(); } return this; } - public Builder removeSchema(int index) { - if (schemaBuilder_ == null) { - ensureSchemaIsMutable(); - schema_.remove(index); + public Builder removeConsumes(int index) { + if (consumesBuilder_ == null) { + ensureConsumesIsMutable(); + consumes_.remove(index); onChanged(); } else { - schemaBuilder_.remove(index); + consumesBuilder_.remove(index); } return this; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchema.Builder getSchemaBuilder( + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacity.Builder getConsumesBuilder( int index) { - return getSchemaFieldBuilder().getBuilder(index); + return getConsumesFieldBuilder().getBuilder(index); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchemaOrBuilder getSchemaOrBuilder( + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacityOrBuilder getConsumesOrBuilder( int index) { - if (schemaBuilder_ == null) { - return schema_.get(index); } else { - return schemaBuilder_.getMessageOrBuilder(index); + if (consumesBuilder_ == null) { + return consumes_.get(index); } else { + return consumesBuilder_.getMessageOrBuilder(index); } } - public java.util.List - getSchemaOrBuilderList() { - if (schemaBuilder_ != null) { - return schemaBuilder_.getMessageOrBuilderList(); + public java.util.List + getConsumesOrBuilderList() { + if (consumesBuilder_ != null) { + return consumesBuilder_.getMessageOrBuilderList(); } else { - return java.util.Collections.unmodifiableList(schema_); + return java.util.Collections.unmodifiableList(consumes_); } } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchema.Builder addSchemaBuilder() { - return getSchemaFieldBuilder().addBuilder( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchema.getDefaultInstance()); + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacity.Builder addConsumesBuilder() { + return getConsumesFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacity.getDefaultInstance()); } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchema.Builder addSchemaBuilder( + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacity.Builder addConsumesBuilder( int index) { - return getSchemaFieldBuilder().addBuilder( - index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchema.getDefaultInstance()); + return getConsumesFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacity.getDefaultInstance()); } - public java.util.List - getSchemaBuilderList() { - return getSchemaFieldBuilder().getBuilderList(); + public java.util.List + getConsumesBuilderList() { + return getConsumesFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchema, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchema.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchemaOrBuilder> - getSchemaFieldBuilder() { - if (schemaBuilder_ == null) { - schemaBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchema, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchema.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchemaOrBuilder>( - schema_, - ((bitField0_ & 0x00000002) == 0x00000002), + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacityOrBuilder> + getConsumesFieldBuilder() { + if (consumesBuilder_ == null) { + consumesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacity, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacity.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacityOrBuilder>( + consumes_, + ((bitField0_ & 0x00000001) == 0x00000001), getParentForChildren(), isClean()); - schema_ = null; + consumes_ = null; } - return schemaBuilder_; + return consumesBuilder_; } - // repeated bytes split_points = 3; - private java.util.List splitPoints_ = java.util.Collections.emptyList();; - private void ensureSplitPointsIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { - splitPoints_ = new java.util.ArrayList(splitPoints_); - bitField0_ |= 0x00000004; - } - } - public java.util.List - getSplitPointsList() { - return java.util.Collections.unmodifiableList(splitPoints_); - } - public int getSplitPointsCount() { - return splitPoints_.size(); - } - public com.google.protobuf.ByteString getSplitPoints(int index) { - return splitPoints_.get(index); + // optional bytes rows = 2; + private com.google.protobuf.ByteString rows_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasRows() { + return ((bitField0_ & 0x00000002) == 0x00000002); } - public Builder setSplitPoints( - int index, com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - ensureSplitPointsIsMutable(); - splitPoints_.set(index, value); - onChanged(); - return this; + public com.google.protobuf.ByteString getRows() { + return rows_; } - public Builder addSplitPoints(com.google.protobuf.ByteString value) { + public Builder setRows(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - ensureSplitPointsIsMutable(); - splitPoints_.add(value); - onChanged(); - return this; - } - public Builder addAllSplitPoints( - java.lang.Iterable values) { - ensureSplitPointsIsMutable(); - super.addAll(values, splitPoints_); + bitField0_ |= 0x00000002; + rows_ = value; onChanged(); return this; } - public Builder clearSplitPoints() { - splitPoints_ = java.util.Collections.emptyList();; - bitField0_ = (bitField0_ & ~0x00000004); + public Builder clearRows() { + bitField0_ = (bitField0_ & ~0x00000002); + rows_ = getDefaultInstance().getRows(); onChanged(); return this; } - // repeated .com.alicloud.openservices.tablestore.core.protocol.ComputeSplitPointsBySizeResponse.SplitLocation locations = 4; - private java.util.List locations_ = - java.util.Collections.emptyList(); - private void ensureLocationsIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { - locations_ = new java.util.ArrayList(locations_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocationOrBuilder> locationsBuilder_; - - public java.util.List getLocationsList() { - if (locationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(locations_); - } else { - return locationsBuilder_.getMessageList(); - } - } - public int getLocationsCount() { - if (locationsBuilder_ == null) { - return locations_.size(); - } else { - return locationsBuilder_.getCount(); - } - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation getLocations(int index) { - if (locationsBuilder_ == null) { - return locations_.get(index); - } else { - return locationsBuilder_.getMessage(index); - } - } - public Builder setLocations( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation value) { - if (locationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLocationsIsMutable(); - locations_.set(index, value); - onChanged(); - } else { - locationsBuilder_.setMessage(index, value); - } - return this; - } - public Builder setLocations( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation.Builder builderForValue) { - if (locationsBuilder_ == null) { - ensureLocationsIsMutable(); - locations_.set(index, builderForValue.build()); - onChanged(); - } else { - locationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; + // optional .com.alicloud.openservices.tablestore.core.protocol.SQLPayloadVersion version = 3; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLPayloadVersion version_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLPayloadVersion.SQL_PLAIN_BUFFER; + public boolean hasVersion() { + return ((bitField0_ & 0x00000004) == 0x00000004); } - public Builder addLocations(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation value) { - if (locationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLocationsIsMutable(); - locations_.add(value); - onChanged(); - } else { - locationsBuilder_.addMessage(value); - } - return this; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLPayloadVersion getVersion() { + return version_; } - public Builder addLocations( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation value) { - if (locationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLocationsIsMutable(); - locations_.add(index, value); - onChanged(); - } else { - locationsBuilder_.addMessage(index, value); + public Builder setVersion(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLPayloadVersion value) { + if (value == null) { + throw new NullPointerException(); } + bitField0_ |= 0x00000004; + version_ = value; + onChanged(); return this; } - public Builder addLocations( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation.Builder builderForValue) { - if (locationsBuilder_ == null) { - ensureLocationsIsMutable(); - locations_.add(builderForValue.build()); - onChanged(); - } else { - locationsBuilder_.addMessage(builderForValue.build()); - } + public Builder clearVersion() { + bitField0_ = (bitField0_ & ~0x00000004); + version_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLPayloadVersion.SQL_PLAIN_BUFFER; + onChanged(); return this; } - public Builder addLocations( - int index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation.Builder builderForValue) { - if (locationsBuilder_ == null) { - ensureLocationsIsMutable(); - locations_.add(index, builderForValue.build()); - onChanged(); - } else { - locationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; + + // optional .com.alicloud.openservices.tablestore.core.protocol.SQLStatementType type = 4; + private com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLStatementType type_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLStatementType.SQL_SELECT; + public boolean hasType() { + return ((bitField0_ & 0x00000008) == 0x00000008); } - public Builder addAllLocations( - java.lang.Iterable values) { - if (locationsBuilder_ == null) { - ensureLocationsIsMutable(); - super.addAll(values, locations_); - onChanged(); - } else { - locationsBuilder_.addAllMessages(values); - } - return this; + public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLStatementType getType() { + return type_; } - public Builder clearLocations() { - if (locationsBuilder_ == null) { - locations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - locationsBuilder_.clear(); + public Builder setType(com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLStatementType value) { + if (value == null) { + throw new NullPointerException(); } + bitField0_ |= 0x00000008; + type_ = value; + onChanged(); return this; } - public Builder removeLocations(int index) { - if (locationsBuilder_ == null) { - ensureLocationsIsMutable(); - locations_.remove(index); - onChanged(); - } else { - locationsBuilder_.remove(index); - } + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000008); + type_ = com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLStatementType.SQL_SELECT; + onChanged(); return this; } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation.Builder getLocationsBuilder( - int index) { - return getLocationsFieldBuilder().getBuilder(index); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocationOrBuilder getLocationsOrBuilder( - int index) { - if (locationsBuilder_ == null) { - return locations_.get(index); } else { - return locationsBuilder_.getMessageOrBuilder(index); - } - } - public java.util.List - getLocationsOrBuilderList() { - if (locationsBuilder_ != null) { - return locationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(locations_); - } - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation.Builder addLocationsBuilder() { - return getLocationsFieldBuilder().addBuilder( - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation.getDefaultInstance()); - } - public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation.Builder addLocationsBuilder( - int index) { - return getLocationsFieldBuilder().addBuilder( - index, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation.getDefaultInstance()); - } - public java.util.List - getLocationsBuilderList() { - return getLocationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocationOrBuilder> - getLocationsFieldBuilder() { - if (locationsBuilder_ == null) { - locationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation.Builder, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocationOrBuilder>( - locations_, - ((bitField0_ & 0x00000008) == 0x00000008), - getParentForChildren(), - isClean()); - locations_ = null; - } - return locationsBuilder_; - } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.ComputeSplitPointsBySizeResponse) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.SQLQueryResponse) } static { - defaultInstance = new ComputeSplitPointsBySizeResponse(true); + defaultInstance = new SQLQueryResponse(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.ComputeSplitPointsBySizeResponse) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.SQLQueryResponse) } private static com.google.protobuf.Descriptors.Descriptor @@ -43262,6 +55396,11 @@ public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Compute private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alicloud_openservices_tablestore_core_protocol_PrimaryKeySchema_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_PartitionRange_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_PartitionRange_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor internal_static_com_alicloud_openservices_tablestore_core_protocol_DefinedColumnSchema_descriptor; private static @@ -43292,6 +55431,11 @@ public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Compute private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alicloud_openservices_tablestore_core_protocol_CapacityUnit_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_CapacityDataSize_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_CapacityDataSize_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor internal_static_com_alicloud_openservices_tablestore_core_protocol_ReservedThroughputDetails_descriptor; private static @@ -43317,6 +55461,16 @@ public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Compute private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alicloud_openservices_tablestore_core_protocol_StreamDetails_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_SSESpecification_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_SSESpecification_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_SSEDetails_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_SSEDetails_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateTableRequest_descriptor; private static @@ -43347,6 +55501,26 @@ public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Compute private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alicloud_openservices_tablestore_core_protocol_DropIndexResponse_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_AddDefinedColumnRequest_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_AddDefinedColumnRequest_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_AddDefinedColumnResponse_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_AddDefinedColumnResponse_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteDefinedColumnRequest_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteDefinedColumnRequest_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteDefinedColumnResponse_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteDefinedColumnResponse_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateTableRequest_descriptor; private static @@ -43622,6 +55796,66 @@ public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Compute private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alicloud_openservices_tablestore_core_protocol_ComputeSplitPointsBySizeResponse_SplitLocation_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_BulkExportRequest_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_BulkExportRequest_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_BulkExportResponse_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_BulkExportResponse_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_BulkImportRequest_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_BulkImportRequest_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBulkImportRequest_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBulkImportRequest_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_BulkImportResponse_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_BulkImportResponse_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBulkImportResponse_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBulkImportResponse_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_ComputeSplitsRequest_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_ComputeSplitsRequest_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_SearchIndexSplitsOptions_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_SearchIndexSplitsOptions_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_ComputeSplitsResponse_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_ComputeSplitsResponse_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_SQLQueryRequest_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_SQLQueryRequest_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_TableConsumedCapacity_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_TableConsumedCapacity_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_SQLQueryResponse_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_SQLQueryResponse_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -43631,280 +55865,371 @@ public com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Compute descriptor; static { java.lang.String[] descriptorData = { - "\n\026ots_internal_api.proto\0222com.alicloud.o" + - "penservices.tablestore.core.protocol\"&\n\005" + - "Error\022\014\n\004code\030\001 \002(\t\022\017\n\007message\030\002 \001(\t\"\310\001\n" + - "\020PrimaryKeySchema\022\014\n\004name\030\001 \002(\t\022P\n\004type\030" + - "\002 \002(\0162B.com.alicloud.openservices.tables" + - "tore.core.protocol.PrimaryKeyType\022T\n\006opt" + - "ion\030\003 \001(\0162D.com.alicloud.openservices.ta" + - "blestore.core.protocol.PrimaryKeyOption\"" + - "x\n\023DefinedColumnSchema\022\014\n\004name\030\001 \002(\t\022S\n\004" + - "type\030\002 \002(\0162E.com.alicloud.openservices.t", - "ablestore.core.protocol.DefinedColumnTyp" + - "e\"a\n\014TableOptions\022\024\n\014time_to_live\030\001 \001(\005\022" + - "\024\n\014max_versions\030\002 \001(\005\022%\n\035deviation_cell_" + - "version_in_sec\030\005 \001(\003\"\371\001\n\tIndexMeta\022\014\n\004na" + - "me\030\001 \002(\t\022\023\n\013primary_key\030\002 \003(\t\022\026\n\016defined" + - "_column\030\003 \003(\t\022^\n\021index_update_mode\030\004 \002(\016" + - "2C.com.alicloud.openservices.tablestore." + - "core.protocol.IndexUpdateMode\022Q\n\nindex_t" + - "ype\030\005 \002(\0162=.com.alicloud.openservices.ta" + - "blestore.core.protocol.IndexType\"\333\001\n\tTab", - "leMeta\022\022\n\ntable_name\030\001 \002(\t\022Y\n\013primary_ke" + - "y\030\002 \003(\0132D.com.alicloud.openservices.tabl" + - "estore.core.protocol.PrimaryKeySchema\022_\n" + - "\016defined_column\030\003 \003(\0132G.com.alicloud.ope" + - "nservices.tablestore.core.protocol.Defin" + - "edColumnSchema\"\211\001\n\tCondition\022b\n\rrow_exis" + - "tence\030\001 \002(\0162K.com.alicloud.openservices." + - "tablestore.core.protocol.RowExistenceExp" + - "ectation\022\030\n\020column_condition\030\002 \001(\014\"+\n\014Ca" + - "pacityUnit\022\014\n\004read\030\001 \001(\005\022\r\n\005write\030\002 \001(\005\"", - "\254\001\n\031ReservedThroughputDetails\022W\n\rcapacit" + - "y_unit\030\001 \002(\0132@.com.alicloud.openservices" + - ".tablestore.core.protocol.CapacityUnit\022\032" + - "\n\022last_increase_time\030\002 \002(\003\022\032\n\022last_decre" + - "ase_time\030\003 \001(\003\"m\n\022ReservedThroughput\022W\n\r" + - "capacity_unit\030\001 \002(\0132@.com.alicloud.opens" + - "ervices.tablestore.core.protocol.Capacit" + - "yUnit\"k\n\020ConsumedCapacity\022W\n\rcapacity_un" + - "it\030\001 \002(\0132@.com.alicloud.openservices.tab" + - "lestore.core.protocol.CapacityUnit\"E\n\023St", - "reamSpecification\022\025\n\renable_stream\030\001 \002(\010" + - "\022\027\n\017expiration_time\030\002 \001(\005\"l\n\rStreamDetai" + - "ls\022\025\n\renable_stream\030\001 \002(\010\022\021\n\tstream_id\030\002" + - " \001(\t\022\027\n\017expiration_time\030\003 \001(\005\022\030\n\020last_en" + - "able_time\030\004 \001(\003\"\327\003\n\022CreateTableRequest\022Q" + - "\n\ntable_meta\030\001 \002(\0132=.com.alicloud.opense" + - "rvices.tablestore.core.protocol.TableMet" + - "a\022c\n\023reserved_throughput\030\002 \002(\0132F.com.ali" + + "\nIcom/alicloud/openservices/tablestore/c" + + "ore/protocol/ots_internal_api.proto\0222com" + + ".alicloud.openservices.tablestore.core.p" + + "rotocol\"&\n\005Error\022\014\n\004code\030\001 \002(\t\022\017\n\007messag" + + "e\030\002 \001(\t\"\310\001\n\020PrimaryKeySchema\022\014\n\004name\030\001 \002" + + "(\t\022P\n\004type\030\002 \002(\0162B.com.alicloud.openserv" + + "ices.tablestore.core.protocol.PrimaryKey" + + "Type\022T\n\006option\030\003 \001(\0162D.com.alicloud.open" + + "services.tablestore.core.protocol.Primar" + + "yKeyOption\",\n\016PartitionRange\022\r\n\005begin\030\001 ", + "\002(\014\022\013\n\003end\030\002 \002(\014\"x\n\023DefinedColumnSchema\022" + + "\014\n\004name\030\001 \002(\t\022S\n\004type\030\002 \002(\0162E.com.aliclo" + + "ud.openservices.tablestore.core.protocol" + + ".DefinedColumnType\"w\n\014TableOptions\022\024\n\014ti" + + "me_to_live\030\001 \001(\005\022\024\n\014max_versions\030\002 \001(\005\022%" + + "\n\035deviation_cell_version_in_sec\030\005 \001(\003\022\024\n" + + "\014allow_update\030\006 \001(\010\"\371\001\n\tIndexMeta\022\014\n\004nam" + + "e\030\001 \002(\t\022\023\n\013primary_key\030\002 \003(\t\022\026\n\016defined_" + + "column\030\003 \003(\t\022^\n\021index_update_mode\030\004 \002(\0162" + + "C.com.alicloud.openservices.tablestore.c", + "ore.protocol.IndexUpdateMode\022Q\n\nindex_ty" + + "pe\030\005 \002(\0162=.com.alicloud.openservices.tab" + + "lestore.core.protocol.IndexType\"\333\001\n\tTabl" + + "eMeta\022\022\n\ntable_name\030\001 \002(\t\022Y\n\013primary_key" + + "\030\002 \003(\0132D.com.alicloud.openservices.table" + + "store.core.protocol.PrimaryKeySchema\022_\n\016" + + "defined_column\030\003 \003(\0132G.com.alicloud.open" + + "services.tablestore.core.protocol.Define" + + "dColumnSchema\"\211\001\n\tCondition\022b\n\rrow_exist" + + "ence\030\001 \002(\0162K.com.alicloud.openservices.t", + "ablestore.core.protocol.RowExistenceExpe" + + "ctation\022\030\n\020column_condition\030\002 \001(\014\"+\n\014Cap" + + "acityUnit\022\014\n\004read\030\001 \001(\005\022\r\n\005write\030\002 \001(\005\"9" + + "\n\020CapacityDataSize\022\021\n\tread_size\030\001 \001(\003\022\022\n" + + "\nwrite_size\030\002 \001(\003\"\254\001\n\031ReservedThroughput" + + "Details\022W\n\rcapacity_unit\030\001 \002(\0132@.com.ali" + "cloud.openservices.tablestore.core.proto" + - "col.ReservedThroughput\022W\n\rtable_options\030", - "\003 \001(\0132@.com.alicloud.openservices.tables" + - "tore.core.protocol.TableOptions\022\\\n\013strea" + - "m_spec\030\005 \001(\0132G.com.alicloud.openservices" + - ".tablestore.core.protocol.StreamSpecific" + - "ation\022R\n\013index_metas\030\007 \003(\0132=.com.aliclou" + - "d.openservices.tablestore.core.protocol." + - "IndexMeta\"\025\n\023CreateTableResponse\"\233\001\n\022Cre" + - "ateIndexRequest\022\027\n\017main_table_name\030\001 \002(\t" + - "\022Q\n\nindex_meta\030\002 \002(\0132=.com.alicloud.open" + - "services.tablestore.core.protocol.IndexM", - "eta\022\031\n\021include_base_data\030\003 \001(\010\"\025\n\023Create" + - "IndexResponse\"?\n\020DropIndexRequest\022\027\n\017mai" + - "n_table_name\030\001 \002(\t\022\022\n\nindex_name\030\002 \002(\t\"\023" + - "\n\021DropIndexResponse\"\304\002\n\022UpdateTableReque" + - "st\022\022\n\ntable_name\030\001 \002(\t\022c\n\023reserved_throu" + - "ghput\030\002 \001(\0132F.com.alicloud.openservices." + - "tablestore.core.protocol.ReservedThrough" + - "put\022W\n\rtable_options\030\003 \001(\0132@.com.aliclou" + - "d.openservices.tablestore.core.protocol." + - "TableOptions\022\\\n\013stream_spec\030\004 \001(\0132G.com.", - "alicloud.openservices.tablestore.core.pr" + - "otocol.StreamSpecification\"\275\002\n\023UpdateTab" + - "leResponse\022r\n\033reserved_throughput_detail" + - "s\030\001 \002(\0132M.com.alicloud.openservices.tabl" + - "estore.core.protocol.ReservedThroughputD" + - "etails\022W\n\rtable_options\030\002 \002(\0132@.com.alic" + + "col.CapacityUnit\022\032\n\022last_increase_time\030\002" + + " \002(\003\022\032\n\022last_decrease_time\030\003 \001(\003\"m\n\022Rese" + + "rvedThroughput\022W\n\rcapacity_unit\030\001 \002(\0132@.", + "com.alicloud.openservices.tablestore.cor" + + "e.protocol.CapacityUnit\"\315\001\n\020ConsumedCapa" + + "city\022W\n\rcapacity_unit\030\001 \002(\0132@.com.aliclo" + + "ud.openservices.tablestore.core.protocol" + + ".CapacityUnit\022`\n\022capacity_data_size\030\002 \001(" + + "\0132D.com.alicloud.openservices.tablestore" + + ".core.protocol.CapacityDataSize\"E\n\023Strea" + + "mSpecification\022\025\n\renable_stream\030\001 \002(\010\022\027\n" + + "\017expiration_time\030\002 \001(\005\"l\n\rStreamDetails\022" + + "\025\n\renable_stream\030\001 \002(\010\022\021\n\tstream_id\030\002 \001(", + "\t\022\027\n\017expiration_time\030\003 \001(\005\022\030\n\020last_enabl" + + "e_time\030\004 \001(\003\"\226\001\n\020SSESpecification\022\016\n\006ena" + + "ble\030\001 \002(\010\022P\n\010key_type\030\002 \001(\0162>.com.aliclo" + + "ud.openservices.tablestore.core.protocol" + + ".SSEKeyType\022\016\n\006key_id\030\003 \001(\014\022\020\n\010role_arn\030" + + "\004 \001(\014\"\220\001\n\nSSEDetails\022\016\n\006enable\030\001 \002(\010\022P\n\010" + + "key_type\030\002 \001(\0162>.com.alicloud.openservic" + + "es.tablestore.core.protocol.SSEKeyType\022\016" + + "\n\006key_id\030\003 \001(\014\022\020\n\010role_arn\030\004 \001(\014\"\241\005\n\022Cre" + + "ateTableRequest\022Q\n\ntable_meta\030\001 \002(\0132=.co", + "m.alicloud.openservices.tablestore.core." + + "protocol.TableMeta\022c\n\023reserved_throughpu" + + "t\030\002 \002(\0132F.com.alicloud.openservices.tabl" + + "estore.core.protocol.ReservedThroughput\022" + + "W\n\rtable_options\030\003 \001(\0132@.com.alicloud.op" + + "enservices.tablestore.core.protocol.Tabl" + + "eOptions\022V\n\npartitions\030\004 \003(\0132B.com.alicl" + + "oud.openservices.tablestore.core.protoco" + + "l.PartitionRange\022\\\n\013stream_spec\030\005 \001(\0132G." + + "com.alicloud.openservices.tablestore.cor", + "e.protocol.StreamSpecification\022V\n\010sse_sp" + + "ec\030\006 \001(\0132D.com.alicloud.openservices.tab" + + "lestore.core.protocol.SSESpecification\022R" + + "\n\013index_metas\030\007 \003(\0132=.com.alicloud.opens" + + "ervices.tablestore.core.protocol.IndexMe" + + "ta\022\030\n\020enable_local_txn\030\010 \001(\010\"\025\n\023CreateTa" + + "bleResponse\"\233\001\n\022CreateIndexRequest\022\027\n\017ma" + + "in_table_name\030\001 \002(\t\022Q\n\nindex_meta\030\002 \002(\0132" + + "=.com.alicloud.openservices.tablestore.c" + + "ore.protocol.IndexMeta\022\031\n\021include_base_d", + "ata\030\003 \001(\010\"\025\n\023CreateIndexResponse\"?\n\020Drop" + + "IndexRequest\022\027\n\017main_table_name\030\001 \002(\t\022\022\n" + + "\nindex_name\030\002 \002(\t\"\023\n\021DropIndexResponse\"\207" + + "\001\n\027AddDefinedColumnRequest\022\022\n\ntable_name" + + "\030\001 \002(\t\022X\n\007columns\030\002 \003(\0132G.com.alicloud.o" + + "penservices.tablestore.core.protocol.Def" + + "inedColumnSchema\"\032\n\030AddDefinedColumnResp" + + "onse\"A\n\032DeleteDefinedColumnRequest\022\022\n\nta" + + "ble_name\030\001 \002(\t\022\017\n\007columns\030\002 \003(\t\"\035\n\033Delet" + + "eDefinedColumnResponse\"\304\002\n\022UpdateTableRe", + "quest\022\022\n\ntable_name\030\001 \002(\t\022c\n\023reserved_th" + + "roughput\030\002 \001(\0132F.com.alicloud.openservic" + + "es.tablestore.core.protocol.ReservedThro" + + "ughput\022W\n\rtable_options\030\003 \001(\0132@.com.alic" + "loud.openservices.tablestore.core.protoc" + - "ol.TableOptions\022Y\n\016stream_details\030\003 \001(\0132" + - "A.com.alicloud.openservices.tablestore.c" + - "ore.protocol.StreamDetails\"*\n\024DescribeTa", - "bleRequest\022\022\n\ntable_name\030\001 \002(\t\"\374\003\n\025Descr" + - "ibeTableResponse\022Q\n\ntable_meta\030\001 \002(\0132=.c" + + "ol.TableOptions\022\\\n\013stream_spec\030\004 \001(\0132G.c" + "om.alicloud.openservices.tablestore.core" + - ".protocol.TableMeta\022r\n\033reserved_throughp" + - "ut_details\030\002 \002(\0132M.com.alicloud.openserv" + - "ices.tablestore.core.protocol.ReservedTh" + - "roughputDetails\022W\n\rtable_options\030\003 \002(\0132@" + - ".com.alicloud.openservices.tablestore.co" + - "re.protocol.TableOptions\022Y\n\016stream_detai" + - "ls\030\005 \001(\0132A.com.alicloud.openservices.tab", - "lestore.core.protocol.StreamDetails\022\024\n\014s" + - "hard_splits\030\006 \003(\014\022R\n\013index_metas\030\010 \003(\0132=" + + ".protocol.StreamSpecification\"\275\002\n\023Update" + + "TableResponse\022r\n\033reserved_throughput_det" + + "ails\030\001 \002(\0132M.com.alicloud.openservices.t", + "ablestore.core.protocol.ReservedThroughp" + + "utDetails\022W\n\rtable_options\030\002 \002(\0132@.com.a" + + "licloud.openservices.tablestore.core.pro" + + "tocol.TableOptions\022Y\n\016stream_details\030\003 \001" + + "(\0132A.com.alicloud.openservices.tablestor" + + "e.core.protocol.StreamDetails\"*\n\024Describ" + + "eTableRequest\022\022\n\ntable_name\030\001 \002(\t\"\350\004\n\025De" + + "scribeTableResponse\022Q\n\ntable_meta\030\001 \002(\0132" + + "=.com.alicloud.openservices.tablestore.c" + + "ore.protocol.TableMeta\022r\n\033reserved_throu", + "ghput_details\030\002 \002(\0132M.com.alicloud.opens" + + "ervices.tablestore.core.protocol.Reserve" + + "dThroughputDetails\022W\n\rtable_options\030\003 \002(" + + "\0132@.com.alicloud.openservices.tablestore" + + ".core.protocol.TableOptions\022Y\n\016stream_de" + + "tails\030\005 \001(\0132A.com.alicloud.openservices." + + "tablestore.core.protocol.StreamDetails\022\024" + + "\n\014shard_splits\030\006 \003(\014\022S\n\013sse_details\030\007 \001(" + + "\0132>.com.alicloud.openservices.tablestore" + + ".core.protocol.SSEDetails\022R\n\013index_metas", + "\030\010 \003(\0132=.com.alicloud.openservices.table" + + "store.core.protocol.IndexMeta\022\025\n\rcreatio" + + "n_time\030\t \001(\003\"\022\n\020ListTableRequest\"(\n\021List" + + "TableResponse\022\023\n\013table_names\030\001 \003(\t\"(\n\022De" + + "leteTableRequest\022\022\n\ntable_name\030\001 \002(\t\"\025\n\023" + + "DeleteTableResponse\"&\n\020LoadTableRequest\022" + + "\022\n\ntable_name\030\001 \002(\t\"\023\n\021LoadTableResponse" + + "\"(\n\022UnloadTableRequest\022\022\n\ntable_name\030\001 \002" + + "(\t\"\025\n\023UnloadTableResponse\"H\n\tTimeRange\022\022" + + "\n\nstart_time\030\001 \001(\003\022\020\n\010end_time\030\002 \001(\003\022\025\n\r", + "specific_time\030\003 \001(\003\"\201\001\n\rReturnContent\022S\n" + + "\013return_type\030\001 \001(\0162>.com.alicloud.opense" + + "rvices.tablestore.core.protocol.ReturnTy" + + "pe\022\033\n\023return_column_names\030\002 \003(\t\"\232\002\n\rGetR" + + "owRequest\022\022\n\ntable_name\030\001 \002(\t\022\023\n\013primary" + + "_key\030\002 \002(\014\022\026\n\016columns_to_get\030\003 \003(\t\022Q\n\nti" + + "me_range\030\004 \001(\0132=.com.alicloud.openservic" + + "es.tablestore.core.protocol.TimeRange\022\024\n" + + "\014max_versions\030\005 \001(\005\022\016\n\006filter\030\007 \001(\014\022\024\n\014s" + + "tart_column\030\010 \001(\t\022\022\n\nend_column\030\t \001(\t\022\r\n", + "\005token\030\n \001(\014\022\026\n\016transaction_id\030\013 \001(\t\"\211\001\n" + + "\016GetRowResponse\022V\n\010consumed\030\001 \002(\0132D.com." + + "alicloud.openservices.tablestore.core.pr" + + "otocol.ConsumedCapacity\022\013\n\003row\030\002 \002(\014\022\022\n\n" + + "next_token\030\003 \001(\014\"\377\001\n\020UpdateRowRequest\022\022\n" + + "\ntable_name\030\001 \002(\t\022\022\n\nrow_change\030\002 \002(\014\022P\n" + + "\tcondition\030\003 \002(\0132=.com.alicloud.openserv" + + "ices.tablestore.core.protocol.Condition\022" + + "Y\n\016return_content\030\004 \001(\0132A.com.alicloud.o" + + "penservices.tablestore.core.protocol.Ret", + "urnContent\022\026\n\016transaction_id\030\005 \001(\t\"x\n\021Up" + + "dateRowResponse\022V\n\010consumed\030\001 \002(\0132D.com." + + "alicloud.openservices.tablestore.core.pr" + + "otocol.ConsumedCapacity\022\013\n\003row\030\002 \001(\014\"\365\001\n" + + "\rPutRowRequest\022\022\n\ntable_name\030\001 \002(\t\022\013\n\003ro" + + "w\030\002 \002(\014\022P\n\tcondition\030\003 \002(\0132=.com.aliclou" + + "d.openservices.tablestore.core.protocol." + + "Condition\022Y\n\016return_content\030\004 \001(\0132A.com." + + "alicloud.openservices.tablestore.core.pr" + + "otocol.ReturnContent\022\026\n\016transaction_id\030\005", + " \001(\t\"u\n\016PutRowResponse\022V\n\010consumed\030\001 \002(\013" + + "2D.com.alicloud.openservices.tablestore." + + "core.protocol.ConsumedCapacity\022\013\n\003row\030\002 " + + "\001(\014\"\200\002\n\020DeleteRowRequest\022\022\n\ntable_name\030\001" + + " \002(\t\022\023\n\013primary_key\030\002 \002(\014\022P\n\tcondition\030\003" + + " \002(\0132=.com.alicloud.openservices.tablest" + + "ore.core.protocol.Condition\022Y\n\016return_co" + + "ntent\030\004 \001(\0132A.com.alicloud.openservices." + + "tablestore.core.protocol.ReturnContent\022\026" + + "\n\016transaction_id\030\005 \001(\t\"x\n\021DeleteRowRespo", + "nse\022V\n\010consumed\030\001 \002(\0132D.com.alicloud.ope" + + "nservices.tablestore.core.protocol.Consu" + + "medCapacity\022\013\n\003row\030\002 \001(\014\"\216\002\n\031TableInBatc" + + "hGetRowRequest\022\022\n\ntable_name\030\001 \002(\t\022\023\n\013pr" + + "imary_key\030\002 \003(\014\022\r\n\005token\030\003 \003(\014\022\026\n\016column" + + "s_to_get\030\004 \003(\t\022Q\n\ntime_range\030\005 \001(\0132=.com" + + ".alicloud.openservices.tablestore.core.p" + + "rotocol.TimeRange\022\024\n\014max_versions\030\006 \001(\005\022" + + "\016\n\006filter\030\010 \001(\014\022\024\n\014start_column\030\t \001(\t\022\022\n" + + "\nend_column\030\n \001(\t\"s\n\022BatchGetRowRequest\022", + "]\n\006tables\030\001 \003(\0132M.com.alicloud.openservi" + + "ces.tablestore.core.protocol.TableInBatc" + + "hGetRowRequest\"\354\001\n\030RowInBatchGetRowRespo" + + "nse\022\r\n\005is_ok\030\001 \002(\010\022H\n\005error\030\002 \001(\01329.com." + + "alicloud.openservices.tablestore.core.pr" + + "otocol.Error\022V\n\010consumed\030\003 \001(\0132D.com.ali" + + "cloud.openservices.tablestore.core.proto" + + "col.ConsumedCapacity\022\013\n\003row\030\004 \001(\014\022\022\n\nnex" + + "t_token\030\005 \001(\014\"\214\001\n\032TableInBatchGetRowResp" + + "onse\022\022\n\ntable_name\030\001 \002(\t\022Z\n\004rows\030\002 \003(\0132L", ".com.alicloud.openservices.tablestore.co" + - "re.protocol.IndexMeta\"\022\n\020ListTableReques" + - "t\"(\n\021ListTableResponse\022\023\n\013table_names\030\001 " + - "\003(\t\"(\n\022DeleteTableRequest\022\022\n\ntable_name\030" + - "\001 \002(\t\"\025\n\023DeleteTableResponse\"&\n\020LoadTabl" + - "eRequest\022\022\n\ntable_name\030\001 \002(\t\"\023\n\021LoadTabl" + - "eResponse\"(\n\022UnloadTableRequest\022\022\n\ntable" + - "_name\030\001 \002(\t\"\025\n\023UnloadTableResponse\"H\n\tTi", - "meRange\022\022\n\nstart_time\030\001 \001(\003\022\020\n\010end_time\030" + - "\002 \001(\003\022\025\n\rspecific_time\030\003 \001(\003\"\201\001\n\rReturnC" + - "ontent\022S\n\013return_type\030\001 \001(\0162>.com.aliclo" + - "ud.openservices.tablestore.core.protocol" + - ".ReturnType\022\033\n\023return_column_names\030\002 \003(\t" + - "\"\232\002\n\rGetRowRequest\022\022\n\ntable_name\030\001 \002(\t\022\023" + - "\n\013primary_key\030\002 \002(\014\022\026\n\016columns_to_get\030\003 " + - "\003(\t\022Q\n\ntime_range\030\004 \001(\0132=.com.alicloud.o" + - "penservices.tablestore.core.protocol.Tim" + - "eRange\022\024\n\014max_versions\030\005 \001(\005\022\016\n\006filter\030\007", - " \001(\014\022\024\n\014start_column\030\010 \001(\t\022\022\n\nend_column" + - "\030\t \001(\t\022\r\n\005token\030\n \001(\014\022\026\n\016transaction_id\030" + - "\013 \001(\t\"\211\001\n\016GetRowResponse\022V\n\010consumed\030\001 \002" + - "(\0132D.com.alicloud.openservices.tablestor" + - "e.core.protocol.ConsumedCapacity\022\013\n\003row\030" + - "\002 \002(\014\022\022\n\nnext_token\030\003 \001(\014\"\377\001\n\020UpdateRowR" + - "equest\022\022\n\ntable_name\030\001 \002(\t\022\022\n\nrow_change" + + "re.protocol.RowInBatchGetRowResponse\"u\n\023" + + "BatchGetRowResponse\022^\n\006tables\030\001 \003(\0132N.co" + + "m.alicloud.openservices.tablestore.core." + + "protocol.TableInBatchGetRowResponse\"\255\002\n\031" + + "RowInBatchWriteRowRequest\022O\n\004type\030\001 \002(\0162" + + "A.com.alicloud.openservices.tablestore.c" + + "ore.protocol.OperationType\022\022\n\nrow_change" + "\030\002 \002(\014\022P\n\tcondition\030\003 \002(\0132=.com.alicloud" + - ".openservices.tablestore.core.protocol.C" + - "ondition\022Y\n\016return_content\030\004 \001(\0132A.com.a", + ".openservices.tablestore.core.protocol.C", + "ondition\022Y\n\016return_content\030\004 \001(\0132A.com.a" + "licloud.openservices.tablestore.core.pro" + - "tocol.ReturnContent\022\026\n\016transaction_id\030\005 " + - "\001(\t\"x\n\021UpdateRowResponse\022V\n\010consumed\030\001 \002" + - "(\0132D.com.alicloud.openservices.tablestor" + - "e.core.protocol.ConsumedCapacity\022\013\n\003row\030" + - "\002 \001(\014\"\365\001\n\rPutRowRequest\022\022\n\ntable_name\030\001 " + - "\002(\t\022\013\n\003row\030\002 \002(\014\022P\n\tcondition\030\003 \002(\0132=.co" + - "m.alicloud.openservices.tablestore.core." + - "protocol.Condition\022Y\n\016return_content\030\004 \001" + - "(\0132A.com.alicloud.openservices.tablestor", - "e.core.protocol.ReturnContent\022\026\n\016transac" + - "tion_id\030\005 \001(\t\"u\n\016PutRowResponse\022V\n\010consu" + - "med\030\001 \002(\0132D.com.alicloud.openservices.ta" + - "blestore.core.protocol.ConsumedCapacity\022" + - "\013\n\003row\030\002 \001(\014\"\200\002\n\020DeleteRowRequest\022\022\n\ntab" + - "le_name\030\001 \002(\t\022\023\n\013primary_key\030\002 \002(\014\022P\n\tco" + - "ndition\030\003 \002(\0132=.com.alicloud.openservice" + - "s.tablestore.core.protocol.Condition\022Y\n\016" + - "return_content\030\004 \001(\0132A.com.alicloud.open" + - "services.tablestore.core.protocol.Return", - "Content\022\026\n\016transaction_id\030\005 \001(\t\"x\n\021Delet" + - "eRowResponse\022V\n\010consumed\030\001 \002(\0132D.com.ali" + + "tocol.ReturnContent\"\216\001\n\033TableInBatchWrit" + + "eRowRequest\022\022\n\ntable_name\030\001 \002(\t\022[\n\004rows\030" + + "\002 \003(\0132M.com.alicloud.openservices.tables" + + "tore.core.protocol.RowInBatchWriteRowReq" + + "uest\"\242\001\n\024BatchWriteRowRequest\022_\n\006tables\030" + + "\001 \003(\0132O.com.alicloud.openservices.tables" + + "tore.core.protocol.TableInBatchWriteRowR" + + "equest\022\026\n\016transaction_id\030\002 \001(\t\022\021\n\tis_ato", + "mic\030\003 \001(\010\"\332\001\n\032RowInBatchWriteRowResponse" + + "\022\r\n\005is_ok\030\001 \002(\010\022H\n\005error\030\002 \001(\01329.com.ali" + "cloud.openservices.tablestore.core.proto" + - "col.ConsumedCapacity\022\013\n\003row\030\002 \001(\014\"\216\002\n\031Ta" + - "bleInBatchGetRowRequest\022\022\n\ntable_name\030\001 " + - "\002(\t\022\023\n\013primary_key\030\002 \003(\014\022\r\n\005token\030\003 \003(\014\022" + - "\026\n\016columns_to_get\030\004 \003(\t\022Q\n\ntime_range\030\005 " + - "\001(\0132=.com.alicloud.openservices.tablesto" + - "re.core.protocol.TimeRange\022\024\n\014max_versio" + - "ns\030\006 \001(\005\022\016\n\006filter\030\010 \001(\014\022\024\n\014start_column", - "\030\t \001(\t\022\022\n\nend_column\030\n \001(\t\"s\n\022BatchGetRo" + - "wRequest\022]\n\006tables\030\001 \003(\0132M.com.alicloud." + - "openservices.tablestore.core.protocol.Ta" + - "bleInBatchGetRowRequest\"\354\001\n\030RowInBatchGe" + - "tRowResponse\022\r\n\005is_ok\030\001 \002(\010\022H\n\005error\030\002 \001" + - "(\01329.com.alicloud.openservices.tablestor" + - "e.core.protocol.Error\022V\n\010consumed\030\003 \001(\0132" + - "D.com.alicloud.openservices.tablestore.c" + - "ore.protocol.ConsumedCapacity\022\013\n\003row\030\004 \001" + - "(\014\022\022\n\nnext_token\030\005 \001(\014\"\214\001\n\032TableInBatchG", - "etRowResponse\022\022\n\ntable_name\030\001 \002(\t\022Z\n\004row" + - "s\030\002 \003(\0132L.com.alicloud.openservices.tabl" + - "estore.core.protocol.RowInBatchGetRowRes" + - "ponse\"u\n\023BatchGetRowResponse\022^\n\006tables\030\001" + - " \003(\0132N.com.alicloud.openservices.tablest" + - "ore.core.protocol.TableInBatchGetRowResp" + - "onse\"\255\002\n\031RowInBatchWriteRowRequest\022O\n\004ty" + - "pe\030\001 \002(\0162A.com.alicloud.openservices.tab" + - "lestore.core.protocol.OperationType\022\022\n\nr" + - "ow_change\030\002 \002(\014\022P\n\tcondition\030\003 \002(\0132=.com", - ".alicloud.openservices.tablestore.core.p" + - "rotocol.Condition\022Y\n\016return_content\030\004 \001(" + - "\0132A.com.alicloud.openservices.tablestore" + - ".core.protocol.ReturnContent\"\216\001\n\033TableIn" + - "BatchWriteRowRequest\022\022\n\ntable_name\030\001 \002(\t" + - "\022[\n\004rows\030\002 \003(\0132M.com.alicloud.openservic" + - "es.tablestore.core.protocol.RowInBatchWr" + - "iteRowRequest\"\217\001\n\024BatchWriteRowRequest\022_" + - "\n\006tables\030\001 \003(\0132O.com.alicloud.openservic" + - "es.tablestore.core.protocol.TableInBatch", - "WriteRowRequest\022\026\n\016transaction_id\030\002 \001(\t\"" + - "\332\001\n\032RowInBatchWriteRowResponse\022\r\n\005is_ok\030" + - "\001 \002(\010\022H\n\005error\030\002 \001(\01329.com.alicloud.open" + - "services.tablestore.core.protocol.Error\022" + - "V\n\010consumed\030\003 \001(\0132D.com.alicloud.openser" + - "vices.tablestore.core.protocol.ConsumedC" + - "apacity\022\013\n\003row\030\004 \001(\014\"\220\001\n\034TableInBatchWri" + - "teRowResponse\022\022\n\ntable_name\030\001 \002(\t\022\\\n\004row" + - "s\030\002 \003(\0132N.com.alicloud.openservices.tabl" + - "estore.core.protocol.RowInBatchWriteRowR", - "esponse\"y\n\025BatchWriteRowResponse\022`\n\006tabl" + - "es\030\001 \003(\0132P.com.alicloud.openservices.tab" + - "lestore.core.protocol.TableInBatchWriteR" + - "owResponse\"\260\003\n\017GetRangeRequest\022\022\n\ntable_" + - "name\030\001 \002(\t\022P\n\tdirection\030\002 \002(\0162=.com.alic" + - "loud.openservices.tablestore.core.protoc" + - "ol.Direction\022\026\n\016columns_to_get\030\003 \003(\t\022Q\n\n" + - "time_range\030\004 \001(\0132=.com.alicloud.openserv" + - "ices.tablestore.core.protocol.TimeRange\022" + - "\024\n\014max_versions\030\005 \001(\005\022\r\n\005limit\030\006 \001(\005\022#\n\033", - "inclusive_start_primary_key\030\007 \002(\014\022!\n\031exc" + - "lusive_end_primary_key\030\010 \002(\014\022\016\n\006filter\030\n" + - " \001(\014\022\024\n\014start_column\030\013 \001(\t\022\022\n\nend_column" + - "\030\014 \001(\t\022\r\n\005token\030\r \001(\014\022\026\n\016transaction_id\030" + - "\016 \001(\t\"\254\001\n\020GetRangeResponse\022V\n\010consumed\030\001" + - " \002(\0132D.com.alicloud.openservices.tablest" + - "ore.core.protocol.ConsumedCapacity\022\014\n\004ro" + - "ws\030\002 \002(\014\022\036\n\026next_start_primary_key\030\003 \001(\014" + - "\022\022\n\nnext_token\030\004 \001(\014\"?\n\034StartLocalTransa" + - "ctionRequest\022\022\n\ntable_name\030\001 \002(\t\022\013\n\003key\030", - "\002 \002(\014\"7\n\035StartLocalTransactionResponse\022\026" + - "\n\016transaction_id\030\001 \002(\t\"2\n\030CommitTransact" + - "ionRequest\022\026\n\016transaction_id\030\001 \002(\t\"\033\n\031Co" + - "mmitTransactionResponse\"1\n\027AbortTransact" + - "ionRequest\022\026\n\016transaction_id\030\001 \002(\t\"\032\n\030Ab" + - "ortTransactionResponse\"\'\n\021ListStreamRequ" + - "est\022\022\n\ntable_name\030\001 \001(\t\"F\n\006Stream\022\021\n\tstr" + - "eam_id\030\001 \002(\t\022\022\n\ntable_name\030\002 \002(\t\022\025\n\rcrea" + - "tion_time\030\003 \002(\003\"a\n\022ListStreamResponse\022K\n" + - "\007streams\030\001 \003(\0132:.com.alicloud.openservic", - "es.tablestore.core.protocol.Stream\"M\n\013St" + - "reamShard\022\020\n\010shard_id\030\001 \002(\t\022\021\n\tparent_id" + - "\030\002 \001(\t\022\031\n\021parent_sibling_id\030\003 \001(\t\"a\n\025Des" + - "cribeStreamRequest\022\021\n\tstream_id\030\001 \002(\t\022 \n" + - "\030inclusive_start_shard_id\030\002 \001(\t\022\023\n\013shard" + - "_limit\030\003 \001(\005\"\260\002\n\026DescribeStreamResponse\022" + - "\021\n\tstream_id\030\001 \002(\t\022\027\n\017expiration_time\030\002 " + - "\002(\005\022\022\n\ntable_name\030\003 \002(\t\022\025\n\rcreation_time" + - "\030\004 \002(\003\022W\n\rstream_status\030\005 \002(\0162@.com.alic" + - "loud.openservices.tablestore.core.protoc", - "ol.StreamStatus\022O\n\006shards\030\006 \003(\0132?.com.al" + - "icloud.openservices.tablestore.core.prot" + - "ocol.StreamShard\022\025\n\rnext_shard_id\030\007 \001(\t\"" + - ">\n\027GetShardIteratorRequest\022\021\n\tstream_id\030" + - "\001 \002(\t\022\020\n\010shard_id\030\002 \002(\t\"2\n\030GetShardItera" + - "torResponse\022\026\n\016shard_iterator\030\001 \002(\t\"?\n\026G" + - "etStreamRecordRequest\022\026\n\016shard_iterator\030" + - "\001 \002(\t\022\r\n\005limit\030\002 \001(\005\"\235\002\n\027GetStreamRecord" + - "Response\022p\n\016stream_records\030\001 \003(\0132X.com.a" + - "licloud.openservices.tablestore.core.pro", - "tocol.GetStreamRecordResponse.StreamReco" + - "rd\022\033\n\023next_shard_iterator\030\002 \001(\t\032s\n\014Strea" + - "mRecord\022S\n\013action_type\030\001 \002(\0162>.com.alicl" + - "oud.openservices.tablestore.core.protoco" + - "l.ActionType\022\016\n\006record\030\002 \002(\014\"j\n\037ComputeS" + - "plitPointsBySizeRequest\022\022\n\ntable_name\030\001 " + - "\002(\t\022\022\n\nsplit_size\030\002 \002(\003\022\037\n\027split_size_un" + - "it_in_byte\030\003 \001(\003\"\220\003\n ComputeSplitPointsB" + - "ySizeResponse\022V\n\010consumed\030\001 \002(\0132D.com.al" + - "icloud.openservices.tablestore.core.prot", - "ocol.ConsumedCapacity\022T\n\006schema\030\002 \003(\0132D." + + "col.Error\022V\n\010consumed\030\003 \001(\0132D.com.aliclo" + + "ud.openservices.tablestore.core.protocol" + + ".ConsumedCapacity\022\013\n\003row\030\004 \001(\014\"\220\001\n\034Table" + + "InBatchWriteRowResponse\022\022\n\ntable_name\030\001 " + + "\002(\t\022\\\n\004rows\030\002 \003(\0132N.com.alicloud.openser" + + "vices.tablestore.core.protocol.RowInBatc" + + "hWriteRowResponse\"y\n\025BatchWriteRowRespon", + "se\022`\n\006tables\030\001 \003(\0132P.com.alicloud.opense" + + "rvices.tablestore.core.protocol.TableInB" + + "atchWriteRowResponse\"\260\003\n\017GetRangeRequest" + + "\022\022\n\ntable_name\030\001 \002(\t\022P\n\tdirection\030\002 \002(\0162" + + "=.com.alicloud.openservices.tablestore.c" + + "ore.protocol.Direction\022\026\n\016columns_to_get" + + "\030\003 \003(\t\022Q\n\ntime_range\030\004 \001(\0132=.com.aliclou" + + "d.openservices.tablestore.core.protocol." + + "TimeRange\022\024\n\014max_versions\030\005 \001(\005\022\r\n\005limit" + + "\030\006 \001(\005\022#\n\033inclusive_start_primary_key\030\007 ", + "\002(\014\022!\n\031exclusive_end_primary_key\030\010 \002(\014\022\016" + + "\n\006filter\030\n \001(\014\022\024\n\014start_column\030\013 \001(\t\022\022\n\n" + + "end_column\030\014 \001(\t\022\r\n\005token\030\r \001(\014\022\026\n\016trans" + + "action_id\030\016 \001(\t\"\254\001\n\020GetRangeResponse\022V\n\010" + + "consumed\030\001 \002(\0132D.com.alicloud.openservic" + + "es.tablestore.core.protocol.ConsumedCapa" + + "city\022\014\n\004rows\030\002 \002(\014\022\036\n\026next_start_primary" + + "_key\030\003 \001(\014\022\022\n\nnext_token\030\004 \001(\014\"?\n\034StartL" + + "ocalTransactionRequest\022\022\n\ntable_name\030\001 \002" + + "(\t\022\013\n\003key\030\002 \002(\014\"7\n\035StartLocalTransaction", + "Response\022\026\n\016transaction_id\030\001 \002(\t\"2\n\030Comm" + + "itTransactionRequest\022\026\n\016transaction_id\030\001" + + " \002(\t\"\033\n\031CommitTransactionResponse\"1\n\027Abo" + + "rtTransactionRequest\022\026\n\016transaction_id\030\001" + + " \002(\t\"\032\n\030AbortTransactionResponse\"\'\n\021List" + + "StreamRequest\022\022\n\ntable_name\030\001 \001(\t\"F\n\006Str" + + "eam\022\021\n\tstream_id\030\001 \002(\t\022\022\n\ntable_name\030\002 \002" + + "(\t\022\025\n\rcreation_time\030\003 \002(\003\"a\n\022ListStreamR" + + "esponse\022K\n\007streams\030\001 \003(\0132:.com.alicloud." + + "openservices.tablestore.core.protocol.St", + "ream\"M\n\013StreamShard\022\020\n\010shard_id\030\001 \002(\t\022\021\n" + + "\tparent_id\030\002 \001(\t\022\031\n\021parent_sibling_id\030\003 " + + "\001(\t\"a\n\025DescribeStreamRequest\022\021\n\tstream_i" + + "d\030\001 \002(\t\022 \n\030inclusive_start_shard_id\030\002 \001(" + + "\t\022\023\n\013shard_limit\030\003 \001(\005\"\260\002\n\026DescribeStrea" + + "mResponse\022\021\n\tstream_id\030\001 \002(\t\022\027\n\017expirati" + + "on_time\030\002 \002(\005\022\022\n\ntable_name\030\003 \002(\t\022\025\n\rcre" + + "ation_time\030\004 \002(\003\022W\n\rstream_status\030\005 \002(\0162" + + "@.com.alicloud.openservices.tablestore.c" + + "ore.protocol.StreamStatus\022O\n\006shards\030\006 \003(", + "\0132?.com.alicloud.openservices.tablestore" + + ".core.protocol.StreamShard\022\025\n\rnext_shard" + + "_id\030\007 \001(\t\"`\n\027GetShardIteratorRequest\022\021\n\t" + + "stream_id\030\001 \002(\t\022\020\n\010shard_id\030\002 \002(\t\022\021\n\ttim" + + "estamp\030\003 \001(\003\022\r\n\005token\030\004 \001(\t\"F\n\030GetShardI" + + "teratorResponse\022\026\n\016shard_iterator\030\001 \002(\t\022" + + "\022\n\nnext_token\030\002 \001(\t\"?\n\026GetStreamRecordRe" + + "quest\022\026\n\016shard_iterator\030\001 \002(\t\022\r\n\005limit\030\002" + + " \001(\005\"\235\002\n\027GetStreamRecordResponse\022p\n\016stre" + + "am_records\030\001 \003(\0132X.com.alicloud.openserv", + "ices.tablestore.core.protocol.GetStreamR" + + "ecordResponse.StreamRecord\022\033\n\023next_shard" + + "_iterator\030\002 \001(\t\032s\n\014StreamRecord\022S\n\013actio" + + "n_type\030\001 \002(\0162>.com.alicloud.openservices" + + ".tablestore.core.protocol.ActionType\022\016\n\006" + + "record\030\002 \002(\014\"\205\001\n\037ComputeSplitPointsBySiz" + + "eRequest\022\022\n\ntable_name\030\001 \002(\t\022\022\n\nsplit_si" + + "ze\030\002 \002(\003\022\037\n\027split_size_unit_in_byte\030\003 \001(" + + "\003\022\031\n\021split_point_limit\030\004 \001(\005\"\220\003\n Compute" + + "SplitPointsBySizeResponse\022V\n\010consumed\030\001 ", + "\002(\0132D.com.alicloud.openservices.tablesto" + + "re.core.protocol.ConsumedCapacity\022T\n\006sch" + + "ema\030\002 \003(\0132D.com.alicloud.openservices.ta" + + "blestore.core.protocol.PrimaryKeySchema\022" + + "\024\n\014split_points\030\003 \003(\014\022u\n\tlocations\030\004 \003(\013" + + "2b.com.alicloud.openservices.tablestore." + + "core.protocol.ComputeSplitPointsBySizeRe" + + "sponse.SplitLocation\0321\n\rSplitLocation\022\020\n" + + "\010location\030\001 \002(\t\022\016\n\006repeat\030\002 \002(\022\"\217\002\n\021Bulk" + + "ExportRequest\022\022\n\ntable_name\030\001 \002(\t\022\026\n\016col", + "umns_to_get\030\002 \003(\t\022#\n\033inclusive_start_pri" + + "mary_key\030\003 \002(\014\022!\n\031exclusive_end_primary_" + + "key\030\004 \002(\014\022\016\n\006filter\030\005 \001(\014\022v\n\024data_block_" + + "type_hint\030\006 \001(\0162A.com.alicloud.openservi" + + "ces.tablestore.core.protocol.DataBlockTy" + + "pe:\025DBT_SIMPLE_ROW_MATRIX\"\366\001\n\022BulkExport" + + "Response\022V\n\010consumed\030\001 \002(\0132D.com.aliclou" + + "d.openservices.tablestore.core.protocol." + + "ConsumedCapacity\022\014\n\004rows\030\002 \002(\014\022\036\n\026next_s" + + "tart_primary_key\030\003 \001(\014\022Z\n\017data_block_typ", + "e\030\004 \001(\0162A.com.alicloud.openservices.tabl" + + "estore.core.protocol.DataBlockType\"\201\001\n\021B" + + "ulkImportRequest\022\022\n\ntable_name\030\001 \002(\t\022X\n\004" + + "rows\030\002 \003(\0132J.com.alicloud.openservices.t" + + "ablestore.core.protocol.RowInBulkImportR" + + "equest\"}\n\026RowInBulkImportRequest\022O\n\004type" + + "\030\001 \002(\0162A.com.alicloud.openservices.table" + + "store.core.protocol.OperationType\022\022\n\nrow" + + "_change\030\002 \002(\014\"\203\001\n\022BulkImportResponse\022\022\n\n" + + "table_name\030\001 \002(\t\022Y\n\004rows\030\002 \003(\0132K.com.ali", + "cloud.openservices.tablestore.core.proto" + + "col.RowInBulkImportResponse\"\312\001\n\027RowInBul" + + "kImportResponse\022\r\n\005is_ok\030\001 \002(\010\022H\n\005error\030" + + "\002 \001(\01329.com.alicloud.openservices.tables" + + "tore.core.protocol.Error\022V\n\010consumed\030\003 \001" + + "(\0132D.com.alicloud.openservices.tablestor" + + "e.core.protocol.ConsumedCapacity\"\235\001\n\024Com" + + "puteSplitsRequest\022\022\n\ntable_name\030\001 \001(\t\022q\n" + + "\033search_index_splits_options\030\002 \001(\0132L.com" + + ".alicloud.openservices.tablestore.core.p", + "rotocol.SearchIndexSplitsOptions\".\n\030Sear" + + "chIndexSplitsOptions\022\022\n\nindex_name\030\001 \001(\t" + + "\"@\n\025ComputeSplitsResponse\022\022\n\nsession_id\030" + + "\001 \001(\014\022\023\n\013splits_size\030\002 \001(\005\"x\n\017SQLQueryRe" + + "quest\022\r\n\005query\030\001 \002(\t\022V\n\007version\030\002 \001(\0162E." + "com.alicloud.openservices.tablestore.cor" + - "e.protocol.PrimaryKeySchema\022\024\n\014split_poi" + - "nts\030\003 \003(\014\022u\n\tlocations\030\004 \003(\0132b.com.alicl" + - "oud.openservices.tablestore.core.protoco" + - "l.ComputeSplitPointsBySizeResponse.Split" + - "Location\0321\n\rSplitLocation\022\020\n\010location\030\001 " + - "\002(\t\022\016\n\006repeat\030\002 \002(\022*5\n\016PrimaryKeyType\022\013\n" + - "\007INTEGER\020\001\022\n\n\006STRING\020\002\022\n\n\006BINARY\020\003*c\n\021De" + - "finedColumnType\022\017\n\013DCT_INTEGER\020\001\022\016\n\nDCT_", - "DOUBLE\020\002\022\017\n\013DCT_BOOLEAN\020\003\022\016\n\nDCT_STRING\020" + - "\004\022\014\n\010DCT_BLOB\020\007*&\n\020PrimaryKeyOption\022\022\n\016A" + - "UTO_INCREMENT\020\001*:\n\017IndexUpdateMode\022\023\n\017IU" + - "M_ASYNC_INDEX\020\000\022\022\n\016IUM_SYNC_INDEX\020\001*4\n\tI" + - "ndexType\022\023\n\017IT_GLOBAL_INDEX\020\000\022\022\n\016IT_LOCA" + - "L_INDEX\020\001*M\n\027RowExistenceExpectation\022\n\n\006" + - "IGNORE\020\000\022\020\n\014EXPECT_EXIST\020\001\022\024\n\020EXPECT_NOT" + - "_EXIST\020\002*9\n\nReturnType\022\013\n\007RT_NONE\020\000\022\t\n\005R" + - "T_PK\020\001\022\023\n\017RT_AFTER_MODIFY\020\002*0\n\rOperation" + - "Type\022\007\n\003PUT\020\001\022\n\n\006UPDATE\020\002\022\n\n\006DELETE\020\003*&\n", - "\tDirection\022\013\n\007FORWARD\020\000\022\014\n\010BACKWARD\020\001*6\n" + - "\014StreamStatus\022\023\n\017STREAM_ENABLING\020\001\022\021\n\rST" + - "REAM_ACTIVE\020\002*9\n\nActionType\022\013\n\007PUT_ROW\020\001" + - "\022\016\n\nUPDATE_ROW\020\002\022\016\n\nDELETE_ROW\020\003" + "e.protocol.SQLPayloadVersion\"\350\001\n\025TableCo" + + "nsumedCapacity\022\022\n\ntable_name\030\001 \001(\t\022V\n\010co" + + "nsumed\030\002 \001(\0132D.com.alicloud.openservices" + + ".tablestore.core.protocol.ConsumedCapaci", + "ty\022c\n\023reserved_throughput\030\003 \001(\0132F.com.al" + + "icloud.openservices.tablestore.core.prot" + + "ocol.ReservedThroughput\"\251\002\n\020SQLQueryResp" + + "onse\022[\n\010consumes\030\001 \003(\0132I.com.alicloud.op" + + "enservices.tablestore.core.protocol.Tabl" + + "eConsumedCapacity\022\014\n\004rows\030\002 \001(\014\022V\n\007versi" + + "on\030\003 \001(\0162E.com.alicloud.openservices.tab" + + "lestore.core.protocol.SQLPayloadVersion\022" + + "R\n\004type\030\004 \001(\0162D.com.alicloud.openservice" + + "s.tablestore.core.protocol.SQLStatementT", + "ype*5\n\016PrimaryKeyType\022\013\n\007INTEGER\020\001\022\n\n\006ST" + + "RING\020\002\022\n\n\006BINARY\020\003*c\n\021DefinedColumnType\022" + + "\017\n\013DCT_INTEGER\020\001\022\016\n\nDCT_DOUBLE\020\002\022\017\n\013DCT_" + + "BOOLEAN\020\003\022\016\n\nDCT_STRING\020\004\022\014\n\010DCT_BLOB\020\007*" + + "&\n\020PrimaryKeyOption\022\022\n\016AUTO_INCREMENT\020\001*" + + ":\n\017IndexUpdateMode\022\023\n\017IUM_ASYNC_INDEX\020\000\022" + + "\022\n\016IUM_SYNC_INDEX\020\001*4\n\tIndexType\022\023\n\017IT_G" + + "LOBAL_INDEX\020\000\022\022\n\016IT_LOCAL_INDEX\020\001*M\n\027Row" + + "ExistenceExpectation\022\n\n\006IGNORE\020\000\022\020\n\014EXPE" + + "CT_EXIST\020\001\022\024\n\020EXPECT_NOT_EXIST\020\002*/\n\nSSEK", + "eyType\022\023\n\017SSE_KMS_SERVICE\020\001\022\014\n\010SSE_BYOK\020" + + "\002*9\n\nReturnType\022\013\n\007RT_NONE\020\000\022\t\n\005RT_PK\020\001\022" + + "\023\n\017RT_AFTER_MODIFY\020\002*0\n\rOperationType\022\007\n" + + "\003PUT\020\001\022\n\n\006UPDATE\020\002\022\n\n\006DELETE\020\003*&\n\tDirect" + + "ion\022\013\n\007FORWARD\020\000\022\014\n\010BACKWARD\020\001*6\n\014Stream" + + "Status\022\023\n\017STREAM_ENABLING\020\001\022\021\n\rSTREAM_AC" + + "TIVE\020\002*9\n\nActionType\022\013\n\007PUT_ROW\020\001\022\016\n\nUPD" + + "ATE_ROW\020\002\022\016\n\nDELETE_ROW\020\003*@\n\rDataBlockTy" + + "pe\022\024\n\020DBT_PLAIN_BUFFER\020\000\022\031\n\025DBT_SIMPLE_R" + + "OW_MATRIX\020\001*?\n\021SQLPayloadVersion\022\024\n\020SQL_", + "PLAIN_BUFFER\020\001\022\024\n\020SQL_FLAT_BUFFERS\020\002*\215\001\n" + + "\020SQLStatementType\022\016\n\nSQL_SELECT\020\001\022\024\n\020SQL" + + "_CREATE_TABLE\020\002\022\022\n\016SQL_SHOW_TABLE\020\003\022\026\n\022S" + + "QL_DESCRIBE_TABLE\020\004\022\022\n\016SQL_DROP_TABLE\020\005\022" + + "\023\n\017SQL_ALTER_TABLE\020\006" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -43927,8 +56252,16 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( new java.lang.String[] { "Name", "Type", "Option", }, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchema.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PrimaryKeySchema.Builder.class); - internal_static_com_alicloud_openservices_tablestore_core_protocol_DefinedColumnSchema_descriptor = + internal_static_com_alicloud_openservices_tablestore_core_protocol_PartitionRange_descriptor = getDescriptor().getMessageTypes().get(2); + internal_static_com_alicloud_openservices_tablestore_core_protocol_PartitionRange_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_PartitionRange_descriptor, + new java.lang.String[] { "Begin", "End", }, + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRange.class, + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PartitionRange.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_DefinedColumnSchema_descriptor = + getDescriptor().getMessageTypes().get(3); internal_static_com_alicloud_openservices_tablestore_core_protocol_DefinedColumnSchema_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_DefinedColumnSchema_descriptor, @@ -43936,15 +56269,15 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DefinedColumnSchema.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_TableOptions_descriptor = - getDescriptor().getMessageTypes().get(3); + getDescriptor().getMessageTypes().get(4); internal_static_com_alicloud_openservices_tablestore_core_protocol_TableOptions_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_TableOptions_descriptor, - new java.lang.String[] { "TimeToLive", "MaxVersions", "DeviationCellVersionInSec", }, + new java.lang.String[] { "TimeToLive", "MaxVersions", "DeviationCellVersionInSec", "AllowUpdate", }, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableOptions.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_IndexMeta_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageTypes().get(5); internal_static_com_alicloud_openservices_tablestore_core_protocol_IndexMeta_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_IndexMeta_descriptor, @@ -43952,7 +56285,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.IndexMeta.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_TableMeta_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageTypes().get(6); internal_static_com_alicloud_openservices_tablestore_core_protocol_TableMeta_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_TableMeta_descriptor, @@ -43960,7 +56293,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableMeta.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_Condition_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageTypes().get(7); internal_static_com_alicloud_openservices_tablestore_core_protocol_Condition_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_Condition_descriptor, @@ -43968,15 +56301,23 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Condition.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_CapacityUnit_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(8); internal_static_com_alicloud_openservices_tablestore_core_protocol_CapacityUnit_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_CapacityUnit_descriptor, new java.lang.String[] { "Read", "Write", }, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityUnit.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityUnit.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_CapacityDataSize_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_com_alicloud_openservices_tablestore_core_protocol_CapacityDataSize_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_CapacityDataSize_descriptor, + new java.lang.String[] { "ReadSize", "WriteSize", }, + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize.class, + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CapacityDataSize.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_ReservedThroughputDetails_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageTypes().get(10); internal_static_com_alicloud_openservices_tablestore_core_protocol_ReservedThroughputDetails_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_ReservedThroughputDetails_descriptor, @@ -43984,7 +56325,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughputDetails.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_ReservedThroughput_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(11); internal_static_com_alicloud_openservices_tablestore_core_protocol_ReservedThroughput_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_ReservedThroughput_descriptor, @@ -43992,15 +56333,15 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReservedThroughput.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_ConsumedCapacity_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(12); internal_static_com_alicloud_openservices_tablestore_core_protocol_ConsumedCapacity_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_ConsumedCapacity_descriptor, - new java.lang.String[] { "CapacityUnit", }, + new java.lang.String[] { "CapacityUnit", "CapacityDataSize", }, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ConsumedCapacity.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_StreamSpecification_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageTypes().get(13); internal_static_com_alicloud_openservices_tablestore_core_protocol_StreamSpecification_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_StreamSpecification_descriptor, @@ -44008,23 +56349,39 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamSpecification.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_StreamDetails_descriptor = - getDescriptor().getMessageTypes().get(12); + getDescriptor().getMessageTypes().get(14); internal_static_com_alicloud_openservices_tablestore_core_protocol_StreamDetails_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_StreamDetails_descriptor, new java.lang.String[] { "EnableStream", "StreamId", "ExpirationTime", "LastEnableTime", }, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamDetails.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_SSESpecification_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_com_alicloud_openservices_tablestore_core_protocol_SSESpecification_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_SSESpecification_descriptor, + new java.lang.String[] { "Enable", "KeyType", "KeyId", "RoleArn", }, + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification.class, + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSESpecification.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_SSEDetails_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_com_alicloud_openservices_tablestore_core_protocol_SSEDetails_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_SSEDetails_descriptor, + new java.lang.String[] { "Enable", "KeyType", "KeyId", "RoleArn", }, + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails.class, + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SSEDetails.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateTableRequest_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageTypes().get(17); internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateTableRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateTableRequest_descriptor, - new java.lang.String[] { "TableMeta", "ReservedThroughput", "TableOptions", "StreamSpec", "IndexMetas", }, + new java.lang.String[] { "TableMeta", "ReservedThroughput", "TableOptions", "Partitions", "StreamSpec", "SseSpec", "IndexMetas", "EnableLocalTxn", }, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableRequest.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateTableResponse_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageTypes().get(18); internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateTableResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateTableResponse_descriptor, @@ -44032,7 +56389,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateTableResponse.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateIndexRequest_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(19); internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateIndexRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateIndexRequest_descriptor, @@ -44040,7 +56397,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexRequest.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateIndexResponse_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(20); internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateIndexResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateIndexResponse_descriptor, @@ -44048,7 +56405,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CreateIndexResponse.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_DropIndexRequest_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageTypes().get(21); internal_static_com_alicloud_openservices_tablestore_core_protocol_DropIndexRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_DropIndexRequest_descriptor, @@ -44056,15 +56413,47 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexRequest.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_DropIndexResponse_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageTypes().get(22); internal_static_com_alicloud_openservices_tablestore_core_protocol_DropIndexResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_DropIndexResponse_descriptor, new java.lang.String[] { }, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DropIndexResponse.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_AddDefinedColumnRequest_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_com_alicloud_openservices_tablestore_core_protocol_AddDefinedColumnRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_AddDefinedColumnRequest_descriptor, + new java.lang.String[] { "TableName", "Columns", }, + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnRequest.class, + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnRequest.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_AddDefinedColumnResponse_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_com_alicloud_openservices_tablestore_core_protocol_AddDefinedColumnResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_AddDefinedColumnResponse_descriptor, + new java.lang.String[] { }, + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnResponse.class, + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AddDefinedColumnResponse.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteDefinedColumnRequest_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteDefinedColumnRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteDefinedColumnRequest_descriptor, + new java.lang.String[] { "TableName", "Columns", }, + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnRequest.class, + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnRequest.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteDefinedColumnResponse_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteDefinedColumnResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteDefinedColumnResponse_descriptor, + new java.lang.String[] { }, + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnResponse.class, + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteDefinedColumnResponse.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateTableRequest_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageTypes().get(27); internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateTableRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateTableRequest_descriptor, @@ -44072,7 +56461,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableRequest.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateTableResponse_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageTypes().get(28); internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateTableResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateTableResponse_descriptor, @@ -44080,7 +56469,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateTableResponse.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeTableRequest_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageTypes().get(29); internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeTableRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeTableRequest_descriptor, @@ -44088,15 +56477,15 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableRequest.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeTableResponse_descriptor = - getDescriptor().getMessageTypes().get(22); + getDescriptor().getMessageTypes().get(30); internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeTableResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeTableResponse_descriptor, - new java.lang.String[] { "TableMeta", "ReservedThroughputDetails", "TableOptions", "StreamDetails", "ShardSplits", "IndexMetas", }, + new java.lang.String[] { "TableMeta", "ReservedThroughputDetails", "TableOptions", "StreamDetails", "ShardSplits", "SseDetails", "IndexMetas", "CreationTime", }, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeTableResponse.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_ListTableRequest_descriptor = - getDescriptor().getMessageTypes().get(23); + getDescriptor().getMessageTypes().get(31); internal_static_com_alicloud_openservices_tablestore_core_protocol_ListTableRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_ListTableRequest_descriptor, @@ -44104,7 +56493,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableRequest.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_ListTableResponse_descriptor = - getDescriptor().getMessageTypes().get(24); + getDescriptor().getMessageTypes().get(32); internal_static_com_alicloud_openservices_tablestore_core_protocol_ListTableResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_ListTableResponse_descriptor, @@ -44112,7 +56501,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListTableResponse.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteTableRequest_descriptor = - getDescriptor().getMessageTypes().get(25); + getDescriptor().getMessageTypes().get(33); internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteTableRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteTableRequest_descriptor, @@ -44120,7 +56509,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableRequest.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteTableResponse_descriptor = - getDescriptor().getMessageTypes().get(26); + getDescriptor().getMessageTypes().get(34); internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteTableResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteTableResponse_descriptor, @@ -44128,7 +56517,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteTableResponse.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_LoadTableRequest_descriptor = - getDescriptor().getMessageTypes().get(27); + getDescriptor().getMessageTypes().get(35); internal_static_com_alicloud_openservices_tablestore_core_protocol_LoadTableRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_LoadTableRequest_descriptor, @@ -44136,7 +56525,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableRequest.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_LoadTableResponse_descriptor = - getDescriptor().getMessageTypes().get(28); + getDescriptor().getMessageTypes().get(36); internal_static_com_alicloud_openservices_tablestore_core_protocol_LoadTableResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_LoadTableResponse_descriptor, @@ -44144,7 +56533,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.LoadTableResponse.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_UnloadTableRequest_descriptor = - getDescriptor().getMessageTypes().get(29); + getDescriptor().getMessageTypes().get(37); internal_static_com_alicloud_openservices_tablestore_core_protocol_UnloadTableRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_UnloadTableRequest_descriptor, @@ -44152,7 +56541,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableRequest.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_UnloadTableResponse_descriptor = - getDescriptor().getMessageTypes().get(30); + getDescriptor().getMessageTypes().get(38); internal_static_com_alicloud_openservices_tablestore_core_protocol_UnloadTableResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_UnloadTableResponse_descriptor, @@ -44160,7 +56549,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UnloadTableResponse.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_TimeRange_descriptor = - getDescriptor().getMessageTypes().get(31); + getDescriptor().getMessageTypes().get(39); internal_static_com_alicloud_openservices_tablestore_core_protocol_TimeRange_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_TimeRange_descriptor, @@ -44168,7 +56557,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TimeRange.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_ReturnContent_descriptor = - getDescriptor().getMessageTypes().get(32); + getDescriptor().getMessageTypes().get(40); internal_static_com_alicloud_openservices_tablestore_core_protocol_ReturnContent_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_ReturnContent_descriptor, @@ -44176,7 +56565,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ReturnContent.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_GetRowRequest_descriptor = - getDescriptor().getMessageTypes().get(33); + getDescriptor().getMessageTypes().get(41); internal_static_com_alicloud_openservices_tablestore_core_protocol_GetRowRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_GetRowRequest_descriptor, @@ -44184,7 +56573,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowRequest.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_GetRowResponse_descriptor = - getDescriptor().getMessageTypes().get(34); + getDescriptor().getMessageTypes().get(42); internal_static_com_alicloud_openservices_tablestore_core_protocol_GetRowResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_GetRowResponse_descriptor, @@ -44192,7 +56581,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRowResponse.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateRowRequest_descriptor = - getDescriptor().getMessageTypes().get(35); + getDescriptor().getMessageTypes().get(43); internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateRowRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateRowRequest_descriptor, @@ -44200,7 +56589,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowRequest.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateRowResponse_descriptor = - getDescriptor().getMessageTypes().get(36); + getDescriptor().getMessageTypes().get(44); internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateRowResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateRowResponse_descriptor, @@ -44208,7 +56597,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.UpdateRowResponse.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_PutRowRequest_descriptor = - getDescriptor().getMessageTypes().get(37); + getDescriptor().getMessageTypes().get(45); internal_static_com_alicloud_openservices_tablestore_core_protocol_PutRowRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_PutRowRequest_descriptor, @@ -44216,7 +56605,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowRequest.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_PutRowResponse_descriptor = - getDescriptor().getMessageTypes().get(38); + getDescriptor().getMessageTypes().get(46); internal_static_com_alicloud_openservices_tablestore_core_protocol_PutRowResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_PutRowResponse_descriptor, @@ -44224,7 +56613,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.PutRowResponse.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteRowRequest_descriptor = - getDescriptor().getMessageTypes().get(39); + getDescriptor().getMessageTypes().get(47); internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteRowRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteRowRequest_descriptor, @@ -44232,7 +56621,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowRequest.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteRowResponse_descriptor = - getDescriptor().getMessageTypes().get(40); + getDescriptor().getMessageTypes().get(48); internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteRowResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteRowResponse_descriptor, @@ -44240,7 +56629,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DeleteRowResponse.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_TableInBatchGetRowRequest_descriptor = - getDescriptor().getMessageTypes().get(41); + getDescriptor().getMessageTypes().get(49); internal_static_com_alicloud_openservices_tablestore_core_protocol_TableInBatchGetRowRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_TableInBatchGetRowRequest_descriptor, @@ -44248,7 +56637,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowRequest.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_BatchGetRowRequest_descriptor = - getDescriptor().getMessageTypes().get(42); + getDescriptor().getMessageTypes().get(50); internal_static_com_alicloud_openservices_tablestore_core_protocol_BatchGetRowRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_BatchGetRowRequest_descriptor, @@ -44256,7 +56645,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowRequest.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBatchGetRowResponse_descriptor = - getDescriptor().getMessageTypes().get(43); + getDescriptor().getMessageTypes().get(51); internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBatchGetRowResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBatchGetRowResponse_descriptor, @@ -44264,7 +56653,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchGetRowResponse.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_TableInBatchGetRowResponse_descriptor = - getDescriptor().getMessageTypes().get(44); + getDescriptor().getMessageTypes().get(52); internal_static_com_alicloud_openservices_tablestore_core_protocol_TableInBatchGetRowResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_TableInBatchGetRowResponse_descriptor, @@ -44272,7 +56661,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchGetRowResponse.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_BatchGetRowResponse_descriptor = - getDescriptor().getMessageTypes().get(45); + getDescriptor().getMessageTypes().get(53); internal_static_com_alicloud_openservices_tablestore_core_protocol_BatchGetRowResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_BatchGetRowResponse_descriptor, @@ -44280,7 +56669,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchGetRowResponse.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBatchWriteRowRequest_descriptor = - getDescriptor().getMessageTypes().get(46); + getDescriptor().getMessageTypes().get(54); internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBatchWriteRowRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBatchWriteRowRequest_descriptor, @@ -44288,7 +56677,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowRequest.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_TableInBatchWriteRowRequest_descriptor = - getDescriptor().getMessageTypes().get(47); + getDescriptor().getMessageTypes().get(55); internal_static_com_alicloud_openservices_tablestore_core_protocol_TableInBatchWriteRowRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_TableInBatchWriteRowRequest_descriptor, @@ -44296,15 +56685,15 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowRequest.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_BatchWriteRowRequest_descriptor = - getDescriptor().getMessageTypes().get(48); + getDescriptor().getMessageTypes().get(56); internal_static_com_alicloud_openservices_tablestore_core_protocol_BatchWriteRowRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_BatchWriteRowRequest_descriptor, - new java.lang.String[] { "Tables", "TransactionId", }, + new java.lang.String[] { "Tables", "TransactionId", "IsAtomic", }, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowRequest.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBatchWriteRowResponse_descriptor = - getDescriptor().getMessageTypes().get(49); + getDescriptor().getMessageTypes().get(57); internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBatchWriteRowResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBatchWriteRowResponse_descriptor, @@ -44312,7 +56701,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBatchWriteRowResponse.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_TableInBatchWriteRowResponse_descriptor = - getDescriptor().getMessageTypes().get(50); + getDescriptor().getMessageTypes().get(58); internal_static_com_alicloud_openservices_tablestore_core_protocol_TableInBatchWriteRowResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_TableInBatchWriteRowResponse_descriptor, @@ -44320,7 +56709,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableInBatchWriteRowResponse.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_BatchWriteRowResponse_descriptor = - getDescriptor().getMessageTypes().get(51); + getDescriptor().getMessageTypes().get(59); internal_static_com_alicloud_openservices_tablestore_core_protocol_BatchWriteRowResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_BatchWriteRowResponse_descriptor, @@ -44328,7 +56717,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BatchWriteRowResponse.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_GetRangeRequest_descriptor = - getDescriptor().getMessageTypes().get(52); + getDescriptor().getMessageTypes().get(60); internal_static_com_alicloud_openservices_tablestore_core_protocol_GetRangeRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_GetRangeRequest_descriptor, @@ -44336,7 +56725,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeRequest.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_GetRangeResponse_descriptor = - getDescriptor().getMessageTypes().get(53); + getDescriptor().getMessageTypes().get(61); internal_static_com_alicloud_openservices_tablestore_core_protocol_GetRangeResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_GetRangeResponse_descriptor, @@ -44344,7 +56733,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetRangeResponse.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_StartLocalTransactionRequest_descriptor = - getDescriptor().getMessageTypes().get(54); + getDescriptor().getMessageTypes().get(62); internal_static_com_alicloud_openservices_tablestore_core_protocol_StartLocalTransactionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_StartLocalTransactionRequest_descriptor, @@ -44352,7 +56741,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionRequest.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_StartLocalTransactionResponse_descriptor = - getDescriptor().getMessageTypes().get(55); + getDescriptor().getMessageTypes().get(63); internal_static_com_alicloud_openservices_tablestore_core_protocol_StartLocalTransactionResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_StartLocalTransactionResponse_descriptor, @@ -44360,7 +56749,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StartLocalTransactionResponse.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_CommitTransactionRequest_descriptor = - getDescriptor().getMessageTypes().get(56); + getDescriptor().getMessageTypes().get(64); internal_static_com_alicloud_openservices_tablestore_core_protocol_CommitTransactionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_CommitTransactionRequest_descriptor, @@ -44368,7 +56757,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionRequest.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_CommitTransactionResponse_descriptor = - getDescriptor().getMessageTypes().get(57); + getDescriptor().getMessageTypes().get(65); internal_static_com_alicloud_openservices_tablestore_core_protocol_CommitTransactionResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_CommitTransactionResponse_descriptor, @@ -44376,7 +56765,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.CommitTransactionResponse.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_AbortTransactionRequest_descriptor = - getDescriptor().getMessageTypes().get(58); + getDescriptor().getMessageTypes().get(66); internal_static_com_alicloud_openservices_tablestore_core_protocol_AbortTransactionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_AbortTransactionRequest_descriptor, @@ -44384,7 +56773,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionRequest.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_AbortTransactionResponse_descriptor = - getDescriptor().getMessageTypes().get(59); + getDescriptor().getMessageTypes().get(67); internal_static_com_alicloud_openservices_tablestore_core_protocol_AbortTransactionResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_AbortTransactionResponse_descriptor, @@ -44392,7 +56781,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.AbortTransactionResponse.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_ListStreamRequest_descriptor = - getDescriptor().getMessageTypes().get(60); + getDescriptor().getMessageTypes().get(68); internal_static_com_alicloud_openservices_tablestore_core_protocol_ListStreamRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_ListStreamRequest_descriptor, @@ -44400,7 +56789,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamRequest.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_Stream_descriptor = - getDescriptor().getMessageTypes().get(61); + getDescriptor().getMessageTypes().get(69); internal_static_com_alicloud_openservices_tablestore_core_protocol_Stream_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_Stream_descriptor, @@ -44408,7 +56797,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.Stream.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_ListStreamResponse_descriptor = - getDescriptor().getMessageTypes().get(62); + getDescriptor().getMessageTypes().get(70); internal_static_com_alicloud_openservices_tablestore_core_protocol_ListStreamResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_ListStreamResponse_descriptor, @@ -44416,7 +56805,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ListStreamResponse.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_StreamShard_descriptor = - getDescriptor().getMessageTypes().get(63); + getDescriptor().getMessageTypes().get(71); internal_static_com_alicloud_openservices_tablestore_core_protocol_StreamShard_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_StreamShard_descriptor, @@ -44424,7 +56813,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.StreamShard.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeStreamRequest_descriptor = - getDescriptor().getMessageTypes().get(64); + getDescriptor().getMessageTypes().get(72); internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeStreamRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeStreamRequest_descriptor, @@ -44432,7 +56821,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamRequest.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeStreamResponse_descriptor = - getDescriptor().getMessageTypes().get(65); + getDescriptor().getMessageTypes().get(73); internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeStreamResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeStreamResponse_descriptor, @@ -44440,23 +56829,23 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.DescribeStreamResponse.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_GetShardIteratorRequest_descriptor = - getDescriptor().getMessageTypes().get(66); + getDescriptor().getMessageTypes().get(74); internal_static_com_alicloud_openservices_tablestore_core_protocol_GetShardIteratorRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_GetShardIteratorRequest_descriptor, - new java.lang.String[] { "StreamId", "ShardId", }, + new java.lang.String[] { "StreamId", "ShardId", "Timestamp", "Token", }, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorRequest.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_GetShardIteratorResponse_descriptor = - getDescriptor().getMessageTypes().get(67); + getDescriptor().getMessageTypes().get(75); internal_static_com_alicloud_openservices_tablestore_core_protocol_GetShardIteratorResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_GetShardIteratorResponse_descriptor, - new java.lang.String[] { "ShardIterator", }, + new java.lang.String[] { "ShardIterator", "NextToken", }, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetShardIteratorResponse.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_GetStreamRecordRequest_descriptor = - getDescriptor().getMessageTypes().get(68); + getDescriptor().getMessageTypes().get(76); internal_static_com_alicloud_openservices_tablestore_core_protocol_GetStreamRecordRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_GetStreamRecordRequest_descriptor, @@ -44464,7 +56853,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordRequest.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_GetStreamRecordResponse_descriptor = - getDescriptor().getMessageTypes().get(69); + getDescriptor().getMessageTypes().get(77); internal_static_com_alicloud_openservices_tablestore_core_protocol_GetStreamRecordResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_GetStreamRecordResponse_descriptor, @@ -44480,15 +56869,15 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.GetStreamRecordResponse.StreamRecord.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_ComputeSplitPointsBySizeRequest_descriptor = - getDescriptor().getMessageTypes().get(70); + getDescriptor().getMessageTypes().get(78); internal_static_com_alicloud_openservices_tablestore_core_protocol_ComputeSplitPointsBySizeRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_ComputeSplitPointsBySizeRequest_descriptor, - new java.lang.String[] { "TableName", "SplitSize", "SplitSizeUnitInByte", }, + new java.lang.String[] { "TableName", "SplitSize", "SplitSizeUnitInByte", "SplitPointLimit", }, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeRequest.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_ComputeSplitPointsBySizeResponse_descriptor = - getDescriptor().getMessageTypes().get(71); + getDescriptor().getMessageTypes().get(79); internal_static_com_alicloud_openservices_tablestore_core_protocol_ComputeSplitPointsBySizeResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_ComputeSplitPointsBySizeResponse_descriptor, @@ -44503,6 +56892,102 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( new java.lang.String[] { "Location", "Repeat", }, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation.class, com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_BulkExportRequest_descriptor = + getDescriptor().getMessageTypes().get(80); + internal_static_com_alicloud_openservices_tablestore_core_protocol_BulkExportRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_BulkExportRequest_descriptor, + new java.lang.String[] { "TableName", "ColumnsToGet", "InclusiveStartPrimaryKey", "ExclusiveEndPrimaryKey", "Filter", "DataBlockTypeHint", }, + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportRequest.class, + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportRequest.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_BulkExportResponse_descriptor = + getDescriptor().getMessageTypes().get(81); + internal_static_com_alicloud_openservices_tablestore_core_protocol_BulkExportResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_BulkExportResponse_descriptor, + new java.lang.String[] { "Consumed", "Rows", "NextStartPrimaryKey", "DataBlockType", }, + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportResponse.class, + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkExportResponse.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_BulkImportRequest_descriptor = + getDescriptor().getMessageTypes().get(82); + internal_static_com_alicloud_openservices_tablestore_core_protocol_BulkImportRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_BulkImportRequest_descriptor, + new java.lang.String[] { "TableName", "Rows", }, + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportRequest.class, + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportRequest.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBulkImportRequest_descriptor = + getDescriptor().getMessageTypes().get(83); + internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBulkImportRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBulkImportRequest_descriptor, + new java.lang.String[] { "Type", "RowChange", }, + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequest.class, + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportRequest.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_BulkImportResponse_descriptor = + getDescriptor().getMessageTypes().get(84); + internal_static_com_alicloud_openservices_tablestore_core_protocol_BulkImportResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_BulkImportResponse_descriptor, + new java.lang.String[] { "TableName", "Rows", }, + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportResponse.class, + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.BulkImportResponse.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBulkImportResponse_descriptor = + getDescriptor().getMessageTypes().get(85); + internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBulkImportResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_RowInBulkImportResponse_descriptor, + new java.lang.String[] { "IsOk", "Error", "Consumed", }, + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponse.class, + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.RowInBulkImportResponse.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_ComputeSplitsRequest_descriptor = + getDescriptor().getMessageTypes().get(86); + internal_static_com_alicloud_openservices_tablestore_core_protocol_ComputeSplitsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_ComputeSplitsRequest_descriptor, + new java.lang.String[] { "TableName", "SearchIndexSplitsOptions", }, + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsRequest.class, + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsRequest.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_SearchIndexSplitsOptions_descriptor = + getDescriptor().getMessageTypes().get(87); + internal_static_com_alicloud_openservices_tablestore_core_protocol_SearchIndexSplitsOptions_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_SearchIndexSplitsOptions_descriptor, + new java.lang.String[] { "IndexName", }, + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions.class, + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SearchIndexSplitsOptions.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_ComputeSplitsResponse_descriptor = + getDescriptor().getMessageTypes().get(88); + internal_static_com_alicloud_openservices_tablestore_core_protocol_ComputeSplitsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_ComputeSplitsResponse_descriptor, + new java.lang.String[] { "SessionId", "SplitsSize", }, + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsResponse.class, + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitsResponse.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_SQLQueryRequest_descriptor = + getDescriptor().getMessageTypes().get(89); + internal_static_com_alicloud_openservices_tablestore_core_protocol_SQLQueryRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_SQLQueryRequest_descriptor, + new java.lang.String[] { "Query", "Version", }, + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryRequest.class, + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryRequest.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_TableConsumedCapacity_descriptor = + getDescriptor().getMessageTypes().get(90); + internal_static_com_alicloud_openservices_tablestore_core_protocol_TableConsumedCapacity_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_TableConsumedCapacity_descriptor, + new java.lang.String[] { "TableName", "Consumed", "ReservedThroughput", }, + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacity.class, + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.TableConsumedCapacity.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_SQLQueryResponse_descriptor = + getDescriptor().getMessageTypes().get(91); + internal_static_com_alicloud_openservices_tablestore_core_protocol_SQLQueryResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_SQLQueryResponse_descriptor, + new java.lang.String[] { "Consumes", "Rows", "Version", "Type", }, + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryResponse.class, + com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.SQLQueryResponse.Builder.class); return null; } }; diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/PlainBufferCodedInputStream.java b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/PlainBufferCodedInputStream.java index 8a99d80..fc9d12c 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/PlainBufferCodedInputStream.java +++ b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/PlainBufferCodedInputStream.java @@ -167,16 +167,21 @@ public PlainBufferExtension readExtension() throws IOException { return extension; } - public PlainBufferRow readRow() throws IOException { + return readRow(true); + } + + public PlainBufferRow readRow(Boolean shouldContainsPk) throws IOException { List columns = new ArrayList(); List primaryKey = new ArrayList(); boolean hasDeleteMarker = false; if (checkLastTagWas(TAG_ROW_PK)) { primaryKey = readRowPK(); - if (primaryKey.isEmpty()) { - throw new IOException("The primary key of row is empty."); + if (shouldContainsPk) { + if (primaryKey.isEmpty()) { + throw new IOException("The primary key of row is empty."); + } } } @@ -255,4 +260,24 @@ public List readRowsWithHeader() throws IOException { return rows; } + + public List readRowsWithoutPk() throws IOException { + List rows = new ArrayList(); + if (readHeader() != PlainBufferConsts.HEADER) { + logger.error("Invalid header from plain buffer: " + input.toString()); + throw new IOException("Invalid header from plain buffer."); + } + + readTag(); + while (!input.isAtEnd()) { + PlainBufferRow row = readRow(false); + rows.add(row); + } + + if (!input.isAtEnd()) { + throw new IOException(""); + } + + return rows; + } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/PlainBufferConversion.java b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/PlainBufferConversion.java index 1dd6e17..3cf8ddf 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/PlainBufferConversion.java +++ b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/PlainBufferConversion.java @@ -9,6 +9,10 @@ public class PlainBufferConversion { public static Row toRow(PlainBufferRow plainBufferRow) throws IOException { + return toRow(plainBufferRow, true); + } + + public static Row toRow(PlainBufferRow plainBufferRow, boolean needSortColumns) throws IOException { if (plainBufferRow.hasDeleteMarker()) { throw new IOException("Row could not has delete marker: " + plainBufferRow); } @@ -23,7 +27,7 @@ public static Row toRow(PlainBufferRow plainBufferRow) throws IOException { columns.add(toColumn(cell)); } - return new Row(toPrimaryKey(plainBufferRow.getPrimaryKey()), columns); + return new Row(toPrimaryKey(plainBufferRow.getPrimaryKey()), columns, needSortColumns); } public static Column toColumn(PlainBufferCell cell) throws IOException { diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/ProtocolBufferParser.java b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/ProtocolBufferParser.java index 8b76eda..088cdd3 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/ProtocolBufferParser.java +++ b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/ProtocolBufferParser.java @@ -2,6 +2,7 @@ import java.util.Map; +import com.google.protobuf.CodedInputStream; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.google.protobuf.Message; @@ -12,12 +13,11 @@ import com.alicloud.openservices.tablestore.core.Constants; import com.alicloud.openservices.tablestore.core.ResponseContentWithMeta; import com.alicloud.openservices.tablestore.core.http.ResponseMessage; -import com.alicloud.openservices.tablestore.core.protocol.ResultParseException; -import com.alicloud.openservices.tablestore.core.protocol.ResultParser; public class ProtocolBufferParser implements ResultParser { private static Logger logger = LoggerFactory.getLogger(ProtocolBufferParser.class); + private static int pbSizeLimit = 1024 * 1024 * 1024; // 1GB private Message message; @@ -32,7 +32,7 @@ public ProtocolBufferParser(Message message, String traceId) { public Object getObject(ResponseMessage response) throws ResultParseException { - Map headers = response.getHeadersMap(); + Map headers = response.getLowerCaseHeadersMap(); String requestId = headers.get(Constants.OTS_HEADER_REQUEST_ID); if (requestId == null){ @@ -40,7 +40,11 @@ public Object getObject(ResponseMessage response) } try { - Message result = message.newBuilderForType().mergeFrom(response.getContent()).buildPartial(); + CodedInputStream codedInputStream = CodedInputStream.newInstance(response.getContent()); + codedInputStream.setSizeLimit(pbSizeLimit); + Message.Builder resultBuilder = message.newBuilderForType().mergeFrom(codedInputStream); + codedInputStream.checkLastTagWas(0); + Message result = resultBuilder.buildPartial(); if (!result.isInitialized()) { throw new UninitializedMessageException( result).asInvalidProtocolBufferException(); diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/ResponseFactory.java b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/ResponseFactory.java index 1a151f2..09349f6 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/ResponseFactory.java +++ b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/ResponseFactory.java @@ -1,26 +1,28 @@ package com.alicloud.openservices.tablestore.core.protocol; import java.io.IOException; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; +import java.nio.ByteBuffer; +import java.util.*; import com.alicloud.openservices.tablestore.ClientException; import com.alicloud.openservices.tablestore.core.ResponseContentWithMeta; import com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi.ComputeSplitPointsBySizeResponse.SplitLocation; +import com.alicloud.openservices.tablestore.core.protocol.sql.flatbuffers.SQLResponseColumns; import com.alicloud.openservices.tablestore.model.*; +import com.alicloud.openservices.tablestore.model.delivery.*; +import com.alicloud.openservices.tablestore.model.search.CreateSearchIndexResponse; +import com.alicloud.openservices.tablestore.model.search.DeleteSearchIndexResponse; +import com.alicloud.openservices.tablestore.model.search.DescribeSearchIndexResponse; +import com.alicloud.openservices.tablestore.model.search.ListSearchIndexResponse; +import com.alicloud.openservices.tablestore.model.search.ParallelScanResponse; +import com.alicloud.openservices.tablestore.model.search.SearchIndexInfo; +import com.alicloud.openservices.tablestore.model.search.SearchResponse; import com.alicloud.openservices.tablestore.model.Split; import com.alicloud.openservices.tablestore.model.search.*; -import com.alicloud.openservices.tablestore.model.tunnel.ChannelInfo; -import com.alicloud.openservices.tablestore.model.tunnel.ChannelStatus; -import com.alicloud.openservices.tablestore.model.tunnel.ChannelType; -import com.alicloud.openservices.tablestore.model.tunnel.CreateTunnelResponse; -import com.alicloud.openservices.tablestore.model.tunnel.DeleteTunnelResponse; -import com.alicloud.openservices.tablestore.model.tunnel.DescribeTunnelResponse; -import com.alicloud.openservices.tablestore.model.tunnel.ListTunnelResponse; -import com.alicloud.openservices.tablestore.model.tunnel.TunnelInfo; -import com.alicloud.openservices.tablestore.model.tunnel.TunnelStage; -import com.alicloud.openservices.tablestore.model.tunnel.TunnelType; +import com.alicloud.openservices.tablestore.model.sql.SQLPayloadVersion; +import com.alicloud.openservices.tablestore.model.sql.SQLQueryResponse; +import com.alicloud.openservices.tablestore.model.sql.SQLStatementType; +import com.alicloud.openservices.tablestore.model.tunnel.*; import com.alicloud.openservices.tablestore.model.tunnel.internal.Channel; import com.alicloud.openservices.tablestore.model.tunnel.internal.CheckpointResponse; import com.alicloud.openservices.tablestore.model.tunnel.internal.ConnectTunnelResponse; @@ -30,34 +32,40 @@ import com.alicloud.openservices.tablestore.model.tunnel.internal.ShutdownTunnelResponse; import com.google.protobuf.ByteString; +import static com.alicloud.openservices.tablestore.core.protocol.SearchAggregationResultBuilder.buildAggregationResultsFromByteString; +import static com.alicloud.openservices.tablestore.core.protocol.SearchGroupByResultBuilder.buildGroupByResultsFromByteString; +import static com.alicloud.openservices.tablestore.core.protocol.TunnelProtocolBuilder.MILLIS_TO_NANO; + public class ResponseFactory { public static CreateTableResponse createCreateTableResponse(ResponseContentWithMeta response, - OtsInternalApi.CreateTableResponse - createTableResponse) { + OtsInternalApi.CreateTableResponse createTableResponse) { return new CreateTableResponse(response.getMeta()); } public static ListTableResponse createListTableResponse(ResponseContentWithMeta response, - OtsInternalApi.ListTableResponse listTableResponse) { + OtsInternalApi.ListTableResponse listTableResponse) { ListTableResponse result = new ListTableResponse(response.getMeta()); result.setTableNames(listTableResponse.getTableNamesList()); return result; } public static DescribeTableResponse createDescribeTableResponse(ResponseContentWithMeta response, - OtsInternalApi.DescribeTableResponse - describeTableResponse) { + OtsInternalApi.DescribeTableResponse describeTableResponse) { try { DescribeTableResponse result = new DescribeTableResponse(response.getMeta()); result.setTableMeta(OTSProtocolParser.parseTableMeta(describeTableResponse.getTableMeta())); result.setTableOptions(OTSProtocolParser.parseTableOptions(describeTableResponse.getTableOptions())); result.setReservedThroughputDetails(OTSProtocolParser - .parseReservedThroughputDetails(describeTableResponse.getReservedThroughputDetails())); + .parseReservedThroughputDetails(describeTableResponse.getReservedThroughputDetails())); if (describeTableResponse.hasStreamDetails()) { result.setStreamDetails(OTSProtocolParser.parseStreamDetails(describeTableResponse.getStreamDetails())); } + if (describeTableResponse.hasSseDetails()) { + result.setSseDetails(OTSProtocolParser.parseSseDetails(describeTableResponse.getSseDetails())); + } + List shards = new ArrayList(); for (int i = 0; i < describeTableResponse.getShardSplitsCount(); ++i) { com.google.protobuf.ByteString bytes = describeTableResponse.getShardSplits(i); @@ -74,6 +82,9 @@ public static DescribeTableResponse createDescribeTableResponse(ResponseContentW for (int i = 0; i < describeTableResponse.getIndexMetasCount(); ++i) { result.addIndexMeta(OTSProtocolParser.parseIndexMeta(describeTableResponse.getIndexMetas(i))); } + if (describeTableResponse.hasCreationTime()) { + result.setCreationTime(describeTableResponse.getCreationTime()); + } return result; } catch (Exception e) { throw new ClientException("Failed to parse describe table response.", e); @@ -81,8 +92,7 @@ public static DescribeTableResponse createDescribeTableResponse(ResponseContentW } public static DeleteTableResponse createDeleteTableResponse(ResponseContentWithMeta response, - OtsInternalApi.DeleteTableResponse - deleteTableResponse) { + OtsInternalApi.DeleteTableResponse deleteTableResponse) { return new DeleteTableResponse(response.getMeta()); } @@ -92,19 +102,147 @@ public static CreateIndexResponse createCreteIndexResponse( return new CreateIndexResponse(response.getMeta()); } + public static CreateDeliveryTaskResponse createDeliveryTaskResponse( + ResponseContentWithMeta response, + OtsDelivery.CreateDeliveryTaskResponse createDeliveryTaskResponse) { + return new CreateDeliveryTaskResponse(response.getMeta()); + } + + public static DeleteDeliveryTaskResponse deleteDeliveryTaskResponse( + ResponseContentWithMeta response, + OtsDelivery.DeleteDeliveryTaskResponse DeleteDeliveryTaskResponse) { + return new DeleteDeliveryTaskResponse(response.getMeta()); + } + + public static DescribeDeliveryTaskResponse describeDeliveryTaskResponse( + ResponseContentWithMeta response, + OtsDelivery.DescribeDeliveryTaskResponse describeDeliveryTaskResponse) { + DescribeDeliveryTaskResponse resp = new DescribeDeliveryTaskResponse(response.getMeta()); + resp.setTaskConfig(createTaskConfig(describeDeliveryTaskResponse.getTaskConfig())); + resp.setTaskSyncStat(createTaskSyncStat(describeDeliveryTaskResponse.getTaskSyncStat())); + resp.setTaskType(createTaskType(describeDeliveryTaskResponse.getTaskType())); + return resp; + } + + public static DeliveryTaskType createTaskType(OtsDelivery.DeliveryTaskType taskType) { + return DeliveryTaskType.valueOf(taskType.toString()); + } + + public static TaskSyncStat createTaskSyncStat(OtsDelivery.TaskSyncStat taskSyncStat) { + TaskSyncStat actualSyncStat = new TaskSyncStat(); + actualSyncStat.setTaskSyncPhase(createTaskSycnPhase(taskSyncStat.getTaskSyncPhase())); + long rpoMillis = taskSyncStat.getCurrentSyncTimestamp() / MILLIS_TO_NANO; + actualSyncStat.setCurrentSyncPoint(new Date(rpoMillis)); + actualSyncStat.setErrorType(createErrorType(taskSyncStat.getErrorCode())); + actualSyncStat.setDetail(taskSyncStat.getDetail()); + return actualSyncStat; + } + + public static TaskSyncPhase createTaskSycnPhase(OtsDelivery.TaskSyncStat.TaskSyncPhase taskSyncPhase) { + return TaskSyncPhase.valueOf(taskSyncPhase.toString()); + } + + public static DeliveryErrorType createErrorType(OtsDelivery.ErrorType errorType) { + return DeliveryErrorType.valueOf(errorType.toString()); + } + + public static OSSTaskConfig createTaskConfig(OtsDelivery.OSSTaskConfig taskConfig) { + OSSTaskConfig actualConfig = new OSSTaskConfig(); + actualConfig.setOssPrefix(taskConfig.getOssPrefix()); + actualConfig.setTimeFormatter(createTimeFormatter(taskConfig.getFormatter())); + actualConfig.setOssBucket(taskConfig.getOssBucket()); + actualConfig.setOssEndpoint(taskConfig.getOssEndpoint()); + actualConfig.setOssStsRole(taskConfig.getOssStsRole()); + if (taskConfig.getEventTimeColumn().hasColumnName() && taskConfig.getEventTimeColumn().hasTimeFormat()) { + actualConfig.setEventTimeColumn(createEventTimeColumn(taskConfig.getEventTimeColumn())); + } + actualConfig.setFormat(createFormat(taskConfig.getFormat())); + for(OtsDelivery.ParquetSchema parquetSchema: taskConfig.getSchemaList()) { + ParquetSchema actualSchema = new ParquetSchema(); + actualSchema.setColumnName(parquetSchema.getColumnName()); + actualSchema.setOssColumnName(parquetSchema.getOssColumnName()); + actualSchema.setType(createDataType(parquetSchema.getType())); + actualSchema.setEncode(createEncoding(parquetSchema.getEncode())); + if (actualSchema.getTypeExtend() != null) { + actualSchema.setTypeExtend(parquetSchema.getTypeExtend()); + } + actualConfig.addParquetSchema(actualSchema); + } + + return actualConfig; + } + + public static DataType createDataType(OtsDelivery.ParquetSchema.DataType dataType) { + return DataType.valueOf(dataType.toString()); + } + + public static OSSFileEncoding createEncoding(OtsDelivery.Encoding encoding) { + return OSSFileEncoding.valueOf(encoding.toString()); + } + + public static EventColumn createEventTimeColumn(OtsDelivery.EventColumn eventColumn) { + EventColumn actualEvent = new EventColumn(eventColumn.getColumnName(), createTimeFormat(eventColumn.getTimeFormat())); + return actualEvent; + } + + public static EventTimeFormat createTimeFormat(OtsDelivery.EventColumn.eventTimeFormat eventTimeFormat) { + return EventTimeFormat.valueOf(eventTimeFormat.toString()); + } + + public static TimeFormatter createTimeFormatter(OtsDelivery.TimeFormatter timeFormatter) { + return TimeFormatter.valueOf(timeFormatter.toString()); + } + + public static OSSFileFormat createFormat(OtsDelivery.Format format) { + return OSSFileFormat.valueOf(format.toString()); + } + + public static ListDeliveryTaskResponse listDeliveryTaskResponse( + ResponseContentWithMeta response, + OtsDelivery.ListDeliveryTaskResponse listDeliveryTaskResponse) { + ListDeliveryTaskResponse resp = new ListDeliveryTaskResponse(response.getMeta()); + resp.setTaskInfos(createTaskInfoList(listDeliveryTaskResponse.getTasksList())); + return resp; + } + + public static List createTaskInfoList(List taskInfos) { + List actualTaskInfoList = new ArrayList(); + for(OtsDelivery.DeliveryTaskInfo taskInfo: taskInfos) { + DeliveryTaskInfo actualTaskInfo = new DeliveryTaskInfo(); + actualTaskInfo.setTableName(taskInfo.getTableName()); + actualTaskInfo.setTaskName(taskInfo.getTaskName()); + actualTaskInfo.setTaskType(createTaskType(taskInfo.getTaskType())); + actualTaskInfoList.add(actualTaskInfo); + } + return actualTaskInfoList; + } + public static DeleteIndexResponse createDeleteIndexResponse( ResponseContentWithMeta response, OtsInternalApi.DropIndexResponse dropIndexResponse) { return new DeleteIndexResponse(response.getMeta()); } + public static AddDefinedColumnResponse createAddDefinedColumnResponse( + ResponseContentWithMeta response, + OtsInternalApi.AddDefinedColumnResponse addDefinedColumnResponse) { + return new AddDefinedColumnResponse(response.getMeta()); + } + + public static DeleteDefinedColumnResponse createDeleteDefinedColumnResponse( + ResponseContentWithMeta response, + OtsInternalApi.DeleteDefinedColumnResponse deleteDefinedColumnResponse) { + return new DeleteDefinedColumnResponse(response.getMeta()); + } + public static UpdateTableResponse createUpdateTableResponse(ResponseContentWithMeta response, - OtsInternalApi.UpdateTableResponse - updateTableResponse) { + OtsInternalApi.UpdateTableResponse updateTableResponse) { UpdateTableResponse result = new UpdateTableResponse(response.getMeta()); result.setReservedThroughputDetails( - OTSProtocolParser.parseReservedThroughputDetails(updateTableResponse.getReservedThroughputDetails())); - + OTSProtocolParser.parseReservedThroughputDetails(updateTableResponse.getReservedThroughputDetails())); + if (updateTableResponse.hasTableOptions()) { + result.setTableOptions(OTSProtocolParser.parseTableOptions(updateTableResponse.getTableOptions())); + } if (updateTableResponse.hasStreamDetails()) { result.setStreamDetails(OTSProtocolParser.parseStreamDetails(updateTableResponse.getStreamDetails())); } @@ -112,7 +250,7 @@ public static UpdateTableResponse createUpdateTableResponse(ResponseContentWithM } public static GetRowResponse createGetRowResponse(ResponseContentWithMeta response, - OtsInternalApi.GetRowResponse getRowResponse) { + OtsInternalApi.GetRowResponse getRowResponse) { ConsumedCapacity consumedCapacity = new ConsumedCapacity( OTSProtocolParser.parseCapacityUnit(getRowResponse.getConsumed().getCapacityUnit())); Row row = null; @@ -137,7 +275,7 @@ public static GetRowResponse createGetRowResponse(ResponseContentWithMeta respon } public static PutRowResponse createPutRowResponse(ResponseContentWithMeta response, - OtsInternalApi.PutRowResponse putRowResponse) { + OtsInternalApi.PutRowResponse putRowResponse) { ConsumedCapacity consumedCapacity = new ConsumedCapacity( OTSProtocolParser.parseCapacityUnit(putRowResponse.getConsumed().getCapacityUnit())); Row row = null; @@ -160,7 +298,7 @@ public static PutRowResponse createPutRowResponse(ResponseContentWithMeta respon } public static UpdateRowResponse createUpdateRowResponse(ResponseContentWithMeta response, - OtsInternalApi.UpdateRowResponse updateRowResponse) { + OtsInternalApi.UpdateRowResponse updateRowResponse) { ConsumedCapacity consumedCapacity = new ConsumedCapacity( OTSProtocolParser.parseCapacityUnit(updateRowResponse.getConsumed().getCapacityUnit())); Row row = null; @@ -183,7 +321,7 @@ public static UpdateRowResponse createUpdateRowResponse(ResponseContentWithMeta } public static DeleteRowResponse createDeleteRowResponse(ResponseContentWithMeta response, - OtsInternalApi.DeleteRowResponse deleteRowResponse) { + OtsInternalApi.DeleteRowResponse deleteRowResponse) { ConsumedCapacity consumedCapacity = new ConsumedCapacity( OTSProtocolParser.parseCapacityUnit(deleteRowResponse.getConsumed().getCapacityUnit())); Row row = null; @@ -206,12 +344,12 @@ public static DeleteRowResponse createDeleteRowResponse(ResponseContentWithMeta } public static GetRangeResponse createGetRangeResponse(ResponseContentWithMeta response, - OtsInternalApi.GetRangeResponse getRangeResponse) { + OtsInternalApi.GetRangeResponse getRangeResponse) { try { ConsumedCapacity consumedCapacity = new ConsumedCapacity( OTSProtocolParser.parseCapacityUnit(getRangeResponse.getConsumed().getCapacityUnit())); GetRangeResponse result = new GetRangeResponse(response.getMeta(), consumedCapacity); - + result.setBodyBytes(getRangeResponse.getSerializedSize()); if (!getRangeResponse.hasNextStartPrimaryKey()) { // has no next primary key result.setNextStartPrimaryKey(null); @@ -233,7 +371,7 @@ public static GetRangeResponse createGetRangeResponse(ResponseContentWithMeta re if (!getRangeResponse.getRows().isEmpty()) { List rows = new ArrayList(); PlainBufferCodedInputStream inputStream = new PlainBufferCodedInputStream( - new PlainBufferInputStream(getRangeResponse.getRows().asReadOnlyByteBuffer())); + new PlainBufferInputStream(getRangeResponse.getRows().asReadOnlyByteBuffer())); List pbRows = inputStream.readRowsWithHeader(); for (PlainBufferRow pbRow : pbRows) { rows.add(PlainBufferConversion.toRow(pbRow)); @@ -253,10 +391,55 @@ public static GetRangeResponse createGetRangeResponse(ResponseContentWithMeta re } } + public static BulkExportResponse createBulkExportResponse(ResponseContentWithMeta response, + OtsInternalApi.BulkExportResponse bulkExportResponse) { + try { + // ConsumedCapacity + ConsumedCapacity consumedCapacity = new ConsumedCapacity( + OTSProtocolParser.parseCapacityUnit(bulkExportResponse.getConsumed().getCapacityUnit())); + + if (bulkExportResponse.getConsumed().hasCapacityDataSize()){ + consumedCapacity.setCapacityDataSize( + OTSProtocolParser.parseCapacityDataSize(bulkExportResponse.getConsumed().getCapacityDataSize())); + } + BulkExportResponse result = new BulkExportResponse(response.getMeta(), consumedCapacity); + result.setBodyBytes(bulkExportResponse.getSerializedSize()); + // Next Start PrimaryKey + if (!bulkExportResponse.hasNextStartPrimaryKey()) { + // has no next primary key + result.setNextStartPrimaryKey(null); + } else { + PlainBufferCodedInputStream inputStream = new PlainBufferCodedInputStream( + new PlainBufferInputStream(bulkExportResponse.getNextStartPrimaryKey().asReadOnlyByteBuffer())); + List rows = inputStream.readRowsWithHeader(); + if (rows.size() != 1) { + throw new IOException("Expect only returns one row. Row count: " + rows.size()); + } + PlainBufferRow row = rows.get(0); + if (row.hasDeleteMarker() || row.hasCells()) { + throw new IOException("The next primary key should only have primary key: " + row); + } + + result.setNextStartPrimaryKey(PlainBufferConversion.toPrimaryKey(row.getPrimaryKey())); + } + + // Rows + if (!bulkExportResponse.getRows().isEmpty()) { + result.setRows(bulkExportResponse.getRows().asReadOnlyByteBuffer()); + } else { + result.setRows(null); + } + + // DataBlockType + result.setDataBlockType(DataBlockType.fromProtocolType(bulkExportResponse.getDataBlockType())); + return result; + } catch (Exception e) { + throw new ClientException("Failed to parse BulkExport response.", e); + } + } + public static ComputeSplitsBySizeResponse createComputeSplitsBySizeResponse(ResponseContentWithMeta response, - OtsInternalApi - .ComputeSplitPointsBySizeResponse - computeSplitPointsBySizeResponse) { + OtsInternalApi.ComputeSplitPointsBySizeResponse computeSplitPointsBySizeResponse) { ComputeSplitsBySizeResponse result = new ComputeSplitsBySizeResponse(response.getMeta()); ConsumedCapacity consumedCapacity = new ConsumedCapacity( @@ -344,8 +527,7 @@ public static ComputeSplitsBySizeResponse createComputeSplitsBySizeResponse(Resp } public static BatchGetRowResponse createBatchGetRowResponse(ResponseContentWithMeta response, - OtsInternalApi.BatchGetRowResponse - batchGetRowResponse) { + OtsInternalApi.BatchGetRowResponse batchGetRowResponse) { BatchGetRowResponse result = new BatchGetRowResponse(response.getMeta()); for (OtsInternalApi.TableInBatchGetRowResponse table : batchGetRowResponse.getTablesList()) { @@ -359,8 +541,7 @@ public static BatchGetRowResponse createBatchGetRowResponse(ResponseContentWithM } public static BatchWriteRowResponse createBatchWriteRowResponse(ResponseContentWithMeta response, - OtsInternalApi.BatchWriteRowResponse - batchWriteRowResponse) { + OtsInternalApi.BatchWriteRowResponse batchWriteRowResponse) { BatchWriteRowResponse result = new BatchWriteRowResponse(response.getMeta()); for (OtsInternalApi.TableInBatchWriteRowResponse table : batchWriteRowResponse.getTablesList()) { @@ -375,8 +556,21 @@ public static BatchWriteRowResponse createBatchWriteRowResponse(ResponseContentW return result; } + public static BulkImportResponse createBulkImportResponse(ResponseContentWithMeta response, + OtsInternalApi.BulkImportResponse bulkImportResponse) { + BulkImportResponse result = new BulkImportResponse(response.getMeta()); + String tableName = bulkImportResponse.getTableName(); + result.setTableName(tableName); + List rows = bulkImportResponse.getRowsList(); + for (int i = 0; i < rows.size(); i++) { + result.addRowResult(OTSProtocolParser.parseBulkImportStatus(rows.get(i), i)); + } + + return result; + } + public static ListStreamResponse createListStreamResponse(ResponseContentWithMeta response, - OtsInternalApi.ListStreamResponse listStreamResponse) { + OtsInternalApi.ListStreamResponse listStreamResponse) { ListStreamResponse result = new ListStreamResponse(response.getMeta()); List streams = new ArrayList(); for (OtsInternalApi.Stream stream : listStreamResponse.getStreamsList()) { @@ -387,8 +581,7 @@ public static ListStreamResponse createListStreamResponse(ResponseContentWithMet } public static DescribeStreamResponse createDescribeStreamResponse(ResponseContentWithMeta response, - OtsInternalApi.DescribeStreamResponse - describeStreamResponse) { + OtsInternalApi.DescribeStreamResponse describeStreamResponse) { DescribeStreamResponse result = new DescribeStreamResponse(response.getMeta()); result.setStreamId(describeStreamResponse.getStreamId()); result.setExpirationTime(describeStreamResponse.getExpirationTime()); @@ -407,16 +600,19 @@ public static DescribeStreamResponse createDescribeStreamResponse(ResponseConten } public static GetShardIteratorResponse createGetShardIteratorResponse(ResponseContentWithMeta response, - OtsInternalApi.GetShardIteratorResponse - getShardIteratorResponse) { + OtsInternalApi.GetShardIteratorResponse getShardIteratorResponse) { GetShardIteratorResponse result = new GetShardIteratorResponse(response.getMeta()); - result.setShardIterator(getShardIteratorResponse.getShardIterator()); + if (!getShardIteratorResponse.getShardIterator().isEmpty()) { + result.setShardIterator(getShardIteratorResponse.getShardIterator()); + } + if (getShardIteratorResponse.hasNextToken() && !getShardIteratorResponse.getNextToken().isEmpty()) { + result.setNextToken(getShardIteratorResponse.getNextToken()); + } return result; } public static GetStreamRecordResponse createGetStreamRecordResponse(ResponseContentWithMeta response, - OtsInternalApi.GetStreamRecordResponse - getStreamRecordResponse) { + OtsInternalApi.GetStreamRecordResponse getStreamRecordResponse) { GetStreamRecordResponse result = new GetStreamRecordResponse(response.getMeta()); if (getStreamRecordResponse.hasNextShardIterator()) { result.setNextShardIterator(getStreamRecordResponse.getNextShardIterator()); @@ -444,40 +640,39 @@ public static GetStreamRecordResponse createGetStreamRecordResponse(ResponseCont } public static StartLocalTransactionResponse createStartLocalTransactionResponse(ResponseContentWithMeta response, - OtsInternalApi - .StartLocalTransactionResponse startLocalTransactionResponse) { + OtsInternalApi.StartLocalTransactionResponse startLocalTransactionResponse) { StartLocalTransactionResponse result = new StartLocalTransactionResponse(response.getMeta()); result.setTransactionID(startLocalTransactionResponse.getTransactionId()); return result; } public static CommitTransactionResponse createCommitTransactionResponse(ResponseContentWithMeta response, - OtsInternalApi.CommitTransactionResponse - commitTransactionResponse) { + OtsInternalApi.CommitTransactionResponse commitTransactionResponse) { return new CommitTransactionResponse(response.getMeta()); } public static AbortTransactionResponse createAbortTransactionResponse(ResponseContentWithMeta response, - OtsInternalApi.AbortTransactionResponse - abortTransactionResponse) { + OtsInternalApi.AbortTransactionResponse abortTransactionResponse) { return new AbortTransactionResponse(response.getMeta()); } public static CreateSearchIndexResponse createCreateSearchIndexResponse(ResponseContentWithMeta response, - Search.CreateSearchIndexResponse - createSearchIndexResponse) { + Search.CreateSearchIndexResponse createSearchIndexResponse) { return new CreateSearchIndexResponse(response.getMeta()); } + public static UpdateSearchIndexResponse createUpdateSearchIndexResponse(ResponseContentWithMeta response, + Search.UpdateSearchIndexResponse updateSearchIndexResponse) { + return new UpdateSearchIndexResponse(response.getMeta()); + } + public static DeleteSearchIndexResponse createDeleteSearchIndexResponse(ResponseContentWithMeta response, - Search.DeleteSearchIndexResponse - deleteSearchIndexResponse) { + Search.DeleteSearchIndexResponse deleteSearchIndexResponse) { return new DeleteSearchIndexResponse(response.getMeta()); } public static ListSearchIndexResponse createListSearchIndexResponse(ResponseContentWithMeta response, - Search.ListSearchIndexResponse - listSearchIndexResponse) { + Search.ListSearchIndexResponse listSearchIndexResponse) { ListSearchIndexResponse result = new ListSearchIndexResponse(response.getMeta()); List indexInfos = new ArrayList(); for (Search.IndexInfo indexInfo : listSearchIndexResponse.getIndicesList()) { @@ -491,8 +686,7 @@ public static ListSearchIndexResponse createListSearchIndexResponse(ResponseCont } public static DescribeSearchIndexResponse createDescribeSearchIndexResponse(ResponseContentWithMeta response, - Search.DescribeSearchIndexResponse - describeSearchIndexResponse) { + Search.DescribeSearchIndexResponse describeSearchIndexResponse) { DescribeSearchIndexResponse result = new DescribeSearchIndexResponse(response.getMeta()); result.setSchema(SearchProtocolParser.toIndexSchema( describeSearchIndexResponse.getSchema())); @@ -502,16 +696,67 @@ public static DescribeSearchIndexResponse createDescribeSearchIndexResponse(Resp } if (describeSearchIndexResponse.hasMeteringInfo()) { result.setMeteringInfo(SearchProtocolParser.toMeteringInfo( - describeSearchIndexResponse.getMeteringInfo())); + describeSearchIndexResponse.getMeteringInfo())); + } + if (describeSearchIndexResponse.hasBrotherIndexName()) { + result.setBrotherIndexName(describeSearchIndexResponse.getBrotherIndexName()); + } + if (describeSearchIndexResponse.getQueryFlowWeightCount() > 0) { + List pbQueryFlowWeightList = describeSearchIndexResponse.getQueryFlowWeightList(); + for (Search.QueryFlowWeight pbQueryFlowWeight : pbQueryFlowWeightList) { + result.addQueryFlowWeight(SearchProtocolParser.toQueryFlowWeight(pbQueryFlowWeight)); + } + } + if (describeSearchIndexResponse.hasCreateTime()) { + result.setCreateTime(describeSearchIndexResponse.getCreateTime()); + } + if (describeSearchIndexResponse.hasTimeToLive()) { + result.setTimeToLive(describeSearchIndexResponse.getTimeToLive()); + } + return result; + } + + public static ComputeSplitsResponse createComputeSplitsResponse(ResponseContentWithMeta response, + OtsInternalApi.ComputeSplitsResponse computeSplitsResponse) throws IOException { + ComputeSplitsResponse result = new ComputeSplitsResponse(response.getMeta()); + if (computeSplitsResponse.hasSplitsSize()){ + result.setSplitsSize(computeSplitsResponse.getSplitsSize()); + } + if (computeSplitsResponse.hasSessionId()){ + result.setSessionId(computeSplitsResponse.getSessionId().toByteArray()); + } + return result; + } + + public static ParallelScanResponse createParallelScanResponse(ResponseContentWithMeta response, + Search.ParallelScanResponse parallelScanResponse) throws IOException { + ParallelScanResponse result = new ParallelScanResponse(response.getMeta()); + result.setBodyBytes(parallelScanResponse.getSerializedSize()); + List rows = new ArrayList(); + for (int i = 0; i < parallelScanResponse.getRowsCount(); ++i) { + com.google.protobuf.ByteString bytes = parallelScanResponse.getRows(i); + PlainBufferCodedInputStream coded = new PlainBufferCodedInputStream( + new PlainBufferInputStream(bytes.asReadOnlyByteBuffer())); + List plainBufferRows = coded.readRowsWithHeader(); + if (plainBufferRows.size() != 1) { + throw new IOException("Expect only returns one row. Row count: " + rows.size()); + } + Row row = PlainBufferConversion.toRow(plainBufferRows.get(0)); + rows.add(row); + } + result.setRows(rows); + if (parallelScanResponse.hasNextToken()) { + result.setNextToken(parallelScanResponse.getNextToken().toByteArray()); } return result; } public static SearchResponse createSearchResponse(ResponseContentWithMeta response, - Search.SearchResponse searchResponse) throws IOException { + Search.SearchResponse searchResponse) throws IOException { SearchResponse result = new SearchResponse(response.getMeta()); result.setTotalCount(searchResponse.getTotalHits()); result.setAllSuccess(searchResponse.getIsAllSucceeded()); + result.setBodyBytes(searchResponse.getSerializedSize()); List rows = new ArrayList(); for (int i = 0; i < searchResponse.getRowsCount(); ++i) { com.google.protobuf.ByteString bytes = searchResponse.getRows(i); @@ -524,10 +769,16 @@ public static SearchResponse createSearchResponse(ResponseContentWithMeta respon Row row = PlainBufferConversion.toRow(plainBufferRows.get(0)); rows.add(row); } + result.setRows(rows); if (searchResponse.hasNextToken()) { result.setNextToken(searchResponse.getNextToken().toByteArray()); } - result.setRows(rows); + if (searchResponse.hasAggs()) { + result.setAggregationResults(buildAggregationResultsFromByteString(searchResponse.getAggs())); + } + if (searchResponse.hasGroupBys()) { + result.setGroupByResults(buildGroupByResultsFromByteString(searchResponse.getGroupBys())); + } return result; } @@ -546,6 +797,24 @@ private static TunnelStage createTunnelStage(String stage) { return TunnelStage.valueOf(stage); } + private static StreamTunnelConfig createStreamTunnelConfig(TunnelServiceApi.StreamTunnelConfig config) { + StreamTunnelConfig retConfig = new StreamTunnelConfig(); + switch(config.getFlag()) { + case EARLIEST: + retConfig.setFlag(StartOffsetFlag.EARLIEST); + break; + case LATEST: + retConfig.setFlag(StartOffsetFlag.LATEST); + break; + default: + break; + } + // NanoSecond to MillSecond + retConfig.setStartOffset(config.getStartOffset() / MILLIS_TO_NANO); + retConfig.setEndOffset(config.getEndOffset() / MILLIS_TO_NANO); + return retConfig; + } + private static TunnelInfo createTunnelInfo(TunnelServiceApi.TunnelInfo tunnelInfo) { TunnelInfo actualInfo = new TunnelInfo(); actualInfo.setTunnelId(tunnelInfo.getTunnelId()); @@ -555,6 +824,11 @@ private static TunnelInfo createTunnelInfo(TunnelServiceApi.TunnelInfo tunnelInf actualInfo.setStage(createTunnelStage(tunnelInfo.getStage())); actualInfo.setExpired(tunnelInfo.getExpired()); actualInfo.setTunnelName(tunnelInfo.getTunnelName()); + if (tunnelInfo.hasStreamTunnelConfig()) { + actualInfo.setStreamTunnelConfig(createStreamTunnelConfig(tunnelInfo.getStreamTunnelConfig())); + } + // NanoSecond to MilliSecond + actualInfo.setCreateTime(tunnelInfo.getCreateTime() / MILLIS_TO_NANO); return actualInfo; } @@ -572,7 +846,7 @@ private static ChannelInfo createChannelInfo(TunnelServiceApi.ChannelInfo channe actualInfo.setChannelType(createChannelType(channelInfo.getChannelType())); actualInfo.setChannelStatus(createChannelStatus(channelInfo.getChannelStatus())); actualInfo.setClientId(channelInfo.getClientId()); - long rpoMillis = channelInfo.getChannelRpo() / 1000000; + long rpoMillis = channelInfo.getChannelRpo() / MILLIS_TO_NANO; actualInfo.setChannelConsumePoint(new Date(rpoMillis)); actualInfo.setChannelRpo(System.currentTimeMillis() - rpoMillis); actualInfo.setChannelCount(channelInfo.getChannelCount()); @@ -594,7 +868,7 @@ public static ListTunnelResponse createListTunnelResponse( public static DescribeTunnelResponse createDescribeTunnelResponse( ResponseContentWithMeta response, TunnelServiceApi.DescribeTunnelResponse tunnelResponse) { DescribeTunnelResponse resp = new DescribeTunnelResponse(response.getMeta()); - long rpoMillis = tunnelResponse.getTunnelRpo() / 1000000; + long rpoMillis = tunnelResponse.getTunnelRpo() / MILLIS_TO_NANO; resp.setTunnelConsumePoint(new Date(rpoMillis)); resp.setTunnelInfo(createTunnelInfo(tunnelResponse.getTunnel())); List actualInfos = new ArrayList(); @@ -671,6 +945,7 @@ public static GetCheckpointResponse createGetCheckpointResponse( } public static final String FINISH_TAG = "finished"; + public static ReadRecordsResponse createReadRecordsResponse( ResponseContentWithMeta response, TunnelServiceApi.ReadRecordsResponse tunnelResponse) { ReadRecordsResponse resp = new ReadRecordsResponse(response.getMeta()); @@ -709,4 +984,29 @@ public static CheckpointResponse createCheckpointResponse( ResponseContentWithMeta response, TunnelServiceApi.CheckpointResponse tunnelResponse) { return new CheckpointResponse(response.getMeta()); } + + public static SQLQueryResponse createSqlQueryResponse(ResponseContentWithMeta response, + OtsInternalApi.SQLQueryResponse sqlQueryResponse) throws IOException { + try { + Map consumedCapacityByTable = new HashMap(); + for(OtsInternalApi.TableConsumedCapacity tableConsumedCapacity :sqlQueryResponse.getConsumesList()) { + ConsumedCapacity consumedCapacity = new ConsumedCapacity( + OTSProtocolParser.parseCapacityUnit(tableConsumedCapacity.getConsumed().getCapacityUnit())); + consumedCapacityByTable.put(tableConsumedCapacity.getTableName(), consumedCapacity); + } + + SQLPayloadVersion sqlPayloadVersion = OTSProtocolParser.parseSQLPayloadVersion(sqlQueryResponse.getVersion()); + SQLStatementType sqlStatementType = OTSProtocolParser.parseSQLStatementType(sqlQueryResponse.getType()); + + switch (sqlPayloadVersion) { + case SQL_FLAT_BUFFERS: + return new SQLQueryResponse(response.getMeta(), consumedCapacityByTable, + sqlPayloadVersion, sqlStatementType, sqlQueryResponse.getRows()); + default: + throw new UnsupportedOperationException("not supported sql payload version: " + sqlPayloadVersion); + } + } catch (Exception e) { + throw new ClientException("Failed to parse sql query response.", e); + } + } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/Search.java b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/Search.java index d64c016..162b0ed 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/Search.java +++ b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/Search.java @@ -8,6 +8,279 @@ private Search() {} public static void registerAllExtensions( com.google.protobuf.ExtensionRegistry registry) { } + public enum AggType + implements com.google.protobuf.ProtocolMessageEnum { + AVG_AGG(0, 1), + CARDINALITY_AGG(1, 2), + MAX_AGG(2, 3), + MIN_AGG(3, 4), + SUM_AGG(4, 5), + TERMS_AGG(5, 6), + FILTER_AGG(6, 7), + NESTED_AGG(7, 8), + GEO_BOUNDS_AGG(8, 9), + GEO_DISTANCE_AGG(9, 10), + STATS_AGG(10, 11), + EXTENDED_STATS_AGG(11, 12), + PERCENTILES_AGG(12, 13), + PERCENTILE_RANKS_AGG(13, 14), + VALUE_COUNT_AGG(14, 15), + ; + + public static final int AVG_AGG_VALUE = 1; + public static final int CARDINALITY_AGG_VALUE = 2; + public static final int MAX_AGG_VALUE = 3; + public static final int MIN_AGG_VALUE = 4; + public static final int SUM_AGG_VALUE = 5; + public static final int TERMS_AGG_VALUE = 6; + public static final int FILTER_AGG_VALUE = 7; + public static final int NESTED_AGG_VALUE = 8; + public static final int GEO_BOUNDS_AGG_VALUE = 9; + public static final int GEO_DISTANCE_AGG_VALUE = 10; + public static final int STATS_AGG_VALUE = 11; + public static final int EXTENDED_STATS_AGG_VALUE = 12; + public static final int PERCENTILES_AGG_VALUE = 13; + public static final int PERCENTILE_RANKS_AGG_VALUE = 14; + public static final int VALUE_COUNT_AGG_VALUE = 15; + + + public final int getNumber() { return value; } + + public static AggType valueOf(int value) { + switch (value) { + case 1: return AVG_AGG; + case 2: return CARDINALITY_AGG; + case 3: return MAX_AGG; + case 4: return MIN_AGG; + case 5: return SUM_AGG; + case 6: return TERMS_AGG; + case 7: return FILTER_AGG; + case 8: return NESTED_AGG; + case 9: return GEO_BOUNDS_AGG; + case 10: return GEO_DISTANCE_AGG; + case 11: return STATS_AGG; + case 12: return EXTENDED_STATS_AGG; + case 13: return PERCENTILES_AGG; + case 14: return PERCENTILE_RANKS_AGG; + case 15: return VALUE_COUNT_AGG; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public AggType findValueByNumber(int number) { + return AggType.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.getDescriptor().getEnumTypes().get(0); + } + + private static final AggType[] VALUES = { + AVG_AGG, CARDINALITY_AGG, MAX_AGG, MIN_AGG, SUM_AGG, TERMS_AGG, FILTER_AGG, NESTED_AGG, GEO_BOUNDS_AGG, GEO_DISTANCE_AGG, STATS_AGG, EXTENDED_STATS_AGG, PERCENTILES_AGG, PERCENTILE_RANKS_AGG, VALUE_COUNT_AGG, + }; + + public static AggType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private AggType(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:com.alicloud.openservices.tablestore.core.protocol.AggType) + } + + public enum AggregationType + implements com.google.protobuf.ProtocolMessageEnum { + AGG_AVG(0, 1), + AGG_DISTINCT_COUNT(1, 6), + AGG_MAX(2, 2), + AGG_MIN(3, 3), + AGG_SUM(4, 4), + AGG_COUNT(5, 5), + AGG_TOP_ROWS(6, 7), + AGG_PERCENTILES(7, 8), + ; + + public static final int AGG_AVG_VALUE = 1; + public static final int AGG_DISTINCT_COUNT_VALUE = 6; + public static final int AGG_MAX_VALUE = 2; + public static final int AGG_MIN_VALUE = 3; + public static final int AGG_SUM_VALUE = 4; + public static final int AGG_COUNT_VALUE = 5; + public static final int AGG_TOP_ROWS_VALUE = 7; + public static final int AGG_PERCENTILES_VALUE = 8; + + + public final int getNumber() { return value; } + + public static AggregationType valueOf(int value) { + switch (value) { + case 1: return AGG_AVG; + case 6: return AGG_DISTINCT_COUNT; + case 2: return AGG_MAX; + case 3: return AGG_MIN; + case 4: return AGG_SUM; + case 5: return AGG_COUNT; + case 7: return AGG_TOP_ROWS; + case 8: return AGG_PERCENTILES; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public AggregationType findValueByNumber(int number) { + return AggregationType.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.getDescriptor().getEnumTypes().get(1); + } + + private static final AggregationType[] VALUES = { + AGG_AVG, AGG_DISTINCT_COUNT, AGG_MAX, AGG_MIN, AGG_SUM, AGG_COUNT, AGG_TOP_ROWS, AGG_PERCENTILES, + }; + + public static AggregationType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private AggregationType(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:com.alicloud.openservices.tablestore.core.protocol.AggregationType) + } + + public enum GroupByType + implements com.google.protobuf.ProtocolMessageEnum { + GROUP_BY_FIELD(0, 1), + GROUP_BY_RANGE(1, 2), + GROUP_BY_FILTER(2, 3), + GROUP_BY_GEO_DISTANCE(3, 4), + GROUP_BY_HISTOGRAM(4, 5), + ; + + public static final int GROUP_BY_FIELD_VALUE = 1; + public static final int GROUP_BY_RANGE_VALUE = 2; + public static final int GROUP_BY_FILTER_VALUE = 3; + public static final int GROUP_BY_GEO_DISTANCE_VALUE = 4; + public static final int GROUP_BY_HISTOGRAM_VALUE = 5; + + + public final int getNumber() { return value; } + + public static GroupByType valueOf(int value) { + switch (value) { + case 1: return GROUP_BY_FIELD; + case 2: return GROUP_BY_RANGE; + case 3: return GROUP_BY_FILTER; + case 4: return GROUP_BY_GEO_DISTANCE; + case 5: return GROUP_BY_HISTOGRAM; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public GroupByType findValueByNumber(int number) { + return GroupByType.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.getDescriptor().getEnumTypes().get(2); + } + + private static final GroupByType[] VALUES = { + GROUP_BY_FIELD, GROUP_BY_RANGE, GROUP_BY_FILTER, GROUP_BY_GEO_DISTANCE, GROUP_BY_HISTOGRAM, + }; + + public static GroupByType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private GroupByType(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:com.alicloud.openservices.tablestore.core.protocol.GroupByType) + } + public enum QueryType implements com.google.protobuf.ProtocolMessageEnum { MATCH_QUERY(0, 1), @@ -25,6 +298,7 @@ public enum QueryType GEO_DISTANCE_QUERY(12, 13), GEO_POLYGON_QUERY(13, 14), TERMS_QUERY(14, 15), + EXISTS_QUERY(15, 16), ; public static final int MATCH_QUERY_VALUE = 1; @@ -42,6 +316,7 @@ public enum QueryType public static final int GEO_DISTANCE_QUERY_VALUE = 13; public static final int GEO_POLYGON_QUERY_VALUE = 14; public static final int TERMS_QUERY_VALUE = 15; + public static final int EXISTS_QUERY_VALUE = 16; public final int getNumber() { return value; } @@ -63,6 +338,7 @@ public static QueryType valueOf(int value) { case 13: return GEO_DISTANCE_QUERY; case 14: return GEO_POLYGON_QUERY; case 15: return TERMS_QUERY; + case 16: return EXISTS_QUERY; default: return null; } } @@ -89,11 +365,11 @@ public QueryType findValueByNumber(int number) { } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.getDescriptor().getEnumTypes().get(0); + return com.alicloud.openservices.tablestore.core.protocol.Search.getDescriptor().getEnumTypes().get(3); } private static final QueryType[] VALUES = { - MATCH_QUERY, MATCH_PHRASE_QUERY, TERM_QUERY, RANGE_QUERY, PREFIX_QUERY, BOOL_QUERY, CONST_SCORE_QUERY, FUNCTION_SCORE_QUERY, NESTED_QUERY, WILDCARD_QUERY, MATCH_ALL_QUERY, GEO_BOUNDING_BOX_QUERY, GEO_DISTANCE_QUERY, GEO_POLYGON_QUERY, TERMS_QUERY, + MATCH_QUERY, MATCH_PHRASE_QUERY, TERM_QUERY, RANGE_QUERY, PREFIX_QUERY, BOOL_QUERY, CONST_SCORE_QUERY, FUNCTION_SCORE_QUERY, NESTED_QUERY, WILDCARD_QUERY, MATCH_ALL_QUERY, GEO_BOUNDING_BOX_QUERY, GEO_DISTANCE_QUERY, GEO_POLYGON_QUERY, TERMS_QUERY, EXISTS_QUERY, }; public static QueryType valueOf( @@ -158,7 +434,7 @@ public QueryOperator findValueByNumber(int number) { } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.getDescriptor().getEnumTypes().get(1); + return com.alicloud.openservices.tablestore.core.protocol.Search.getDescriptor().getEnumTypes().get(4); } private static final QueryOperator[] VALUES = { @@ -236,7 +512,7 @@ public ScoreMode findValueByNumber(int number) { } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.getDescriptor().getEnumTypes().get(2); + return com.alicloud.openservices.tablestore.core.protocol.Search.getDescriptor().getEnumTypes().get(5); } private static final ScoreMode[] VALUES = { @@ -305,7 +581,7 @@ public SortOrder findValueByNumber(int number) { } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.getDescriptor().getEnumTypes().get(3); + return com.alicloud.openservices.tablestore.core.protocol.Search.getDescriptor().getEnumTypes().get(6); } private static final SortOrder[] VALUES = { @@ -377,7 +653,7 @@ public SortMode findValueByNumber(int number) { } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.getDescriptor().getEnumTypes().get(4); + return com.alicloud.openservices.tablestore.core.protocol.Search.getDescriptor().getEnumTypes().get(7); } private static final SortMode[] VALUES = { @@ -446,7 +722,7 @@ public GeoDistanceType findValueByNumber(int number) { } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.getDescriptor().getEnumTypes().get(5); + return com.alicloud.openservices.tablestore.core.protocol.Search.getDescriptor().getEnumTypes().get(8); } private static final GeoDistanceType[] VALUES = { @@ -478,11 +754,13 @@ public enum ColumnReturnType RETURN_ALL(0, 1), RETURN_SPECIFIED(1, 2), RETURN_NONE(2, 3), + RETURN_ALL_FROM_INDEX(3, 4), ; public static final int RETURN_ALL_VALUE = 1; public static final int RETURN_SPECIFIED_VALUE = 2; public static final int RETURN_NONE_VALUE = 3; + public static final int RETURN_ALL_FROM_INDEX_VALUE = 4; public final int getNumber() { return value; } @@ -492,6 +770,7 @@ public static ColumnReturnType valueOf(int value) { case 1: return RETURN_ALL; case 2: return RETURN_SPECIFIED; case 3: return RETURN_NONE; + case 4: return RETURN_ALL_FROM_INDEX; default: return null; } } @@ -518,11 +797,11 @@ public ColumnReturnType findValueByNumber(int number) { } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.getDescriptor().getEnumTypes().get(6); + return com.alicloud.openservices.tablestore.core.protocol.Search.getDescriptor().getEnumTypes().get(9); } private static final ColumnReturnType[] VALUES = { - RETURN_ALL, RETURN_SPECIFIED, RETURN_NONE, + RETURN_ALL, RETURN_SPECIFIED, RETURN_NONE, RETURN_ALL_FROM_INDEX, }; public static ColumnReturnType valueOf( @@ -593,7 +872,7 @@ public IndexOptions findValueByNumber(int number) { } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.getDescriptor().getEnumTypes().get(7); + return com.alicloud.openservices.tablestore.core.protocol.Search.getDescriptor().getEnumTypes().get(10); } private static final IndexOptions[] VALUES = { @@ -677,7 +956,7 @@ public FieldType findValueByNumber(int number) { } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.getDescriptor().getEnumTypes().get(8); + return com.alicloud.openservices.tablestore.core.protocol.Search.getDescriptor().getEnumTypes().get(11); } private static final FieldType[] VALUES = { @@ -746,7 +1025,7 @@ public SyncPhase findValueByNumber(int number) { } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.getDescriptor().getEnumTypes().get(9); + return com.alicloud.openservices.tablestore.core.protocol.Search.getDescriptor().getEnumTypes().get(12); } private static final SyncPhase[] VALUES = { @@ -773,51 +1052,43 @@ private SyncPhase(int index, int value) { // @@protoc_insertion_point(enum_scope:com.alicloud.openservices.tablestore.core.protocol.SyncPhase) } - public interface MatchQueryOrBuilder + public interface AvgAggOrBuilder extends com.google.protobuf.MessageOrBuilder { // optional string field_name = 1; boolean hasFieldName(); String getFieldName(); - // optional string text = 2; - boolean hasText(); - String getText(); - - // optional int32 minimum_should_match = 3; - boolean hasMinimumShouldMatch(); - int getMinimumShouldMatch(); - - // optional .com.alicloud.openservices.tablestore.core.protocol.QueryOperator operator = 4; - boolean hasOperator(); - com.alicloud.openservices.tablestore.core.protocol.Search.QueryOperator getOperator(); + // optional bytes missing = 2; + boolean hasMissing(); + com.google.protobuf.ByteString getMissing(); } - public static final class MatchQuery extends + public static final class AvgAgg extends com.google.protobuf.GeneratedMessage - implements MatchQueryOrBuilder { - // Use MatchQuery.newBuilder() to construct. - private MatchQuery(Builder builder) { + implements AvgAggOrBuilder { + // Use AvgAgg.newBuilder() to construct. + private AvgAgg(Builder builder) { super(builder); } - private MatchQuery(boolean noInit) {} + private AvgAgg(boolean noInit) {} - private static final MatchQuery defaultInstance; - public static MatchQuery getDefaultInstance() { + private static final AvgAgg defaultInstance; + public static AvgAgg getDefaultInstance() { return defaultInstance; } - public MatchQuery getDefaultInstanceForType() { + public AvgAgg getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MatchQuery_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_AvgAgg_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MatchQuery_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_AvgAgg_fieldAccessorTable; } private int bitField0_; @@ -853,63 +1124,19 @@ private com.google.protobuf.ByteString getFieldNameBytes() { } } - // optional string text = 2; - public static final int TEXT_FIELD_NUMBER = 2; - private java.lang.Object text_; - public boolean hasText() { + // optional bytes missing = 2; + public static final int MISSING_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString missing_; + public boolean hasMissing() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public String getText() { - java.lang.Object ref = text_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - text_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getTextBytes() { - java.lang.Object ref = text_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - text_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // optional int32 minimum_should_match = 3; - public static final int MINIMUM_SHOULD_MATCH_FIELD_NUMBER = 3; - private int minimumShouldMatch_; - public boolean hasMinimumShouldMatch() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public int getMinimumShouldMatch() { - return minimumShouldMatch_; - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.QueryOperator operator = 4; - public static final int OPERATOR_FIELD_NUMBER = 4; - private com.alicloud.openservices.tablestore.core.protocol.Search.QueryOperator operator_; - public boolean hasOperator() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.QueryOperator getOperator() { - return operator_; + public com.google.protobuf.ByteString getMissing() { + return missing_; } private void initFields() { fieldName_ = ""; - text_ = ""; - minimumShouldMatch_ = 0; - operator_ = com.alicloud.openservices.tablestore.core.protocol.Search.QueryOperator.OR; + missing_ = com.google.protobuf.ByteString.EMPTY; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -927,13 +1154,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) output.writeBytes(1, getFieldNameBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getTextBytes()); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeInt32(3, minimumShouldMatch_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeEnum(4, operator_.getNumber()); + output.writeBytes(2, missing_); } getUnknownFields().writeTo(output); } @@ -950,15 +1171,7 @@ public int getSerializedSize() { } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getTextBytes()); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, minimumShouldMatch_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, operator_.getNumber()); + .computeBytesSize(2, missing_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -972,41 +1185,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.AvgAgg parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.AvgAgg parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.Search.AvgAgg parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.AvgAgg parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.AvgAgg parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.AvgAgg parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.AvgAgg parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -1015,7 +1228,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchQue return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.AvgAgg parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -1026,12 +1239,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchQue return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.AvgAgg parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.AvgAgg parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -1041,7 +1254,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchQue public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.AvgAgg prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -1054,18 +1267,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.Search.MatchQueryOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MatchQuery_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_AvgAgg_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MatchQuery_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_AvgAgg_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.AvgAgg.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -1086,12 +1299,8 @@ public Builder clear() { super.clear(); fieldName_ = ""; bitField0_ = (bitField0_ & ~0x00000001); - text_ = ""; + missing_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); - minimumShouldMatch_ = 0; - bitField0_ = (bitField0_ & ~0x00000004); - operator_ = com.alicloud.openservices.tablestore.core.protocol.Search.QueryOperator.OR; - bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -1101,24 +1310,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.Search.AvgAgg.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.Search.AvgAgg getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.AvgAgg.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery build() { - com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.Search.AvgAgg build() { + com.alicloud.openservices.tablestore.core.protocol.Search.AvgAgg result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.Search.AvgAgg buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.Search.AvgAgg result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -1126,8 +1335,8 @@ private com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery bui return result; } - public com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery result = new com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery(this); + public com.alicloud.openservices.tablestore.core.protocol.Search.AvgAgg buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.AvgAgg result = new com.alicloud.openservices.tablestore.core.protocol.Search.AvgAgg(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { @@ -1137,42 +1346,28 @@ public com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery buil if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - result.text_ = text_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.minimumShouldMatch_ = minimumShouldMatch_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - result.operator_ = operator_; + result.missing_ = missing_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.AvgAgg) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.AvgAgg)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery.getDefaultInstance()) return this; + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.AvgAgg other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.AvgAgg.getDefaultInstance()) return this; if (other.hasFieldName()) { setFieldName(other.getFieldName()); } - if (other.hasText()) { - setText(other.getText()); - } - if (other.hasMinimumShouldMatch()) { - setMinimumShouldMatch(other.getMinimumShouldMatch()); - } - if (other.hasOperator()) { - setOperator(other.getOperator()); + if (other.hasMissing()) { + setMissing(other.getMissing()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -1212,23 +1407,7 @@ public Builder mergeFrom( } case 18: { bitField0_ |= 0x00000002; - text_ = input.readBytes(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - minimumShouldMatch_ = input.readInt32(); - break; - } - case 32: { - int rawValue = input.readEnum(); - com.alicloud.openservices.tablestore.core.protocol.Search.QueryOperator value = com.alicloud.openservices.tablestore.core.protocol.Search.QueryOperator.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(4, rawValue); - } else { - bitField0_ |= 0x00000008; - operator_ = value; - } + missing_ = input.readBytes(); break; } } @@ -1273,135 +1452,74 @@ void setFieldName(com.google.protobuf.ByteString value) { onChanged(); } - // optional string text = 2; - private java.lang.Object text_ = ""; - public boolean hasText() { + // optional bytes missing = 2; + private com.google.protobuf.ByteString missing_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasMissing() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public String getText() { - java.lang.Object ref = text_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - text_ = s; - return s; - } else { - return (String) ref; - } + public com.google.protobuf.ByteString getMissing() { + return missing_; } - public Builder setText(String value) { + public Builder setMissing(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; - text_ = value; + missing_ = value; onChanged(); return this; } - public Builder clearText() { + public Builder clearMissing() { bitField0_ = (bitField0_ & ~0x00000002); - text_ = getDefaultInstance().getText(); - onChanged(); - return this; - } - void setText(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000002; - text_ = value; - onChanged(); - } - - // optional int32 minimum_should_match = 3; - private int minimumShouldMatch_ ; - public boolean hasMinimumShouldMatch() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public int getMinimumShouldMatch() { - return minimumShouldMatch_; - } - public Builder setMinimumShouldMatch(int value) { - bitField0_ |= 0x00000004; - minimumShouldMatch_ = value; - onChanged(); - return this; - } - public Builder clearMinimumShouldMatch() { - bitField0_ = (bitField0_ & ~0x00000004); - minimumShouldMatch_ = 0; - onChanged(); - return this; - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.QueryOperator operator = 4; - private com.alicloud.openservices.tablestore.core.protocol.Search.QueryOperator operator_ = com.alicloud.openservices.tablestore.core.protocol.Search.QueryOperator.OR; - public boolean hasOperator() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.QueryOperator getOperator() { - return operator_; - } - public Builder setOperator(com.alicloud.openservices.tablestore.core.protocol.Search.QueryOperator value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - operator_ = value; - onChanged(); - return this; - } - public Builder clearOperator() { - bitField0_ = (bitField0_ & ~0x00000008); - operator_ = com.alicloud.openservices.tablestore.core.protocol.Search.QueryOperator.OR; + missing_ = getDefaultInstance().getMissing(); onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.MatchQuery) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.AvgAgg) } static { - defaultInstance = new MatchQuery(true); + defaultInstance = new AvgAgg(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.MatchQuery) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.AvgAgg) } - public interface MatchPhraseQueryOrBuilder + public interface CardinalityAggOrBuilder extends com.google.protobuf.MessageOrBuilder { // optional string field_name = 1; boolean hasFieldName(); String getFieldName(); - - // optional string text = 2; - boolean hasText(); - String getText(); } - public static final class MatchPhraseQuery extends + public static final class CardinalityAgg extends com.google.protobuf.GeneratedMessage - implements MatchPhraseQueryOrBuilder { - // Use MatchPhraseQuery.newBuilder() to construct. - private MatchPhraseQuery(Builder builder) { + implements CardinalityAggOrBuilder { + // Use CardinalityAgg.newBuilder() to construct. + private CardinalityAgg(Builder builder) { super(builder); } - private MatchPhraseQuery(boolean noInit) {} + private CardinalityAgg(boolean noInit) {} - private static final MatchPhraseQuery defaultInstance; - public static MatchPhraseQuery getDefaultInstance() { + private static final CardinalityAgg defaultInstance; + public static CardinalityAgg getDefaultInstance() { return defaultInstance; } - public MatchPhraseQuery getDefaultInstanceForType() { + public CardinalityAgg getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MatchPhraseQuery_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_CardinalityAgg_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MatchPhraseQuery_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_CardinalityAgg_fieldAccessorTable; } private int bitField0_; @@ -1437,41 +1555,8 @@ private com.google.protobuf.ByteString getFieldNameBytes() { } } - // optional string text = 2; - public static final int TEXT_FIELD_NUMBER = 2; - private java.lang.Object text_; - public boolean hasText() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public String getText() { - java.lang.Object ref = text_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - text_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getTextBytes() { - java.lang.Object ref = text_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - text_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - private void initFields() { fieldName_ = ""; - text_ = ""; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -1488,9 +1573,6 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getFieldNameBytes()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getTextBytes()); - } getUnknownFields().writeTo(output); } @@ -1504,10 +1586,6 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, getFieldNameBytes()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getTextBytes()); - } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -1520,41 +1598,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAgg parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAgg parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAgg parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAgg parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAgg parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAgg parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAgg parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -1563,7 +1641,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhr return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAgg parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -1574,12 +1652,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhr return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAgg parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAgg parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -1589,7 +1667,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhr public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAgg prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -1602,18 +1680,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQueryOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAggOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MatchPhraseQuery_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_CardinalityAgg_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MatchPhraseQuery_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_CardinalityAgg_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAgg.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -1634,8 +1712,6 @@ public Builder clear() { super.clear(); fieldName_ = ""; bitField0_ = (bitField0_ & ~0x00000001); - text_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -1645,24 +1721,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAgg.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAgg getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAgg.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery build() { - com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAgg build() { + com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAgg result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAgg buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAgg result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -1670,40 +1746,33 @@ private com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQue return result; } - public com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery result = new com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery(this); + public com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAgg buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAgg result = new com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAgg(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.fieldName_ = fieldName_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.text_ = text_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAgg) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAgg)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery.getDefaultInstance()) return this; + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAgg other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAgg.getDefaultInstance()) return this; if (other.hasFieldName()) { setFieldName(other.getFieldName()); } - if (other.hasText()) { - setText(other.getText()); - } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -1740,11 +1809,6 @@ public Builder mergeFrom( fieldName_ = input.readBytes(); break; } - case 18: { - bitField0_ |= 0x00000002; - text_ = input.readBytes(); - break; - } } } } @@ -1787,85 +1851,102 @@ void setFieldName(com.google.protobuf.ByteString value) { onChanged(); } - // optional string text = 2; - private java.lang.Object text_ = ""; - public boolean hasText() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public String getText() { - java.lang.Object ref = text_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - text_ = s; - return s; - } else { - return (String) ref; - } - } - public Builder setText(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - text_ = value; - onChanged(); - return this; - } - public Builder clearText() { - bitField0_ = (bitField0_ & ~0x00000002); - text_ = getDefaultInstance().getText(); - onChanged(); - return this; - } - void setText(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000002; - text_ = value; - onChanged(); - } - - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.MatchPhraseQuery) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.CardinalityAgg) } static { - defaultInstance = new MatchPhraseQuery(true); + defaultInstance = new CardinalityAgg(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.MatchPhraseQuery) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.CardinalityAgg) } - public interface MatchAllQueryOrBuilder + public interface MaxAggOrBuilder extends com.google.protobuf.MessageOrBuilder { + + // optional string field_name = 1; + boolean hasFieldName(); + String getFieldName(); + + // optional bytes missing = 2; + boolean hasMissing(); + com.google.protobuf.ByteString getMissing(); } - public static final class MatchAllQuery extends + public static final class MaxAgg extends com.google.protobuf.GeneratedMessage - implements MatchAllQueryOrBuilder { - // Use MatchAllQuery.newBuilder() to construct. - private MatchAllQuery(Builder builder) { + implements MaxAggOrBuilder { + // Use MaxAgg.newBuilder() to construct. + private MaxAgg(Builder builder) { super(builder); } - private MatchAllQuery(boolean noInit) {} + private MaxAgg(boolean noInit) {} - private static final MatchAllQuery defaultInstance; - public static MatchAllQuery getDefaultInstance() { + private static final MaxAgg defaultInstance; + public static MaxAgg getDefaultInstance() { return defaultInstance; } - public MatchAllQuery getDefaultInstanceForType() { + public MaxAgg getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MatchAllQuery_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MaxAgg_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MatchAllQuery_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MaxAgg_fieldAccessorTable; + } + + private int bitField0_; + // optional string field_name = 1; + public static final int FIELD_NAME_FIELD_NUMBER = 1; + private java.lang.Object fieldName_; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + fieldName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getFieldNameBytes() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + fieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional bytes missing = 2; + public static final int MISSING_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString missing_; + public boolean hasMissing() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getMissing() { + return missing_; } private void initFields() { + fieldName_ = ""; + missing_ = com.google.protobuf.ByteString.EMPTY; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -1879,6 +1960,12 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getFieldNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, missing_); + } getUnknownFields().writeTo(output); } @@ -1888,6 +1975,14 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getFieldNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, missing_); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -1900,41 +1995,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.MaxAgg parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.MaxAgg parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.Search.MaxAgg parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.MaxAgg parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.MaxAgg parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.MaxAgg parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.MaxAgg parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -1943,7 +2038,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchAll return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.MaxAgg parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -1954,12 +2049,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchAll return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.MaxAgg parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.MaxAgg parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -1969,7 +2064,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchAll public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.MaxAgg prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -1982,18 +2077,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQueryOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MatchAllQuery_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MaxAgg_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MatchAllQuery_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MaxAgg_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.MaxAgg.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -2012,6 +2107,10 @@ private static Builder create() { public Builder clear() { super.clear(); + fieldName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + missing_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -2021,24 +2120,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.Search.MaxAgg.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.Search.MaxAgg getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.MaxAgg.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery build() { - com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.Search.MaxAgg build() { + com.alicloud.openservices.tablestore.core.protocol.Search.MaxAgg result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.Search.MaxAgg buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.Search.MaxAgg result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -2046,23 +2145,40 @@ private com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery return result; } - public com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery result = new com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery(this); + public com.alicloud.openservices.tablestore.core.protocol.Search.MaxAgg buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.MaxAgg result = new com.alicloud.openservices.tablestore.core.protocol.Search.MaxAgg(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.fieldName_ = fieldName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.missing_ = missing_; + result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.MaxAgg) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.MaxAgg)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery.getDefaultInstance()) return this; + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.MaxAgg other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.MaxAgg.getDefaultInstance()) return this; + if (other.hasFieldName()) { + setFieldName(other.getFieldName()); + } + if (other.hasMissing()) { + setMissing(other.getMissing()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -2094,59 +2210,130 @@ public Builder mergeFrom( } break; } + case 10: { + bitField0_ |= 0x00000001; + fieldName_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + missing_ = input.readBytes(); + break; + } } } } + private int bitField0_; - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.MatchAllQuery) + // optional string field_name = 1; + private java.lang.Object fieldName_ = ""; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + fieldName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setFieldName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + return this; + } + public Builder clearFieldName() { + bitField0_ = (bitField0_ & ~0x00000001); + fieldName_ = getDefaultInstance().getFieldName(); + onChanged(); + return this; + } + void setFieldName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + } + + // optional bytes missing = 2; + private com.google.protobuf.ByteString missing_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasMissing() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getMissing() { + return missing_; + } + public Builder setMissing(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + missing_ = value; + onChanged(); + return this; + } + public Builder clearMissing() { + bitField0_ = (bitField0_ & ~0x00000002); + missing_ = getDefaultInstance().getMissing(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.MaxAgg) } static { - defaultInstance = new MatchAllQuery(true); + defaultInstance = new MaxAgg(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.MatchAllQuery) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.MaxAgg) } - public interface TermQueryOrBuilder + public interface MinAggOrBuilder extends com.google.protobuf.MessageOrBuilder { // optional string field_name = 1; boolean hasFieldName(); String getFieldName(); - // optional bytes term = 2; - boolean hasTerm(); - com.google.protobuf.ByteString getTerm(); + // optional bytes missing = 2; + boolean hasMissing(); + com.google.protobuf.ByteString getMissing(); } - public static final class TermQuery extends + public static final class MinAgg extends com.google.protobuf.GeneratedMessage - implements TermQueryOrBuilder { - // Use TermQuery.newBuilder() to construct. - private TermQuery(Builder builder) { + implements MinAggOrBuilder { + // Use MinAgg.newBuilder() to construct. + private MinAgg(Builder builder) { super(builder); } - private TermQuery(boolean noInit) {} + private MinAgg(boolean noInit) {} - private static final TermQuery defaultInstance; - public static TermQuery getDefaultInstance() { + private static final MinAgg defaultInstance; + public static MinAgg getDefaultInstance() { return defaultInstance; } - public TermQuery getDefaultInstanceForType() { + public MinAgg getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_TermQuery_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MinAgg_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_TermQuery_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MinAgg_fieldAccessorTable; } private int bitField0_; @@ -2182,19 +2369,19 @@ private com.google.protobuf.ByteString getFieldNameBytes() { } } - // optional bytes term = 2; - public static final int TERM_FIELD_NUMBER = 2; - private com.google.protobuf.ByteString term_; - public boolean hasTerm() { + // optional bytes missing = 2; + public static final int MISSING_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString missing_; + public boolean hasMissing() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public com.google.protobuf.ByteString getTerm() { - return term_; + public com.google.protobuf.ByteString getMissing() { + return missing_; } private void initFields() { fieldName_ = ""; - term_ = com.google.protobuf.ByteString.EMPTY; + missing_ = com.google.protobuf.ByteString.EMPTY; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -2212,7 +2399,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) output.writeBytes(1, getFieldNameBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, term_); + output.writeBytes(2, missing_); } getUnknownFields().writeTo(output); } @@ -2229,7 +2416,7 @@ public int getSerializedSize() { } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, term_); + .computeBytesSize(2, missing_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -2243,41 +2430,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.MinAgg parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.MinAgg parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.Search.MinAgg parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.MinAgg parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.MinAgg parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.MinAgg parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.MinAgg parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -2286,7 +2473,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.TermQuer return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.MinAgg parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -2297,12 +2484,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.TermQuer return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.MinAgg parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.MinAgg parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -2312,7 +2499,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.TermQuer public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.MinAgg prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -2325,18 +2512,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.Search.TermQueryOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.Search.MinAggOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_TermQuery_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MinAgg_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_TermQuery_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MinAgg_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.MinAgg.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -2357,7 +2544,7 @@ public Builder clear() { super.clear(); fieldName_ = ""; bitField0_ = (bitField0_ & ~0x00000001); - term_ = com.google.protobuf.ByteString.EMPTY; + missing_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -2368,24 +2555,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.Search.MinAgg.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.Search.MinAgg getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.MinAgg.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery build() { - com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.Search.MinAgg build() { + com.alicloud.openservices.tablestore.core.protocol.Search.MinAgg result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.Search.MinAgg buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.Search.MinAgg result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -2393,8 +2580,8 @@ private com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery buil return result; } - public com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery result = new com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery(this); + public com.alicloud.openservices.tablestore.core.protocol.Search.MinAgg buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.MinAgg result = new com.alicloud.openservices.tablestore.core.protocol.Search.MinAgg(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { @@ -2404,28 +2591,28 @@ public com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery build if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - result.term_ = term_; + result.missing_ = missing_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.MinAgg) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.MinAgg)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery.getDefaultInstance()) return this; + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.MinAgg other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.MinAgg.getDefaultInstance()) return this; if (other.hasFieldName()) { setFieldName(other.getFieldName()); } - if (other.hasTerm()) { - setTerm(other.getTerm()); + if (other.hasMissing()) { + setMissing(other.getMissing()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -2465,7 +2652,7 @@ public Builder mergeFrom( } case 18: { bitField0_ |= 0x00000002; - term_ = input.readBytes(); + missing_ = input.readBytes(); break; } } @@ -2510,79 +2697,78 @@ void setFieldName(com.google.protobuf.ByteString value) { onChanged(); } - // optional bytes term = 2; - private com.google.protobuf.ByteString term_ = com.google.protobuf.ByteString.EMPTY; - public boolean hasTerm() { + // optional bytes missing = 2; + private com.google.protobuf.ByteString missing_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasMissing() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public com.google.protobuf.ByteString getTerm() { - return term_; + public com.google.protobuf.ByteString getMissing() { + return missing_; } - public Builder setTerm(com.google.protobuf.ByteString value) { + public Builder setMissing(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; - term_ = value; + missing_ = value; onChanged(); return this; } - public Builder clearTerm() { + public Builder clearMissing() { bitField0_ = (bitField0_ & ~0x00000002); - term_ = getDefaultInstance().getTerm(); + missing_ = getDefaultInstance().getMissing(); onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.TermQuery) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.MinAgg) } static { - defaultInstance = new TermQuery(true); + defaultInstance = new MinAgg(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.TermQuery) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.MinAgg) } - public interface TermsQueryOrBuilder + public interface SumAggOrBuilder extends com.google.protobuf.MessageOrBuilder { // optional string field_name = 1; boolean hasFieldName(); String getFieldName(); - // repeated bytes terms = 2; - java.util.List getTermsList(); - int getTermsCount(); - com.google.protobuf.ByteString getTerms(int index); + // optional bytes missing = 2; + boolean hasMissing(); + com.google.protobuf.ByteString getMissing(); } - public static final class TermsQuery extends + public static final class SumAgg extends com.google.protobuf.GeneratedMessage - implements TermsQueryOrBuilder { - // Use TermsQuery.newBuilder() to construct. - private TermsQuery(Builder builder) { + implements SumAggOrBuilder { + // Use SumAgg.newBuilder() to construct. + private SumAgg(Builder builder) { super(builder); } - private TermsQuery(boolean noInit) {} + private SumAgg(boolean noInit) {} - private static final TermsQuery defaultInstance; - public static TermsQuery getDefaultInstance() { + private static final SumAgg defaultInstance; + public static SumAgg getDefaultInstance() { return defaultInstance; } - public TermsQuery getDefaultInstanceForType() { + public SumAgg getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_TermsQuery_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SumAgg_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_TermsQuery_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SumAgg_fieldAccessorTable; } private int bitField0_; @@ -2618,23 +2804,19 @@ private com.google.protobuf.ByteString getFieldNameBytes() { } } - // repeated bytes terms = 2; - public static final int TERMS_FIELD_NUMBER = 2; - private java.util.List terms_; - public java.util.List - getTermsList() { - return terms_; + // optional bytes missing = 2; + public static final int MISSING_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString missing_; + public boolean hasMissing() { + return ((bitField0_ & 0x00000002) == 0x00000002); } - public int getTermsCount() { - return terms_.size(); - } - public com.google.protobuf.ByteString getTerms(int index) { - return terms_.get(index); + public com.google.protobuf.ByteString getMissing() { + return missing_; } private void initFields() { fieldName_ = ""; - terms_ = java.util.Collections.emptyList();; + missing_ = com.google.protobuf.ByteString.EMPTY; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -2651,8 +2833,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getFieldNameBytes()); } - for (int i = 0; i < terms_.size(); i++) { - output.writeBytes(2, terms_.get(i)); + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, missing_); } getUnknownFields().writeTo(output); } @@ -2667,14 +2849,9 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, getFieldNameBytes()); } - { - int dataSize = 0; - for (int i = 0; i < terms_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeBytesSizeNoTag(terms_.get(i)); - } - size += dataSize; - size += 1 * getTermsList().size(); + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, missing_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -2688,41 +2865,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.SumAgg parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.SumAgg parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.Search.SumAgg parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.SumAgg parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.SumAgg parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.SumAgg parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.SumAgg parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -2731,7 +2908,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.TermsQue return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.SumAgg parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -2742,12 +2919,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.TermsQue return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.SumAgg parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.SumAgg parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -2757,7 +2934,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.TermsQue public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.SumAgg prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -2770,18 +2947,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.Search.TermsQueryOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.Search.SumAggOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_TermsQuery_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SumAgg_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_TermsQuery_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SumAgg_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.SumAgg.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -2802,7 +2979,7 @@ public Builder clear() { super.clear(); fieldName_ = ""; bitField0_ = (bitField0_ & ~0x00000001); - terms_ = java.util.Collections.emptyList();; + missing_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -2813,24 +2990,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.Search.SumAgg.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.Search.SumAgg getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.SumAgg.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery build() { - com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.Search.SumAgg build() { + com.alicloud.openservices.tablestore.core.protocol.Search.SumAgg result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.Search.SumAgg buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.Search.SumAgg result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -2838,47 +3015,39 @@ private com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery bui return result; } - public com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery result = new com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery(this); + public com.alicloud.openservices.tablestore.core.protocol.Search.SumAgg buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.SumAgg result = new com.alicloud.openservices.tablestore.core.protocol.Search.SumAgg(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.fieldName_ = fieldName_; - if (((bitField0_ & 0x00000002) == 0x00000002)) { - terms_ = java.util.Collections.unmodifiableList(terms_); - bitField0_ = (bitField0_ & ~0x00000002); + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; } - result.terms_ = terms_; + result.missing_ = missing_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.SumAgg) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.SumAgg)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery.getDefaultInstance()) return this; + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.SumAgg other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.SumAgg.getDefaultInstance()) return this; if (other.hasFieldName()) { setFieldName(other.getFieldName()); } - if (!other.terms_.isEmpty()) { - if (terms_.isEmpty()) { - terms_ = other.terms_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureTermsIsMutable(); - terms_.addAll(other.terms_); - } - onChanged(); + if (other.hasMissing()) { + setMissing(other.getMissing()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -2917,8 +3086,8 @@ public Builder mergeFrom( break; } case 18: { - ensureTermsIsMutable(); - terms_.add(input.readBytes()); + bitField0_ |= 0x00000002; + missing_ = input.readBytes(); break; } } @@ -2963,117 +3132,83 @@ void setFieldName(com.google.protobuf.ByteString value) { onChanged(); } - // repeated bytes terms = 2; - private java.util.List terms_ = java.util.Collections.emptyList();; - private void ensureTermsIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - terms_ = new java.util.ArrayList(terms_); - bitField0_ |= 0x00000002; - } - } - public java.util.List - getTermsList() { - return java.util.Collections.unmodifiableList(terms_); - } - public int getTermsCount() { - return terms_.size(); - } - public com.google.protobuf.ByteString getTerms(int index) { - return terms_.get(index); + // optional bytes missing = 2; + private com.google.protobuf.ByteString missing_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasMissing() { + return ((bitField0_ & 0x00000002) == 0x00000002); } - public Builder setTerms( - int index, com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - ensureTermsIsMutable(); - terms_.set(index, value); - onChanged(); - return this; + public com.google.protobuf.ByteString getMissing() { + return missing_; } - public Builder addTerms(com.google.protobuf.ByteString value) { + public Builder setMissing(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - ensureTermsIsMutable(); - terms_.add(value); - onChanged(); - return this; - } - public Builder addAllTerms( - java.lang.Iterable values) { - ensureTermsIsMutable(); - super.addAll(values, terms_); + bitField0_ |= 0x00000002; + missing_ = value; onChanged(); return this; } - public Builder clearTerms() { - terms_ = java.util.Collections.emptyList();; + public Builder clearMissing() { bitField0_ = (bitField0_ & ~0x00000002); + missing_ = getDefaultInstance().getMissing(); onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.TermsQuery) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.SumAgg) } static { - defaultInstance = new TermsQuery(true); + defaultInstance = new SumAgg(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.TermsQuery) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.SumAgg) } - public interface RangeQueryOrBuilder + public interface TermsAggOrBuilder extends com.google.protobuf.MessageOrBuilder { // optional string field_name = 1; boolean hasFieldName(); String getFieldName(); - // optional bytes range_from = 2; - boolean hasRangeFrom(); - com.google.protobuf.ByteString getRangeFrom(); - - // optional bytes range_to = 3; - boolean hasRangeTo(); - com.google.protobuf.ByteString getRangeTo(); - - // optional bool include_lower = 4; - boolean hasIncludeLower(); - boolean getIncludeLower(); + // optional int32 size = 2; + boolean hasSize(); + int getSize(); - // optional bool include_upper = 5; - boolean hasIncludeUpper(); - boolean getIncludeUpper(); + // optional .com.alicloud.openservices.tablestore.core.protocol.Agg agg = 3; + boolean hasAgg(); + com.alicloud.openservices.tablestore.core.protocol.Search.Agg getAgg(); + com.alicloud.openservices.tablestore.core.protocol.Search.AggOrBuilder getAggOrBuilder(); } - public static final class RangeQuery extends + public static final class TermsAgg extends com.google.protobuf.GeneratedMessage - implements RangeQueryOrBuilder { - // Use RangeQuery.newBuilder() to construct. - private RangeQuery(Builder builder) { + implements TermsAggOrBuilder { + // Use TermsAgg.newBuilder() to construct. + private TermsAgg(Builder builder) { super(builder); } - private RangeQuery(boolean noInit) {} + private TermsAgg(boolean noInit) {} - private static final RangeQuery defaultInstance; - public static RangeQuery getDefaultInstance() { + private static final TermsAgg defaultInstance; + public static TermsAgg getDefaultInstance() { return defaultInstance; } - public RangeQuery getDefaultInstanceForType() { + public TermsAgg getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_RangeQuery_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_TermsAgg_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_RangeQuery_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_TermsAgg_fieldAccessorTable; } private int bitField0_; @@ -3109,52 +3244,33 @@ private com.google.protobuf.ByteString getFieldNameBytes() { } } - // optional bytes range_from = 2; - public static final int RANGE_FROM_FIELD_NUMBER = 2; - private com.google.protobuf.ByteString rangeFrom_; - public boolean hasRangeFrom() { + // optional int32 size = 2; + public static final int SIZE_FIELD_NUMBER = 2; + private int size_; + public boolean hasSize() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public com.google.protobuf.ByteString getRangeFrom() { - return rangeFrom_; + public int getSize() { + return size_; } - // optional bytes range_to = 3; - public static final int RANGE_TO_FIELD_NUMBER = 3; - private com.google.protobuf.ByteString rangeTo_; - public boolean hasRangeTo() { + // optional .com.alicloud.openservices.tablestore.core.protocol.Agg agg = 3; + public static final int AGG_FIELD_NUMBER = 3; + private com.alicloud.openservices.tablestore.core.protocol.Search.Agg agg_; + public boolean hasAgg() { return ((bitField0_ & 0x00000004) == 0x00000004); } - public com.google.protobuf.ByteString getRangeTo() { - return rangeTo_; - } - - // optional bool include_lower = 4; - public static final int INCLUDE_LOWER_FIELD_NUMBER = 4; - private boolean includeLower_; - public boolean hasIncludeLower() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public boolean getIncludeLower() { - return includeLower_; - } - - // optional bool include_upper = 5; - public static final int INCLUDE_UPPER_FIELD_NUMBER = 5; - private boolean includeUpper_; - public boolean hasIncludeUpper() { - return ((bitField0_ & 0x00000010) == 0x00000010); + public com.alicloud.openservices.tablestore.core.protocol.Search.Agg getAgg() { + return agg_; } - public boolean getIncludeUpper() { - return includeUpper_; + public com.alicloud.openservices.tablestore.core.protocol.Search.AggOrBuilder getAggOrBuilder() { + return agg_; } private void initFields() { fieldName_ = ""; - rangeFrom_ = com.google.protobuf.ByteString.EMPTY; - rangeTo_ = com.google.protobuf.ByteString.EMPTY; - includeLower_ = false; - includeUpper_ = false; + size_ = 0; + agg_ = com.alicloud.openservices.tablestore.core.protocol.Search.Agg.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -3172,16 +3288,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) output.writeBytes(1, getFieldNameBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, rangeFrom_); + output.writeInt32(2, size_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeBytes(3, rangeTo_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeBool(4, includeLower_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeBool(5, includeUpper_); + output.writeMessage(3, agg_); } getUnknownFields().writeTo(output); } @@ -3198,19 +3308,11 @@ public int getSerializedSize() { } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, rangeFrom_); + .computeInt32Size(2, size_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(3, rangeTo_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(4, includeLower_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(5, includeUpper_); + .computeMessageSize(3, agg_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -3224,41 +3326,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.TermsAgg parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.TermsAgg parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.Search.TermsAgg parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.TermsAgg parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.TermsAgg parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.TermsAgg parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.TermsAgg parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -3267,7 +3369,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.RangeQue return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.TermsAgg parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -3278,12 +3380,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.RangeQue return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.TermsAgg parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.TermsAgg parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -3293,7 +3395,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.RangeQue public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.TermsAgg prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -3306,18 +3408,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.Search.RangeQueryOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.Search.TermsAggOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_RangeQuery_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_TermsAgg_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_RangeQuery_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_TermsAgg_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.TermsAgg.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -3328,6 +3430,7 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getAggFieldBuilder(); } } private static Builder create() { @@ -3338,14 +3441,14 @@ public Builder clear() { super.clear(); fieldName_ = ""; bitField0_ = (bitField0_ & ~0x00000001); - rangeFrom_ = com.google.protobuf.ByteString.EMPTY; + size_ = 0; bitField0_ = (bitField0_ & ~0x00000002); - rangeTo_ = com.google.protobuf.ByteString.EMPTY; + if (aggBuilder_ == null) { + agg_ = com.alicloud.openservices.tablestore.core.protocol.Search.Agg.getDefaultInstance(); + } else { + aggBuilder_.clear(); + } bitField0_ = (bitField0_ & ~0x00000004); - includeLower_ = false; - bitField0_ = (bitField0_ & ~0x00000008); - includeUpper_ = false; - bitField0_ = (bitField0_ & ~0x00000010); return this; } @@ -3355,24 +3458,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.Search.TermsAgg.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.Search.TermsAgg getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.TermsAgg.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery build() { - com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.Search.TermsAgg build() { + com.alicloud.openservices.tablestore.core.protocol.Search.TermsAgg result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.Search.TermsAgg buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.Search.TermsAgg result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -3380,8 +3483,8 @@ private com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery bui return result; } - public com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery result = new com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery(this); + public com.alicloud.openservices.tablestore.core.protocol.Search.TermsAgg buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.TermsAgg result = new com.alicloud.openservices.tablestore.core.protocol.Search.TermsAgg(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { @@ -3391,49 +3494,39 @@ public com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery buil if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - result.rangeFrom_ = rangeFrom_; + result.size_ = size_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } - result.rangeTo_ = rangeTo_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - result.includeLower_ = includeLower_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000010; + if (aggBuilder_ == null) { + result.agg_ = agg_; + } else { + result.agg_ = aggBuilder_.build(); } - result.includeUpper_ = includeUpper_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.TermsAgg) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.TermsAgg)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery.getDefaultInstance()) return this; + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.TermsAgg other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.TermsAgg.getDefaultInstance()) return this; if (other.hasFieldName()) { setFieldName(other.getFieldName()); } - if (other.hasRangeFrom()) { - setRangeFrom(other.getRangeFrom()); - } - if (other.hasRangeTo()) { - setRangeTo(other.getRangeTo()); - } - if (other.hasIncludeLower()) { - setIncludeLower(other.getIncludeLower()); + if (other.hasSize()) { + setSize(other.getSize()); } - if (other.hasIncludeUpper()) { - setIncludeUpper(other.getIncludeUpper()); + if (other.hasAgg()) { + mergeAgg(other.getAgg()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -3471,24 +3564,18 @@ public Builder mergeFrom( fieldName_ = input.readBytes(); break; } - case 18: { + case 16: { bitField0_ |= 0x00000002; - rangeFrom_ = input.readBytes(); + size_ = input.readInt32(); break; } case 26: { - bitField0_ |= 0x00000004; - rangeTo_ = input.readBytes(); - break; - } - case 32: { - bitField0_ |= 0x00000008; - includeLower_ = input.readBool(); - break; - } - case 40: { - bitField0_ |= 0x00000010; - includeUpper_ = input.readBool(); + com.alicloud.openservices.tablestore.core.protocol.Search.Agg.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.Agg.newBuilder(); + if (hasAgg()) { + subBuilder.mergeFrom(getAgg()); + } + input.readMessage(subBuilder, extensionRegistry); + setAgg(subBuilder.buildPartial()); break; } } @@ -3533,214 +3620,199 @@ void setFieldName(com.google.protobuf.ByteString value) { onChanged(); } - // optional bytes range_from = 2; - private com.google.protobuf.ByteString rangeFrom_ = com.google.protobuf.ByteString.EMPTY; - public boolean hasRangeFrom() { + // optional int32 size = 2; + private int size_ ; + public boolean hasSize() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public com.google.protobuf.ByteString getRangeFrom() { - return rangeFrom_; + public int getSize() { + return size_; } - public Builder setRangeFrom(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - rangeFrom_ = value; + public Builder setSize(int value) { + bitField0_ |= 0x00000002; + size_ = value; onChanged(); return this; } - public Builder clearRangeFrom() { + public Builder clearSize() { bitField0_ = (bitField0_ & ~0x00000002); - rangeFrom_ = getDefaultInstance().getRangeFrom(); + size_ = 0; onChanged(); return this; } - // optional bytes range_to = 3; - private com.google.protobuf.ByteString rangeTo_ = com.google.protobuf.ByteString.EMPTY; - public boolean hasRangeTo() { + // optional .com.alicloud.openservices.tablestore.core.protocol.Agg agg = 3; + private com.alicloud.openservices.tablestore.core.protocol.Search.Agg agg_ = com.alicloud.openservices.tablestore.core.protocol.Search.Agg.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Agg, com.alicloud.openservices.tablestore.core.protocol.Search.Agg.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggOrBuilder> aggBuilder_; + public boolean hasAgg() { return ((bitField0_ & 0x00000004) == 0x00000004); } - public com.google.protobuf.ByteString getRangeTo() { - return rangeTo_; + public com.alicloud.openservices.tablestore.core.protocol.Search.Agg getAgg() { + if (aggBuilder_ == null) { + return agg_; + } else { + return aggBuilder_.getMessage(); + } } - public Builder setRangeTo(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - rangeTo_ = value; - onChanged(); + public Builder setAgg(com.alicloud.openservices.tablestore.core.protocol.Search.Agg value) { + if (aggBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + agg_ = value; + onChanged(); + } else { + aggBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; return this; } - public Builder clearRangeTo() { - bitField0_ = (bitField0_ & ~0x00000004); - rangeTo_ = getDefaultInstance().getRangeTo(); - onChanged(); + public Builder setAgg( + com.alicloud.openservices.tablestore.core.protocol.Search.Agg.Builder builderForValue) { + if (aggBuilder_ == null) { + agg_ = builderForValue.build(); + onChanged(); + } else { + aggBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; return this; } - - // optional bool include_lower = 4; - private boolean includeLower_ ; - public boolean hasIncludeLower() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public boolean getIncludeLower() { - return includeLower_; - } - public Builder setIncludeLower(boolean value) { - bitField0_ |= 0x00000008; - includeLower_ = value; - onChanged(); + public Builder mergeAgg(com.alicloud.openservices.tablestore.core.protocol.Search.Agg value) { + if (aggBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004) && + agg_ != com.alicloud.openservices.tablestore.core.protocol.Search.Agg.getDefaultInstance()) { + agg_ = + com.alicloud.openservices.tablestore.core.protocol.Search.Agg.newBuilder(agg_).mergeFrom(value).buildPartial(); + } else { + agg_ = value; + } + onChanged(); + } else { + aggBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; return this; } - public Builder clearIncludeLower() { - bitField0_ = (bitField0_ & ~0x00000008); - includeLower_ = false; - onChanged(); + public Builder clearAgg() { + if (aggBuilder_ == null) { + agg_ = com.alicloud.openservices.tablestore.core.protocol.Search.Agg.getDefaultInstance(); + onChanged(); + } else { + aggBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); return this; } - - // optional bool include_upper = 5; - private boolean includeUpper_ ; - public boolean hasIncludeUpper() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - public boolean getIncludeUpper() { - return includeUpper_; - } - public Builder setIncludeUpper(boolean value) { - bitField0_ |= 0x00000010; - includeUpper_ = value; + public com.alicloud.openservices.tablestore.core.protocol.Search.Agg.Builder getAggBuilder() { + bitField0_ |= 0x00000004; onChanged(); - return this; + return getAggFieldBuilder().getBuilder(); } - public Builder clearIncludeUpper() { - bitField0_ = (bitField0_ & ~0x00000010); - includeUpper_ = false; - onChanged(); - return this; + public com.alicloud.openservices.tablestore.core.protocol.Search.AggOrBuilder getAggOrBuilder() { + if (aggBuilder_ != null) { + return aggBuilder_.getMessageOrBuilder(); + } else { + return agg_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Agg, com.alicloud.openservices.tablestore.core.protocol.Search.Agg.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggOrBuilder> + getAggFieldBuilder() { + if (aggBuilder_ == null) { + aggBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Agg, com.alicloud.openservices.tablestore.core.protocol.Search.Agg.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggOrBuilder>( + agg_, + getParentForChildren(), + isClean()); + agg_ = null; + } + return aggBuilder_; } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.RangeQuery) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.TermsAgg) } static { - defaultInstance = new RangeQuery(true); + defaultInstance = new TermsAgg(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.RangeQuery) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.TermsAgg) } - public interface PrefixQueryOrBuilder + public interface FilterAggOrBuilder extends com.google.protobuf.MessageOrBuilder { - // optional string field_name = 1; - boolean hasFieldName(); - String getFieldName(); + // optional .com.alicloud.openservices.tablestore.core.protocol.Query filter = 1; + boolean hasFilter(); + com.alicloud.openservices.tablestore.core.protocol.Search.Query getFilter(); + com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getFilterOrBuilder(); - // optional string prefix = 2; - boolean hasPrefix(); - String getPrefix(); + // optional .com.alicloud.openservices.tablestore.core.protocol.Agg agg = 2; + boolean hasAgg(); + com.alicloud.openservices.tablestore.core.protocol.Search.Agg getAgg(); + com.alicloud.openservices.tablestore.core.protocol.Search.AggOrBuilder getAggOrBuilder(); } - public static final class PrefixQuery extends + public static final class FilterAgg extends com.google.protobuf.GeneratedMessage - implements PrefixQueryOrBuilder { - // Use PrefixQuery.newBuilder() to construct. - private PrefixQuery(Builder builder) { + implements FilterAggOrBuilder { + // Use FilterAgg.newBuilder() to construct. + private FilterAgg(Builder builder) { super(builder); } - private PrefixQuery(boolean noInit) {} + private FilterAgg(boolean noInit) {} - private static final PrefixQuery defaultInstance; - public static PrefixQuery getDefaultInstance() { + private static final FilterAgg defaultInstance; + public static FilterAgg getDefaultInstance() { return defaultInstance; } - public PrefixQuery getDefaultInstanceForType() { + public FilterAgg getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_PrefixQuery_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_FilterAgg_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_PrefixQuery_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_FilterAgg_fieldAccessorTable; } private int bitField0_; - // optional string field_name = 1; - public static final int FIELD_NAME_FIELD_NUMBER = 1; - private java.lang.Object fieldName_; - public boolean hasFieldName() { + // optional .com.alicloud.openservices.tablestore.core.protocol.Query filter = 1; + public static final int FILTER_FIELD_NUMBER = 1; + private com.alicloud.openservices.tablestore.core.protocol.Search.Query filter_; + public boolean hasFilter() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getFieldName() { - java.lang.Object ref = fieldName_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - fieldName_ = s; - } - return s; - } + public com.alicloud.openservices.tablestore.core.protocol.Search.Query getFilter() { + return filter_; } - private com.google.protobuf.ByteString getFieldNameBytes() { - java.lang.Object ref = fieldName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - fieldName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getFilterOrBuilder() { + return filter_; } - // optional string prefix = 2; - public static final int PREFIX_FIELD_NUMBER = 2; - private java.lang.Object prefix_; - public boolean hasPrefix() { + // optional .com.alicloud.openservices.tablestore.core.protocol.Agg agg = 2; + public static final int AGG_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.Search.Agg agg_; + public boolean hasAgg() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public String getPrefix() { - java.lang.Object ref = prefix_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - prefix_ = s; - } - return s; - } + public com.alicloud.openservices.tablestore.core.protocol.Search.Agg getAgg() { + return agg_; } - private com.google.protobuf.ByteString getPrefixBytes() { - java.lang.Object ref = prefix_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - prefix_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggOrBuilder getAggOrBuilder() { + return agg_; } private void initFields() { - fieldName_ = ""; - prefix_ = ""; + filter_ = com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance(); + agg_ = com.alicloud.openservices.tablestore.core.protocol.Search.Agg.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -3755,10 +3827,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getFieldNameBytes()); + output.writeMessage(1, filter_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getPrefixBytes()); + output.writeMessage(2, agg_); } getUnknownFields().writeTo(output); } @@ -3771,11 +3843,11 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getFieldNameBytes()); + .computeMessageSize(1, filter_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getPrefixBytes()); + .computeMessageSize(2, agg_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -3789,41 +3861,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.FilterAgg parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.FilterAgg parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.Search.FilterAgg parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.FilterAgg parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.FilterAgg parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.FilterAgg parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.FilterAgg parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -3832,7 +3904,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQu return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.FilterAgg parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -3843,12 +3915,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQu return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.FilterAgg parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.FilterAgg parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -3858,7 +3930,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQu public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.FilterAgg prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -3871,18 +3943,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQueryOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.Search.FilterAggOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_PrefixQuery_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_FilterAgg_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_PrefixQuery_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_FilterAgg_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.FilterAgg.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -3893,6 +3965,8 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getFilterFieldBuilder(); + getAggFieldBuilder(); } } private static Builder create() { @@ -3901,9 +3975,17 @@ private static Builder create() { public Builder clear() { super.clear(); - fieldName_ = ""; + if (filterBuilder_ == null) { + filter_ = com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance(); + } else { + filterBuilder_.clear(); + } bitField0_ = (bitField0_ & ~0x00000001); - prefix_ = ""; + if (aggBuilder_ == null) { + agg_ = com.alicloud.openservices.tablestore.core.protocol.Search.Agg.getDefaultInstance(); + } else { + aggBuilder_.clear(); + } bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -3914,24 +3996,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.Search.FilterAgg.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.Search.FilterAgg getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.FilterAgg.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery build() { - com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.Search.FilterAgg build() { + com.alicloud.openservices.tablestore.core.protocol.Search.FilterAgg result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.Search.FilterAgg buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.Search.FilterAgg result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -3939,39 +4021,47 @@ private com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery bu return result; } - public com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery result = new com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery(this); + public com.alicloud.openservices.tablestore.core.protocol.Search.FilterAgg buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.FilterAgg result = new com.alicloud.openservices.tablestore.core.protocol.Search.FilterAgg(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.fieldName_ = fieldName_; + if (filterBuilder_ == null) { + result.filter_ = filter_; + } else { + result.filter_ = filterBuilder_.build(); + } if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - result.prefix_ = prefix_; + if (aggBuilder_ == null) { + result.agg_ = agg_; + } else { + result.agg_ = aggBuilder_.build(); + } result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.FilterAgg) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.FilterAgg)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery.getDefaultInstance()) return this; - if (other.hasFieldName()) { - setFieldName(other.getFieldName()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.FilterAgg other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.FilterAgg.getDefaultInstance()) return this; + if (other.hasFilter()) { + mergeFilter(other.getFilter()); } - if (other.hasPrefix()) { - setPrefix(other.getPrefix()); + if (other.hasAgg()) { + mergeAgg(other.getAgg()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -4005,13 +4095,21 @@ public Builder mergeFrom( break; } case 10: { - bitField0_ |= 0x00000001; - fieldName_ = input.readBytes(); + com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.Query.newBuilder(); + if (hasFilter()) { + subBuilder.mergeFrom(getFilter()); + } + input.readMessage(subBuilder, extensionRegistry); + setFilter(subBuilder.buildPartial()); break; } case 18: { - bitField0_ |= 0x00000002; - prefix_ = input.readBytes(); + com.alicloud.openservices.tablestore.core.protocol.Search.Agg.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.Agg.newBuilder(); + if (hasAgg()) { + subBuilder.mergeFrom(getAgg()); + } + input.readMessage(subBuilder, extensionRegistry); + setAgg(subBuilder.buildPartial()); break; } } @@ -4020,169 +4118,241 @@ public Builder mergeFrom( private int bitField0_; - // optional string field_name = 1; - private java.lang.Object fieldName_ = ""; - public boolean hasFieldName() { + // optional .com.alicloud.openservices.tablestore.core.protocol.Query filter = 1; + private com.alicloud.openservices.tablestore.core.protocol.Search.Query filter_ = com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder> filterBuilder_; + public boolean hasFilter() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getFieldName() { - java.lang.Object ref = fieldName_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - fieldName_ = s; - return s; + public com.alicloud.openservices.tablestore.core.protocol.Search.Query getFilter() { + if (filterBuilder_ == null) { + return filter_; } else { - return (String) ref; + return filterBuilder_.getMessage(); } } - public Builder setFieldName(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - fieldName_ = value; - onChanged(); + public Builder setFilter(com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { + if (filterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + onChanged(); + } else { + filterBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; return this; } - public Builder clearFieldName() { + public Builder setFilter( + com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder builderForValue) { + if (filterBuilder_ == null) { + filter_ = builderForValue.build(); + onChanged(); + } else { + filterBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder mergeFilter(com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { + if (filterBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001) && + filter_ != com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance()) { + filter_ = + com.alicloud.openservices.tablestore.core.protocol.Search.Query.newBuilder(filter_).mergeFrom(value).buildPartial(); + } else { + filter_ = value; + } + onChanged(); + } else { + filterBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder clearFilter() { + if (filterBuilder_ == null) { + filter_ = com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance(); + onChanged(); + } else { + filterBuilder_.clear(); + } bitField0_ = (bitField0_ & ~0x00000001); - fieldName_ = getDefaultInstance().getFieldName(); - onChanged(); return this; } - void setFieldName(com.google.protobuf.ByteString value) { + public com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder getFilterBuilder() { bitField0_ |= 0x00000001; - fieldName_ = value; onChanged(); + return getFilterFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getFilterOrBuilder() { + if (filterBuilder_ != null) { + return filterBuilder_.getMessageOrBuilder(); + } else { + return filter_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder> + getFilterFieldBuilder() { + if (filterBuilder_ == null) { + filterBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder>( + filter_, + getParentForChildren(), + isClean()); + filter_ = null; + } + return filterBuilder_; } - // optional string prefix = 2; - private java.lang.Object prefix_ = ""; - public boolean hasPrefix() { + // optional .com.alicloud.openservices.tablestore.core.protocol.Agg agg = 2; + private com.alicloud.openservices.tablestore.core.protocol.Search.Agg agg_ = com.alicloud.openservices.tablestore.core.protocol.Search.Agg.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Agg, com.alicloud.openservices.tablestore.core.protocol.Search.Agg.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggOrBuilder> aggBuilder_; + public boolean hasAgg() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public String getPrefix() { - java.lang.Object ref = prefix_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - prefix_ = s; - return s; + public com.alicloud.openservices.tablestore.core.protocol.Search.Agg getAgg() { + if (aggBuilder_ == null) { + return agg_; } else { - return (String) ref; + return aggBuilder_.getMessage(); } } - public Builder setPrefix(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - prefix_ = value; - onChanged(); + public Builder setAgg(com.alicloud.openservices.tablestore.core.protocol.Search.Agg value) { + if (aggBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + agg_ = value; + onChanged(); + } else { + aggBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; return this; } - public Builder clearPrefix() { - bitField0_ = (bitField0_ & ~0x00000002); - prefix_ = getDefaultInstance().getPrefix(); - onChanged(); - return this; + public Builder setAgg( + com.alicloud.openservices.tablestore.core.protocol.Search.Agg.Builder builderForValue) { + if (aggBuilder_ == null) { + agg_ = builderForValue.build(); + onChanged(); + } else { + aggBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + return this; } - void setPrefix(com.google.protobuf.ByteString value) { + public Builder mergeAgg(com.alicloud.openservices.tablestore.core.protocol.Search.Agg value) { + if (aggBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002) && + agg_ != com.alicloud.openservices.tablestore.core.protocol.Search.Agg.getDefaultInstance()) { + agg_ = + com.alicloud.openservices.tablestore.core.protocol.Search.Agg.newBuilder(agg_).mergeFrom(value).buildPartial(); + } else { + agg_ = value; + } + onChanged(); + } else { + aggBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder clearAgg() { + if (aggBuilder_ == null) { + agg_ = com.alicloud.openservices.tablestore.core.protocol.Search.Agg.getDefaultInstance(); + onChanged(); + } else { + aggBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Agg.Builder getAggBuilder() { bitField0_ |= 0x00000002; - prefix_ = value; onChanged(); + return getAggFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggOrBuilder getAggOrBuilder() { + if (aggBuilder_ != null) { + return aggBuilder_.getMessageOrBuilder(); + } else { + return agg_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Agg, com.alicloud.openservices.tablestore.core.protocol.Search.Agg.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggOrBuilder> + getAggFieldBuilder() { + if (aggBuilder_ == null) { + aggBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Agg, com.alicloud.openservices.tablestore.core.protocol.Search.Agg.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggOrBuilder>( + agg_, + getParentForChildren(), + isClean()); + agg_ = null; + } + return aggBuilder_; } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.PrefixQuery) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.FilterAgg) } static { - defaultInstance = new PrefixQuery(true); + defaultInstance = new FilterAgg(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.PrefixQuery) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.FilterAgg) } - public interface WildcardQueryOrBuilder + public interface NestedPathOrBuilder extends com.google.protobuf.MessageOrBuilder { - // optional string field_name = 1; - boolean hasFieldName(); - String getFieldName(); - - // optional string value = 2; - boolean hasValue(); - String getValue(); + // optional string path = 1; + boolean hasPath(); + String getPath(); } - public static final class WildcardQuery extends + public static final class NestedPath extends com.google.protobuf.GeneratedMessage - implements WildcardQueryOrBuilder { - // Use WildcardQuery.newBuilder() to construct. - private WildcardQuery(Builder builder) { + implements NestedPathOrBuilder { + // Use NestedPath.newBuilder() to construct. + private NestedPath(Builder builder) { super(builder); } - private WildcardQuery(boolean noInit) {} + private NestedPath(boolean noInit) {} - private static final WildcardQuery defaultInstance; - public static WildcardQuery getDefaultInstance() { + private static final NestedPath defaultInstance; + public static NestedPath getDefaultInstance() { return defaultInstance; } - public WildcardQuery getDefaultInstanceForType() { + public NestedPath getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_WildcardQuery_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_NestedPath_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_WildcardQuery_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_NestedPath_fieldAccessorTable; } private int bitField0_; - // optional string field_name = 1; - public static final int FIELD_NAME_FIELD_NUMBER = 1; - private java.lang.Object fieldName_; - public boolean hasFieldName() { + // optional string path = 1; + public static final int PATH_FIELD_NUMBER = 1; + private java.lang.Object path_; + public boolean hasPath() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getFieldName() { - java.lang.Object ref = fieldName_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - fieldName_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getFieldNameBytes() { - java.lang.Object ref = fieldName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - fieldName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // optional string value = 2; - public static final int VALUE_FIELD_NUMBER = 2; - private java.lang.Object value_; - public boolean hasValue() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public String getValue() { - java.lang.Object ref = value_; + public String getPath() { + java.lang.Object ref = path_; if (ref instanceof String) { return (String) ref; } else { @@ -4190,17 +4360,17 @@ public String getValue() { (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); if (com.google.protobuf.Internal.isValidUtf8(bs)) { - value_ = s; + path_ = s; } return s; } } - private com.google.protobuf.ByteString getValueBytes() { - java.lang.Object ref = value_; + private com.google.protobuf.ByteString getPathBytes() { + java.lang.Object ref = path_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((String) ref); - value_ = b; + path_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -4208,8 +4378,7 @@ private com.google.protobuf.ByteString getValueBytes() { } private void initFields() { - fieldName_ = ""; - value_ = ""; + path_ = ""; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -4224,10 +4393,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getFieldNameBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getValueBytes()); + output.writeBytes(1, getPathBytes()); } getUnknownFields().writeTo(output); } @@ -4240,11 +4406,7 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getFieldNameBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getValueBytes()); + .computeBytesSize(1, getPathBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -4258,41 +4420,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -4301,7 +4463,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.Wildcard return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -4312,12 +4474,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.Wildcard return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -4327,7 +4489,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.Wildcard public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -4340,18 +4502,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQueryOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.Search.NestedPathOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_WildcardQuery_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_NestedPath_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_WildcardQuery_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_NestedPath_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -4370,10 +4532,8 @@ private static Builder create() { public Builder clear() { super.clear(); - fieldName_ = ""; + path_ = ""; bitField0_ = (bitField0_ & ~0x00000001); - value_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -4383,24 +4543,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery build() { - com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath build() { + com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -4408,39 +4568,32 @@ private com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery return result; } - public com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery result = new com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery(this); + public com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath result = new com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.fieldName_ = fieldName_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.value_ = value_; + result.path_ = path_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery.getDefaultInstance()) return this; - if (other.hasFieldName()) { - setFieldName(other.getFieldName()); - } - if (other.hasValue()) { - setValue(other.getValue()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath.getDefaultInstance()) return this; + if (other.hasPath()) { + setPath(other.getPath()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -4475,12 +4628,7 @@ public Builder mergeFrom( } case 10: { bitField0_ |= 0x00000001; - fieldName_ = input.readBytes(); - break; - } - case 18: { - bitField0_ |= 0x00000002; - value_ = input.readBytes(); + path_ = input.readBytes(); break; } } @@ -4489,265 +4637,124 @@ public Builder mergeFrom( private int bitField0_; - // optional string field_name = 1; - private java.lang.Object fieldName_ = ""; - public boolean hasFieldName() { + // optional string path = 1; + private java.lang.Object path_ = ""; + public boolean hasPath() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getFieldName() { - java.lang.Object ref = fieldName_; + public String getPath() { + java.lang.Object ref = path_; if (!(ref instanceof String)) { String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - fieldName_ = s; + path_ = s; return s; } else { return (String) ref; } } - public Builder setFieldName(String value) { + public Builder setPath(String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; - fieldName_ = value; + path_ = value; onChanged(); return this; } - public Builder clearFieldName() { + public Builder clearPath() { bitField0_ = (bitField0_ & ~0x00000001); - fieldName_ = getDefaultInstance().getFieldName(); + path_ = getDefaultInstance().getPath(); onChanged(); return this; } - void setFieldName(com.google.protobuf.ByteString value) { + void setPath(com.google.protobuf.ByteString value) { bitField0_ |= 0x00000001; - fieldName_ = value; - onChanged(); - } - - // optional string value = 2; - private java.lang.Object value_ = ""; - public boolean hasValue() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public String getValue() { - java.lang.Object ref = value_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - value_ = s; - return s; - } else { - return (String) ref; - } - } - public Builder setValue(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - value_ = value; - onChanged(); - return this; - } - public Builder clearValue() { - bitField0_ = (bitField0_ & ~0x00000002); - value_ = getDefaultInstance().getValue(); - onChanged(); - return this; - } - void setValue(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000002; - value_ = value; + path_ = value; onChanged(); } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.WildcardQuery) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.NestedPath) } static { - defaultInstance = new WildcardQuery(true); + defaultInstance = new NestedPath(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.WildcardQuery) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.NestedPath) } - public interface BoolQueryOrBuilder + public interface NestedAggOrBuilder extends com.google.protobuf.MessageOrBuilder { - // repeated .com.alicloud.openservices.tablestore.core.protocol.Query must_queries = 1; - java.util.List - getMustQueriesList(); - com.alicloud.openservices.tablestore.core.protocol.Search.Query getMustQueries(int index); - int getMustQueriesCount(); - java.util.List - getMustQueriesOrBuilderList(); - com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getMustQueriesOrBuilder( - int index); - - // repeated .com.alicloud.openservices.tablestore.core.protocol.Query must_not_queries = 2; - java.util.List - getMustNotQueriesList(); - com.alicloud.openservices.tablestore.core.protocol.Search.Query getMustNotQueries(int index); - int getMustNotQueriesCount(); - java.util.List - getMustNotQueriesOrBuilderList(); - com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getMustNotQueriesOrBuilder( - int index); - - // repeated .com.alicloud.openservices.tablestore.core.protocol.Query filter_queries = 3; - java.util.List - getFilterQueriesList(); - com.alicloud.openservices.tablestore.core.protocol.Search.Query getFilterQueries(int index); - int getFilterQueriesCount(); - java.util.List - getFilterQueriesOrBuilderList(); - com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getFilterQueriesOrBuilder( - int index); - - // repeated .com.alicloud.openservices.tablestore.core.protocol.Query should_queries = 4; - java.util.List - getShouldQueriesList(); - com.alicloud.openservices.tablestore.core.protocol.Search.Query getShouldQueries(int index); - int getShouldQueriesCount(); - java.util.List - getShouldQueriesOrBuilderList(); - com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getShouldQueriesOrBuilder( - int index); + // optional .com.alicloud.openservices.tablestore.core.protocol.NestedPath nested_path = 1; + boolean hasNestedPath(); + com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath getNestedPath(); + com.alicloud.openservices.tablestore.core.protocol.Search.NestedPathOrBuilder getNestedPathOrBuilder(); - // optional int32 minimum_should_match = 5; - boolean hasMinimumShouldMatch(); - int getMinimumShouldMatch(); + // optional .com.alicloud.openservices.tablestore.core.protocol.Agg agg = 2; + boolean hasAgg(); + com.alicloud.openservices.tablestore.core.protocol.Search.Agg getAgg(); + com.alicloud.openservices.tablestore.core.protocol.Search.AggOrBuilder getAggOrBuilder(); } - public static final class BoolQuery extends + public static final class NestedAgg extends com.google.protobuf.GeneratedMessage - implements BoolQueryOrBuilder { - // Use BoolQuery.newBuilder() to construct. - private BoolQuery(Builder builder) { + implements NestedAggOrBuilder { + // Use NestedAgg.newBuilder() to construct. + private NestedAgg(Builder builder) { super(builder); } - private BoolQuery(boolean noInit) {} + private NestedAgg(boolean noInit) {} - private static final BoolQuery defaultInstance; - public static BoolQuery getDefaultInstance() { + private static final NestedAgg defaultInstance; + public static NestedAgg getDefaultInstance() { return defaultInstance; } - public BoolQuery getDefaultInstanceForType() { + public NestedAgg getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_BoolQuery_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_NestedAgg_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_BoolQuery_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_NestedAgg_fieldAccessorTable; } private int bitField0_; - // repeated .com.alicloud.openservices.tablestore.core.protocol.Query must_queries = 1; - public static final int MUST_QUERIES_FIELD_NUMBER = 1; - private java.util.List mustQueries_; - public java.util.List getMustQueriesList() { - return mustQueries_; - } - public java.util.List - getMustQueriesOrBuilderList() { - return mustQueries_; - } - public int getMustQueriesCount() { - return mustQueries_.size(); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.Query getMustQueries(int index) { - return mustQueries_.get(index); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getMustQueriesOrBuilder( - int index) { - return mustQueries_.get(index); - } - - // repeated .com.alicloud.openservices.tablestore.core.protocol.Query must_not_queries = 2; - public static final int MUST_NOT_QUERIES_FIELD_NUMBER = 2; - private java.util.List mustNotQueries_; - public java.util.List getMustNotQueriesList() { - return mustNotQueries_; - } - public java.util.List - getMustNotQueriesOrBuilderList() { - return mustNotQueries_; - } - public int getMustNotQueriesCount() { - return mustNotQueries_.size(); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.Query getMustNotQueries(int index) { - return mustNotQueries_.get(index); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getMustNotQueriesOrBuilder( - int index) { - return mustNotQueries_.get(index); - } - - // repeated .com.alicloud.openservices.tablestore.core.protocol.Query filter_queries = 3; - public static final int FILTER_QUERIES_FIELD_NUMBER = 3; - private java.util.List filterQueries_; - public java.util.List getFilterQueriesList() { - return filterQueries_; - } - public java.util.List - getFilterQueriesOrBuilderList() { - return filterQueries_; - } - public int getFilterQueriesCount() { - return filterQueries_.size(); + // optional .com.alicloud.openservices.tablestore.core.protocol.NestedPath nested_path = 1; + public static final int NESTED_PATH_FIELD_NUMBER = 1; + private com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath nestedPath_; + public boolean hasNestedPath() { + return ((bitField0_ & 0x00000001) == 0x00000001); } - public com.alicloud.openservices.tablestore.core.protocol.Search.Query getFilterQueries(int index) { - return filterQueries_.get(index); + public com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath getNestedPath() { + return nestedPath_; } - public com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getFilterQueriesOrBuilder( - int index) { - return filterQueries_.get(index); + public com.alicloud.openservices.tablestore.core.protocol.Search.NestedPathOrBuilder getNestedPathOrBuilder() { + return nestedPath_; } - // repeated .com.alicloud.openservices.tablestore.core.protocol.Query should_queries = 4; - public static final int SHOULD_QUERIES_FIELD_NUMBER = 4; - private java.util.List shouldQueries_; - public java.util.List getShouldQueriesList() { - return shouldQueries_; - } - public java.util.List - getShouldQueriesOrBuilderList() { - return shouldQueries_; - } - public int getShouldQueriesCount() { - return shouldQueries_.size(); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.Query getShouldQueries(int index) { - return shouldQueries_.get(index); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getShouldQueriesOrBuilder( - int index) { - return shouldQueries_.get(index); + // optional .com.alicloud.openservices.tablestore.core.protocol.Agg agg = 2; + public static final int AGG_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.Search.Agg agg_; + public boolean hasAgg() { + return ((bitField0_ & 0x00000002) == 0x00000002); } - - // optional int32 minimum_should_match = 5; - public static final int MINIMUM_SHOULD_MATCH_FIELD_NUMBER = 5; - private int minimumShouldMatch_; - public boolean hasMinimumShouldMatch() { - return ((bitField0_ & 0x00000001) == 0x00000001); + public com.alicloud.openservices.tablestore.core.protocol.Search.Agg getAgg() { + return agg_; } - public int getMinimumShouldMatch() { - return minimumShouldMatch_; + public com.alicloud.openservices.tablestore.core.protocol.Search.AggOrBuilder getAggOrBuilder() { + return agg_; } private void initFields() { - mustQueries_ = java.util.Collections.emptyList(); - mustNotQueries_ = java.util.Collections.emptyList(); - filterQueries_ = java.util.Collections.emptyList(); - shouldQueries_ = java.util.Collections.emptyList(); - minimumShouldMatch_ = 0; + nestedPath_ = com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath.getDefaultInstance(); + agg_ = com.alicloud.openservices.tablestore.core.protocol.Search.Agg.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -4761,20 +4768,11 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - for (int i = 0; i < mustQueries_.size(); i++) { - output.writeMessage(1, mustQueries_.get(i)); - } - for (int i = 0; i < mustNotQueries_.size(); i++) { - output.writeMessage(2, mustNotQueries_.get(i)); - } - for (int i = 0; i < filterQueries_.size(); i++) { - output.writeMessage(3, filterQueries_.get(i)); - } - for (int i = 0; i < shouldQueries_.size(); i++) { - output.writeMessage(4, shouldQueries_.get(i)); - } if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeInt32(5, minimumShouldMatch_); + output.writeMessage(1, nestedPath_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeMessage(2, agg_); } getUnknownFields().writeTo(output); } @@ -4785,25 +4783,13 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - for (int i = 0; i < mustQueries_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, mustQueries_.get(i)); - } - for (int i = 0; i < mustNotQueries_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, mustNotQueries_.get(i)); - } - for (int i = 0; i < filterQueries_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, filterQueries_.get(i)); - } - for (int i = 0; i < shouldQueries_.size(); i++) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, shouldQueries_.get(i)); + .computeMessageSize(1, nestedPath_); } - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeInt32Size(5, minimumShouldMatch_); + .computeMessageSize(2, agg_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -4817,41 +4803,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedAgg parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedAgg parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedAgg parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedAgg parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedAgg parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedAgg parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedAgg parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -4860,7 +4846,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuer return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedAgg parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -4871,12 +4857,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuer return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedAgg parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedAgg parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -4886,7 +4872,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuer public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.NestedAgg prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -4899,18 +4885,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.Search.BoolQueryOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.Search.NestedAggOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_BoolQuery_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_NestedAgg_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_BoolQuery_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_NestedAgg_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.NestedAgg.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -4921,10 +4907,8 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getMustQueriesFieldBuilder(); - getMustNotQueriesFieldBuilder(); - getFilterQueriesFieldBuilder(); - getShouldQueriesFieldBuilder(); + getNestedPathFieldBuilder(); + getAggFieldBuilder(); } } private static Builder create() { @@ -4933,32 +4917,18 @@ private static Builder create() { public Builder clear() { super.clear(); - if (mustQueriesBuilder_ == null) { - mustQueries_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - mustQueriesBuilder_.clear(); - } - if (mustNotQueriesBuilder_ == null) { - mustNotQueries_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - mustNotQueriesBuilder_.clear(); - } - if (filterQueriesBuilder_ == null) { - filterQueries_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); + if (nestedPathBuilder_ == null) { + nestedPath_ = com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath.getDefaultInstance(); } else { - filterQueriesBuilder_.clear(); + nestedPathBuilder_.clear(); } - if (shouldQueriesBuilder_ == null) { - shouldQueries_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000001); + if (aggBuilder_ == null) { + agg_ = com.alicloud.openservices.tablestore.core.protocol.Search.Agg.getDefaultInstance(); } else { - shouldQueriesBuilder_.clear(); + aggBuilder_.clear(); } - minimumShouldMatch_ = 0; - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -4968,24 +4938,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.Search.NestedAgg.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.Search.NestedAgg getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.NestedAgg.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery build() { - com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.Search.NestedAgg build() { + com.alicloud.openservices.tablestore.core.protocol.Search.NestedAgg result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.Search.NestedAgg buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.Search.NestedAgg result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -4993,172 +4963,47 @@ private com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery buil return result; } - public com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery result = new com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery(this); + public com.alicloud.openservices.tablestore.core.protocol.Search.NestedAgg buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.NestedAgg result = new com.alicloud.openservices.tablestore.core.protocol.Search.NestedAgg(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; - if (mustQueriesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - mustQueries_ = java.util.Collections.unmodifiableList(mustQueries_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.mustQueries_ = mustQueries_; - } else { - result.mustQueries_ = mustQueriesBuilder_.build(); + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; } - if (mustNotQueriesBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { - mustNotQueries_ = java.util.Collections.unmodifiableList(mustNotQueries_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.mustNotQueries_ = mustNotQueries_; + if (nestedPathBuilder_ == null) { + result.nestedPath_ = nestedPath_; } else { - result.mustNotQueries_ = mustNotQueriesBuilder_.build(); + result.nestedPath_ = nestedPathBuilder_.build(); } - if (filterQueriesBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { - filterQueries_ = java.util.Collections.unmodifiableList(filterQueries_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.filterQueries_ = filterQueries_; - } else { - result.filterQueries_ = filterQueriesBuilder_.build(); + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; } - if (shouldQueriesBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008)) { - shouldQueries_ = java.util.Collections.unmodifiableList(shouldQueries_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.shouldQueries_ = shouldQueries_; + if (aggBuilder_ == null) { + result.agg_ = agg_; } else { - result.shouldQueries_ = shouldQueriesBuilder_.build(); + result.agg_ = aggBuilder_.build(); } - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000001; - } - result.minimumShouldMatch_ = minimumShouldMatch_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.NestedAgg) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.NestedAgg)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery.getDefaultInstance()) return this; - if (mustQueriesBuilder_ == null) { - if (!other.mustQueries_.isEmpty()) { - if (mustQueries_.isEmpty()) { - mustQueries_ = other.mustQueries_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureMustQueriesIsMutable(); - mustQueries_.addAll(other.mustQueries_); - } - onChanged(); - } - } else { - if (!other.mustQueries_.isEmpty()) { - if (mustQueriesBuilder_.isEmpty()) { - mustQueriesBuilder_.dispose(); - mustQueriesBuilder_ = null; - mustQueries_ = other.mustQueries_; - bitField0_ = (bitField0_ & ~0x00000001); - mustQueriesBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getMustQueriesFieldBuilder() : null; - } else { - mustQueriesBuilder_.addAllMessages(other.mustQueries_); - } - } - } - if (mustNotQueriesBuilder_ == null) { - if (!other.mustNotQueries_.isEmpty()) { - if (mustNotQueries_.isEmpty()) { - mustNotQueries_ = other.mustNotQueries_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureMustNotQueriesIsMutable(); - mustNotQueries_.addAll(other.mustNotQueries_); - } - onChanged(); - } - } else { - if (!other.mustNotQueries_.isEmpty()) { - if (mustNotQueriesBuilder_.isEmpty()) { - mustNotQueriesBuilder_.dispose(); - mustNotQueriesBuilder_ = null; - mustNotQueries_ = other.mustNotQueries_; - bitField0_ = (bitField0_ & ~0x00000002); - mustNotQueriesBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getMustNotQueriesFieldBuilder() : null; - } else { - mustNotQueriesBuilder_.addAllMessages(other.mustNotQueries_); - } - } - } - if (filterQueriesBuilder_ == null) { - if (!other.filterQueries_.isEmpty()) { - if (filterQueries_.isEmpty()) { - filterQueries_ = other.filterQueries_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureFilterQueriesIsMutable(); - filterQueries_.addAll(other.filterQueries_); - } - onChanged(); - } - } else { - if (!other.filterQueries_.isEmpty()) { - if (filterQueriesBuilder_.isEmpty()) { - filterQueriesBuilder_.dispose(); - filterQueriesBuilder_ = null; - filterQueries_ = other.filterQueries_; - bitField0_ = (bitField0_ & ~0x00000004); - filterQueriesBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getFilterQueriesFieldBuilder() : null; - } else { - filterQueriesBuilder_.addAllMessages(other.filterQueries_); - } - } - } - if (shouldQueriesBuilder_ == null) { - if (!other.shouldQueries_.isEmpty()) { - if (shouldQueries_.isEmpty()) { - shouldQueries_ = other.shouldQueries_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureShouldQueriesIsMutable(); - shouldQueries_.addAll(other.shouldQueries_); - } - onChanged(); - } - } else { - if (!other.shouldQueries_.isEmpty()) { - if (shouldQueriesBuilder_.isEmpty()) { - shouldQueriesBuilder_.dispose(); - shouldQueriesBuilder_ = null; - shouldQueries_ = other.shouldQueries_; - bitField0_ = (bitField0_ & ~0x00000008); - shouldQueriesBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getShouldQueriesFieldBuilder() : null; - } else { - shouldQueriesBuilder_.addAllMessages(other.shouldQueries_); - } - } + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.NestedAgg other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.NestedAgg.getDefaultInstance()) return this; + if (other.hasNestedPath()) { + mergeNestedPath(other.getNestedPath()); } - if (other.hasMinimumShouldMatch()) { - setMinimumShouldMatch(other.getMinimumShouldMatch()); + if (other.hasAgg()) { + mergeAgg(other.getAgg()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -5192,32 +5037,21 @@ public Builder mergeFrom( break; } case 10: { - com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.Query.newBuilder(); + com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath.newBuilder(); + if (hasNestedPath()) { + subBuilder.mergeFrom(getNestedPath()); + } input.readMessage(subBuilder, extensionRegistry); - addMustQueries(subBuilder.buildPartial()); + setNestedPath(subBuilder.buildPartial()); break; } case 18: { - com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.Query.newBuilder(); - input.readMessage(subBuilder, extensionRegistry); - addMustNotQueries(subBuilder.buildPartial()); - break; - } - case 26: { - com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.Query.newBuilder(); - input.readMessage(subBuilder, extensionRegistry); - addFilterQueries(subBuilder.buildPartial()); - break; - } - case 34: { - com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.Query.newBuilder(); + com.alicloud.openservices.tablestore.core.protocol.Search.Agg.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.Agg.newBuilder(); + if (hasAgg()) { + subBuilder.mergeFrom(getAgg()); + } input.readMessage(subBuilder, extensionRegistry); - addShouldQueries(subBuilder.buildPartial()); - break; - } - case 40: { - bitField0_ |= 0x00000010; - minimumShouldMatch_ = input.readInt32(); + setAgg(subBuilder.buildPartial()); break; } } @@ -5226,849 +5060,300 @@ public Builder mergeFrom( private int bitField0_; - // repeated .com.alicloud.openservices.tablestore.core.protocol.Query must_queries = 1; - private java.util.List mustQueries_ = - java.util.Collections.emptyList(); - private void ensureMustQueriesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - mustQueries_ = new java.util.ArrayList(mustQueries_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder> mustQueriesBuilder_; - - public java.util.List getMustQueriesList() { - if (mustQueriesBuilder_ == null) { - return java.util.Collections.unmodifiableList(mustQueries_); - } else { - return mustQueriesBuilder_.getMessageList(); - } - } - public int getMustQueriesCount() { - if (mustQueriesBuilder_ == null) { - return mustQueries_.size(); - } else { - return mustQueriesBuilder_.getCount(); - } + // optional .com.alicloud.openservices.tablestore.core.protocol.NestedPath nested_path = 1; + private com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath nestedPath_ = com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath, com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.NestedPathOrBuilder> nestedPathBuilder_; + public boolean hasNestedPath() { + return ((bitField0_ & 0x00000001) == 0x00000001); } - public com.alicloud.openservices.tablestore.core.protocol.Search.Query getMustQueries(int index) { - if (mustQueriesBuilder_ == null) { - return mustQueries_.get(index); + public com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath getNestedPath() { + if (nestedPathBuilder_ == null) { + return nestedPath_; } else { - return mustQueriesBuilder_.getMessage(index); + return nestedPathBuilder_.getMessage(); } } - public Builder setMustQueries( - int index, com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { - if (mustQueriesBuilder_ == null) { + public Builder setNestedPath(com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath value) { + if (nestedPathBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureMustQueriesIsMutable(); - mustQueries_.set(index, value); - onChanged(); - } else { - mustQueriesBuilder_.setMessage(index, value); - } - return this; - } - public Builder setMustQueries( - int index, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder builderForValue) { - if (mustQueriesBuilder_ == null) { - ensureMustQueriesIsMutable(); - mustQueries_.set(index, builderForValue.build()); + nestedPath_ = value; onChanged(); } else { - mustQueriesBuilder_.setMessage(index, builderForValue.build()); + nestedPathBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; return this; } - public Builder addMustQueries(com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { - if (mustQueriesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMustQueriesIsMutable(); - mustQueries_.add(value); + public Builder setNestedPath( + com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath.Builder builderForValue) { + if (nestedPathBuilder_ == null) { + nestedPath_ = builderForValue.build(); onChanged(); } else { - mustQueriesBuilder_.addMessage(value); + nestedPathBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; return this; } - public Builder addMustQueries( - int index, com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { - if (mustQueriesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); + public Builder mergeNestedPath(com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath value) { + if (nestedPathBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001) && + nestedPath_ != com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath.getDefaultInstance()) { + nestedPath_ = + com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath.newBuilder(nestedPath_).mergeFrom(value).buildPartial(); + } else { + nestedPath_ = value; } - ensureMustQueriesIsMutable(); - mustQueries_.add(index, value); onChanged(); } else { - mustQueriesBuilder_.addMessage(index, value); - } - return this; - } - public Builder addMustQueries( - com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder builderForValue) { - if (mustQueriesBuilder_ == null) { - ensureMustQueriesIsMutable(); - mustQueries_.add(builderForValue.build()); - onChanged(); - } else { - mustQueriesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - public Builder addMustQueries( - int index, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder builderForValue) { - if (mustQueriesBuilder_ == null) { - ensureMustQueriesIsMutable(); - mustQueries_.add(index, builderForValue.build()); - onChanged(); - } else { - mustQueriesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - public Builder addAllMustQueries( - java.lang.Iterable values) { - if (mustQueriesBuilder_ == null) { - ensureMustQueriesIsMutable(); - super.addAll(values, mustQueries_); - onChanged(); - } else { - mustQueriesBuilder_.addAllMessages(values); - } - return this; - } - public Builder clearMustQueries() { - if (mustQueriesBuilder_ == null) { - mustQueries_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - mustQueriesBuilder_.clear(); + nestedPathBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; return this; } - public Builder removeMustQueries(int index) { - if (mustQueriesBuilder_ == null) { - ensureMustQueriesIsMutable(); - mustQueries_.remove(index); + public Builder clearNestedPath() { + if (nestedPathBuilder_ == null) { + nestedPath_ = com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath.getDefaultInstance(); onChanged(); } else { - mustQueriesBuilder_.remove(index); + nestedPathBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } - public com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder getMustQueriesBuilder( - int index) { - return getMustQueriesFieldBuilder().getBuilder(index); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getMustQueriesOrBuilder( - int index) { - if (mustQueriesBuilder_ == null) { - return mustQueries_.get(index); } else { - return mustQueriesBuilder_.getMessageOrBuilder(index); - } + public com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath.Builder getNestedPathBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getNestedPathFieldBuilder().getBuilder(); } - public java.util.List - getMustQueriesOrBuilderList() { - if (mustQueriesBuilder_ != null) { - return mustQueriesBuilder_.getMessageOrBuilderList(); + public com.alicloud.openservices.tablestore.core.protocol.Search.NestedPathOrBuilder getNestedPathOrBuilder() { + if (nestedPathBuilder_ != null) { + return nestedPathBuilder_.getMessageOrBuilder(); } else { - return java.util.Collections.unmodifiableList(mustQueries_); + return nestedPath_; } } - public com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder addMustQueriesBuilder() { - return getMustQueriesFieldBuilder().addBuilder( - com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance()); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder addMustQueriesBuilder( - int index) { - return getMustQueriesFieldBuilder().addBuilder( - index, com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance()); - } - public java.util.List - getMustQueriesBuilderList() { - return getMustQueriesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder> - getMustQueriesFieldBuilder() { - if (mustQueriesBuilder_ == null) { - mustQueriesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder>( - mustQueries_, - ((bitField0_ & 0x00000001) == 0x00000001), + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath, com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.NestedPathOrBuilder> + getNestedPathFieldBuilder() { + if (nestedPathBuilder_ == null) { + nestedPathBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath, com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.NestedPathOrBuilder>( + nestedPath_, getParentForChildren(), isClean()); - mustQueries_ = null; + nestedPath_ = null; } - return mustQueriesBuilder_; - } - - // repeated .com.alicloud.openservices.tablestore.core.protocol.Query must_not_queries = 2; - private java.util.List mustNotQueries_ = - java.util.Collections.emptyList(); - private void ensureMustNotQueriesIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - mustNotQueries_ = new java.util.ArrayList(mustNotQueries_); - bitField0_ |= 0x00000002; - } + return nestedPathBuilder_; } - private com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder> mustNotQueriesBuilder_; - - public java.util.List getMustNotQueriesList() { - if (mustNotQueriesBuilder_ == null) { - return java.util.Collections.unmodifiableList(mustNotQueries_); - } else { - return mustNotQueriesBuilder_.getMessageList(); - } - } - public int getMustNotQueriesCount() { - if (mustNotQueriesBuilder_ == null) { - return mustNotQueries_.size(); - } else { - return mustNotQueriesBuilder_.getCount(); - } + // optional .com.alicloud.openservices.tablestore.core.protocol.Agg agg = 2; + private com.alicloud.openservices.tablestore.core.protocol.Search.Agg agg_ = com.alicloud.openservices.tablestore.core.protocol.Search.Agg.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Agg, com.alicloud.openservices.tablestore.core.protocol.Search.Agg.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggOrBuilder> aggBuilder_; + public boolean hasAgg() { + return ((bitField0_ & 0x00000002) == 0x00000002); } - public com.alicloud.openservices.tablestore.core.protocol.Search.Query getMustNotQueries(int index) { - if (mustNotQueriesBuilder_ == null) { - return mustNotQueries_.get(index); + public com.alicloud.openservices.tablestore.core.protocol.Search.Agg getAgg() { + if (aggBuilder_ == null) { + return agg_; } else { - return mustNotQueriesBuilder_.getMessage(index); + return aggBuilder_.getMessage(); } } - public Builder setMustNotQueries( - int index, com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { - if (mustNotQueriesBuilder_ == null) { + public Builder setAgg(com.alicloud.openservices.tablestore.core.protocol.Search.Agg value) { + if (aggBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureMustNotQueriesIsMutable(); - mustNotQueries_.set(index, value); - onChanged(); - } else { - mustNotQueriesBuilder_.setMessage(index, value); - } - return this; - } - public Builder setMustNotQueries( - int index, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder builderForValue) { - if (mustNotQueriesBuilder_ == null) { - ensureMustNotQueriesIsMutable(); - mustNotQueries_.set(index, builderForValue.build()); + agg_ = value; onChanged(); } else { - mustNotQueriesBuilder_.setMessage(index, builderForValue.build()); + aggBuilder_.setMessage(value); } + bitField0_ |= 0x00000002; return this; } - public Builder addMustNotQueries(com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { - if (mustNotQueriesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMustNotQueriesIsMutable(); - mustNotQueries_.add(value); + public Builder setAgg( + com.alicloud.openservices.tablestore.core.protocol.Search.Agg.Builder builderForValue) { + if (aggBuilder_ == null) { + agg_ = builderForValue.build(); onChanged(); } else { - mustNotQueriesBuilder_.addMessage(value); + aggBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000002; return this; } - public Builder addMustNotQueries( - int index, com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { - if (mustNotQueriesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); + public Builder mergeAgg(com.alicloud.openservices.tablestore.core.protocol.Search.Agg value) { + if (aggBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002) && + agg_ != com.alicloud.openservices.tablestore.core.protocol.Search.Agg.getDefaultInstance()) { + agg_ = + com.alicloud.openservices.tablestore.core.protocol.Search.Agg.newBuilder(agg_).mergeFrom(value).buildPartial(); + } else { + agg_ = value; } - ensureMustNotQueriesIsMutable(); - mustNotQueries_.add(index, value); onChanged(); } else { - mustNotQueriesBuilder_.addMessage(index, value); - } - return this; - } - public Builder addMustNotQueries( - com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder builderForValue) { - if (mustNotQueriesBuilder_ == null) { - ensureMustNotQueriesIsMutable(); - mustNotQueries_.add(builderForValue.build()); - onChanged(); - } else { - mustNotQueriesBuilder_.addMessage(builderForValue.build()); + aggBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000002; return this; } - public Builder addMustNotQueries( - int index, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder builderForValue) { - if (mustNotQueriesBuilder_ == null) { - ensureMustNotQueriesIsMutable(); - mustNotQueries_.add(index, builderForValue.build()); + public Builder clearAgg() { + if (aggBuilder_ == null) { + agg_ = com.alicloud.openservices.tablestore.core.protocol.Search.Agg.getDefaultInstance(); onChanged(); } else { - mustNotQueriesBuilder_.addMessage(index, builderForValue.build()); + aggBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); return this; } - public Builder addAllMustNotQueries( - java.lang.Iterable values) { - if (mustNotQueriesBuilder_ == null) { - ensureMustNotQueriesIsMutable(); - super.addAll(values, mustNotQueries_); - onChanged(); - } else { - mustNotQueriesBuilder_.addAllMessages(values); - } - return this; + public com.alicloud.openservices.tablestore.core.protocol.Search.Agg.Builder getAggBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getAggFieldBuilder().getBuilder(); } - public Builder clearMustNotQueries() { - if (mustNotQueriesBuilder_ == null) { - mustNotQueries_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); + public com.alicloud.openservices.tablestore.core.protocol.Search.AggOrBuilder getAggOrBuilder() { + if (aggBuilder_ != null) { + return aggBuilder_.getMessageOrBuilder(); } else { - mustNotQueriesBuilder_.clear(); + return agg_; } - return this; } - public Builder removeMustNotQueries(int index) { - if (mustNotQueriesBuilder_ == null) { - ensureMustNotQueriesIsMutable(); - mustNotQueries_.remove(index); - onChanged(); - } else { - mustNotQueriesBuilder_.remove(index); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Agg, com.alicloud.openservices.tablestore.core.protocol.Search.Agg.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggOrBuilder> + getAggFieldBuilder() { + if (aggBuilder_ == null) { + aggBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Agg, com.alicloud.openservices.tablestore.core.protocol.Search.Agg.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggOrBuilder>( + agg_, + getParentForChildren(), + isClean()); + agg_ = null; } - return this; - } - public com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder getMustNotQueriesBuilder( - int index) { - return getMustNotQueriesFieldBuilder().getBuilder(index); + return aggBuilder_; } - public com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getMustNotQueriesOrBuilder( - int index) { - if (mustNotQueriesBuilder_ == null) { - return mustNotQueries_.get(index); } else { - return mustNotQueriesBuilder_.getMessageOrBuilder(index); + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.NestedAgg) + } + + static { + defaultInstance = new NestedAgg(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.NestedAgg) + } + + public interface GeoBoundsAggOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string field_name = 1; + boolean hasFieldName(); + String getFieldName(); + + // optional bool wrap_longitude = 2; + boolean hasWrapLongitude(); + boolean getWrapLongitude(); + } + public static final class GeoBoundsAgg extends + com.google.protobuf.GeneratedMessage + implements GeoBoundsAggOrBuilder { + // Use GeoBoundsAgg.newBuilder() to construct. + private GeoBoundsAgg(Builder builder) { + super(builder); + } + private GeoBoundsAgg(boolean noInit) {} + + private static final GeoBoundsAgg defaultInstance; + public static GeoBoundsAgg getDefaultInstance() { + return defaultInstance; + } + + public GeoBoundsAgg getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoBoundsAgg_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoBoundsAgg_fieldAccessorTable; + } + + private int bitField0_; + // optional string field_name = 1; + public static final int FIELD_NAME_FIELD_NUMBER = 1; + private java.lang.Object fieldName_; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + fieldName_ = s; } + return s; } - public java.util.List - getMustNotQueriesOrBuilderList() { - if (mustNotQueriesBuilder_ != null) { - return mustNotQueriesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(mustNotQueries_); - } + } + private com.google.protobuf.ByteString getFieldNameBytes() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + fieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - public com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder addMustNotQueriesBuilder() { - return getMustNotQueriesFieldBuilder().addBuilder( - com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance()); + } + + // optional bool wrap_longitude = 2; + public static final int WRAP_LONGITUDE_FIELD_NUMBER = 2; + private boolean wrapLongitude_; + public boolean hasWrapLongitude() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public boolean getWrapLongitude() { + return wrapLongitude_; + } + + private void initFields() { + fieldName_ = ""; + wrapLongitude_ = false; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getFieldNameBytes()); } - public com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder addMustNotQueriesBuilder( - int index) { - return getMustNotQueriesFieldBuilder().addBuilder( - index, com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance()); - } - public java.util.List - getMustNotQueriesBuilderList() { - return getMustNotQueriesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder> - getMustNotQueriesFieldBuilder() { - if (mustNotQueriesBuilder_ == null) { - mustNotQueriesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder>( - mustNotQueries_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); - mustNotQueries_ = null; - } - return mustNotQueriesBuilder_; - } - - // repeated .com.alicloud.openservices.tablestore.core.protocol.Query filter_queries = 3; - private java.util.List filterQueries_ = - java.util.Collections.emptyList(); - private void ensureFilterQueriesIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { - filterQueries_ = new java.util.ArrayList(filterQueries_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder> filterQueriesBuilder_; - - public java.util.List getFilterQueriesList() { - if (filterQueriesBuilder_ == null) { - return java.util.Collections.unmodifiableList(filterQueries_); - } else { - return filterQueriesBuilder_.getMessageList(); - } - } - public int getFilterQueriesCount() { - if (filterQueriesBuilder_ == null) { - return filterQueries_.size(); - } else { - return filterQueriesBuilder_.getCount(); - } - } - public com.alicloud.openservices.tablestore.core.protocol.Search.Query getFilterQueries(int index) { - if (filterQueriesBuilder_ == null) { - return filterQueries_.get(index); - } else { - return filterQueriesBuilder_.getMessage(index); - } - } - public Builder setFilterQueries( - int index, com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { - if (filterQueriesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFilterQueriesIsMutable(); - filterQueries_.set(index, value); - onChanged(); - } else { - filterQueriesBuilder_.setMessage(index, value); - } - return this; - } - public Builder setFilterQueries( - int index, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder builderForValue) { - if (filterQueriesBuilder_ == null) { - ensureFilterQueriesIsMutable(); - filterQueries_.set(index, builderForValue.build()); - onChanged(); - } else { - filterQueriesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - public Builder addFilterQueries(com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { - if (filterQueriesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFilterQueriesIsMutable(); - filterQueries_.add(value); - onChanged(); - } else { - filterQueriesBuilder_.addMessage(value); - } - return this; - } - public Builder addFilterQueries( - int index, com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { - if (filterQueriesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFilterQueriesIsMutable(); - filterQueries_.add(index, value); - onChanged(); - } else { - filterQueriesBuilder_.addMessage(index, value); - } - return this; - } - public Builder addFilterQueries( - com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder builderForValue) { - if (filterQueriesBuilder_ == null) { - ensureFilterQueriesIsMutable(); - filterQueries_.add(builderForValue.build()); - onChanged(); - } else { - filterQueriesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - public Builder addFilterQueries( - int index, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder builderForValue) { - if (filterQueriesBuilder_ == null) { - ensureFilterQueriesIsMutable(); - filterQueries_.add(index, builderForValue.build()); - onChanged(); - } else { - filterQueriesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - public Builder addAllFilterQueries( - java.lang.Iterable values) { - if (filterQueriesBuilder_ == null) { - ensureFilterQueriesIsMutable(); - super.addAll(values, filterQueries_); - onChanged(); - } else { - filterQueriesBuilder_.addAllMessages(values); - } - return this; - } - public Builder clearFilterQueries() { - if (filterQueriesBuilder_ == null) { - filterQueries_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - filterQueriesBuilder_.clear(); - } - return this; - } - public Builder removeFilterQueries(int index) { - if (filterQueriesBuilder_ == null) { - ensureFilterQueriesIsMutable(); - filterQueries_.remove(index); - onChanged(); - } else { - filterQueriesBuilder_.remove(index); - } - return this; - } - public com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder getFilterQueriesBuilder( - int index) { - return getFilterQueriesFieldBuilder().getBuilder(index); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getFilterQueriesOrBuilder( - int index) { - if (filterQueriesBuilder_ == null) { - return filterQueries_.get(index); } else { - return filterQueriesBuilder_.getMessageOrBuilder(index); - } - } - public java.util.List - getFilterQueriesOrBuilderList() { - if (filterQueriesBuilder_ != null) { - return filterQueriesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(filterQueries_); - } - } - public com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder addFilterQueriesBuilder() { - return getFilterQueriesFieldBuilder().addBuilder( - com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance()); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder addFilterQueriesBuilder( - int index) { - return getFilterQueriesFieldBuilder().addBuilder( - index, com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance()); - } - public java.util.List - getFilterQueriesBuilderList() { - return getFilterQueriesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder> - getFilterQueriesFieldBuilder() { - if (filterQueriesBuilder_ == null) { - filterQueriesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder>( - filterQueries_, - ((bitField0_ & 0x00000004) == 0x00000004), - getParentForChildren(), - isClean()); - filterQueries_ = null; - } - return filterQueriesBuilder_; - } - - // repeated .com.alicloud.openservices.tablestore.core.protocol.Query should_queries = 4; - private java.util.List shouldQueries_ = - java.util.Collections.emptyList(); - private void ensureShouldQueriesIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { - shouldQueries_ = new java.util.ArrayList(shouldQueries_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder> shouldQueriesBuilder_; - - public java.util.List getShouldQueriesList() { - if (shouldQueriesBuilder_ == null) { - return java.util.Collections.unmodifiableList(shouldQueries_); - } else { - return shouldQueriesBuilder_.getMessageList(); - } - } - public int getShouldQueriesCount() { - if (shouldQueriesBuilder_ == null) { - return shouldQueries_.size(); - } else { - return shouldQueriesBuilder_.getCount(); - } - } - public com.alicloud.openservices.tablestore.core.protocol.Search.Query getShouldQueries(int index) { - if (shouldQueriesBuilder_ == null) { - return shouldQueries_.get(index); - } else { - return shouldQueriesBuilder_.getMessage(index); - } - } - public Builder setShouldQueries( - int index, com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { - if (shouldQueriesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureShouldQueriesIsMutable(); - shouldQueries_.set(index, value); - onChanged(); - } else { - shouldQueriesBuilder_.setMessage(index, value); - } - return this; - } - public Builder setShouldQueries( - int index, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder builderForValue) { - if (shouldQueriesBuilder_ == null) { - ensureShouldQueriesIsMutable(); - shouldQueries_.set(index, builderForValue.build()); - onChanged(); - } else { - shouldQueriesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - public Builder addShouldQueries(com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { - if (shouldQueriesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureShouldQueriesIsMutable(); - shouldQueries_.add(value); - onChanged(); - } else { - shouldQueriesBuilder_.addMessage(value); - } - return this; - } - public Builder addShouldQueries( - int index, com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { - if (shouldQueriesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureShouldQueriesIsMutable(); - shouldQueries_.add(index, value); - onChanged(); - } else { - shouldQueriesBuilder_.addMessage(index, value); - } - return this; - } - public Builder addShouldQueries( - com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder builderForValue) { - if (shouldQueriesBuilder_ == null) { - ensureShouldQueriesIsMutable(); - shouldQueries_.add(builderForValue.build()); - onChanged(); - } else { - shouldQueriesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - public Builder addShouldQueries( - int index, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder builderForValue) { - if (shouldQueriesBuilder_ == null) { - ensureShouldQueriesIsMutable(); - shouldQueries_.add(index, builderForValue.build()); - onChanged(); - } else { - shouldQueriesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - public Builder addAllShouldQueries( - java.lang.Iterable values) { - if (shouldQueriesBuilder_ == null) { - ensureShouldQueriesIsMutable(); - super.addAll(values, shouldQueries_); - onChanged(); - } else { - shouldQueriesBuilder_.addAllMessages(values); - } - return this; - } - public Builder clearShouldQueries() { - if (shouldQueriesBuilder_ == null) { - shouldQueries_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - shouldQueriesBuilder_.clear(); - } - return this; - } - public Builder removeShouldQueries(int index) { - if (shouldQueriesBuilder_ == null) { - ensureShouldQueriesIsMutable(); - shouldQueries_.remove(index); - onChanged(); - } else { - shouldQueriesBuilder_.remove(index); - } - return this; - } - public com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder getShouldQueriesBuilder( - int index) { - return getShouldQueriesFieldBuilder().getBuilder(index); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getShouldQueriesOrBuilder( - int index) { - if (shouldQueriesBuilder_ == null) { - return shouldQueries_.get(index); } else { - return shouldQueriesBuilder_.getMessageOrBuilder(index); - } - } - public java.util.List - getShouldQueriesOrBuilderList() { - if (shouldQueriesBuilder_ != null) { - return shouldQueriesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(shouldQueries_); - } - } - public com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder addShouldQueriesBuilder() { - return getShouldQueriesFieldBuilder().addBuilder( - com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance()); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder addShouldQueriesBuilder( - int index) { - return getShouldQueriesFieldBuilder().addBuilder( - index, com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance()); - } - public java.util.List - getShouldQueriesBuilderList() { - return getShouldQueriesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder> - getShouldQueriesFieldBuilder() { - if (shouldQueriesBuilder_ == null) { - shouldQueriesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder>( - shouldQueries_, - ((bitField0_ & 0x00000008) == 0x00000008), - getParentForChildren(), - isClean()); - shouldQueries_ = null; - } - return shouldQueriesBuilder_; - } - - // optional int32 minimum_should_match = 5; - private int minimumShouldMatch_ ; - public boolean hasMinimumShouldMatch() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - public int getMinimumShouldMatch() { - return minimumShouldMatch_; - } - public Builder setMinimumShouldMatch(int value) { - bitField0_ |= 0x00000010; - minimumShouldMatch_ = value; - onChanged(); - return this; - } - public Builder clearMinimumShouldMatch() { - bitField0_ = (bitField0_ & ~0x00000010); - minimumShouldMatch_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.BoolQuery) - } - - static { - defaultInstance = new BoolQuery(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.BoolQuery) - } - - public interface ConstScoreQueryOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional .com.alicloud.openservices.tablestore.core.protocol.Query filter = 1; - boolean hasFilter(); - com.alicloud.openservices.tablestore.core.protocol.Search.Query getFilter(); - com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getFilterOrBuilder(); - } - public static final class ConstScoreQuery extends - com.google.protobuf.GeneratedMessage - implements ConstScoreQueryOrBuilder { - // Use ConstScoreQuery.newBuilder() to construct. - private ConstScoreQuery(Builder builder) { - super(builder); - } - private ConstScoreQuery(boolean noInit) {} - - private static final ConstScoreQuery defaultInstance; - public static ConstScoreQuery getDefaultInstance() { - return defaultInstance; - } - - public ConstScoreQuery getDefaultInstanceForType() { - return defaultInstance; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ConstScoreQuery_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ConstScoreQuery_fieldAccessorTable; - } - - private int bitField0_; - // optional .com.alicloud.openservices.tablestore.core.protocol.Query filter = 1; - public static final int FILTER_FIELD_NUMBER = 1; - private com.alicloud.openservices.tablestore.core.protocol.Search.Query filter_; - public boolean hasFilter() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.Query getFilter() { - return filter_; - } - public com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getFilterOrBuilder() { - return filter_; - } - - private void initFields() { - filter_ = com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance(); - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeMessage(1, filter_); + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBool(2, wrapLongitude_); } getUnknownFields().writeTo(output); } @@ -6081,7 +5366,11 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, filter_); + .computeBytesSize(1, getFieldNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, wrapLongitude_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -6095,41 +5384,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAgg parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAgg parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAgg parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAgg parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAgg parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAgg parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAgg parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -6138,7 +5427,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.ConstSco return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAgg parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -6149,12 +5438,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.ConstSco return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAgg parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAgg parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -6164,7 +5453,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.ConstSco public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAgg prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -6177,18 +5466,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQueryOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAggOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ConstScoreQuery_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoBoundsAgg_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ConstScoreQuery_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoBoundsAgg_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAgg.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -6199,7 +5488,6 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getFilterFieldBuilder(); } } private static Builder create() { @@ -6208,12 +5496,10 @@ private static Builder create() { public Builder clear() { super.clear(); - if (filterBuilder_ == null) { - filter_ = com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance(); - } else { - filterBuilder_.clear(); - } + fieldName_ = ""; bitField0_ = (bitField0_ & ~0x00000001); + wrapLongitude_ = false; + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -6223,24 +5509,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAgg.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAgg getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAgg.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery build() { - com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAgg build() { + com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAgg result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAgg buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAgg result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -6248,36 +5534,39 @@ private com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuer return result; } - public com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery result = new com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery(this); + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAgg buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAgg result = new com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAgg(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - if (filterBuilder_ == null) { - result.filter_ = filter_; - } else { - result.filter_ = filterBuilder_.build(); + result.fieldName_ = fieldName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; } + result.wrapLongitude_ = wrapLongitude_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAgg) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAgg)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery.getDefaultInstance()) return this; - if (other.hasFilter()) { - mergeFilter(other.getFilter()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAgg other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAgg.getDefaultInstance()) return this; + if (other.hasFieldName()) { + setFieldName(other.getFieldName()); + } + if (other.hasWrapLongitude()) { + setWrapLongitude(other.getWrapLongitude()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -6311,12 +5600,13 @@ public Builder mergeFrom( break; } case 10: { - com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.Query.newBuilder(); - if (hasFilter()) { - subBuilder.mergeFrom(getFilter()); - } - input.readMessage(subBuilder, extensionRegistry); - setFilter(subBuilder.buildPartial()); + bitField0_ |= 0x00000001; + fieldName_ = input.readBytes(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + wrapLongitude_ = input.readBool(); break; } } @@ -6325,151 +5615,126 @@ public Builder mergeFrom( private int bitField0_; - // optional .com.alicloud.openservices.tablestore.core.protocol.Query filter = 1; - private com.alicloud.openservices.tablestore.core.protocol.Search.Query filter_ = com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder> filterBuilder_; - public boolean hasFilter() { + // optional string field_name = 1; + private java.lang.Object fieldName_ = ""; + public boolean hasFieldName() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public com.alicloud.openservices.tablestore.core.protocol.Search.Query getFilter() { - if (filterBuilder_ == null) { - return filter_; - } else { - return filterBuilder_.getMessage(); - } - } - public Builder setFilter(com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { - if (filterBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - filter_ = value; - onChanged(); - } else { - filterBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - return this; - } - public Builder setFilter( - com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder builderForValue) { - if (filterBuilder_ == null) { - filter_ = builderForValue.build(); - onChanged(); + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + fieldName_ = s; + return s; } else { - filterBuilder_.setMessage(builderForValue.build()); + return (String) ref; } - bitField0_ |= 0x00000001; - return this; } - public Builder mergeFilter(com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { - if (filterBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001) && - filter_ != com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance()) { - filter_ = - com.alicloud.openservices.tablestore.core.protocol.Search.Query.newBuilder(filter_).mergeFrom(value).buildPartial(); - } else { - filter_ = value; - } - onChanged(); - } else { - filterBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; + public Builder setFieldName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); return this; } - public Builder clearFilter() { - if (filterBuilder_ == null) { - filter_ = com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance(); - onChanged(); - } else { - filterBuilder_.clear(); - } + public Builder clearFieldName() { bitField0_ = (bitField0_ & ~0x00000001); + fieldName_ = getDefaultInstance().getFieldName(); + onChanged(); return this; } - public com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder getFilterBuilder() { + void setFieldName(com.google.protobuf.ByteString value) { bitField0_ |= 0x00000001; + fieldName_ = value; onChanged(); - return getFilterFieldBuilder().getBuilder(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getFilterOrBuilder() { - if (filterBuilder_ != null) { - return filterBuilder_.getMessageOrBuilder(); - } else { - return filter_; - } + + // optional bool wrap_longitude = 2; + private boolean wrapLongitude_ ; + public boolean hasWrapLongitude() { + return ((bitField0_ & 0x00000002) == 0x00000002); } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder> - getFilterFieldBuilder() { - if (filterBuilder_ == null) { - filterBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder>( - filter_, - getParentForChildren(), - isClean()); - filter_ = null; - } - return filterBuilder_; + public boolean getWrapLongitude() { + return wrapLongitude_; + } + public Builder setWrapLongitude(boolean value) { + bitField0_ |= 0x00000002; + wrapLongitude_ = value; + onChanged(); + return this; + } + public Builder clearWrapLongitude() { + bitField0_ = (bitField0_ & ~0x00000002); + wrapLongitude_ = false; + onChanged(); + return this; } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.ConstScoreQuery) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GeoBoundsAgg) } static { - defaultInstance = new ConstScoreQuery(true); + defaultInstance = new GeoBoundsAgg(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.ConstScoreQuery) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GeoBoundsAgg) } - public interface FieldValueFactorOrBuilder + public interface GeoDistanceAggRangeOrBuilder extends com.google.protobuf.MessageOrBuilder { - // optional string field_name = 1; - boolean hasFieldName(); - String getFieldName(); + // optional string key = 1; + boolean hasKey(); + String getKey(); + + // optional double range_from = 2; + boolean hasRangeFrom(); + double getRangeFrom(); + + // optional double range_to = 3; + boolean hasRangeTo(); + double getRangeTo(); } - public static final class FieldValueFactor extends + public static final class GeoDistanceAggRange extends com.google.protobuf.GeneratedMessage - implements FieldValueFactorOrBuilder { - // Use FieldValueFactor.newBuilder() to construct. - private FieldValueFactor(Builder builder) { + implements GeoDistanceAggRangeOrBuilder { + // Use GeoDistanceAggRange.newBuilder() to construct. + private GeoDistanceAggRange(Builder builder) { super(builder); } - private FieldValueFactor(boolean noInit) {} + private GeoDistanceAggRange(boolean noInit) {} - private static final FieldValueFactor defaultInstance; - public static FieldValueFactor getDefaultInstance() { + private static final GeoDistanceAggRange defaultInstance; + public static GeoDistanceAggRange getDefaultInstance() { return defaultInstance; } - public FieldValueFactor getDefaultInstanceForType() { + public GeoDistanceAggRange getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_FieldValueFactor_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoDistanceAggRange_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_FieldValueFactor_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoDistanceAggRange_fieldAccessorTable; } private int bitField0_; - // optional string field_name = 1; - public static final int FIELD_NAME_FIELD_NUMBER = 1; - private java.lang.Object fieldName_; - public boolean hasFieldName() { + // optional string key = 1; + public static final int KEY_FIELD_NUMBER = 1; + private java.lang.Object key_; + public boolean hasKey() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getFieldName() { - java.lang.Object ref = fieldName_; + public String getKey() { + java.lang.Object ref = key_; if (ref instanceof String) { return (String) ref; } else { @@ -6477,25 +5742,47 @@ public String getFieldName() { (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); if (com.google.protobuf.Internal.isValidUtf8(bs)) { - fieldName_ = s; + key_ = s; } return s; } } - private com.google.protobuf.ByteString getFieldNameBytes() { - java.lang.Object ref = fieldName_; + private com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = key_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((String) ref); - fieldName_ = b; + key_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + // optional double range_from = 2; + public static final int RANGE_FROM_FIELD_NUMBER = 2; + private double rangeFrom_; + public boolean hasRangeFrom() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public double getRangeFrom() { + return rangeFrom_; + } + + // optional double range_to = 3; + public static final int RANGE_TO_FIELD_NUMBER = 3; + private double rangeTo_; + public boolean hasRangeTo() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public double getRangeTo() { + return rangeTo_; + } + private void initFields() { - fieldName_ = ""; + key_ = ""; + rangeFrom_ = 0D; + rangeTo_ = 0D; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -6510,7 +5797,13 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getFieldNameBytes()); + output.writeBytes(1, getKeyBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeDouble(2, rangeFrom_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeDouble(3, rangeTo_); } getUnknownFields().writeTo(output); } @@ -6523,7 +5816,15 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getFieldNameBytes()); + .computeBytesSize(1, getKeyBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(2, rangeFrom_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(3, rangeTo_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -6537,41 +5838,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRange parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRange parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRange parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRange parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRange parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRange parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRange parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -6580,7 +5881,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldVal return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRange parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -6591,12 +5892,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldVal return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRange parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRange parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -6606,7 +5907,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldVal public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRange prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -6619,18 +5920,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactorOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRangeOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_FieldValueFactor_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoDistanceAggRange_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_FieldValueFactor_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoDistanceAggRange_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRange.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -6649,8 +5950,12 @@ private static Builder create() { public Builder clear() { super.clear(); - fieldName_ = ""; + key_ = ""; bitField0_ = (bitField0_ & ~0x00000001); + rangeFrom_ = 0D; + bitField0_ = (bitField0_ & ~0x00000002); + rangeTo_ = 0D; + bitField0_ = (bitField0_ & ~0x00000004); return this; } @@ -6660,24 +5965,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRange.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRange getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRange.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor build() { - com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRange build() { + com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRange result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRange buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRange result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -6685,32 +5990,46 @@ private com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFact return result; } - public com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor result = new com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor(this); + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRange buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRange result = new com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRange(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.fieldName_ = fieldName_; + result.key_ = key_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.rangeFrom_ = rangeFrom_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.rangeTo_ = rangeTo_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRange) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRange)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor.getDefaultInstance()) return this; - if (other.hasFieldName()) { - setFieldName(other.getFieldName()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRange other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRange.getDefaultInstance()) return this; + if (other.hasKey()) { + setKey(other.getKey()); + } + if (other.hasRangeFrom()) { + setRangeFrom(other.getRangeFrom()); + } + if (other.hasRangeTo()) { + setRangeTo(other.getRangeTo()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -6745,7 +6064,17 @@ public Builder mergeFrom( } case 10: { bitField0_ |= 0x00000001; - fieldName_ = input.readBytes(); + key_ = input.readBytes(); + break; + } + case 17: { + bitField0_ |= 0x00000002; + rangeFrom_ = input.readDouble(); + break; + } + case 25: { + bitField0_ |= 0x00000004; + rangeTo_ = input.readDouble(); break; } } @@ -6754,124 +6083,234 @@ public Builder mergeFrom( private int bitField0_; - // optional string field_name = 1; - private java.lang.Object fieldName_ = ""; - public boolean hasFieldName() { + // optional string key = 1; + private java.lang.Object key_ = ""; + public boolean hasKey() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getFieldName() { - java.lang.Object ref = fieldName_; + public String getKey() { + java.lang.Object ref = key_; if (!(ref instanceof String)) { String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - fieldName_ = s; + key_ = s; return s; } else { return (String) ref; } } - public Builder setFieldName(String value) { + public Builder setKey(String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; - fieldName_ = value; + key_ = value; onChanged(); return this; } - public Builder clearFieldName() { + public Builder clearKey() { bitField0_ = (bitField0_ & ~0x00000001); - fieldName_ = getDefaultInstance().getFieldName(); + key_ = getDefaultInstance().getKey(); onChanged(); return this; } - void setFieldName(com.google.protobuf.ByteString value) { + void setKey(com.google.protobuf.ByteString value) { bitField0_ |= 0x00000001; - fieldName_ = value; + key_ = value; onChanged(); } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.FieldValueFactor) + // optional double range_from = 2; + private double rangeFrom_ ; + public boolean hasRangeFrom() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public double getRangeFrom() { + return rangeFrom_; + } + public Builder setRangeFrom(double value) { + bitField0_ |= 0x00000002; + rangeFrom_ = value; + onChanged(); + return this; + } + public Builder clearRangeFrom() { + bitField0_ = (bitField0_ & ~0x00000002); + rangeFrom_ = 0D; + onChanged(); + return this; + } + + // optional double range_to = 3; + private double rangeTo_ ; + public boolean hasRangeTo() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public double getRangeTo() { + return rangeTo_; + } + public Builder setRangeTo(double value) { + bitField0_ |= 0x00000004; + rangeTo_ = value; + onChanged(); + return this; + } + public Builder clearRangeTo() { + bitField0_ = (bitField0_ & ~0x00000004); + rangeTo_ = 0D; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GeoDistanceAggRange) } static { - defaultInstance = new FieldValueFactor(true); + defaultInstance = new GeoDistanceAggRange(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.FieldValueFactor) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GeoDistanceAggRange) } - public interface FunctionScoreQueryOrBuilder + public interface GeoDistanceAggOrBuilder extends com.google.protobuf.MessageOrBuilder { - // optional .com.alicloud.openservices.tablestore.core.protocol.Query query = 1; - boolean hasQuery(); - com.alicloud.openservices.tablestore.core.protocol.Search.Query getQuery(); - com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getQueryOrBuilder(); + // optional string field_name = 1; + boolean hasFieldName(); + String getFieldName(); - // optional .com.alicloud.openservices.tablestore.core.protocol.FieldValueFactor field_value_factor = 2; - boolean hasFieldValueFactor(); - com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor getFieldValueFactor(); - com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactorOrBuilder getFieldValueFactorOrBuilder(); + // optional string origin = 2; + boolean hasOrigin(); + String getOrigin(); + + // repeated .com.alicloud.openservices.tablestore.core.protocol.GeoDistanceAggRange ranges = 3; + java.util.List + getRangesList(); + com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRange getRanges(int index); + int getRangesCount(); + java.util.List + getRangesOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRangeOrBuilder getRangesOrBuilder( + int index); } - public static final class FunctionScoreQuery extends + public static final class GeoDistanceAgg extends com.google.protobuf.GeneratedMessage - implements FunctionScoreQueryOrBuilder { - // Use FunctionScoreQuery.newBuilder() to construct. - private FunctionScoreQuery(Builder builder) { + implements GeoDistanceAggOrBuilder { + // Use GeoDistanceAgg.newBuilder() to construct. + private GeoDistanceAgg(Builder builder) { super(builder); } - private FunctionScoreQuery(boolean noInit) {} + private GeoDistanceAgg(boolean noInit) {} - private static final FunctionScoreQuery defaultInstance; - public static FunctionScoreQuery getDefaultInstance() { + private static final GeoDistanceAgg defaultInstance; + public static GeoDistanceAgg getDefaultInstance() { return defaultInstance; } - public FunctionScoreQuery getDefaultInstanceForType() { + public GeoDistanceAgg getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_FunctionScoreQuery_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoDistanceAgg_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_FunctionScoreQuery_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoDistanceAgg_fieldAccessorTable; } private int bitField0_; - // optional .com.alicloud.openservices.tablestore.core.protocol.Query query = 1; - public static final int QUERY_FIELD_NUMBER = 1; - private com.alicloud.openservices.tablestore.core.protocol.Search.Query query_; - public boolean hasQuery() { + // optional string field_name = 1; + public static final int FIELD_NAME_FIELD_NUMBER = 1; + private java.lang.Object fieldName_; + public boolean hasFieldName() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public com.alicloud.openservices.tablestore.core.protocol.Search.Query getQuery() { - return query_; + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + fieldName_ = s; + } + return s; + } } - public com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getQueryOrBuilder() { - return query_; + private com.google.protobuf.ByteString getFieldNameBytes() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + fieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - // optional .com.alicloud.openservices.tablestore.core.protocol.FieldValueFactor field_value_factor = 2; - public static final int FIELD_VALUE_FACTOR_FIELD_NUMBER = 2; - private com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor fieldValueFactor_; - public boolean hasFieldValueFactor() { + // optional string origin = 2; + public static final int ORIGIN_FIELD_NUMBER = 2; + private java.lang.Object origin_; + public boolean hasOrigin() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor getFieldValueFactor() { - return fieldValueFactor_; + public String getOrigin() { + java.lang.Object ref = origin_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + origin_ = s; + } + return s; + } } - public com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactorOrBuilder getFieldValueFactorOrBuilder() { - return fieldValueFactor_; + private com.google.protobuf.ByteString getOriginBytes() { + java.lang.Object ref = origin_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + origin_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.GeoDistanceAggRange ranges = 3; + public static final int RANGES_FIELD_NUMBER = 3; + private java.util.List ranges_; + public java.util.List getRangesList() { + return ranges_; + } + public java.util.List + getRangesOrBuilderList() { + return ranges_; + } + public int getRangesCount() { + return ranges_.size(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRange getRanges(int index) { + return ranges_.get(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRangeOrBuilder getRangesOrBuilder( + int index) { + return ranges_.get(index); } private void initFields() { - query_ = com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance(); - fieldValueFactor_ = com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor.getDefaultInstance(); + fieldName_ = ""; + origin_ = ""; + ranges_ = java.util.Collections.emptyList(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -6886,10 +6325,13 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeMessage(1, query_); + output.writeBytes(1, getFieldNameBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeMessage(2, fieldValueFactor_); + output.writeBytes(2, getOriginBytes()); + } + for (int i = 0; i < ranges_.size(); i++) { + output.writeMessage(3, ranges_.get(i)); } getUnknownFields().writeTo(output); } @@ -6902,11 +6344,15 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, query_); + .computeBytesSize(1, getFieldNameBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, fieldValueFactor_); + .computeBytesSize(2, getOriginBytes()); + } + for (int i = 0; i < ranges_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, ranges_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -6920,41 +6366,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAgg parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAgg parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAgg parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAgg parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAgg parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAgg parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAgg parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -6963,7 +6409,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.Function return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAgg parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -6974,12 +6420,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.Function return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAgg parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAgg parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -6989,7 +6435,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.Function public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAgg prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -7002,18 +6448,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQueryOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_FunctionScoreQuery_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoDistanceAgg_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_FunctionScoreQuery_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoDistanceAgg_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAgg.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -7024,8 +6470,7 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getQueryFieldBuilder(); - getFieldValueFactorFieldBuilder(); + getRangesFieldBuilder(); } } private static Builder create() { @@ -7034,18 +6479,16 @@ private static Builder create() { public Builder clear() { super.clear(); - if (queryBuilder_ == null) { - query_ = com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance(); - } else { - queryBuilder_.clear(); - } + fieldName_ = ""; bitField0_ = (bitField0_ & ~0x00000001); - if (fieldValueFactorBuilder_ == null) { - fieldValueFactor_ = com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor.getDefaultInstance(); + origin_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + if (rangesBuilder_ == null) { + ranges_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); } else { - fieldValueFactorBuilder_.clear(); + rangesBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -7055,24 +6498,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAgg.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAgg getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAgg.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery build() { - com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAgg build() { + com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAgg result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAgg buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAgg result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -7080,25 +6523,26 @@ private com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQ return result; } - public com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery result = new com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery(this); + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAgg buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAgg result = new com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAgg(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - if (queryBuilder_ == null) { - result.query_ = query_; - } else { - result.query_ = queryBuilder_.build(); - } + result.fieldName_ = fieldName_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - if (fieldValueFactorBuilder_ == null) { - result.fieldValueFactor_ = fieldValueFactor_; + result.origin_ = origin_; + if (rangesBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004)) { + ranges_ = java.util.Collections.unmodifiableList(ranges_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.ranges_ = ranges_; } else { - result.fieldValueFactor_ = fieldValueFactorBuilder_.build(); + result.ranges_ = rangesBuilder_.build(); } result.bitField0_ = to_bitField0_; onBuilt(); @@ -7106,21 +6550,47 @@ public com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQu } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAgg) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAgg)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery.getDefaultInstance()) return this; - if (other.hasQuery()) { - mergeQuery(other.getQuery()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAgg other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAgg.getDefaultInstance()) return this; + if (other.hasFieldName()) { + setFieldName(other.getFieldName()); } - if (other.hasFieldValueFactor()) { - mergeFieldValueFactor(other.getFieldValueFactor()); + if (other.hasOrigin()) { + setOrigin(other.getOrigin()); + } + if (rangesBuilder_ == null) { + if (!other.ranges_.isEmpty()) { + if (ranges_.isEmpty()) { + ranges_ = other.ranges_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureRangesIsMutable(); + ranges_.addAll(other.ranges_); + } + onChanged(); + } + } else { + if (!other.ranges_.isEmpty()) { + if (rangesBuilder_.isEmpty()) { + rangesBuilder_.dispose(); + rangesBuilder_ = null; + ranges_ = other.ranges_; + bitField0_ = (bitField0_ & ~0x00000004); + rangesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getRangesFieldBuilder() : null; + } else { + rangesBuilder_.addAllMessages(other.ranges_); + } + } } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -7154,21 +6624,19 @@ public Builder mergeFrom( break; } case 10: { - com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.Query.newBuilder(); - if (hasQuery()) { - subBuilder.mergeFrom(getQuery()); - } - input.readMessage(subBuilder, extensionRegistry); - setQuery(subBuilder.buildPartial()); + bitField0_ |= 0x00000001; + fieldName_ = input.readBytes(); break; } case 18: { - com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor.newBuilder(); - if (hasFieldValueFactor()) { - subBuilder.mergeFrom(getFieldValueFactor()); - } + bitField0_ |= 0x00000002; + origin_ = input.readBytes(); + break; + } + case 26: { + com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRange.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRange.newBuilder(); input.readMessage(subBuilder, extensionRegistry); - setFieldValueFactor(subBuilder.buildPartial()); + addRanges(subBuilder.buildPartial()); break; } } @@ -7177,250 +6645,323 @@ public Builder mergeFrom( private int bitField0_; - // optional .com.alicloud.openservices.tablestore.core.protocol.Query query = 1; - private com.alicloud.openservices.tablestore.core.protocol.Search.Query query_ = com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder> queryBuilder_; - public boolean hasQuery() { + // optional string field_name = 1; + private java.lang.Object fieldName_ = ""; + public boolean hasFieldName() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public com.alicloud.openservices.tablestore.core.protocol.Search.Query getQuery() { - if (queryBuilder_ == null) { - return query_; + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + fieldName_ = s; + return s; } else { - return queryBuilder_.getMessage(); + return (String) ref; } } - public Builder setQuery(com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { - if (queryBuilder_ == null) { + public Builder setFieldName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + return this; + } + public Builder clearFieldName() { + bitField0_ = (bitField0_ & ~0x00000001); + fieldName_ = getDefaultInstance().getFieldName(); + onChanged(); + return this; + } + void setFieldName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + } + + // optional string origin = 2; + private java.lang.Object origin_ = ""; + public boolean hasOrigin() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getOrigin() { + java.lang.Object ref = origin_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + origin_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setOrigin(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + origin_ = value; + onChanged(); + return this; + } + public Builder clearOrigin() { + bitField0_ = (bitField0_ & ~0x00000002); + origin_ = getDefaultInstance().getOrigin(); + onChanged(); + return this; + } + void setOrigin(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000002; + origin_ = value; + onChanged(); + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.GeoDistanceAggRange ranges = 3; + private java.util.List ranges_ = + java.util.Collections.emptyList(); + private void ensureRangesIsMutable() { + if (!((bitField0_ & 0x00000004) == 0x00000004)) { + ranges_ = new java.util.ArrayList(ranges_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRange, com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRange.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRangeOrBuilder> rangesBuilder_; + + public java.util.List getRangesList() { + if (rangesBuilder_ == null) { + return java.util.Collections.unmodifiableList(ranges_); + } else { + return rangesBuilder_.getMessageList(); + } + } + public int getRangesCount() { + if (rangesBuilder_ == null) { + return ranges_.size(); + } else { + return rangesBuilder_.getCount(); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRange getRanges(int index) { + if (rangesBuilder_ == null) { + return ranges_.get(index); + } else { + return rangesBuilder_.getMessage(index); + } + } + public Builder setRanges( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRange value) { + if (rangesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - query_ = value; + ensureRangesIsMutable(); + ranges_.set(index, value); onChanged(); } else { - queryBuilder_.setMessage(value); + rangesBuilder_.setMessage(index, value); } - bitField0_ |= 0x00000001; return this; } - public Builder setQuery( - com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder builderForValue) { - if (queryBuilder_ == null) { - query_ = builderForValue.build(); + public Builder setRanges( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRange.Builder builderForValue) { + if (rangesBuilder_ == null) { + ensureRangesIsMutable(); + ranges_.set(index, builderForValue.build()); onChanged(); } else { - queryBuilder_.setMessage(builderForValue.build()); + rangesBuilder_.setMessage(index, builderForValue.build()); } - bitField0_ |= 0x00000001; return this; } - public Builder mergeQuery(com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { - if (queryBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001) && - query_ != com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance()) { - query_ = - com.alicloud.openservices.tablestore.core.protocol.Search.Query.newBuilder(query_).mergeFrom(value).buildPartial(); - } else { - query_ = value; + public Builder addRanges(com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRange value) { + if (rangesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } + ensureRangesIsMutable(); + ranges_.add(value); onChanged(); } else { - queryBuilder_.mergeFrom(value); + rangesBuilder_.addMessage(value); } - bitField0_ |= 0x00000001; return this; } - public Builder clearQuery() { - if (queryBuilder_ == null) { - query_ = com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance(); + public Builder addRanges( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRange value) { + if (rangesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRangesIsMutable(); + ranges_.add(index, value); onChanged(); } else { - queryBuilder_.clear(); + rangesBuilder_.addMessage(index, value); } - bitField0_ = (bitField0_ & ~0x00000001); return this; } - public com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder getQueryBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getQueryFieldBuilder().getBuilder(); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getQueryOrBuilder() { - if (queryBuilder_ != null) { - return queryBuilder_.getMessageOrBuilder(); - } else { - return query_; - } - } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder> - getQueryFieldBuilder() { - if (queryBuilder_ == null) { - queryBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder>( - query_, - getParentForChildren(), - isClean()); - query_ = null; - } - return queryBuilder_; - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.FieldValueFactor field_value_factor = 2; - private com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor fieldValueFactor_ = com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor, com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactorOrBuilder> fieldValueFactorBuilder_; - public boolean hasFieldValueFactor() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor getFieldValueFactor() { - if (fieldValueFactorBuilder_ == null) { - return fieldValueFactor_; + public Builder addRanges( + com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRange.Builder builderForValue) { + if (rangesBuilder_ == null) { + ensureRangesIsMutable(); + ranges_.add(builderForValue.build()); + onChanged(); } else { - return fieldValueFactorBuilder_.getMessage(); + rangesBuilder_.addMessage(builderForValue.build()); } + return this; } - public Builder setFieldValueFactor(com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor value) { - if (fieldValueFactorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - fieldValueFactor_ = value; + public Builder addRanges( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRange.Builder builderForValue) { + if (rangesBuilder_ == null) { + ensureRangesIsMutable(); + ranges_.add(index, builderForValue.build()); onChanged(); } else { - fieldValueFactorBuilder_.setMessage(value); + rangesBuilder_.addMessage(index, builderForValue.build()); } - bitField0_ |= 0x00000002; return this; } - public Builder setFieldValueFactor( - com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor.Builder builderForValue) { - if (fieldValueFactorBuilder_ == null) { - fieldValueFactor_ = builderForValue.build(); + public Builder addAllRanges( + java.lang.Iterable values) { + if (rangesBuilder_ == null) { + ensureRangesIsMutable(); + super.addAll(values, ranges_); onChanged(); } else { - fieldValueFactorBuilder_.setMessage(builderForValue.build()); + rangesBuilder_.addAllMessages(values); } - bitField0_ |= 0x00000002; return this; } - public Builder mergeFieldValueFactor(com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor value) { - if (fieldValueFactorBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002) && - fieldValueFactor_ != com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor.getDefaultInstance()) { - fieldValueFactor_ = - com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor.newBuilder(fieldValueFactor_).mergeFrom(value).buildPartial(); - } else { - fieldValueFactor_ = value; - } + public Builder clearRanges() { + if (rangesBuilder_ == null) { + ranges_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); } else { - fieldValueFactorBuilder_.mergeFrom(value); + rangesBuilder_.clear(); } - bitField0_ |= 0x00000002; return this; } - public Builder clearFieldValueFactor() { - if (fieldValueFactorBuilder_ == null) { - fieldValueFactor_ = com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor.getDefaultInstance(); + public Builder removeRanges(int index) { + if (rangesBuilder_ == null) { + ensureRangesIsMutable(); + ranges_.remove(index); onChanged(); } else { - fieldValueFactorBuilder_.clear(); + rangesBuilder_.remove(index); } - bitField0_ = (bitField0_ & ~0x00000002); return this; } - public com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor.Builder getFieldValueFactorBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getFieldValueFactorFieldBuilder().getBuilder(); + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRange.Builder getRangesBuilder( + int index) { + return getRangesFieldBuilder().getBuilder(index); } - public com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactorOrBuilder getFieldValueFactorOrBuilder() { - if (fieldValueFactorBuilder_ != null) { - return fieldValueFactorBuilder_.getMessageOrBuilder(); + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRangeOrBuilder getRangesOrBuilder( + int index) { + if (rangesBuilder_ == null) { + return ranges_.get(index); } else { + return rangesBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getRangesOrBuilderList() { + if (rangesBuilder_ != null) { + return rangesBuilder_.getMessageOrBuilderList(); } else { - return fieldValueFactor_; + return java.util.Collections.unmodifiableList(ranges_); } } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor, com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactorOrBuilder> - getFieldValueFactorFieldBuilder() { - if (fieldValueFactorBuilder_ == null) { - fieldValueFactorBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor, com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactorOrBuilder>( - fieldValueFactor_, + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRange.Builder addRangesBuilder() { + return getRangesFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRange.getDefaultInstance()); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRange.Builder addRangesBuilder( + int index) { + return getRangesFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRange.getDefaultInstance()); + } + public java.util.List + getRangesBuilderList() { + return getRangesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRange, com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRange.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRangeOrBuilder> + getRangesFieldBuilder() { + if (rangesBuilder_ == null) { + rangesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRange, com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRange.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRangeOrBuilder>( + ranges_, + ((bitField0_ & 0x00000004) == 0x00000004), getParentForChildren(), isClean()); - fieldValueFactor_ = null; + ranges_ = null; } - return fieldValueFactorBuilder_; + return rangesBuilder_; } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.FunctionScoreQuery) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GeoDistanceAgg) } static { - defaultInstance = new FunctionScoreQuery(true); + defaultInstance = new GeoDistanceAgg(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.FunctionScoreQuery) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GeoDistanceAgg) } - public interface NestedQueryOrBuilder + public interface StatsAggOrBuilder extends com.google.protobuf.MessageOrBuilder { - // optional string path = 1; - boolean hasPath(); - String getPath(); - - // optional .com.alicloud.openservices.tablestore.core.protocol.Query query = 2; - boolean hasQuery(); - com.alicloud.openservices.tablestore.core.protocol.Search.Query getQuery(); - com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getQueryOrBuilder(); + // optional string field_name = 1; + boolean hasFieldName(); + String getFieldName(); - // optional .com.alicloud.openservices.tablestore.core.protocol.ScoreMode score_mode = 3; - boolean hasScoreMode(); - com.alicloud.openservices.tablestore.core.protocol.Search.ScoreMode getScoreMode(); + // optional bytes missing = 2; + boolean hasMissing(); + com.google.protobuf.ByteString getMissing(); } - public static final class NestedQuery extends + public static final class StatsAgg extends com.google.protobuf.GeneratedMessage - implements NestedQueryOrBuilder { - // Use NestedQuery.newBuilder() to construct. - private NestedQuery(Builder builder) { + implements StatsAggOrBuilder { + // Use StatsAgg.newBuilder() to construct. + private StatsAgg(Builder builder) { super(builder); } - private NestedQuery(boolean noInit) {} + private StatsAgg(boolean noInit) {} - private static final NestedQuery defaultInstance; - public static NestedQuery getDefaultInstance() { + private static final StatsAgg defaultInstance; + public static StatsAgg getDefaultInstance() { return defaultInstance; } - public NestedQuery getDefaultInstanceForType() { + public StatsAgg getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_NestedQuery_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_StatsAgg_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_NestedQuery_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_StatsAgg_fieldAccessorTable; } private int bitField0_; - // optional string path = 1; - public static final int PATH_FIELD_NUMBER = 1; - private java.lang.Object path_; - public boolean hasPath() { + // optional string field_name = 1; + public static final int FIELD_NAME_FIELD_NUMBER = 1; + private java.lang.Object fieldName_; + public boolean hasFieldName() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getPath() { - java.lang.Object ref = path_; + public String getFieldName() { + java.lang.Object ref = fieldName_; if (ref instanceof String) { return (String) ref; } else { @@ -7428,50 +6969,36 @@ public String getPath() { (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); if (com.google.protobuf.Internal.isValidUtf8(bs)) { - path_ = s; + fieldName_ = s; } return s; } } - private com.google.protobuf.ByteString getPathBytes() { - java.lang.Object ref = path_; + private com.google.protobuf.ByteString getFieldNameBytes() { + java.lang.Object ref = fieldName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((String) ref); - path_ = b; + fieldName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - // optional .com.alicloud.openservices.tablestore.core.protocol.Query query = 2; - public static final int QUERY_FIELD_NUMBER = 2; - private com.alicloud.openservices.tablestore.core.protocol.Search.Query query_; - public boolean hasQuery() { + // optional bytes missing = 2; + public static final int MISSING_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString missing_; + public boolean hasMissing() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public com.alicloud.openservices.tablestore.core.protocol.Search.Query getQuery() { - return query_; - } - public com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getQueryOrBuilder() { - return query_; - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.ScoreMode score_mode = 3; - public static final int SCORE_MODE_FIELD_NUMBER = 3; - private com.alicloud.openservices.tablestore.core.protocol.Search.ScoreMode scoreMode_; - public boolean hasScoreMode() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.ScoreMode getScoreMode() { - return scoreMode_; + public com.google.protobuf.ByteString getMissing() { + return missing_; } private void initFields() { - path_ = ""; - query_ = com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance(); - scoreMode_ = com.alicloud.openservices.tablestore.core.protocol.Search.ScoreMode.SCORE_MODE_NONE; + fieldName_ = ""; + missing_ = com.google.protobuf.ByteString.EMPTY; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -7486,13 +7013,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getPathBytes()); + output.writeBytes(1, getFieldNameBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeMessage(2, query_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeEnum(3, scoreMode_.getNumber()); + output.writeBytes(2, missing_); } getUnknownFields().writeTo(output); } @@ -7505,15 +7029,11 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getPathBytes()); + .computeBytesSize(1, getFieldNameBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, query_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(3, scoreMode_.getNumber()); + .computeBytesSize(2, missing_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -7527,41 +7047,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.StatsAgg parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.StatsAgg parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.Search.StatsAgg parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.StatsAgg parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.StatsAgg parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.StatsAgg parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.StatsAgg parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -7570,7 +7090,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedQu return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.StatsAgg parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -7581,12 +7101,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedQu return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.StatsAgg parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.StatsAgg parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -7596,7 +7116,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedQu public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.StatsAgg prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -7609,18 +7129,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.Search.NestedQueryOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.Search.StatsAggOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_NestedQuery_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_StatsAgg_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_NestedQuery_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_StatsAgg_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.StatsAgg.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -7631,7 +7151,6 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getQueryFieldBuilder(); } } private static Builder create() { @@ -7640,16 +7159,10 @@ private static Builder create() { public Builder clear() { super.clear(); - path_ = ""; + fieldName_ = ""; bitField0_ = (bitField0_ & ~0x00000001); - if (queryBuilder_ == null) { - query_ = com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance(); - } else { - queryBuilder_.clear(); - } + missing_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); - scoreMode_ = com.alicloud.openservices.tablestore.core.protocol.Search.ScoreMode.SCORE_MODE_NONE; - bitField0_ = (bitField0_ & ~0x00000004); return this; } @@ -7659,24 +7172,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.Search.StatsAgg.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.Search.StatsAgg getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.StatsAgg.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery build() { - com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.Search.StatsAgg build() { + com.alicloud.openservices.tablestore.core.protocol.Search.StatsAgg result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.Search.StatsAgg buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.Search.StatsAgg result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -7684,50 +7197,39 @@ private com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery bu return result; } - public com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery result = new com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery(this); + public com.alicloud.openservices.tablestore.core.protocol.Search.StatsAgg buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.StatsAgg result = new com.alicloud.openservices.tablestore.core.protocol.Search.StatsAgg(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.path_ = path_; + result.fieldName_ = fieldName_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - if (queryBuilder_ == null) { - result.query_ = query_; - } else { - result.query_ = queryBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.scoreMode_ = scoreMode_; + result.missing_ = missing_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.StatsAgg) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.StatsAgg)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery.getDefaultInstance()) return this; - if (other.hasPath()) { - setPath(other.getPath()); - } - if (other.hasQuery()) { - mergeQuery(other.getQuery()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.StatsAgg other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.StatsAgg.getDefaultInstance()) return this; + if (other.hasFieldName()) { + setFieldName(other.getFieldName()); } - if (other.hasScoreMode()) { - setScoreMode(other.getScoreMode()); + if (other.hasMissing()) { + setMissing(other.getMissing()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -7762,27 +7264,12 @@ public Builder mergeFrom( } case 10: { bitField0_ |= 0x00000001; - path_ = input.readBytes(); + fieldName_ = input.readBytes(); break; } case 18: { - com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.Query.newBuilder(); - if (hasQuery()) { - subBuilder.mergeFrom(getQuery()); - } - input.readMessage(subBuilder, extensionRegistry); - setQuery(subBuilder.buildPartial()); - break; - } - case 24: { - int rawValue = input.readEnum(); - com.alicloud.openservices.tablestore.core.protocol.Search.ScoreMode value = com.alicloud.openservices.tablestore.core.protocol.Search.ScoreMode.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(3, rawValue); - } else { - bitField0_ |= 0x00000004; - scoreMode_ = value; - } + bitField0_ |= 0x00000002; + missing_ = input.readBytes(); break; } } @@ -7791,208 +7278,114 @@ public Builder mergeFrom( private int bitField0_; - // optional string path = 1; - private java.lang.Object path_ = ""; - public boolean hasPath() { + // optional string field_name = 1; + private java.lang.Object fieldName_ = ""; + public boolean hasFieldName() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getPath() { - java.lang.Object ref = path_; + public String getFieldName() { + java.lang.Object ref = fieldName_; if (!(ref instanceof String)) { String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - path_ = s; + fieldName_ = s; return s; } else { return (String) ref; } } - public Builder setPath(String value) { + public Builder setFieldName(String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; - path_ = value; + fieldName_ = value; onChanged(); return this; } - public Builder clearPath() { + public Builder clearFieldName() { bitField0_ = (bitField0_ & ~0x00000001); - path_ = getDefaultInstance().getPath(); + fieldName_ = getDefaultInstance().getFieldName(); onChanged(); return this; } - void setPath(com.google.protobuf.ByteString value) { + void setFieldName(com.google.protobuf.ByteString value) { bitField0_ |= 0x00000001; - path_ = value; + fieldName_ = value; onChanged(); } - // optional .com.alicloud.openservices.tablestore.core.protocol.Query query = 2; - private com.alicloud.openservices.tablestore.core.protocol.Search.Query query_ = com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder> queryBuilder_; - public boolean hasQuery() { + // optional bytes missing = 2; + private com.google.protobuf.ByteString missing_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasMissing() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public com.alicloud.openservices.tablestore.core.protocol.Search.Query getQuery() { - if (queryBuilder_ == null) { - return query_; - } else { - return queryBuilder_.getMessage(); - } - } - public Builder setQuery(com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { - if (queryBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - query_ = value; - onChanged(); - } else { - queryBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - return this; - } - public Builder setQuery( - com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder builderForValue) { - if (queryBuilder_ == null) { - query_ = builderForValue.build(); - onChanged(); - } else { - queryBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - return this; - } - public Builder mergeQuery(com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { - if (queryBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002) && - query_ != com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance()) { - query_ = - com.alicloud.openservices.tablestore.core.protocol.Search.Query.newBuilder(query_).mergeFrom(value).buildPartial(); - } else { - query_ = value; - } - onChanged(); - } else { - queryBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - return this; - } - public Builder clearQuery() { - if (queryBuilder_ == null) { - query_ = com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance(); - onChanged(); - } else { - queryBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - public com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder getQueryBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getQueryFieldBuilder().getBuilder(); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getQueryOrBuilder() { - if (queryBuilder_ != null) { - return queryBuilder_.getMessageOrBuilder(); - } else { - return query_; - } - } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder> - getQueryFieldBuilder() { - if (queryBuilder_ == null) { - queryBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder>( - query_, - getParentForChildren(), - isClean()); - query_ = null; - } - return queryBuilder_; - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.ScoreMode score_mode = 3; - private com.alicloud.openservices.tablestore.core.protocol.Search.ScoreMode scoreMode_ = com.alicloud.openservices.tablestore.core.protocol.Search.ScoreMode.SCORE_MODE_NONE; - public boolean hasScoreMode() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.ScoreMode getScoreMode() { - return scoreMode_; + public com.google.protobuf.ByteString getMissing() { + return missing_; } - public Builder setScoreMode(com.alicloud.openservices.tablestore.core.protocol.Search.ScoreMode value) { + public Builder setMissing(com.google.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - scoreMode_ = value; + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + missing_ = value; onChanged(); return this; } - public Builder clearScoreMode() { - bitField0_ = (bitField0_ & ~0x00000004); - scoreMode_ = com.alicloud.openservices.tablestore.core.protocol.Search.ScoreMode.SCORE_MODE_NONE; + public Builder clearMissing() { + bitField0_ = (bitField0_ & ~0x00000002); + missing_ = getDefaultInstance().getMissing(); onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.NestedQuery) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.StatsAgg) } static { - defaultInstance = new NestedQuery(true); + defaultInstance = new StatsAgg(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.NestedQuery) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.StatsAgg) } - public interface GeoBoundingBoxQueryOrBuilder + public interface ExtendedStatsAggOrBuilder extends com.google.protobuf.MessageOrBuilder { // optional string field_name = 1; boolean hasFieldName(); String getFieldName(); - // optional string top_left = 2; - boolean hasTopLeft(); - String getTopLeft(); - - // optional string bottom_right = 3; - boolean hasBottomRight(); - String getBottomRight(); + // optional bytes missing = 2; + boolean hasMissing(); + com.google.protobuf.ByteString getMissing(); } - public static final class GeoBoundingBoxQuery extends + public static final class ExtendedStatsAgg extends com.google.protobuf.GeneratedMessage - implements GeoBoundingBoxQueryOrBuilder { - // Use GeoBoundingBoxQuery.newBuilder() to construct. - private GeoBoundingBoxQuery(Builder builder) { + implements ExtendedStatsAggOrBuilder { + // Use ExtendedStatsAgg.newBuilder() to construct. + private ExtendedStatsAgg(Builder builder) { super(builder); } - private GeoBoundingBoxQuery(boolean noInit) {} + private ExtendedStatsAgg(boolean noInit) {} - private static final GeoBoundingBoxQuery defaultInstance; - public static GeoBoundingBoxQuery getDefaultInstance() { + private static final ExtendedStatsAgg defaultInstance; + public static ExtendedStatsAgg getDefaultInstance() { return defaultInstance; } - public GeoBoundingBoxQuery getDefaultInstanceForType() { + public ExtendedStatsAgg getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoBoundingBoxQuery_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ExtendedStatsAgg_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoBoundingBoxQuery_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ExtendedStatsAgg_fieldAccessorTable; } private int bitField0_; @@ -8028,74 +7421,19 @@ private com.google.protobuf.ByteString getFieldNameBytes() { } } - // optional string top_left = 2; - public static final int TOP_LEFT_FIELD_NUMBER = 2; - private java.lang.Object topLeft_; - public boolean hasTopLeft() { + // optional bytes missing = 2; + public static final int MISSING_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString missing_; + public boolean hasMissing() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public String getTopLeft() { - java.lang.Object ref = topLeft_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - topLeft_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getTopLeftBytes() { - java.lang.Object ref = topLeft_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - topLeft_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // optional string bottom_right = 3; - public static final int BOTTOM_RIGHT_FIELD_NUMBER = 3; - private java.lang.Object bottomRight_; - public boolean hasBottomRight() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public String getBottomRight() { - java.lang.Object ref = bottomRight_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - bottomRight_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getBottomRightBytes() { - java.lang.Object ref = bottomRight_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - bottomRight_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public com.google.protobuf.ByteString getMissing() { + return missing_; } private void initFields() { fieldName_ = ""; - topLeft_ = ""; - bottomRight_ = ""; + missing_ = com.google.protobuf.ByteString.EMPTY; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -8113,10 +7451,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) output.writeBytes(1, getFieldNameBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getTopLeftBytes()); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeBytes(3, getBottomRightBytes()); + output.writeBytes(2, missing_); } getUnknownFields().writeTo(output); } @@ -8133,11 +7468,7 @@ public int getSerializedSize() { } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getTopLeftBytes()); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(3, getBottomRightBytes()); + .computeBytesSize(2, missing_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -8151,41 +7482,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAgg parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAgg parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAgg parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAgg parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAgg parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAgg parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAgg parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -8194,7 +7525,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoBound return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAgg parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -8205,12 +7536,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoBound return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAgg parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAgg parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -8220,7 +7551,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoBound public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAgg prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -8233,18 +7564,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQueryOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAggOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoBoundingBoxQuery_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ExtendedStatsAgg_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoBoundingBoxQuery_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ExtendedStatsAgg_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAgg.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -8265,10 +7596,8 @@ public Builder clear() { super.clear(); fieldName_ = ""; bitField0_ = (bitField0_ & ~0x00000001); - topLeft_ = ""; + missing_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); - bottomRight_ = ""; - bitField0_ = (bitField0_ & ~0x00000004); return this; } @@ -8278,24 +7607,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAgg.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAgg getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAgg.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery build() { - com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAgg build() { + com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAgg result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAgg buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAgg result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -8303,8 +7632,8 @@ private com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBox return result; } - public com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery result = new com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery(this); + public com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAgg buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAgg result = new com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAgg(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { @@ -8314,35 +7643,28 @@ public com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQ if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - result.topLeft_ = topLeft_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.bottomRight_ = bottomRight_; + result.missing_ = missing_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAgg) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAgg)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery.getDefaultInstance()) return this; + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAgg other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAgg.getDefaultInstance()) return this; if (other.hasFieldName()) { setFieldName(other.getFieldName()); } - if (other.hasTopLeft()) { - setTopLeft(other.getTopLeft()); - } - if (other.hasBottomRight()) { - setBottomRight(other.getBottomRight()); + if (other.hasMissing()) { + setMissing(other.getMissing()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -8382,12 +7704,7 @@ public Builder mergeFrom( } case 18: { bitField0_ |= 0x00000002; - topLeft_ = input.readBytes(); - break; - } - case 26: { - bitField0_ |= 0x00000004; - bottomRight_ = input.readBytes(); + missing_ = input.readBytes(); break; } } @@ -8432,130 +7749,83 @@ void setFieldName(com.google.protobuf.ByteString value) { onChanged(); } - // optional string top_left = 2; - private java.lang.Object topLeft_ = ""; - public boolean hasTopLeft() { + // optional bytes missing = 2; + private com.google.protobuf.ByteString missing_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasMissing() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public String getTopLeft() { - java.lang.Object ref = topLeft_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - topLeft_ = s; - return s; - } else { - return (String) ref; - } + public com.google.protobuf.ByteString getMissing() { + return missing_; } - public Builder setTopLeft(String value) { + public Builder setMissing(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; - topLeft_ = value; + missing_ = value; onChanged(); return this; } - public Builder clearTopLeft() { + public Builder clearMissing() { bitField0_ = (bitField0_ & ~0x00000002); - topLeft_ = getDefaultInstance().getTopLeft(); + missing_ = getDefaultInstance().getMissing(); onChanged(); return this; } - void setTopLeft(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000002; - topLeft_ = value; - onChanged(); - } - // optional string bottom_right = 3; - private java.lang.Object bottomRight_ = ""; - public boolean hasBottomRight() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public String getBottomRight() { - java.lang.Object ref = bottomRight_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - bottomRight_ = s; - return s; - } else { - return (String) ref; - } - } - public Builder setBottomRight(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - bottomRight_ = value; - onChanged(); - return this; - } - public Builder clearBottomRight() { - bitField0_ = (bitField0_ & ~0x00000004); - bottomRight_ = getDefaultInstance().getBottomRight(); - onChanged(); - return this; - } - void setBottomRight(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000004; - bottomRight_ = value; - onChanged(); - } - - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GeoBoundingBoxQuery) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.ExtendedStatsAgg) } static { - defaultInstance = new GeoBoundingBoxQuery(true); + defaultInstance = new ExtendedStatsAgg(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GeoBoundingBoxQuery) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.ExtendedStatsAgg) } - public interface GeoDistanceQueryOrBuilder + public interface PercentilesAggOrBuilder extends com.google.protobuf.MessageOrBuilder { // optional string field_name = 1; boolean hasFieldName(); String getFieldName(); - // optional string center_point = 2; - boolean hasCenterPoint(); - String getCenterPoint(); + // repeated double percents = 2; + java.util.List getPercentsList(); + int getPercentsCount(); + double getPercents(int index); - // optional double distance = 3; - boolean hasDistance(); - double getDistance(); + // optional bytes missing = 3; + boolean hasMissing(); + com.google.protobuf.ByteString getMissing(); } - public static final class GeoDistanceQuery extends + public static final class PercentilesAgg extends com.google.protobuf.GeneratedMessage - implements GeoDistanceQueryOrBuilder { - // Use GeoDistanceQuery.newBuilder() to construct. - private GeoDistanceQuery(Builder builder) { + implements PercentilesAggOrBuilder { + // Use PercentilesAgg.newBuilder() to construct. + private PercentilesAgg(Builder builder) { super(builder); } - private GeoDistanceQuery(boolean noInit) {} + private PercentilesAgg(boolean noInit) {} - private static final GeoDistanceQuery defaultInstance; - public static GeoDistanceQuery getDefaultInstance() { + private static final PercentilesAgg defaultInstance; + public static PercentilesAgg getDefaultInstance() { return defaultInstance; } - public GeoDistanceQuery getDefaultInstanceForType() { + public PercentilesAgg getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoDistanceQuery_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentilesAgg_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoDistanceQuery_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentilesAgg_fieldAccessorTable; } private int bitField0_; @@ -8591,52 +7861,34 @@ private com.google.protobuf.ByteString getFieldNameBytes() { } } - // optional string center_point = 2; - public static final int CENTER_POINT_FIELD_NUMBER = 2; - private java.lang.Object centerPoint_; - public boolean hasCenterPoint() { - return ((bitField0_ & 0x00000002) == 0x00000002); + // repeated double percents = 2; + public static final int PERCENTS_FIELD_NUMBER = 2; + private java.util.List percents_; + public java.util.List + getPercentsList() { + return percents_; } - public String getCenterPoint() { - java.lang.Object ref = centerPoint_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - centerPoint_ = s; - } - return s; - } + public int getPercentsCount() { + return percents_.size(); } - private com.google.protobuf.ByteString getCenterPointBytes() { - java.lang.Object ref = centerPoint_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - centerPoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public double getPercents(int index) { + return percents_.get(index); } - // optional double distance = 3; - public static final int DISTANCE_FIELD_NUMBER = 3; - private double distance_; - public boolean hasDistance() { - return ((bitField0_ & 0x00000004) == 0x00000004); + // optional bytes missing = 3; + public static final int MISSING_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString missing_; + public boolean hasMissing() { + return ((bitField0_ & 0x00000002) == 0x00000002); } - public double getDistance() { - return distance_; + public com.google.protobuf.ByteString getMissing() { + return missing_; } private void initFields() { fieldName_ = ""; - centerPoint_ = ""; - distance_ = 0D; + percents_ = java.util.Collections.emptyList();; + missing_ = com.google.protobuf.ByteString.EMPTY; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -8653,11 +7905,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getFieldNameBytes()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getCenterPointBytes()); + for (int i = 0; i < percents_.size(); i++) { + output.writeDouble(2, percents_.get(i)); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeDouble(3, distance_); + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(3, missing_); } getUnknownFields().writeTo(output); } @@ -8672,13 +7924,15 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, getFieldNameBytes()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getCenterPointBytes()); + { + int dataSize = 0; + dataSize = 8 * getPercentsList().size(); + size += dataSize; + size += 1 * getPercentsList().size(); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(3, distance_); + .computeBytesSize(3, missing_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -8692,41 +7946,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAgg parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAgg parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAgg parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAgg parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAgg parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAgg parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAgg parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -8735,7 +7989,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDista return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAgg parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -8746,12 +8000,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDista return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAgg parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAgg parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -8761,7 +8015,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDista public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAgg prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -8774,18 +8028,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQueryOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoDistanceQuery_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentilesAgg_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoDistanceQuery_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentilesAgg_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAgg.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -8806,9 +8060,9 @@ public Builder clear() { super.clear(); fieldName_ = ""; bitField0_ = (bitField0_ & ~0x00000001); - centerPoint_ = ""; + percents_ = java.util.Collections.emptyList();; bitField0_ = (bitField0_ & ~0x00000002); - distance_ = 0D; + missing_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000004); return this; } @@ -8819,24 +8073,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAgg.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAgg getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAgg.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery build() { - com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAgg build() { + com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAgg result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAgg buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAgg result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -8844,46 +8098,54 @@ private com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQue return result; } - public com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery result = new com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery(this); + public com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAgg buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAgg result = new com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAgg(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.fieldName_ = fieldName_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + percents_ = java.util.Collections.unmodifiableList(percents_); + bitField0_ = (bitField0_ & ~0x00000002); } - result.centerPoint_ = centerPoint_; + result.percents_ = percents_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; + to_bitField0_ |= 0x00000002; } - result.distance_ = distance_; + result.missing_ = missing_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAgg) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAgg)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery.getDefaultInstance()) return this; + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAgg other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAgg.getDefaultInstance()) return this; if (other.hasFieldName()) { setFieldName(other.getFieldName()); } - if (other.hasCenterPoint()) { - setCenterPoint(other.getCenterPoint()); + if (!other.percents_.isEmpty()) { + if (percents_.isEmpty()) { + percents_ = other.percents_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensurePercentsIsMutable(); + percents_.addAll(other.percents_); + } + onChanged(); } - if (other.hasDistance()) { - setDistance(other.getDistance()); + if (other.hasMissing()) { + setMissing(other.getMissing()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -8921,14 +8183,23 @@ public Builder mergeFrom( fieldName_ = input.readBytes(); break; } + case 17: { + ensurePercentsIsMutable(); + percents_.add(input.readDouble()); + break; + } case 18: { - bitField0_ |= 0x00000002; - centerPoint_ = input.readBytes(); + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + addPercents(input.readDouble()); + } + input.popLimit(limit); break; } - case 25: { + case 26: { bitField0_ |= 0x00000004; - distance_ = input.readDouble(); + missing_ = input.readBytes(); break; } } @@ -8973,112 +8244,128 @@ void setFieldName(com.google.protobuf.ByteString value) { onChanged(); } - // optional string center_point = 2; - private java.lang.Object centerPoint_ = ""; - public boolean hasCenterPoint() { - return ((bitField0_ & 0x00000002) == 0x00000002); + // repeated double percents = 2; + private java.util.List percents_ = java.util.Collections.emptyList();; + private void ensurePercentsIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + percents_ = new java.util.ArrayList(percents_); + bitField0_ |= 0x00000002; + } } - public String getCenterPoint() { - java.lang.Object ref = centerPoint_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - centerPoint_ = s; - return s; - } else { - return (String) ref; - } + public java.util.List + getPercentsList() { + return java.util.Collections.unmodifiableList(percents_); } - public Builder setCenterPoint(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - centerPoint_ = value; + public int getPercentsCount() { + return percents_.size(); + } + public double getPercents(int index) { + return percents_.get(index); + } + public Builder setPercents( + int index, double value) { + ensurePercentsIsMutable(); + percents_.set(index, value); onChanged(); return this; } - public Builder clearCenterPoint() { - bitField0_ = (bitField0_ & ~0x00000002); - centerPoint_ = getDefaultInstance().getCenterPoint(); + public Builder addPercents(double value) { + ensurePercentsIsMutable(); + percents_.add(value); onChanged(); return this; } - void setCenterPoint(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000002; - centerPoint_ = value; + public Builder addAllPercents( + java.lang.Iterable values) { + ensurePercentsIsMutable(); + super.addAll(values, percents_); + onChanged(); + return this; + } + public Builder clearPercents() { + percents_ = java.util.Collections.emptyList();; + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); + return this; } - // optional double distance = 3; - private double distance_ ; - public boolean hasDistance() { + // optional bytes missing = 3; + private com.google.protobuf.ByteString missing_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasMissing() { return ((bitField0_ & 0x00000004) == 0x00000004); } - public double getDistance() { - return distance_; + public com.google.protobuf.ByteString getMissing() { + return missing_; } - public Builder setDistance(double value) { - bitField0_ |= 0x00000004; - distance_ = value; + public Builder setMissing(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + missing_ = value; onChanged(); return this; } - public Builder clearDistance() { + public Builder clearMissing() { bitField0_ = (bitField0_ & ~0x00000004); - distance_ = 0D; + missing_ = getDefaultInstance().getMissing(); onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GeoDistanceQuery) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.PercentilesAgg) } static { - defaultInstance = new GeoDistanceQuery(true); + defaultInstance = new PercentilesAgg(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GeoDistanceQuery) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.PercentilesAgg) } - public interface GeoPolygonQueryOrBuilder + public interface PercentileRanksAggOrBuilder extends com.google.protobuf.MessageOrBuilder { // optional string field_name = 1; boolean hasFieldName(); String getFieldName(); - // repeated string points = 2; - java.util.List getPointsList(); - int getPointsCount(); - String getPoints(int index); + // repeated double values = 2; + java.util.List getValuesList(); + int getValuesCount(); + double getValues(int index); + + // optional bytes missing = 3; + boolean hasMissing(); + com.google.protobuf.ByteString getMissing(); } - public static final class GeoPolygonQuery extends + public static final class PercentileRanksAgg extends com.google.protobuf.GeneratedMessage - implements GeoPolygonQueryOrBuilder { - // Use GeoPolygonQuery.newBuilder() to construct. - private GeoPolygonQuery(Builder builder) { + implements PercentileRanksAggOrBuilder { + // Use PercentileRanksAgg.newBuilder() to construct. + private PercentileRanksAgg(Builder builder) { super(builder); } - private GeoPolygonQuery(boolean noInit) {} + private PercentileRanksAgg(boolean noInit) {} - private static final GeoPolygonQuery defaultInstance; - public static GeoPolygonQuery getDefaultInstance() { + private static final PercentileRanksAgg defaultInstance; + public static PercentileRanksAgg getDefaultInstance() { return defaultInstance; } - public GeoPolygonQuery getDefaultInstanceForType() { + public PercentileRanksAgg getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoPolygonQuery_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentileRanksAgg_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoPolygonQuery_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentileRanksAgg_fieldAccessorTable; } private int bitField0_; @@ -9114,23 +8401,34 @@ private com.google.protobuf.ByteString getFieldNameBytes() { } } - // repeated string points = 2; - public static final int POINTS_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList points_; - public java.util.List - getPointsList() { - return points_; + // repeated double values = 2; + public static final int VALUES_FIELD_NUMBER = 2; + private java.util.List values_; + public java.util.List + getValuesList() { + return values_; } - public int getPointsCount() { - return points_.size(); + public int getValuesCount() { + return values_.size(); } - public String getPoints(int index) { - return points_.get(index); + public double getValues(int index) { + return values_.get(index); + } + + // optional bytes missing = 3; + public static final int MISSING_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString missing_; + public boolean hasMissing() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getMissing() { + return missing_; } private void initFields() { fieldName_ = ""; - points_ = com.google.protobuf.LazyStringArrayList.EMPTY; + values_ = java.util.Collections.emptyList();; + missing_ = com.google.protobuf.ByteString.EMPTY; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -9147,8 +8445,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getFieldNameBytes()); } - for (int i = 0; i < points_.size(); i++) { - output.writeBytes(2, points_.getByteString(i)); + for (int i = 0; i < values_.size(); i++) { + output.writeDouble(2, values_.get(i)); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(3, missing_); } getUnknownFields().writeTo(output); } @@ -9165,12 +8466,13 @@ public int getSerializedSize() { } { int dataSize = 0; - for (int i = 0; i < points_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeBytesSizeNoTag(points_.getByteString(i)); - } + dataSize = 8 * getValuesList().size(); size += dataSize; - size += 1 * getPointsList().size(); + size += 1 * getValuesList().size(); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, missing_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -9184,41 +8486,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAgg parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAgg parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAgg parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAgg parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAgg parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAgg parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAgg parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -9227,7 +8529,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolyg return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAgg parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -9238,12 +8540,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolyg return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAgg parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAgg parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -9253,7 +8555,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolyg public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAgg prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -9266,18 +8568,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQueryOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAggOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoPolygonQuery_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentileRanksAgg_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoPolygonQuery_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentileRanksAgg_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAgg.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -9298,8 +8600,10 @@ public Builder clear() { super.clear(); fieldName_ = ""; bitField0_ = (bitField0_ & ~0x00000001); - points_ = com.google.protobuf.LazyStringArrayList.EMPTY; + values_ = java.util.Collections.emptyList();; bitField0_ = (bitField0_ & ~0x00000002); + missing_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); return this; } @@ -9309,24 +8613,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAgg.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAgg getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAgg.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery build() { - com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAgg build() { + com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAgg result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAgg buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAgg result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -9334,8 +8638,8 @@ private com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuer return result; } - public com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery result = new com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery(this); + public com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAgg buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAgg result = new com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAgg(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { @@ -9343,40 +8647,46 @@ public com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery } result.fieldName_ = fieldName_; if (((bitField0_ & 0x00000002) == 0x00000002)) { - points_ = new com.google.protobuf.UnmodifiableLazyStringList( - points_); + values_ = java.util.Collections.unmodifiableList(values_); bitField0_ = (bitField0_ & ~0x00000002); } - result.points_ = points_; + result.values_ = values_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000002; + } + result.missing_ = missing_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAgg) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAgg)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery.getDefaultInstance()) return this; + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAgg other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAgg.getDefaultInstance()) return this; if (other.hasFieldName()) { setFieldName(other.getFieldName()); } - if (!other.points_.isEmpty()) { - if (points_.isEmpty()) { - points_ = other.points_; + if (!other.values_.isEmpty()) { + if (values_.isEmpty()) { + values_ = other.values_; bitField0_ = (bitField0_ & ~0x00000002); } else { - ensurePointsIsMutable(); - points_.addAll(other.points_); + ensureValuesIsMutable(); + values_.addAll(other.values_); } onChanged(); } + if (other.hasMissing()) { + setMissing(other.getMissing()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -9413,9 +8723,23 @@ public Builder mergeFrom( fieldName_ = input.readBytes(); break; } + case 17: { + ensureValuesIsMutable(); + values_.add(input.readDouble()); + break; + } case 18: { - ensurePointsIsMutable(); - points_.add(input.readBytes()); + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + addValues(input.readDouble()); + } + input.popLimit(limit); + break; + } + case 26: { + bitField0_ |= 0x00000004; + missing_ = input.readBytes(); break; } } @@ -9460,136 +8784,156 @@ void setFieldName(com.google.protobuf.ByteString value) { onChanged(); } - // repeated string points = 2; - private com.google.protobuf.LazyStringList points_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensurePointsIsMutable() { + // repeated double values = 2; + private java.util.List values_ = java.util.Collections.emptyList();; + private void ensureValuesIsMutable() { if (!((bitField0_ & 0x00000002) == 0x00000002)) { - points_ = new com.google.protobuf.LazyStringArrayList(points_); + values_ = new java.util.ArrayList(values_); bitField0_ |= 0x00000002; } } - public java.util.List - getPointsList() { - return java.util.Collections.unmodifiableList(points_); + public java.util.List + getValuesList() { + return java.util.Collections.unmodifiableList(values_); } - public int getPointsCount() { - return points_.size(); + public int getValuesCount() { + return values_.size(); } - public String getPoints(int index) { - return points_.get(index); + public double getValues(int index) { + return values_.get(index); } - public Builder setPoints( - int index, String value) { - if (value == null) { - throw new NullPointerException(); - } - ensurePointsIsMutable(); - points_.set(index, value); + public Builder setValues( + int index, double value) { + ensureValuesIsMutable(); + values_.set(index, value); onChanged(); return this; } - public Builder addPoints(String value) { - if (value == null) { - throw new NullPointerException(); - } - ensurePointsIsMutable(); - points_.add(value); + public Builder addValues(double value) { + ensureValuesIsMutable(); + values_.add(value); onChanged(); return this; } - public Builder addAllPoints( - java.lang.Iterable values) { - ensurePointsIsMutable(); - super.addAll(values, points_); + public Builder addAllValues( + java.lang.Iterable values) { + ensureValuesIsMutable(); + super.addAll(values, values_); onChanged(); return this; } - public Builder clearPoints() { - points_ = com.google.protobuf.LazyStringArrayList.EMPTY; + public Builder clearValues() { + values_ = java.util.Collections.emptyList();; bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } - void addPoints(com.google.protobuf.ByteString value) { - ensurePointsIsMutable(); - points_.add(value); + + // optional bytes missing = 3; + private com.google.protobuf.ByteString missing_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasMissing() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.google.protobuf.ByteString getMissing() { + return missing_; + } + public Builder setMissing(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + missing_ = value; + onChanged(); + return this; + } + public Builder clearMissing() { + bitField0_ = (bitField0_ & ~0x00000004); + missing_ = getDefaultInstance().getMissing(); onChanged(); + return this; } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GeoPolygonQuery) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.PercentileRanksAgg) } static { - defaultInstance = new GeoPolygonQuery(true); + defaultInstance = new PercentileRanksAgg(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GeoPolygonQuery) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.PercentileRanksAgg) } - public interface QueryOrBuilder + public interface ValueCountAggOrBuilder extends com.google.protobuf.MessageOrBuilder { - // optional .com.alicloud.openservices.tablestore.core.protocol.QueryType type = 1; - boolean hasType(); - com.alicloud.openservices.tablestore.core.protocol.Search.QueryType getType(); - - // optional bytes query = 2; - boolean hasQuery(); - com.google.protobuf.ByteString getQuery(); + // optional string field_name = 1; + boolean hasFieldName(); + String getFieldName(); } - public static final class Query extends + public static final class ValueCountAgg extends com.google.protobuf.GeneratedMessage - implements QueryOrBuilder { - // Use Query.newBuilder() to construct. - private Query(Builder builder) { + implements ValueCountAggOrBuilder { + // Use ValueCountAgg.newBuilder() to construct. + private ValueCountAgg(Builder builder) { super(builder); } - private Query(boolean noInit) {} + private ValueCountAgg(boolean noInit) {} - private static final Query defaultInstance; - public static Query getDefaultInstance() { + private static final ValueCountAgg defaultInstance; + public static ValueCountAgg getDefaultInstance() { return defaultInstance; } - public Query getDefaultInstanceForType() { + public ValueCountAgg getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Query_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ValueCountAgg_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Query_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ValueCountAgg_fieldAccessorTable; } private int bitField0_; - // optional .com.alicloud.openservices.tablestore.core.protocol.QueryType type = 1; - public static final int TYPE_FIELD_NUMBER = 1; - private com.alicloud.openservices.tablestore.core.protocol.Search.QueryType type_; - public boolean hasType() { + // optional string field_name = 1; + public static final int FIELD_NAME_FIELD_NUMBER = 1; + private java.lang.Object fieldName_; + public boolean hasFieldName() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public com.alicloud.openservices.tablestore.core.protocol.Search.QueryType getType() { - return type_; - } - - // optional bytes query = 2; - public static final int QUERY_FIELD_NUMBER = 2; - private com.google.protobuf.ByteString query_; - public boolean hasQuery() { - return ((bitField0_ & 0x00000002) == 0x00000002); + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + fieldName_ = s; + } + return s; + } } - public com.google.protobuf.ByteString getQuery() { - return query_; + private com.google.protobuf.ByteString getFieldNameBytes() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + fieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } private void initFields() { - type_ = com.alicloud.openservices.tablestore.core.protocol.Search.QueryType.MATCH_QUERY; - query_ = com.google.protobuf.ByteString.EMPTY; + fieldName_ = ""; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -9604,10 +8948,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeEnum(1, type_.getNumber()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, query_); + output.writeBytes(1, getFieldNameBytes()); } getUnknownFields().writeTo(output); } @@ -9620,11 +8961,7 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, type_.getNumber()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, query_); + .computeBytesSize(1, getFieldNameBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -9638,41 +8975,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.Query parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAgg parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.Query parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAgg parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.Query parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAgg parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.Query parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAgg parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.Query parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAgg parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.Query parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAgg parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.Query parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAgg parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -9681,7 +9018,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.Query pa return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.Query parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAgg parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -9692,12 +9029,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.Query pa return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.Query parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAgg parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.Query parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAgg parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -9707,7 +9044,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.Query pa public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.Query prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAgg prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -9720,18 +9057,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAggOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Query_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ValueCountAgg_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Query_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ValueCountAgg_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.Query.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAgg.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -9750,10 +9087,8 @@ private static Builder create() { public Builder clear() { super.clear(); - type_ = com.alicloud.openservices.tablestore.core.protocol.Search.QueryType.MATCH_QUERY; + fieldName_ = ""; bitField0_ = (bitField0_ & ~0x00000001); - query_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -9763,24 +9098,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAgg.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.Query getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAgg getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAgg.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.Query build() { - com.alicloud.openservices.tablestore.core.protocol.Search.Query result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAgg build() { + com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAgg result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.Search.Query buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAgg buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.Search.Query result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAgg result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -9788,39 +9123,32 @@ private com.alicloud.openservices.tablestore.core.protocol.Search.Query buildPar return result; } - public com.alicloud.openservices.tablestore.core.protocol.Search.Query buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.Search.Query result = new com.alicloud.openservices.tablestore.core.protocol.Search.Query(this); + public com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAgg buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAgg result = new com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAgg(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.type_ = type_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.query_ = query_; + result.fieldName_ = fieldName_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.Query) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.Query)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAgg) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAgg)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.Query other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance()) return this; - if (other.hasType()) { - setType(other.getType()); - } - if (other.hasQuery()) { - setQuery(other.getQuery()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAgg other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAgg.getDefaultInstance()) return this; + if (other.hasFieldName()) { + setFieldName(other.getFieldName()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -9853,20 +9181,9 @@ public Builder mergeFrom( } break; } - case 8: { - int rawValue = input.readEnum(); - com.alicloud.openservices.tablestore.core.protocol.Search.QueryType value = com.alicloud.openservices.tablestore.core.protocol.Search.QueryType.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(1, rawValue); - } else { - bitField0_ |= 0x00000001; - type_ = value; - } - break; - } - case 18: { - bitField0_ |= 0x00000002; - query_ = input.readBytes(); + case 10: { + bitField0_ |= 0x00000001; + fieldName_ = input.readBytes(); break; } } @@ -9875,109 +9192,105 @@ public Builder mergeFrom( private int bitField0_; - // optional .com.alicloud.openservices.tablestore.core.protocol.QueryType type = 1; - private com.alicloud.openservices.tablestore.core.protocol.Search.QueryType type_ = com.alicloud.openservices.tablestore.core.protocol.Search.QueryType.MATCH_QUERY; - public boolean hasType() { + // optional string field_name = 1; + private java.lang.Object fieldName_ = ""; + public boolean hasFieldName() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public com.alicloud.openservices.tablestore.core.protocol.Search.QueryType getType() { - return type_; - } - public Builder setType(com.alicloud.openservices.tablestore.core.protocol.Search.QueryType value) { - if (value == null) { - throw new NullPointerException(); + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + fieldName_ = s; + return s; + } else { + return (String) ref; } - bitField0_ |= 0x00000001; - type_ = value; - onChanged(); - return this; - } - public Builder clearType() { - bitField0_ = (bitField0_ & ~0x00000001); - type_ = com.alicloud.openservices.tablestore.core.protocol.Search.QueryType.MATCH_QUERY; - onChanged(); - return this; - } - - // optional bytes query = 2; - private com.google.protobuf.ByteString query_ = com.google.protobuf.ByteString.EMPTY; - public boolean hasQuery() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public com.google.protobuf.ByteString getQuery() { - return query_; } - public Builder setQuery(com.google.protobuf.ByteString value) { + public Builder setFieldName(String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000002; - query_ = value; + bitField0_ |= 0x00000001; + fieldName_ = value; onChanged(); return this; } - public Builder clearQuery() { - bitField0_ = (bitField0_ & ~0x00000002); - query_ = getDefaultInstance().getQuery(); + public Builder clearFieldName() { + bitField0_ = (bitField0_ & ~0x00000001); + fieldName_ = getDefaultInstance().getFieldName(); onChanged(); return this; } + void setFieldName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.Query) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.ValueCountAgg) } static { - defaultInstance = new Query(true); + defaultInstance = new ValueCountAgg(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.Query) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.ValueCountAgg) } - public interface CollapseOrBuilder + public interface AggClauseOrBuilder extends com.google.protobuf.MessageOrBuilder { - // optional string field_name = 1; - boolean hasFieldName(); - String getFieldName(); + // optional string agg_name = 1; + boolean hasAggName(); + String getAggName(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.AggType agg_type = 2; + boolean hasAggType(); + com.alicloud.openservices.tablestore.core.protocol.Search.AggType getAggType(); + + // optional bytes agg_body = 3; + boolean hasAggBody(); + com.google.protobuf.ByteString getAggBody(); } - public static final class Collapse extends + public static final class AggClause extends com.google.protobuf.GeneratedMessage - implements CollapseOrBuilder { - // Use Collapse.newBuilder() to construct. - private Collapse(Builder builder) { + implements AggClauseOrBuilder { + // Use AggClause.newBuilder() to construct. + private AggClause(Builder builder) { super(builder); } - private Collapse(boolean noInit) {} + private AggClause(boolean noInit) {} - private static final Collapse defaultInstance; - public static Collapse getDefaultInstance() { + private static final AggClause defaultInstance; + public static AggClause getDefaultInstance() { return defaultInstance; } - public Collapse getDefaultInstanceForType() { + public AggClause getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Collapse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_AggClause_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Collapse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_AggClause_fieldAccessorTable; } private int bitField0_; - // optional string field_name = 1; - public static final int FIELD_NAME_FIELD_NUMBER = 1; - private java.lang.Object fieldName_; - public boolean hasFieldName() { + // optional string agg_name = 1; + public static final int AGG_NAME_FIELD_NUMBER = 1; + private java.lang.Object aggName_; + public boolean hasAggName() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getFieldName() { - java.lang.Object ref = fieldName_; + public String getAggName() { + java.lang.Object ref = aggName_; if (ref instanceof String) { return (String) ref; } else { @@ -9985,25 +9298,47 @@ public String getFieldName() { (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); if (com.google.protobuf.Internal.isValidUtf8(bs)) { - fieldName_ = s; + aggName_ = s; } return s; } } - private com.google.protobuf.ByteString getFieldNameBytes() { - java.lang.Object ref = fieldName_; + private com.google.protobuf.ByteString getAggNameBytes() { + java.lang.Object ref = aggName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((String) ref); - fieldName_ = b; + aggName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + // optional .com.alicloud.openservices.tablestore.core.protocol.AggType agg_type = 2; + public static final int AGG_TYPE_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.Search.AggType aggType_; + public boolean hasAggType() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggType getAggType() { + return aggType_; + } + + // optional bytes agg_body = 3; + public static final int AGG_BODY_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString aggBody_; + public boolean hasAggBody() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.google.protobuf.ByteString getAggBody() { + return aggBody_; + } + private void initFields() { - fieldName_ = ""; + aggName_ = ""; + aggType_ = com.alicloud.openservices.tablestore.core.protocol.Search.AggType.AVG_AGG; + aggBody_ = com.google.protobuf.ByteString.EMPTY; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -10018,7 +9353,13 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getFieldNameBytes()); + output.writeBytes(1, getAggNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeEnum(2, aggType_.getNumber()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeBytes(3, aggBody_); } getUnknownFields().writeTo(output); } @@ -10031,7 +9372,15 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getFieldNameBytes()); + .computeBytesSize(1, getAggNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, aggType_.getNumber()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, aggBody_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -10045,41 +9394,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.Collapse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.AggClause parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.Collapse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.AggClause parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.Collapse parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.Search.AggClause parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.Collapse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.AggClause parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.Collapse parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.AggClause parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.Collapse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.AggClause parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.Collapse parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.AggClause parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -10088,7 +9437,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.Collapse return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.Collapse parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.AggClause parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -10099,12 +9448,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.Collapse return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.Collapse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.AggClause parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.Collapse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.AggClause parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -10114,7 +9463,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.Collapse public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.Collapse prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.AggClause prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -10127,18 +9476,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.Search.CollapseOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.Search.AggClauseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Collapse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_AggClause_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Collapse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_AggClause_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.Collapse.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.AggClause.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -10157,8 +9506,12 @@ private static Builder create() { public Builder clear() { super.clear(); - fieldName_ = ""; + aggName_ = ""; bitField0_ = (bitField0_ & ~0x00000001); + aggType_ = com.alicloud.openservices.tablestore.core.protocol.Search.AggType.AVG_AGG; + bitField0_ = (bitField0_ & ~0x00000002); + aggBody_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); return this; } @@ -10168,24 +9521,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.Collapse.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.Search.AggClause.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.Collapse getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.Collapse.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.Search.AggClause getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.AggClause.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.Collapse build() { - com.alicloud.openservices.tablestore.core.protocol.Search.Collapse result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.Search.AggClause build() { + com.alicloud.openservices.tablestore.core.protocol.Search.AggClause result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.Search.Collapse buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.Search.AggClause buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.Search.Collapse result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.Search.AggClause result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -10193,32 +9546,46 @@ private com.alicloud.openservices.tablestore.core.protocol.Search.Collapse build return result; } - public com.alicloud.openservices.tablestore.core.protocol.Search.Collapse buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.Search.Collapse result = new com.alicloud.openservices.tablestore.core.protocol.Search.Collapse(this); + public com.alicloud.openservices.tablestore.core.protocol.Search.AggClause buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.AggClause result = new com.alicloud.openservices.tablestore.core.protocol.Search.AggClause(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.fieldName_ = fieldName_; + result.aggName_ = aggName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.aggType_ = aggType_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.aggBody_ = aggBody_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.Collapse) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.Collapse)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.AggClause) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.AggClause)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.Collapse other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.Search.Collapse.getDefaultInstance()) return this; - if (other.hasFieldName()) { - setFieldName(other.getFieldName()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.AggClause other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.AggClause.getDefaultInstance()) return this; + if (other.hasAggName()) { + setAggName(other.getAggName()); + } + if (other.hasAggType()) { + setAggType(other.getAggType()); + } + if (other.hasAggBody()) { + setAggBody(other.getAggBody()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -10253,7 +9620,23 @@ public Builder mergeFrom( } case 10: { bitField0_ |= 0x00000001; - fieldName_ = input.readBytes(); + aggName_ = input.readBytes(); + break; + } + case 16: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.Search.AggType value = com.alicloud.openservices.tablestore.core.protocol.Search.AggType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(2, rawValue); + } else { + bitField0_ |= 0x00000002; + aggType_ = value; + } + break; + } + case 26: { + bitField0_ |= 0x00000004; + aggBody_ = input.readBytes(); break; } } @@ -10262,142 +9645,165 @@ public Builder mergeFrom( private int bitField0_; - // optional string field_name = 1; - private java.lang.Object fieldName_ = ""; - public boolean hasFieldName() { + // optional string agg_name = 1; + private java.lang.Object aggName_ = ""; + public boolean hasAggName() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getFieldName() { - java.lang.Object ref = fieldName_; + public String getAggName() { + java.lang.Object ref = aggName_; if (!(ref instanceof String)) { String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - fieldName_ = s; + aggName_ = s; return s; } else { return (String) ref; } } - public Builder setFieldName(String value) { + public Builder setAggName(String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; - fieldName_ = value; + aggName_ = value; onChanged(); return this; } - public Builder clearFieldName() { + public Builder clearAggName() { bitField0_ = (bitField0_ & ~0x00000001); - fieldName_ = getDefaultInstance().getFieldName(); + aggName_ = getDefaultInstance().getAggName(); onChanged(); return this; } - void setFieldName(com.google.protobuf.ByteString value) { + void setAggName(com.google.protobuf.ByteString value) { bitField0_ |= 0x00000001; - fieldName_ = value; + aggName_ = value; onChanged(); } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.Collapse) + // optional .com.alicloud.openservices.tablestore.core.protocol.AggType agg_type = 2; + private com.alicloud.openservices.tablestore.core.protocol.Search.AggType aggType_ = com.alicloud.openservices.tablestore.core.protocol.Search.AggType.AVG_AGG; + public boolean hasAggType() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggType getAggType() { + return aggType_; + } + public Builder setAggType(com.alicloud.openservices.tablestore.core.protocol.Search.AggType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + aggType_ = value; + onChanged(); + return this; + } + public Builder clearAggType() { + bitField0_ = (bitField0_ & ~0x00000002); + aggType_ = com.alicloud.openservices.tablestore.core.protocol.Search.AggType.AVG_AGG; + onChanged(); + return this; + } + + // optional bytes agg_body = 3; + private com.google.protobuf.ByteString aggBody_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasAggBody() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.google.protobuf.ByteString getAggBody() { + return aggBody_; + } + public Builder setAggBody(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + aggBody_ = value; + onChanged(); + return this; + } + public Builder clearAggBody() { + bitField0_ = (bitField0_ & ~0x00000004); + aggBody_ = getDefaultInstance().getAggBody(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.AggClause) } static { - defaultInstance = new Collapse(true); + defaultInstance = new AggClause(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.Collapse) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.AggClause) } - public interface NestedFilterOrBuilder + public interface AggOrBuilder extends com.google.protobuf.MessageOrBuilder { - // optional string path = 1; - boolean hasPath(); - String getPath(); - - // optional .com.alicloud.openservices.tablestore.core.protocol.Query filter = 2; - boolean hasFilter(); - com.alicloud.openservices.tablestore.core.protocol.Search.Query getFilter(); - com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getFilterOrBuilder(); + // repeated .com.alicloud.openservices.tablestore.core.protocol.AggClause agg_clause = 1; + java.util.List + getAggClauseList(); + com.alicloud.openservices.tablestore.core.protocol.Search.AggClause getAggClause(int index); + int getAggClauseCount(); + java.util.List + getAggClauseOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.Search.AggClauseOrBuilder getAggClauseOrBuilder( + int index); } - public static final class NestedFilter extends + public static final class Agg extends com.google.protobuf.GeneratedMessage - implements NestedFilterOrBuilder { - // Use NestedFilter.newBuilder() to construct. - private NestedFilter(Builder builder) { + implements AggOrBuilder { + // Use Agg.newBuilder() to construct. + private Agg(Builder builder) { super(builder); } - private NestedFilter(boolean noInit) {} + private Agg(boolean noInit) {} - private static final NestedFilter defaultInstance; - public static NestedFilter getDefaultInstance() { + private static final Agg defaultInstance; + public static Agg getDefaultInstance() { return defaultInstance; } - public NestedFilter getDefaultInstanceForType() { + public Agg getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_NestedFilter_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Agg_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_NestedFilter_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Agg_fieldAccessorTable; } - private int bitField0_; - // optional string path = 1; - public static final int PATH_FIELD_NUMBER = 1; - private java.lang.Object path_; - public boolean hasPath() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getPath() { - java.lang.Object ref = path_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - path_ = s; - } - return s; - } + // repeated .com.alicloud.openservices.tablestore.core.protocol.AggClause agg_clause = 1; + public static final int AGG_CLAUSE_FIELD_NUMBER = 1; + private java.util.List aggClause_; + public java.util.List getAggClauseList() { + return aggClause_; } - private com.google.protobuf.ByteString getPathBytes() { - java.lang.Object ref = path_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - path_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public java.util.List + getAggClauseOrBuilderList() { + return aggClause_; } - - // optional .com.alicloud.openservices.tablestore.core.protocol.Query filter = 2; - public static final int FILTER_FIELD_NUMBER = 2; - private com.alicloud.openservices.tablestore.core.protocol.Search.Query filter_; - public boolean hasFilter() { - return ((bitField0_ & 0x00000002) == 0x00000002); + public int getAggClauseCount() { + return aggClause_.size(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.Query getFilter() { - return filter_; + public com.alicloud.openservices.tablestore.core.protocol.Search.AggClause getAggClause(int index) { + return aggClause_.get(index); } - public com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getFilterOrBuilder() { - return filter_; + public com.alicloud.openservices.tablestore.core.protocol.Search.AggClauseOrBuilder getAggClauseOrBuilder( + int index) { + return aggClause_.get(index); } private void initFields() { - path_ = ""; - filter_ = com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance(); + aggClause_ = java.util.Collections.emptyList(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -10411,11 +9817,8 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getPathBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeMessage(2, filter_); + for (int i = 0; i < aggClause_.size(); i++) { + output.writeMessage(1, aggClause_.get(i)); } getUnknownFields().writeTo(output); } @@ -10426,13 +9829,9 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getPathBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { + for (int i = 0; i < aggClause_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, filter_); + .computeMessageSize(1, aggClause_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -10446,41 +9845,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.Agg parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.Agg parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.Search.Agg parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.Agg parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.Agg parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.Agg parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.Agg parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -10489,7 +9888,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedFi return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.Agg parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -10500,12 +9899,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedFi return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.Agg parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.Agg parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -10515,7 +9914,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedFi public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.Agg prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -10528,18 +9927,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilterOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.Search.AggOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_NestedFilter_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Agg_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_NestedFilter_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Agg_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.Agg.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -10550,7 +9949,7 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getFilterFieldBuilder(); + getAggClauseFieldBuilder(); } } private static Builder create() { @@ -10559,14 +9958,12 @@ private static Builder create() { public Builder clear() { super.clear(); - path_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - if (filterBuilder_ == null) { - filter_ = com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance(); + if (aggClauseBuilder_ == null) { + aggClause_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); } else { - filterBuilder_.clear(); + aggClauseBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -10576,24 +9973,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.Search.Agg.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.Search.Agg getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.Agg.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter build() { - com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.Search.Agg build() { + com.alicloud.openservices.tablestore.core.protocol.Search.Agg result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.Search.Agg buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.Search.Agg result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -10601,43 +9998,58 @@ private com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter b return result; } - public com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter result = new com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter(this); + public com.alicloud.openservices.tablestore.core.protocol.Search.Agg buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.Agg result = new com.alicloud.openservices.tablestore.core.protocol.Search.Agg(this); int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.path_ = path_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - if (filterBuilder_ == null) { - result.filter_ = filter_; + if (aggClauseBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + aggClause_ = java.util.Collections.unmodifiableList(aggClause_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.aggClause_ = aggClause_; } else { - result.filter_ = filterBuilder_.build(); + result.aggClause_ = aggClauseBuilder_.build(); } - result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.Agg) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.Agg)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.getDefaultInstance()) return this; - if (other.hasPath()) { - setPath(other.getPath()); - } - if (other.hasFilter()) { - mergeFilter(other.getFilter()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.Agg other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.Agg.getDefaultInstance()) return this; + if (aggClauseBuilder_ == null) { + if (!other.aggClause_.isEmpty()) { + if (aggClause_.isEmpty()) { + aggClause_ = other.aggClause_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAggClauseIsMutable(); + aggClause_.addAll(other.aggClause_); + } + onChanged(); + } + } else { + if (!other.aggClause_.isEmpty()) { + if (aggClauseBuilder_.isEmpty()) { + aggClauseBuilder_.dispose(); + aggClauseBuilder_ = null; + aggClause_ = other.aggClause_; + bitField0_ = (bitField0_ & ~0x00000001); + aggClauseBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getAggClauseFieldBuilder() : null; + } else { + aggClauseBuilder_.addAllMessages(other.aggClause_); + } + } } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -10671,17 +10083,9 @@ public Builder mergeFrom( break; } case 10: { - bitField0_ |= 0x00000001; - path_ = input.readBytes(); - break; - } - case 18: { - com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.Query.newBuilder(); - if (hasFilter()) { - subBuilder.mergeFrom(getFilter()); - } + com.alicloud.openservices.tablestore.core.protocol.Search.AggClause.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.AggClause.newBuilder(); input.readMessage(subBuilder, extensionRegistry); - setFilter(subBuilder.buildPartial()); + addAggClause(subBuilder.buildPartial()); break; } } @@ -10690,191 +10094,251 @@ public Builder mergeFrom( private int bitField0_; - // optional string path = 1; - private java.lang.Object path_ = ""; - public boolean hasPath() { - return ((bitField0_ & 0x00000001) == 0x00000001); + // repeated .com.alicloud.openservices.tablestore.core.protocol.AggClause agg_clause = 1; + private java.util.List aggClause_ = + java.util.Collections.emptyList(); + private void ensureAggClauseIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + aggClause_ = new java.util.ArrayList(aggClause_); + bitField0_ |= 0x00000001; + } } - public String getPath() { - java.lang.Object ref = path_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - path_ = s; - return s; + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.AggClause, com.alicloud.openservices.tablestore.core.protocol.Search.AggClause.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggClauseOrBuilder> aggClauseBuilder_; + + public java.util.List getAggClauseList() { + if (aggClauseBuilder_ == null) { + return java.util.Collections.unmodifiableList(aggClause_); } else { - return (String) ref; + return aggClauseBuilder_.getMessageList(); } } - public Builder setPath(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - path_ = value; - onChanged(); - return this; + public int getAggClauseCount() { + if (aggClauseBuilder_ == null) { + return aggClause_.size(); + } else { + return aggClauseBuilder_.getCount(); + } } - public Builder clearPath() { - bitField0_ = (bitField0_ & ~0x00000001); - path_ = getDefaultInstance().getPath(); - onChanged(); - return this; + public com.alicloud.openservices.tablestore.core.protocol.Search.AggClause getAggClause(int index) { + if (aggClauseBuilder_ == null) { + return aggClause_.get(index); + } else { + return aggClauseBuilder_.getMessage(index); + } } - void setPath(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; - path_ = value; - onChanged(); + public Builder setAggClause( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.AggClause value) { + if (aggClauseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAggClauseIsMutable(); + aggClause_.set(index, value); + onChanged(); + } else { + aggClauseBuilder_.setMessage(index, value); + } + return this; } - - // optional .com.alicloud.openservices.tablestore.core.protocol.Query filter = 2; - private com.alicloud.openservices.tablestore.core.protocol.Search.Query filter_ = com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder> filterBuilder_; - public boolean hasFilter() { - return ((bitField0_ & 0x00000002) == 0x00000002); + public Builder setAggClause( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.AggClause.Builder builderForValue) { + if (aggClauseBuilder_ == null) { + ensureAggClauseIsMutable(); + aggClause_.set(index, builderForValue.build()); + onChanged(); + } else { + aggClauseBuilder_.setMessage(index, builderForValue.build()); + } + return this; } - public com.alicloud.openservices.tablestore.core.protocol.Search.Query getFilter() { - if (filterBuilder_ == null) { - return filter_; + public Builder addAggClause(com.alicloud.openservices.tablestore.core.protocol.Search.AggClause value) { + if (aggClauseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAggClauseIsMutable(); + aggClause_.add(value); + onChanged(); } else { - return filterBuilder_.getMessage(); + aggClauseBuilder_.addMessage(value); } + return this; } - public Builder setFilter(com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { - if (filterBuilder_ == null) { + public Builder addAggClause( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.AggClause value) { + if (aggClauseBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - filter_ = value; + ensureAggClauseIsMutable(); + aggClause_.add(index, value); onChanged(); } else { - filterBuilder_.setMessage(value); + aggClauseBuilder_.addMessage(index, value); } - bitField0_ |= 0x00000002; return this; } - public Builder setFilter( - com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder builderForValue) { - if (filterBuilder_ == null) { - filter_ = builderForValue.build(); + public Builder addAggClause( + com.alicloud.openservices.tablestore.core.protocol.Search.AggClause.Builder builderForValue) { + if (aggClauseBuilder_ == null) { + ensureAggClauseIsMutable(); + aggClause_.add(builderForValue.build()); onChanged(); } else { - filterBuilder_.setMessage(builderForValue.build()); + aggClauseBuilder_.addMessage(builderForValue.build()); } - bitField0_ |= 0x00000002; return this; } - public Builder mergeFilter(com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { - if (filterBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002) && - filter_ != com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance()) { - filter_ = - com.alicloud.openservices.tablestore.core.protocol.Search.Query.newBuilder(filter_).mergeFrom(value).buildPartial(); - } else { - filter_ = value; - } + public Builder addAggClause( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.AggClause.Builder builderForValue) { + if (aggClauseBuilder_ == null) { + ensureAggClauseIsMutable(); + aggClause_.add(index, builderForValue.build()); onChanged(); } else { - filterBuilder_.mergeFrom(value); + aggClauseBuilder_.addMessage(index, builderForValue.build()); } - bitField0_ |= 0x00000002; return this; } - public Builder clearFilter() { - if (filterBuilder_ == null) { - filter_ = com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance(); + public Builder addAllAggClause( + java.lang.Iterable values) { + if (aggClauseBuilder_ == null) { + ensureAggClauseIsMutable(); + super.addAll(values, aggClause_); onChanged(); } else { - filterBuilder_.clear(); + aggClauseBuilder_.addAllMessages(values); } - bitField0_ = (bitField0_ & ~0x00000002); return this; } - public com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder getFilterBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getFilterFieldBuilder().getBuilder(); + public Builder clearAggClause() { + if (aggClauseBuilder_ == null) { + aggClause_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + aggClauseBuilder_.clear(); + } + return this; } - public com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getFilterOrBuilder() { - if (filterBuilder_ != null) { - return filterBuilder_.getMessageOrBuilder(); + public Builder removeAggClause(int index) { + if (aggClauseBuilder_ == null) { + ensureAggClauseIsMutable(); + aggClause_.remove(index); + onChanged(); } else { - return filter_; + aggClauseBuilder_.remove(index); } + return this; } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder> - getFilterFieldBuilder() { - if (filterBuilder_ == null) { - filterBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder>( - filter_, + public com.alicloud.openservices.tablestore.core.protocol.Search.AggClause.Builder getAggClauseBuilder( + int index) { + return getAggClauseFieldBuilder().getBuilder(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggClauseOrBuilder getAggClauseOrBuilder( + int index) { + if (aggClauseBuilder_ == null) { + return aggClause_.get(index); } else { + return aggClauseBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getAggClauseOrBuilderList() { + if (aggClauseBuilder_ != null) { + return aggClauseBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(aggClause_); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggClause.Builder addAggClauseBuilder() { + return getAggClauseFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.Search.AggClause.getDefaultInstance()); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggClause.Builder addAggClauseBuilder( + int index) { + return getAggClauseFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.Search.AggClause.getDefaultInstance()); + } + public java.util.List + getAggClauseBuilderList() { + return getAggClauseFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.AggClause, com.alicloud.openservices.tablestore.core.protocol.Search.AggClause.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggClauseOrBuilder> + getAggClauseFieldBuilder() { + if (aggClauseBuilder_ == null) { + aggClauseBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.AggClause, com.alicloud.openservices.tablestore.core.protocol.Search.AggClause.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggClauseOrBuilder>( + aggClause_, + ((bitField0_ & 0x00000001) == 0x00000001), getParentForChildren(), isClean()); - filter_ = null; + aggClause_ = null; } - return filterBuilder_; + return aggClauseBuilder_; } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.NestedFilter) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.Agg) } static { - defaultInstance = new NestedFilter(true); + defaultInstance = new Agg(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.NestedFilter) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.Agg) } - public interface ScoreSortOrBuilder + public interface AvgAggResultOrBuilder extends com.google.protobuf.MessageOrBuilder { - // optional .com.alicloud.openservices.tablestore.core.protocol.SortOrder order = 1; - boolean hasOrder(); - com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder getOrder(); + // optional double value = 1; + boolean hasValue(); + double getValue(); } - public static final class ScoreSort extends + public static final class AvgAggResult extends com.google.protobuf.GeneratedMessage - implements ScoreSortOrBuilder { - // Use ScoreSort.newBuilder() to construct. - private ScoreSort(Builder builder) { + implements AvgAggResultOrBuilder { + // Use AvgAggResult.newBuilder() to construct. + private AvgAggResult(Builder builder) { super(builder); } - private ScoreSort(boolean noInit) {} + private AvgAggResult(boolean noInit) {} - private static final ScoreSort defaultInstance; - public static ScoreSort getDefaultInstance() { + private static final AvgAggResult defaultInstance; + public static AvgAggResult getDefaultInstance() { return defaultInstance; } - public ScoreSort getDefaultInstanceForType() { + public AvgAggResult getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ScoreSort_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_AvgAggResult_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ScoreSort_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_AvgAggResult_fieldAccessorTable; } private int bitField0_; - // optional .com.alicloud.openservices.tablestore.core.protocol.SortOrder order = 1; - public static final int ORDER_FIELD_NUMBER = 1; - private com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder order_; - public boolean hasOrder() { + // optional double value = 1; + public static final int VALUE_FIELD_NUMBER = 1; + private double value_; + public boolean hasValue() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder getOrder() { - return order_; + public double getValue() { + return value_; } private void initFields() { - order_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.SORT_ORDER_ASC; + value_ = 0D; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -10889,7 +10353,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeEnum(1, order_.getNumber()); + output.writeDouble(1, value_); } getUnknownFields().writeTo(output); } @@ -10902,7 +10366,7 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, order_.getNumber()); + .computeDoubleSize(1, value_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -10916,41 +10380,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggResult parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggResult parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggResult parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggResult parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggResult parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggResult parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggResult parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -10959,7 +10423,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSor return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggResult parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -10970,12 +10434,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSor return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggResult parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggResult parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -10985,7 +10449,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSor public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggResult prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -10998,18 +10462,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSortOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggResultOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ScoreSort_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_AvgAggResult_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ScoreSort_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_AvgAggResult_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggResult.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -11028,7 +10492,7 @@ private static Builder create() { public Builder clear() { super.clear(); - order_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.SORT_ORDER_ASC; + value_ = 0D; bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -11039,24 +10503,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggResult.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggResult getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggResult.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort build() { - com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggResult build() { + com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggResult result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggResult buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggResult result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -11064,32 +10528,32 @@ private com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort buil return result; } - public com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort result = new com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort(this); + public com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggResult buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggResult result = new com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggResult(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.order_ = order_; + result.value_ = value_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggResult) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggResult)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort.getDefaultInstance()) return this; - if (other.hasOrder()) { - setOrder(other.getOrder()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggResult other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggResult.getDefaultInstance()) return this; + if (other.hasValue()) { + setValue(other.getValue()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -11122,15 +10586,9 @@ public Builder mergeFrom( } break; } - case 8: { - int rawValue = input.readEnum(); - com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder value = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(1, rawValue); - } else { - bitField0_ |= 0x00000001; - order_ = value; - } + case 9: { + bitField0_ |= 0x00000001; + value_ = input.readDouble(); break; } } @@ -11139,89 +10597,86 @@ public Builder mergeFrom( private int bitField0_; - // optional .com.alicloud.openservices.tablestore.core.protocol.SortOrder order = 1; - private com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder order_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.SORT_ORDER_ASC; - public boolean hasOrder() { + // optional double value = 1; + private double value_ ; + public boolean hasValue() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder getOrder() { - return order_; + public double getValue() { + return value_; } - public Builder setOrder(com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder value) { - if (value == null) { - throw new NullPointerException(); - } + public Builder setValue(double value) { bitField0_ |= 0x00000001; - order_ = value; + value_ = value; onChanged(); return this; } - public Builder clearOrder() { + public Builder clearValue() { bitField0_ = (bitField0_ & ~0x00000001); - order_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.SORT_ORDER_ASC; + value_ = 0D; onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.ScoreSort) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.AvgAggResult) } static { - defaultInstance = new ScoreSort(true); + defaultInstance = new AvgAggResult(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.ScoreSort) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.AvgAggResult) } - public interface PrimaryKeySortOrBuilder + public interface MaxAggResultOrBuilder extends com.google.protobuf.MessageOrBuilder { - // optional .com.alicloud.openservices.tablestore.core.protocol.SortOrder order = 1; - boolean hasOrder(); - com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder getOrder(); + // optional double value = 1; + boolean hasValue(); + double getValue(); } - public static final class PrimaryKeySort extends + public static final class MaxAggResult extends com.google.protobuf.GeneratedMessage - implements PrimaryKeySortOrBuilder { - // Use PrimaryKeySort.newBuilder() to construct. - private PrimaryKeySort(Builder builder) { + implements MaxAggResultOrBuilder { + // Use MaxAggResult.newBuilder() to construct. + private MaxAggResult(Builder builder) { super(builder); } - private PrimaryKeySort(boolean noInit) {} + private MaxAggResult(boolean noInit) {} - private static final PrimaryKeySort defaultInstance; - public static PrimaryKeySort getDefaultInstance() { + private static final MaxAggResult defaultInstance; + public static MaxAggResult getDefaultInstance() { return defaultInstance; } - public PrimaryKeySort getDefaultInstanceForType() { + public MaxAggResult getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_PrimaryKeySort_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MaxAggResult_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_PrimaryKeySort_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MaxAggResult_fieldAccessorTable; } private int bitField0_; - // optional .com.alicloud.openservices.tablestore.core.protocol.SortOrder order = 1; - public static final int ORDER_FIELD_NUMBER = 1; - private com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder order_; - public boolean hasOrder() { + // optional double value = 1; + public static final int VALUE_FIELD_NUMBER = 1; + private double value_; + public boolean hasValue() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder getOrder() { - return order_; + public double getValue() { + return value_; } private void initFields() { - order_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.SORT_ORDER_ASC; + value_ = 0D; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -11236,7 +10691,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeEnum(1, order_.getNumber()); + output.writeDouble(1, value_); } getUnknownFields().writeTo(output); } @@ -11249,7 +10704,7 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, order_.getNumber()); + .computeDoubleSize(1, value_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -11263,41 +10718,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggResult parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggResult parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggResult parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggResult parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggResult parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggResult parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggResult parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -11306,7 +10761,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryK return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggResult parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -11317,12 +10772,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryK return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggResult parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggResult parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -11332,7 +10787,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryK public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggResult prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -11345,18 +10800,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySortOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggResultOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_PrimaryKeySort_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MaxAggResult_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_PrimaryKeySort_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MaxAggResult_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggResult.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -11375,7 +10830,7 @@ private static Builder create() { public Builder clear() { super.clear(); - order_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.SORT_ORDER_ASC; + value_ = 0D; bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -11386,24 +10841,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggResult.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggResult getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggResult.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort build() { - com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggResult build() { + com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggResult result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggResult buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggResult result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -11411,32 +10866,32 @@ private com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort return result; } - public com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort result = new com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort(this); + public com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggResult buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggResult result = new com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggResult(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.order_ = order_; + result.value_ = value_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggResult) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggResult)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort.getDefaultInstance()) return this; - if (other.hasOrder()) { - setOrder(other.getOrder()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggResult other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggResult.getDefaultInstance()) return this; + if (other.hasValue()) { + setValue(other.getValue()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -11469,15 +10924,9 @@ public Builder mergeFrom( } break; } - case 8: { - int rawValue = input.readEnum(); - com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder value = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(1, rawValue); - } else { - bitField0_ |= 0x00000001; - order_ = value; - } + case 9: { + bitField0_ |= 0x00000001; + value_ = input.readDouble(); break; } } @@ -11486,160 +10935,86 @@ public Builder mergeFrom( private int bitField0_; - // optional .com.alicloud.openservices.tablestore.core.protocol.SortOrder order = 1; - private com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder order_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.SORT_ORDER_ASC; - public boolean hasOrder() { + // optional double value = 1; + private double value_ ; + public boolean hasValue() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder getOrder() { - return order_; + public double getValue() { + return value_; } - public Builder setOrder(com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder value) { - if (value == null) { - throw new NullPointerException(); - } + public Builder setValue(double value) { bitField0_ |= 0x00000001; - order_ = value; + value_ = value; onChanged(); return this; } - public Builder clearOrder() { + public Builder clearValue() { bitField0_ = (bitField0_ & ~0x00000001); - order_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.SORT_ORDER_ASC; + value_ = 0D; onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.PrimaryKeySort) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.MaxAggResult) } static { - defaultInstance = new PrimaryKeySort(true); + defaultInstance = new MaxAggResult(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.PrimaryKeySort) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.MaxAggResult) } - public interface FieldSortOrBuilder + public interface MinAggResultOrBuilder extends com.google.protobuf.MessageOrBuilder { - // optional string field_name = 1; - boolean hasFieldName(); - String getFieldName(); - - // optional .com.alicloud.openservices.tablestore.core.protocol.SortOrder order = 2; - boolean hasOrder(); - com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder getOrder(); - - // optional .com.alicloud.openservices.tablestore.core.protocol.SortMode mode = 3; - boolean hasMode(); - com.alicloud.openservices.tablestore.core.protocol.Search.SortMode getMode(); - - // optional .com.alicloud.openservices.tablestore.core.protocol.NestedFilter nested_filter = 4; - boolean hasNestedFilter(); - com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter getNestedFilter(); - com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilterOrBuilder getNestedFilterOrBuilder(); + // optional double value = 1; + boolean hasValue(); + double getValue(); } - public static final class FieldSort extends + public static final class MinAggResult extends com.google.protobuf.GeneratedMessage - implements FieldSortOrBuilder { - // Use FieldSort.newBuilder() to construct. - private FieldSort(Builder builder) { + implements MinAggResultOrBuilder { + // Use MinAggResult.newBuilder() to construct. + private MinAggResult(Builder builder) { super(builder); } - private FieldSort(boolean noInit) {} + private MinAggResult(boolean noInit) {} - private static final FieldSort defaultInstance; - public static FieldSort getDefaultInstance() { + private static final MinAggResult defaultInstance; + public static MinAggResult getDefaultInstance() { return defaultInstance; } - public FieldSort getDefaultInstanceForType() { + public MinAggResult getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_FieldSort_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MinAggResult_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_FieldSort_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MinAggResult_fieldAccessorTable; } private int bitField0_; - // optional string field_name = 1; - public static final int FIELD_NAME_FIELD_NUMBER = 1; - private java.lang.Object fieldName_; - public boolean hasFieldName() { + // optional double value = 1; + public static final int VALUE_FIELD_NUMBER = 1; + private double value_; + public boolean hasValue() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getFieldName() { - java.lang.Object ref = fieldName_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - fieldName_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getFieldNameBytes() { - java.lang.Object ref = fieldName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - fieldName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.SortOrder order = 2; - public static final int ORDER_FIELD_NUMBER = 2; - private com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder order_; - public boolean hasOrder() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder getOrder() { - return order_; - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.SortMode mode = 3; - public static final int MODE_FIELD_NUMBER = 3; - private com.alicloud.openservices.tablestore.core.protocol.Search.SortMode mode_; - public boolean hasMode() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.SortMode getMode() { - return mode_; - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.NestedFilter nested_filter = 4; - public static final int NESTED_FILTER_FIELD_NUMBER = 4; - private com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter nestedFilter_; - public boolean hasNestedFilter() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter getNestedFilter() { - return nestedFilter_; - } - public com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilterOrBuilder getNestedFilterOrBuilder() { - return nestedFilter_; + public double getValue() { + return value_; } private void initFields() { - fieldName_ = ""; - order_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.SORT_ORDER_ASC; - mode_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortMode.SORT_MODE_MIN; - nestedFilter_ = com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.getDefaultInstance(); + value_ = 0D; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -11654,16 +11029,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getFieldNameBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeEnum(2, order_.getNumber()); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeEnum(3, mode_.getNumber()); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeMessage(4, nestedFilter_); + output.writeDouble(1, value_); } getUnknownFields().writeTo(output); } @@ -11676,19 +11042,7 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getFieldNameBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, order_.getNumber()); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(3, mode_.getNumber()); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, nestedFilter_); + .computeDoubleSize(1, value_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -11702,41 +11056,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.MinAggResult parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.MinAggResult parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.Search.MinAggResult parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.MinAggResult parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.MinAggResult parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.MinAggResult parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.MinAggResult parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -11745,7 +11099,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldSor return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.MinAggResult parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -11756,12 +11110,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldSor return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.MinAggResult parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.MinAggResult parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -11771,7 +11125,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldSor public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.MinAggResult prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -11784,18 +11138,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.Search.FieldSortOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.Search.MinAggResultOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_FieldSort_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MinAggResult_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_FieldSort_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MinAggResult_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.MinAggResult.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -11806,7 +11160,6 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getNestedFilterFieldBuilder(); } } private static Builder create() { @@ -11815,18 +11168,8 @@ private static Builder create() { public Builder clear() { super.clear(); - fieldName_ = ""; + value_ = 0D; bitField0_ = (bitField0_ & ~0x00000001); - order_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.SORT_ORDER_ASC; - bitField0_ = (bitField0_ & ~0x00000002); - mode_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortMode.SORT_MODE_MIN; - bitField0_ = (bitField0_ & ~0x00000004); - if (nestedFilterBuilder_ == null) { - nestedFilter_ = com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.getDefaultInstance(); - } else { - nestedFilterBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -11836,24 +11179,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.Search.MinAggResult.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.Search.MinAggResult getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.MinAggResult.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort build() { - com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.Search.MinAggResult build() { + com.alicloud.openservices.tablestore.core.protocol.Search.MinAggResult result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.Search.MinAggResult buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.Search.MinAggResult result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -11861,57 +11204,32 @@ private com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort buil return result; } - public com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort result = new com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort(this); + public com.alicloud.openservices.tablestore.core.protocol.Search.MinAggResult buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.MinAggResult result = new com.alicloud.openservices.tablestore.core.protocol.Search.MinAggResult(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.fieldName_ = fieldName_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.order_ = order_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.mode_ = mode_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - if (nestedFilterBuilder_ == null) { - result.nestedFilter_ = nestedFilter_; - } else { - result.nestedFilter_ = nestedFilterBuilder_.build(); - } + result.value_ = value_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.MinAggResult) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.MinAggResult)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort.getDefaultInstance()) return this; - if (other.hasFieldName()) { - setFieldName(other.getFieldName()); - } - if (other.hasOrder()) { - setOrder(other.getOrder()); - } - if (other.hasMode()) { - setMode(other.getMode()); - } - if (other.hasNestedFilter()) { - mergeNestedFilter(other.getNestedFilter()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.MinAggResult other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.MinAggResult.getDefaultInstance()) return this; + if (other.hasValue()) { + setValue(other.getValue()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -11944,40 +11262,9 @@ public Builder mergeFrom( } break; } - case 10: { + case 9: { bitField0_ |= 0x00000001; - fieldName_ = input.readBytes(); - break; - } - case 16: { - int rawValue = input.readEnum(); - com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder value = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(2, rawValue); - } else { - bitField0_ |= 0x00000002; - order_ = value; - } - break; - } - case 24: { - int rawValue = input.readEnum(); - com.alicloud.openservices.tablestore.core.protocol.Search.SortMode value = com.alicloud.openservices.tablestore.core.protocol.Search.SortMode.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(3, rawValue); - } else { - bitField0_ |= 0x00000004; - mode_ = value; - } - break; - } - case 34: { - com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.newBuilder(); - if (hasNestedFilter()) { - subBuilder.mergeFrom(getNestedFilter()); - } - input.readMessage(subBuilder, extensionRegistry); - setNestedFilter(subBuilder.buildPartial()); + value_ = input.readDouble(); break; } } @@ -11986,345 +11273,86 @@ public Builder mergeFrom( private int bitField0_; - // optional string field_name = 1; - private java.lang.Object fieldName_ = ""; - public boolean hasFieldName() { + // optional double value = 1; + private double value_ ; + public boolean hasValue() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getFieldName() { - java.lang.Object ref = fieldName_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - fieldName_ = s; - return s; - } else { - return (String) ref; - } - } - public Builder setFieldName(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - fieldName_ = value; - onChanged(); - return this; - } - public Builder clearFieldName() { - bitField0_ = (bitField0_ & ~0x00000001); - fieldName_ = getDefaultInstance().getFieldName(); - onChanged(); - return this; + public double getValue() { + return value_; } - void setFieldName(com.google.protobuf.ByteString value) { + public Builder setValue(double value) { bitField0_ |= 0x00000001; - fieldName_ = value; - onChanged(); - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.SortOrder order = 2; - private com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder order_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.SORT_ORDER_ASC; - public boolean hasOrder() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder getOrder() { - return order_; - } - public Builder setOrder(com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - order_ = value; - onChanged(); - return this; - } - public Builder clearOrder() { - bitField0_ = (bitField0_ & ~0x00000002); - order_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.SORT_ORDER_ASC; - onChanged(); - return this; - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.SortMode mode = 3; - private com.alicloud.openservices.tablestore.core.protocol.Search.SortMode mode_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortMode.SORT_MODE_MIN; - public boolean hasMode() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.SortMode getMode() { - return mode_; - } - public Builder setMode(com.alicloud.openservices.tablestore.core.protocol.Search.SortMode value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - mode_ = value; + value_ = value; onChanged(); return this; } - public Builder clearMode() { - bitField0_ = (bitField0_ & ~0x00000004); - mode_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortMode.SORT_MODE_MIN; + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000001); + value_ = 0D; onChanged(); return this; } - // optional .com.alicloud.openservices.tablestore.core.protocol.NestedFilter nested_filter = 4; - private com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter nestedFilter_ = com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter, com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilterOrBuilder> nestedFilterBuilder_; - public boolean hasNestedFilter() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter getNestedFilter() { - if (nestedFilterBuilder_ == null) { - return nestedFilter_; - } else { - return nestedFilterBuilder_.getMessage(); - } - } - public Builder setNestedFilter(com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter value) { - if (nestedFilterBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - nestedFilter_ = value; - onChanged(); - } else { - nestedFilterBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - return this; - } - public Builder setNestedFilter( - com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.Builder builderForValue) { - if (nestedFilterBuilder_ == null) { - nestedFilter_ = builderForValue.build(); - onChanged(); - } else { - nestedFilterBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - return this; - } - public Builder mergeNestedFilter(com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter value) { - if (nestedFilterBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008) && - nestedFilter_ != com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.getDefaultInstance()) { - nestedFilter_ = - com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.newBuilder(nestedFilter_).mergeFrom(value).buildPartial(); - } else { - nestedFilter_ = value; - } - onChanged(); - } else { - nestedFilterBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000008; - return this; - } - public Builder clearNestedFilter() { - if (nestedFilterBuilder_ == null) { - nestedFilter_ = com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.getDefaultInstance(); - onChanged(); - } else { - nestedFilterBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - return this; - } - public com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.Builder getNestedFilterBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getNestedFilterFieldBuilder().getBuilder(); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilterOrBuilder getNestedFilterOrBuilder() { - if (nestedFilterBuilder_ != null) { - return nestedFilterBuilder_.getMessageOrBuilder(); - } else { - return nestedFilter_; - } - } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter, com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilterOrBuilder> - getNestedFilterFieldBuilder() { - if (nestedFilterBuilder_ == null) { - nestedFilterBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter, com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilterOrBuilder>( - nestedFilter_, - getParentForChildren(), - isClean()); - nestedFilter_ = null; - } - return nestedFilterBuilder_; - } - - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.FieldSort) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.MinAggResult) } static { - defaultInstance = new FieldSort(true); + defaultInstance = new MinAggResult(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.FieldSort) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.MinAggResult) } - public interface GeoDistanceSortOrBuilder + public interface SumAggResultOrBuilder extends com.google.protobuf.MessageOrBuilder { - // optional string field_name = 1; - boolean hasFieldName(); - String getFieldName(); - - // repeated string points = 2; - java.util.List getPointsList(); - int getPointsCount(); - String getPoints(int index); - - // optional .com.alicloud.openservices.tablestore.core.protocol.SortOrder order = 3; - boolean hasOrder(); - com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder getOrder(); - - // optional .com.alicloud.openservices.tablestore.core.protocol.SortMode mode = 4; - boolean hasMode(); - com.alicloud.openservices.tablestore.core.protocol.Search.SortMode getMode(); - - // optional .com.alicloud.openservices.tablestore.core.protocol.GeoDistanceType distance_type = 5; - boolean hasDistanceType(); - com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceType getDistanceType(); - - // optional .com.alicloud.openservices.tablestore.core.protocol.NestedFilter nested_filter = 6; - boolean hasNestedFilter(); - com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter getNestedFilter(); - com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilterOrBuilder getNestedFilterOrBuilder(); + // optional double value = 1; + boolean hasValue(); + double getValue(); } - public static final class GeoDistanceSort extends + public static final class SumAggResult extends com.google.protobuf.GeneratedMessage - implements GeoDistanceSortOrBuilder { - // Use GeoDistanceSort.newBuilder() to construct. - private GeoDistanceSort(Builder builder) { + implements SumAggResultOrBuilder { + // Use SumAggResult.newBuilder() to construct. + private SumAggResult(Builder builder) { super(builder); } - private GeoDistanceSort(boolean noInit) {} + private SumAggResult(boolean noInit) {} - private static final GeoDistanceSort defaultInstance; - public static GeoDistanceSort getDefaultInstance() { + private static final SumAggResult defaultInstance; + public static SumAggResult getDefaultInstance() { return defaultInstance; } - public GeoDistanceSort getDefaultInstanceForType() { + public SumAggResult getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoDistanceSort_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SumAggResult_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoDistanceSort_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SumAggResult_fieldAccessorTable; } private int bitField0_; - // optional string field_name = 1; - public static final int FIELD_NAME_FIELD_NUMBER = 1; - private java.lang.Object fieldName_; - public boolean hasFieldName() { + // optional double value = 1; + public static final int VALUE_FIELD_NUMBER = 1; + private double value_; + public boolean hasValue() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getFieldName() { - java.lang.Object ref = fieldName_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - fieldName_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getFieldNameBytes() { - java.lang.Object ref = fieldName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - fieldName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // repeated string points = 2; - public static final int POINTS_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList points_; - public java.util.List - getPointsList() { - return points_; - } - public int getPointsCount() { - return points_.size(); - } - public String getPoints(int index) { - return points_.get(index); - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.SortOrder order = 3; - public static final int ORDER_FIELD_NUMBER = 3; - private com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder order_; - public boolean hasOrder() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder getOrder() { - return order_; - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.SortMode mode = 4; - public static final int MODE_FIELD_NUMBER = 4; - private com.alicloud.openservices.tablestore.core.protocol.Search.SortMode mode_; - public boolean hasMode() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.SortMode getMode() { - return mode_; - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.GeoDistanceType distance_type = 5; - public static final int DISTANCE_TYPE_FIELD_NUMBER = 5; - private com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceType distanceType_; - public boolean hasDistanceType() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceType getDistanceType() { - return distanceType_; - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.NestedFilter nested_filter = 6; - public static final int NESTED_FILTER_FIELD_NUMBER = 6; - private com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter nestedFilter_; - public boolean hasNestedFilter() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter getNestedFilter() { - return nestedFilter_; - } - public com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilterOrBuilder getNestedFilterOrBuilder() { - return nestedFilter_; + public double getValue() { + return value_; } private void initFields() { - fieldName_ = ""; - points_ = com.google.protobuf.LazyStringArrayList.EMPTY; - order_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.SORT_ORDER_ASC; - mode_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortMode.SORT_MODE_MIN; - distanceType_ = com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceType.GEO_DISTANCE_ARC; - nestedFilter_ = com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.getDefaultInstance(); + value_ = 0D; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -12339,22 +11367,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getFieldNameBytes()); - } - for (int i = 0; i < points_.size(); i++) { - output.writeBytes(2, points_.getByteString(i)); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeEnum(3, order_.getNumber()); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeEnum(4, mode_.getNumber()); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeEnum(5, distanceType_.getNumber()); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeMessage(6, nestedFilter_); + output.writeDouble(1, value_); } getUnknownFields().writeTo(output); } @@ -12367,32 +11380,7 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getFieldNameBytes()); - } - { - int dataSize = 0; - for (int i = 0; i < points_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeBytesSizeNoTag(points_.getByteString(i)); - } - size += dataSize; - size += 1 * getPointsList().size(); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(3, order_.getNumber()); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, mode_.getNumber()); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(5, distanceType_.getNumber()); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, nestedFilter_); + .computeDoubleSize(1, value_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -12406,41 +11394,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.SumAggResult parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.SumAggResult parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.Search.SumAggResult parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.SumAggResult parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.SumAggResult parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.SumAggResult parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.SumAggResult parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -12449,7 +11437,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDista return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.SumAggResult parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -12460,12 +11448,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDista return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.SumAggResult parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.SumAggResult parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -12475,7 +11463,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDista public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.SumAggResult prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -12488,18 +11476,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSortOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.Search.SumAggResultOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoDistanceSort_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SumAggResult_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoDistanceSort_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SumAggResult_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.SumAggResult.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -12510,7 +11498,6 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getNestedFilterFieldBuilder(); } } private static Builder create() { @@ -12519,22 +11506,8 @@ private static Builder create() { public Builder clear() { super.clear(); - fieldName_ = ""; + value_ = 0D; bitField0_ = (bitField0_ & ~0x00000001); - points_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - order_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.SORT_ORDER_ASC; - bitField0_ = (bitField0_ & ~0x00000004); - mode_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortMode.SORT_MODE_MIN; - bitField0_ = (bitField0_ & ~0x00000008); - distanceType_ = com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceType.GEO_DISTANCE_ARC; - bitField0_ = (bitField0_ & ~0x00000010); - if (nestedFilterBuilder_ == null) { - nestedFilter_ = com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.getDefaultInstance(); - } else { - nestedFilterBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000020); return this; } @@ -12544,24 +11517,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.Search.SumAggResult.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.Search.SumAggResult getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.SumAggResult.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort build() { - com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.Search.SumAggResult build() { + com.alicloud.openservices.tablestore.core.protocol.Search.SumAggResult result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.Search.SumAggResult buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.Search.SumAggResult result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -12569,80 +11542,32 @@ private com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSor return result; } - public com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort result = new com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort(this); + public com.alicloud.openservices.tablestore.core.protocol.Search.SumAggResult buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.SumAggResult result = new com.alicloud.openservices.tablestore.core.protocol.Search.SumAggResult(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.fieldName_ = fieldName_; - if (((bitField0_ & 0x00000002) == 0x00000002)) { - points_ = new com.google.protobuf.UnmodifiableLazyStringList( - points_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.points_ = points_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000002; - } - result.order_ = order_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000004; - } - result.mode_ = mode_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000008; - } - result.distanceType_ = distanceType_; - if (((from_bitField0_ & 0x00000020) == 0x00000020)) { - to_bitField0_ |= 0x00000010; - } - if (nestedFilterBuilder_ == null) { - result.nestedFilter_ = nestedFilter_; - } else { - result.nestedFilter_ = nestedFilterBuilder_.build(); - } + result.value_ = value_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.SumAggResult) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.SumAggResult)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort.getDefaultInstance()) return this; - if (other.hasFieldName()) { - setFieldName(other.getFieldName()); - } - if (!other.points_.isEmpty()) { - if (points_.isEmpty()) { - points_ = other.points_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensurePointsIsMutable(); - points_.addAll(other.points_); - } - onChanged(); - } - if (other.hasOrder()) { - setOrder(other.getOrder()); - } - if (other.hasMode()) { - setMode(other.getMode()); - } - if (other.hasDistanceType()) { - setDistanceType(other.getDistanceType()); - } - if (other.hasNestedFilter()) { - mergeNestedFilter(other.getNestedFilter()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.SumAggResult other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.SumAggResult.getDefaultInstance()) return this; + if (other.hasValue()) { + setValue(other.getValue()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -12675,56 +11600,9 @@ public Builder mergeFrom( } break; } - case 10: { + case 9: { bitField0_ |= 0x00000001; - fieldName_ = input.readBytes(); - break; - } - case 18: { - ensurePointsIsMutable(); - points_.add(input.readBytes()); - break; - } - case 24: { - int rawValue = input.readEnum(); - com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder value = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(3, rawValue); - } else { - bitField0_ |= 0x00000004; - order_ = value; - } - break; - } - case 32: { - int rawValue = input.readEnum(); - com.alicloud.openservices.tablestore.core.protocol.Search.SortMode value = com.alicloud.openservices.tablestore.core.protocol.Search.SortMode.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(4, rawValue); - } else { - bitField0_ |= 0x00000008; - mode_ = value; - } - break; - } - case 40: { - int rawValue = input.readEnum(); - com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceType value = com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceType.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(5, rawValue); - } else { - bitField0_ |= 0x00000010; - distanceType_ = value; - } - break; - } - case 50: { - com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.newBuilder(); - if (hasNestedFilter()) { - subBuilder.mergeFrom(getNestedFilter()); - } - input.readMessage(subBuilder, extensionRegistry); - setNestedFilter(subBuilder.buildPartial()); + value_ = input.readDouble(); break; } } @@ -12733,380 +11611,86 @@ public Builder mergeFrom( private int bitField0_; - // optional string field_name = 1; - private java.lang.Object fieldName_ = ""; - public boolean hasFieldName() { + // optional double value = 1; + private double value_ ; + public boolean hasValue() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getFieldName() { - java.lang.Object ref = fieldName_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - fieldName_ = s; - return s; - } else { - return (String) ref; - } - } - public Builder setFieldName(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - fieldName_ = value; - onChanged(); - return this; - } - public Builder clearFieldName() { - bitField0_ = (bitField0_ & ~0x00000001); - fieldName_ = getDefaultInstance().getFieldName(); - onChanged(); - return this; + public double getValue() { + return value_; } - void setFieldName(com.google.protobuf.ByteString value) { + public Builder setValue(double value) { bitField0_ |= 0x00000001; - fieldName_ = value; - onChanged(); - } - - // repeated string points = 2; - private com.google.protobuf.LazyStringList points_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensurePointsIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - points_ = new com.google.protobuf.LazyStringArrayList(points_); - bitField0_ |= 0x00000002; - } - } - public java.util.List - getPointsList() { - return java.util.Collections.unmodifiableList(points_); - } - public int getPointsCount() { - return points_.size(); - } - public String getPoints(int index) { - return points_.get(index); - } - public Builder setPoints( - int index, String value) { - if (value == null) { - throw new NullPointerException(); - } - ensurePointsIsMutable(); - points_.set(index, value); - onChanged(); - return this; - } - public Builder addPoints(String value) { - if (value == null) { - throw new NullPointerException(); - } - ensurePointsIsMutable(); - points_.add(value); - onChanged(); - return this; - } - public Builder addAllPoints( - java.lang.Iterable values) { - ensurePointsIsMutable(); - super.addAll(values, points_); - onChanged(); - return this; - } - public Builder clearPoints() { - points_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - void addPoints(com.google.protobuf.ByteString value) { - ensurePointsIsMutable(); - points_.add(value); - onChanged(); - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.SortOrder order = 3; - private com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder order_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.SORT_ORDER_ASC; - public boolean hasOrder() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder getOrder() { - return order_; - } - public Builder setOrder(com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - order_ = value; - onChanged(); - return this; - } - public Builder clearOrder() { - bitField0_ = (bitField0_ & ~0x00000004); - order_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.SORT_ORDER_ASC; - onChanged(); - return this; - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.SortMode mode = 4; - private com.alicloud.openservices.tablestore.core.protocol.Search.SortMode mode_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortMode.SORT_MODE_MIN; - public boolean hasMode() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.SortMode getMode() { - return mode_; - } - public Builder setMode(com.alicloud.openservices.tablestore.core.protocol.Search.SortMode value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - mode_ = value; - onChanged(); - return this; - } - public Builder clearMode() { - bitField0_ = (bitField0_ & ~0x00000008); - mode_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortMode.SORT_MODE_MIN; - onChanged(); - return this; - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.GeoDistanceType distance_type = 5; - private com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceType distanceType_ = com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceType.GEO_DISTANCE_ARC; - public boolean hasDistanceType() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceType getDistanceType() { - return distanceType_; - } - public Builder setDistanceType(com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceType value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; - distanceType_ = value; + value_ = value; onChanged(); return this; } - public Builder clearDistanceType() { - bitField0_ = (bitField0_ & ~0x00000010); - distanceType_ = com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceType.GEO_DISTANCE_ARC; + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000001); + value_ = 0D; onChanged(); return this; } - // optional .com.alicloud.openservices.tablestore.core.protocol.NestedFilter nested_filter = 6; - private com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter nestedFilter_ = com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter, com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilterOrBuilder> nestedFilterBuilder_; - public boolean hasNestedFilter() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter getNestedFilter() { - if (nestedFilterBuilder_ == null) { - return nestedFilter_; - } else { - return nestedFilterBuilder_.getMessage(); - } - } - public Builder setNestedFilter(com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter value) { - if (nestedFilterBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - nestedFilter_ = value; - onChanged(); - } else { - nestedFilterBuilder_.setMessage(value); - } - bitField0_ |= 0x00000020; - return this; - } - public Builder setNestedFilter( - com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.Builder builderForValue) { - if (nestedFilterBuilder_ == null) { - nestedFilter_ = builderForValue.build(); - onChanged(); - } else { - nestedFilterBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000020; - return this; - } - public Builder mergeNestedFilter(com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter value) { - if (nestedFilterBuilder_ == null) { - if (((bitField0_ & 0x00000020) == 0x00000020) && - nestedFilter_ != com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.getDefaultInstance()) { - nestedFilter_ = - com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.newBuilder(nestedFilter_).mergeFrom(value).buildPartial(); - } else { - nestedFilter_ = value; - } - onChanged(); - } else { - nestedFilterBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000020; - return this; - } - public Builder clearNestedFilter() { - if (nestedFilterBuilder_ == null) { - nestedFilter_ = com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.getDefaultInstance(); - onChanged(); - } else { - nestedFilterBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000020); - return this; - } - public com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.Builder getNestedFilterBuilder() { - bitField0_ |= 0x00000020; - onChanged(); - return getNestedFilterFieldBuilder().getBuilder(); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilterOrBuilder getNestedFilterOrBuilder() { - if (nestedFilterBuilder_ != null) { - return nestedFilterBuilder_.getMessageOrBuilder(); - } else { - return nestedFilter_; - } - } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter, com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilterOrBuilder> - getNestedFilterFieldBuilder() { - if (nestedFilterBuilder_ == null) { - nestedFilterBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter, com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilterOrBuilder>( - nestedFilter_, - getParentForChildren(), - isClean()); - nestedFilter_ = null; - } - return nestedFilterBuilder_; - } - - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GeoDistanceSort) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.SumAggResult) } static { - defaultInstance = new GeoDistanceSort(true); + defaultInstance = new SumAggResult(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GeoDistanceSort) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.SumAggResult) } - public interface SorterOrBuilder + public interface CardinalityAggResultOrBuilder extends com.google.protobuf.MessageOrBuilder { - // optional .com.alicloud.openservices.tablestore.core.protocol.FieldSort field_sort = 1; - boolean hasFieldSort(); - com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort getFieldSort(); - com.alicloud.openservices.tablestore.core.protocol.Search.FieldSortOrBuilder getFieldSortOrBuilder(); - - // optional .com.alicloud.openservices.tablestore.core.protocol.GeoDistanceSort geo_distance_sort = 2; - boolean hasGeoDistanceSort(); - com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort getGeoDistanceSort(); - com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSortOrBuilder getGeoDistanceSortOrBuilder(); - - // optional .com.alicloud.openservices.tablestore.core.protocol.ScoreSort score_sort = 3; - boolean hasScoreSort(); - com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort getScoreSort(); - com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSortOrBuilder getScoreSortOrBuilder(); - - // optional .com.alicloud.openservices.tablestore.core.protocol.PrimaryKeySort pk_sort = 4; - boolean hasPkSort(); - com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort getPkSort(); - com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySortOrBuilder getPkSortOrBuilder(); + // optional int64 value = 1; + boolean hasValue(); + long getValue(); } - public static final class Sorter extends + public static final class CardinalityAggResult extends com.google.protobuf.GeneratedMessage - implements SorterOrBuilder { - // Use Sorter.newBuilder() to construct. - private Sorter(Builder builder) { + implements CardinalityAggResultOrBuilder { + // Use CardinalityAggResult.newBuilder() to construct. + private CardinalityAggResult(Builder builder) { super(builder); } - private Sorter(boolean noInit) {} + private CardinalityAggResult(boolean noInit) {} - private static final Sorter defaultInstance; - public static Sorter getDefaultInstance() { + private static final CardinalityAggResult defaultInstance; + public static CardinalityAggResult getDefaultInstance() { return defaultInstance; } - public Sorter getDefaultInstanceForType() { + public CardinalityAggResult getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Sorter_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_CardinalityAggResult_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Sorter_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_CardinalityAggResult_fieldAccessorTable; } private int bitField0_; - // optional .com.alicloud.openservices.tablestore.core.protocol.FieldSort field_sort = 1; - public static final int FIELD_SORT_FIELD_NUMBER = 1; - private com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort fieldSort_; - public boolean hasFieldSort() { + // optional int64 value = 1; + public static final int VALUE_FIELD_NUMBER = 1; + private long value_; + public boolean hasValue() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort getFieldSort() { - return fieldSort_; - } - public com.alicloud.openservices.tablestore.core.protocol.Search.FieldSortOrBuilder getFieldSortOrBuilder() { - return fieldSort_; - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.GeoDistanceSort geo_distance_sort = 2; - public static final int GEO_DISTANCE_SORT_FIELD_NUMBER = 2; - private com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort geoDistanceSort_; - public boolean hasGeoDistanceSort() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort getGeoDistanceSort() { - return geoDistanceSort_; - } - public com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSortOrBuilder getGeoDistanceSortOrBuilder() { - return geoDistanceSort_; - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.ScoreSort score_sort = 3; - public static final int SCORE_SORT_FIELD_NUMBER = 3; - private com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort scoreSort_; - public boolean hasScoreSort() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort getScoreSort() { - return scoreSort_; - } - public com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSortOrBuilder getScoreSortOrBuilder() { - return scoreSort_; - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.PrimaryKeySort pk_sort = 4; - public static final int PK_SORT_FIELD_NUMBER = 4; - private com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort pkSort_; - public boolean hasPkSort() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort getPkSort() { - return pkSort_; - } - public com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySortOrBuilder getPkSortOrBuilder() { - return pkSort_; + public long getValue() { + return value_; } private void initFields() { - fieldSort_ = com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort.getDefaultInstance(); - geoDistanceSort_ = com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort.getDefaultInstance(); - scoreSort_ = com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort.getDefaultInstance(); - pkSort_ = com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort.getDefaultInstance(); + value_ = 0L; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -13121,16 +11705,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeMessage(1, fieldSort_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeMessage(2, geoDistanceSort_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeMessage(3, scoreSort_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeMessage(4, pkSort_); + output.writeInt64(1, value_); } getUnknownFields().writeTo(output); } @@ -13143,19 +11718,7 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, fieldSort_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, geoDistanceSort_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, scoreSort_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, pkSort_); + .computeInt64Size(1, value_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -13169,41 +11732,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.Sorter parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAggResult parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.Sorter parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAggResult parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.Sorter parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAggResult parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.Sorter parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAggResult parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.Sorter parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAggResult parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.Sorter parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAggResult parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.Sorter parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAggResult parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -13212,7 +11775,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.Sorter p return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.Sorter parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAggResult parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -13223,12 +11786,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.Sorter p return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.Sorter parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAggResult parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.Sorter parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAggResult parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -13238,7 +11801,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.Sorter p public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.Sorter prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAggResult prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -13251,18 +11814,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.Search.SorterOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAggResultOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Sorter_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_CardinalityAggResult_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Sorter_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_CardinalityAggResult_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.Sorter.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAggResult.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -13273,10 +11836,6 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getFieldSortFieldBuilder(); - getGeoDistanceSortFieldBuilder(); - getScoreSortFieldBuilder(); - getPkSortFieldBuilder(); } } private static Builder create() { @@ -13285,30 +11844,8 @@ private static Builder create() { public Builder clear() { super.clear(); - if (fieldSortBuilder_ == null) { - fieldSort_ = com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort.getDefaultInstance(); - } else { - fieldSortBuilder_.clear(); - } + value_ = 0L; bitField0_ = (bitField0_ & ~0x00000001); - if (geoDistanceSortBuilder_ == null) { - geoDistanceSort_ = com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort.getDefaultInstance(); - } else { - geoDistanceSortBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - if (scoreSortBuilder_ == null) { - scoreSort_ = com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort.getDefaultInstance(); - } else { - scoreSortBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - if (pkSortBuilder_ == null) { - pkSort_ = com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort.getDefaultInstance(); - } else { - pkSortBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -13318,24 +11855,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.Sorter.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAggResult.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.Sorter getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.Sorter.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAggResult getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAggResult.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.Sorter build() { - com.alicloud.openservices.tablestore.core.protocol.Search.Sorter result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAggResult build() { + com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAggResult result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.Search.Sorter buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAggResult buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.Search.Sorter result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAggResult result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -13343,69 +11880,32 @@ private com.alicloud.openservices.tablestore.core.protocol.Search.Sorter buildPa return result; } - public com.alicloud.openservices.tablestore.core.protocol.Search.Sorter buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.Search.Sorter result = new com.alicloud.openservices.tablestore.core.protocol.Search.Sorter(this); + public com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAggResult buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAggResult result = new com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAggResult(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - if (fieldSortBuilder_ == null) { - result.fieldSort_ = fieldSort_; - } else { - result.fieldSort_ = fieldSortBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - if (geoDistanceSortBuilder_ == null) { - result.geoDistanceSort_ = geoDistanceSort_; - } else { - result.geoDistanceSort_ = geoDistanceSortBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - if (scoreSortBuilder_ == null) { - result.scoreSort_ = scoreSort_; - } else { - result.scoreSort_ = scoreSortBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - if (pkSortBuilder_ == null) { - result.pkSort_ = pkSort_; - } else { - result.pkSort_ = pkSortBuilder_.build(); - } + result.value_ = value_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.Sorter) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.Sorter)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAggResult) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAggResult)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.Sorter other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.Search.Sorter.getDefaultInstance()) return this; - if (other.hasFieldSort()) { - mergeFieldSort(other.getFieldSort()); - } - if (other.hasGeoDistanceSort()) { - mergeGeoDistanceSort(other.getGeoDistanceSort()); - } - if (other.hasScoreSort()) { - mergeScoreSort(other.getScoreSort()); - } - if (other.hasPkSort()) { - mergePkSort(other.getPkSort()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAggResult other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAggResult.getDefaultInstance()) return this; + if (other.hasValue()) { + setValue(other.getValue()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -13438,40 +11938,9 @@ public Builder mergeFrom( } break; } - case 10: { - com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort.newBuilder(); - if (hasFieldSort()) { - subBuilder.mergeFrom(getFieldSort()); - } - input.readMessage(subBuilder, extensionRegistry); - setFieldSort(subBuilder.buildPartial()); - break; - } - case 18: { - com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort.newBuilder(); - if (hasGeoDistanceSort()) { - subBuilder.mergeFrom(getGeoDistanceSort()); - } - input.readMessage(subBuilder, extensionRegistry); - setGeoDistanceSort(subBuilder.buildPartial()); - break; - } - case 26: { - com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort.newBuilder(); - if (hasScoreSort()) { - subBuilder.mergeFrom(getScoreSort()); - } - input.readMessage(subBuilder, extensionRegistry); - setScoreSort(subBuilder.buildPartial()); - break; - } - case 34: { - com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort.newBuilder(); - if (hasPkSort()) { - subBuilder.mergeFrom(getPkSort()); - } - input.readMessage(subBuilder, extensionRegistry); - setPkSort(subBuilder.buildPartial()); + case 8: { + bitField0_ |= 0x00000001; + value_ = input.readInt64(); break; } } @@ -13480,441 +11949,142 @@ public Builder mergeFrom( private int bitField0_; - // optional .com.alicloud.openservices.tablestore.core.protocol.FieldSort field_sort = 1; - private com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort fieldSort_ = com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSortOrBuilder> fieldSortBuilder_; - public boolean hasFieldSort() { + // optional int64 value = 1; + private long value_ ; + public boolean hasValue() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort getFieldSort() { - if (fieldSortBuilder_ == null) { - return fieldSort_; - } else { - return fieldSortBuilder_.getMessage(); - } + public long getValue() { + return value_; } - public Builder setFieldSort(com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort value) { - if (fieldSortBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - fieldSort_ = value; - onChanged(); - } else { - fieldSortBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - return this; - } - public Builder setFieldSort( - com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort.Builder builderForValue) { - if (fieldSortBuilder_ == null) { - fieldSort_ = builderForValue.build(); - onChanged(); - } else { - fieldSortBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - return this; - } - public Builder mergeFieldSort(com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort value) { - if (fieldSortBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001) && - fieldSort_ != com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort.getDefaultInstance()) { - fieldSort_ = - com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort.newBuilder(fieldSort_).mergeFrom(value).buildPartial(); - } else { - fieldSort_ = value; - } - onChanged(); - } else { - fieldSortBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - return this; - } - public Builder clearFieldSort() { - if (fieldSortBuilder_ == null) { - fieldSort_ = com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort.getDefaultInstance(); - onChanged(); - } else { - fieldSortBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - public com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort.Builder getFieldSortBuilder() { + public Builder setValue(long value) { bitField0_ |= 0x00000001; + value_ = value; onChanged(); - return getFieldSortFieldBuilder().getBuilder(); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.FieldSortOrBuilder getFieldSortOrBuilder() { - if (fieldSortBuilder_ != null) { - return fieldSortBuilder_.getMessageOrBuilder(); - } else { - return fieldSort_; - } - } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSortOrBuilder> - getFieldSortFieldBuilder() { - if (fieldSortBuilder_ == null) { - fieldSortBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSortOrBuilder>( - fieldSort_, - getParentForChildren(), - isClean()); - fieldSort_ = null; - } - return fieldSortBuilder_; - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.GeoDistanceSort geo_distance_sort = 2; - private com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort geoDistanceSort_ = com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort, com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSortOrBuilder> geoDistanceSortBuilder_; - public boolean hasGeoDistanceSort() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort getGeoDistanceSort() { - if (geoDistanceSortBuilder_ == null) { - return geoDistanceSort_; - } else { - return geoDistanceSortBuilder_.getMessage(); - } - } - public Builder setGeoDistanceSort(com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort value) { - if (geoDistanceSortBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - geoDistanceSort_ = value; - onChanged(); - } else { - geoDistanceSortBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - return this; - } - public Builder setGeoDistanceSort( - com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort.Builder builderForValue) { - if (geoDistanceSortBuilder_ == null) { - geoDistanceSort_ = builderForValue.build(); - onChanged(); - } else { - geoDistanceSortBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - return this; - } - public Builder mergeGeoDistanceSort(com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort value) { - if (geoDistanceSortBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002) && - geoDistanceSort_ != com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort.getDefaultInstance()) { - geoDistanceSort_ = - com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort.newBuilder(geoDistanceSort_).mergeFrom(value).buildPartial(); - } else { - geoDistanceSort_ = value; - } - onChanged(); - } else { - geoDistanceSortBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - return this; - } - public Builder clearGeoDistanceSort() { - if (geoDistanceSortBuilder_ == null) { - geoDistanceSort_ = com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort.getDefaultInstance(); - onChanged(); - } else { - geoDistanceSortBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - public com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort.Builder getGeoDistanceSortBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getGeoDistanceSortFieldBuilder().getBuilder(); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSortOrBuilder getGeoDistanceSortOrBuilder() { - if (geoDistanceSortBuilder_ != null) { - return geoDistanceSortBuilder_.getMessageOrBuilder(); - } else { - return geoDistanceSort_; - } - } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort, com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSortOrBuilder> - getGeoDistanceSortFieldBuilder() { - if (geoDistanceSortBuilder_ == null) { - geoDistanceSortBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort, com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSortOrBuilder>( - geoDistanceSort_, - getParentForChildren(), - isClean()); - geoDistanceSort_ = null; - } - return geoDistanceSortBuilder_; - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.ScoreSort score_sort = 3; - private com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort scoreSort_ = com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort, com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSortOrBuilder> scoreSortBuilder_; - public boolean hasScoreSort() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort getScoreSort() { - if (scoreSortBuilder_ == null) { - return scoreSort_; - } else { - return scoreSortBuilder_.getMessage(); - } - } - public Builder setScoreSort(com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort value) { - if (scoreSortBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - scoreSort_ = value; - onChanged(); - } else { - scoreSortBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - return this; - } - public Builder setScoreSort( - com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort.Builder builderForValue) { - if (scoreSortBuilder_ == null) { - scoreSort_ = builderForValue.build(); - onChanged(); - } else { - scoreSortBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - return this; - } - public Builder mergeScoreSort(com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort value) { - if (scoreSortBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004) && - scoreSort_ != com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort.getDefaultInstance()) { - scoreSort_ = - com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort.newBuilder(scoreSort_).mergeFrom(value).buildPartial(); - } else { - scoreSort_ = value; - } - onChanged(); - } else { - scoreSortBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - return this; - } - public Builder clearScoreSort() { - if (scoreSortBuilder_ == null) { - scoreSort_ = com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort.getDefaultInstance(); - onChanged(); - } else { - scoreSortBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); return this; } - public com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort.Builder getScoreSortBuilder() { - bitField0_ |= 0x00000004; + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000001); + value_ = 0L; onChanged(); - return getScoreSortFieldBuilder().getBuilder(); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSortOrBuilder getScoreSortOrBuilder() { - if (scoreSortBuilder_ != null) { - return scoreSortBuilder_.getMessageOrBuilder(); - } else { - return scoreSort_; - } - } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort, com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSortOrBuilder> - getScoreSortFieldBuilder() { - if (scoreSortBuilder_ == null) { - scoreSortBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort, com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSortOrBuilder>( - scoreSort_, - getParentForChildren(), - isClean()); - scoreSort_ = null; - } - return scoreSortBuilder_; - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.PrimaryKeySort pk_sort = 4; - private com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort pkSort_ = com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort, com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySortOrBuilder> pkSortBuilder_; - public boolean hasPkSort() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort getPkSort() { - if (pkSortBuilder_ == null) { - return pkSort_; - } else { - return pkSortBuilder_.getMessage(); - } - } - public Builder setPkSort(com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort value) { - if (pkSortBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - pkSort_ = value; - onChanged(); - } else { - pkSortBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - return this; - } - public Builder setPkSort( - com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort.Builder builderForValue) { - if (pkSortBuilder_ == null) { - pkSort_ = builderForValue.build(); - onChanged(); - } else { - pkSortBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - return this; - } - public Builder mergePkSort(com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort value) { - if (pkSortBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008) && - pkSort_ != com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort.getDefaultInstance()) { - pkSort_ = - com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort.newBuilder(pkSort_).mergeFrom(value).buildPartial(); - } else { - pkSort_ = value; - } - onChanged(); - } else { - pkSortBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000008; - return this; - } - public Builder clearPkSort() { - if (pkSortBuilder_ == null) { - pkSort_ = com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort.getDefaultInstance(); - onChanged(); - } else { - pkSortBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); return this; } - public com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort.Builder getPkSortBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getPkSortFieldBuilder().getBuilder(); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySortOrBuilder getPkSortOrBuilder() { - if (pkSortBuilder_ != null) { - return pkSortBuilder_.getMessageOrBuilder(); - } else { - return pkSort_; - } - } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort, com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySortOrBuilder> - getPkSortFieldBuilder() { - if (pkSortBuilder_ == null) { - pkSortBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort, com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySortOrBuilder>( - pkSort_, - getParentForChildren(), - isClean()); - pkSort_ = null; - } - return pkSortBuilder_; - } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.Sorter) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.CardinalityAggResult) } static { - defaultInstance = new Sorter(true); + defaultInstance = new CardinalityAggResult(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.Sorter) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.CardinalityAggResult) } - public interface SortOrBuilder + public interface BucketOrBuilder extends com.google.protobuf.MessageOrBuilder { - // repeated .com.alicloud.openservices.tablestore.core.protocol.Sorter sorter = 1; - java.util.List - getSorterList(); - com.alicloud.openservices.tablestore.core.protocol.Search.Sorter getSorter(int index); - int getSorterCount(); - java.util.List - getSorterOrBuilderList(); - com.alicloud.openservices.tablestore.core.protocol.Search.SorterOrBuilder getSorterOrBuilder( - int index); + // optional string key = 1; + boolean hasKey(); + String getKey(); + + // optional int64 doc_count = 2; + boolean hasDocCount(); + long getDocCount(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.AggResult agg_result = 3; + boolean hasAggResult(); + com.alicloud.openservices.tablestore.core.protocol.Search.AggResult getAggResult(); + com.alicloud.openservices.tablestore.core.protocol.Search.AggResultOrBuilder getAggResultOrBuilder(); } - public static final class Sort extends + public static final class Bucket extends com.google.protobuf.GeneratedMessage - implements SortOrBuilder { - // Use Sort.newBuilder() to construct. - private Sort(Builder builder) { + implements BucketOrBuilder { + // Use Bucket.newBuilder() to construct. + private Bucket(Builder builder) { super(builder); } - private Sort(boolean noInit) {} + private Bucket(boolean noInit) {} - private static final Sort defaultInstance; - public static Sort getDefaultInstance() { + private static final Bucket defaultInstance; + public static Bucket getDefaultInstance() { return defaultInstance; } - public Sort getDefaultInstanceForType() { + public Bucket getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Sort_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Bucket_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Sort_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Bucket_fieldAccessorTable; } - // repeated .com.alicloud.openservices.tablestore.core.protocol.Sorter sorter = 1; - public static final int SORTER_FIELD_NUMBER = 1; - private java.util.List sorter_; - public java.util.List getSorterList() { - return sorter_; + private int bitField0_; + // optional string key = 1; + public static final int KEY_FIELD_NUMBER = 1; + private java.lang.Object key_; + public boolean hasKey() { + return ((bitField0_ & 0x00000001) == 0x00000001); } - public java.util.List - getSorterOrBuilderList() { - return sorter_; + public String getKey() { + java.lang.Object ref = key_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + key_ = s; + } + return s; + } } - public int getSorterCount() { - return sorter_.size(); + private com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - public com.alicloud.openservices.tablestore.core.protocol.Search.Sorter getSorter(int index) { - return sorter_.get(index); + + // optional int64 doc_count = 2; + public static final int DOC_COUNT_FIELD_NUMBER = 2; + private long docCount_; + public boolean hasDocCount() { + return ((bitField0_ & 0x00000002) == 0x00000002); } - public com.alicloud.openservices.tablestore.core.protocol.Search.SorterOrBuilder getSorterOrBuilder( - int index) { - return sorter_.get(index); + public long getDocCount() { + return docCount_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.AggResult agg_result = 3; + public static final int AGG_RESULT_FIELD_NUMBER = 3; + private com.alicloud.openservices.tablestore.core.protocol.Search.AggResult aggResult_; + public boolean hasAggResult() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggResult getAggResult() { + return aggResult_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggResultOrBuilder getAggResultOrBuilder() { + return aggResult_; } private void initFields() { - sorter_ = java.util.Collections.emptyList(); + key_ = ""; + docCount_ = 0L; + aggResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.AggResult.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -13928,8 +12098,14 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - for (int i = 0; i < sorter_.size(); i++) { - output.writeMessage(1, sorter_.get(i)); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getKeyBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeInt64(2, docCount_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeMessage(3, aggResult_); } getUnknownFields().writeTo(output); } @@ -13940,9 +12116,17 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - for (int i = 0; i < sorter_.size(); i++) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, sorter_.get(i)); + .computeBytesSize(1, getKeyBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, docCount_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, aggResult_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -13956,41 +12140,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.Sort parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.Bucket parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.Sort parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.Bucket parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.Sort parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.Search.Bucket parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.Sort parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.Bucket parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.Sort parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.Bucket parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.Sort parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.Bucket parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.Sort parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.Bucket parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -13999,7 +12183,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.Sort par return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.Sort parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.Bucket parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -14010,12 +12194,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.Sort par return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.Sort parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.Bucket parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.Sort parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.Bucket parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -14025,7 +12209,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.Sort par public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.Sort prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.Bucket prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -14038,18 +12222,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.Search.SortOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.Search.BucketOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Sort_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Bucket_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Sort_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Bucket_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.Sort.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.Bucket.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -14060,7 +12244,7 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getSorterFieldBuilder(); + getAggResultFieldBuilder(); } } private static Builder create() { @@ -14069,12 +12253,16 @@ private static Builder create() { public Builder clear() { super.clear(); - if (sorterBuilder_ == null) { - sorter_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + key_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + docCount_ = 0L; + bitField0_ = (bitField0_ & ~0x00000002); + if (aggResultBuilder_ == null) { + aggResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.AggResult.getDefaultInstance(); } else { - sorterBuilder_.clear(); + aggResultBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000004); return this; } @@ -14084,24 +12272,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.Sort.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.Search.Bucket.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.Sort getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.Sort.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.Search.Bucket getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.Bucket.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.Sort build() { - com.alicloud.openservices.tablestore.core.protocol.Search.Sort result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.Search.Bucket build() { + com.alicloud.openservices.tablestore.core.protocol.Search.Bucket result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.Search.Sort buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.Search.Bucket buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.Search.Sort result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.Search.Bucket result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -14109,58 +12297,50 @@ private com.alicloud.openservices.tablestore.core.protocol.Search.Sort buildPars return result; } - public com.alicloud.openservices.tablestore.core.protocol.Search.Sort buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.Search.Sort result = new com.alicloud.openservices.tablestore.core.protocol.Search.Sort(this); + public com.alicloud.openservices.tablestore.core.protocol.Search.Bucket buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.Bucket result = new com.alicloud.openservices.tablestore.core.protocol.Search.Bucket(this); int from_bitField0_ = bitField0_; - if (sorterBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - sorter_ = java.util.Collections.unmodifiableList(sorter_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.sorter_ = sorter_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.key_ = key_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.docCount_ = docCount_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + if (aggResultBuilder_ == null) { + result.aggResult_ = aggResult_; } else { - result.sorter_ = sorterBuilder_.build(); + result.aggResult_ = aggResultBuilder_.build(); } + result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.Sort) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.Sort)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.Bucket) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.Bucket)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.Sort other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.Search.Sort.getDefaultInstance()) return this; - if (sorterBuilder_ == null) { - if (!other.sorter_.isEmpty()) { - if (sorter_.isEmpty()) { - sorter_ = other.sorter_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureSorterIsMutable(); - sorter_.addAll(other.sorter_); - } - onChanged(); - } - } else { - if (!other.sorter_.isEmpty()) { - if (sorterBuilder_.isEmpty()) { - sorterBuilder_.dispose(); - sorterBuilder_ = null; - sorter_ = other.sorter_; - bitField0_ = (bitField0_ & ~0x00000001); - sorterBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getSorterFieldBuilder() : null; - } else { - sorterBuilder_.addAllMessages(other.sorter_); - } - } + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.Bucket other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.Bucket.getDefaultInstance()) return this; + if (other.hasKey()) { + setKey(other.getKey()); + } + if (other.hasDocCount()) { + setDocCount(other.getDocCount()); + } + if (other.hasAggResult()) { + mergeAggResult(other.getAggResult()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -14194,9 +12374,22 @@ public Builder mergeFrom( break; } case 10: { - com.alicloud.openservices.tablestore.core.protocol.Search.Sorter.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.Sorter.newBuilder(); + bitField0_ |= 0x00000001; + key_ = input.readBytes(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + docCount_ = input.readInt64(); + break; + } + case 26: { + com.alicloud.openservices.tablestore.core.protocol.Search.AggResult.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.AggResult.newBuilder(); + if (hasAggResult()) { + subBuilder.mergeFrom(getAggResult()); + } input.readMessage(subBuilder, extensionRegistry); - addSorter(subBuilder.buildPartial()); + setAggResult(subBuilder.buildPartial()); break; } } @@ -14205,353 +12398,259 @@ public Builder mergeFrom( private int bitField0_; - // repeated .com.alicloud.openservices.tablestore.core.protocol.Sorter sorter = 1; - private java.util.List sorter_ = - java.util.Collections.emptyList(); - private void ensureSorterIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - sorter_ = new java.util.ArrayList(sorter_); - bitField0_ |= 0x00000001; - } + // optional string key = 1; + private java.lang.Object key_ = ""; + public boolean hasKey() { + return ((bitField0_ & 0x00000001) == 0x00000001); } - - private com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.Sorter, com.alicloud.openservices.tablestore.core.protocol.Search.Sorter.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.SorterOrBuilder> sorterBuilder_; - - public java.util.List getSorterList() { - if (sorterBuilder_ == null) { - return java.util.Collections.unmodifiableList(sorter_); + public String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + key_ = s; + return s; } else { - return sorterBuilder_.getMessageList(); + return (String) ref; } } - public int getSorterCount() { - if (sorterBuilder_ == null) { - return sorter_.size(); - } else { - return sorterBuilder_.getCount(); - } + public Builder setKey(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + key_ = value; + onChanged(); + return this; } - public com.alicloud.openservices.tablestore.core.protocol.Search.Sorter getSorter(int index) { - if (sorterBuilder_ == null) { - return sorter_.get(index); - } else { - return sorterBuilder_.getMessage(index); - } + public Builder clearKey() { + bitField0_ = (bitField0_ & ~0x00000001); + key_ = getDefaultInstance().getKey(); + onChanged(); + return this; } - public Builder setSorter( - int index, com.alicloud.openservices.tablestore.core.protocol.Search.Sorter value) { - if (sorterBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSorterIsMutable(); - sorter_.set(index, value); - onChanged(); - } else { - sorterBuilder_.setMessage(index, value); - } + void setKey(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + key_ = value; + onChanged(); + } + + // optional int64 doc_count = 2; + private long docCount_ ; + public boolean hasDocCount() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public long getDocCount() { + return docCount_; + } + public Builder setDocCount(long value) { + bitField0_ |= 0x00000002; + docCount_ = value; + onChanged(); return this; } - public Builder setSorter( - int index, com.alicloud.openservices.tablestore.core.protocol.Search.Sorter.Builder builderForValue) { - if (sorterBuilder_ == null) { - ensureSorterIsMutable(); - sorter_.set(index, builderForValue.build()); - onChanged(); - } else { - sorterBuilder_.setMessage(index, builderForValue.build()); - } + public Builder clearDocCount() { + bitField0_ = (bitField0_ & ~0x00000002); + docCount_ = 0L; + onChanged(); return this; } - public Builder addSorter(com.alicloud.openservices.tablestore.core.protocol.Search.Sorter value) { - if (sorterBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSorterIsMutable(); - sorter_.add(value); - onChanged(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.AggResult agg_result = 3; + private com.alicloud.openservices.tablestore.core.protocol.Search.AggResult aggResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.AggResult.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.AggResult, com.alicloud.openservices.tablestore.core.protocol.Search.AggResult.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggResultOrBuilder> aggResultBuilder_; + public boolean hasAggResult() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggResult getAggResult() { + if (aggResultBuilder_ == null) { + return aggResult_; } else { - sorterBuilder_.addMessage(value); + return aggResultBuilder_.getMessage(); } - return this; } - public Builder addSorter( - int index, com.alicloud.openservices.tablestore.core.protocol.Search.Sorter value) { - if (sorterBuilder_ == null) { + public Builder setAggResult(com.alicloud.openservices.tablestore.core.protocol.Search.AggResult value) { + if (aggResultBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureSorterIsMutable(); - sorter_.add(index, value); - onChanged(); - } else { - sorterBuilder_.addMessage(index, value); - } - return this; - } - public Builder addSorter( - com.alicloud.openservices.tablestore.core.protocol.Search.Sorter.Builder builderForValue) { - if (sorterBuilder_ == null) { - ensureSorterIsMutable(); - sorter_.add(builderForValue.build()); - onChanged(); - } else { - sorterBuilder_.addMessage(builderForValue.build()); - } - return this; - } - public Builder addSorter( - int index, com.alicloud.openservices.tablestore.core.protocol.Search.Sorter.Builder builderForValue) { - if (sorterBuilder_ == null) { - ensureSorterIsMutable(); - sorter_.add(index, builderForValue.build()); + aggResult_ = value; onChanged(); } else { - sorterBuilder_.addMessage(index, builderForValue.build()); + aggResultBuilder_.setMessage(value); } + bitField0_ |= 0x00000004; return this; } - public Builder addAllSorter( - java.lang.Iterable values) { - if (sorterBuilder_ == null) { - ensureSorterIsMutable(); - super.addAll(values, sorter_); + public Builder setAggResult( + com.alicloud.openservices.tablestore.core.protocol.Search.AggResult.Builder builderForValue) { + if (aggResultBuilder_ == null) { + aggResult_ = builderForValue.build(); onChanged(); } else { - sorterBuilder_.addAllMessages(values); + aggResultBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000004; return this; } - public Builder clearSorter() { - if (sorterBuilder_ == null) { - sorter_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + public Builder mergeAggResult(com.alicloud.openservices.tablestore.core.protocol.Search.AggResult value) { + if (aggResultBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004) && + aggResult_ != com.alicloud.openservices.tablestore.core.protocol.Search.AggResult.getDefaultInstance()) { + aggResult_ = + com.alicloud.openservices.tablestore.core.protocol.Search.AggResult.newBuilder(aggResult_).mergeFrom(value).buildPartial(); + } else { + aggResult_ = value; + } onChanged(); } else { - sorterBuilder_.clear(); + aggResultBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000004; return this; } - public Builder removeSorter(int index) { - if (sorterBuilder_ == null) { - ensureSorterIsMutable(); - sorter_.remove(index); + public Builder clearAggResult() { + if (aggResultBuilder_ == null) { + aggResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.AggResult.getDefaultInstance(); onChanged(); } else { - sorterBuilder_.remove(index); + aggResultBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000004); return this; } - public com.alicloud.openservices.tablestore.core.protocol.Search.Sorter.Builder getSorterBuilder( - int index) { - return getSorterFieldBuilder().getBuilder(index); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.SorterOrBuilder getSorterOrBuilder( - int index) { - if (sorterBuilder_ == null) { - return sorter_.get(index); } else { - return sorterBuilder_.getMessageOrBuilder(index); - } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggResult.Builder getAggResultBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getAggResultFieldBuilder().getBuilder(); } - public java.util.List - getSorterOrBuilderList() { - if (sorterBuilder_ != null) { - return sorterBuilder_.getMessageOrBuilderList(); + public com.alicloud.openservices.tablestore.core.protocol.Search.AggResultOrBuilder getAggResultOrBuilder() { + if (aggResultBuilder_ != null) { + return aggResultBuilder_.getMessageOrBuilder(); } else { - return java.util.Collections.unmodifiableList(sorter_); + return aggResult_; } } - public com.alicloud.openservices.tablestore.core.protocol.Search.Sorter.Builder addSorterBuilder() { - return getSorterFieldBuilder().addBuilder( - com.alicloud.openservices.tablestore.core.protocol.Search.Sorter.getDefaultInstance()); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.Sorter.Builder addSorterBuilder( - int index) { - return getSorterFieldBuilder().addBuilder( - index, com.alicloud.openservices.tablestore.core.protocol.Search.Sorter.getDefaultInstance()); - } - public java.util.List - getSorterBuilderList() { - return getSorterFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.Sorter, com.alicloud.openservices.tablestore.core.protocol.Search.Sorter.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.SorterOrBuilder> - getSorterFieldBuilder() { - if (sorterBuilder_ == null) { - sorterBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.Sorter, com.alicloud.openservices.tablestore.core.protocol.Search.Sorter.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.SorterOrBuilder>( - sorter_, - ((bitField0_ & 0x00000001) == 0x00000001), + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.AggResult, com.alicloud.openservices.tablestore.core.protocol.Search.AggResult.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggResultOrBuilder> + getAggResultFieldBuilder() { + if (aggResultBuilder_ == null) { + aggResultBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.AggResult, com.alicloud.openservices.tablestore.core.protocol.Search.AggResult.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggResultOrBuilder>( + aggResult_, getParentForChildren(), isClean()); - sorter_ = null; + aggResult_ = null; } - return sorterBuilder_; + return aggResultBuilder_; } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.Sort) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.Bucket) } static { - defaultInstance = new Sort(true); + defaultInstance = new Bucket(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.Sort) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.Bucket) } - public interface SearchQueryOrBuilder + public interface TermsAggResultOrBuilder extends com.google.protobuf.MessageOrBuilder { - // optional int32 offset = 1; - boolean hasOffset(); - int getOffset(); - - // optional int32 limit = 2; - boolean hasLimit(); - int getLimit(); - - // optional .com.alicloud.openservices.tablestore.core.protocol.Query query = 4; - boolean hasQuery(); - com.alicloud.openservices.tablestore.core.protocol.Search.Query getQuery(); - com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getQueryOrBuilder(); - - // optional .com.alicloud.openservices.tablestore.core.protocol.Collapse collapse = 5; - boolean hasCollapse(); - com.alicloud.openservices.tablestore.core.protocol.Search.Collapse getCollapse(); - com.alicloud.openservices.tablestore.core.protocol.Search.CollapseOrBuilder getCollapseOrBuilder(); - - // optional .com.alicloud.openservices.tablestore.core.protocol.Sort sort = 6; - boolean hasSort(); - com.alicloud.openservices.tablestore.core.protocol.Search.Sort getSort(); - com.alicloud.openservices.tablestore.core.protocol.Search.SortOrBuilder getSortOrBuilder(); - - // optional bool getTotalCount = 8; - boolean hasGetTotalCount(); - boolean getGetTotalCount(); - - // optional bytes token = 9; - boolean hasToken(); - com.google.protobuf.ByteString getToken(); + // optional int64 doc_count_error_upper_bound = 1; + boolean hasDocCountErrorUpperBound(); + long getDocCountErrorUpperBound(); + + // optional int64 sum_of_other_doc_count = 2; + boolean hasSumOfOtherDocCount(); + long getSumOfOtherDocCount(); + + // repeated .com.alicloud.openservices.tablestore.core.protocol.Bucket bucket = 3; + java.util.List + getBucketList(); + com.alicloud.openservices.tablestore.core.protocol.Search.Bucket getBucket(int index); + int getBucketCount(); + java.util.List + getBucketOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.Search.BucketOrBuilder getBucketOrBuilder( + int index); } - public static final class SearchQuery extends + public static final class TermsAggResult extends com.google.protobuf.GeneratedMessage - implements SearchQueryOrBuilder { - // Use SearchQuery.newBuilder() to construct. - private SearchQuery(Builder builder) { + implements TermsAggResultOrBuilder { + // Use TermsAggResult.newBuilder() to construct. + private TermsAggResult(Builder builder) { super(builder); } - private SearchQuery(boolean noInit) {} + private TermsAggResult(boolean noInit) {} - private static final SearchQuery defaultInstance; - public static SearchQuery getDefaultInstance() { + private static final TermsAggResult defaultInstance; + public static TermsAggResult getDefaultInstance() { return defaultInstance; } - public SearchQuery getDefaultInstanceForType() { + public TermsAggResult getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SearchQuery_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_TermsAggResult_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SearchQuery_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_TermsAggResult_fieldAccessorTable; } private int bitField0_; - // optional int32 offset = 1; - public static final int OFFSET_FIELD_NUMBER = 1; - private int offset_; - public boolean hasOffset() { + // optional int64 doc_count_error_upper_bound = 1; + public static final int DOC_COUNT_ERROR_UPPER_BOUND_FIELD_NUMBER = 1; + private long docCountErrorUpperBound_; + public boolean hasDocCountErrorUpperBound() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public int getOffset() { - return offset_; + public long getDocCountErrorUpperBound() { + return docCountErrorUpperBound_; } - // optional int32 limit = 2; - public static final int LIMIT_FIELD_NUMBER = 2; - private int limit_; - public boolean hasLimit() { + // optional int64 sum_of_other_doc_count = 2; + public static final int SUM_OF_OTHER_DOC_COUNT_FIELD_NUMBER = 2; + private long sumOfOtherDocCount_; + public boolean hasSumOfOtherDocCount() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public int getLimit() { - return limit_; - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.Query query = 4; - public static final int QUERY_FIELD_NUMBER = 4; - private com.alicloud.openservices.tablestore.core.protocol.Search.Query query_; - public boolean hasQuery() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.Query getQuery() { - return query_; - } - public com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getQueryOrBuilder() { - return query_; - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.Collapse collapse = 5; - public static final int COLLAPSE_FIELD_NUMBER = 5; - private com.alicloud.openservices.tablestore.core.protocol.Search.Collapse collapse_; - public boolean hasCollapse() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.Collapse getCollapse() { - return collapse_; - } - public com.alicloud.openservices.tablestore.core.protocol.Search.CollapseOrBuilder getCollapseOrBuilder() { - return collapse_; + public long getSumOfOtherDocCount() { + return sumOfOtherDocCount_; } - // optional .com.alicloud.openservices.tablestore.core.protocol.Sort sort = 6; - public static final int SORT_FIELD_NUMBER = 6; - private com.alicloud.openservices.tablestore.core.protocol.Search.Sort sort_; - public boolean hasSort() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.Sort getSort() { - return sort_; - } - public com.alicloud.openservices.tablestore.core.protocol.Search.SortOrBuilder getSortOrBuilder() { - return sort_; + // repeated .com.alicloud.openservices.tablestore.core.protocol.Bucket bucket = 3; + public static final int BUCKET_FIELD_NUMBER = 3; + private java.util.List bucket_; + public java.util.List getBucketList() { + return bucket_; } - - // optional bool getTotalCount = 8; - public static final int GETTOTALCOUNT_FIELD_NUMBER = 8; - private boolean getTotalCount_; - public boolean hasGetTotalCount() { - return ((bitField0_ & 0x00000020) == 0x00000020); + public java.util.List + getBucketOrBuilderList() { + return bucket_; } - public boolean getGetTotalCount() { - return getTotalCount_; + public int getBucketCount() { + return bucket_.size(); } - - // optional bytes token = 9; - public static final int TOKEN_FIELD_NUMBER = 9; - private com.google.protobuf.ByteString token_; - public boolean hasToken() { - return ((bitField0_ & 0x00000040) == 0x00000040); + public com.alicloud.openservices.tablestore.core.protocol.Search.Bucket getBucket(int index) { + return bucket_.get(index); } - public com.google.protobuf.ByteString getToken() { - return token_; + public com.alicloud.openservices.tablestore.core.protocol.Search.BucketOrBuilder getBucketOrBuilder( + int index) { + return bucket_.get(index); } private void initFields() { - offset_ = 0; - limit_ = 0; - query_ = com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance(); - collapse_ = com.alicloud.openservices.tablestore.core.protocol.Search.Collapse.getDefaultInstance(); - sort_ = com.alicloud.openservices.tablestore.core.protocol.Search.Sort.getDefaultInstance(); - getTotalCount_ = false; - token_ = com.google.protobuf.ByteString.EMPTY; + docCountErrorUpperBound_ = 0L; + sumOfOtherDocCount_ = 0L; + bucket_ = java.util.Collections.emptyList(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -14566,25 +12665,13 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeInt32(1, offset_); + output.writeInt64(1, docCountErrorUpperBound_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeInt32(2, limit_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeMessage(4, query_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeMessage(5, collapse_); + output.writeInt64(2, sumOfOtherDocCount_); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeMessage(6, sort_); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - output.writeBool(8, getTotalCount_); - } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - output.writeBytes(9, token_); + for (int i = 0; i < bucket_.size(); i++) { + output.writeMessage(3, bucket_.get(i)); } getUnknownFields().writeTo(output); } @@ -14597,31 +12684,15 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, offset_); + .computeInt64Size(1, docCountErrorUpperBound_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, limit_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, query_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, collapse_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, sort_); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(8, getTotalCount_); + .computeInt64Size(2, sumOfOtherDocCount_); } - if (((bitField0_ & 0x00000040) == 0x00000040)) { + for (int i = 0; i < bucket_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(9, token_); + .computeMessageSize(3, bucket_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -14635,41 +12706,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.TermsAggResult parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.TermsAggResult parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.Search.TermsAggResult parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.TermsAggResult parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.TermsAggResult parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.TermsAggResult parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.TermsAggResult parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -14678,7 +12749,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchQu return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.TermsAggResult parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -14689,12 +12760,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchQu return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.TermsAggResult parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.TermsAggResult parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -14704,7 +12775,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchQu public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.TermsAggResult prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -14717,18 +12788,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.Search.SearchQueryOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.Search.TermsAggResultOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SearchQuery_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_TermsAggResult_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SearchQuery_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_TermsAggResult_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.TermsAggResult.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -14739,9 +12810,7 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getQueryFieldBuilder(); - getCollapseFieldBuilder(); - getSortFieldBuilder(); + getBucketFieldBuilder(); } } private static Builder create() { @@ -14750,32 +12819,16 @@ private static Builder create() { public Builder clear() { super.clear(); - offset_ = 0; + docCountErrorUpperBound_ = 0L; bitField0_ = (bitField0_ & ~0x00000001); - limit_ = 0; + sumOfOtherDocCount_ = 0L; bitField0_ = (bitField0_ & ~0x00000002); - if (queryBuilder_ == null) { - query_ = com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance(); - } else { - queryBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - if (collapseBuilder_ == null) { - collapse_ = com.alicloud.openservices.tablestore.core.protocol.Search.Collapse.getDefaultInstance(); - } else { - collapseBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - if (sortBuilder_ == null) { - sort_ = com.alicloud.openservices.tablestore.core.protocol.Search.Sort.getDefaultInstance(); + if (bucketBuilder_ == null) { + bucket_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); } else { - sortBuilder_.clear(); + bucketBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000010); - getTotalCount_ = false; - bitField0_ = (bitField0_ & ~0x00000020); - token_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000040); return this; } @@ -14785,24 +12838,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.Search.TermsAggResult.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.Search.TermsAggResult getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.TermsAggResult.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery build() { - com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.Search.TermsAggResult build() { + com.alicloud.openservices.tablestore.core.protocol.Search.TermsAggResult result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.Search.TermsAggResult buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.Search.TermsAggResult result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -14810,86 +12863,74 @@ private com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery bu return result; } - public com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery result = new com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery(this); + public com.alicloud.openservices.tablestore.core.protocol.Search.TermsAggResult buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.TermsAggResult result = new com.alicloud.openservices.tablestore.core.protocol.Search.TermsAggResult(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.offset_ = offset_; + result.docCountErrorUpperBound_ = docCountErrorUpperBound_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - result.limit_ = limit_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - if (queryBuilder_ == null) { - result.query_ = query_; - } else { - result.query_ = queryBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - if (collapseBuilder_ == null) { - result.collapse_ = collapse_; - } else { - result.collapse_ = collapseBuilder_.build(); - } - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000010; - } - if (sortBuilder_ == null) { - result.sort_ = sort_; + result.sumOfOtherDocCount_ = sumOfOtherDocCount_; + if (bucketBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004)) { + bucket_ = java.util.Collections.unmodifiableList(bucket_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.bucket_ = bucket_; } else { - result.sort_ = sortBuilder_.build(); - } - if (((from_bitField0_ & 0x00000020) == 0x00000020)) { - to_bitField0_ |= 0x00000020; - } - result.getTotalCount_ = getTotalCount_; - if (((from_bitField0_ & 0x00000040) == 0x00000040)) { - to_bitField0_ |= 0x00000040; + result.bucket_ = bucketBuilder_.build(); } - result.token_ = token_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.TermsAggResult) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.TermsAggResult)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery.getDefaultInstance()) return this; - if (other.hasOffset()) { - setOffset(other.getOffset()); - } - if (other.hasLimit()) { - setLimit(other.getLimit()); - } - if (other.hasQuery()) { - mergeQuery(other.getQuery()); - } - if (other.hasCollapse()) { - mergeCollapse(other.getCollapse()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.TermsAggResult other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.TermsAggResult.getDefaultInstance()) return this; + if (other.hasDocCountErrorUpperBound()) { + setDocCountErrorUpperBound(other.getDocCountErrorUpperBound()); } - if (other.hasSort()) { - mergeSort(other.getSort()); - } - if (other.hasGetTotalCount()) { - setGetTotalCount(other.getGetTotalCount()); + if (other.hasSumOfOtherDocCount()) { + setSumOfOtherDocCount(other.getSumOfOtherDocCount()); } - if (other.hasToken()) { - setToken(other.getToken()); + if (bucketBuilder_ == null) { + if (!other.bucket_.isEmpty()) { + if (bucket_.isEmpty()) { + bucket_ = other.bucket_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureBucketIsMutable(); + bucket_.addAll(other.bucket_); + } + onChanged(); + } + } else { + if (!other.bucket_.isEmpty()) { + if (bucketBuilder_.isEmpty()) { + bucketBuilder_.dispose(); + bucketBuilder_ = null; + bucket_ = other.bucket_; + bitField0_ = (bitField0_ & ~0x00000004); + bucketBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getBucketFieldBuilder() : null; + } else { + bucketBuilder_.addAllMessages(other.bucket_); + } + } } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -14924,49 +12965,18 @@ public Builder mergeFrom( } case 8: { bitField0_ |= 0x00000001; - offset_ = input.readInt32(); + docCountErrorUpperBound_ = input.readInt64(); break; } case 16: { bitField0_ |= 0x00000002; - limit_ = input.readInt32(); - break; - } - case 34: { - com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.Query.newBuilder(); - if (hasQuery()) { - subBuilder.mergeFrom(getQuery()); - } - input.readMessage(subBuilder, extensionRegistry); - setQuery(subBuilder.buildPartial()); - break; - } - case 42: { - com.alicloud.openservices.tablestore.core.protocol.Search.Collapse.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.Collapse.newBuilder(); - if (hasCollapse()) { - subBuilder.mergeFrom(getCollapse()); - } - input.readMessage(subBuilder, extensionRegistry); - setCollapse(subBuilder.buildPartial()); + sumOfOtherDocCount_ = input.readInt64(); break; } - case 50: { - com.alicloud.openservices.tablestore.core.protocol.Search.Sort.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.Sort.newBuilder(); - if (hasSort()) { - subBuilder.mergeFrom(getSort()); - } + case 26: { + com.alicloud.openservices.tablestore.core.protocol.Search.Bucket.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.Bucket.newBuilder(); input.readMessage(subBuilder, extensionRegistry); - setSort(subBuilder.buildPartial()); - break; - } - case 64: { - bitField0_ |= 0x00000020; - getTotalCount_ = input.readBool(); - break; - } - case 74: { - bitField0_ |= 0x00000040; - token_ = input.readBytes(); + addBucket(subBuilder.buildPartial()); break; } } @@ -14975,442 +12985,312 @@ public Builder mergeFrom( private int bitField0_; - // optional int32 offset = 1; - private int offset_ ; - public boolean hasOffset() { + // optional int64 doc_count_error_upper_bound = 1; + private long docCountErrorUpperBound_ ; + public boolean hasDocCountErrorUpperBound() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public int getOffset() { - return offset_; + public long getDocCountErrorUpperBound() { + return docCountErrorUpperBound_; } - public Builder setOffset(int value) { + public Builder setDocCountErrorUpperBound(long value) { bitField0_ |= 0x00000001; - offset_ = value; + docCountErrorUpperBound_ = value; onChanged(); return this; } - public Builder clearOffset() { + public Builder clearDocCountErrorUpperBound() { bitField0_ = (bitField0_ & ~0x00000001); - offset_ = 0; + docCountErrorUpperBound_ = 0L; onChanged(); return this; } - // optional int32 limit = 2; - private int limit_ ; - public boolean hasLimit() { + // optional int64 sum_of_other_doc_count = 2; + private long sumOfOtherDocCount_ ; + public boolean hasSumOfOtherDocCount() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public int getLimit() { - return limit_; + public long getSumOfOtherDocCount() { + return sumOfOtherDocCount_; } - public Builder setLimit(int value) { + public Builder setSumOfOtherDocCount(long value) { bitField0_ |= 0x00000002; - limit_ = value; + sumOfOtherDocCount_ = value; onChanged(); return this; } - public Builder clearLimit() { + public Builder clearSumOfOtherDocCount() { bitField0_ = (bitField0_ & ~0x00000002); - limit_ = 0; + sumOfOtherDocCount_ = 0L; onChanged(); return this; } - // optional .com.alicloud.openservices.tablestore.core.protocol.Query query = 4; - private com.alicloud.openservices.tablestore.core.protocol.Search.Query query_ = com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder> queryBuilder_; - public boolean hasQuery() { - return ((bitField0_ & 0x00000004) == 0x00000004); + // repeated .com.alicloud.openservices.tablestore.core.protocol.Bucket bucket = 3; + private java.util.List bucket_ = + java.util.Collections.emptyList(); + private void ensureBucketIsMutable() { + if (!((bitField0_ & 0x00000004) == 0x00000004)) { + bucket_ = new java.util.ArrayList(bucket_); + bitField0_ |= 0x00000004; + } } - public com.alicloud.openservices.tablestore.core.protocol.Search.Query getQuery() { - if (queryBuilder_ == null) { - return query_; + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Bucket, com.alicloud.openservices.tablestore.core.protocol.Search.Bucket.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.BucketOrBuilder> bucketBuilder_; + + public java.util.List getBucketList() { + if (bucketBuilder_ == null) { + return java.util.Collections.unmodifiableList(bucket_); } else { - return queryBuilder_.getMessage(); + return bucketBuilder_.getMessageList(); } } - public Builder setQuery(com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { - if (queryBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - query_ = value; - onChanged(); + public int getBucketCount() { + if (bucketBuilder_ == null) { + return bucket_.size(); } else { - queryBuilder_.setMessage(value); + return bucketBuilder_.getCount(); } - bitField0_ |= 0x00000004; - return this; } - public Builder setQuery( - com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder builderForValue) { - if (queryBuilder_ == null) { - query_ = builderForValue.build(); - onChanged(); + public com.alicloud.openservices.tablestore.core.protocol.Search.Bucket getBucket(int index) { + if (bucketBuilder_ == null) { + return bucket_.get(index); } else { - queryBuilder_.setMessage(builderForValue.build()); + return bucketBuilder_.getMessage(index); } - bitField0_ |= 0x00000004; - return this; } - public Builder mergeQuery(com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { - if (queryBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004) && - query_ != com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance()) { - query_ = - com.alicloud.openservices.tablestore.core.protocol.Search.Query.newBuilder(query_).mergeFrom(value).buildPartial(); - } else { - query_ = value; + public Builder setBucket( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.Bucket value) { + if (bucketBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } + ensureBucketIsMutable(); + bucket_.set(index, value); onChanged(); } else { - queryBuilder_.mergeFrom(value); + bucketBuilder_.setMessage(index, value); } - bitField0_ |= 0x00000004; return this; } - public Builder clearQuery() { - if (queryBuilder_ == null) { - query_ = com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance(); + public Builder setBucket( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.Bucket.Builder builderForValue) { + if (bucketBuilder_ == null) { + ensureBucketIsMutable(); + bucket_.set(index, builderForValue.build()); onChanged(); } else { - queryBuilder_.clear(); + bucketBuilder_.setMessage(index, builderForValue.build()); } - bitField0_ = (bitField0_ & ~0x00000004); return this; } - public com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder getQueryBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getQueryFieldBuilder().getBuilder(); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getQueryOrBuilder() { - if (queryBuilder_ != null) { - return queryBuilder_.getMessageOrBuilder(); - } else { - return query_; - } - } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder> - getQueryFieldBuilder() { - if (queryBuilder_ == null) { - queryBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder>( - query_, - getParentForChildren(), - isClean()); - query_ = null; - } - return queryBuilder_; - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.Collapse collapse = 5; - private com.alicloud.openservices.tablestore.core.protocol.Search.Collapse collapse_ = com.alicloud.openservices.tablestore.core.protocol.Search.Collapse.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.Collapse, com.alicloud.openservices.tablestore.core.protocol.Search.Collapse.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.CollapseOrBuilder> collapseBuilder_; - public boolean hasCollapse() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.Collapse getCollapse() { - if (collapseBuilder_ == null) { - return collapse_; - } else { - return collapseBuilder_.getMessage(); - } - } - public Builder setCollapse(com.alicloud.openservices.tablestore.core.protocol.Search.Collapse value) { - if (collapseBuilder_ == null) { + public Builder addBucket(com.alicloud.openservices.tablestore.core.protocol.Search.Bucket value) { + if (bucketBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - collapse_ = value; - onChanged(); - } else { - collapseBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - return this; - } - public Builder setCollapse( - com.alicloud.openservices.tablestore.core.protocol.Search.Collapse.Builder builderForValue) { - if (collapseBuilder_ == null) { - collapse_ = builderForValue.build(); + ensureBucketIsMutable(); + bucket_.add(value); onChanged(); } else { - collapseBuilder_.setMessage(builderForValue.build()); + bucketBuilder_.addMessage(value); } - bitField0_ |= 0x00000008; return this; } - public Builder mergeCollapse(com.alicloud.openservices.tablestore.core.protocol.Search.Collapse value) { - if (collapseBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008) && - collapse_ != com.alicloud.openservices.tablestore.core.protocol.Search.Collapse.getDefaultInstance()) { - collapse_ = - com.alicloud.openservices.tablestore.core.protocol.Search.Collapse.newBuilder(collapse_).mergeFrom(value).buildPartial(); - } else { - collapse_ = value; + public Builder addBucket( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.Bucket value) { + if (bucketBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } + ensureBucketIsMutable(); + bucket_.add(index, value); onChanged(); } else { - collapseBuilder_.mergeFrom(value); + bucketBuilder_.addMessage(index, value); } - bitField0_ |= 0x00000008; return this; } - public Builder clearCollapse() { - if (collapseBuilder_ == null) { - collapse_ = com.alicloud.openservices.tablestore.core.protocol.Search.Collapse.getDefaultInstance(); + public Builder addBucket( + com.alicloud.openservices.tablestore.core.protocol.Search.Bucket.Builder builderForValue) { + if (bucketBuilder_ == null) { + ensureBucketIsMutable(); + bucket_.add(builderForValue.build()); onChanged(); } else { - collapseBuilder_.clear(); + bucketBuilder_.addMessage(builderForValue.build()); } - bitField0_ = (bitField0_ & ~0x00000008); return this; } - public com.alicloud.openservices.tablestore.core.protocol.Search.Collapse.Builder getCollapseBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getCollapseFieldBuilder().getBuilder(); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.CollapseOrBuilder getCollapseOrBuilder() { - if (collapseBuilder_ != null) { - return collapseBuilder_.getMessageOrBuilder(); - } else { - return collapse_; - } - } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.Collapse, com.alicloud.openservices.tablestore.core.protocol.Search.Collapse.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.CollapseOrBuilder> - getCollapseFieldBuilder() { - if (collapseBuilder_ == null) { - collapseBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.Collapse, com.alicloud.openservices.tablestore.core.protocol.Search.Collapse.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.CollapseOrBuilder>( - collapse_, - getParentForChildren(), - isClean()); - collapse_ = null; - } - return collapseBuilder_; - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.Sort sort = 6; - private com.alicloud.openservices.tablestore.core.protocol.Search.Sort sort_ = com.alicloud.openservices.tablestore.core.protocol.Search.Sort.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.Sort, com.alicloud.openservices.tablestore.core.protocol.Search.Sort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.SortOrBuilder> sortBuilder_; - public boolean hasSort() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.Sort getSort() { - if (sortBuilder_ == null) { - return sort_; - } else { - return sortBuilder_.getMessage(); - } - } - public Builder setSort(com.alicloud.openservices.tablestore.core.protocol.Search.Sort value) { - if (sortBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - sort_ = value; + public Builder addBucket( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.Bucket.Builder builderForValue) { + if (bucketBuilder_ == null) { + ensureBucketIsMutable(); + bucket_.add(index, builderForValue.build()); onChanged(); } else { - sortBuilder_.setMessage(value); + bucketBuilder_.addMessage(index, builderForValue.build()); } - bitField0_ |= 0x00000010; return this; } - public Builder setSort( - com.alicloud.openservices.tablestore.core.protocol.Search.Sort.Builder builderForValue) { - if (sortBuilder_ == null) { - sort_ = builderForValue.build(); + public Builder addAllBucket( + java.lang.Iterable values) { + if (bucketBuilder_ == null) { + ensureBucketIsMutable(); + super.addAll(values, bucket_); onChanged(); } else { - sortBuilder_.setMessage(builderForValue.build()); + bucketBuilder_.addAllMessages(values); } - bitField0_ |= 0x00000010; return this; } - public Builder mergeSort(com.alicloud.openservices.tablestore.core.protocol.Search.Sort value) { - if (sortBuilder_ == null) { - if (((bitField0_ & 0x00000010) == 0x00000010) && - sort_ != com.alicloud.openservices.tablestore.core.protocol.Search.Sort.getDefaultInstance()) { - sort_ = - com.alicloud.openservices.tablestore.core.protocol.Search.Sort.newBuilder(sort_).mergeFrom(value).buildPartial(); - } else { - sort_ = value; - } + public Builder clearBucket() { + if (bucketBuilder_ == null) { + bucket_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); } else { - sortBuilder_.mergeFrom(value); + bucketBuilder_.clear(); } - bitField0_ |= 0x00000010; return this; } - public Builder clearSort() { - if (sortBuilder_ == null) { - sort_ = com.alicloud.openservices.tablestore.core.protocol.Search.Sort.getDefaultInstance(); + public Builder removeBucket(int index) { + if (bucketBuilder_ == null) { + ensureBucketIsMutable(); + bucket_.remove(index); onChanged(); } else { - sortBuilder_.clear(); + bucketBuilder_.remove(index); } - bitField0_ = (bitField0_ & ~0x00000010); return this; } - public com.alicloud.openservices.tablestore.core.protocol.Search.Sort.Builder getSortBuilder() { - bitField0_ |= 0x00000010; - onChanged(); - return getSortFieldBuilder().getBuilder(); + public com.alicloud.openservices.tablestore.core.protocol.Search.Bucket.Builder getBucketBuilder( + int index) { + return getBucketFieldBuilder().getBuilder(index); } - public com.alicloud.openservices.tablestore.core.protocol.Search.SortOrBuilder getSortOrBuilder() { - if (sortBuilder_ != null) { - return sortBuilder_.getMessageOrBuilder(); - } else { - return sort_; + public com.alicloud.openservices.tablestore.core.protocol.Search.BucketOrBuilder getBucketOrBuilder( + int index) { + if (bucketBuilder_ == null) { + return bucket_.get(index); } else { + return bucketBuilder_.getMessageOrBuilder(index); } } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.Sort, com.alicloud.openservices.tablestore.core.protocol.Search.Sort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.SortOrBuilder> - getSortFieldBuilder() { - if (sortBuilder_ == null) { - sortBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.Sort, com.alicloud.openservices.tablestore.core.protocol.Search.Sort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.SortOrBuilder>( - sort_, - getParentForChildren(), - isClean()); - sort_ = null; + public java.util.List + getBucketOrBuilderList() { + if (bucketBuilder_ != null) { + return bucketBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(bucket_); } - return sortBuilder_; - } - - // optional bool getTotalCount = 8; - private boolean getTotalCount_ ; - public boolean hasGetTotalCount() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - public boolean getGetTotalCount() { - return getTotalCount_; - } - public Builder setGetTotalCount(boolean value) { - bitField0_ |= 0x00000020; - getTotalCount_ = value; - onChanged(); - return this; - } - public Builder clearGetTotalCount() { - bitField0_ = (bitField0_ & ~0x00000020); - getTotalCount_ = false; - onChanged(); - return this; } - - // optional bytes token = 9; - private com.google.protobuf.ByteString token_ = com.google.protobuf.ByteString.EMPTY; - public boolean hasToken() { - return ((bitField0_ & 0x00000040) == 0x00000040); + public com.alicloud.openservices.tablestore.core.protocol.Search.Bucket.Builder addBucketBuilder() { + return getBucketFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.Search.Bucket.getDefaultInstance()); } - public com.google.protobuf.ByteString getToken() { - return token_; + public com.alicloud.openservices.tablestore.core.protocol.Search.Bucket.Builder addBucketBuilder( + int index) { + return getBucketFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.Search.Bucket.getDefaultInstance()); } - public Builder setToken(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000040; - token_ = value; - onChanged(); - return this; + public java.util.List + getBucketBuilderList() { + return getBucketFieldBuilder().getBuilderList(); } - public Builder clearToken() { - bitField0_ = (bitField0_ & ~0x00000040); - token_ = getDefaultInstance().getToken(); - onChanged(); - return this; + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Bucket, com.alicloud.openservices.tablestore.core.protocol.Search.Bucket.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.BucketOrBuilder> + getBucketFieldBuilder() { + if (bucketBuilder_ == null) { + bucketBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Bucket, com.alicloud.openservices.tablestore.core.protocol.Search.Bucket.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.BucketOrBuilder>( + bucket_, + ((bitField0_ & 0x00000004) == 0x00000004), + getParentForChildren(), + isClean()); + bucket_ = null; + } + return bucketBuilder_; } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.SearchQuery) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.TermsAggResult) } static { - defaultInstance = new SearchQuery(true); + defaultInstance = new TermsAggResult(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.SearchQuery) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.TermsAggResult) } - public interface ColumnsToGetOrBuilder + public interface FilterAggResultOrBuilder extends com.google.protobuf.MessageOrBuilder { - // optional .com.alicloud.openservices.tablestore.core.protocol.ColumnReturnType return_type = 1; - boolean hasReturnType(); - com.alicloud.openservices.tablestore.core.protocol.Search.ColumnReturnType getReturnType(); + // optional int64 doc_count = 1; + boolean hasDocCount(); + long getDocCount(); - // repeated string column_names = 2; - java.util.List getColumnNamesList(); - int getColumnNamesCount(); - String getColumnNames(int index); + // optional .com.alicloud.openservices.tablestore.core.protocol.AggResult agg_result = 2; + boolean hasAggResult(); + com.alicloud.openservices.tablestore.core.protocol.Search.AggResult getAggResult(); + com.alicloud.openservices.tablestore.core.protocol.Search.AggResultOrBuilder getAggResultOrBuilder(); } - public static final class ColumnsToGet extends + public static final class FilterAggResult extends com.google.protobuf.GeneratedMessage - implements ColumnsToGetOrBuilder { - // Use ColumnsToGet.newBuilder() to construct. - private ColumnsToGet(Builder builder) { + implements FilterAggResultOrBuilder { + // Use FilterAggResult.newBuilder() to construct. + private FilterAggResult(Builder builder) { super(builder); } - private ColumnsToGet(boolean noInit) {} + private FilterAggResult(boolean noInit) {} - private static final ColumnsToGet defaultInstance; - public static ColumnsToGet getDefaultInstance() { + private static final FilterAggResult defaultInstance; + public static FilterAggResult getDefaultInstance() { return defaultInstance; } - public ColumnsToGet getDefaultInstanceForType() { + public FilterAggResult getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ColumnsToGet_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_FilterAggResult_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ColumnsToGet_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_FilterAggResult_fieldAccessorTable; } private int bitField0_; - // optional .com.alicloud.openservices.tablestore.core.protocol.ColumnReturnType return_type = 1; - public static final int RETURN_TYPE_FIELD_NUMBER = 1; - private com.alicloud.openservices.tablestore.core.protocol.Search.ColumnReturnType returnType_; - public boolean hasReturnType() { + // optional int64 doc_count = 1; + public static final int DOC_COUNT_FIELD_NUMBER = 1; + private long docCount_; + public boolean hasDocCount() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public com.alicloud.openservices.tablestore.core.protocol.Search.ColumnReturnType getReturnType() { - return returnType_; + public long getDocCount() { + return docCount_; } - // repeated string column_names = 2; - public static final int COLUMN_NAMES_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList columnNames_; - public java.util.List - getColumnNamesList() { - return columnNames_; + // optional .com.alicloud.openservices.tablestore.core.protocol.AggResult agg_result = 2; + public static final int AGG_RESULT_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.Search.AggResult aggResult_; + public boolean hasAggResult() { + return ((bitField0_ & 0x00000002) == 0x00000002); } - public int getColumnNamesCount() { - return columnNames_.size(); + public com.alicloud.openservices.tablestore.core.protocol.Search.AggResult getAggResult() { + return aggResult_; } - public String getColumnNames(int index) { - return columnNames_.get(index); + public com.alicloud.openservices.tablestore.core.protocol.Search.AggResultOrBuilder getAggResultOrBuilder() { + return aggResult_; } private void initFields() { - returnType_ = com.alicloud.openservices.tablestore.core.protocol.Search.ColumnReturnType.RETURN_ALL; - columnNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + docCount_ = 0L; + aggResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.AggResult.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -15425,10 +13305,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeEnum(1, returnType_.getNumber()); + output.writeInt64(1, docCount_); } - for (int i = 0; i < columnNames_.size(); i++) { - output.writeBytes(2, columnNames_.getByteString(i)); + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeMessage(2, aggResult_); } getUnknownFields().writeTo(output); } @@ -15441,16 +13321,11 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, returnType_.getNumber()); + .computeInt64Size(1, docCount_); } - { - int dataSize = 0; - for (int i = 0; i < columnNames_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeBytesSizeNoTag(columnNames_.getByteString(i)); - } - size += dataSize; - size += 1 * getColumnNamesList().size(); + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, aggResult_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -15464,41 +13339,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.FilterAggResult parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.FilterAggResult parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.Search.FilterAggResult parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.FilterAggResult parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.FilterAggResult parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.FilterAggResult parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.FilterAggResult parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -15507,7 +13382,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsT return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.FilterAggResult parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -15518,12 +13393,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsT return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.FilterAggResult parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.FilterAggResult parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -15533,7 +13408,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsT public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.FilterAggResult prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -15546,18 +13421,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGetOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.Search.FilterAggResultOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ColumnsToGet_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_FilterAggResult_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ColumnsToGet_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_FilterAggResult_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.FilterAggResult.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -15568,6 +13443,7 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getAggResultFieldBuilder(); } } private static Builder create() { @@ -15576,9 +13452,13 @@ private static Builder create() { public Builder clear() { super.clear(); - returnType_ = com.alicloud.openservices.tablestore.core.protocol.Search.ColumnReturnType.RETURN_ALL; + docCount_ = 0L; bitField0_ = (bitField0_ & ~0x00000001); - columnNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + if (aggResultBuilder_ == null) { + aggResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.AggResult.getDefaultInstance(); + } else { + aggResultBuilder_.clear(); + } bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -15589,24 +13469,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.Search.FilterAggResult.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.Search.FilterAggResult getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.FilterAggResult.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet build() { - com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.Search.FilterAggResult build() { + com.alicloud.openservices.tablestore.core.protocol.Search.FilterAggResult result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.Search.FilterAggResult buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.Search.FilterAggResult result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -15614,48 +13494,43 @@ private com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet b return result; } - public com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet result = new com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet(this); + public com.alicloud.openservices.tablestore.core.protocol.Search.FilterAggResult buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.FilterAggResult result = new com.alicloud.openservices.tablestore.core.protocol.Search.FilterAggResult(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.returnType_ = returnType_; - if (((bitField0_ & 0x00000002) == 0x00000002)) { - columnNames_ = new com.google.protobuf.UnmodifiableLazyStringList( - columnNames_); - bitField0_ = (bitField0_ & ~0x00000002); + result.docCount_ = docCount_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + if (aggResultBuilder_ == null) { + result.aggResult_ = aggResult_; + } else { + result.aggResult_ = aggResultBuilder_.build(); } - result.columnNames_ = columnNames_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.FilterAggResult) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.FilterAggResult)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet.getDefaultInstance()) return this; - if (other.hasReturnType()) { - setReturnType(other.getReturnType()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.FilterAggResult other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.FilterAggResult.getDefaultInstance()) return this; + if (other.hasDocCount()) { + setDocCount(other.getDocCount()); } - if (!other.columnNames_.isEmpty()) { - if (columnNames_.isEmpty()) { - columnNames_ = other.columnNames_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureColumnNamesIsMutable(); - columnNames_.addAll(other.columnNames_); - } - onChanged(); + if (other.hasAggResult()) { + mergeAggResult(other.getAggResult()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -15689,19 +13564,17 @@ public Builder mergeFrom( break; } case 8: { - int rawValue = input.readEnum(); - com.alicloud.openservices.tablestore.core.protocol.Search.ColumnReturnType value = com.alicloud.openservices.tablestore.core.protocol.Search.ColumnReturnType.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(1, rawValue); - } else { - bitField0_ |= 0x00000001; - returnType_ = value; - } + bitField0_ |= 0x00000001; + docCount_ = input.readInt64(); break; } case 18: { - ensureColumnNamesIsMutable(); - columnNames_.add(input.readBytes()); + com.alicloud.openservices.tablestore.core.protocol.Search.AggResult.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.AggResult.newBuilder(); + if (hasAggResult()) { + subBuilder.mergeFrom(getAggResult()); + } + input.readMessage(subBuilder, extensionRegistry); + setAggResult(subBuilder.buildPartial()); break; } } @@ -15710,258 +13583,195 @@ public Builder mergeFrom( private int bitField0_; - // optional .com.alicloud.openservices.tablestore.core.protocol.ColumnReturnType return_type = 1; - private com.alicloud.openservices.tablestore.core.protocol.Search.ColumnReturnType returnType_ = com.alicloud.openservices.tablestore.core.protocol.Search.ColumnReturnType.RETURN_ALL; - public boolean hasReturnType() { + // optional int64 doc_count = 1; + private long docCount_ ; + public boolean hasDocCount() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public com.alicloud.openservices.tablestore.core.protocol.Search.ColumnReturnType getReturnType() { - return returnType_; + public long getDocCount() { + return docCount_; } - public Builder setReturnType(com.alicloud.openservices.tablestore.core.protocol.Search.ColumnReturnType value) { - if (value == null) { - throw new NullPointerException(); - } + public Builder setDocCount(long value) { bitField0_ |= 0x00000001; - returnType_ = value; + docCount_ = value; onChanged(); return this; } - public Builder clearReturnType() { + public Builder clearDocCount() { bitField0_ = (bitField0_ & ~0x00000001); - returnType_ = com.alicloud.openservices.tablestore.core.protocol.Search.ColumnReturnType.RETURN_ALL; + docCount_ = 0L; onChanged(); return this; } - // repeated string column_names = 2; - private com.google.protobuf.LazyStringList columnNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureColumnNamesIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - columnNames_ = new com.google.protobuf.LazyStringArrayList(columnNames_); - bitField0_ |= 0x00000002; - } - } - public java.util.List - getColumnNamesList() { - return java.util.Collections.unmodifiableList(columnNames_); - } - public int getColumnNamesCount() { - return columnNames_.size(); + // optional .com.alicloud.openservices.tablestore.core.protocol.AggResult agg_result = 2; + private com.alicloud.openservices.tablestore.core.protocol.Search.AggResult aggResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.AggResult.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.AggResult, com.alicloud.openservices.tablestore.core.protocol.Search.AggResult.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggResultOrBuilder> aggResultBuilder_; + public boolean hasAggResult() { + return ((bitField0_ & 0x00000002) == 0x00000002); } - public String getColumnNames(int index) { - return columnNames_.get(index); + public com.alicloud.openservices.tablestore.core.protocol.Search.AggResult getAggResult() { + if (aggResultBuilder_ == null) { + return aggResult_; + } else { + return aggResultBuilder_.getMessage(); + } } - public Builder setColumnNames( - int index, String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureColumnNamesIsMutable(); - columnNames_.set(index, value); - onChanged(); + public Builder setAggResult(com.alicloud.openservices.tablestore.core.protocol.Search.AggResult value) { + if (aggResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + aggResult_ = value; + onChanged(); + } else { + aggResultBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; return this; } - public Builder addColumnNames(String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureColumnNamesIsMutable(); - columnNames_.add(value); - onChanged(); + public Builder setAggResult( + com.alicloud.openservices.tablestore.core.protocol.Search.AggResult.Builder builderForValue) { + if (aggResultBuilder_ == null) { + aggResult_ = builderForValue.build(); + onChanged(); + } else { + aggResultBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; return this; } - public Builder addAllColumnNames( - java.lang.Iterable values) { - ensureColumnNamesIsMutable(); - super.addAll(values, columnNames_); - onChanged(); + public Builder mergeAggResult(com.alicloud.openservices.tablestore.core.protocol.Search.AggResult value) { + if (aggResultBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002) && + aggResult_ != com.alicloud.openservices.tablestore.core.protocol.Search.AggResult.getDefaultInstance()) { + aggResult_ = + com.alicloud.openservices.tablestore.core.protocol.Search.AggResult.newBuilder(aggResult_).mergeFrom(value).buildPartial(); + } else { + aggResult_ = value; + } + onChanged(); + } else { + aggResultBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; return this; } - public Builder clearColumnNames() { - columnNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + public Builder clearAggResult() { + if (aggResultBuilder_ == null) { + aggResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.AggResult.getDefaultInstance(); + onChanged(); + } else { + aggResultBuilder_.clear(); + } bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); return this; } - void addColumnNames(com.google.protobuf.ByteString value) { - ensureColumnNamesIsMutable(); - columnNames_.add(value); + public com.alicloud.openservices.tablestore.core.protocol.Search.AggResult.Builder getAggResultBuilder() { + bitField0_ |= 0x00000002; onChanged(); + return getAggResultFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggResultOrBuilder getAggResultOrBuilder() { + if (aggResultBuilder_ != null) { + return aggResultBuilder_.getMessageOrBuilder(); + } else { + return aggResult_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.AggResult, com.alicloud.openservices.tablestore.core.protocol.Search.AggResult.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggResultOrBuilder> + getAggResultFieldBuilder() { + if (aggResultBuilder_ == null) { + aggResultBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.AggResult, com.alicloud.openservices.tablestore.core.protocol.Search.AggResult.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggResultOrBuilder>( + aggResult_, + getParentForChildren(), + isClean()); + aggResult_ = null; + } + return aggResultBuilder_; } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.ColumnsToGet) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.FilterAggResult) } static { - defaultInstance = new ColumnsToGet(true); + defaultInstance = new FilterAggResult(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.ColumnsToGet) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.FilterAggResult) } - public interface SearchRequestOrBuilder + public interface NestedAggResultOrBuilder extends com.google.protobuf.MessageOrBuilder { - // optional string table_name = 1; - boolean hasTableName(); - String getTableName(); - - // optional string index_name = 2; - boolean hasIndexName(); - String getIndexName(); - - // optional .com.alicloud.openservices.tablestore.core.protocol.ColumnsToGet columns_to_get = 3; - boolean hasColumnsToGet(); - com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet getColumnsToGet(); - com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGetOrBuilder getColumnsToGetOrBuilder(); - - // optional bytes search_query = 4; - boolean hasSearchQuery(); - com.google.protobuf.ByteString getSearchQuery(); + // optional int64 doc_count = 1; + boolean hasDocCount(); + long getDocCount(); - // repeated bytes routing_values = 5; - java.util.List getRoutingValuesList(); - int getRoutingValuesCount(); - com.google.protobuf.ByteString getRoutingValues(int index); + // optional .com.alicloud.openservices.tablestore.core.protocol.AggResult agg_result = 2; + boolean hasAggResult(); + com.alicloud.openservices.tablestore.core.protocol.Search.AggResult getAggResult(); + com.alicloud.openservices.tablestore.core.protocol.Search.AggResultOrBuilder getAggResultOrBuilder(); } - public static final class SearchRequest extends + public static final class NestedAggResult extends com.google.protobuf.GeneratedMessage - implements SearchRequestOrBuilder { - // Use SearchRequest.newBuilder() to construct. - private SearchRequest(Builder builder) { + implements NestedAggResultOrBuilder { + // Use NestedAggResult.newBuilder() to construct. + private NestedAggResult(Builder builder) { super(builder); } - private SearchRequest(boolean noInit) {} + private NestedAggResult(boolean noInit) {} - private static final SearchRequest defaultInstance; - public static SearchRequest getDefaultInstance() { + private static final NestedAggResult defaultInstance; + public static NestedAggResult getDefaultInstance() { return defaultInstance; } - public SearchRequest getDefaultInstanceForType() { + public NestedAggResult getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SearchRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_NestedAggResult_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SearchRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_NestedAggResult_fieldAccessorTable; } private int bitField0_; - // optional string table_name = 1; - public static final int TABLE_NAME_FIELD_NUMBER = 1; - private java.lang.Object tableName_; - public boolean hasTableName() { + // optional int64 doc_count = 1; + public static final int DOC_COUNT_FIELD_NUMBER = 1; + private long docCount_; + public boolean hasDocCount() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getTableName() { - java.lang.Object ref = tableName_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - tableName_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getTableNameBytes() { - java.lang.Object ref = tableName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - tableName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public long getDocCount() { + return docCount_; } - // optional string index_name = 2; - public static final int INDEX_NAME_FIELD_NUMBER = 2; - private java.lang.Object indexName_; - public boolean hasIndexName() { + // optional .com.alicloud.openservices.tablestore.core.protocol.AggResult agg_result = 2; + public static final int AGG_RESULT_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.Search.AggResult aggResult_; + public boolean hasAggResult() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public String getIndexName() { - java.lang.Object ref = indexName_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - indexName_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getIndexNameBytes() { - java.lang.Object ref = indexName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - indexName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.ColumnsToGet columns_to_get = 3; - public static final int COLUMNS_TO_GET_FIELD_NUMBER = 3; - private com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet columnsToGet_; - public boolean hasColumnsToGet() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet getColumnsToGet() { - return columnsToGet_; - } - public com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGetOrBuilder getColumnsToGetOrBuilder() { - return columnsToGet_; - } - - // optional bytes search_query = 4; - public static final int SEARCH_QUERY_FIELD_NUMBER = 4; - private com.google.protobuf.ByteString searchQuery_; - public boolean hasSearchQuery() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public com.google.protobuf.ByteString getSearchQuery() { - return searchQuery_; - } - - // repeated bytes routing_values = 5; - public static final int ROUTING_VALUES_FIELD_NUMBER = 5; - private java.util.List routingValues_; - public java.util.List - getRoutingValuesList() { - return routingValues_; - } - public int getRoutingValuesCount() { - return routingValues_.size(); + public com.alicloud.openservices.tablestore.core.protocol.Search.AggResult getAggResult() { + return aggResult_; } - public com.google.protobuf.ByteString getRoutingValues(int index) { - return routingValues_.get(index); + public com.alicloud.openservices.tablestore.core.protocol.Search.AggResultOrBuilder getAggResultOrBuilder() { + return aggResult_; } private void initFields() { - tableName_ = ""; - indexName_ = ""; - columnsToGet_ = com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet.getDefaultInstance(); - searchQuery_ = com.google.protobuf.ByteString.EMPTY; - routingValues_ = java.util.Collections.emptyList();; + docCount_ = 0L; + aggResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.AggResult.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -15976,19 +13786,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getTableNameBytes()); + output.writeInt64(1, docCount_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getIndexNameBytes()); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeMessage(3, columnsToGet_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeBytes(4, searchQuery_); - } - for (int i = 0; i < routingValues_.size(); i++) { - output.writeBytes(5, routingValues_.get(i)); + output.writeMessage(2, aggResult_); } getUnknownFields().writeTo(output); } @@ -16001,28 +13802,11 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getTableNameBytes()); + .computeInt64Size(1, docCount_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getIndexNameBytes()); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, columnsToGet_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(4, searchQuery_); - } - { - int dataSize = 0; - for (int i = 0; i < routingValues_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeBytesSizeNoTag(routingValues_.get(i)); - } - size += dataSize; - size += 1 * getRoutingValuesList().size(); + .computeMessageSize(2, aggResult_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -16036,41 +13820,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedAggResult parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedAggResult parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedAggResult parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedAggResult parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedAggResult parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedAggResult parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedAggResult parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -16079,7 +13863,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchRe return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedAggResult parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -16090,12 +13874,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchRe return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedAggResult parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedAggResult parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -16105,7 +13889,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchRe public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.NestedAggResult prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -16118,18 +13902,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequestOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.Search.NestedAggResultOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SearchRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_NestedAggResult_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SearchRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_NestedAggResult_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.NestedAggResult.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -16140,7 +13924,7 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getColumnsToGetFieldBuilder(); + getAggResultFieldBuilder(); } } private static Builder create() { @@ -16149,20 +13933,14 @@ private static Builder create() { public Builder clear() { super.clear(); - tableName_ = ""; + docCount_ = 0L; bitField0_ = (bitField0_ & ~0x00000001); - indexName_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); - if (columnsToGetBuilder_ == null) { - columnsToGet_ = com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet.getDefaultInstance(); + if (aggResultBuilder_ == null) { + aggResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.AggResult.getDefaultInstance(); } else { - columnsToGetBuilder_.clear(); + aggResultBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000004); - searchQuery_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000008); - routingValues_ = java.util.Collections.emptyList();; - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -16172,24 +13950,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.Search.NestedAggResult.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.Search.NestedAggResult getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.NestedAggResult.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest build() { - com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.Search.NestedAggResult build() { + com.alicloud.openservices.tablestore.core.protocol.Search.NestedAggResult result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.Search.NestedAggResult buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.Search.NestedAggResult result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -16197,72 +13975,43 @@ private com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest return result; } - public com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest result = new com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest(this); + public com.alicloud.openservices.tablestore.core.protocol.Search.NestedAggResult buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.NestedAggResult result = new com.alicloud.openservices.tablestore.core.protocol.Search.NestedAggResult(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.tableName_ = tableName_; + result.docCount_ = docCount_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - result.indexName_ = indexName_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - if (columnsToGetBuilder_ == null) { - result.columnsToGet_ = columnsToGet_; + if (aggResultBuilder_ == null) { + result.aggResult_ = aggResult_; } else { - result.columnsToGet_ = columnsToGetBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - result.searchQuery_ = searchQuery_; - if (((bitField0_ & 0x00000010) == 0x00000010)) { - routingValues_ = java.util.Collections.unmodifiableList(routingValues_); - bitField0_ = (bitField0_ & ~0x00000010); + result.aggResult_ = aggResultBuilder_.build(); } - result.routingValues_ = routingValues_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.NestedAggResult) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.NestedAggResult)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest.getDefaultInstance()) return this; - if (other.hasTableName()) { - setTableName(other.getTableName()); - } - if (other.hasIndexName()) { - setIndexName(other.getIndexName()); - } - if (other.hasColumnsToGet()) { - mergeColumnsToGet(other.getColumnsToGet()); - } - if (other.hasSearchQuery()) { - setSearchQuery(other.getSearchQuery()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.NestedAggResult other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.NestedAggResult.getDefaultInstance()) return this; + if (other.hasDocCount()) { + setDocCount(other.getDocCount()); } - if (!other.routingValues_.isEmpty()) { - if (routingValues_.isEmpty()) { - routingValues_ = other.routingValues_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureRoutingValuesIsMutable(); - routingValues_.addAll(other.routingValues_); - } - onChanged(); + if (other.hasAggResult()) { + mergeAggResult(other.getAggResult()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -16295,33 +14044,18 @@ public Builder mergeFrom( } break; } - case 10: { + case 8: { bitField0_ |= 0x00000001; - tableName_ = input.readBytes(); + docCount_ = input.readInt64(); break; } case 18: { - bitField0_ |= 0x00000002; - indexName_ = input.readBytes(); - break; - } - case 26: { - com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet.newBuilder(); - if (hasColumnsToGet()) { - subBuilder.mergeFrom(getColumnsToGet()); + com.alicloud.openservices.tablestore.core.protocol.Search.AggResult.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.AggResult.newBuilder(); + if (hasAggResult()) { + subBuilder.mergeFrom(getAggResult()); } input.readMessage(subBuilder, extensionRegistry); - setColumnsToGet(subBuilder.buildPartial()); - break; - } - case 34: { - bitField0_ |= 0x00000008; - searchQuery_ = input.readBytes(); - break; - } - case 42: { - ensureRoutingValuesIsMutable(); - routingValues_.add(input.readBytes()); + setAggResult(subBuilder.buildPartial()); break; } } @@ -16330,352 +14064,191 @@ public Builder mergeFrom( private int bitField0_; - // optional string table_name = 1; - private java.lang.Object tableName_ = ""; - public boolean hasTableName() { + // optional int64 doc_count = 1; + private long docCount_ ; + public boolean hasDocCount() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getTableName() { - java.lang.Object ref = tableName_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - tableName_ = s; - return s; - } else { - return (String) ref; - } - } - public Builder setTableName(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - tableName_ = value; - onChanged(); - return this; - } - public Builder clearTableName() { - bitField0_ = (bitField0_ & ~0x00000001); - tableName_ = getDefaultInstance().getTableName(); - onChanged(); - return this; + public long getDocCount() { + return docCount_; } - void setTableName(com.google.protobuf.ByteString value) { + public Builder setDocCount(long value) { bitField0_ |= 0x00000001; - tableName_ = value; - onChanged(); - } - - // optional string index_name = 2; - private java.lang.Object indexName_ = ""; - public boolean hasIndexName() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public String getIndexName() { - java.lang.Object ref = indexName_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - indexName_ = s; - return s; - } else { - return (String) ref; - } - } - public Builder setIndexName(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - indexName_ = value; + docCount_ = value; onChanged(); return this; } - public Builder clearIndexName() { - bitField0_ = (bitField0_ & ~0x00000002); - indexName_ = getDefaultInstance().getIndexName(); + public Builder clearDocCount() { + bitField0_ = (bitField0_ & ~0x00000001); + docCount_ = 0L; onChanged(); return this; } - void setIndexName(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000002; - indexName_ = value; - onChanged(); - } - // optional .com.alicloud.openservices.tablestore.core.protocol.ColumnsToGet columns_to_get = 3; - private com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet columnsToGet_ = com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet.getDefaultInstance(); + // optional .com.alicloud.openservices.tablestore.core.protocol.AggResult agg_result = 2; + private com.alicloud.openservices.tablestore.core.protocol.Search.AggResult aggResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.AggResult.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet, com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGetOrBuilder> columnsToGetBuilder_; - public boolean hasColumnsToGet() { - return ((bitField0_ & 0x00000004) == 0x00000004); + com.alicloud.openservices.tablestore.core.protocol.Search.AggResult, com.alicloud.openservices.tablestore.core.protocol.Search.AggResult.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggResultOrBuilder> aggResultBuilder_; + public boolean hasAggResult() { + return ((bitField0_ & 0x00000002) == 0x00000002); } - public com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet getColumnsToGet() { - if (columnsToGetBuilder_ == null) { - return columnsToGet_; + public com.alicloud.openservices.tablestore.core.protocol.Search.AggResult getAggResult() { + if (aggResultBuilder_ == null) { + return aggResult_; } else { - return columnsToGetBuilder_.getMessage(); + return aggResultBuilder_.getMessage(); } } - public Builder setColumnsToGet(com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet value) { - if (columnsToGetBuilder_ == null) { + public Builder setAggResult(com.alicloud.openservices.tablestore.core.protocol.Search.AggResult value) { + if (aggResultBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - columnsToGet_ = value; + aggResult_ = value; onChanged(); } else { - columnsToGetBuilder_.setMessage(value); + aggResultBuilder_.setMessage(value); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; return this; } - public Builder setColumnsToGet( - com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet.Builder builderForValue) { - if (columnsToGetBuilder_ == null) { - columnsToGet_ = builderForValue.build(); + public Builder setAggResult( + com.alicloud.openservices.tablestore.core.protocol.Search.AggResult.Builder builderForValue) { + if (aggResultBuilder_ == null) { + aggResult_ = builderForValue.build(); onChanged(); } else { - columnsToGetBuilder_.setMessage(builderForValue.build()); + aggResultBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; return this; } - public Builder mergeColumnsToGet(com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet value) { - if (columnsToGetBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004) && - columnsToGet_ != com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet.getDefaultInstance()) { - columnsToGet_ = - com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet.newBuilder(columnsToGet_).mergeFrom(value).buildPartial(); + public Builder mergeAggResult(com.alicloud.openservices.tablestore.core.protocol.Search.AggResult value) { + if (aggResultBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002) && + aggResult_ != com.alicloud.openservices.tablestore.core.protocol.Search.AggResult.getDefaultInstance()) { + aggResult_ = + com.alicloud.openservices.tablestore.core.protocol.Search.AggResult.newBuilder(aggResult_).mergeFrom(value).buildPartial(); } else { - columnsToGet_ = value; + aggResult_ = value; } onChanged(); } else { - columnsToGetBuilder_.mergeFrom(value); + aggResultBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; return this; } - public Builder clearColumnsToGet() { - if (columnsToGetBuilder_ == null) { - columnsToGet_ = com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet.getDefaultInstance(); + public Builder clearAggResult() { + if (aggResultBuilder_ == null) { + aggResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.AggResult.getDefaultInstance(); onChanged(); } else { - columnsToGetBuilder_.clear(); + aggResultBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000002); return this; } - public com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet.Builder getColumnsToGetBuilder() { - bitField0_ |= 0x00000004; + public com.alicloud.openservices.tablestore.core.protocol.Search.AggResult.Builder getAggResultBuilder() { + bitField0_ |= 0x00000002; onChanged(); - return getColumnsToGetFieldBuilder().getBuilder(); + return getAggResultFieldBuilder().getBuilder(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGetOrBuilder getColumnsToGetOrBuilder() { - if (columnsToGetBuilder_ != null) { - return columnsToGetBuilder_.getMessageOrBuilder(); + public com.alicloud.openservices.tablestore.core.protocol.Search.AggResultOrBuilder getAggResultOrBuilder() { + if (aggResultBuilder_ != null) { + return aggResultBuilder_.getMessageOrBuilder(); } else { - return columnsToGet_; + return aggResult_; } } private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet, com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGetOrBuilder> - getColumnsToGetFieldBuilder() { - if (columnsToGetBuilder_ == null) { - columnsToGetBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet, com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGetOrBuilder>( - columnsToGet_, + com.alicloud.openservices.tablestore.core.protocol.Search.AggResult, com.alicloud.openservices.tablestore.core.protocol.Search.AggResult.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggResultOrBuilder> + getAggResultFieldBuilder() { + if (aggResultBuilder_ == null) { + aggResultBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.AggResult, com.alicloud.openservices.tablestore.core.protocol.Search.AggResult.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggResultOrBuilder>( + aggResult_, getParentForChildren(), isClean()); - columnsToGet_ = null; + aggResult_ = null; } - return columnsToGetBuilder_; - } - - // optional bytes search_query = 4; - private com.google.protobuf.ByteString searchQuery_ = com.google.protobuf.ByteString.EMPTY; - public boolean hasSearchQuery() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public com.google.protobuf.ByteString getSearchQuery() { - return searchQuery_; - } - public Builder setSearchQuery(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - searchQuery_ = value; - onChanged(); - return this; - } - public Builder clearSearchQuery() { - bitField0_ = (bitField0_ & ~0x00000008); - searchQuery_ = getDefaultInstance().getSearchQuery(); - onChanged(); - return this; - } - - // repeated bytes routing_values = 5; - private java.util.List routingValues_ = java.util.Collections.emptyList();; - private void ensureRoutingValuesIsMutable() { - if (!((bitField0_ & 0x00000010) == 0x00000010)) { - routingValues_ = new java.util.ArrayList(routingValues_); - bitField0_ |= 0x00000010; - } - } - public java.util.List - getRoutingValuesList() { - return java.util.Collections.unmodifiableList(routingValues_); - } - public int getRoutingValuesCount() { - return routingValues_.size(); - } - public com.google.protobuf.ByteString getRoutingValues(int index) { - return routingValues_.get(index); - } - public Builder setRoutingValues( - int index, com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRoutingValuesIsMutable(); - routingValues_.set(index, value); - onChanged(); - return this; - } - public Builder addRoutingValues(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRoutingValuesIsMutable(); - routingValues_.add(value); - onChanged(); - return this; - } - public Builder addAllRoutingValues( - java.lang.Iterable values) { - ensureRoutingValuesIsMutable(); - super.addAll(values, routingValues_); - onChanged(); - return this; - } - public Builder clearRoutingValues() { - routingValues_ = java.util.Collections.emptyList();; - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; + return aggResultBuilder_; } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.SearchRequest) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.NestedAggResult) } static { - defaultInstance = new SearchRequest(true); + defaultInstance = new NestedAggResult(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.SearchRequest) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.NestedAggResult) } - public interface SearchResponseOrBuilder + public interface GeoPointOrBuilder extends com.google.protobuf.MessageOrBuilder { - // optional int64 total_hits = 1; - boolean hasTotalHits(); - long getTotalHits(); - - // repeated bytes rows = 2; - java.util.List getRowsList(); - int getRowsCount(); - com.google.protobuf.ByteString getRows(int index); - - // optional bool is_all_succeeded = 3; - boolean hasIsAllSucceeded(); - boolean getIsAllSucceeded(); + // optional double lat = 1; + boolean hasLat(); + double getLat(); - // optional bytes next_token = 6; - boolean hasNextToken(); - com.google.protobuf.ByteString getNextToken(); + // optional double lon = 2; + boolean hasLon(); + double getLon(); } - public static final class SearchResponse extends + public static final class GeoPoint extends com.google.protobuf.GeneratedMessage - implements SearchResponseOrBuilder { - // Use SearchResponse.newBuilder() to construct. - private SearchResponse(Builder builder) { + implements GeoPointOrBuilder { + // Use GeoPoint.newBuilder() to construct. + private GeoPoint(Builder builder) { super(builder); } - private SearchResponse(boolean noInit) {} + private GeoPoint(boolean noInit) {} - private static final SearchResponse defaultInstance; - public static SearchResponse getDefaultInstance() { + private static final GeoPoint defaultInstance; + public static GeoPoint getDefaultInstance() { return defaultInstance; } - public SearchResponse getDefaultInstanceForType() { + public GeoPoint getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SearchResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoPoint_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SearchResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoPoint_fieldAccessorTable; } private int bitField0_; - // optional int64 total_hits = 1; - public static final int TOTAL_HITS_FIELD_NUMBER = 1; - private long totalHits_; - public boolean hasTotalHits() { + // optional double lat = 1; + public static final int LAT_FIELD_NUMBER = 1; + private double lat_; + public boolean hasLat() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public long getTotalHits() { - return totalHits_; - } - - // repeated bytes rows = 2; - public static final int ROWS_FIELD_NUMBER = 2; - private java.util.List rows_; - public java.util.List - getRowsList() { - return rows_; - } - public int getRowsCount() { - return rows_.size(); - } - public com.google.protobuf.ByteString getRows(int index) { - return rows_.get(index); + public double getLat() { + return lat_; } - // optional bool is_all_succeeded = 3; - public static final int IS_ALL_SUCCEEDED_FIELD_NUMBER = 3; - private boolean isAllSucceeded_; - public boolean hasIsAllSucceeded() { + // optional double lon = 2; + public static final int LON_FIELD_NUMBER = 2; + private double lon_; + public boolean hasLon() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public boolean getIsAllSucceeded() { - return isAllSucceeded_; - } - - // optional bytes next_token = 6; - public static final int NEXT_TOKEN_FIELD_NUMBER = 6; - private com.google.protobuf.ByteString nextToken_; - public boolean hasNextToken() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public com.google.protobuf.ByteString getNextToken() { - return nextToken_; + public double getLon() { + return lon_; } private void initFields() { - totalHits_ = 0L; - rows_ = java.util.Collections.emptyList();; - isAllSucceeded_ = false; - nextToken_ = com.google.protobuf.ByteString.EMPTY; + lat_ = 0D; + lon_ = 0D; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -16690,16 +14263,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeInt64(1, totalHits_); - } - for (int i = 0; i < rows_.size(); i++) { - output.writeBytes(2, rows_.get(i)); + output.writeDouble(1, lat_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBool(3, isAllSucceeded_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeBytes(6, nextToken_); + output.writeDouble(2, lon_); } getUnknownFields().writeTo(output); } @@ -16712,24 +14279,11 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, totalHits_); - } - { - int dataSize = 0; - for (int i = 0; i < rows_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeBytesSizeNoTag(rows_.get(i)); - } - size += dataSize; - size += 1 * getRowsList().size(); + .computeDoubleSize(1, lat_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeBoolSize(3, isAllSucceeded_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(6, nextToken_); + .computeDoubleSize(2, lon_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -16743,41 +14297,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -16786,7 +14340,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchRe return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -16797,12 +14351,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchRe return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -16812,7 +14366,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchRe public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -16825,18 +14379,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponseOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.Search.GeoPointOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SearchResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoPoint_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SearchResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoPoint_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -16855,14 +14409,10 @@ private static Builder create() { public Builder clear() { super.clear(); - totalHits_ = 0L; + lat_ = 0D; bitField0_ = (bitField0_ & ~0x00000001); - rows_ = java.util.Collections.emptyList();; + lon_ = 0D; bitField0_ = (bitField0_ & ~0x00000002); - isAllSucceeded_ = false; - bitField0_ = (bitField0_ & ~0x00000004); - nextToken_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -16872,24 +14422,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse build() { - com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint build() { + com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -16897,61 +14447,39 @@ private com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse return result; } - public com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse result = new com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse(this); + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint result = new com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.totalHits_ = totalHits_; - if (((bitField0_ & 0x00000002) == 0x00000002)) { - rows_ = java.util.Collections.unmodifiableList(rows_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.rows_ = rows_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + result.lat_ = lat_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - result.isAllSucceeded_ = isAllSucceeded_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000004; - } - result.nextToken_ = nextToken_; + result.lon_ = lon_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse.getDefaultInstance()) return this; - if (other.hasTotalHits()) { - setTotalHits(other.getTotalHits()); - } - if (!other.rows_.isEmpty()) { - if (rows_.isEmpty()) { - rows_ = other.rows_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureRowsIsMutable(); - rows_.addAll(other.rows_); - } - onChanged(); - } - if (other.hasIsAllSucceeded()) { - setIsAllSucceeded(other.getIsAllSucceeded()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint.getDefaultInstance()) return this; + if (other.hasLat()) { + setLat(other.getLat()); } - if (other.hasNextToken()) { - setNextToken(other.getNextToken()); + if (other.hasLon()) { + setLon(other.getLon()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -16984,24 +14512,14 @@ public Builder mergeFrom( } break; } - case 8: { + case 9: { bitField0_ |= 0x00000001; - totalHits_ = input.readInt64(); + lat_ = input.readDouble(); break; } - case 18: { - ensureRowsIsMutable(); - rows_.add(input.readBytes()); - break; - } - case 24: { - bitField0_ |= 0x00000004; - isAllSucceeded_ = input.readBool(); - break; - } - case 50: { - bitField0_ |= 0x00000008; - nextToken_ = input.readBytes(); + case 17: { + bitField0_ |= 0x00000002; + lon_ = input.readDouble(); break; } } @@ -17010,363 +14528,130 @@ public Builder mergeFrom( private int bitField0_; - // optional int64 total_hits = 1; - private long totalHits_ ; - public boolean hasTotalHits() { + // optional double lat = 1; + private double lat_ ; + public boolean hasLat() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public long getTotalHits() { - return totalHits_; + public double getLat() { + return lat_; } - public Builder setTotalHits(long value) { + public Builder setLat(double value) { bitField0_ |= 0x00000001; - totalHits_ = value; + lat_ = value; onChanged(); return this; } - public Builder clearTotalHits() { + public Builder clearLat() { bitField0_ = (bitField0_ & ~0x00000001); - totalHits_ = 0L; + lat_ = 0D; onChanged(); return this; } - // repeated bytes rows = 2; - private java.util.List rows_ = java.util.Collections.emptyList();; - private void ensureRowsIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - rows_ = new java.util.ArrayList(rows_); - bitField0_ |= 0x00000002; - } - } - public java.util.List - getRowsList() { - return java.util.Collections.unmodifiableList(rows_); - } - public int getRowsCount() { - return rows_.size(); - } - public com.google.protobuf.ByteString getRows(int index) { - return rows_.get(index); - } - public Builder setRows( - int index, com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRowsIsMutable(); - rows_.set(index, value); - onChanged(); - return this; + // optional double lon = 2; + private double lon_ ; + public boolean hasLon() { + return ((bitField0_ & 0x00000002) == 0x00000002); } - public Builder addRows(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRowsIsMutable(); - rows_.add(value); - onChanged(); - return this; + public double getLon() { + return lon_; } - public Builder addAllRows( - java.lang.Iterable values) { - ensureRowsIsMutable(); - super.addAll(values, rows_); + public Builder setLon(double value) { + bitField0_ |= 0x00000002; + lon_ = value; onChanged(); return this; } - public Builder clearRows() { - rows_ = java.util.Collections.emptyList();; + public Builder clearLon() { bitField0_ = (bitField0_ & ~0x00000002); + lon_ = 0D; onChanged(); return this; } - // optional bool is_all_succeeded = 3; - private boolean isAllSucceeded_ ; - public boolean hasIsAllSucceeded() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public boolean getIsAllSucceeded() { - return isAllSucceeded_; - } - public Builder setIsAllSucceeded(boolean value) { - bitField0_ |= 0x00000004; - isAllSucceeded_ = value; - onChanged(); - return this; - } - public Builder clearIsAllSucceeded() { - bitField0_ = (bitField0_ & ~0x00000004); - isAllSucceeded_ = false; - onChanged(); - return this; - } - - // optional bytes next_token = 6; - private com.google.protobuf.ByteString nextToken_ = com.google.protobuf.ByteString.EMPTY; - public boolean hasNextToken() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public com.google.protobuf.ByteString getNextToken() { - return nextToken_; - } - public Builder setNextToken(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - nextToken_ = value; - onChanged(); - return this; - } - public Builder clearNextToken() { - bitField0_ = (bitField0_ & ~0x00000008); - nextToken_ = getDefaultInstance().getNextToken(); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.SearchResponse) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GeoPoint) } static { - defaultInstance = new SearchResponse(true); + defaultInstance = new GeoPoint(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.SearchResponse) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GeoPoint) } - public interface FieldSchemaOrBuilder + public interface GeoBoundsAggResultOrBuilder extends com.google.protobuf.MessageOrBuilder { - // optional string field_name = 1; - boolean hasFieldName(); - String getFieldName(); - - // optional .com.alicloud.openservices.tablestore.core.protocol.FieldType field_type = 2; - boolean hasFieldType(); - com.alicloud.openservices.tablestore.core.protocol.Search.FieldType getFieldType(); - - // optional .com.alicloud.openservices.tablestore.core.protocol.IndexOptions index_options = 3; - boolean hasIndexOptions(); - com.alicloud.openservices.tablestore.core.protocol.Search.IndexOptions getIndexOptions(); - - // optional string analyzer = 4; - boolean hasAnalyzer(); - String getAnalyzer(); - - // optional bool index = 5; - boolean hasIndex(); - boolean getIndex(); - - // optional bool doc_values = 6; - boolean hasDocValues(); - boolean getDocValues(); - - // optional bool store = 7; - boolean hasStore(); - boolean getStore(); - - // repeated .com.alicloud.openservices.tablestore.core.protocol.FieldSchema field_schemas = 8; - java.util.List - getFieldSchemasList(); - com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema getFieldSchemas(int index); - int getFieldSchemasCount(); - java.util.List - getFieldSchemasOrBuilderList(); - com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchemaOrBuilder getFieldSchemasOrBuilder( - int index); + // optional .com.alicloud.openservices.tablestore.core.protocol.GeoPoint top_left = 1; + boolean hasTopLeft(); + com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint getTopLeft(); + com.alicloud.openservices.tablestore.core.protocol.Search.GeoPointOrBuilder getTopLeftOrBuilder(); - // optional bool is_array = 9; - boolean hasIsArray(); - boolean getIsArray(); + // optional .com.alicloud.openservices.tablestore.core.protocol.GeoPoint bottom_right = 2; + boolean hasBottomRight(); + com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint getBottomRight(); + com.alicloud.openservices.tablestore.core.protocol.Search.GeoPointOrBuilder getBottomRightOrBuilder(); } - public static final class FieldSchema extends + public static final class GeoBoundsAggResult extends com.google.protobuf.GeneratedMessage - implements FieldSchemaOrBuilder { - // Use FieldSchema.newBuilder() to construct. - private FieldSchema(Builder builder) { + implements GeoBoundsAggResultOrBuilder { + // Use GeoBoundsAggResult.newBuilder() to construct. + private GeoBoundsAggResult(Builder builder) { super(builder); } - private FieldSchema(boolean noInit) {} + private GeoBoundsAggResult(boolean noInit) {} - private static final FieldSchema defaultInstance; - public static FieldSchema getDefaultInstance() { + private static final GeoBoundsAggResult defaultInstance; + public static GeoBoundsAggResult getDefaultInstance() { return defaultInstance; } - public FieldSchema getDefaultInstanceForType() { + public GeoBoundsAggResult getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_FieldSchema_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoBoundsAggResult_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_FieldSchema_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoBoundsAggResult_fieldAccessorTable; } private int bitField0_; - // optional string field_name = 1; - public static final int FIELD_NAME_FIELD_NUMBER = 1; - private java.lang.Object fieldName_; - public boolean hasFieldName() { + // optional .com.alicloud.openservices.tablestore.core.protocol.GeoPoint top_left = 1; + public static final int TOP_LEFT_FIELD_NUMBER = 1; + private com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint topLeft_; + public boolean hasTopLeft() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getFieldName() { - java.lang.Object ref = fieldName_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - fieldName_ = s; - } - return s; - } + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint getTopLeft() { + return topLeft_; } - private com.google.protobuf.ByteString getFieldNameBytes() { - java.lang.Object ref = fieldName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - fieldName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoPointOrBuilder getTopLeftOrBuilder() { + return topLeft_; } - // optional .com.alicloud.openservices.tablestore.core.protocol.FieldType field_type = 2; - public static final int FIELD_TYPE_FIELD_NUMBER = 2; - private com.alicloud.openservices.tablestore.core.protocol.Search.FieldType fieldType_; - public boolean hasFieldType() { + // optional .com.alicloud.openservices.tablestore.core.protocol.GeoPoint bottom_right = 2; + public static final int BOTTOM_RIGHT_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint bottomRight_; + public boolean hasBottomRight() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public com.alicloud.openservices.tablestore.core.protocol.Search.FieldType getFieldType() { - return fieldType_; - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.IndexOptions index_options = 3; - public static final int INDEX_OPTIONS_FIELD_NUMBER = 3; - private com.alicloud.openservices.tablestore.core.protocol.Search.IndexOptions indexOptions_; - public boolean hasIndexOptions() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.IndexOptions getIndexOptions() { - return indexOptions_; - } - - // optional string analyzer = 4; - public static final int ANALYZER_FIELD_NUMBER = 4; - private java.lang.Object analyzer_; - public boolean hasAnalyzer() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public String getAnalyzer() { - java.lang.Object ref = analyzer_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - analyzer_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getAnalyzerBytes() { - java.lang.Object ref = analyzer_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - analyzer_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // optional bool index = 5; - public static final int INDEX_FIELD_NUMBER = 5; - private boolean index_; - public boolean hasIndex() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - public boolean getIndex() { - return index_; - } - - // optional bool doc_values = 6; - public static final int DOC_VALUES_FIELD_NUMBER = 6; - private boolean docValues_; - public boolean hasDocValues() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - public boolean getDocValues() { - return docValues_; - } - - // optional bool store = 7; - public static final int STORE_FIELD_NUMBER = 7; - private boolean store_; - public boolean hasStore() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - public boolean getStore() { - return store_; - } - - // repeated .com.alicloud.openservices.tablestore.core.protocol.FieldSchema field_schemas = 8; - public static final int FIELD_SCHEMAS_FIELD_NUMBER = 8; - private java.util.List fieldSchemas_; - public java.util.List getFieldSchemasList() { - return fieldSchemas_; - } - public java.util.List - getFieldSchemasOrBuilderList() { - return fieldSchemas_; - } - public int getFieldSchemasCount() { - return fieldSchemas_.size(); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema getFieldSchemas(int index) { - return fieldSchemas_.get(index); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchemaOrBuilder getFieldSchemasOrBuilder( - int index) { - return fieldSchemas_.get(index); - } - - // optional bool is_array = 9; - public static final int IS_ARRAY_FIELD_NUMBER = 9; - private boolean isArray_; - public boolean hasIsArray() { - return ((bitField0_ & 0x00000080) == 0x00000080); + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint getBottomRight() { + return bottomRight_; } - public boolean getIsArray() { - return isArray_; + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoPointOrBuilder getBottomRightOrBuilder() { + return bottomRight_; } private void initFields() { - fieldName_ = ""; - fieldType_ = com.alicloud.openservices.tablestore.core.protocol.Search.FieldType.LONG; - indexOptions_ = com.alicloud.openservices.tablestore.core.protocol.Search.IndexOptions.DOCS; - analyzer_ = ""; - index_ = false; - docValues_ = false; - store_ = false; - fieldSchemas_ = java.util.Collections.emptyList(); - isArray_ = false; + topLeft_ = com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint.getDefaultInstance(); + bottomRight_ = com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -17381,31 +14666,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getFieldNameBytes()); + output.writeMessage(1, topLeft_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeEnum(2, fieldType_.getNumber()); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeEnum(3, indexOptions_.getNumber()); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeBytes(4, getAnalyzerBytes()); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeBool(5, index_); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - output.writeBool(6, docValues_); - } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - output.writeBool(7, store_); - } - for (int i = 0; i < fieldSchemas_.size(); i++) { - output.writeMessage(8, fieldSchemas_.get(i)); - } - if (((bitField0_ & 0x00000080) == 0x00000080)) { - output.writeBool(9, isArray_); + output.writeMessage(2, bottomRight_); } getUnknownFields().writeTo(output); } @@ -17418,39 +14682,11 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getFieldNameBytes()); + .computeMessageSize(1, topLeft_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, fieldType_.getNumber()); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(3, indexOptions_.getNumber()); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(4, getAnalyzerBytes()); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(5, index_); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(6, docValues_); - } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(7, store_); - } - for (int i = 0; i < fieldSchemas_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, fieldSchemas_.get(i)); - } - if (((bitField0_ & 0x00000080) == 0x00000080)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(9, isArray_); + .computeMessageSize(2, bottomRight_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -17464,41 +14700,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAggResult parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAggResult parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAggResult parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAggResult parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAggResult parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAggResult parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAggResult parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -17507,7 +14743,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldSch return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAggResult parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -17518,12 +14754,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldSch return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAggResult parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAggResult parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -17533,7 +14769,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldSch public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAggResult prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -17546,18 +14782,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchemaOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAggResultOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_FieldSchema_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoBoundsAggResult_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_FieldSchema_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoBoundsAggResult_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAggResult.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -17568,7 +14804,8 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getFieldSchemasFieldBuilder(); + getTopLeftFieldBuilder(); + getBottomRightFieldBuilder(); } } private static Builder create() { @@ -17577,28 +14814,18 @@ private static Builder create() { public Builder clear() { super.clear(); - fieldName_ = ""; + if (topLeftBuilder_ == null) { + topLeft_ = com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint.getDefaultInstance(); + } else { + topLeftBuilder_.clear(); + } bitField0_ = (bitField0_ & ~0x00000001); - fieldType_ = com.alicloud.openservices.tablestore.core.protocol.Search.FieldType.LONG; + if (bottomRightBuilder_ == null) { + bottomRight_ = com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint.getDefaultInstance(); + } else { + bottomRightBuilder_.clear(); + } bitField0_ = (bitField0_ & ~0x00000002); - indexOptions_ = com.alicloud.openservices.tablestore.core.protocol.Search.IndexOptions.DOCS; - bitField0_ = (bitField0_ & ~0x00000004); - analyzer_ = ""; - bitField0_ = (bitField0_ & ~0x00000008); - index_ = false; - bitField0_ = (bitField0_ & ~0x00000010); - docValues_ = false; - bitField0_ = (bitField0_ & ~0x00000020); - store_ = false; - bitField0_ = (bitField0_ & ~0x00000040); - if (fieldSchemasBuilder_ == null) { - fieldSchemas_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); - } else { - fieldSchemasBuilder_.clear(); - } - isArray_ = false; - bitField0_ = (bitField0_ & ~0x00000100); return this; } @@ -17608,24 +14835,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAggResult.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAggResult getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAggResult.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema build() { - com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAggResult build() { + com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAggResult result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAggResult buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAggResult result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -17633,116 +14860,47 @@ private com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema bu return result; } - public com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema result = new com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema(this); + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAggResult buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAggResult result = new com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAggResult(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.fieldName_ = fieldName_; + if (topLeftBuilder_ == null) { + result.topLeft_ = topLeft_; + } else { + result.topLeft_ = topLeftBuilder_.build(); + } if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - result.fieldType_ = fieldType_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.indexOptions_ = indexOptions_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - result.analyzer_ = analyzer_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000010; - } - result.index_ = index_; - if (((from_bitField0_ & 0x00000020) == 0x00000020)) { - to_bitField0_ |= 0x00000020; - } - result.docValues_ = docValues_; - if (((from_bitField0_ & 0x00000040) == 0x00000040)) { - to_bitField0_ |= 0x00000040; - } - result.store_ = store_; - if (fieldSchemasBuilder_ == null) { - if (((bitField0_ & 0x00000080) == 0x00000080)) { - fieldSchemas_ = java.util.Collections.unmodifiableList(fieldSchemas_); - bitField0_ = (bitField0_ & ~0x00000080); - } - result.fieldSchemas_ = fieldSchemas_; + if (bottomRightBuilder_ == null) { + result.bottomRight_ = bottomRight_; } else { - result.fieldSchemas_ = fieldSchemasBuilder_.build(); + result.bottomRight_ = bottomRightBuilder_.build(); } - if (((from_bitField0_ & 0x00000100) == 0x00000100)) { - to_bitField0_ |= 0x00000080; - } - result.isArray_ = isArray_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAggResult) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAggResult)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.getDefaultInstance()) return this; - if (other.hasFieldName()) { - setFieldName(other.getFieldName()); - } - if (other.hasFieldType()) { - setFieldType(other.getFieldType()); - } - if (other.hasIndexOptions()) { - setIndexOptions(other.getIndexOptions()); - } - if (other.hasAnalyzer()) { - setAnalyzer(other.getAnalyzer()); - } - if (other.hasIndex()) { - setIndex(other.getIndex()); - } - if (other.hasDocValues()) { - setDocValues(other.getDocValues()); - } - if (other.hasStore()) { - setStore(other.getStore()); - } - if (fieldSchemasBuilder_ == null) { - if (!other.fieldSchemas_.isEmpty()) { - if (fieldSchemas_.isEmpty()) { - fieldSchemas_ = other.fieldSchemas_; - bitField0_ = (bitField0_ & ~0x00000080); - } else { - ensureFieldSchemasIsMutable(); - fieldSchemas_.addAll(other.fieldSchemas_); - } - onChanged(); - } - } else { - if (!other.fieldSchemas_.isEmpty()) { - if (fieldSchemasBuilder_.isEmpty()) { - fieldSchemasBuilder_.dispose(); - fieldSchemasBuilder_ = null; - fieldSchemas_ = other.fieldSchemas_; - bitField0_ = (bitField0_ & ~0x00000080); - fieldSchemasBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getFieldSchemasFieldBuilder() : null; - } else { - fieldSchemasBuilder_.addAllMessages(other.fieldSchemas_); - } - } + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAggResult other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAggResult.getDefaultInstance()) return this; + if (other.hasTopLeft()) { + mergeTopLeft(other.getTopLeft()); } - if (other.hasIsArray()) { - setIsArray(other.getIsArray()); + if (other.hasBottomRight()) { + mergeBottomRight(other.getBottomRight()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -17776,61 +14934,21 @@ public Builder mergeFrom( break; } case 10: { - bitField0_ |= 0x00000001; - fieldName_ = input.readBytes(); - break; - } - case 16: { - int rawValue = input.readEnum(); - com.alicloud.openservices.tablestore.core.protocol.Search.FieldType value = com.alicloud.openservices.tablestore.core.protocol.Search.FieldType.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(2, rawValue); - } else { - bitField0_ |= 0x00000002; - fieldType_ = value; + com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint.newBuilder(); + if (hasTopLeft()) { + subBuilder.mergeFrom(getTopLeft()); } + input.readMessage(subBuilder, extensionRegistry); + setTopLeft(subBuilder.buildPartial()); break; } - case 24: { - int rawValue = input.readEnum(); - com.alicloud.openservices.tablestore.core.protocol.Search.IndexOptions value = com.alicloud.openservices.tablestore.core.protocol.Search.IndexOptions.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(3, rawValue); - } else { - bitField0_ |= 0x00000004; - indexOptions_ = value; + case 18: { + com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint.newBuilder(); + if (hasBottomRight()) { + subBuilder.mergeFrom(getBottomRight()); } - break; - } - case 34: { - bitField0_ |= 0x00000008; - analyzer_ = input.readBytes(); - break; - } - case 40: { - bitField0_ |= 0x00000010; - index_ = input.readBool(); - break; - } - case 48: { - bitField0_ |= 0x00000020; - docValues_ = input.readBool(); - break; - } - case 56: { - bitField0_ |= 0x00000040; - store_ = input.readBool(); - break; - } - case 66: { - com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.newBuilder(); input.readMessage(subBuilder, extensionRegistry); - addFieldSchemas(subBuilder.buildPartial()); - break; - } - case 72: { - bitField0_ |= 0x00000100; - isArray_ = input.readBool(); + setBottomRight(subBuilder.buildPartial()); break; } } @@ -17839,510 +14957,312 @@ public Builder mergeFrom( private int bitField0_; - // optional string field_name = 1; - private java.lang.Object fieldName_ = ""; - public boolean hasFieldName() { + // optional .com.alicloud.openservices.tablestore.core.protocol.GeoPoint top_left = 1; + private com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint topLeft_ = com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint, com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GeoPointOrBuilder> topLeftBuilder_; + public boolean hasTopLeft() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getFieldName() { - java.lang.Object ref = fieldName_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - fieldName_ = s; - return s; - } else { - return (String) ref; - } - } - public Builder setFieldName(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - fieldName_ = value; - onChanged(); - return this; - } - public Builder clearFieldName() { - bitField0_ = (bitField0_ & ~0x00000001); - fieldName_ = getDefaultInstance().getFieldName(); - onChanged(); - return this; - } - void setFieldName(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; - fieldName_ = value; - onChanged(); - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.FieldType field_type = 2; - private com.alicloud.openservices.tablestore.core.protocol.Search.FieldType fieldType_ = com.alicloud.openservices.tablestore.core.protocol.Search.FieldType.LONG; - public boolean hasFieldType() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.FieldType getFieldType() { - return fieldType_; - } - public Builder setFieldType(com.alicloud.openservices.tablestore.core.protocol.Search.FieldType value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - fieldType_ = value; - onChanged(); - return this; - } - public Builder clearFieldType() { - bitField0_ = (bitField0_ & ~0x00000002); - fieldType_ = com.alicloud.openservices.tablestore.core.protocol.Search.FieldType.LONG; - onChanged(); - return this; - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.IndexOptions index_options = 3; - private com.alicloud.openservices.tablestore.core.protocol.Search.IndexOptions indexOptions_ = com.alicloud.openservices.tablestore.core.protocol.Search.IndexOptions.DOCS; - public boolean hasIndexOptions() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.IndexOptions getIndexOptions() { - return indexOptions_; - } - public Builder setIndexOptions(com.alicloud.openservices.tablestore.core.protocol.Search.IndexOptions value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - indexOptions_ = value; - onChanged(); - return this; - } - public Builder clearIndexOptions() { - bitField0_ = (bitField0_ & ~0x00000004); - indexOptions_ = com.alicloud.openservices.tablestore.core.protocol.Search.IndexOptions.DOCS; - onChanged(); - return this; - } - - // optional string analyzer = 4; - private java.lang.Object analyzer_ = ""; - public boolean hasAnalyzer() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public String getAnalyzer() { - java.lang.Object ref = analyzer_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - analyzer_ = s; - return s; - } else { - return (String) ref; - } - } - public Builder setAnalyzer(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - analyzer_ = value; - onChanged(); - return this; - } - public Builder clearAnalyzer() { - bitField0_ = (bitField0_ & ~0x00000008); - analyzer_ = getDefaultInstance().getAnalyzer(); - onChanged(); - return this; - } - void setAnalyzer(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000008; - analyzer_ = value; - onChanged(); - } - - // optional bool index = 5; - private boolean index_ ; - public boolean hasIndex() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - public boolean getIndex() { - return index_; - } - public Builder setIndex(boolean value) { - bitField0_ |= 0x00000010; - index_ = value; - onChanged(); - return this; - } - public Builder clearIndex() { - bitField0_ = (bitField0_ & ~0x00000010); - index_ = false; - onChanged(); - return this; - } - - // optional bool doc_values = 6; - private boolean docValues_ ; - public boolean hasDocValues() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - public boolean getDocValues() { - return docValues_; - } - public Builder setDocValues(boolean value) { - bitField0_ |= 0x00000020; - docValues_ = value; - onChanged(); - return this; - } - public Builder clearDocValues() { - bitField0_ = (bitField0_ & ~0x00000020); - docValues_ = false; - onChanged(); - return this; - } - - // optional bool store = 7; - private boolean store_ ; - public boolean hasStore() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - public boolean getStore() { - return store_; - } - public Builder setStore(boolean value) { - bitField0_ |= 0x00000040; - store_ = value; - onChanged(); - return this; - } - public Builder clearStore() { - bitField0_ = (bitField0_ & ~0x00000040); - store_ = false; - onChanged(); - return this; - } - - // repeated .com.alicloud.openservices.tablestore.core.protocol.FieldSchema field_schemas = 8; - private java.util.List fieldSchemas_ = - java.util.Collections.emptyList(); - private void ensureFieldSchemasIsMutable() { - if (!((bitField0_ & 0x00000080) == 0x00000080)) { - fieldSchemas_ = new java.util.ArrayList(fieldSchemas_); - bitField0_ |= 0x00000080; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchemaOrBuilder> fieldSchemasBuilder_; - - public java.util.List getFieldSchemasList() { - if (fieldSchemasBuilder_ == null) { - return java.util.Collections.unmodifiableList(fieldSchemas_); - } else { - return fieldSchemasBuilder_.getMessageList(); - } - } - public int getFieldSchemasCount() { - if (fieldSchemasBuilder_ == null) { - return fieldSchemas_.size(); - } else { - return fieldSchemasBuilder_.getCount(); - } - } - public com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema getFieldSchemas(int index) { - if (fieldSchemasBuilder_ == null) { - return fieldSchemas_.get(index); + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint getTopLeft() { + if (topLeftBuilder_ == null) { + return topLeft_; } else { - return fieldSchemasBuilder_.getMessage(index); + return topLeftBuilder_.getMessage(); } } - public Builder setFieldSchemas( - int index, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema value) { - if (fieldSchemasBuilder_ == null) { + public Builder setTopLeft(com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint value) { + if (topLeftBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureFieldSchemasIsMutable(); - fieldSchemas_.set(index, value); + topLeft_ = value; onChanged(); } else { - fieldSchemasBuilder_.setMessage(index, value); + topLeftBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; return this; } - public Builder setFieldSchemas( - int index, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.Builder builderForValue) { - if (fieldSchemasBuilder_ == null) { - ensureFieldSchemasIsMutable(); - fieldSchemas_.set(index, builderForValue.build()); + public Builder setTopLeft( + com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint.Builder builderForValue) { + if (topLeftBuilder_ == null) { + topLeft_ = builderForValue.build(); onChanged(); } else { - fieldSchemasBuilder_.setMessage(index, builderForValue.build()); + topLeftBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; return this; } - public Builder addFieldSchemas(com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema value) { - if (fieldSchemasBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); + public Builder mergeTopLeft(com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint value) { + if (topLeftBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001) && + topLeft_ != com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint.getDefaultInstance()) { + topLeft_ = + com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint.newBuilder(topLeft_).mergeFrom(value).buildPartial(); + } else { + topLeft_ = value; } - ensureFieldSchemasIsMutable(); - fieldSchemas_.add(value); onChanged(); } else { - fieldSchemasBuilder_.addMessage(value); + topLeftBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; return this; } - public Builder addFieldSchemas( - int index, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema value) { - if (fieldSchemasBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFieldSchemasIsMutable(); - fieldSchemas_.add(index, value); + public Builder clearTopLeft() { + if (topLeftBuilder_ == null) { + topLeft_ = com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint.getDefaultInstance(); onChanged(); } else { - fieldSchemasBuilder_.addMessage(index, value); + topLeftBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } - public Builder addFieldSchemas( - com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.Builder builderForValue) { - if (fieldSchemasBuilder_ == null) { - ensureFieldSchemasIsMutable(); - fieldSchemas_.add(builderForValue.build()); - onChanged(); + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint.Builder getTopLeftBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getTopLeftFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoPointOrBuilder getTopLeftOrBuilder() { + if (topLeftBuilder_ != null) { + return topLeftBuilder_.getMessageOrBuilder(); } else { - fieldSchemasBuilder_.addMessage(builderForValue.build()); + return topLeft_; } - return this; } - public Builder addFieldSchemas( - int index, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.Builder builderForValue) { - if (fieldSchemasBuilder_ == null) { - ensureFieldSchemasIsMutable(); - fieldSchemas_.add(index, builderForValue.build()); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint, com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GeoPointOrBuilder> + getTopLeftFieldBuilder() { + if (topLeftBuilder_ == null) { + topLeftBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint, com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GeoPointOrBuilder>( + topLeft_, + getParentForChildren(), + isClean()); + topLeft_ = null; + } + return topLeftBuilder_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.GeoPoint bottom_right = 2; + private com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint bottomRight_ = com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint, com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GeoPointOrBuilder> bottomRightBuilder_; + public boolean hasBottomRight() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint getBottomRight() { + if (bottomRightBuilder_ == null) { + return bottomRight_; + } else { + return bottomRightBuilder_.getMessage(); + } + } + public Builder setBottomRight(com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint value) { + if (bottomRightBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + bottomRight_ = value; onChanged(); } else { - fieldSchemasBuilder_.addMessage(index, builderForValue.build()); + bottomRightBuilder_.setMessage(value); } + bitField0_ |= 0x00000002; return this; } - public Builder addAllFieldSchemas( - java.lang.Iterable values) { - if (fieldSchemasBuilder_ == null) { - ensureFieldSchemasIsMutable(); - super.addAll(values, fieldSchemas_); + public Builder setBottomRight( + com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint.Builder builderForValue) { + if (bottomRightBuilder_ == null) { + bottomRight_ = builderForValue.build(); onChanged(); } else { - fieldSchemasBuilder_.addAllMessages(values); + bottomRightBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000002; return this; } - public Builder clearFieldSchemas() { - if (fieldSchemasBuilder_ == null) { - fieldSchemas_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); + public Builder mergeBottomRight(com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint value) { + if (bottomRightBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002) && + bottomRight_ != com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint.getDefaultInstance()) { + bottomRight_ = + com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint.newBuilder(bottomRight_).mergeFrom(value).buildPartial(); + } else { + bottomRight_ = value; + } onChanged(); } else { - fieldSchemasBuilder_.clear(); + bottomRightBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000002; return this; } - public Builder removeFieldSchemas(int index) { - if (fieldSchemasBuilder_ == null) { - ensureFieldSchemasIsMutable(); - fieldSchemas_.remove(index); + public Builder clearBottomRight() { + if (bottomRightBuilder_ == null) { + bottomRight_ = com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint.getDefaultInstance(); onChanged(); } else { - fieldSchemasBuilder_.remove(index); + bottomRightBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); return this; } - public com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.Builder getFieldSchemasBuilder( - int index) { - return getFieldSchemasFieldBuilder().getBuilder(index); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchemaOrBuilder getFieldSchemasOrBuilder( - int index) { - if (fieldSchemasBuilder_ == null) { - return fieldSchemas_.get(index); } else { - return fieldSchemasBuilder_.getMessageOrBuilder(index); - } + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint.Builder getBottomRightBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getBottomRightFieldBuilder().getBuilder(); } - public java.util.List - getFieldSchemasOrBuilderList() { - if (fieldSchemasBuilder_ != null) { - return fieldSchemasBuilder_.getMessageOrBuilderList(); + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoPointOrBuilder getBottomRightOrBuilder() { + if (bottomRightBuilder_ != null) { + return bottomRightBuilder_.getMessageOrBuilder(); } else { - return java.util.Collections.unmodifiableList(fieldSchemas_); + return bottomRight_; } } - public com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.Builder addFieldSchemasBuilder() { - return getFieldSchemasFieldBuilder().addBuilder( - com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.getDefaultInstance()); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.Builder addFieldSchemasBuilder( - int index) { - return getFieldSchemasFieldBuilder().addBuilder( - index, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.getDefaultInstance()); - } - public java.util.List - getFieldSchemasBuilderList() { - return getFieldSchemasFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchemaOrBuilder> - getFieldSchemasFieldBuilder() { - if (fieldSchemasBuilder_ == null) { - fieldSchemasBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchemaOrBuilder>( - fieldSchemas_, - ((bitField0_ & 0x00000080) == 0x00000080), + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint, com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GeoPointOrBuilder> + getBottomRightFieldBuilder() { + if (bottomRightBuilder_ == null) { + bottomRightBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint, com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GeoPointOrBuilder>( + bottomRight_, getParentForChildren(), isClean()); - fieldSchemas_ = null; + bottomRight_ = null; } - return fieldSchemasBuilder_; + return bottomRightBuilder_; } - // optional bool is_array = 9; - private boolean isArray_ ; - public boolean hasIsArray() { - return ((bitField0_ & 0x00000100) == 0x00000100); - } - public boolean getIsArray() { - return isArray_; - } - public Builder setIsArray(boolean value) { - bitField0_ |= 0x00000100; - isArray_ = value; - onChanged(); - return this; - } - public Builder clearIsArray() { - bitField0_ = (bitField0_ & ~0x00000100); - isArray_ = false; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.FieldSchema) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GeoBoundsAggResult) } static { - defaultInstance = new FieldSchema(true); + defaultInstance = new GeoBoundsAggResult(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.FieldSchema) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GeoBoundsAggResult) } - public interface IndexSchemaOrBuilder + public interface RangeBucketOrBuilder extends com.google.protobuf.MessageOrBuilder { - // repeated .com.alicloud.openservices.tablestore.core.protocol.FieldSchema field_schemas = 1; - java.util.List - getFieldSchemasList(); - com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema getFieldSchemas(int index); - int getFieldSchemasCount(); - java.util.List - getFieldSchemasOrBuilderList(); - com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchemaOrBuilder getFieldSchemasOrBuilder( - int index); + // optional string key = 1; + boolean hasKey(); + String getKey(); - // optional .com.alicloud.openservices.tablestore.core.protocol.IndexSetting index_setting = 2; - boolean hasIndexSetting(); - com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting getIndexSetting(); - com.alicloud.openservices.tablestore.core.protocol.Search.IndexSettingOrBuilder getIndexSettingOrBuilder(); + // optional double range_from = 2; + boolean hasRangeFrom(); + double getRangeFrom(); - // optional .com.alicloud.openservices.tablestore.core.protocol.Sort index_sort = 3; - boolean hasIndexSort(); - com.alicloud.openservices.tablestore.core.protocol.Search.Sort getIndexSort(); - com.alicloud.openservices.tablestore.core.protocol.Search.SortOrBuilder getIndexSortOrBuilder(); + // optional double range_to = 3; + boolean hasRangeTo(); + double getRangeTo(); + + // optional int64 doc_count = 4; + boolean hasDocCount(); + long getDocCount(); } - public static final class IndexSchema extends + public static final class RangeBucket extends com.google.protobuf.GeneratedMessage - implements IndexSchemaOrBuilder { - // Use IndexSchema.newBuilder() to construct. - private IndexSchema(Builder builder) { + implements RangeBucketOrBuilder { + // Use RangeBucket.newBuilder() to construct. + private RangeBucket(Builder builder) { super(builder); } - private IndexSchema(boolean noInit) {} + private RangeBucket(boolean noInit) {} - private static final IndexSchema defaultInstance; - public static IndexSchema getDefaultInstance() { + private static final RangeBucket defaultInstance; + public static RangeBucket getDefaultInstance() { return defaultInstance; } - public IndexSchema getDefaultInstanceForType() { + public RangeBucket getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_IndexSchema_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_RangeBucket_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_IndexSchema_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_RangeBucket_fieldAccessorTable; } private int bitField0_; - // repeated .com.alicloud.openservices.tablestore.core.protocol.FieldSchema field_schemas = 1; - public static final int FIELD_SCHEMAS_FIELD_NUMBER = 1; - private java.util.List fieldSchemas_; - public java.util.List getFieldSchemasList() { - return fieldSchemas_; + // optional string key = 1; + public static final int KEY_FIELD_NUMBER = 1; + private java.lang.Object key_; + public boolean hasKey() { + return ((bitField0_ & 0x00000001) == 0x00000001); } - public java.util.List - getFieldSchemasOrBuilderList() { - return fieldSchemas_; + public String getKey() { + java.lang.Object ref = key_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + key_ = s; + } + return s; + } } - public int getFieldSchemasCount() { - return fieldSchemas_.size(); + private com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - public com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema getFieldSchemas(int index) { - return fieldSchemas_.get(index); + + // optional double range_from = 2; + public static final int RANGE_FROM_FIELD_NUMBER = 2; + private double rangeFrom_; + public boolean hasRangeFrom() { + return ((bitField0_ & 0x00000002) == 0x00000002); } - public com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchemaOrBuilder getFieldSchemasOrBuilder( - int index) { - return fieldSchemas_.get(index); + public double getRangeFrom() { + return rangeFrom_; } - // optional .com.alicloud.openservices.tablestore.core.protocol.IndexSetting index_setting = 2; - public static final int INDEX_SETTING_FIELD_NUMBER = 2; - private com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting indexSetting_; - public boolean hasIndexSetting() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting getIndexSetting() { - return indexSetting_; + // optional double range_to = 3; + public static final int RANGE_TO_FIELD_NUMBER = 3; + private double rangeTo_; + public boolean hasRangeTo() { + return ((bitField0_ & 0x00000004) == 0x00000004); } - public com.alicloud.openservices.tablestore.core.protocol.Search.IndexSettingOrBuilder getIndexSettingOrBuilder() { - return indexSetting_; + public double getRangeTo() { + return rangeTo_; } - // optional .com.alicloud.openservices.tablestore.core.protocol.Sort index_sort = 3; - public static final int INDEX_SORT_FIELD_NUMBER = 3; - private com.alicloud.openservices.tablestore.core.protocol.Search.Sort indexSort_; - public boolean hasIndexSort() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.Sort getIndexSort() { - return indexSort_; + // optional int64 doc_count = 4; + public static final int DOC_COUNT_FIELD_NUMBER = 4; + private long docCount_; + public boolean hasDocCount() { + return ((bitField0_ & 0x00000008) == 0x00000008); } - public com.alicloud.openservices.tablestore.core.protocol.Search.SortOrBuilder getIndexSortOrBuilder() { - return indexSort_; + public long getDocCount() { + return docCount_; } private void initFields() { - fieldSchemas_ = java.util.Collections.emptyList(); - indexSetting_ = com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting.getDefaultInstance(); - indexSort_ = com.alicloud.openservices.tablestore.core.protocol.Search.Sort.getDefaultInstance(); + key_ = ""; + rangeFrom_ = 0D; + rangeTo_ = 0D; + docCount_ = 0L; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -18356,14 +15276,17 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - for (int i = 0; i < fieldSchemas_.size(); i++) { - output.writeMessage(1, fieldSchemas_.get(i)); - } if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeMessage(2, indexSetting_); + output.writeBytes(1, getKeyBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeMessage(3, indexSort_); + output.writeDouble(2, rangeFrom_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeDouble(3, rangeTo_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeInt64(4, docCount_); } getUnknownFields().writeTo(output); } @@ -18374,17 +15297,21 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - for (int i = 0; i < fieldSchemas_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, fieldSchemas_.get(i)); - } if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, indexSetting_); + .computeBytesSize(1, getKeyBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, indexSort_); + .computeDoubleSize(2, rangeFrom_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(3, rangeTo_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(4, docCount_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -18398,41 +15325,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucket parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucket parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucket parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucket parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucket parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucket parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucket parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -18441,7 +15368,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexSch return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucket parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -18452,12 +15379,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexSch return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucket parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucket parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -18467,7 +15394,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexSch public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucket prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -18480,18 +15407,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchemaOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucketOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_IndexSchema_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_RangeBucket_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_IndexSchema_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_RangeBucket_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucket.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -18502,9 +15429,6 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getFieldSchemasFieldBuilder(); - getIndexSettingFieldBuilder(); - getIndexSortFieldBuilder(); } } private static Builder create() { @@ -18513,24 +15437,14 @@ private static Builder create() { public Builder clear() { super.clear(); - if (fieldSchemasBuilder_ == null) { - fieldSchemas_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - fieldSchemasBuilder_.clear(); - } - if (indexSettingBuilder_ == null) { - indexSetting_ = com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting.getDefaultInstance(); - } else { - indexSettingBuilder_.clear(); - } + key_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + rangeFrom_ = 0D; bitField0_ = (bitField0_ & ~0x00000002); - if (indexSortBuilder_ == null) { - indexSort_ = com.alicloud.openservices.tablestore.core.protocol.Search.Sort.getDefaultInstance(); - } else { - indexSortBuilder_.clear(); - } + rangeTo_ = 0D; bitField0_ = (bitField0_ & ~0x00000004); + docCount_ = 0L; + bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -18540,24 +15454,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucket.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucket getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucket.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema build() { - com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucket build() { + com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucket result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucket buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucket result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -18565,82 +15479,53 @@ private com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema bu return result; } - public com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema result = new com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema(this); + public com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucket buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucket result = new com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucket(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; - if (fieldSchemasBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - fieldSchemas_ = java.util.Collections.unmodifiableList(fieldSchemas_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.fieldSchemas_ = fieldSchemas_; - } else { - result.fieldSchemas_ = fieldSchemasBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - if (indexSettingBuilder_ == null) { - result.indexSetting_ = indexSetting_; - } else { - result.indexSetting_ = indexSettingBuilder_.build(); + result.key_ = key_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; } + result.rangeFrom_ = rangeFrom_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000002; + to_bitField0_ |= 0x00000004; } - if (indexSortBuilder_ == null) { - result.indexSort_ = indexSort_; - } else { - result.indexSort_ = indexSortBuilder_.build(); + result.rangeTo_ = rangeTo_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; } + result.docCount_ = docCount_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucket) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucket)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.getDefaultInstance()) return this; - if (fieldSchemasBuilder_ == null) { - if (!other.fieldSchemas_.isEmpty()) { - if (fieldSchemas_.isEmpty()) { - fieldSchemas_ = other.fieldSchemas_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureFieldSchemasIsMutable(); - fieldSchemas_.addAll(other.fieldSchemas_); - } - onChanged(); - } - } else { - if (!other.fieldSchemas_.isEmpty()) { - if (fieldSchemasBuilder_.isEmpty()) { - fieldSchemasBuilder_.dispose(); - fieldSchemasBuilder_ = null; - fieldSchemas_ = other.fieldSchemas_; - bitField0_ = (bitField0_ & ~0x00000001); - fieldSchemasBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getFieldSchemasFieldBuilder() : null; - } else { - fieldSchemasBuilder_.addAllMessages(other.fieldSchemas_); - } - } + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucket other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucket.getDefaultInstance()) return this; + if (other.hasKey()) { + setKey(other.getKey()); } - if (other.hasIndexSetting()) { - mergeIndexSetting(other.getIndexSetting()); + if (other.hasRangeFrom()) { + setRangeFrom(other.getRangeFrom()); } - if (other.hasIndexSort()) { - mergeIndexSort(other.getIndexSort()); + if (other.hasRangeTo()) { + setRangeTo(other.getRangeTo()); + } + if (other.hasDocCount()) { + setDocCount(other.getDocCount()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -18674,27 +15559,23 @@ public Builder mergeFrom( break; } case 10: { - com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.newBuilder(); - input.readMessage(subBuilder, extensionRegistry); - addFieldSchemas(subBuilder.buildPartial()); + bitField0_ |= 0x00000001; + key_ = input.readBytes(); break; } - case 18: { - com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting.newBuilder(); - if (hasIndexSetting()) { - subBuilder.mergeFrom(getIndexSetting()); - } - input.readMessage(subBuilder, extensionRegistry); - setIndexSetting(subBuilder.buildPartial()); + case 17: { + bitField0_ |= 0x00000002; + rangeFrom_ = input.readDouble(); break; } - case 26: { - com.alicloud.openservices.tablestore.core.protocol.Search.Sort.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.Sort.newBuilder(); - if (hasIndexSort()) { - subBuilder.mergeFrom(getIndexSort()); - } - input.readMessage(subBuilder, extensionRegistry); - setIndexSort(subBuilder.buildPartial()); + case 25: { + bitField0_ |= 0x00000004; + rangeTo_ = input.readDouble(); + break; + } + case 32: { + bitField0_ |= 0x00000008; + docCount_ = input.readInt64(); break; } } @@ -18703,466 +15584,180 @@ public Builder mergeFrom( private int bitField0_; - // repeated .com.alicloud.openservices.tablestore.core.protocol.FieldSchema field_schemas = 1; - private java.util.List fieldSchemas_ = - java.util.Collections.emptyList(); - private void ensureFieldSchemasIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - fieldSchemas_ = new java.util.ArrayList(fieldSchemas_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchemaOrBuilder> fieldSchemasBuilder_; - - public java.util.List getFieldSchemasList() { - if (fieldSchemasBuilder_ == null) { - return java.util.Collections.unmodifiableList(fieldSchemas_); - } else { - return fieldSchemasBuilder_.getMessageList(); - } - } - public int getFieldSchemasCount() { - if (fieldSchemasBuilder_ == null) { - return fieldSchemas_.size(); - } else { - return fieldSchemasBuilder_.getCount(); - } - } - public com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema getFieldSchemas(int index) { - if (fieldSchemasBuilder_ == null) { - return fieldSchemas_.get(index); - } else { - return fieldSchemasBuilder_.getMessage(index); - } - } - public Builder setFieldSchemas( - int index, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema value) { - if (fieldSchemasBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFieldSchemasIsMutable(); - fieldSchemas_.set(index, value); - onChanged(); - } else { - fieldSchemasBuilder_.setMessage(index, value); - } - return this; + // optional string key = 1; + private java.lang.Object key_ = ""; + public boolean hasKey() { + return ((bitField0_ & 0x00000001) == 0x00000001); } - public Builder setFieldSchemas( - int index, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.Builder builderForValue) { - if (fieldSchemasBuilder_ == null) { - ensureFieldSchemasIsMutable(); - fieldSchemas_.set(index, builderForValue.build()); - onChanged(); + public String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + key_ = s; + return s; } else { - fieldSchemasBuilder_.setMessage(index, builderForValue.build()); + return (String) ref; } - return this; } - public Builder addFieldSchemas(com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema value) { - if (fieldSchemasBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFieldSchemasIsMutable(); - fieldSchemas_.add(value); - onChanged(); - } else { - fieldSchemasBuilder_.addMessage(value); - } + public Builder setKey(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + key_ = value; + onChanged(); return this; } - public Builder addFieldSchemas( - int index, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema value) { - if (fieldSchemasBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFieldSchemasIsMutable(); - fieldSchemas_.add(index, value); - onChanged(); - } else { - fieldSchemasBuilder_.addMessage(index, value); - } + public Builder clearKey() { + bitField0_ = (bitField0_ & ~0x00000001); + key_ = getDefaultInstance().getKey(); + onChanged(); return this; } - public Builder addFieldSchemas( - com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.Builder builderForValue) { - if (fieldSchemasBuilder_ == null) { - ensureFieldSchemasIsMutable(); - fieldSchemas_.add(builderForValue.build()); - onChanged(); - } else { - fieldSchemasBuilder_.addMessage(builderForValue.build()); - } - return this; + void setKey(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + key_ = value; + onChanged(); } - public Builder addFieldSchemas( - int index, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.Builder builderForValue) { - if (fieldSchemasBuilder_ == null) { - ensureFieldSchemasIsMutable(); - fieldSchemas_.add(index, builderForValue.build()); - onChanged(); - } else { - fieldSchemasBuilder_.addMessage(index, builderForValue.build()); - } - return this; + + // optional double range_from = 2; + private double rangeFrom_ ; + public boolean hasRangeFrom() { + return ((bitField0_ & 0x00000002) == 0x00000002); } - public Builder addAllFieldSchemas( - java.lang.Iterable values) { - if (fieldSchemasBuilder_ == null) { - ensureFieldSchemasIsMutable(); - super.addAll(values, fieldSchemas_); - onChanged(); - } else { - fieldSchemasBuilder_.addAllMessages(values); - } - return this; + public double getRangeFrom() { + return rangeFrom_; } - public Builder clearFieldSchemas() { - if (fieldSchemasBuilder_ == null) { - fieldSchemas_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - fieldSchemasBuilder_.clear(); - } + public Builder setRangeFrom(double value) { + bitField0_ |= 0x00000002; + rangeFrom_ = value; + onChanged(); return this; } - public Builder removeFieldSchemas(int index) { - if (fieldSchemasBuilder_ == null) { - ensureFieldSchemasIsMutable(); - fieldSchemas_.remove(index); - onChanged(); - } else { - fieldSchemasBuilder_.remove(index); - } + public Builder clearRangeFrom() { + bitField0_ = (bitField0_ & ~0x00000002); + rangeFrom_ = 0D; + onChanged(); return this; } - public com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.Builder getFieldSchemasBuilder( - int index) { - return getFieldSchemasFieldBuilder().getBuilder(index); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchemaOrBuilder getFieldSchemasOrBuilder( - int index) { - if (fieldSchemasBuilder_ == null) { - return fieldSchemas_.get(index); } else { - return fieldSchemasBuilder_.getMessageOrBuilder(index); - } - } - public java.util.List - getFieldSchemasOrBuilderList() { - if (fieldSchemasBuilder_ != null) { - return fieldSchemasBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(fieldSchemas_); - } - } - public com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.Builder addFieldSchemasBuilder() { - return getFieldSchemasFieldBuilder().addBuilder( - com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.getDefaultInstance()); + + // optional double range_to = 3; + private double rangeTo_ ; + public boolean hasRangeTo() { + return ((bitField0_ & 0x00000004) == 0x00000004); } - public com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.Builder addFieldSchemasBuilder( - int index) { - return getFieldSchemasFieldBuilder().addBuilder( - index, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.getDefaultInstance()); + public double getRangeTo() { + return rangeTo_; } - public java.util.List - getFieldSchemasBuilderList() { - return getFieldSchemasFieldBuilder().getBuilderList(); + public Builder setRangeTo(double value) { + bitField0_ |= 0x00000004; + rangeTo_ = value; + onChanged(); + return this; } - private com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchemaOrBuilder> - getFieldSchemasFieldBuilder() { - if (fieldSchemasBuilder_ == null) { - fieldSchemasBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchemaOrBuilder>( - fieldSchemas_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); - fieldSchemas_ = null; - } - return fieldSchemasBuilder_; + public Builder clearRangeTo() { + bitField0_ = (bitField0_ & ~0x00000004); + rangeTo_ = 0D; + onChanged(); + return this; } - // optional .com.alicloud.openservices.tablestore.core.protocol.IndexSetting index_setting = 2; - private com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting indexSetting_ = com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting, com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.IndexSettingOrBuilder> indexSettingBuilder_; - public boolean hasIndexSetting() { - return ((bitField0_ & 0x00000002) == 0x00000002); + // optional int64 doc_count = 4; + private long docCount_ ; + public boolean hasDocCount() { + return ((bitField0_ & 0x00000008) == 0x00000008); } - public com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting getIndexSetting() { - if (indexSettingBuilder_ == null) { - return indexSetting_; - } else { - return indexSettingBuilder_.getMessage(); - } + public long getDocCount() { + return docCount_; } - public Builder setIndexSetting(com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting value) { - if (indexSettingBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - indexSetting_ = value; - onChanged(); - } else { - indexSettingBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; + public Builder setDocCount(long value) { + bitField0_ |= 0x00000008; + docCount_ = value; + onChanged(); return this; } - public Builder setIndexSetting( - com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting.Builder builderForValue) { - if (indexSettingBuilder_ == null) { - indexSetting_ = builderForValue.build(); - onChanged(); - } else { - indexSettingBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - return this; - } - public Builder mergeIndexSetting(com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting value) { - if (indexSettingBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002) && - indexSetting_ != com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting.getDefaultInstance()) { - indexSetting_ = - com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting.newBuilder(indexSetting_).mergeFrom(value).buildPartial(); - } else { - indexSetting_ = value; - } - onChanged(); - } else { - indexSettingBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - return this; - } - public Builder clearIndexSetting() { - if (indexSettingBuilder_ == null) { - indexSetting_ = com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting.getDefaultInstance(); - onChanged(); - } else { - indexSettingBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - public com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting.Builder getIndexSettingBuilder() { - bitField0_ |= 0x00000002; + public Builder clearDocCount() { + bitField0_ = (bitField0_ & ~0x00000008); + docCount_ = 0L; onChanged(); - return getIndexSettingFieldBuilder().getBuilder(); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.IndexSettingOrBuilder getIndexSettingOrBuilder() { - if (indexSettingBuilder_ != null) { - return indexSettingBuilder_.getMessageOrBuilder(); - } else { - return indexSetting_; - } - } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting, com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.IndexSettingOrBuilder> - getIndexSettingFieldBuilder() { - if (indexSettingBuilder_ == null) { - indexSettingBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting, com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.IndexSettingOrBuilder>( - indexSetting_, - getParentForChildren(), - isClean()); - indexSetting_ = null; - } - return indexSettingBuilder_; - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.Sort index_sort = 3; - private com.alicloud.openservices.tablestore.core.protocol.Search.Sort indexSort_ = com.alicloud.openservices.tablestore.core.protocol.Search.Sort.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.Sort, com.alicloud.openservices.tablestore.core.protocol.Search.Sort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.SortOrBuilder> indexSortBuilder_; - public boolean hasIndexSort() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.Sort getIndexSort() { - if (indexSortBuilder_ == null) { - return indexSort_; - } else { - return indexSortBuilder_.getMessage(); - } - } - public Builder setIndexSort(com.alicloud.openservices.tablestore.core.protocol.Search.Sort value) { - if (indexSortBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - indexSort_ = value; - onChanged(); - } else { - indexSortBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; - return this; - } - public Builder setIndexSort( - com.alicloud.openservices.tablestore.core.protocol.Search.Sort.Builder builderForValue) { - if (indexSortBuilder_ == null) { - indexSort_ = builderForValue.build(); - onChanged(); - } else { - indexSortBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; - return this; - } - public Builder mergeIndexSort(com.alicloud.openservices.tablestore.core.protocol.Search.Sort value) { - if (indexSortBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004) && - indexSort_ != com.alicloud.openservices.tablestore.core.protocol.Search.Sort.getDefaultInstance()) { - indexSort_ = - com.alicloud.openservices.tablestore.core.protocol.Search.Sort.newBuilder(indexSort_).mergeFrom(value).buildPartial(); - } else { - indexSort_ = value; - } - onChanged(); - } else { - indexSortBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - return this; - } - public Builder clearIndexSort() { - if (indexSortBuilder_ == null) { - indexSort_ = com.alicloud.openservices.tablestore.core.protocol.Search.Sort.getDefaultInstance(); - onChanged(); - } else { - indexSortBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); return this; } - public com.alicloud.openservices.tablestore.core.protocol.Search.Sort.Builder getIndexSortBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getIndexSortFieldBuilder().getBuilder(); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.SortOrBuilder getIndexSortOrBuilder() { - if (indexSortBuilder_ != null) { - return indexSortBuilder_.getMessageOrBuilder(); - } else { - return indexSort_; - } - } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.Sort, com.alicloud.openservices.tablestore.core.protocol.Search.Sort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.SortOrBuilder> - getIndexSortFieldBuilder() { - if (indexSortBuilder_ == null) { - indexSortBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.Sort, com.alicloud.openservices.tablestore.core.protocol.Search.Sort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.SortOrBuilder>( - indexSort_, - getParentForChildren(), - isClean()); - indexSort_ = null; - } - return indexSortBuilder_; - } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.IndexSchema) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.RangeBucket) } static { - defaultInstance = new IndexSchema(true); + defaultInstance = new RangeBucket(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.IndexSchema) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.RangeBucket) } - public interface IndexSettingOrBuilder + public interface GeoDistanceAggResultOrBuilder extends com.google.protobuf.MessageOrBuilder { - // optional int32 number_of_shards = 1; - boolean hasNumberOfShards(); - int getNumberOfShards(); - - // repeated string routing_fields = 2; - java.util.List getRoutingFieldsList(); - int getRoutingFieldsCount(); - String getRoutingFields(int index); - - // optional int32 routing_partition_size = 3; - boolean hasRoutingPartitionSize(); - int getRoutingPartitionSize(); + // repeated .com.alicloud.openservices.tablestore.core.protocol.RangeBucket bucket = 1; + java.util.List + getBucketList(); + com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucket getBucket(int index); + int getBucketCount(); + java.util.List + getBucketOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucketOrBuilder getBucketOrBuilder( + int index); } - public static final class IndexSetting extends + public static final class GeoDistanceAggResult extends com.google.protobuf.GeneratedMessage - implements IndexSettingOrBuilder { - // Use IndexSetting.newBuilder() to construct. - private IndexSetting(Builder builder) { + implements GeoDistanceAggResultOrBuilder { + // Use GeoDistanceAggResult.newBuilder() to construct. + private GeoDistanceAggResult(Builder builder) { super(builder); } - private IndexSetting(boolean noInit) {} + private GeoDistanceAggResult(boolean noInit) {} - private static final IndexSetting defaultInstance; - public static IndexSetting getDefaultInstance() { + private static final GeoDistanceAggResult defaultInstance; + public static GeoDistanceAggResult getDefaultInstance() { return defaultInstance; } - public IndexSetting getDefaultInstanceForType() { + public GeoDistanceAggResult getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_IndexSetting_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoDistanceAggResult_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_IndexSetting_fieldAccessorTable; - } - - private int bitField0_; - // optional int32 number_of_shards = 1; - public static final int NUMBER_OF_SHARDS_FIELD_NUMBER = 1; - private int numberOfShards_; - public boolean hasNumberOfShards() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public int getNumberOfShards() { - return numberOfShards_; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoDistanceAggResult_fieldAccessorTable; } - // repeated string routing_fields = 2; - public static final int ROUTING_FIELDS_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList routingFields_; - public java.util.List - getRoutingFieldsList() { - return routingFields_; + // repeated .com.alicloud.openservices.tablestore.core.protocol.RangeBucket bucket = 1; + public static final int BUCKET_FIELD_NUMBER = 1; + private java.util.List bucket_; + public java.util.List getBucketList() { + return bucket_; } - public int getRoutingFieldsCount() { - return routingFields_.size(); + public java.util.List + getBucketOrBuilderList() { + return bucket_; } - public String getRoutingFields(int index) { - return routingFields_.get(index); + public int getBucketCount() { + return bucket_.size(); } - - // optional int32 routing_partition_size = 3; - public static final int ROUTING_PARTITION_SIZE_FIELD_NUMBER = 3; - private int routingPartitionSize_; - public boolean hasRoutingPartitionSize() { - return ((bitField0_ & 0x00000002) == 0x00000002); + public com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucket getBucket(int index) { + return bucket_.get(index); } - public int getRoutingPartitionSize() { - return routingPartitionSize_; + public com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucketOrBuilder getBucketOrBuilder( + int index) { + return bucket_.get(index); } private void initFields() { - numberOfShards_ = 0; - routingFields_ = com.google.protobuf.LazyStringArrayList.EMPTY; - routingPartitionSize_ = 0; + bucket_ = java.util.Collections.emptyList(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -19176,14 +15771,8 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeInt32(1, numberOfShards_); - } - for (int i = 0; i < routingFields_.size(); i++) { - output.writeBytes(2, routingFields_.getByteString(i)); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeInt32(3, routingPartitionSize_); + for (int i = 0; i < bucket_.size(); i++) { + output.writeMessage(1, bucket_.get(i)); } getUnknownFields().writeTo(output); } @@ -19194,22 +15783,9 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, numberOfShards_); - } - { - int dataSize = 0; - for (int i = 0; i < routingFields_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeBytesSizeNoTag(routingFields_.getByteString(i)); - } - size += dataSize; - size += 1 * getRoutingFieldsList().size(); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { + for (int i = 0; i < bucket_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, routingPartitionSize_); + .computeMessageSize(1, bucket_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -19223,41 +15799,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggResult parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggResult parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggResult parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggResult parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggResult parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggResult parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggResult parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -19266,7 +15842,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexSet return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggResult parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -19277,12 +15853,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexSet return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggResult parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggResult parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -19292,7 +15868,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexSet public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggResult prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -19305,18 +15881,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.Search.IndexSettingOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggResultOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_IndexSetting_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoDistanceAggResult_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_IndexSetting_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoDistanceAggResult_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggResult.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -19327,6 +15903,7 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getBucketFieldBuilder(); } } private static Builder create() { @@ -19335,12 +15912,12 @@ private static Builder create() { public Builder clear() { super.clear(); - numberOfShards_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - routingFields_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - routingPartitionSize_ = 0; - bitField0_ = (bitField0_ & ~0x00000004); + if (bucketBuilder_ == null) { + bucket_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + bucketBuilder_.clear(); + } return this; } @@ -19350,24 +15927,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggResult.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggResult getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggResult.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting build() { - com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggResult build() { + com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggResult result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggResult buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggResult result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -19375,55 +15952,58 @@ private com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting b return result; } - public com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting result = new com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting(this); + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggResult buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggResult result = new com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggResult(this); int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.numberOfShards_ = numberOfShards_; - if (((bitField0_ & 0x00000002) == 0x00000002)) { - routingFields_ = new com.google.protobuf.UnmodifiableLazyStringList( - routingFields_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.routingFields_ = routingFields_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000002; + if (bucketBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + bucket_ = java.util.Collections.unmodifiableList(bucket_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.bucket_ = bucket_; + } else { + result.bucket_ = bucketBuilder_.build(); } - result.routingPartitionSize_ = routingPartitionSize_; - result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggResult) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggResult)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting.getDefaultInstance()) return this; - if (other.hasNumberOfShards()) { - setNumberOfShards(other.getNumberOfShards()); - } - if (!other.routingFields_.isEmpty()) { - if (routingFields_.isEmpty()) { - routingFields_ = other.routingFields_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureRoutingFieldsIsMutable(); - routingFields_.addAll(other.routingFields_); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggResult other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggResult.getDefaultInstance()) return this; + if (bucketBuilder_ == null) { + if (!other.bucket_.isEmpty()) { + if (bucket_.isEmpty()) { + bucket_ = other.bucket_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBucketIsMutable(); + bucket_.addAll(other.bucket_); + } + onChanged(); + } + } else { + if (!other.bucket_.isEmpty()) { + if (bucketBuilder_.isEmpty()) { + bucketBuilder_.dispose(); + bucketBuilder_ = null; + bucket_ = other.bucket_; + bitField0_ = (bitField0_ & ~0x00000001); + bucketBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getBucketFieldBuilder() : null; + } else { + bucketBuilder_.addAllMessages(other.bucket_); + } } - onChanged(); - } - if (other.hasRoutingPartitionSize()) { - setRoutingPartitionSize(other.getRoutingPartitionSize()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -19456,19 +16036,10 @@ public Builder mergeFrom( } break; } - case 8: { - bitField0_ |= 0x00000001; - numberOfShards_ = input.readInt32(); - break; - } - case 18: { - ensureRoutingFieldsIsMutable(); - routingFields_.add(input.readBytes()); - break; - } - case 24: { - bitField0_ |= 0x00000004; - routingPartitionSize_ = input.readInt32(); + case 10: { + com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucket.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucket.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addBucket(subBuilder.buildPartial()); break; } } @@ -19477,255 +16048,317 @@ public Builder mergeFrom( private int bitField0_; - // optional int32 number_of_shards = 1; - private int numberOfShards_ ; - public boolean hasNumberOfShards() { - return ((bitField0_ & 0x00000001) == 0x00000001); + // repeated .com.alicloud.openservices.tablestore.core.protocol.RangeBucket bucket = 1; + private java.util.List bucket_ = + java.util.Collections.emptyList(); + private void ensureBucketIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + bucket_ = new java.util.ArrayList(bucket_); + bitField0_ |= 0x00000001; + } } - public int getNumberOfShards() { - return numberOfShards_; + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucket, com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucket.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucketOrBuilder> bucketBuilder_; + + public java.util.List getBucketList() { + if (bucketBuilder_ == null) { + return java.util.Collections.unmodifiableList(bucket_); + } else { + return bucketBuilder_.getMessageList(); + } } - public Builder setNumberOfShards(int value) { - bitField0_ |= 0x00000001; - numberOfShards_ = value; - onChanged(); - return this; + public int getBucketCount() { + if (bucketBuilder_ == null) { + return bucket_.size(); + } else { + return bucketBuilder_.getCount(); + } } - public Builder clearNumberOfShards() { - bitField0_ = (bitField0_ & ~0x00000001); - numberOfShards_ = 0; - onChanged(); + public com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucket getBucket(int index) { + if (bucketBuilder_ == null) { + return bucket_.get(index); + } else { + return bucketBuilder_.getMessage(index); + } + } + public Builder setBucket( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucket value) { + if (bucketBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBucketIsMutable(); + bucket_.set(index, value); + onChanged(); + } else { + bucketBuilder_.setMessage(index, value); + } return this; } - - // repeated string routing_fields = 2; - private com.google.protobuf.LazyStringList routingFields_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureRoutingFieldsIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - routingFields_ = new com.google.protobuf.LazyStringArrayList(routingFields_); - bitField0_ |= 0x00000002; - } + public Builder setBucket( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucket.Builder builderForValue) { + if (bucketBuilder_ == null) { + ensureBucketIsMutable(); + bucket_.set(index, builderForValue.build()); + onChanged(); + } else { + bucketBuilder_.setMessage(index, builderForValue.build()); + } + return this; } - public java.util.List - getRoutingFieldsList() { - return java.util.Collections.unmodifiableList(routingFields_); + public Builder addBucket(com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucket value) { + if (bucketBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBucketIsMutable(); + bucket_.add(value); + onChanged(); + } else { + bucketBuilder_.addMessage(value); + } + return this; } - public int getRoutingFieldsCount() { - return routingFields_.size(); + public Builder addBucket( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucket value) { + if (bucketBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBucketIsMutable(); + bucket_.add(index, value); + onChanged(); + } else { + bucketBuilder_.addMessage(index, value); + } + return this; } - public String getRoutingFields(int index) { - return routingFields_.get(index); + public Builder addBucket( + com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucket.Builder builderForValue) { + if (bucketBuilder_ == null) { + ensureBucketIsMutable(); + bucket_.add(builderForValue.build()); + onChanged(); + } else { + bucketBuilder_.addMessage(builderForValue.build()); + } + return this; } - public Builder setRoutingFields( - int index, String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRoutingFieldsIsMutable(); - routingFields_.set(index, value); - onChanged(); + public Builder addBucket( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucket.Builder builderForValue) { + if (bucketBuilder_ == null) { + ensureBucketIsMutable(); + bucket_.add(index, builderForValue.build()); + onChanged(); + } else { + bucketBuilder_.addMessage(index, builderForValue.build()); + } return this; } - public Builder addRoutingFields(String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRoutingFieldsIsMutable(); - routingFields_.add(value); - onChanged(); + public Builder addAllBucket( + java.lang.Iterable values) { + if (bucketBuilder_ == null) { + ensureBucketIsMutable(); + super.addAll(values, bucket_); + onChanged(); + } else { + bucketBuilder_.addAllMessages(values); + } return this; } - public Builder addAllRoutingFields( - java.lang.Iterable values) { - ensureRoutingFieldsIsMutable(); - super.addAll(values, routingFields_); - onChanged(); + public Builder clearBucket() { + if (bucketBuilder_ == null) { + bucket_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + bucketBuilder_.clear(); + } return this; } - public Builder clearRoutingFields() { - routingFields_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); + public Builder removeBucket(int index) { + if (bucketBuilder_ == null) { + ensureBucketIsMutable(); + bucket_.remove(index); + onChanged(); + } else { + bucketBuilder_.remove(index); + } return this; } - void addRoutingFields(com.google.protobuf.ByteString value) { - ensureRoutingFieldsIsMutable(); - routingFields_.add(value); - onChanged(); + public com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucket.Builder getBucketBuilder( + int index) { + return getBucketFieldBuilder().getBuilder(index); } - - // optional int32 routing_partition_size = 3; - private int routingPartitionSize_ ; - public boolean hasRoutingPartitionSize() { - return ((bitField0_ & 0x00000004) == 0x00000004); + public com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucketOrBuilder getBucketOrBuilder( + int index) { + if (bucketBuilder_ == null) { + return bucket_.get(index); } else { + return bucketBuilder_.getMessageOrBuilder(index); + } } - public int getRoutingPartitionSize() { - return routingPartitionSize_; + public java.util.List + getBucketOrBuilderList() { + if (bucketBuilder_ != null) { + return bucketBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(bucket_); + } } - public Builder setRoutingPartitionSize(int value) { - bitField0_ |= 0x00000004; - routingPartitionSize_ = value; - onChanged(); - return this; + public com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucket.Builder addBucketBuilder() { + return getBucketFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucket.getDefaultInstance()); } - public Builder clearRoutingPartitionSize() { - bitField0_ = (bitField0_ & ~0x00000004); - routingPartitionSize_ = 0; - onChanged(); - return this; + public com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucket.Builder addBucketBuilder( + int index) { + return getBucketFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucket.getDefaultInstance()); + } + public java.util.List + getBucketBuilderList() { + return getBucketFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucket, com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucket.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucketOrBuilder> + getBucketFieldBuilder() { + if (bucketBuilder_ == null) { + bucketBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucket, com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucket.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucketOrBuilder>( + bucket_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + bucket_ = null; + } + return bucketBuilder_; } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.IndexSetting) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GeoDistanceAggResult) } static { - defaultInstance = new IndexSetting(true); + defaultInstance = new GeoDistanceAggResult(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.IndexSetting) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GeoDistanceAggResult) } - public interface CreateSearchIndexRequestOrBuilder + public interface StatsAggResultOrBuilder extends com.google.protobuf.MessageOrBuilder { - // required string table_name = 1; - boolean hasTableName(); - String getTableName(); + // optional int64 count = 1; + boolean hasCount(); + long getCount(); - // required string index_name = 2; - boolean hasIndexName(); - String getIndexName(); + // optional double min = 2; + boolean hasMin(); + double getMin(); - // optional .com.alicloud.openservices.tablestore.core.protocol.IndexSchema schema = 3; - boolean hasSchema(); - com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema getSchema(); - com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchemaOrBuilder getSchemaOrBuilder(); + // optional double max = 3; + boolean hasMax(); + double getMax(); + + // optional double avg = 4; + boolean hasAvg(); + double getAvg(); + + // optional double sum = 5; + boolean hasSum(); + double getSum(); } - public static final class CreateSearchIndexRequest extends + public static final class StatsAggResult extends com.google.protobuf.GeneratedMessage - implements CreateSearchIndexRequestOrBuilder { - // Use CreateSearchIndexRequest.newBuilder() to construct. - private CreateSearchIndexRequest(Builder builder) { + implements StatsAggResultOrBuilder { + // Use StatsAggResult.newBuilder() to construct. + private StatsAggResult(Builder builder) { super(builder); } - private CreateSearchIndexRequest(boolean noInit) {} + private StatsAggResult(boolean noInit) {} - private static final CreateSearchIndexRequest defaultInstance; - public static CreateSearchIndexRequest getDefaultInstance() { + private static final StatsAggResult defaultInstance; + public static StatsAggResult getDefaultInstance() { return defaultInstance; } - public CreateSearchIndexRequest getDefaultInstanceForType() { + public StatsAggResult getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateSearchIndexRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_StatsAggResult_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateSearchIndexRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_StatsAggResult_fieldAccessorTable; } private int bitField0_; - // required string table_name = 1; - public static final int TABLE_NAME_FIELD_NUMBER = 1; - private java.lang.Object tableName_; - public boolean hasTableName() { + // optional int64 count = 1; + public static final int COUNT_FIELD_NUMBER = 1; + private long count_; + public boolean hasCount() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getTableName() { - java.lang.Object ref = tableName_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - tableName_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getTableNameBytes() { - java.lang.Object ref = tableName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - tableName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public long getCount() { + return count_; } - // required string index_name = 2; - public static final int INDEX_NAME_FIELD_NUMBER = 2; - private java.lang.Object indexName_; - public boolean hasIndexName() { + // optional double min = 2; + public static final int MIN_FIELD_NUMBER = 2; + private double min_; + public boolean hasMin() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public String getIndexName() { - java.lang.Object ref = indexName_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - indexName_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getIndexNameBytes() { - java.lang.Object ref = indexName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - indexName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public double getMin() { + return min_; } - // optional .com.alicloud.openservices.tablestore.core.protocol.IndexSchema schema = 3; - public static final int SCHEMA_FIELD_NUMBER = 3; - private com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema schema_; - public boolean hasSchema() { + // optional double max = 3; + public static final int MAX_FIELD_NUMBER = 3; + private double max_; + public boolean hasMax() { return ((bitField0_ & 0x00000004) == 0x00000004); } - public com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema getSchema() { - return schema_; + public double getMax() { + return max_; } - public com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchemaOrBuilder getSchemaOrBuilder() { - return schema_; + + // optional double avg = 4; + public static final int AVG_FIELD_NUMBER = 4; + private double avg_; + public boolean hasAvg() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public double getAvg() { + return avg_; + } + + // optional double sum = 5; + public static final int SUM_FIELD_NUMBER = 5; + private double sum_; + public boolean hasSum() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public double getSum() { + return sum_; } private void initFields() { - tableName_ = ""; - indexName_ = ""; - schema_ = com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.getDefaultInstance(); + count_ = 0L; + min_ = 0D; + max_ = 0D; + avg_ = 0D; + sum_ = 0D; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - if (!hasTableName()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasIndexName()) { - memoizedIsInitialized = 0; - return false; - } memoizedIsInitialized = 1; return true; } @@ -19734,13 +16367,19 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getTableNameBytes()); + output.writeInt64(1, count_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getIndexNameBytes()); + output.writeDouble(2, min_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeMessage(3, schema_); + output.writeDouble(3, max_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeDouble(4, avg_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeDouble(5, sum_); } getUnknownFields().writeTo(output); } @@ -19753,15 +16392,23 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getTableNameBytes()); + .computeInt64Size(1, count_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getIndexNameBytes()); + .computeDoubleSize(2, min_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, schema_); + .computeDoubleSize(3, max_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(4, avg_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(5, sum_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -19775,41 +16422,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.StatsAggResult parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.StatsAggResult parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.Search.StatsAggResult parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.StatsAggResult parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.StatsAggResult parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.StatsAggResult parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.StatsAggResult parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -19818,7 +16465,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.CreateSe return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.StatsAggResult parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -19829,12 +16476,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.CreateSe return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.StatsAggResult parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.StatsAggResult parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -19844,7 +16491,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.CreateSe public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.StatsAggResult prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -19857,18 +16504,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequestOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.Search.StatsAggResultOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateSearchIndexRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_StatsAggResult_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateSearchIndexRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_StatsAggResult_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.StatsAggResult.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -19879,7 +16526,6 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getSchemaFieldBuilder(); } } private static Builder create() { @@ -19888,16 +16534,16 @@ private static Builder create() { public Builder clear() { super.clear(); - tableName_ = ""; + count_ = 0L; bitField0_ = (bitField0_ & ~0x00000001); - indexName_ = ""; + min_ = 0D; bitField0_ = (bitField0_ & ~0x00000002); - if (schemaBuilder_ == null) { - schema_ = com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.getDefaultInstance(); - } else { - schemaBuilder_.clear(); - } + max_ = 0D; bitField0_ = (bitField0_ & ~0x00000004); + avg_ = 0D; + bitField0_ = (bitField0_ & ~0x00000008); + sum_ = 0D; + bitField0_ = (bitField0_ & ~0x00000010); return this; } @@ -19907,24 +16553,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.Search.StatsAggResult.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.Search.StatsAggResult getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.StatsAggResult.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest build() { - com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.Search.StatsAggResult build() { + com.alicloud.openservices.tablestore.core.protocol.Search.StatsAggResult result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.Search.StatsAggResult buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.Search.StatsAggResult result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -19932,64 +16578,66 @@ private com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIn return result; } - public com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest result = new com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest(this); + public com.alicloud.openservices.tablestore.core.protocol.Search.StatsAggResult buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.StatsAggResult result = new com.alicloud.openservices.tablestore.core.protocol.Search.StatsAggResult(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.tableName_ = tableName_; + result.count_ = count_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - result.indexName_ = indexName_; + result.min_ = min_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } - if (schemaBuilder_ == null) { - result.schema_ = schema_; - } else { - result.schema_ = schemaBuilder_.build(); + result.max_ = max_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.avg_ = avg_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; } + result.sum_ = sum_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.StatsAggResult) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.StatsAggResult)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest.getDefaultInstance()) return this; - if (other.hasTableName()) { - setTableName(other.getTableName()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.StatsAggResult other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.StatsAggResult.getDefaultInstance()) return this; + if (other.hasCount()) { + setCount(other.getCount()); } - if (other.hasIndexName()) { - setIndexName(other.getIndexName()); + if (other.hasMin()) { + setMin(other.getMin()); } - if (other.hasSchema()) { - mergeSchema(other.getSchema()); + if (other.hasMax()) { + setMax(other.getMax()); + } + if (other.hasAvg()) { + setAvg(other.getAvg()); + } + if (other.hasSum()) { + setSum(other.getSum()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { - if (!hasTableName()) { - - return false; - } - if (!hasIndexName()) { - - return false; - } return true; } @@ -20016,23 +16664,29 @@ public Builder mergeFrom( } break; } - case 10: { + case 8: { bitField0_ |= 0x00000001; - tableName_ = input.readBytes(); + count_ = input.readInt64(); break; } - case 18: { + case 17: { bitField0_ |= 0x00000002; - indexName_ = input.readBytes(); + min_ = input.readDouble(); break; } - case 26: { - com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.newBuilder(); - if (hasSchema()) { - subBuilder.mergeFrom(getSchema()); - } - input.readMessage(subBuilder, extensionRegistry); - setSchema(subBuilder.buildPartial()); + case 25: { + bitField0_ |= 0x00000004; + max_ = input.readDouble(); + break; + } + case 33: { + bitField0_ |= 0x00000008; + avg_ = input.readDouble(); + break; + } + case 41: { + bitField0_ |= 0x00000010; + sum_ = input.readDouble(); break; } } @@ -20041,211 +16695,305 @@ public Builder mergeFrom( private int bitField0_; - // required string table_name = 1; - private java.lang.Object tableName_ = ""; - public boolean hasTableName() { + // optional int64 count = 1; + private long count_ ; + public boolean hasCount() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getTableName() { - java.lang.Object ref = tableName_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - tableName_ = s; - return s; - } else { - return (String) ref; - } + public long getCount() { + return count_; } - public Builder setTableName(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - tableName_ = value; + public Builder setCount(long value) { + bitField0_ |= 0x00000001; + count_ = value; onChanged(); return this; } - public Builder clearTableName() { + public Builder clearCount() { bitField0_ = (bitField0_ & ~0x00000001); - tableName_ = getDefaultInstance().getTableName(); + count_ = 0L; onChanged(); return this; } - void setTableName(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; - tableName_ = value; - onChanged(); - } - // required string index_name = 2; - private java.lang.Object indexName_ = ""; - public boolean hasIndexName() { + // optional double min = 2; + private double min_ ; + public boolean hasMin() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public String getIndexName() { - java.lang.Object ref = indexName_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - indexName_ = s; - return s; - } else { - return (String) ref; - } + public double getMin() { + return min_; } - public Builder setIndexName(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - indexName_ = value; + public Builder setMin(double value) { + bitField0_ |= 0x00000002; + min_ = value; onChanged(); return this; } - public Builder clearIndexName() { + public Builder clearMin() { bitField0_ = (bitField0_ & ~0x00000002); - indexName_ = getDefaultInstance().getIndexName(); + min_ = 0D; onChanged(); return this; } - void setIndexName(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000002; - indexName_ = value; - onChanged(); - } - // optional .com.alicloud.openservices.tablestore.core.protocol.IndexSchema schema = 3; - private com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema schema_ = com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema, com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchemaOrBuilder> schemaBuilder_; - public boolean hasSchema() { + // optional double max = 3; + private double max_ ; + public boolean hasMax() { return ((bitField0_ & 0x00000004) == 0x00000004); } - public com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema getSchema() { - if (schemaBuilder_ == null) { - return schema_; - } else { - return schemaBuilder_.getMessage(); - } + public double getMax() { + return max_; } - public Builder setSchema(com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema value) { - if (schemaBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - schema_ = value; - onChanged(); - } else { - schemaBuilder_.setMessage(value); - } + public Builder setMax(double value) { bitField0_ |= 0x00000004; + max_ = value; + onChanged(); return this; } - public Builder setSchema( - com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.Builder builderForValue) { - if (schemaBuilder_ == null) { - schema_ = builderForValue.build(); - onChanged(); - } else { - schemaBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; + public Builder clearMax() { + bitField0_ = (bitField0_ & ~0x00000004); + max_ = 0D; + onChanged(); return this; } - public Builder mergeSchema(com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema value) { - if (schemaBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004) && - schema_ != com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.getDefaultInstance()) { - schema_ = - com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.newBuilder(schema_).mergeFrom(value).buildPartial(); - } else { - schema_ = value; - } - onChanged(); - } else { - schemaBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - return this; + + // optional double avg = 4; + private double avg_ ; + public boolean hasAvg() { + return ((bitField0_ & 0x00000008) == 0x00000008); } - public Builder clearSchema() { - if (schemaBuilder_ == null) { - schema_ = com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.getDefaultInstance(); - onChanged(); - } else { - schemaBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); + public double getAvg() { + return avg_; + } + public Builder setAvg(double value) { + bitField0_ |= 0x00000008; + avg_ = value; + onChanged(); return this; } - public com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.Builder getSchemaBuilder() { - bitField0_ |= 0x00000004; + public Builder clearAvg() { + bitField0_ = (bitField0_ & ~0x00000008); + avg_ = 0D; onChanged(); - return getSchemaFieldBuilder().getBuilder(); + return this; } - public com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchemaOrBuilder getSchemaOrBuilder() { - if (schemaBuilder_ != null) { - return schemaBuilder_.getMessageOrBuilder(); - } else { - return schema_; - } + + // optional double sum = 5; + private double sum_ ; + public boolean hasSum() { + return ((bitField0_ & 0x00000010) == 0x00000010); } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema, com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchemaOrBuilder> - getSchemaFieldBuilder() { - if (schemaBuilder_ == null) { - schemaBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema, com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchemaOrBuilder>( - schema_, - getParentForChildren(), - isClean()); - schema_ = null; - } - return schemaBuilder_; + public double getSum() { + return sum_; + } + public Builder setSum(double value) { + bitField0_ |= 0x00000010; + sum_ = value; + onChanged(); + return this; + } + public Builder clearSum() { + bitField0_ = (bitField0_ & ~0x00000010); + sum_ = 0D; + onChanged(); + return this; } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.CreateSearchIndexRequest) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.StatsAggResult) } static { - defaultInstance = new CreateSearchIndexRequest(true); + defaultInstance = new StatsAggResult(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.CreateSearchIndexRequest) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.StatsAggResult) } - public interface CreateSearchIndexResponseOrBuilder + public interface ExtendedStatsAggResultOrBuilder extends com.google.protobuf.MessageOrBuilder { + + // optional int64 count = 1; + boolean hasCount(); + long getCount(); + + // optional double min = 2; + boolean hasMin(); + double getMin(); + + // optional double max = 3; + boolean hasMax(); + double getMax(); + + // optional double avg = 4; + boolean hasAvg(); + double getAvg(); + + // optional double sum = 5; + boolean hasSum(); + double getSum(); + + // optional double sum_of_squares = 6; + boolean hasSumOfSquares(); + double getSumOfSquares(); + + // optional double variance = 7; + boolean hasVariance(); + double getVariance(); + + // optional double std_deviation = 8; + boolean hasStdDeviation(); + double getStdDeviation(); + + // optional double std_deviation_bounds_upper = 9; + boolean hasStdDeviationBoundsUpper(); + double getStdDeviationBoundsUpper(); + + // optional double std_deviation_bounds_lower = 10; + boolean hasStdDeviationBoundsLower(); + double getStdDeviationBoundsLower(); } - public static final class CreateSearchIndexResponse extends + public static final class ExtendedStatsAggResult extends com.google.protobuf.GeneratedMessage - implements CreateSearchIndexResponseOrBuilder { - // Use CreateSearchIndexResponse.newBuilder() to construct. - private CreateSearchIndexResponse(Builder builder) { + implements ExtendedStatsAggResultOrBuilder { + // Use ExtendedStatsAggResult.newBuilder() to construct. + private ExtendedStatsAggResult(Builder builder) { super(builder); } - private CreateSearchIndexResponse(boolean noInit) {} + private ExtendedStatsAggResult(boolean noInit) {} - private static final CreateSearchIndexResponse defaultInstance; - public static CreateSearchIndexResponse getDefaultInstance() { + private static final ExtendedStatsAggResult defaultInstance; + public static ExtendedStatsAggResult getDefaultInstance() { return defaultInstance; } - public CreateSearchIndexResponse getDefaultInstanceForType() { + public ExtendedStatsAggResult getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateSearchIndexResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ExtendedStatsAggResult_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateSearchIndexResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ExtendedStatsAggResult_fieldAccessorTable; + } + + private int bitField0_; + // optional int64 count = 1; + public static final int COUNT_FIELD_NUMBER = 1; + private long count_; + public boolean hasCount() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public long getCount() { + return count_; + } + + // optional double min = 2; + public static final int MIN_FIELD_NUMBER = 2; + private double min_; + public boolean hasMin() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public double getMin() { + return min_; + } + + // optional double max = 3; + public static final int MAX_FIELD_NUMBER = 3; + private double max_; + public boolean hasMax() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public double getMax() { + return max_; + } + + // optional double avg = 4; + public static final int AVG_FIELD_NUMBER = 4; + private double avg_; + public boolean hasAvg() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public double getAvg() { + return avg_; + } + + // optional double sum = 5; + public static final int SUM_FIELD_NUMBER = 5; + private double sum_; + public boolean hasSum() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public double getSum() { + return sum_; + } + + // optional double sum_of_squares = 6; + public static final int SUM_OF_SQUARES_FIELD_NUMBER = 6; + private double sumOfSquares_; + public boolean hasSumOfSquares() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + public double getSumOfSquares() { + return sumOfSquares_; + } + + // optional double variance = 7; + public static final int VARIANCE_FIELD_NUMBER = 7; + private double variance_; + public boolean hasVariance() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + public double getVariance() { + return variance_; + } + + // optional double std_deviation = 8; + public static final int STD_DEVIATION_FIELD_NUMBER = 8; + private double stdDeviation_; + public boolean hasStdDeviation() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + public double getStdDeviation() { + return stdDeviation_; + } + + // optional double std_deviation_bounds_upper = 9; + public static final int STD_DEVIATION_BOUNDS_UPPER_FIELD_NUMBER = 9; + private double stdDeviationBoundsUpper_; + public boolean hasStdDeviationBoundsUpper() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + public double getStdDeviationBoundsUpper() { + return stdDeviationBoundsUpper_; + } + + // optional double std_deviation_bounds_lower = 10; + public static final int STD_DEVIATION_BOUNDS_LOWER_FIELD_NUMBER = 10; + private double stdDeviationBoundsLower_; + public boolean hasStdDeviationBoundsLower() { + return ((bitField0_ & 0x00000200) == 0x00000200); + } + public double getStdDeviationBoundsLower() { + return stdDeviationBoundsLower_; } private void initFields() { + count_ = 0L; + min_ = 0D; + max_ = 0D; + avg_ = 0D; + sum_ = 0D; + sumOfSquares_ = 0D; + variance_ = 0D; + stdDeviation_ = 0D; + stdDeviationBoundsUpper_ = 0D; + stdDeviationBoundsLower_ = 0D; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -20259,6 +17007,36 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeInt64(1, count_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeDouble(2, min_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeDouble(3, max_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeDouble(4, avg_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeDouble(5, sum_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeDouble(6, sumOfSquares_); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + output.writeDouble(7, variance_); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + output.writeDouble(8, stdDeviation_); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + output.writeDouble(9, stdDeviationBoundsUpper_); + } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + output.writeDouble(10, stdDeviationBoundsLower_); + } getUnknownFields().writeTo(output); } @@ -20268,6 +17046,46 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, count_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(2, min_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(3, max_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(4, avg_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(5, sum_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(6, sumOfSquares_); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(7, variance_); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(8, stdDeviation_); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(9, stdDeviationBoundsUpper_); + } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(10, stdDeviationBoundsLower_); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -20280,41 +17098,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAggResult parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAggResult parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAggResult parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAggResult parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAggResult parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAggResult parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAggResult parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -20323,7 +17141,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.CreateSe return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAggResult parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -20334,12 +17152,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.CreateSe return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAggResult parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAggResult parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -20349,7 +17167,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.CreateSe public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAggResult prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -20362,18 +17180,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponseOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAggResultOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateSearchIndexResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ExtendedStatsAggResult_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateSearchIndexResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ExtendedStatsAggResult_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAggResult.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -20392,6 +17210,26 @@ private static Builder create() { public Builder clear() { super.clear(); + count_ = 0L; + bitField0_ = (bitField0_ & ~0x00000001); + min_ = 0D; + bitField0_ = (bitField0_ & ~0x00000002); + max_ = 0D; + bitField0_ = (bitField0_ & ~0x00000004); + avg_ = 0D; + bitField0_ = (bitField0_ & ~0x00000008); + sum_ = 0D; + bitField0_ = (bitField0_ & ~0x00000010); + sumOfSquares_ = 0D; + bitField0_ = (bitField0_ & ~0x00000020); + variance_ = 0D; + bitField0_ = (bitField0_ & ~0x00000040); + stdDeviation_ = 0D; + bitField0_ = (bitField0_ & ~0x00000080); + stdDeviationBoundsUpper_ = 0D; + bitField0_ = (bitField0_ & ~0x00000100); + stdDeviationBoundsLower_ = 0D; + bitField0_ = (bitField0_ & ~0x00000200); return this; } @@ -20401,24 +17239,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAggResult.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAggResult getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAggResult.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse build() { - com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAggResult build() { + com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAggResult result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAggResult buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAggResult result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -20426,23 +17264,96 @@ private com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIn return result; } - public com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse result = new com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse(this); + public com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAggResult buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAggResult result = new com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAggResult(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.count_ = count_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.min_ = min_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.max_ = max_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.avg_ = avg_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + result.sum_ = sum_; + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000020; + } + result.sumOfSquares_ = sumOfSquares_; + if (((from_bitField0_ & 0x00000040) == 0x00000040)) { + to_bitField0_ |= 0x00000040; + } + result.variance_ = variance_; + if (((from_bitField0_ & 0x00000080) == 0x00000080)) { + to_bitField0_ |= 0x00000080; + } + result.stdDeviation_ = stdDeviation_; + if (((from_bitField0_ & 0x00000100) == 0x00000100)) { + to_bitField0_ |= 0x00000100; + } + result.stdDeviationBoundsUpper_ = stdDeviationBoundsUpper_; + if (((from_bitField0_ & 0x00000200) == 0x00000200)) { + to_bitField0_ |= 0x00000200; + } + result.stdDeviationBoundsLower_ = stdDeviationBoundsLower_; + result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAggResult) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAggResult)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse.getDefaultInstance()) return this; + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAggResult other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAggResult.getDefaultInstance()) return this; + if (other.hasCount()) { + setCount(other.getCount()); + } + if (other.hasMin()) { + setMin(other.getMin()); + } + if (other.hasMax()) { + setMax(other.getMax()); + } + if (other.hasAvg()) { + setAvg(other.getAvg()); + } + if (other.hasSum()) { + setSum(other.getSum()); + } + if (other.hasSumOfSquares()) { + setSumOfSquares(other.getSumOfSquares()); + } + if (other.hasVariance()) { + setVariance(other.getVariance()); + } + if (other.hasStdDeviation()) { + setStdDeviation(other.getStdDeviation()); + } + if (other.hasStdDeviationBoundsUpper()) { + setStdDeviationBoundsUpper(other.getStdDeviationBoundsUpper()); + } + if (other.hasStdDeviationBoundsLower()) { + setStdDeviationBoundsLower(other.getStdDeviationBoundsLower()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -20474,129 +17385,346 @@ public Builder mergeFrom( } break; } - } - } - } - - - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.CreateSearchIndexResponse) - } - - static { - defaultInstance = new CreateSearchIndexResponse(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.CreateSearchIndexResponse) - } - - public interface IndexInfoOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional string table_name = 1; - boolean hasTableName(); - String getTableName(); + case 8: { + bitField0_ |= 0x00000001; + count_ = input.readInt64(); + break; + } + case 17: { + bitField0_ |= 0x00000002; + min_ = input.readDouble(); + break; + } + case 25: { + bitField0_ |= 0x00000004; + max_ = input.readDouble(); + break; + } + case 33: { + bitField0_ |= 0x00000008; + avg_ = input.readDouble(); + break; + } + case 41: { + bitField0_ |= 0x00000010; + sum_ = input.readDouble(); + break; + } + case 49: { + bitField0_ |= 0x00000020; + sumOfSquares_ = input.readDouble(); + break; + } + case 57: { + bitField0_ |= 0x00000040; + variance_ = input.readDouble(); + break; + } + case 65: { + bitField0_ |= 0x00000080; + stdDeviation_ = input.readDouble(); + break; + } + case 73: { + bitField0_ |= 0x00000100; + stdDeviationBoundsUpper_ = input.readDouble(); + break; + } + case 81: { + bitField0_ |= 0x00000200; + stdDeviationBoundsLower_ = input.readDouble(); + break; + } + } + } + } + + private int bitField0_; + + // optional int64 count = 1; + private long count_ ; + public boolean hasCount() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public long getCount() { + return count_; + } + public Builder setCount(long value) { + bitField0_ |= 0x00000001; + count_ = value; + onChanged(); + return this; + } + public Builder clearCount() { + bitField0_ = (bitField0_ & ~0x00000001); + count_ = 0L; + onChanged(); + return this; + } + + // optional double min = 2; + private double min_ ; + public boolean hasMin() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public double getMin() { + return min_; + } + public Builder setMin(double value) { + bitField0_ |= 0x00000002; + min_ = value; + onChanged(); + return this; + } + public Builder clearMin() { + bitField0_ = (bitField0_ & ~0x00000002); + min_ = 0D; + onChanged(); + return this; + } + + // optional double max = 3; + private double max_ ; + public boolean hasMax() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public double getMax() { + return max_; + } + public Builder setMax(double value) { + bitField0_ |= 0x00000004; + max_ = value; + onChanged(); + return this; + } + public Builder clearMax() { + bitField0_ = (bitField0_ & ~0x00000004); + max_ = 0D; + onChanged(); + return this; + } + + // optional double avg = 4; + private double avg_ ; + public boolean hasAvg() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public double getAvg() { + return avg_; + } + public Builder setAvg(double value) { + bitField0_ |= 0x00000008; + avg_ = value; + onChanged(); + return this; + } + public Builder clearAvg() { + bitField0_ = (bitField0_ & ~0x00000008); + avg_ = 0D; + onChanged(); + return this; + } + + // optional double sum = 5; + private double sum_ ; + public boolean hasSum() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public double getSum() { + return sum_; + } + public Builder setSum(double value) { + bitField0_ |= 0x00000010; + sum_ = value; + onChanged(); + return this; + } + public Builder clearSum() { + bitField0_ = (bitField0_ & ~0x00000010); + sum_ = 0D; + onChanged(); + return this; + } + + // optional double sum_of_squares = 6; + private double sumOfSquares_ ; + public boolean hasSumOfSquares() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + public double getSumOfSquares() { + return sumOfSquares_; + } + public Builder setSumOfSquares(double value) { + bitField0_ |= 0x00000020; + sumOfSquares_ = value; + onChanged(); + return this; + } + public Builder clearSumOfSquares() { + bitField0_ = (bitField0_ & ~0x00000020); + sumOfSquares_ = 0D; + onChanged(); + return this; + } + + // optional double variance = 7; + private double variance_ ; + public boolean hasVariance() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + public double getVariance() { + return variance_; + } + public Builder setVariance(double value) { + bitField0_ |= 0x00000040; + variance_ = value; + onChanged(); + return this; + } + public Builder clearVariance() { + bitField0_ = (bitField0_ & ~0x00000040); + variance_ = 0D; + onChanged(); + return this; + } + + // optional double std_deviation = 8; + private double stdDeviation_ ; + public boolean hasStdDeviation() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + public double getStdDeviation() { + return stdDeviation_; + } + public Builder setStdDeviation(double value) { + bitField0_ |= 0x00000080; + stdDeviation_ = value; + onChanged(); + return this; + } + public Builder clearStdDeviation() { + bitField0_ = (bitField0_ & ~0x00000080); + stdDeviation_ = 0D; + onChanged(); + return this; + } + + // optional double std_deviation_bounds_upper = 9; + private double stdDeviationBoundsUpper_ ; + public boolean hasStdDeviationBoundsUpper() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + public double getStdDeviationBoundsUpper() { + return stdDeviationBoundsUpper_; + } + public Builder setStdDeviationBoundsUpper(double value) { + bitField0_ |= 0x00000100; + stdDeviationBoundsUpper_ = value; + onChanged(); + return this; + } + public Builder clearStdDeviationBoundsUpper() { + bitField0_ = (bitField0_ & ~0x00000100); + stdDeviationBoundsUpper_ = 0D; + onChanged(); + return this; + } + + // optional double std_deviation_bounds_lower = 10; + private double stdDeviationBoundsLower_ ; + public boolean hasStdDeviationBoundsLower() { + return ((bitField0_ & 0x00000200) == 0x00000200); + } + public double getStdDeviationBoundsLower() { + return stdDeviationBoundsLower_; + } + public Builder setStdDeviationBoundsLower(double value) { + bitField0_ |= 0x00000200; + stdDeviationBoundsLower_ = value; + onChanged(); + return this; + } + public Builder clearStdDeviationBoundsLower() { + bitField0_ = (bitField0_ & ~0x00000200); + stdDeviationBoundsLower_ = 0D; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.ExtendedStatsAggResult) + } - // optional string index_name = 2; - boolean hasIndexName(); - String getIndexName(); + static { + defaultInstance = new ExtendedStatsAggResult(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.ExtendedStatsAggResult) } - public static final class IndexInfo extends + + public interface PercentileOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional double percent = 1; + boolean hasPercent(); + double getPercent(); + + // optional double value = 2; + boolean hasValue(); + double getValue(); + } + public static final class Percentile extends com.google.protobuf.GeneratedMessage - implements IndexInfoOrBuilder { - // Use IndexInfo.newBuilder() to construct. - private IndexInfo(Builder builder) { + implements PercentileOrBuilder { + // Use Percentile.newBuilder() to construct. + private Percentile(Builder builder) { super(builder); } - private IndexInfo(boolean noInit) {} + private Percentile(boolean noInit) {} - private static final IndexInfo defaultInstance; - public static IndexInfo getDefaultInstance() { + private static final Percentile defaultInstance; + public static Percentile getDefaultInstance() { return defaultInstance; } - public IndexInfo getDefaultInstanceForType() { + public Percentile getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_IndexInfo_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Percentile_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_IndexInfo_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Percentile_fieldAccessorTable; } private int bitField0_; - // optional string table_name = 1; - public static final int TABLE_NAME_FIELD_NUMBER = 1; - private java.lang.Object tableName_; - public boolean hasTableName() { + // optional double percent = 1; + public static final int PERCENT_FIELD_NUMBER = 1; + private double percent_; + public boolean hasPercent() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getTableName() { - java.lang.Object ref = tableName_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - tableName_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getTableNameBytes() { - java.lang.Object ref = tableName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - tableName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public double getPercent() { + return percent_; } - // optional string index_name = 2; - public static final int INDEX_NAME_FIELD_NUMBER = 2; - private java.lang.Object indexName_; - public boolean hasIndexName() { + // optional double value = 2; + public static final int VALUE_FIELD_NUMBER = 2; + private double value_; + public boolean hasValue() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public String getIndexName() { - java.lang.Object ref = indexName_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - indexName_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getIndexNameBytes() { - java.lang.Object ref = indexName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - indexName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public double getValue() { + return value_; } private void initFields() { - tableName_ = ""; - indexName_ = ""; + percent_ = 0D; + value_ = 0D; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -20611,10 +17739,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getTableNameBytes()); + output.writeDouble(1, percent_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getIndexNameBytes()); + output.writeDouble(2, value_); } getUnknownFields().writeTo(output); } @@ -20627,11 +17755,11 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getTableNameBytes()); + .computeDoubleSize(1, percent_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getIndexNameBytes()); + .computeDoubleSize(2, value_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -20645,41 +17773,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.Percentile parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.Percentile parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.Search.Percentile parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.Percentile parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.Percentile parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.Percentile parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.Percentile parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -20688,7 +17816,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexInf return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.Percentile parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -20699,12 +17827,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexInf return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.Percentile parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.Percentile parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -20714,7 +17842,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexInf public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.Percentile prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -20727,18 +17855,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfoOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.Search.PercentileOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_IndexInfo_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Percentile_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_IndexInfo_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Percentile_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.Percentile.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -20757,9 +17885,9 @@ private static Builder create() { public Builder clear() { super.clear(); - tableName_ = ""; + percent_ = 0D; bitField0_ = (bitField0_ & ~0x00000001); - indexName_ = ""; + value_ = 0D; bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -20770,24 +17898,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.Search.Percentile.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.Search.Percentile getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.Percentile.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo build() { - com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.Search.Percentile build() { + com.alicloud.openservices.tablestore.core.protocol.Search.Percentile result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.Search.Percentile buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.Search.Percentile result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -20795,39 +17923,39 @@ private com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo buil return result; } - public com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo result = new com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo(this); + public com.alicloud.openservices.tablestore.core.protocol.Search.Percentile buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.Percentile result = new com.alicloud.openservices.tablestore.core.protocol.Search.Percentile(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.tableName_ = tableName_; + result.percent_ = percent_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - result.indexName_ = indexName_; + result.value_ = value_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.Percentile) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.Percentile)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo.getDefaultInstance()) return this; - if (other.hasTableName()) { - setTableName(other.getTableName()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.Percentile other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.Percentile.getDefaultInstance()) return this; + if (other.hasPercent()) { + setPercent(other.getPercent()); } - if (other.hasIndexName()) { - setIndexName(other.getIndexName()); + if (other.hasValue()) { + setValue(other.getValue()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -20860,14 +17988,14 @@ public Builder mergeFrom( } break; } - case 10: { + case 9: { bitField0_ |= 0x00000001; - tableName_ = input.readBytes(); + percent_ = input.readDouble(); break; } - case 18: { + case 17: { bitField0_ |= 0x00000002; - indexName_ = input.readBytes(); + value_ = input.readDouble(); break; } } @@ -20876,159 +18004,123 @@ public Builder mergeFrom( private int bitField0_; - // optional string table_name = 1; - private java.lang.Object tableName_ = ""; - public boolean hasTableName() { + // optional double percent = 1; + private double percent_ ; + public boolean hasPercent() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getTableName() { - java.lang.Object ref = tableName_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - tableName_ = s; - return s; - } else { - return (String) ref; - } + public double getPercent() { + return percent_; } - public Builder setTableName(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - tableName_ = value; + public Builder setPercent(double value) { + bitField0_ |= 0x00000001; + percent_ = value; onChanged(); return this; } - public Builder clearTableName() { + public Builder clearPercent() { bitField0_ = (bitField0_ & ~0x00000001); - tableName_ = getDefaultInstance().getTableName(); + percent_ = 0D; onChanged(); return this; } - void setTableName(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; - tableName_ = value; - onChanged(); - } - // optional string index_name = 2; - private java.lang.Object indexName_ = ""; - public boolean hasIndexName() { + // optional double value = 2; + private double value_ ; + public boolean hasValue() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public String getIndexName() { - java.lang.Object ref = indexName_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - indexName_ = s; - return s; - } else { - return (String) ref; - } + public double getValue() { + return value_; } - public Builder setIndexName(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - indexName_ = value; + public Builder setValue(double value) { + bitField0_ |= 0x00000002; + value_ = value; onChanged(); return this; } - public Builder clearIndexName() { + public Builder clearValue() { bitField0_ = (bitField0_ & ~0x00000002); - indexName_ = getDefaultInstance().getIndexName(); + value_ = 0D; onChanged(); return this; } - void setIndexName(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000002; - indexName_ = value; - onChanged(); - } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.IndexInfo) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.Percentile) } static { - defaultInstance = new IndexInfo(true); + defaultInstance = new Percentile(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.IndexInfo) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.Percentile) } - public interface ListSearchIndexRequestOrBuilder + public interface PercentilesAggResultOrBuilder extends com.google.protobuf.MessageOrBuilder { - // optional string table_name = 1; - boolean hasTableName(); - String getTableName(); + // repeated .com.alicloud.openservices.tablestore.core.protocol.Percentile percentiles = 1; + java.util.List + getPercentilesList(); + com.alicloud.openservices.tablestore.core.protocol.Search.Percentile getPercentiles(int index); + int getPercentilesCount(); + java.util.List + getPercentilesOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.Search.PercentileOrBuilder getPercentilesOrBuilder( + int index); } - public static final class ListSearchIndexRequest extends + public static final class PercentilesAggResult extends com.google.protobuf.GeneratedMessage - implements ListSearchIndexRequestOrBuilder { - // Use ListSearchIndexRequest.newBuilder() to construct. - private ListSearchIndexRequest(Builder builder) { + implements PercentilesAggResultOrBuilder { + // Use PercentilesAggResult.newBuilder() to construct. + private PercentilesAggResult(Builder builder) { super(builder); } - private ListSearchIndexRequest(boolean noInit) {} + private PercentilesAggResult(boolean noInit) {} - private static final ListSearchIndexRequest defaultInstance; - public static ListSearchIndexRequest getDefaultInstance() { + private static final PercentilesAggResult defaultInstance; + public static PercentilesAggResult getDefaultInstance() { return defaultInstance; } - public ListSearchIndexRequest getDefaultInstanceForType() { + public PercentilesAggResult getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListSearchIndexRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentilesAggResult_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListSearchIndexRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentilesAggResult_fieldAccessorTable; } - private int bitField0_; - // optional string table_name = 1; - public static final int TABLE_NAME_FIELD_NUMBER = 1; - private java.lang.Object tableName_; - public boolean hasTableName() { - return ((bitField0_ & 0x00000001) == 0x00000001); + // repeated .com.alicloud.openservices.tablestore.core.protocol.Percentile percentiles = 1; + public static final int PERCENTILES_FIELD_NUMBER = 1; + private java.util.List percentiles_; + public java.util.List getPercentilesList() { + return percentiles_; } - public String getTableName() { - java.lang.Object ref = tableName_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - tableName_ = s; - } - return s; - } + public java.util.List + getPercentilesOrBuilderList() { + return percentiles_; } - private com.google.protobuf.ByteString getTableNameBytes() { - java.lang.Object ref = tableName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - tableName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public int getPercentilesCount() { + return percentiles_.size(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Percentile getPercentiles(int index) { + return percentiles_.get(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.PercentileOrBuilder getPercentilesOrBuilder( + int index) { + return percentiles_.get(index); } private void initFields() { - tableName_ = ""; + percentiles_ = java.util.Collections.emptyList(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -21042,8 +18134,8 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getTableNameBytes()); + for (int i = 0; i < percentiles_.size(); i++) { + output.writeMessage(1, percentiles_.get(i)); } getUnknownFields().writeTo(output); } @@ -21054,9 +18146,9 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { + for (int i = 0; i < percentiles_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getTableNameBytes()); + .computeMessageSize(1, percentiles_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -21070,41 +18162,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggResult parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggResult parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggResult parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggResult parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggResult parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggResult parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggResult parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -21113,7 +18205,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.ListSear return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggResult parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -21124,12 +18216,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.ListSear return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggResult parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggResult parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -21139,7 +18231,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.ListSear public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggResult prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -21152,18 +18244,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequestOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggResultOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListSearchIndexRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentilesAggResult_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListSearchIndexRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentilesAggResult_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggResult.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -21174,6 +18266,7 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getPercentilesFieldBuilder(); } } private static Builder create() { @@ -21182,8 +18275,12 @@ private static Builder create() { public Builder clear() { super.clear(); - tableName_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); + if (percentilesBuilder_ == null) { + percentiles_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + percentilesBuilder_.clear(); + } return this; } @@ -21193,24 +18290,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggResult.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggResult getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggResult.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest build() { - com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggResult build() { + com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggResult result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggResult buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggResult result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -21218,32 +18315,58 @@ private com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchInde return result; } - public com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest result = new com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest(this); + public com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggResult buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggResult result = new com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggResult(this); int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; + if (percentilesBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + percentiles_ = java.util.Collections.unmodifiableList(percentiles_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.percentiles_ = percentiles_; + } else { + result.percentiles_ = percentilesBuilder_.build(); } - result.tableName_ = tableName_; - result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggResult) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggResult)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest.getDefaultInstance()) return this; - if (other.hasTableName()) { - setTableName(other.getTableName()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggResult other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggResult.getDefaultInstance()) return this; + if (percentilesBuilder_ == null) { + if (!other.percentiles_.isEmpty()) { + if (percentiles_.isEmpty()) { + percentiles_ = other.percentiles_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePercentilesIsMutable(); + percentiles_.addAll(other.percentiles_); + } + onChanged(); + } + } else { + if (!other.percentiles_.isEmpty()) { + if (percentilesBuilder_.isEmpty()) { + percentilesBuilder_.dispose(); + percentilesBuilder_ = null; + percentiles_ = other.percentiles_; + bitField0_ = (bitField0_ & ~0x00000001); + percentilesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getPercentilesFieldBuilder() : null; + } else { + percentilesBuilder_.addAllMessages(other.percentiles_); + } + } } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -21277,8 +18400,9 @@ public Builder mergeFrom( break; } case 10: { - bitField0_ |= 0x00000001; - tableName_ = input.readBytes(); + com.alicloud.openservices.tablestore.core.protocol.Search.Percentile.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.Percentile.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addPercentiles(subBuilder.buildPartial()); break; } } @@ -21287,117 +18411,267 @@ public Builder mergeFrom( private int bitField0_; - // optional string table_name = 1; - private java.lang.Object tableName_ = ""; - public boolean hasTableName() { - return ((bitField0_ & 0x00000001) == 0x00000001); + // repeated .com.alicloud.openservices.tablestore.core.protocol.Percentile percentiles = 1; + private java.util.List percentiles_ = + java.util.Collections.emptyList(); + private void ensurePercentilesIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + percentiles_ = new java.util.ArrayList(percentiles_); + bitField0_ |= 0x00000001; + } } - public String getTableName() { - java.lang.Object ref = tableName_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - tableName_ = s; - return s; + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Percentile, com.alicloud.openservices.tablestore.core.protocol.Search.Percentile.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.PercentileOrBuilder> percentilesBuilder_; + + public java.util.List getPercentilesList() { + if (percentilesBuilder_ == null) { + return java.util.Collections.unmodifiableList(percentiles_); } else { - return (String) ref; + return percentilesBuilder_.getMessageList(); } } - public Builder setTableName(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - tableName_ = value; - onChanged(); + public int getPercentilesCount() { + if (percentilesBuilder_ == null) { + return percentiles_.size(); + } else { + return percentilesBuilder_.getCount(); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Percentile getPercentiles(int index) { + if (percentilesBuilder_ == null) { + return percentiles_.get(index); + } else { + return percentilesBuilder_.getMessage(index); + } + } + public Builder setPercentiles( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.Percentile value) { + if (percentilesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePercentilesIsMutable(); + percentiles_.set(index, value); + onChanged(); + } else { + percentilesBuilder_.setMessage(index, value); + } return this; } - public Builder clearTableName() { - bitField0_ = (bitField0_ & ~0x00000001); - tableName_ = getDefaultInstance().getTableName(); - onChanged(); + public Builder setPercentiles( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.Percentile.Builder builderForValue) { + if (percentilesBuilder_ == null) { + ensurePercentilesIsMutable(); + percentiles_.set(index, builderForValue.build()); + onChanged(); + } else { + percentilesBuilder_.setMessage(index, builderForValue.build()); + } return this; } - void setTableName(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; - tableName_ = value; - onChanged(); + public Builder addPercentiles(com.alicloud.openservices.tablestore.core.protocol.Search.Percentile value) { + if (percentilesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePercentilesIsMutable(); + percentiles_.add(value); + onChanged(); + } else { + percentilesBuilder_.addMessage(value); + } + return this; } - - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.ListSearchIndexRequest) - } - - static { - defaultInstance = new ListSearchIndexRequest(true); + public Builder addPercentiles( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.Percentile value) { + if (percentilesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePercentilesIsMutable(); + percentiles_.add(index, value); + onChanged(); + } else { + percentilesBuilder_.addMessage(index, value); + } + return this; + } + public Builder addPercentiles( + com.alicloud.openservices.tablestore.core.protocol.Search.Percentile.Builder builderForValue) { + if (percentilesBuilder_ == null) { + ensurePercentilesIsMutable(); + percentiles_.add(builderForValue.build()); + onChanged(); + } else { + percentilesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + public Builder addPercentiles( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.Percentile.Builder builderForValue) { + if (percentilesBuilder_ == null) { + ensurePercentilesIsMutable(); + percentiles_.add(index, builderForValue.build()); + onChanged(); + } else { + percentilesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAllPercentiles( + java.lang.Iterable values) { + if (percentilesBuilder_ == null) { + ensurePercentilesIsMutable(); + super.addAll(values, percentiles_); + onChanged(); + } else { + percentilesBuilder_.addAllMessages(values); + } + return this; + } + public Builder clearPercentiles() { + if (percentilesBuilder_ == null) { + percentiles_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + percentilesBuilder_.clear(); + } + return this; + } + public Builder removePercentiles(int index) { + if (percentilesBuilder_ == null) { + ensurePercentilesIsMutable(); + percentiles_.remove(index); + onChanged(); + } else { + percentilesBuilder_.remove(index); + } + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Percentile.Builder getPercentilesBuilder( + int index) { + return getPercentilesFieldBuilder().getBuilder(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.PercentileOrBuilder getPercentilesOrBuilder( + int index) { + if (percentilesBuilder_ == null) { + return percentiles_.get(index); } else { + return percentilesBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getPercentilesOrBuilderList() { + if (percentilesBuilder_ != null) { + return percentilesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(percentiles_); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Percentile.Builder addPercentilesBuilder() { + return getPercentilesFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.Search.Percentile.getDefaultInstance()); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Percentile.Builder addPercentilesBuilder( + int index) { + return getPercentilesFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.Search.Percentile.getDefaultInstance()); + } + public java.util.List + getPercentilesBuilderList() { + return getPercentilesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Percentile, com.alicloud.openservices.tablestore.core.protocol.Search.Percentile.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.PercentileOrBuilder> + getPercentilesFieldBuilder() { + if (percentilesBuilder_ == null) { + percentilesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Percentile, com.alicloud.openservices.tablestore.core.protocol.Search.Percentile.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.PercentileOrBuilder>( + percentiles_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + percentiles_ = null; + } + return percentilesBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.PercentilesAggResult) + } + + static { + defaultInstance = new PercentilesAggResult(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.ListSearchIndexRequest) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.PercentilesAggResult) } - public interface ListSearchIndexResponseOrBuilder + public interface PercentileRanksAggResultOrBuilder extends com.google.protobuf.MessageOrBuilder { - // repeated .com.alicloud.openservices.tablestore.core.protocol.IndexInfo indices = 1; - java.util.List - getIndicesList(); - com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo getIndices(int index); - int getIndicesCount(); - java.util.List - getIndicesOrBuilderList(); - com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfoOrBuilder getIndicesOrBuilder( + // repeated .com.alicloud.openservices.tablestore.core.protocol.Percentile percentiles = 1; + java.util.List + getPercentilesList(); + com.alicloud.openservices.tablestore.core.protocol.Search.Percentile getPercentiles(int index); + int getPercentilesCount(); + java.util.List + getPercentilesOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.Search.PercentileOrBuilder getPercentilesOrBuilder( int index); } - public static final class ListSearchIndexResponse extends + public static final class PercentileRanksAggResult extends com.google.protobuf.GeneratedMessage - implements ListSearchIndexResponseOrBuilder { - // Use ListSearchIndexResponse.newBuilder() to construct. - private ListSearchIndexResponse(Builder builder) { + implements PercentileRanksAggResultOrBuilder { + // Use PercentileRanksAggResult.newBuilder() to construct. + private PercentileRanksAggResult(Builder builder) { super(builder); } - private ListSearchIndexResponse(boolean noInit) {} + private PercentileRanksAggResult(boolean noInit) {} - private static final ListSearchIndexResponse defaultInstance; - public static ListSearchIndexResponse getDefaultInstance() { + private static final PercentileRanksAggResult defaultInstance; + public static PercentileRanksAggResult getDefaultInstance() { return defaultInstance; } - public ListSearchIndexResponse getDefaultInstanceForType() { + public PercentileRanksAggResult getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListSearchIndexResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentileRanksAggResult_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListSearchIndexResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentileRanksAggResult_fieldAccessorTable; } - // repeated .com.alicloud.openservices.tablestore.core.protocol.IndexInfo indices = 1; - public static final int INDICES_FIELD_NUMBER = 1; - private java.util.List indices_; - public java.util.List getIndicesList() { - return indices_; + // repeated .com.alicloud.openservices.tablestore.core.protocol.Percentile percentiles = 1; + public static final int PERCENTILES_FIELD_NUMBER = 1; + private java.util.List percentiles_; + public java.util.List getPercentilesList() { + return percentiles_; } - public java.util.List - getIndicesOrBuilderList() { - return indices_; + public java.util.List + getPercentilesOrBuilderList() { + return percentiles_; } - public int getIndicesCount() { - return indices_.size(); + public int getPercentilesCount() { + return percentiles_.size(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo getIndices(int index) { - return indices_.get(index); + public com.alicloud.openservices.tablestore.core.protocol.Search.Percentile getPercentiles(int index) { + return percentiles_.get(index); } - public com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfoOrBuilder getIndicesOrBuilder( + public com.alicloud.openservices.tablestore.core.protocol.Search.PercentileOrBuilder getPercentilesOrBuilder( int index) { - return indices_.get(index); + return percentiles_.get(index); } private void initFields() { - indices_ = java.util.Collections.emptyList(); + percentiles_ = java.util.Collections.emptyList(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -21411,8 +18685,8 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - for (int i = 0; i < indices_.size(); i++) { - output.writeMessage(1, indices_.get(i)); + for (int i = 0; i < percentiles_.size(); i++) { + output.writeMessage(1, percentiles_.get(i)); } getUnknownFields().writeTo(output); } @@ -21423,9 +18697,9 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - for (int i = 0; i < indices_.size(); i++) { + for (int i = 0; i < percentiles_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, indices_.get(i)); + .computeMessageSize(1, percentiles_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -21439,41 +18713,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAggResult parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAggResult parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAggResult parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAggResult parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAggResult parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAggResult parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAggResult parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -21482,7 +18756,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.ListSear return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAggResult parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -21493,12 +18767,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.ListSear return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAggResult parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAggResult parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -21508,7 +18782,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.ListSear public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAggResult prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -21521,18 +18795,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponseOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAggResultOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListSearchIndexResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentileRanksAggResult_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListSearchIndexResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentileRanksAggResult_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAggResult.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -21543,7 +18817,7 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getIndicesFieldBuilder(); + getPercentilesFieldBuilder(); } } private static Builder create() { @@ -21552,11 +18826,11 @@ private static Builder create() { public Builder clear() { super.clear(); - if (indicesBuilder_ == null) { - indices_ = java.util.Collections.emptyList(); + if (percentilesBuilder_ == null) { + percentiles_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { - indicesBuilder_.clear(); + percentilesBuilder_.clear(); } return this; } @@ -21567,24 +18841,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAggResult.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAggResult getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAggResult.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse build() { - com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAggResult build() { + com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAggResult result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAggResult buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAggResult result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -21592,56 +18866,56 @@ private com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchInde return result; } - public com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse result = new com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse(this); + public com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAggResult buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAggResult result = new com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAggResult(this); int from_bitField0_ = bitField0_; - if (indicesBuilder_ == null) { + if (percentilesBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001)) { - indices_ = java.util.Collections.unmodifiableList(indices_); + percentiles_ = java.util.Collections.unmodifiableList(percentiles_); bitField0_ = (bitField0_ & ~0x00000001); } - result.indices_ = indices_; + result.percentiles_ = percentiles_; } else { - result.indices_ = indicesBuilder_.build(); + result.percentiles_ = percentilesBuilder_.build(); } onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAggResult) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAggResult)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse.getDefaultInstance()) return this; - if (indicesBuilder_ == null) { - if (!other.indices_.isEmpty()) { - if (indices_.isEmpty()) { - indices_ = other.indices_; + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAggResult other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAggResult.getDefaultInstance()) return this; + if (percentilesBuilder_ == null) { + if (!other.percentiles_.isEmpty()) { + if (percentiles_.isEmpty()) { + percentiles_ = other.percentiles_; bitField0_ = (bitField0_ & ~0x00000001); } else { - ensureIndicesIsMutable(); - indices_.addAll(other.indices_); + ensurePercentilesIsMutable(); + percentiles_.addAll(other.percentiles_); } onChanged(); } } else { - if (!other.indices_.isEmpty()) { - if (indicesBuilder_.isEmpty()) { - indicesBuilder_.dispose(); - indicesBuilder_ = null; - indices_ = other.indices_; + if (!other.percentiles_.isEmpty()) { + if (percentilesBuilder_.isEmpty()) { + percentilesBuilder_.dispose(); + percentilesBuilder_ = null; + percentiles_ = other.percentiles_; bitField0_ = (bitField0_ & ~0x00000001); - indicesBuilder_ = + percentilesBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getIndicesFieldBuilder() : null; + getPercentilesFieldBuilder() : null; } else { - indicesBuilder_.addAllMessages(other.indices_); + percentilesBuilder_.addAllMessages(other.percentiles_); } } } @@ -21677,9 +18951,9 @@ public Builder mergeFrom( break; } case 10: { - com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo.newBuilder(); + com.alicloud.openservices.tablestore.core.protocol.Search.Percentile.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.Percentile.newBuilder(); input.readMessage(subBuilder, extensionRegistry); - addIndices(subBuilder.buildPartial()); + addPercentiles(subBuilder.buildPartial()); break; } } @@ -21688,310 +18962,251 @@ public Builder mergeFrom( private int bitField0_; - // repeated .com.alicloud.openservices.tablestore.core.protocol.IndexInfo indices = 1; - private java.util.List indices_ = + // repeated .com.alicloud.openservices.tablestore.core.protocol.Percentile percentiles = 1; + private java.util.List percentiles_ = java.util.Collections.emptyList(); - private void ensureIndicesIsMutable() { + private void ensurePercentilesIsMutable() { if (!((bitField0_ & 0x00000001) == 0x00000001)) { - indices_ = new java.util.ArrayList(indices_); + percentiles_ = new java.util.ArrayList(percentiles_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo, com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfoOrBuilder> indicesBuilder_; + com.alicloud.openservices.tablestore.core.protocol.Search.Percentile, com.alicloud.openservices.tablestore.core.protocol.Search.Percentile.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.PercentileOrBuilder> percentilesBuilder_; - public java.util.List getIndicesList() { - if (indicesBuilder_ == null) { - return java.util.Collections.unmodifiableList(indices_); + public java.util.List getPercentilesList() { + if (percentilesBuilder_ == null) { + return java.util.Collections.unmodifiableList(percentiles_); } else { - return indicesBuilder_.getMessageList(); + return percentilesBuilder_.getMessageList(); } } - public int getIndicesCount() { - if (indicesBuilder_ == null) { - return indices_.size(); + public int getPercentilesCount() { + if (percentilesBuilder_ == null) { + return percentiles_.size(); } else { - return indicesBuilder_.getCount(); + return percentilesBuilder_.getCount(); } } - public com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo getIndices(int index) { - if (indicesBuilder_ == null) { - return indices_.get(index); + public com.alicloud.openservices.tablestore.core.protocol.Search.Percentile getPercentiles(int index) { + if (percentilesBuilder_ == null) { + return percentiles_.get(index); } else { - return indicesBuilder_.getMessage(index); + return percentilesBuilder_.getMessage(index); } } - public Builder setIndices( - int index, com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo value) { - if (indicesBuilder_ == null) { + public Builder setPercentiles( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.Percentile value) { + if (percentilesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureIndicesIsMutable(); - indices_.set(index, value); + ensurePercentilesIsMutable(); + percentiles_.set(index, value); onChanged(); } else { - indicesBuilder_.setMessage(index, value); + percentilesBuilder_.setMessage(index, value); } return this; } - public Builder setIndices( - int index, com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo.Builder builderForValue) { - if (indicesBuilder_ == null) { - ensureIndicesIsMutable(); - indices_.set(index, builderForValue.build()); + public Builder setPercentiles( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.Percentile.Builder builderForValue) { + if (percentilesBuilder_ == null) { + ensurePercentilesIsMutable(); + percentiles_.set(index, builderForValue.build()); onChanged(); } else { - indicesBuilder_.setMessage(index, builderForValue.build()); + percentilesBuilder_.setMessage(index, builderForValue.build()); } return this; } - public Builder addIndices(com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo value) { - if (indicesBuilder_ == null) { + public Builder addPercentiles(com.alicloud.openservices.tablestore.core.protocol.Search.Percentile value) { + if (percentilesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureIndicesIsMutable(); - indices_.add(value); + ensurePercentilesIsMutable(); + percentiles_.add(value); onChanged(); } else { - indicesBuilder_.addMessage(value); + percentilesBuilder_.addMessage(value); } return this; } - public Builder addIndices( - int index, com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo value) { - if (indicesBuilder_ == null) { + public Builder addPercentiles( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.Percentile value) { + if (percentilesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureIndicesIsMutable(); - indices_.add(index, value); + ensurePercentilesIsMutable(); + percentiles_.add(index, value); onChanged(); } else { - indicesBuilder_.addMessage(index, value); + percentilesBuilder_.addMessage(index, value); } return this; } - public Builder addIndices( - com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo.Builder builderForValue) { - if (indicesBuilder_ == null) { - ensureIndicesIsMutable(); - indices_.add(builderForValue.build()); + public Builder addPercentiles( + com.alicloud.openservices.tablestore.core.protocol.Search.Percentile.Builder builderForValue) { + if (percentilesBuilder_ == null) { + ensurePercentilesIsMutable(); + percentiles_.add(builderForValue.build()); onChanged(); } else { - indicesBuilder_.addMessage(builderForValue.build()); + percentilesBuilder_.addMessage(builderForValue.build()); } return this; } - public Builder addIndices( - int index, com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo.Builder builderForValue) { - if (indicesBuilder_ == null) { - ensureIndicesIsMutable(); - indices_.add(index, builderForValue.build()); + public Builder addPercentiles( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.Percentile.Builder builderForValue) { + if (percentilesBuilder_ == null) { + ensurePercentilesIsMutable(); + percentiles_.add(index, builderForValue.build()); onChanged(); } else { - indicesBuilder_.addMessage(index, builderForValue.build()); + percentilesBuilder_.addMessage(index, builderForValue.build()); } return this; } - public Builder addAllIndices( - java.lang.Iterable values) { - if (indicesBuilder_ == null) { - ensureIndicesIsMutable(); - super.addAll(values, indices_); + public Builder addAllPercentiles( + java.lang.Iterable values) { + if (percentilesBuilder_ == null) { + ensurePercentilesIsMutable(); + super.addAll(values, percentiles_); onChanged(); } else { - indicesBuilder_.addAllMessages(values); + percentilesBuilder_.addAllMessages(values); } return this; } - public Builder clearIndices() { - if (indicesBuilder_ == null) { - indices_ = java.util.Collections.emptyList(); + public Builder clearPercentiles() { + if (percentilesBuilder_ == null) { + percentiles_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { - indicesBuilder_.clear(); + percentilesBuilder_.clear(); } return this; } - public Builder removeIndices(int index) { - if (indicesBuilder_ == null) { - ensureIndicesIsMutable(); - indices_.remove(index); + public Builder removePercentiles(int index) { + if (percentilesBuilder_ == null) { + ensurePercentilesIsMutable(); + percentiles_.remove(index); onChanged(); } else { - indicesBuilder_.remove(index); + percentilesBuilder_.remove(index); } return this; } - public com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo.Builder getIndicesBuilder( + public com.alicloud.openservices.tablestore.core.protocol.Search.Percentile.Builder getPercentilesBuilder( int index) { - return getIndicesFieldBuilder().getBuilder(index); + return getPercentilesFieldBuilder().getBuilder(index); } - public com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfoOrBuilder getIndicesOrBuilder( + public com.alicloud.openservices.tablestore.core.protocol.Search.PercentileOrBuilder getPercentilesOrBuilder( int index) { - if (indicesBuilder_ == null) { - return indices_.get(index); } else { - return indicesBuilder_.getMessageOrBuilder(index); + if (percentilesBuilder_ == null) { + return percentiles_.get(index); } else { + return percentilesBuilder_.getMessageOrBuilder(index); } } - public java.util.List - getIndicesOrBuilderList() { - if (indicesBuilder_ != null) { - return indicesBuilder_.getMessageOrBuilderList(); + public java.util.List + getPercentilesOrBuilderList() { + if (percentilesBuilder_ != null) { + return percentilesBuilder_.getMessageOrBuilderList(); } else { - return java.util.Collections.unmodifiableList(indices_); + return java.util.Collections.unmodifiableList(percentiles_); } } - public com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo.Builder addIndicesBuilder() { - return getIndicesFieldBuilder().addBuilder( - com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo.getDefaultInstance()); + public com.alicloud.openservices.tablestore.core.protocol.Search.Percentile.Builder addPercentilesBuilder() { + return getPercentilesFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.Search.Percentile.getDefaultInstance()); } - public com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo.Builder addIndicesBuilder( + public com.alicloud.openservices.tablestore.core.protocol.Search.Percentile.Builder addPercentilesBuilder( int index) { - return getIndicesFieldBuilder().addBuilder( - index, com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo.getDefaultInstance()); + return getPercentilesFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.Search.Percentile.getDefaultInstance()); } - public java.util.List - getIndicesBuilderList() { - return getIndicesFieldBuilder().getBuilderList(); + public java.util.List + getPercentilesBuilderList() { + return getPercentilesFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo, com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfoOrBuilder> - getIndicesFieldBuilder() { - if (indicesBuilder_ == null) { - indicesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo, com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfoOrBuilder>( - indices_, + com.alicloud.openservices.tablestore.core.protocol.Search.Percentile, com.alicloud.openservices.tablestore.core.protocol.Search.Percentile.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.PercentileOrBuilder> + getPercentilesFieldBuilder() { + if (percentilesBuilder_ == null) { + percentilesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Percentile, com.alicloud.openservices.tablestore.core.protocol.Search.Percentile.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.PercentileOrBuilder>( + percentiles_, ((bitField0_ & 0x00000001) == 0x00000001), getParentForChildren(), isClean()); - indices_ = null; + percentiles_ = null; } - return indicesBuilder_; + return percentilesBuilder_; } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.ListSearchIndexResponse) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.PercentileRanksAggResult) } static { - defaultInstance = new ListSearchIndexResponse(true); + defaultInstance = new PercentileRanksAggResult(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.ListSearchIndexResponse) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.PercentileRanksAggResult) } - public interface DeleteSearchIndexRequestOrBuilder + public interface ValueCountAggResultOrBuilder extends com.google.protobuf.MessageOrBuilder { - // optional string table_name = 1; - boolean hasTableName(); - String getTableName(); - - // optional string index_name = 2; - boolean hasIndexName(); - String getIndexName(); + // optional int64 count = 1; + boolean hasCount(); + long getCount(); } - public static final class DeleteSearchIndexRequest extends + public static final class ValueCountAggResult extends com.google.protobuf.GeneratedMessage - implements DeleteSearchIndexRequestOrBuilder { - // Use DeleteSearchIndexRequest.newBuilder() to construct. - private DeleteSearchIndexRequest(Builder builder) { + implements ValueCountAggResultOrBuilder { + // Use ValueCountAggResult.newBuilder() to construct. + private ValueCountAggResult(Builder builder) { super(builder); } - private DeleteSearchIndexRequest(boolean noInit) {} + private ValueCountAggResult(boolean noInit) {} - private static final DeleteSearchIndexRequest defaultInstance; - public static DeleteSearchIndexRequest getDefaultInstance() { + private static final ValueCountAggResult defaultInstance; + public static ValueCountAggResult getDefaultInstance() { return defaultInstance; } - public DeleteSearchIndexRequest getDefaultInstanceForType() { + public ValueCountAggResult getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteSearchIndexRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ValueCountAggResult_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteSearchIndexRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ValueCountAggResult_fieldAccessorTable; } private int bitField0_; - // optional string table_name = 1; - public static final int TABLE_NAME_FIELD_NUMBER = 1; - private java.lang.Object tableName_; - public boolean hasTableName() { + // optional int64 count = 1; + public static final int COUNT_FIELD_NUMBER = 1; + private long count_; + public boolean hasCount() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getTableName() { - java.lang.Object ref = tableName_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - tableName_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getTableNameBytes() { - java.lang.Object ref = tableName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - tableName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // optional string index_name = 2; - public static final int INDEX_NAME_FIELD_NUMBER = 2; - private java.lang.Object indexName_; - public boolean hasIndexName() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public String getIndexName() { - java.lang.Object ref = indexName_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - indexName_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getIndexNameBytes() { - java.lang.Object ref = indexName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - indexName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public long getCount() { + return count_; } private void initFields() { - tableName_ = ""; - indexName_ = ""; + count_ = 0L; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -22006,10 +19221,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getTableNameBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getIndexNameBytes()); + output.writeInt64(1, count_); } getUnknownFields().writeTo(output); } @@ -22022,11 +19234,7 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getTableNameBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getIndexNameBytes()); + .computeInt64Size(1, count_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -22040,41 +19248,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAggResult parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAggResult parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAggResult parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAggResult parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAggResult parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAggResult parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAggResult parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -22083,7 +19291,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSe return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAggResult parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -22094,12 +19302,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSe return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAggResult parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAggResult parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -22109,7 +19317,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSe public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAggResult prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -22122,18 +19330,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequestOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAggResultOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteSearchIndexRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ValueCountAggResult_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteSearchIndexRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ValueCountAggResult_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAggResult.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -22152,10 +19360,8 @@ private static Builder create() { public Builder clear() { super.clear(); - tableName_ = ""; + count_ = 0L; bitField0_ = (bitField0_ & ~0x00000001); - indexName_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -22165,24 +19371,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAggResult.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAggResult getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAggResult.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest build() { - com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAggResult build() { + com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAggResult result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAggResult buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAggResult result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -22190,39 +19396,32 @@ private com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIn return result; } - public com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest result = new com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest(this); + public com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAggResult buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAggResult result = new com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAggResult(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.tableName_ = tableName_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.indexName_ = indexName_; + result.count_ = count_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAggResult) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAggResult)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest.getDefaultInstance()) return this; - if (other.hasTableName()) { - setTableName(other.getTableName()); - } - if (other.hasIndexName()) { - setIndexName(other.getIndexName()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAggResult other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAggResult.getDefaultInstance()) return this; + if (other.hasCount()) { + setCount(other.getCount()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -22255,14 +19454,9 @@ public Builder mergeFrom( } break; } - case 10: { + case 8: { bitField0_ |= 0x00000001; - tableName_ = input.readBytes(); - break; - } - case 18: { - bitField0_ |= 0x00000002; - indexName_ = input.readBytes(); + count_ = input.readInt64(); break; } } @@ -22271,121 +19465,138 @@ public Builder mergeFrom( private int bitField0_; - // optional string table_name = 1; - private java.lang.Object tableName_ = ""; - public boolean hasTableName() { + // optional int64 count = 1; + private long count_ ; + public boolean hasCount() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getTableName() { - java.lang.Object ref = tableName_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - tableName_ = s; - return s; - } else { - return (String) ref; - } - } - public Builder setTableName(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - tableName_ = value; - onChanged(); - return this; - } - public Builder clearTableName() { - bitField0_ = (bitField0_ & ~0x00000001); - tableName_ = getDefaultInstance().getTableName(); - onChanged(); - return this; + public long getCount() { + return count_; } - void setTableName(com.google.protobuf.ByteString value) { + public Builder setCount(long value) { bitField0_ |= 0x00000001; - tableName_ = value; - onChanged(); - } - - // optional string index_name = 2; - private java.lang.Object indexName_ = ""; - public boolean hasIndexName() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public String getIndexName() { - java.lang.Object ref = indexName_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - indexName_ = s; - return s; - } else { - return (String) ref; - } - } - public Builder setIndexName(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - indexName_ = value; + count_ = value; onChanged(); return this; } - public Builder clearIndexName() { - bitField0_ = (bitField0_ & ~0x00000002); - indexName_ = getDefaultInstance().getIndexName(); + public Builder clearCount() { + bitField0_ = (bitField0_ & ~0x00000001); + count_ = 0L; onChanged(); return this; } - void setIndexName(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000002; - indexName_ = value; - onChanged(); - } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.DeleteSearchIndexRequest) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.ValueCountAggResult) } static { - defaultInstance = new DeleteSearchIndexRequest(true); + defaultInstance = new ValueCountAggResult(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.DeleteSearchIndexRequest) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.ValueCountAggResult) } - public interface DeleteSearchIndexResponseOrBuilder + public interface SubAggResultOrBuilder extends com.google.protobuf.MessageOrBuilder { + + // optional string name = 1; + boolean hasName(); + String getName(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.AggType type = 2; + boolean hasType(); + com.alicloud.openservices.tablestore.core.protocol.Search.AggType getType(); + + // optional bytes agg_result = 3; + boolean hasAggResult(); + com.google.protobuf.ByteString getAggResult(); } - public static final class DeleteSearchIndexResponse extends + public static final class SubAggResult extends com.google.protobuf.GeneratedMessage - implements DeleteSearchIndexResponseOrBuilder { - // Use DeleteSearchIndexResponse.newBuilder() to construct. - private DeleteSearchIndexResponse(Builder builder) { + implements SubAggResultOrBuilder { + // Use SubAggResult.newBuilder() to construct. + private SubAggResult(Builder builder) { super(builder); } - private DeleteSearchIndexResponse(boolean noInit) {} + private SubAggResult(boolean noInit) {} - private static final DeleteSearchIndexResponse defaultInstance; - public static DeleteSearchIndexResponse getDefaultInstance() { + private static final SubAggResult defaultInstance; + public static SubAggResult getDefaultInstance() { return defaultInstance; } - public DeleteSearchIndexResponse getDefaultInstanceForType() { + public SubAggResult getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteSearchIndexResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SubAggResult_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteSearchIndexResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SubAggResult_fieldAccessorTable; + } + + private int bitField0_; + // optional string name = 1; + public static final int NAME_FIELD_NUMBER = 1; + private java.lang.Object name_; + public boolean hasName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getName() { + java.lang.Object ref = name_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + name_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.AggType type = 2; + public static final int TYPE_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.Search.AggType type_; + public boolean hasType() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggType getType() { + return type_; + } + + // optional bytes agg_result = 3; + public static final int AGG_RESULT_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString aggResult_; + public boolean hasAggResult() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.google.protobuf.ByteString getAggResult() { + return aggResult_; } private void initFields() { + name_ = ""; + type_ = com.alicloud.openservices.tablestore.core.protocol.Search.AggType.AVG_AGG; + aggResult_ = com.google.protobuf.ByteString.EMPTY; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -22399,6 +19610,15 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeEnum(2, type_.getNumber()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeBytes(3, aggResult_); + } getUnknownFields().writeTo(output); } @@ -22408,6 +19628,18 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, type_.getNumber()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, aggResult_); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -22420,41 +19652,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResult parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResult parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResult parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResult parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResult parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResult parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResult parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -22463,7 +19695,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSe return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResult parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -22474,12 +19706,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSe return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResult parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResult parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -22489,7 +19721,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSe public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResult prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -22502,18 +19734,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponseOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResultOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteSearchIndexResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SubAggResult_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteSearchIndexResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SubAggResult_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResult.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -22532,6 +19764,12 @@ private static Builder create() { public Builder clear() { super.clear(); + name_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + type_ = com.alicloud.openservices.tablestore.core.protocol.Search.AggType.AVG_AGG; + bitField0_ = (bitField0_ & ~0x00000002); + aggResult_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); return this; } @@ -22541,24 +19779,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResult.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResult getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResult.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse build() { - com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResult build() { + com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResult result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResult buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResult result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -22566,23 +19804,47 @@ private com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIn return result; } - public com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse result = new com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse(this); + public com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResult buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResult result = new com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResult(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.name_ = name_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.type_ = type_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.aggResult_ = aggResult_; + result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResult) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResult)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse.getDefaultInstance()) return this; + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResult other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResult.getDefaultInstance()) return this; + if (other.hasName()) { + setName(other.getName()); + } + if (other.hasType()) { + setType(other.getType()); + } + if (other.hasAggResult()) { + setAggResult(other.getAggResult()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -22614,85 +19876,192 @@ public Builder mergeFrom( } break; } + case 10: { + bitField0_ |= 0x00000001; + name_ = input.readBytes(); + break; + } + case 16: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.Search.AggType value = com.alicloud.openservices.tablestore.core.protocol.Search.AggType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(2, rawValue); + } else { + bitField0_ |= 0x00000002; + type_ = value; + } + break; + } + case 26: { + bitField0_ |= 0x00000004; + aggResult_ = input.readBytes(); + break; + } } } } + private int bitField0_; - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.DeleteSearchIndexResponse) + // optional string name = 1; + private java.lang.Object name_ = ""; + public boolean hasName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + name_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + name_ = value; + onChanged(); + return this; + } + public Builder clearName() { + bitField0_ = (bitField0_ & ~0x00000001); + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + void setName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + name_ = value; + onChanged(); + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.AggType type = 2; + private com.alicloud.openservices.tablestore.core.protocol.Search.AggType type_ = com.alicloud.openservices.tablestore.core.protocol.Search.AggType.AVG_AGG; + public boolean hasType() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggType getType() { + return type_; + } + public Builder setType(com.alicloud.openservices.tablestore.core.protocol.Search.AggType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + type_ = value; + onChanged(); + return this; + } + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000002); + type_ = com.alicloud.openservices.tablestore.core.protocol.Search.AggType.AVG_AGG; + onChanged(); + return this; + } + + // optional bytes agg_result = 3; + private com.google.protobuf.ByteString aggResult_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasAggResult() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.google.protobuf.ByteString getAggResult() { + return aggResult_; + } + public Builder setAggResult(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + aggResult_ = value; + onChanged(); + return this; + } + public Builder clearAggResult() { + bitField0_ = (bitField0_ & ~0x00000004); + aggResult_ = getDefaultInstance().getAggResult(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.SubAggResult) } static { - defaultInstance = new DeleteSearchIndexResponse(true); + defaultInstance = new SubAggResult(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.DeleteSearchIndexResponse) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.SubAggResult) } - public interface SyncStatOrBuilder + public interface AggResultOrBuilder extends com.google.protobuf.MessageOrBuilder { - // optional .com.alicloud.openservices.tablestore.core.protocol.SyncPhase sync_phase = 1; - boolean hasSyncPhase(); - com.alicloud.openservices.tablestore.core.protocol.Search.SyncPhase getSyncPhase(); - - // optional int64 current_sync_timestamp = 2; - boolean hasCurrentSyncTimestamp(); - long getCurrentSyncTimestamp(); + // repeated .com.alicloud.openservices.tablestore.core.protocol.SubAggResult sub_agg_results = 1; + java.util.List + getSubAggResultsList(); + com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResult getSubAggResults(int index); + int getSubAggResultsCount(); + java.util.List + getSubAggResultsOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResultOrBuilder getSubAggResultsOrBuilder( + int index); } - public static final class SyncStat extends + public static final class AggResult extends com.google.protobuf.GeneratedMessage - implements SyncStatOrBuilder { - // Use SyncStat.newBuilder() to construct. - private SyncStat(Builder builder) { + implements AggResultOrBuilder { + // Use AggResult.newBuilder() to construct. + private AggResult(Builder builder) { super(builder); } - private SyncStat(boolean noInit) {} + private AggResult(boolean noInit) {} - private static final SyncStat defaultInstance; - public static SyncStat getDefaultInstance() { + private static final AggResult defaultInstance; + public static AggResult getDefaultInstance() { return defaultInstance; } - public SyncStat getDefaultInstanceForType() { + public AggResult getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SyncStat_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_AggResult_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SyncStat_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_AggResult_fieldAccessorTable; } - private int bitField0_; - // optional .com.alicloud.openservices.tablestore.core.protocol.SyncPhase sync_phase = 1; - public static final int SYNC_PHASE_FIELD_NUMBER = 1; - private com.alicloud.openservices.tablestore.core.protocol.Search.SyncPhase syncPhase_; - public boolean hasSyncPhase() { - return ((bitField0_ & 0x00000001) == 0x00000001); + // repeated .com.alicloud.openservices.tablestore.core.protocol.SubAggResult sub_agg_results = 1; + public static final int SUB_AGG_RESULTS_FIELD_NUMBER = 1; + private java.util.List subAggResults_; + public java.util.List getSubAggResultsList() { + return subAggResults_; } - public com.alicloud.openservices.tablestore.core.protocol.Search.SyncPhase getSyncPhase() { - return syncPhase_; + public java.util.List + getSubAggResultsOrBuilderList() { + return subAggResults_; } - - // optional int64 current_sync_timestamp = 2; - public static final int CURRENT_SYNC_TIMESTAMP_FIELD_NUMBER = 2; - private long currentSyncTimestamp_; - public boolean hasCurrentSyncTimestamp() { - return ((bitField0_ & 0x00000002) == 0x00000002); + public int getSubAggResultsCount() { + return subAggResults_.size(); } - public long getCurrentSyncTimestamp() { - return currentSyncTimestamp_; + public com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResult getSubAggResults(int index) { + return subAggResults_.get(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResultOrBuilder getSubAggResultsOrBuilder( + int index) { + return subAggResults_.get(index); } private void initFields() { - syncPhase_ = com.alicloud.openservices.tablestore.core.protocol.Search.SyncPhase.FULL; - currentSyncTimestamp_ = 0L; + subAggResults_ = java.util.Collections.emptyList(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -22706,11 +20075,8 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeEnum(1, syncPhase_.getNumber()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeInt64(2, currentSyncTimestamp_); + for (int i = 0; i < subAggResults_.size(); i++) { + output.writeMessage(1, subAggResults_.get(i)); } getUnknownFields().writeTo(output); } @@ -22721,13 +20087,9 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, syncPhase_.getNumber()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { + for (int i = 0; i < subAggResults_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeInt64Size(2, currentSyncTimestamp_); + .computeMessageSize(1, subAggResults_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -22741,41 +20103,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.AggResult parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.AggResult parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.Search.AggResult parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.AggResult parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.AggResult parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.AggResult parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.AggResult parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -22784,7 +20146,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.AggResult parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -22794,339 +20156,54879 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat } else { return null; } - } - public static com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.Search.SyncStatOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SyncStat_descriptor; + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.AggResult parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.AggResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.AggResult prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.AggResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_AggResult_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_AggResult_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.AggResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getSubAggResultsFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (subAggResultsBuilder_ == null) { + subAggResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + subAggResultsBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.AggResult.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.AggResult getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.AggResult.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.AggResult build() { + com.alicloud.openservices.tablestore.core.protocol.Search.AggResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.AggResult buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.AggResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.AggResult buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.AggResult result = new com.alicloud.openservices.tablestore.core.protocol.Search.AggResult(this); + int from_bitField0_ = bitField0_; + if (subAggResultsBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + subAggResults_ = java.util.Collections.unmodifiableList(subAggResults_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.subAggResults_ = subAggResults_; + } else { + result.subAggResults_ = subAggResultsBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.AggResult) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.AggResult)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.AggResult other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.AggResult.getDefaultInstance()) return this; + if (subAggResultsBuilder_ == null) { + if (!other.subAggResults_.isEmpty()) { + if (subAggResults_.isEmpty()) { + subAggResults_ = other.subAggResults_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSubAggResultsIsMutable(); + subAggResults_.addAll(other.subAggResults_); + } + onChanged(); + } + } else { + if (!other.subAggResults_.isEmpty()) { + if (subAggResultsBuilder_.isEmpty()) { + subAggResultsBuilder_.dispose(); + subAggResultsBuilder_ = null; + subAggResults_ = other.subAggResults_; + bitField0_ = (bitField0_ & ~0x00000001); + subAggResultsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getSubAggResultsFieldBuilder() : null; + } else { + subAggResultsBuilder_.addAllMessages(other.subAggResults_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResult.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResult.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addSubAggResults(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // repeated .com.alicloud.openservices.tablestore.core.protocol.SubAggResult sub_agg_results = 1; + private java.util.List subAggResults_ = + java.util.Collections.emptyList(); + private void ensureSubAggResultsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + subAggResults_ = new java.util.ArrayList(subAggResults_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResult, com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResult.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResultOrBuilder> subAggResultsBuilder_; + + public java.util.List getSubAggResultsList() { + if (subAggResultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(subAggResults_); + } else { + return subAggResultsBuilder_.getMessageList(); + } + } + public int getSubAggResultsCount() { + if (subAggResultsBuilder_ == null) { + return subAggResults_.size(); + } else { + return subAggResultsBuilder_.getCount(); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResult getSubAggResults(int index) { + if (subAggResultsBuilder_ == null) { + return subAggResults_.get(index); + } else { + return subAggResultsBuilder_.getMessage(index); + } + } + public Builder setSubAggResults( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResult value) { + if (subAggResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubAggResultsIsMutable(); + subAggResults_.set(index, value); + onChanged(); + } else { + subAggResultsBuilder_.setMessage(index, value); + } + return this; + } + public Builder setSubAggResults( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResult.Builder builderForValue) { + if (subAggResultsBuilder_ == null) { + ensureSubAggResultsIsMutable(); + subAggResults_.set(index, builderForValue.build()); + onChanged(); + } else { + subAggResultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + public Builder addSubAggResults(com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResult value) { + if (subAggResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubAggResultsIsMutable(); + subAggResults_.add(value); + onChanged(); + } else { + subAggResultsBuilder_.addMessage(value); + } + return this; + } + public Builder addSubAggResults( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResult value) { + if (subAggResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubAggResultsIsMutable(); + subAggResults_.add(index, value); + onChanged(); + } else { + subAggResultsBuilder_.addMessage(index, value); + } + return this; + } + public Builder addSubAggResults( + com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResult.Builder builderForValue) { + if (subAggResultsBuilder_ == null) { + ensureSubAggResultsIsMutable(); + subAggResults_.add(builderForValue.build()); + onChanged(); + } else { + subAggResultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + public Builder addSubAggResults( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResult.Builder builderForValue) { + if (subAggResultsBuilder_ == null) { + ensureSubAggResultsIsMutable(); + subAggResults_.add(index, builderForValue.build()); + onChanged(); + } else { + subAggResultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAllSubAggResults( + java.lang.Iterable values) { + if (subAggResultsBuilder_ == null) { + ensureSubAggResultsIsMutable(); + super.addAll(values, subAggResults_); + onChanged(); + } else { + subAggResultsBuilder_.addAllMessages(values); + } + return this; + } + public Builder clearSubAggResults() { + if (subAggResultsBuilder_ == null) { + subAggResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + subAggResultsBuilder_.clear(); + } + return this; + } + public Builder removeSubAggResults(int index) { + if (subAggResultsBuilder_ == null) { + ensureSubAggResultsIsMutable(); + subAggResults_.remove(index); + onChanged(); + } else { + subAggResultsBuilder_.remove(index); + } + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResult.Builder getSubAggResultsBuilder( + int index) { + return getSubAggResultsFieldBuilder().getBuilder(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResultOrBuilder getSubAggResultsOrBuilder( + int index) { + if (subAggResultsBuilder_ == null) { + return subAggResults_.get(index); } else { + return subAggResultsBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getSubAggResultsOrBuilderList() { + if (subAggResultsBuilder_ != null) { + return subAggResultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(subAggResults_); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResult.Builder addSubAggResultsBuilder() { + return getSubAggResultsFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResult.getDefaultInstance()); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResult.Builder addSubAggResultsBuilder( + int index) { + return getSubAggResultsFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResult.getDefaultInstance()); + } + public java.util.List + getSubAggResultsBuilderList() { + return getSubAggResultsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResult, com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResult.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResultOrBuilder> + getSubAggResultsFieldBuilder() { + if (subAggResultsBuilder_ == null) { + subAggResultsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResult, com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResult.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResultOrBuilder>( + subAggResults_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + subAggResults_ = null; + } + return subAggResultsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.AggResult) + } + + static { + defaultInstance = new AggResult(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.AggResult) + } + + public interface AggregationOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string name = 1; + boolean hasName(); + String getName(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.AggregationType type = 2; + boolean hasType(); + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationType getType(); + + // optional bytes body = 3; + boolean hasBody(); + com.google.protobuf.ByteString getBody(); + } + public static final class Aggregation extends + com.google.protobuf.GeneratedMessage + implements AggregationOrBuilder { + // Use Aggregation.newBuilder() to construct. + private Aggregation(Builder builder) { + super(builder); + } + private Aggregation(boolean noInit) {} + + private static final Aggregation defaultInstance; + public static Aggregation getDefaultInstance() { + return defaultInstance; + } + + public Aggregation getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Aggregation_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Aggregation_fieldAccessorTable; + } + + private int bitField0_; + // optional string name = 1; + public static final int NAME_FIELD_NUMBER = 1; + private java.lang.Object name_; + public boolean hasName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getName() { + java.lang.Object ref = name_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + name_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.AggregationType type = 2; + public static final int TYPE_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.Search.AggregationType type_; + public boolean hasType() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationType getType() { + return type_; + } + + // optional bytes body = 3; + public static final int BODY_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString body_; + public boolean hasBody() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.google.protobuf.ByteString getBody() { + return body_; + } + + private void initFields() { + name_ = ""; + type_ = com.alicloud.openservices.tablestore.core.protocol.Search.AggregationType.AGG_AVG; + body_ = com.google.protobuf.ByteString.EMPTY; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeEnum(2, type_.getNumber()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeBytes(3, body_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, type_.getNumber()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, body_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.Aggregation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Aggregation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Aggregation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Aggregation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Aggregation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Aggregation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Aggregation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Aggregation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Aggregation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Aggregation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.Aggregation prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.AggregationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Aggregation_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Aggregation_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.Aggregation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + name_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + type_ = com.alicloud.openservices.tablestore.core.protocol.Search.AggregationType.AGG_AVG; + bitField0_ = (bitField0_ & ~0x00000002); + body_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.Aggregation.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.Aggregation getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.Aggregation.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.Aggregation build() { + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.Aggregation buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.Aggregation buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregation result = new com.alicloud.openservices.tablestore.core.protocol.Search.Aggregation(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.name_ = name_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.type_ = type_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.body_ = body_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.Aggregation) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.Aggregation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.Aggregation other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.Aggregation.getDefaultInstance()) return this; + if (other.hasName()) { + setName(other.getName()); + } + if (other.hasType()) { + setType(other.getType()); + } + if (other.hasBody()) { + setBody(other.getBody()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + name_ = input.readBytes(); + break; + } + case 16: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationType value = com.alicloud.openservices.tablestore.core.protocol.Search.AggregationType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(2, rawValue); + } else { + bitField0_ |= 0x00000002; + type_ = value; + } + break; + } + case 26: { + bitField0_ |= 0x00000004; + body_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // optional string name = 1; + private java.lang.Object name_ = ""; + public boolean hasName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + name_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + name_ = value; + onChanged(); + return this; + } + public Builder clearName() { + bitField0_ = (bitField0_ & ~0x00000001); + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + void setName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + name_ = value; + onChanged(); + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.AggregationType type = 2; + private com.alicloud.openservices.tablestore.core.protocol.Search.AggregationType type_ = com.alicloud.openservices.tablestore.core.protocol.Search.AggregationType.AGG_AVG; + public boolean hasType() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationType getType() { + return type_; + } + public Builder setType(com.alicloud.openservices.tablestore.core.protocol.Search.AggregationType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + type_ = value; + onChanged(); + return this; + } + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000002); + type_ = com.alicloud.openservices.tablestore.core.protocol.Search.AggregationType.AGG_AVG; + onChanged(); + return this; + } + + // optional bytes body = 3; + private com.google.protobuf.ByteString body_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasBody() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.google.protobuf.ByteString getBody() { + return body_; + } + public Builder setBody(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + body_ = value; + onChanged(); + return this; + } + public Builder clearBody() { + bitField0_ = (bitField0_ & ~0x00000004); + body_ = getDefaultInstance().getBody(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.Aggregation) + } + + static { + defaultInstance = new Aggregation(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.Aggregation) + } + + public interface AggregationsOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // repeated .com.alicloud.openservices.tablestore.core.protocol.Aggregation aggs = 1; + java.util.List + getAggsList(); + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregation getAggs(int index); + int getAggsCount(); + java.util.List + getAggsOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationOrBuilder getAggsOrBuilder( + int index); + } + public static final class Aggregations extends + com.google.protobuf.GeneratedMessage + implements AggregationsOrBuilder { + // Use Aggregations.newBuilder() to construct. + private Aggregations(Builder builder) { + super(builder); + } + private Aggregations(boolean noInit) {} + + private static final Aggregations defaultInstance; + public static Aggregations getDefaultInstance() { + return defaultInstance; + } + + public Aggregations getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Aggregations_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Aggregations_fieldAccessorTable; + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.Aggregation aggs = 1; + public static final int AGGS_FIELD_NUMBER = 1; + private java.util.List aggs_; + public java.util.List getAggsList() { + return aggs_; + } + public java.util.List + getAggsOrBuilderList() { + return aggs_; + } + public int getAggsCount() { + return aggs_.size(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Aggregation getAggs(int index) { + return aggs_.get(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationOrBuilder getAggsOrBuilder( + int index) { + return aggs_.get(index); + } + + private void initFields() { + aggs_ = java.util.Collections.emptyList(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < aggs_.size(); i++) { + output.writeMessage(1, aggs_.get(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < aggs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, aggs_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Aggregations_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Aggregations_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getAggsFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (aggsBuilder_ == null) { + aggs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + aggsBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations build() { + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations result = new com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations(this); + int from_bitField0_ = bitField0_; + if (aggsBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + aggs_ = java.util.Collections.unmodifiableList(aggs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.aggs_ = aggs_; + } else { + result.aggs_ = aggsBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.getDefaultInstance()) return this; + if (aggsBuilder_ == null) { + if (!other.aggs_.isEmpty()) { + if (aggs_.isEmpty()) { + aggs_ = other.aggs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAggsIsMutable(); + aggs_.addAll(other.aggs_); + } + onChanged(); + } + } else { + if (!other.aggs_.isEmpty()) { + if (aggsBuilder_.isEmpty()) { + aggsBuilder_.dispose(); + aggsBuilder_ = null; + aggs_ = other.aggs_; + bitField0_ = (bitField0_ & ~0x00000001); + aggsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getAggsFieldBuilder() : null; + } else { + aggsBuilder_.addAllMessages(other.aggs_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregation.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.Aggregation.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addAggs(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // repeated .com.alicloud.openservices.tablestore.core.protocol.Aggregation aggs = 1; + private java.util.List aggs_ = + java.util.Collections.emptyList(); + private void ensureAggsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + aggs_ = new java.util.ArrayList(aggs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregation, com.alicloud.openservices.tablestore.core.protocol.Search.Aggregation.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationOrBuilder> aggsBuilder_; + + public java.util.List getAggsList() { + if (aggsBuilder_ == null) { + return java.util.Collections.unmodifiableList(aggs_); + } else { + return aggsBuilder_.getMessageList(); + } + } + public int getAggsCount() { + if (aggsBuilder_ == null) { + return aggs_.size(); + } else { + return aggsBuilder_.getCount(); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Aggregation getAggs(int index) { + if (aggsBuilder_ == null) { + return aggs_.get(index); + } else { + return aggsBuilder_.getMessage(index); + } + } + public Builder setAggs( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.Aggregation value) { + if (aggsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAggsIsMutable(); + aggs_.set(index, value); + onChanged(); + } else { + aggsBuilder_.setMessage(index, value); + } + return this; + } + public Builder setAggs( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.Aggregation.Builder builderForValue) { + if (aggsBuilder_ == null) { + ensureAggsIsMutable(); + aggs_.set(index, builderForValue.build()); + onChanged(); + } else { + aggsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAggs(com.alicloud.openservices.tablestore.core.protocol.Search.Aggregation value) { + if (aggsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAggsIsMutable(); + aggs_.add(value); + onChanged(); + } else { + aggsBuilder_.addMessage(value); + } + return this; + } + public Builder addAggs( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.Aggregation value) { + if (aggsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAggsIsMutable(); + aggs_.add(index, value); + onChanged(); + } else { + aggsBuilder_.addMessage(index, value); + } + return this; + } + public Builder addAggs( + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregation.Builder builderForValue) { + if (aggsBuilder_ == null) { + ensureAggsIsMutable(); + aggs_.add(builderForValue.build()); + onChanged(); + } else { + aggsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + public Builder addAggs( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.Aggregation.Builder builderForValue) { + if (aggsBuilder_ == null) { + ensureAggsIsMutable(); + aggs_.add(index, builderForValue.build()); + onChanged(); + } else { + aggsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAllAggs( + java.lang.Iterable values) { + if (aggsBuilder_ == null) { + ensureAggsIsMutable(); + super.addAll(values, aggs_); + onChanged(); + } else { + aggsBuilder_.addAllMessages(values); + } + return this; + } + public Builder clearAggs() { + if (aggsBuilder_ == null) { + aggs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + aggsBuilder_.clear(); + } + return this; + } + public Builder removeAggs(int index) { + if (aggsBuilder_ == null) { + ensureAggsIsMutable(); + aggs_.remove(index); + onChanged(); + } else { + aggsBuilder_.remove(index); + } + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Aggregation.Builder getAggsBuilder( + int index) { + return getAggsFieldBuilder().getBuilder(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationOrBuilder getAggsOrBuilder( + int index) { + if (aggsBuilder_ == null) { + return aggs_.get(index); } else { + return aggsBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getAggsOrBuilderList() { + if (aggsBuilder_ != null) { + return aggsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(aggs_); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Aggregation.Builder addAggsBuilder() { + return getAggsFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregation.getDefaultInstance()); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Aggregation.Builder addAggsBuilder( + int index) { + return getAggsFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.Search.Aggregation.getDefaultInstance()); + } + public java.util.List + getAggsBuilderList() { + return getAggsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregation, com.alicloud.openservices.tablestore.core.protocol.Search.Aggregation.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationOrBuilder> + getAggsFieldBuilder() { + if (aggsBuilder_ == null) { + aggsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregation, com.alicloud.openservices.tablestore.core.protocol.Search.Aggregation.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationOrBuilder>( + aggs_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + aggs_ = null; + } + return aggsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.Aggregations) + } + + static { + defaultInstance = new Aggregations(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.Aggregations) + } + + public interface GroupByOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string name = 1; + boolean hasName(); + String getName(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.GroupByType type = 2; + boolean hasType(); + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByType getType(); + + // optional bytes body = 3; + boolean hasBody(); + com.google.protobuf.ByteString getBody(); + } + public static final class GroupBy extends + com.google.protobuf.GeneratedMessage + implements GroupByOrBuilder { + // Use GroupBy.newBuilder() to construct. + private GroupBy(Builder builder) { + super(builder); + } + private GroupBy(boolean noInit) {} + + private static final GroupBy defaultInstance; + public static GroupBy getDefaultInstance() { + return defaultInstance; + } + + public GroupBy getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupBy_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupBy_fieldAccessorTable; + } + + private int bitField0_; + // optional string name = 1; + public static final int NAME_FIELD_NUMBER = 1; + private java.lang.Object name_; + public boolean hasName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getName() { + java.lang.Object ref = name_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + name_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.GroupByType type = 2; + public static final int TYPE_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupByType type_; + public boolean hasType() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByType getType() { + return type_; + } + + // optional bytes body = 3; + public static final int BODY_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString body_; + public boolean hasBody() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.google.protobuf.ByteString getBody() { + return body_; + } + + private void initFields() { + name_ = ""; + type_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupByType.GROUP_BY_FIELD; + body_ = com.google.protobuf.ByteString.EMPTY; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeEnum(2, type_.getNumber()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeBytes(3, body_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, type_.getNumber()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, body_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupBy parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupBy parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupBy parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupBy parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupBy parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupBy parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupBy parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupBy parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupBy parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupBy parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.GroupBy prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.GroupByOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupBy_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupBy_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.GroupBy.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + name_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + type_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupByType.GROUP_BY_FIELD; + bitField0_ = (bitField0_ & ~0x00000002); + body_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GroupBy.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBy getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GroupBy.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBy build() { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBy result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupBy buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBy result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBy buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBy result = new com.alicloud.openservices.tablestore.core.protocol.Search.GroupBy(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.name_ = name_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.type_ = type_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.body_ = body_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.GroupBy) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.GroupBy)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.GroupBy other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.GroupBy.getDefaultInstance()) return this; + if (other.hasName()) { + setName(other.getName()); + } + if (other.hasType()) { + setType(other.getType()); + } + if (other.hasBody()) { + setBody(other.getBody()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + name_ = input.readBytes(); + break; + } + case 16: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByType value = com.alicloud.openservices.tablestore.core.protocol.Search.GroupByType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(2, rawValue); + } else { + bitField0_ |= 0x00000002; + type_ = value; + } + break; + } + case 26: { + bitField0_ |= 0x00000004; + body_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // optional string name = 1; + private java.lang.Object name_ = ""; + public boolean hasName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + name_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + name_ = value; + onChanged(); + return this; + } + public Builder clearName() { + bitField0_ = (bitField0_ & ~0x00000001); + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + void setName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + name_ = value; + onChanged(); + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.GroupByType type = 2; + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupByType type_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupByType.GROUP_BY_FIELD; + public boolean hasType() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByType getType() { + return type_; + } + public Builder setType(com.alicloud.openservices.tablestore.core.protocol.Search.GroupByType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + type_ = value; + onChanged(); + return this; + } + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000002); + type_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupByType.GROUP_BY_FIELD; + onChanged(); + return this; + } + + // optional bytes body = 3; + private com.google.protobuf.ByteString body_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasBody() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.google.protobuf.ByteString getBody() { + return body_; + } + public Builder setBody(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + body_ = value; + onChanged(); + return this; + } + public Builder clearBody() { + bitField0_ = (bitField0_ & ~0x00000004); + body_ = getDefaultInstance().getBody(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GroupBy) + } + + static { + defaultInstance = new GroupBy(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GroupBy) + } + + public interface GroupBysOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // repeated .com.alicloud.openservices.tablestore.core.protocol.GroupBy group_bys = 1; + java.util.List + getGroupBysList(); + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBy getGroupBys(int index); + int getGroupBysCount(); + java.util.List + getGroupBysOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByOrBuilder getGroupBysOrBuilder( + int index); + } + public static final class GroupBys extends + com.google.protobuf.GeneratedMessage + implements GroupBysOrBuilder { + // Use GroupBys.newBuilder() to construct. + private GroupBys(Builder builder) { + super(builder); + } + private GroupBys(boolean noInit) {} + + private static final GroupBys defaultInstance; + public static GroupBys getDefaultInstance() { + return defaultInstance; + } + + public GroupBys getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupBys_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupBys_fieldAccessorTable; + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.GroupBy group_bys = 1; + public static final int GROUP_BYS_FIELD_NUMBER = 1; + private java.util.List groupBys_; + public java.util.List getGroupBysList() { + return groupBys_; + } + public java.util.List + getGroupBysOrBuilderList() { + return groupBys_; + } + public int getGroupBysCount() { + return groupBys_.size(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBy getGroupBys(int index) { + return groupBys_.get(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByOrBuilder getGroupBysOrBuilder( + int index) { + return groupBys_.get(index); + } + + private void initFields() { + groupBys_ = java.util.Collections.emptyList(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < groupBys_.size(); i++) { + output.writeMessage(1, groupBys_.get(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < groupBys_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, groupBys_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupBys_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupBys_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getGroupBysFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (groupBysBuilder_ == null) { + groupBys_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + groupBysBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys build() { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys result = new com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys(this); + int from_bitField0_ = bitField0_; + if (groupBysBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + groupBys_ = java.util.Collections.unmodifiableList(groupBys_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.groupBys_ = groupBys_; + } else { + result.groupBys_ = groupBysBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.getDefaultInstance()) return this; + if (groupBysBuilder_ == null) { + if (!other.groupBys_.isEmpty()) { + if (groupBys_.isEmpty()) { + groupBys_ = other.groupBys_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureGroupBysIsMutable(); + groupBys_.addAll(other.groupBys_); + } + onChanged(); + } + } else { + if (!other.groupBys_.isEmpty()) { + if (groupBysBuilder_.isEmpty()) { + groupBysBuilder_.dispose(); + groupBysBuilder_ = null; + groupBys_ = other.groupBys_; + bitField0_ = (bitField0_ & ~0x00000001); + groupBysBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getGroupBysFieldBuilder() : null; + } else { + groupBysBuilder_.addAllMessages(other.groupBys_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBy.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBy.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addGroupBys(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // repeated .com.alicloud.openservices.tablestore.core.protocol.GroupBy group_bys = 1; + private java.util.List groupBys_ = + java.util.Collections.emptyList(); + private void ensureGroupBysIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + groupBys_ = new java.util.ArrayList(groupBys_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBy, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBy.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByOrBuilder> groupBysBuilder_; + + public java.util.List getGroupBysList() { + if (groupBysBuilder_ == null) { + return java.util.Collections.unmodifiableList(groupBys_); + } else { + return groupBysBuilder_.getMessageList(); + } + } + public int getGroupBysCount() { + if (groupBysBuilder_ == null) { + return groupBys_.size(); + } else { + return groupBysBuilder_.getCount(); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBy getGroupBys(int index) { + if (groupBysBuilder_ == null) { + return groupBys_.get(index); + } else { + return groupBysBuilder_.getMessage(index); + } + } + public Builder setGroupBys( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBy value) { + if (groupBysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupBysIsMutable(); + groupBys_.set(index, value); + onChanged(); + } else { + groupBysBuilder_.setMessage(index, value); + } + return this; + } + public Builder setGroupBys( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBy.Builder builderForValue) { + if (groupBysBuilder_ == null) { + ensureGroupBysIsMutable(); + groupBys_.set(index, builderForValue.build()); + onChanged(); + } else { + groupBysBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + public Builder addGroupBys(com.alicloud.openservices.tablestore.core.protocol.Search.GroupBy value) { + if (groupBysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupBysIsMutable(); + groupBys_.add(value); + onChanged(); + } else { + groupBysBuilder_.addMessage(value); + } + return this; + } + public Builder addGroupBys( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBy value) { + if (groupBysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupBysIsMutable(); + groupBys_.add(index, value); + onChanged(); + } else { + groupBysBuilder_.addMessage(index, value); + } + return this; + } + public Builder addGroupBys( + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBy.Builder builderForValue) { + if (groupBysBuilder_ == null) { + ensureGroupBysIsMutable(); + groupBys_.add(builderForValue.build()); + onChanged(); + } else { + groupBysBuilder_.addMessage(builderForValue.build()); + } + return this; + } + public Builder addGroupBys( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBy.Builder builderForValue) { + if (groupBysBuilder_ == null) { + ensureGroupBysIsMutable(); + groupBys_.add(index, builderForValue.build()); + onChanged(); + } else { + groupBysBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAllGroupBys( + java.lang.Iterable values) { + if (groupBysBuilder_ == null) { + ensureGroupBysIsMutable(); + super.addAll(values, groupBys_); + onChanged(); + } else { + groupBysBuilder_.addAllMessages(values); + } + return this; + } + public Builder clearGroupBys() { + if (groupBysBuilder_ == null) { + groupBys_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + groupBysBuilder_.clear(); + } + return this; + } + public Builder removeGroupBys(int index) { + if (groupBysBuilder_ == null) { + ensureGroupBysIsMutable(); + groupBys_.remove(index); + onChanged(); + } else { + groupBysBuilder_.remove(index); + } + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBy.Builder getGroupBysBuilder( + int index) { + return getGroupBysFieldBuilder().getBuilder(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByOrBuilder getGroupBysOrBuilder( + int index) { + if (groupBysBuilder_ == null) { + return groupBys_.get(index); } else { + return groupBysBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getGroupBysOrBuilderList() { + if (groupBysBuilder_ != null) { + return groupBysBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(groupBys_); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBy.Builder addGroupBysBuilder() { + return getGroupBysFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBy.getDefaultInstance()); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBy.Builder addGroupBysBuilder( + int index) { + return getGroupBysFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBy.getDefaultInstance()); + } + public java.util.List + getGroupBysBuilderList() { + return getGroupBysFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBy, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBy.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByOrBuilder> + getGroupBysFieldBuilder() { + if (groupBysBuilder_ == null) { + groupBysBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBy, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBy.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByOrBuilder>( + groupBys_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + groupBys_ = null; + } + return groupBysBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GroupBys) + } + + static { + defaultInstance = new GroupBys(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GroupBys) + } + + public interface AvgAggregationOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string field_name = 1; + boolean hasFieldName(); + String getFieldName(); + + // optional bytes missing = 2; + boolean hasMissing(); + com.google.protobuf.ByteString getMissing(); + } + public static final class AvgAggregation extends + com.google.protobuf.GeneratedMessage + implements AvgAggregationOrBuilder { + // Use AvgAggregation.newBuilder() to construct. + private AvgAggregation(Builder builder) { + super(builder); + } + private AvgAggregation(boolean noInit) {} + + private static final AvgAggregation defaultInstance; + public static AvgAggregation getDefaultInstance() { + return defaultInstance; + } + + public AvgAggregation getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_AvgAggregation_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_AvgAggregation_fieldAccessorTable; + } + + private int bitField0_; + // optional string field_name = 1; + public static final int FIELD_NAME_FIELD_NUMBER = 1; + private java.lang.Object fieldName_; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + fieldName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getFieldNameBytes() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + fieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional bytes missing = 2; + public static final int MISSING_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString missing_; + public boolean hasMissing() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getMissing() { + return missing_; + } + + private void initFields() { + fieldName_ = ""; + missing_ = com.google.protobuf.ByteString.EMPTY; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getFieldNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, missing_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getFieldNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, missing_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregation prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_AvgAggregation_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_AvgAggregation_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + fieldName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + missing_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregation.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregation getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregation.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregation build() { + com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregation buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregation buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregation result = new com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregation(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.fieldName_ = fieldName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.missing_ = missing_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregation) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregation other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregation.getDefaultInstance()) return this; + if (other.hasFieldName()) { + setFieldName(other.getFieldName()); + } + if (other.hasMissing()) { + setMissing(other.getMissing()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + fieldName_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + missing_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // optional string field_name = 1; + private java.lang.Object fieldName_ = ""; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + fieldName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setFieldName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + return this; + } + public Builder clearFieldName() { + bitField0_ = (bitField0_ & ~0x00000001); + fieldName_ = getDefaultInstance().getFieldName(); + onChanged(); + return this; + } + void setFieldName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + } + + // optional bytes missing = 2; + private com.google.protobuf.ByteString missing_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasMissing() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getMissing() { + return missing_; + } + public Builder setMissing(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + missing_ = value; + onChanged(); + return this; + } + public Builder clearMissing() { + bitField0_ = (bitField0_ & ~0x00000002); + missing_ = getDefaultInstance().getMissing(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.AvgAggregation) + } + + static { + defaultInstance = new AvgAggregation(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.AvgAggregation) + } + + public interface MaxAggregationOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string field_name = 1; + boolean hasFieldName(); + String getFieldName(); + + // optional bytes missing = 2; + boolean hasMissing(); + com.google.protobuf.ByteString getMissing(); + } + public static final class MaxAggregation extends + com.google.protobuf.GeneratedMessage + implements MaxAggregationOrBuilder { + // Use MaxAggregation.newBuilder() to construct. + private MaxAggregation(Builder builder) { + super(builder); + } + private MaxAggregation(boolean noInit) {} + + private static final MaxAggregation defaultInstance; + public static MaxAggregation getDefaultInstance() { + return defaultInstance; + } + + public MaxAggregation getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MaxAggregation_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MaxAggregation_fieldAccessorTable; + } + + private int bitField0_; + // optional string field_name = 1; + public static final int FIELD_NAME_FIELD_NUMBER = 1; + private java.lang.Object fieldName_; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + fieldName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getFieldNameBytes() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + fieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional bytes missing = 2; + public static final int MISSING_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString missing_; + public boolean hasMissing() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getMissing() { + return missing_; + } + + private void initFields() { + fieldName_ = ""; + missing_ = com.google.protobuf.ByteString.EMPTY; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getFieldNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, missing_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getFieldNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, missing_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregation prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MaxAggregation_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MaxAggregation_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + fieldName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + missing_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregation.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregation getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregation.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregation build() { + com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregation buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregation buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregation result = new com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregation(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.fieldName_ = fieldName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.missing_ = missing_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregation) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregation other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregation.getDefaultInstance()) return this; + if (other.hasFieldName()) { + setFieldName(other.getFieldName()); + } + if (other.hasMissing()) { + setMissing(other.getMissing()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + fieldName_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + missing_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // optional string field_name = 1; + private java.lang.Object fieldName_ = ""; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + fieldName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setFieldName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + return this; + } + public Builder clearFieldName() { + bitField0_ = (bitField0_ & ~0x00000001); + fieldName_ = getDefaultInstance().getFieldName(); + onChanged(); + return this; + } + void setFieldName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + } + + // optional bytes missing = 2; + private com.google.protobuf.ByteString missing_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasMissing() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getMissing() { + return missing_; + } + public Builder setMissing(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + missing_ = value; + onChanged(); + return this; + } + public Builder clearMissing() { + bitField0_ = (bitField0_ & ~0x00000002); + missing_ = getDefaultInstance().getMissing(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.MaxAggregation) + } + + static { + defaultInstance = new MaxAggregation(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.MaxAggregation) + } + + public interface MinAggregationOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string field_name = 1; + boolean hasFieldName(); + String getFieldName(); + + // optional bytes missing = 2; + boolean hasMissing(); + com.google.protobuf.ByteString getMissing(); + } + public static final class MinAggregation extends + com.google.protobuf.GeneratedMessage + implements MinAggregationOrBuilder { + // Use MinAggregation.newBuilder() to construct. + private MinAggregation(Builder builder) { + super(builder); + } + private MinAggregation(boolean noInit) {} + + private static final MinAggregation defaultInstance; + public static MinAggregation getDefaultInstance() { + return defaultInstance; + } + + public MinAggregation getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MinAggregation_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MinAggregation_fieldAccessorTable; + } + + private int bitField0_; + // optional string field_name = 1; + public static final int FIELD_NAME_FIELD_NUMBER = 1; + private java.lang.Object fieldName_; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + fieldName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getFieldNameBytes() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + fieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional bytes missing = 2; + public static final int MISSING_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString missing_; + public boolean hasMissing() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getMissing() { + return missing_; + } + + private void initFields() { + fieldName_ = ""; + missing_ = com.google.protobuf.ByteString.EMPTY; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getFieldNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, missing_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getFieldNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, missing_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregation prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MinAggregation_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MinAggregation_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + fieldName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + missing_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregation.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregation getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregation.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregation build() { + com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregation buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregation buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregation result = new com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregation(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.fieldName_ = fieldName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.missing_ = missing_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregation) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregation other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregation.getDefaultInstance()) return this; + if (other.hasFieldName()) { + setFieldName(other.getFieldName()); + } + if (other.hasMissing()) { + setMissing(other.getMissing()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + fieldName_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + missing_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // optional string field_name = 1; + private java.lang.Object fieldName_ = ""; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + fieldName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setFieldName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + return this; + } + public Builder clearFieldName() { + bitField0_ = (bitField0_ & ~0x00000001); + fieldName_ = getDefaultInstance().getFieldName(); + onChanged(); + return this; + } + void setFieldName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + } + + // optional bytes missing = 2; + private com.google.protobuf.ByteString missing_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasMissing() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getMissing() { + return missing_; + } + public Builder setMissing(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + missing_ = value; + onChanged(); + return this; + } + public Builder clearMissing() { + bitField0_ = (bitField0_ & ~0x00000002); + missing_ = getDefaultInstance().getMissing(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.MinAggregation) + } + + static { + defaultInstance = new MinAggregation(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.MinAggregation) + } + + public interface SumAggregationOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string field_name = 1; + boolean hasFieldName(); + String getFieldName(); + + // optional bytes missing = 2; + boolean hasMissing(); + com.google.protobuf.ByteString getMissing(); + } + public static final class SumAggregation extends + com.google.protobuf.GeneratedMessage + implements SumAggregationOrBuilder { + // Use SumAggregation.newBuilder() to construct. + private SumAggregation(Builder builder) { + super(builder); + } + private SumAggregation(boolean noInit) {} + + private static final SumAggregation defaultInstance; + public static SumAggregation getDefaultInstance() { + return defaultInstance; + } + + public SumAggregation getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SumAggregation_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SumAggregation_fieldAccessorTable; + } + + private int bitField0_; + // optional string field_name = 1; + public static final int FIELD_NAME_FIELD_NUMBER = 1; + private java.lang.Object fieldName_; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + fieldName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getFieldNameBytes() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + fieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional bytes missing = 2; + public static final int MISSING_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString missing_; + public boolean hasMissing() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getMissing() { + return missing_; + } + + private void initFields() { + fieldName_ = ""; + missing_ = com.google.protobuf.ByteString.EMPTY; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getFieldNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, missing_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getFieldNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, missing_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregation prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SumAggregation_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SumAggregation_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + fieldName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + missing_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregation.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregation getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregation.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregation build() { + com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregation buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregation buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregation result = new com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregation(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.fieldName_ = fieldName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.missing_ = missing_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregation) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregation other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregation.getDefaultInstance()) return this; + if (other.hasFieldName()) { + setFieldName(other.getFieldName()); + } + if (other.hasMissing()) { + setMissing(other.getMissing()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + fieldName_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + missing_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // optional string field_name = 1; + private java.lang.Object fieldName_ = ""; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + fieldName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setFieldName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + return this; + } + public Builder clearFieldName() { + bitField0_ = (bitField0_ & ~0x00000001); + fieldName_ = getDefaultInstance().getFieldName(); + onChanged(); + return this; + } + void setFieldName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + } + + // optional bytes missing = 2; + private com.google.protobuf.ByteString missing_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasMissing() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getMissing() { + return missing_; + } + public Builder setMissing(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + missing_ = value; + onChanged(); + return this; + } + public Builder clearMissing() { + bitField0_ = (bitField0_ & ~0x00000002); + missing_ = getDefaultInstance().getMissing(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.SumAggregation) + } + + static { + defaultInstance = new SumAggregation(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.SumAggregation) + } + + public interface CountAggregationOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string field_name = 1; + boolean hasFieldName(); + String getFieldName(); + } + public static final class CountAggregation extends + com.google.protobuf.GeneratedMessage + implements CountAggregationOrBuilder { + // Use CountAggregation.newBuilder() to construct. + private CountAggregation(Builder builder) { + super(builder); + } + private CountAggregation(boolean noInit) {} + + private static final CountAggregation defaultInstance; + public static CountAggregation getDefaultInstance() { + return defaultInstance; + } + + public CountAggregation getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_CountAggregation_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_CountAggregation_fieldAccessorTable; + } + + private int bitField0_; + // optional string field_name = 1; + public static final int FIELD_NAME_FIELD_NUMBER = 1; + private java.lang.Object fieldName_; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + fieldName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getFieldNameBytes() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + fieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + fieldName_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getFieldNameBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getFieldNameBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregation prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_CountAggregation_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_CountAggregation_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + fieldName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregation.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregation getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregation.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregation build() { + com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregation buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregation buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregation result = new com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregation(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.fieldName_ = fieldName_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregation) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregation other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregation.getDefaultInstance()) return this; + if (other.hasFieldName()) { + setFieldName(other.getFieldName()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + fieldName_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // optional string field_name = 1; + private java.lang.Object fieldName_ = ""; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + fieldName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setFieldName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + return this; + } + public Builder clearFieldName() { + bitField0_ = (bitField0_ & ~0x00000001); + fieldName_ = getDefaultInstance().getFieldName(); + onChanged(); + return this; + } + void setFieldName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.CountAggregation) + } + + static { + defaultInstance = new CountAggregation(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.CountAggregation) + } + + public interface DistinctCountAggregationOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string field_name = 1; + boolean hasFieldName(); + String getFieldName(); + + // optional bytes missing = 2; + boolean hasMissing(); + com.google.protobuf.ByteString getMissing(); + } + public static final class DistinctCountAggregation extends + com.google.protobuf.GeneratedMessage + implements DistinctCountAggregationOrBuilder { + // Use DistinctCountAggregation.newBuilder() to construct. + private DistinctCountAggregation(Builder builder) { + super(builder); + } + private DistinctCountAggregation(boolean noInit) {} + + private static final DistinctCountAggregation defaultInstance; + public static DistinctCountAggregation getDefaultInstance() { + return defaultInstance; + } + + public DistinctCountAggregation getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_DistinctCountAggregation_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_DistinctCountAggregation_fieldAccessorTable; + } + + private int bitField0_; + // optional string field_name = 1; + public static final int FIELD_NAME_FIELD_NUMBER = 1; + private java.lang.Object fieldName_; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + fieldName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getFieldNameBytes() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + fieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional bytes missing = 2; + public static final int MISSING_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString missing_; + public boolean hasMissing() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getMissing() { + return missing_; + } + + private void initFields() { + fieldName_ = ""; + missing_ = com.google.protobuf.ByteString.EMPTY; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getFieldNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, missing_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getFieldNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, missing_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregation prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_DistinctCountAggregation_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_DistinctCountAggregation_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + fieldName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + missing_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregation.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregation getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregation.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregation build() { + com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregation buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregation buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregation result = new com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregation(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.fieldName_ = fieldName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.missing_ = missing_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregation) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregation other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregation.getDefaultInstance()) return this; + if (other.hasFieldName()) { + setFieldName(other.getFieldName()); + } + if (other.hasMissing()) { + setMissing(other.getMissing()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + fieldName_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + missing_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // optional string field_name = 1; + private java.lang.Object fieldName_ = ""; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + fieldName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setFieldName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + return this; + } + public Builder clearFieldName() { + bitField0_ = (bitField0_ & ~0x00000001); + fieldName_ = getDefaultInstance().getFieldName(); + onChanged(); + return this; + } + void setFieldName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + } + + // optional bytes missing = 2; + private com.google.protobuf.ByteString missing_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasMissing() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getMissing() { + return missing_; + } + public Builder setMissing(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + missing_ = value; + onChanged(); + return this; + } + public Builder clearMissing() { + bitField0_ = (bitField0_ & ~0x00000002); + missing_ = getDefaultInstance().getMissing(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.DistinctCountAggregation) + } + + static { + defaultInstance = new DistinctCountAggregation(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.DistinctCountAggregation) + } + + public interface TopRowsAggregationOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional int32 limit = 1; + boolean hasLimit(); + int getLimit(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.Sort sort = 2; + boolean hasSort(); + com.alicloud.openservices.tablestore.core.protocol.Search.Sort getSort(); + com.alicloud.openservices.tablestore.core.protocol.Search.SortOrBuilder getSortOrBuilder(); + } + public static final class TopRowsAggregation extends + com.google.protobuf.GeneratedMessage + implements TopRowsAggregationOrBuilder { + // Use TopRowsAggregation.newBuilder() to construct. + private TopRowsAggregation(Builder builder) { + super(builder); + } + private TopRowsAggregation(boolean noInit) {} + + private static final TopRowsAggregation defaultInstance; + public static TopRowsAggregation getDefaultInstance() { + return defaultInstance; + } + + public TopRowsAggregation getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_TopRowsAggregation_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_TopRowsAggregation_fieldAccessorTable; + } + + private int bitField0_; + // optional int32 limit = 1; + public static final int LIMIT_FIELD_NUMBER = 1; + private int limit_; + public boolean hasLimit() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public int getLimit() { + return limit_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.Sort sort = 2; + public static final int SORT_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.Search.Sort sort_; + public boolean hasSort() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Sort getSort() { + return sort_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.SortOrBuilder getSortOrBuilder() { + return sort_; + } + + private void initFields() { + limit_ = 0; + sort_ = com.alicloud.openservices.tablestore.core.protocol.Search.Sort.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeInt32(1, limit_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeMessage(2, sort_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, limit_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, sort_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregation prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_TopRowsAggregation_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_TopRowsAggregation_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getSortFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + limit_ = 0; + bitField0_ = (bitField0_ & ~0x00000001); + if (sortBuilder_ == null) { + sort_ = com.alicloud.openservices.tablestore.core.protocol.Search.Sort.getDefaultInstance(); + } else { + sortBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregation.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregation getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregation.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregation build() { + com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregation buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregation buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregation result = new com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregation(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.limit_ = limit_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + if (sortBuilder_ == null) { + result.sort_ = sort_; + } else { + result.sort_ = sortBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregation) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregation other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregation.getDefaultInstance()) return this; + if (other.hasLimit()) { + setLimit(other.getLimit()); + } + if (other.hasSort()) { + mergeSort(other.getSort()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + limit_ = input.readInt32(); + break; + } + case 18: { + com.alicloud.openservices.tablestore.core.protocol.Search.Sort.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.Sort.newBuilder(); + if (hasSort()) { + subBuilder.mergeFrom(getSort()); + } + input.readMessage(subBuilder, extensionRegistry); + setSort(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // optional int32 limit = 1; + private int limit_ ; + public boolean hasLimit() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public int getLimit() { + return limit_; + } + public Builder setLimit(int value) { + bitField0_ |= 0x00000001; + limit_ = value; + onChanged(); + return this; + } + public Builder clearLimit() { + bitField0_ = (bitField0_ & ~0x00000001); + limit_ = 0; + onChanged(); + return this; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.Sort sort = 2; + private com.alicloud.openservices.tablestore.core.protocol.Search.Sort sort_ = com.alicloud.openservices.tablestore.core.protocol.Search.Sort.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Sort, com.alicloud.openservices.tablestore.core.protocol.Search.Sort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.SortOrBuilder> sortBuilder_; + public boolean hasSort() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Sort getSort() { + if (sortBuilder_ == null) { + return sort_; + } else { + return sortBuilder_.getMessage(); + } + } + public Builder setSort(com.alicloud.openservices.tablestore.core.protocol.Search.Sort value) { + if (sortBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sort_ = value; + onChanged(); + } else { + sortBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder setSort( + com.alicloud.openservices.tablestore.core.protocol.Search.Sort.Builder builderForValue) { + if (sortBuilder_ == null) { + sort_ = builderForValue.build(); + onChanged(); + } else { + sortBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder mergeSort(com.alicloud.openservices.tablestore.core.protocol.Search.Sort value) { + if (sortBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002) && + sort_ != com.alicloud.openservices.tablestore.core.protocol.Search.Sort.getDefaultInstance()) { + sort_ = + com.alicloud.openservices.tablestore.core.protocol.Search.Sort.newBuilder(sort_).mergeFrom(value).buildPartial(); + } else { + sort_ = value; + } + onChanged(); + } else { + sortBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder clearSort() { + if (sortBuilder_ == null) { + sort_ = com.alicloud.openservices.tablestore.core.protocol.Search.Sort.getDefaultInstance(); + onChanged(); + } else { + sortBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Sort.Builder getSortBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getSortFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.SortOrBuilder getSortOrBuilder() { + if (sortBuilder_ != null) { + return sortBuilder_.getMessageOrBuilder(); + } else { + return sort_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Sort, com.alicloud.openservices.tablestore.core.protocol.Search.Sort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.SortOrBuilder> + getSortFieldBuilder() { + if (sortBuilder_ == null) { + sortBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Sort, com.alicloud.openservices.tablestore.core.protocol.Search.Sort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.SortOrBuilder>( + sort_, + getParentForChildren(), + isClean()); + sort_ = null; + } + return sortBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.TopRowsAggregation) + } + + static { + defaultInstance = new TopRowsAggregation(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.TopRowsAggregation) + } + + public interface PercentilesAggregationOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string field_name = 1; + boolean hasFieldName(); + String getFieldName(); + + // repeated double percentiles = 2; + java.util.List getPercentilesList(); + int getPercentilesCount(); + double getPercentiles(int index); + + // optional bytes missing = 3; + boolean hasMissing(); + com.google.protobuf.ByteString getMissing(); + } + public static final class PercentilesAggregation extends + com.google.protobuf.GeneratedMessage + implements PercentilesAggregationOrBuilder { + // Use PercentilesAggregation.newBuilder() to construct. + private PercentilesAggregation(Builder builder) { + super(builder); + } + private PercentilesAggregation(boolean noInit) {} + + private static final PercentilesAggregation defaultInstance; + public static PercentilesAggregation getDefaultInstance() { + return defaultInstance; + } + + public PercentilesAggregation getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentilesAggregation_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentilesAggregation_fieldAccessorTable; + } + + private int bitField0_; + // optional string field_name = 1; + public static final int FIELD_NAME_FIELD_NUMBER = 1; + private java.lang.Object fieldName_; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + fieldName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getFieldNameBytes() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + fieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // repeated double percentiles = 2; + public static final int PERCENTILES_FIELD_NUMBER = 2; + private java.util.List percentiles_; + public java.util.List + getPercentilesList() { + return percentiles_; + } + public int getPercentilesCount() { + return percentiles_.size(); + } + public double getPercentiles(int index) { + return percentiles_.get(index); + } + + // optional bytes missing = 3; + public static final int MISSING_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString missing_; + public boolean hasMissing() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getMissing() { + return missing_; + } + + private void initFields() { + fieldName_ = ""; + percentiles_ = java.util.Collections.emptyList();; + missing_ = com.google.protobuf.ByteString.EMPTY; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getFieldNameBytes()); + } + for (int i = 0; i < percentiles_.size(); i++) { + output.writeDouble(2, percentiles_.get(i)); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(3, missing_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getFieldNameBytes()); + } + { + int dataSize = 0; + dataSize = 8 * getPercentilesList().size(); + size += dataSize; + size += 1 * getPercentilesList().size(); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, missing_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregation prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentilesAggregation_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentilesAggregation_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + fieldName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + percentiles_ = java.util.Collections.emptyList();; + bitField0_ = (bitField0_ & ~0x00000002); + missing_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregation.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregation getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregation.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregation build() { + com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregation buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregation buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregation result = new com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregation(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.fieldName_ = fieldName_; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + percentiles_ = java.util.Collections.unmodifiableList(percentiles_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.percentiles_ = percentiles_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000002; + } + result.missing_ = missing_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregation) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregation other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregation.getDefaultInstance()) return this; + if (other.hasFieldName()) { + setFieldName(other.getFieldName()); + } + if (!other.percentiles_.isEmpty()) { + if (percentiles_.isEmpty()) { + percentiles_ = other.percentiles_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensurePercentilesIsMutable(); + percentiles_.addAll(other.percentiles_); + } + onChanged(); + } + if (other.hasMissing()) { + setMissing(other.getMissing()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + fieldName_ = input.readBytes(); + break; + } + case 17: { + ensurePercentilesIsMutable(); + percentiles_.add(input.readDouble()); + break; + } + case 18: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + addPercentiles(input.readDouble()); + } + input.popLimit(limit); + break; + } + case 26: { + bitField0_ |= 0x00000004; + missing_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // optional string field_name = 1; + private java.lang.Object fieldName_ = ""; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + fieldName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setFieldName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + return this; + } + public Builder clearFieldName() { + bitField0_ = (bitField0_ & ~0x00000001); + fieldName_ = getDefaultInstance().getFieldName(); + onChanged(); + return this; + } + void setFieldName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + } + + // repeated double percentiles = 2; + private java.util.List percentiles_ = java.util.Collections.emptyList();; + private void ensurePercentilesIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + percentiles_ = new java.util.ArrayList(percentiles_); + bitField0_ |= 0x00000002; + } + } + public java.util.List + getPercentilesList() { + return java.util.Collections.unmodifiableList(percentiles_); + } + public int getPercentilesCount() { + return percentiles_.size(); + } + public double getPercentiles(int index) { + return percentiles_.get(index); + } + public Builder setPercentiles( + int index, double value) { + ensurePercentilesIsMutable(); + percentiles_.set(index, value); + onChanged(); + return this; + } + public Builder addPercentiles(double value) { + ensurePercentilesIsMutable(); + percentiles_.add(value); + onChanged(); + return this; + } + public Builder addAllPercentiles( + java.lang.Iterable values) { + ensurePercentilesIsMutable(); + super.addAll(values, percentiles_); + onChanged(); + return this; + } + public Builder clearPercentiles() { + percentiles_ = java.util.Collections.emptyList();; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + // optional bytes missing = 3; + private com.google.protobuf.ByteString missing_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasMissing() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.google.protobuf.ByteString getMissing() { + return missing_; + } + public Builder setMissing(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + missing_ = value; + onChanged(); + return this; + } + public Builder clearMissing() { + bitField0_ = (bitField0_ & ~0x00000004); + missing_ = getDefaultInstance().getMissing(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.PercentilesAggregation) + } + + static { + defaultInstance = new PercentilesAggregation(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.PercentilesAggregation) + } + + public interface FieldRangeOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional bytes min = 1; + boolean hasMin(); + com.google.protobuf.ByteString getMin(); + + // optional bytes max = 2; + boolean hasMax(); + com.google.protobuf.ByteString getMax(); + } + public static final class FieldRange extends + com.google.protobuf.GeneratedMessage + implements FieldRangeOrBuilder { + // Use FieldRange.newBuilder() to construct. + private FieldRange(Builder builder) { + super(builder); + } + private FieldRange(boolean noInit) {} + + private static final FieldRange defaultInstance; + public static FieldRange getDefaultInstance() { + return defaultInstance; + } + + public FieldRange getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_FieldRange_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_FieldRange_fieldAccessorTable; + } + + private int bitField0_; + // optional bytes min = 1; + public static final int MIN_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString min_; + public boolean hasMin() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.google.protobuf.ByteString getMin() { + return min_; + } + + // optional bytes max = 2; + public static final int MAX_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString max_; + public boolean hasMax() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getMax() { + return max_; + } + + private void initFields() { + min_ = com.google.protobuf.ByteString.EMPTY; + max_ = com.google.protobuf.ByteString.EMPTY; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, min_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, max_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, min_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, max_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.FieldRangeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_FieldRange_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_FieldRange_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + min_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + max_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange build() { + com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange result = new com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.min_ = min_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.max_ = max_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange.getDefaultInstance()) return this; + if (other.hasMin()) { + setMin(other.getMin()); + } + if (other.hasMax()) { + setMax(other.getMax()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + min_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + max_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // optional bytes min = 1; + private com.google.protobuf.ByteString min_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasMin() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.google.protobuf.ByteString getMin() { + return min_; + } + public Builder setMin(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + min_ = value; + onChanged(); + return this; + } + public Builder clearMin() { + bitField0_ = (bitField0_ & ~0x00000001); + min_ = getDefaultInstance().getMin(); + onChanged(); + return this; + } + + // optional bytes max = 2; + private com.google.protobuf.ByteString max_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasMax() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getMax() { + return max_; + } + public Builder setMax(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + max_ = value; + onChanged(); + return this; + } + public Builder clearMax() { + bitField0_ = (bitField0_ & ~0x00000002); + max_ = getDefaultInstance().getMax(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.FieldRange) + } + + static { + defaultInstance = new FieldRange(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.FieldRange) + } + + public interface GroupByHistogramOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string field_name = 1; + boolean hasFieldName(); + String getFieldName(); + + // optional bytes interval = 2; + boolean hasInterval(); + com.google.protobuf.ByteString getInterval(); + + // optional bytes missing = 3; + boolean hasMissing(); + com.google.protobuf.ByteString getMissing(); + + // optional int64 min_doc_count = 4; + boolean hasMinDocCount(); + long getMinDocCount(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.GroupBySort sort = 5; + boolean hasSort(); + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort getSort(); + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySortOrBuilder getSortOrBuilder(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.FieldRange field_range = 6; + boolean hasFieldRange(); + com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange getFieldRange(); + com.alicloud.openservices.tablestore.core.protocol.Search.FieldRangeOrBuilder getFieldRangeOrBuilder(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.Aggregations sub_aggs = 7; + boolean hasSubAggs(); + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations getSubAggs(); + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsOrBuilder getSubAggsOrBuilder(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.GroupBys sub_group_bys = 8; + boolean hasSubGroupBys(); + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys getSubGroupBys(); + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysOrBuilder getSubGroupBysOrBuilder(); + } + public static final class GroupByHistogram extends + com.google.protobuf.GeneratedMessage + implements GroupByHistogramOrBuilder { + // Use GroupByHistogram.newBuilder() to construct. + private GroupByHistogram(Builder builder) { + super(builder); + } + private GroupByHistogram(boolean noInit) {} + + private static final GroupByHistogram defaultInstance; + public static GroupByHistogram getDefaultInstance() { + return defaultInstance; + } + + public GroupByHistogram getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByHistogram_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByHistogram_fieldAccessorTable; + } + + private int bitField0_; + // optional string field_name = 1; + public static final int FIELD_NAME_FIELD_NUMBER = 1; + private java.lang.Object fieldName_; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + fieldName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getFieldNameBytes() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + fieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional bytes interval = 2; + public static final int INTERVAL_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString interval_; + public boolean hasInterval() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getInterval() { + return interval_; + } + + // optional bytes missing = 3; + public static final int MISSING_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString missing_; + public boolean hasMissing() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.google.protobuf.ByteString getMissing() { + return missing_; + } + + // optional int64 min_doc_count = 4; + public static final int MIN_DOC_COUNT_FIELD_NUMBER = 4; + private long minDocCount_; + public boolean hasMinDocCount() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public long getMinDocCount() { + return minDocCount_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.GroupBySort sort = 5; + public static final int SORT_FIELD_NUMBER = 5; + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort sort_; + public boolean hasSort() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort getSort() { + return sort_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySortOrBuilder getSortOrBuilder() { + return sort_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.FieldRange field_range = 6; + public static final int FIELD_RANGE_FIELD_NUMBER = 6; + private com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange fieldRange_; + public boolean hasFieldRange() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange getFieldRange() { + return fieldRange_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.FieldRangeOrBuilder getFieldRangeOrBuilder() { + return fieldRange_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.Aggregations sub_aggs = 7; + public static final int SUB_AGGS_FIELD_NUMBER = 7; + private com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations subAggs_; + public boolean hasSubAggs() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations getSubAggs() { + return subAggs_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsOrBuilder getSubAggsOrBuilder() { + return subAggs_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.GroupBys sub_group_bys = 8; + public static final int SUB_GROUP_BYS_FIELD_NUMBER = 8; + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys subGroupBys_; + public boolean hasSubGroupBys() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys getSubGroupBys() { + return subGroupBys_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysOrBuilder getSubGroupBysOrBuilder() { + return subGroupBys_; + } + + private void initFields() { + fieldName_ = ""; + interval_ = com.google.protobuf.ByteString.EMPTY; + missing_ = com.google.protobuf.ByteString.EMPTY; + minDocCount_ = 0L; + sort_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort.getDefaultInstance(); + fieldRange_ = com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange.getDefaultInstance(); + subAggs_ = com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.getDefaultInstance(); + subGroupBys_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getFieldNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, interval_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeBytes(3, missing_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeInt64(4, minDocCount_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeMessage(5, sort_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeMessage(6, fieldRange_); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + output.writeMessage(7, subAggs_); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + output.writeMessage(8, subGroupBys_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getFieldNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, interval_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, missing_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(4, minDocCount_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, sort_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, fieldRange_); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, subAggs_); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, subGroupBys_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogram parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogram parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogram parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogram parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogram parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogram parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogram parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogram parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogram parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogram parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogram prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByHistogram_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByHistogram_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogram.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getSortFieldBuilder(); + getFieldRangeFieldBuilder(); + getSubAggsFieldBuilder(); + getSubGroupBysFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + fieldName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + interval_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + missing_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + minDocCount_ = 0L; + bitField0_ = (bitField0_ & ~0x00000008); + if (sortBuilder_ == null) { + sort_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort.getDefaultInstance(); + } else { + sortBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + if (fieldRangeBuilder_ == null) { + fieldRange_ = com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange.getDefaultInstance(); + } else { + fieldRangeBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + if (subAggsBuilder_ == null) { + subAggs_ = com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.getDefaultInstance(); + } else { + subAggsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000040); + if (subGroupBysBuilder_ == null) { + subGroupBys_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.getDefaultInstance(); + } else { + subGroupBysBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000080); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogram.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogram getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogram.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogram build() { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogram result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogram buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogram result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogram buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogram result = new com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogram(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.fieldName_ = fieldName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.interval_ = interval_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.missing_ = missing_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.minDocCount_ = minDocCount_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + if (sortBuilder_ == null) { + result.sort_ = sort_; + } else { + result.sort_ = sortBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000020; + } + if (fieldRangeBuilder_ == null) { + result.fieldRange_ = fieldRange_; + } else { + result.fieldRange_ = fieldRangeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) == 0x00000040)) { + to_bitField0_ |= 0x00000040; + } + if (subAggsBuilder_ == null) { + result.subAggs_ = subAggs_; + } else { + result.subAggs_ = subAggsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000080) == 0x00000080)) { + to_bitField0_ |= 0x00000080; + } + if (subGroupBysBuilder_ == null) { + result.subGroupBys_ = subGroupBys_; + } else { + result.subGroupBys_ = subGroupBysBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogram) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogram)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogram other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogram.getDefaultInstance()) return this; + if (other.hasFieldName()) { + setFieldName(other.getFieldName()); + } + if (other.hasInterval()) { + setInterval(other.getInterval()); + } + if (other.hasMissing()) { + setMissing(other.getMissing()); + } + if (other.hasMinDocCount()) { + setMinDocCount(other.getMinDocCount()); + } + if (other.hasSort()) { + mergeSort(other.getSort()); + } + if (other.hasFieldRange()) { + mergeFieldRange(other.getFieldRange()); + } + if (other.hasSubAggs()) { + mergeSubAggs(other.getSubAggs()); + } + if (other.hasSubGroupBys()) { + mergeSubGroupBys(other.getSubGroupBys()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + fieldName_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + interval_ = input.readBytes(); + break; + } + case 26: { + bitField0_ |= 0x00000004; + missing_ = input.readBytes(); + break; + } + case 32: { + bitField0_ |= 0x00000008; + minDocCount_ = input.readInt64(); + break; + } + case 42: { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort.newBuilder(); + if (hasSort()) { + subBuilder.mergeFrom(getSort()); + } + input.readMessage(subBuilder, extensionRegistry); + setSort(subBuilder.buildPartial()); + break; + } + case 50: { + com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange.newBuilder(); + if (hasFieldRange()) { + subBuilder.mergeFrom(getFieldRange()); + } + input.readMessage(subBuilder, extensionRegistry); + setFieldRange(subBuilder.buildPartial()); + break; + } + case 58: { + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.newBuilder(); + if (hasSubAggs()) { + subBuilder.mergeFrom(getSubAggs()); + } + input.readMessage(subBuilder, extensionRegistry); + setSubAggs(subBuilder.buildPartial()); + break; + } + case 66: { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.newBuilder(); + if (hasSubGroupBys()) { + subBuilder.mergeFrom(getSubGroupBys()); + } + input.readMessage(subBuilder, extensionRegistry); + setSubGroupBys(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // optional string field_name = 1; + private java.lang.Object fieldName_ = ""; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + fieldName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setFieldName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + return this; + } + public Builder clearFieldName() { + bitField0_ = (bitField0_ & ~0x00000001); + fieldName_ = getDefaultInstance().getFieldName(); + onChanged(); + return this; + } + void setFieldName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + } + + // optional bytes interval = 2; + private com.google.protobuf.ByteString interval_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasInterval() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getInterval() { + return interval_; + } + public Builder setInterval(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + interval_ = value; + onChanged(); + return this; + } + public Builder clearInterval() { + bitField0_ = (bitField0_ & ~0x00000002); + interval_ = getDefaultInstance().getInterval(); + onChanged(); + return this; + } + + // optional bytes missing = 3; + private com.google.protobuf.ByteString missing_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasMissing() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.google.protobuf.ByteString getMissing() { + return missing_; + } + public Builder setMissing(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + missing_ = value; + onChanged(); + return this; + } + public Builder clearMissing() { + bitField0_ = (bitField0_ & ~0x00000004); + missing_ = getDefaultInstance().getMissing(); + onChanged(); + return this; + } + + // optional int64 min_doc_count = 4; + private long minDocCount_ ; + public boolean hasMinDocCount() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public long getMinDocCount() { + return minDocCount_; + } + public Builder setMinDocCount(long value) { + bitField0_ |= 0x00000008; + minDocCount_ = value; + onChanged(); + return this; + } + public Builder clearMinDocCount() { + bitField0_ = (bitField0_ & ~0x00000008); + minDocCount_ = 0L; + onChanged(); + return this; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.GroupBySort sort = 5; + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort sort_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySortOrBuilder> sortBuilder_; + public boolean hasSort() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort getSort() { + if (sortBuilder_ == null) { + return sort_; + } else { + return sortBuilder_.getMessage(); + } + } + public Builder setSort(com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort value) { + if (sortBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sort_ = value; + onChanged(); + } else { + sortBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + return this; + } + public Builder setSort( + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort.Builder builderForValue) { + if (sortBuilder_ == null) { + sort_ = builderForValue.build(); + onChanged(); + } else { + sortBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + return this; + } + public Builder mergeSort(com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort value) { + if (sortBuilder_ == null) { + if (((bitField0_ & 0x00000010) == 0x00000010) && + sort_ != com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort.getDefaultInstance()) { + sort_ = + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort.newBuilder(sort_).mergeFrom(value).buildPartial(); + } else { + sort_ = value; + } + onChanged(); + } else { + sortBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + return this; + } + public Builder clearSort() { + if (sortBuilder_ == null) { + sort_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort.getDefaultInstance(); + onChanged(); + } else { + sortBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort.Builder getSortBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getSortFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySortOrBuilder getSortOrBuilder() { + if (sortBuilder_ != null) { + return sortBuilder_.getMessageOrBuilder(); + } else { + return sort_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySortOrBuilder> + getSortFieldBuilder() { + if (sortBuilder_ == null) { + sortBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySortOrBuilder>( + sort_, + getParentForChildren(), + isClean()); + sort_ = null; + } + return sortBuilder_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.FieldRange field_range = 6; + private com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange fieldRange_ = com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange, com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.FieldRangeOrBuilder> fieldRangeBuilder_; + public boolean hasFieldRange() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange getFieldRange() { + if (fieldRangeBuilder_ == null) { + return fieldRange_; + } else { + return fieldRangeBuilder_.getMessage(); + } + } + public Builder setFieldRange(com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange value) { + if (fieldRangeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fieldRange_ = value; + onChanged(); + } else { + fieldRangeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + return this; + } + public Builder setFieldRange( + com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange.Builder builderForValue) { + if (fieldRangeBuilder_ == null) { + fieldRange_ = builderForValue.build(); + onChanged(); + } else { + fieldRangeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + return this; + } + public Builder mergeFieldRange(com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange value) { + if (fieldRangeBuilder_ == null) { + if (((bitField0_ & 0x00000020) == 0x00000020) && + fieldRange_ != com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange.getDefaultInstance()) { + fieldRange_ = + com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange.newBuilder(fieldRange_).mergeFrom(value).buildPartial(); + } else { + fieldRange_ = value; + } + onChanged(); + } else { + fieldRangeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + return this; + } + public Builder clearFieldRange() { + if (fieldRangeBuilder_ == null) { + fieldRange_ = com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange.getDefaultInstance(); + onChanged(); + } else { + fieldRangeBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange.Builder getFieldRangeBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getFieldRangeFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.FieldRangeOrBuilder getFieldRangeOrBuilder() { + if (fieldRangeBuilder_ != null) { + return fieldRangeBuilder_.getMessageOrBuilder(); + } else { + return fieldRange_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange, com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.FieldRangeOrBuilder> + getFieldRangeFieldBuilder() { + if (fieldRangeBuilder_ == null) { + fieldRangeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange, com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.FieldRangeOrBuilder>( + fieldRange_, + getParentForChildren(), + isClean()); + fieldRange_ = null; + } + return fieldRangeBuilder_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.Aggregations sub_aggs = 7; + private com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations subAggs_ = com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations, com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsOrBuilder> subAggsBuilder_; + public boolean hasSubAggs() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations getSubAggs() { + if (subAggsBuilder_ == null) { + return subAggs_; + } else { + return subAggsBuilder_.getMessage(); + } + } + public Builder setSubAggs(com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations value) { + if (subAggsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subAggs_ = value; + onChanged(); + } else { + subAggsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + return this; + } + public Builder setSubAggs( + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.Builder builderForValue) { + if (subAggsBuilder_ == null) { + subAggs_ = builderForValue.build(); + onChanged(); + } else { + subAggsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + return this; + } + public Builder mergeSubAggs(com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations value) { + if (subAggsBuilder_ == null) { + if (((bitField0_ & 0x00000040) == 0x00000040) && + subAggs_ != com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.getDefaultInstance()) { + subAggs_ = + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.newBuilder(subAggs_).mergeFrom(value).buildPartial(); + } else { + subAggs_ = value; + } + onChanged(); + } else { + subAggsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + return this; + } + public Builder clearSubAggs() { + if (subAggsBuilder_ == null) { + subAggs_ = com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.getDefaultInstance(); + onChanged(); + } else { + subAggsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000040); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.Builder getSubAggsBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getSubAggsFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsOrBuilder getSubAggsOrBuilder() { + if (subAggsBuilder_ != null) { + return subAggsBuilder_.getMessageOrBuilder(); + } else { + return subAggs_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations, com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsOrBuilder> + getSubAggsFieldBuilder() { + if (subAggsBuilder_ == null) { + subAggsBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations, com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsOrBuilder>( + subAggs_, + getParentForChildren(), + isClean()); + subAggs_ = null; + } + return subAggsBuilder_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.GroupBys sub_group_bys = 8; + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys subGroupBys_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysOrBuilder> subGroupBysBuilder_; + public boolean hasSubGroupBys() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys getSubGroupBys() { + if (subGroupBysBuilder_ == null) { + return subGroupBys_; + } else { + return subGroupBysBuilder_.getMessage(); + } + } + public Builder setSubGroupBys(com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys value) { + if (subGroupBysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subGroupBys_ = value; + onChanged(); + } else { + subGroupBysBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + return this; + } + public Builder setSubGroupBys( + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.Builder builderForValue) { + if (subGroupBysBuilder_ == null) { + subGroupBys_ = builderForValue.build(); + onChanged(); + } else { + subGroupBysBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + return this; + } + public Builder mergeSubGroupBys(com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys value) { + if (subGroupBysBuilder_ == null) { + if (((bitField0_ & 0x00000080) == 0x00000080) && + subGroupBys_ != com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.getDefaultInstance()) { + subGroupBys_ = + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.newBuilder(subGroupBys_).mergeFrom(value).buildPartial(); + } else { + subGroupBys_ = value; + } + onChanged(); + } else { + subGroupBysBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + return this; + } + public Builder clearSubGroupBys() { + if (subGroupBysBuilder_ == null) { + subGroupBys_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.getDefaultInstance(); + onChanged(); + } else { + subGroupBysBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000080); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.Builder getSubGroupBysBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getSubGroupBysFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysOrBuilder getSubGroupBysOrBuilder() { + if (subGroupBysBuilder_ != null) { + return subGroupBysBuilder_.getMessageOrBuilder(); + } else { + return subGroupBys_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysOrBuilder> + getSubGroupBysFieldBuilder() { + if (subGroupBysBuilder_ == null) { + subGroupBysBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysOrBuilder>( + subGroupBys_, + getParentForChildren(), + isClean()); + subGroupBys_ = null; + } + return subGroupBysBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GroupByHistogram) + } + + static { + defaultInstance = new GroupByHistogram(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GroupByHistogram) + } + + public interface GroupKeySortOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional .com.alicloud.openservices.tablestore.core.protocol.SortOrder order = 1; + boolean hasOrder(); + com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder getOrder(); + } + public static final class GroupKeySort extends + com.google.protobuf.GeneratedMessage + implements GroupKeySortOrBuilder { + // Use GroupKeySort.newBuilder() to construct. + private GroupKeySort(Builder builder) { + super(builder); + } + private GroupKeySort(boolean noInit) {} + + private static final GroupKeySort defaultInstance; + public static GroupKeySort getDefaultInstance() { + return defaultInstance; + } + + public GroupKeySort getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupKeySort_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupKeySort_fieldAccessorTable; + } + + private int bitField0_; + // optional .com.alicloud.openservices.tablestore.core.protocol.SortOrder order = 1; + public static final int ORDER_FIELD_NUMBER = 1; + private com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder order_; + public boolean hasOrder() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder getOrder() { + return order_; + } + + private void initFields() { + order_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.SORT_ORDER_ASC; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeEnum(1, order_.getNumber()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, order_.getNumber()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySortOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupKeySort_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupKeySort_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + order_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.SORT_ORDER_ASC; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort build() { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort result = new com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.order_ = order_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort.getDefaultInstance()) return this; + if (other.hasOrder()) { + setOrder(other.getOrder()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder value = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + order_ = value; + } + break; + } + } + } + } + + private int bitField0_; + + // optional .com.alicloud.openservices.tablestore.core.protocol.SortOrder order = 1; + private com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder order_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.SORT_ORDER_ASC; + public boolean hasOrder() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder getOrder() { + return order_; + } + public Builder setOrder(com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + order_ = value; + onChanged(); + return this; + } + public Builder clearOrder() { + bitField0_ = (bitField0_ & ~0x00000001); + order_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.SORT_ORDER_ASC; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GroupKeySort) + } + + static { + defaultInstance = new GroupKeySort(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GroupKeySort) + } + + public interface RowCountSortOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional .com.alicloud.openservices.tablestore.core.protocol.SortOrder order = 1; + boolean hasOrder(); + com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder getOrder(); + } + public static final class RowCountSort extends + com.google.protobuf.GeneratedMessage + implements RowCountSortOrBuilder { + // Use RowCountSort.newBuilder() to construct. + private RowCountSort(Builder builder) { + super(builder); + } + private RowCountSort(boolean noInit) {} + + private static final RowCountSort defaultInstance; + public static RowCountSort getDefaultInstance() { + return defaultInstance; + } + + public RowCountSort getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_RowCountSort_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_RowCountSort_fieldAccessorTable; + } + + private int bitField0_; + // optional .com.alicloud.openservices.tablestore.core.protocol.SortOrder order = 1; + public static final int ORDER_FIELD_NUMBER = 1; + private com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder order_; + public boolean hasOrder() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder getOrder() { + return order_; + } + + private void initFields() { + order_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.SORT_ORDER_ASC; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeEnum(1, order_.getNumber()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, order_.getNumber()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSortOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_RowCountSort_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_RowCountSort_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + order_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.SORT_ORDER_ASC; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort build() { + com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort result = new com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.order_ = order_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort.getDefaultInstance()) return this; + if (other.hasOrder()) { + setOrder(other.getOrder()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder value = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + order_ = value; + } + break; + } + } + } + } + + private int bitField0_; + + // optional .com.alicloud.openservices.tablestore.core.protocol.SortOrder order = 1; + private com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder order_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.SORT_ORDER_ASC; + public boolean hasOrder() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder getOrder() { + return order_; + } + public Builder setOrder(com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + order_ = value; + onChanged(); + return this; + } + public Builder clearOrder() { + bitField0_ = (bitField0_ & ~0x00000001); + order_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.SORT_ORDER_ASC; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.RowCountSort) + } + + static { + defaultInstance = new RowCountSort(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.RowCountSort) + } + + public interface SubAggSortOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string sub_agg_name = 1; + boolean hasSubAggName(); + String getSubAggName(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.SortOrder order = 2; + boolean hasOrder(); + com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder getOrder(); + } + public static final class SubAggSort extends + com.google.protobuf.GeneratedMessage + implements SubAggSortOrBuilder { + // Use SubAggSort.newBuilder() to construct. + private SubAggSort(Builder builder) { + super(builder); + } + private SubAggSort(boolean noInit) {} + + private static final SubAggSort defaultInstance; + public static SubAggSort getDefaultInstance() { + return defaultInstance; + } + + public SubAggSort getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SubAggSort_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SubAggSort_fieldAccessorTable; + } + + private int bitField0_; + // optional string sub_agg_name = 1; + public static final int SUB_AGG_NAME_FIELD_NUMBER = 1; + private java.lang.Object subAggName_; + public boolean hasSubAggName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getSubAggName() { + java.lang.Object ref = subAggName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + subAggName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getSubAggNameBytes() { + java.lang.Object ref = subAggName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + subAggName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.SortOrder order = 2; + public static final int ORDER_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder order_; + public boolean hasOrder() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder getOrder() { + return order_; + } + + private void initFields() { + subAggName_ = ""; + order_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.SORT_ORDER_ASC; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getSubAggNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeEnum(2, order_.getNumber()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getSubAggNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, order_.getNumber()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSortOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SubAggSort_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SubAggSort_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + subAggName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + order_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.SORT_ORDER_ASC; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort build() { + com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort result = new com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.subAggName_ = subAggName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.order_ = order_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort.getDefaultInstance()) return this; + if (other.hasSubAggName()) { + setSubAggName(other.getSubAggName()); + } + if (other.hasOrder()) { + setOrder(other.getOrder()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + subAggName_ = input.readBytes(); + break; + } + case 16: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder value = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(2, rawValue); + } else { + bitField0_ |= 0x00000002; + order_ = value; + } + break; + } + } + } + } + + private int bitField0_; + + // optional string sub_agg_name = 1; + private java.lang.Object subAggName_ = ""; + public boolean hasSubAggName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getSubAggName() { + java.lang.Object ref = subAggName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + subAggName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setSubAggName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + subAggName_ = value; + onChanged(); + return this; + } + public Builder clearSubAggName() { + bitField0_ = (bitField0_ & ~0x00000001); + subAggName_ = getDefaultInstance().getSubAggName(); + onChanged(); + return this; + } + void setSubAggName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + subAggName_ = value; + onChanged(); + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.SortOrder order = 2; + private com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder order_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.SORT_ORDER_ASC; + public boolean hasOrder() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder getOrder() { + return order_; + } + public Builder setOrder(com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + order_ = value; + onChanged(); + return this; + } + public Builder clearOrder() { + bitField0_ = (bitField0_ & ~0x00000002); + order_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.SORT_ORDER_ASC; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.SubAggSort) + } + + static { + defaultInstance = new SubAggSort(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.SubAggSort) + } + + public interface GroupBySorterOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional .com.alicloud.openservices.tablestore.core.protocol.GroupKeySort group_key_sort = 1; + boolean hasGroupKeySort(); + com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort getGroupKeySort(); + com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySortOrBuilder getGroupKeySortOrBuilder(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.RowCountSort row_count_sort = 2; + boolean hasRowCountSort(); + com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort getRowCountSort(); + com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSortOrBuilder getRowCountSortOrBuilder(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.SubAggSort sub_agg_sort = 3; + boolean hasSubAggSort(); + com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort getSubAggSort(); + com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSortOrBuilder getSubAggSortOrBuilder(); + } + public static final class GroupBySorter extends + com.google.protobuf.GeneratedMessage + implements GroupBySorterOrBuilder { + // Use GroupBySorter.newBuilder() to construct. + private GroupBySorter(Builder builder) { + super(builder); + } + private GroupBySorter(boolean noInit) {} + + private static final GroupBySorter defaultInstance; + public static GroupBySorter getDefaultInstance() { + return defaultInstance; + } + + public GroupBySorter getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupBySorter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupBySorter_fieldAccessorTable; + } + + private int bitField0_; + // optional .com.alicloud.openservices.tablestore.core.protocol.GroupKeySort group_key_sort = 1; + public static final int GROUP_KEY_SORT_FIELD_NUMBER = 1; + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort groupKeySort_; + public boolean hasGroupKeySort() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort getGroupKeySort() { + return groupKeySort_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySortOrBuilder getGroupKeySortOrBuilder() { + return groupKeySort_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.RowCountSort row_count_sort = 2; + public static final int ROW_COUNT_SORT_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort rowCountSort_; + public boolean hasRowCountSort() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort getRowCountSort() { + return rowCountSort_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSortOrBuilder getRowCountSortOrBuilder() { + return rowCountSort_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.SubAggSort sub_agg_sort = 3; + public static final int SUB_AGG_SORT_FIELD_NUMBER = 3; + private com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort subAggSort_; + public boolean hasSubAggSort() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort getSubAggSort() { + return subAggSort_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSortOrBuilder getSubAggSortOrBuilder() { + return subAggSort_; + } + + private void initFields() { + groupKeySort_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort.getDefaultInstance(); + rowCountSort_ = com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort.getDefaultInstance(); + subAggSort_ = com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(1, groupKeySort_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeMessage(2, rowCountSort_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeMessage(3, subAggSort_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, groupKeySort_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, rowCountSort_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, subAggSort_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorter parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorter prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupBySorter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupBySorter_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getGroupKeySortFieldBuilder(); + getRowCountSortFieldBuilder(); + getSubAggSortFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (groupKeySortBuilder_ == null) { + groupKeySort_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort.getDefaultInstance(); + } else { + groupKeySortBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (rowCountSortBuilder_ == null) { + rowCountSort_ = com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort.getDefaultInstance(); + } else { + rowCountSortBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + if (subAggSortBuilder_ == null) { + subAggSort_ = com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort.getDefaultInstance(); + } else { + subAggSortBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorter.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorter getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorter.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorter build() { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorter buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorter buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorter result = new com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorter(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + if (groupKeySortBuilder_ == null) { + result.groupKeySort_ = groupKeySort_; + } else { + result.groupKeySort_ = groupKeySortBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + if (rowCountSortBuilder_ == null) { + result.rowCountSort_ = rowCountSort_; + } else { + result.rowCountSort_ = rowCountSortBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + if (subAggSortBuilder_ == null) { + result.subAggSort_ = subAggSort_; + } else { + result.subAggSort_ = subAggSortBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorter) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorter other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorter.getDefaultInstance()) return this; + if (other.hasGroupKeySort()) { + mergeGroupKeySort(other.getGroupKeySort()); + } + if (other.hasRowCountSort()) { + mergeRowCountSort(other.getRowCountSort()); + } + if (other.hasSubAggSort()) { + mergeSubAggSort(other.getSubAggSort()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort.newBuilder(); + if (hasGroupKeySort()) { + subBuilder.mergeFrom(getGroupKeySort()); + } + input.readMessage(subBuilder, extensionRegistry); + setGroupKeySort(subBuilder.buildPartial()); + break; + } + case 18: { + com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort.newBuilder(); + if (hasRowCountSort()) { + subBuilder.mergeFrom(getRowCountSort()); + } + input.readMessage(subBuilder, extensionRegistry); + setRowCountSort(subBuilder.buildPartial()); + break; + } + case 26: { + com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort.newBuilder(); + if (hasSubAggSort()) { + subBuilder.mergeFrom(getSubAggSort()); + } + input.readMessage(subBuilder, extensionRegistry); + setSubAggSort(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // optional .com.alicloud.openservices.tablestore.core.protocol.GroupKeySort group_key_sort = 1; + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort groupKeySort_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort, com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySortOrBuilder> groupKeySortBuilder_; + public boolean hasGroupKeySort() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort getGroupKeySort() { + if (groupKeySortBuilder_ == null) { + return groupKeySort_; + } else { + return groupKeySortBuilder_.getMessage(); + } + } + public Builder setGroupKeySort(com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort value) { + if (groupKeySortBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + groupKeySort_ = value; + onChanged(); + } else { + groupKeySortBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder setGroupKeySort( + com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort.Builder builderForValue) { + if (groupKeySortBuilder_ == null) { + groupKeySort_ = builderForValue.build(); + onChanged(); + } else { + groupKeySortBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder mergeGroupKeySort(com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort value) { + if (groupKeySortBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001) && + groupKeySort_ != com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort.getDefaultInstance()) { + groupKeySort_ = + com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort.newBuilder(groupKeySort_).mergeFrom(value).buildPartial(); + } else { + groupKeySort_ = value; + } + onChanged(); + } else { + groupKeySortBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder clearGroupKeySort() { + if (groupKeySortBuilder_ == null) { + groupKeySort_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort.getDefaultInstance(); + onChanged(); + } else { + groupKeySortBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort.Builder getGroupKeySortBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getGroupKeySortFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySortOrBuilder getGroupKeySortOrBuilder() { + if (groupKeySortBuilder_ != null) { + return groupKeySortBuilder_.getMessageOrBuilder(); + } else { + return groupKeySort_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort, com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySortOrBuilder> + getGroupKeySortFieldBuilder() { + if (groupKeySortBuilder_ == null) { + groupKeySortBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort, com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySortOrBuilder>( + groupKeySort_, + getParentForChildren(), + isClean()); + groupKeySort_ = null; + } + return groupKeySortBuilder_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.RowCountSort row_count_sort = 2; + private com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort rowCountSort_ = com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort, com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSortOrBuilder> rowCountSortBuilder_; + public boolean hasRowCountSort() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort getRowCountSort() { + if (rowCountSortBuilder_ == null) { + return rowCountSort_; + } else { + return rowCountSortBuilder_.getMessage(); + } + } + public Builder setRowCountSort(com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort value) { + if (rowCountSortBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rowCountSort_ = value; + onChanged(); + } else { + rowCountSortBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder setRowCountSort( + com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort.Builder builderForValue) { + if (rowCountSortBuilder_ == null) { + rowCountSort_ = builderForValue.build(); + onChanged(); + } else { + rowCountSortBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder mergeRowCountSort(com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort value) { + if (rowCountSortBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002) && + rowCountSort_ != com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort.getDefaultInstance()) { + rowCountSort_ = + com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort.newBuilder(rowCountSort_).mergeFrom(value).buildPartial(); + } else { + rowCountSort_ = value; + } + onChanged(); + } else { + rowCountSortBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder clearRowCountSort() { + if (rowCountSortBuilder_ == null) { + rowCountSort_ = com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort.getDefaultInstance(); + onChanged(); + } else { + rowCountSortBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort.Builder getRowCountSortBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getRowCountSortFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSortOrBuilder getRowCountSortOrBuilder() { + if (rowCountSortBuilder_ != null) { + return rowCountSortBuilder_.getMessageOrBuilder(); + } else { + return rowCountSort_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort, com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSortOrBuilder> + getRowCountSortFieldBuilder() { + if (rowCountSortBuilder_ == null) { + rowCountSortBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort, com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSortOrBuilder>( + rowCountSort_, + getParentForChildren(), + isClean()); + rowCountSort_ = null; + } + return rowCountSortBuilder_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.SubAggSort sub_agg_sort = 3; + private com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort subAggSort_ = com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort, com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSortOrBuilder> subAggSortBuilder_; + public boolean hasSubAggSort() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort getSubAggSort() { + if (subAggSortBuilder_ == null) { + return subAggSort_; + } else { + return subAggSortBuilder_.getMessage(); + } + } + public Builder setSubAggSort(com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort value) { + if (subAggSortBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subAggSort_ = value; + onChanged(); + } else { + subAggSortBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder setSubAggSort( + com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort.Builder builderForValue) { + if (subAggSortBuilder_ == null) { + subAggSort_ = builderForValue.build(); + onChanged(); + } else { + subAggSortBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder mergeSubAggSort(com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort value) { + if (subAggSortBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004) && + subAggSort_ != com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort.getDefaultInstance()) { + subAggSort_ = + com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort.newBuilder(subAggSort_).mergeFrom(value).buildPartial(); + } else { + subAggSort_ = value; + } + onChanged(); + } else { + subAggSortBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder clearSubAggSort() { + if (subAggSortBuilder_ == null) { + subAggSort_ = com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort.getDefaultInstance(); + onChanged(); + } else { + subAggSortBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort.Builder getSubAggSortBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getSubAggSortFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSortOrBuilder getSubAggSortOrBuilder() { + if (subAggSortBuilder_ != null) { + return subAggSortBuilder_.getMessageOrBuilder(); + } else { + return subAggSort_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort, com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSortOrBuilder> + getSubAggSortFieldBuilder() { + if (subAggSortBuilder_ == null) { + subAggSortBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort, com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSortOrBuilder>( + subAggSort_, + getParentForChildren(), + isClean()); + subAggSort_ = null; + } + return subAggSortBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GroupBySorter) + } + + static { + defaultInstance = new GroupBySorter(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GroupBySorter) + } + + public interface GroupBySortOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // repeated .com.alicloud.openservices.tablestore.core.protocol.GroupBySorter sorters = 1; + java.util.List + getSortersList(); + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorter getSorters(int index); + int getSortersCount(); + java.util.List + getSortersOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorterOrBuilder getSortersOrBuilder( + int index); + } + public static final class GroupBySort extends + com.google.protobuf.GeneratedMessage + implements GroupBySortOrBuilder { + // Use GroupBySort.newBuilder() to construct. + private GroupBySort(Builder builder) { + super(builder); + } + private GroupBySort(boolean noInit) {} + + private static final GroupBySort defaultInstance; + public static GroupBySort getDefaultInstance() { + return defaultInstance; + } + + public GroupBySort getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupBySort_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupBySort_fieldAccessorTable; + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.GroupBySorter sorters = 1; + public static final int SORTERS_FIELD_NUMBER = 1; + private java.util.List sorters_; + public java.util.List getSortersList() { + return sorters_; + } + public java.util.List + getSortersOrBuilderList() { + return sorters_; + } + public int getSortersCount() { + return sorters_.size(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorter getSorters(int index) { + return sorters_.get(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorterOrBuilder getSortersOrBuilder( + int index) { + return sorters_.get(index); + } + + private void initFields() { + sorters_ = java.util.Collections.emptyList(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < sorters_.size(); i++) { + output.writeMessage(1, sorters_.get(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < sorters_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, sorters_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySortOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupBySort_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupBySort_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getSortersFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (sortersBuilder_ == null) { + sorters_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + sortersBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort build() { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort result = new com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort(this); + int from_bitField0_ = bitField0_; + if (sortersBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + sorters_ = java.util.Collections.unmodifiableList(sorters_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.sorters_ = sorters_; + } else { + result.sorters_ = sortersBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort.getDefaultInstance()) return this; + if (sortersBuilder_ == null) { + if (!other.sorters_.isEmpty()) { + if (sorters_.isEmpty()) { + sorters_ = other.sorters_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSortersIsMutable(); + sorters_.addAll(other.sorters_); + } + onChanged(); + } + } else { + if (!other.sorters_.isEmpty()) { + if (sortersBuilder_.isEmpty()) { + sortersBuilder_.dispose(); + sortersBuilder_ = null; + sorters_ = other.sorters_; + bitField0_ = (bitField0_ & ~0x00000001); + sortersBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getSortersFieldBuilder() : null; + } else { + sortersBuilder_.addAllMessages(other.sorters_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorter.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorter.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addSorters(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // repeated .com.alicloud.openservices.tablestore.core.protocol.GroupBySorter sorters = 1; + private java.util.List sorters_ = + java.util.Collections.emptyList(); + private void ensureSortersIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + sorters_ = new java.util.ArrayList(sorters_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorter, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorter.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorterOrBuilder> sortersBuilder_; + + public java.util.List getSortersList() { + if (sortersBuilder_ == null) { + return java.util.Collections.unmodifiableList(sorters_); + } else { + return sortersBuilder_.getMessageList(); + } + } + public int getSortersCount() { + if (sortersBuilder_ == null) { + return sorters_.size(); + } else { + return sortersBuilder_.getCount(); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorter getSorters(int index) { + if (sortersBuilder_ == null) { + return sorters_.get(index); + } else { + return sortersBuilder_.getMessage(index); + } + } + public Builder setSorters( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorter value) { + if (sortersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSortersIsMutable(); + sorters_.set(index, value); + onChanged(); + } else { + sortersBuilder_.setMessage(index, value); + } + return this; + } + public Builder setSorters( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorter.Builder builderForValue) { + if (sortersBuilder_ == null) { + ensureSortersIsMutable(); + sorters_.set(index, builderForValue.build()); + onChanged(); + } else { + sortersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + public Builder addSorters(com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorter value) { + if (sortersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSortersIsMutable(); + sorters_.add(value); + onChanged(); + } else { + sortersBuilder_.addMessage(value); + } + return this; + } + public Builder addSorters( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorter value) { + if (sortersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSortersIsMutable(); + sorters_.add(index, value); + onChanged(); + } else { + sortersBuilder_.addMessage(index, value); + } + return this; + } + public Builder addSorters( + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorter.Builder builderForValue) { + if (sortersBuilder_ == null) { + ensureSortersIsMutable(); + sorters_.add(builderForValue.build()); + onChanged(); + } else { + sortersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + public Builder addSorters( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorter.Builder builderForValue) { + if (sortersBuilder_ == null) { + ensureSortersIsMutable(); + sorters_.add(index, builderForValue.build()); + onChanged(); + } else { + sortersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAllSorters( + java.lang.Iterable values) { + if (sortersBuilder_ == null) { + ensureSortersIsMutable(); + super.addAll(values, sorters_); + onChanged(); + } else { + sortersBuilder_.addAllMessages(values); + } + return this; + } + public Builder clearSorters() { + if (sortersBuilder_ == null) { + sorters_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + sortersBuilder_.clear(); + } + return this; + } + public Builder removeSorters(int index) { + if (sortersBuilder_ == null) { + ensureSortersIsMutable(); + sorters_.remove(index); + onChanged(); + } else { + sortersBuilder_.remove(index); + } + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorter.Builder getSortersBuilder( + int index) { + return getSortersFieldBuilder().getBuilder(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorterOrBuilder getSortersOrBuilder( + int index) { + if (sortersBuilder_ == null) { + return sorters_.get(index); } else { + return sortersBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getSortersOrBuilderList() { + if (sortersBuilder_ != null) { + return sortersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(sorters_); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorter.Builder addSortersBuilder() { + return getSortersFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorter.getDefaultInstance()); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorter.Builder addSortersBuilder( + int index) { + return getSortersFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorter.getDefaultInstance()); + } + public java.util.List + getSortersBuilderList() { + return getSortersFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorter, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorter.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorterOrBuilder> + getSortersFieldBuilder() { + if (sortersBuilder_ == null) { + sortersBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorter, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorter.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorterOrBuilder>( + sorters_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + sorters_ = null; + } + return sortersBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GroupBySort) + } + + static { + defaultInstance = new GroupBySort(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GroupBySort) + } + + public interface GroupByFieldOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string field_name = 1; + boolean hasFieldName(); + String getFieldName(); + + // optional int32 size = 2; + boolean hasSize(); + int getSize(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.GroupBySort sort = 3; + boolean hasSort(); + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort getSort(); + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySortOrBuilder getSortOrBuilder(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.Aggregations sub_aggs = 4; + boolean hasSubAggs(); + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations getSubAggs(); + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsOrBuilder getSubAggsOrBuilder(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.GroupBys sub_group_bys = 5; + boolean hasSubGroupBys(); + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys getSubGroupBys(); + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysOrBuilder getSubGroupBysOrBuilder(); + + // optional int64 min_doc_count = 6; + boolean hasMinDocCount(); + long getMinDocCount(); + } + public static final class GroupByField extends + com.google.protobuf.GeneratedMessage + implements GroupByFieldOrBuilder { + // Use GroupByField.newBuilder() to construct. + private GroupByField(Builder builder) { + super(builder); + } + private GroupByField(boolean noInit) {} + + private static final GroupByField defaultInstance; + public static GroupByField getDefaultInstance() { + return defaultInstance; + } + + public GroupByField getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByField_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByField_fieldAccessorTable; + } + + private int bitField0_; + // optional string field_name = 1; + public static final int FIELD_NAME_FIELD_NUMBER = 1; + private java.lang.Object fieldName_; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + fieldName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getFieldNameBytes() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + fieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional int32 size = 2; + public static final int SIZE_FIELD_NUMBER = 2; + private int size_; + public boolean hasSize() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public int getSize() { + return size_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.GroupBySort sort = 3; + public static final int SORT_FIELD_NUMBER = 3; + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort sort_; + public boolean hasSort() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort getSort() { + return sort_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySortOrBuilder getSortOrBuilder() { + return sort_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.Aggregations sub_aggs = 4; + public static final int SUB_AGGS_FIELD_NUMBER = 4; + private com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations subAggs_; + public boolean hasSubAggs() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations getSubAggs() { + return subAggs_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsOrBuilder getSubAggsOrBuilder() { + return subAggs_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.GroupBys sub_group_bys = 5; + public static final int SUB_GROUP_BYS_FIELD_NUMBER = 5; + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys subGroupBys_; + public boolean hasSubGroupBys() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys getSubGroupBys() { + return subGroupBys_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysOrBuilder getSubGroupBysOrBuilder() { + return subGroupBys_; + } + + // optional int64 min_doc_count = 6; + public static final int MIN_DOC_COUNT_FIELD_NUMBER = 6; + private long minDocCount_; + public boolean hasMinDocCount() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + public long getMinDocCount() { + return minDocCount_; + } + + private void initFields() { + fieldName_ = ""; + size_ = 0; + sort_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort.getDefaultInstance(); + subAggs_ = com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.getDefaultInstance(); + subGroupBys_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.getDefaultInstance(); + minDocCount_ = 0L; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getFieldNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeInt32(2, size_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeMessage(3, sort_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeMessage(4, subAggs_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeMessage(5, subGroupBys_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeInt64(6, minDocCount_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getFieldNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, size_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, sort_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, subAggs_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, subGroupBys_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(6, minDocCount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByField parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByField parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByField parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByField parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByField parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByField parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByField parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByField parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByField parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByField parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.GroupByField prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByField_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByField_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.GroupByField.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getSortFieldBuilder(); + getSubAggsFieldBuilder(); + getSubGroupBysFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + fieldName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + size_ = 0; + bitField0_ = (bitField0_ & ~0x00000002); + if (sortBuilder_ == null) { + sort_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort.getDefaultInstance(); + } else { + sortBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + if (subAggsBuilder_ == null) { + subAggs_ = com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.getDefaultInstance(); + } else { + subAggsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + if (subGroupBysBuilder_ == null) { + subGroupBys_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.getDefaultInstance(); + } else { + subGroupBysBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + minDocCount_ = 0L; + bitField0_ = (bitField0_ & ~0x00000020); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GroupByField.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByField getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GroupByField.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByField build() { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByField result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupByField buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByField result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByField buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByField result = new com.alicloud.openservices.tablestore.core.protocol.Search.GroupByField(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.fieldName_ = fieldName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.size_ = size_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + if (sortBuilder_ == null) { + result.sort_ = sort_; + } else { + result.sort_ = sortBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + if (subAggsBuilder_ == null) { + result.subAggs_ = subAggs_; + } else { + result.subAggs_ = subAggsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + if (subGroupBysBuilder_ == null) { + result.subGroupBys_ = subGroupBys_; + } else { + result.subGroupBys_ = subGroupBysBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000020; + } + result.minDocCount_ = minDocCount_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.GroupByField) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.GroupByField)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.GroupByField other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.GroupByField.getDefaultInstance()) return this; + if (other.hasFieldName()) { + setFieldName(other.getFieldName()); + } + if (other.hasSize()) { + setSize(other.getSize()); + } + if (other.hasSort()) { + mergeSort(other.getSort()); + } + if (other.hasSubAggs()) { + mergeSubAggs(other.getSubAggs()); + } + if (other.hasSubGroupBys()) { + mergeSubGroupBys(other.getSubGroupBys()); + } + if (other.hasMinDocCount()) { + setMinDocCount(other.getMinDocCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + fieldName_ = input.readBytes(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + size_ = input.readInt32(); + break; + } + case 26: { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort.newBuilder(); + if (hasSort()) { + subBuilder.mergeFrom(getSort()); + } + input.readMessage(subBuilder, extensionRegistry); + setSort(subBuilder.buildPartial()); + break; + } + case 34: { + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.newBuilder(); + if (hasSubAggs()) { + subBuilder.mergeFrom(getSubAggs()); + } + input.readMessage(subBuilder, extensionRegistry); + setSubAggs(subBuilder.buildPartial()); + break; + } + case 42: { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.newBuilder(); + if (hasSubGroupBys()) { + subBuilder.mergeFrom(getSubGroupBys()); + } + input.readMessage(subBuilder, extensionRegistry); + setSubGroupBys(subBuilder.buildPartial()); + break; + } + case 48: { + bitField0_ |= 0x00000020; + minDocCount_ = input.readInt64(); + break; + } + } + } + } + + private int bitField0_; + + // optional string field_name = 1; + private java.lang.Object fieldName_ = ""; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + fieldName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setFieldName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + return this; + } + public Builder clearFieldName() { + bitField0_ = (bitField0_ & ~0x00000001); + fieldName_ = getDefaultInstance().getFieldName(); + onChanged(); + return this; + } + void setFieldName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + } + + // optional int32 size = 2; + private int size_ ; + public boolean hasSize() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public int getSize() { + return size_; + } + public Builder setSize(int value) { + bitField0_ |= 0x00000002; + size_ = value; + onChanged(); + return this; + } + public Builder clearSize() { + bitField0_ = (bitField0_ & ~0x00000002); + size_ = 0; + onChanged(); + return this; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.GroupBySort sort = 3; + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort sort_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySortOrBuilder> sortBuilder_; + public boolean hasSort() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort getSort() { + if (sortBuilder_ == null) { + return sort_; + } else { + return sortBuilder_.getMessage(); + } + } + public Builder setSort(com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort value) { + if (sortBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sort_ = value; + onChanged(); + } else { + sortBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder setSort( + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort.Builder builderForValue) { + if (sortBuilder_ == null) { + sort_ = builderForValue.build(); + onChanged(); + } else { + sortBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder mergeSort(com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort value) { + if (sortBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004) && + sort_ != com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort.getDefaultInstance()) { + sort_ = + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort.newBuilder(sort_).mergeFrom(value).buildPartial(); + } else { + sort_ = value; + } + onChanged(); + } else { + sortBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder clearSort() { + if (sortBuilder_ == null) { + sort_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort.getDefaultInstance(); + onChanged(); + } else { + sortBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort.Builder getSortBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getSortFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySortOrBuilder getSortOrBuilder() { + if (sortBuilder_ != null) { + return sortBuilder_.getMessageOrBuilder(); + } else { + return sort_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySortOrBuilder> + getSortFieldBuilder() { + if (sortBuilder_ == null) { + sortBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySortOrBuilder>( + sort_, + getParentForChildren(), + isClean()); + sort_ = null; + } + return sortBuilder_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.Aggregations sub_aggs = 4; + private com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations subAggs_ = com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations, com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsOrBuilder> subAggsBuilder_; + public boolean hasSubAggs() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations getSubAggs() { + if (subAggsBuilder_ == null) { + return subAggs_; + } else { + return subAggsBuilder_.getMessage(); + } + } + public Builder setSubAggs(com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations value) { + if (subAggsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subAggs_ = value; + onChanged(); + } else { + subAggsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder setSubAggs( + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.Builder builderForValue) { + if (subAggsBuilder_ == null) { + subAggs_ = builderForValue.build(); + onChanged(); + } else { + subAggsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder mergeSubAggs(com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations value) { + if (subAggsBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008) && + subAggs_ != com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.getDefaultInstance()) { + subAggs_ = + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.newBuilder(subAggs_).mergeFrom(value).buildPartial(); + } else { + subAggs_ = value; + } + onChanged(); + } else { + subAggsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder clearSubAggs() { + if (subAggsBuilder_ == null) { + subAggs_ = com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.getDefaultInstance(); + onChanged(); + } else { + subAggsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.Builder getSubAggsBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getSubAggsFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsOrBuilder getSubAggsOrBuilder() { + if (subAggsBuilder_ != null) { + return subAggsBuilder_.getMessageOrBuilder(); + } else { + return subAggs_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations, com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsOrBuilder> + getSubAggsFieldBuilder() { + if (subAggsBuilder_ == null) { + subAggsBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations, com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsOrBuilder>( + subAggs_, + getParentForChildren(), + isClean()); + subAggs_ = null; + } + return subAggsBuilder_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.GroupBys sub_group_bys = 5; + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys subGroupBys_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysOrBuilder> subGroupBysBuilder_; + public boolean hasSubGroupBys() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys getSubGroupBys() { + if (subGroupBysBuilder_ == null) { + return subGroupBys_; + } else { + return subGroupBysBuilder_.getMessage(); + } + } + public Builder setSubGroupBys(com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys value) { + if (subGroupBysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subGroupBys_ = value; + onChanged(); + } else { + subGroupBysBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + return this; + } + public Builder setSubGroupBys( + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.Builder builderForValue) { + if (subGroupBysBuilder_ == null) { + subGroupBys_ = builderForValue.build(); + onChanged(); + } else { + subGroupBysBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + return this; + } + public Builder mergeSubGroupBys(com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys value) { + if (subGroupBysBuilder_ == null) { + if (((bitField0_ & 0x00000010) == 0x00000010) && + subGroupBys_ != com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.getDefaultInstance()) { + subGroupBys_ = + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.newBuilder(subGroupBys_).mergeFrom(value).buildPartial(); + } else { + subGroupBys_ = value; + } + onChanged(); + } else { + subGroupBysBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + return this; + } + public Builder clearSubGroupBys() { + if (subGroupBysBuilder_ == null) { + subGroupBys_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.getDefaultInstance(); + onChanged(); + } else { + subGroupBysBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.Builder getSubGroupBysBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getSubGroupBysFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysOrBuilder getSubGroupBysOrBuilder() { + if (subGroupBysBuilder_ != null) { + return subGroupBysBuilder_.getMessageOrBuilder(); + } else { + return subGroupBys_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysOrBuilder> + getSubGroupBysFieldBuilder() { + if (subGroupBysBuilder_ == null) { + subGroupBysBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysOrBuilder>( + subGroupBys_, + getParentForChildren(), + isClean()); + subGroupBys_ = null; + } + return subGroupBysBuilder_; + } + + // optional int64 min_doc_count = 6; + private long minDocCount_ ; + public boolean hasMinDocCount() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + public long getMinDocCount() { + return minDocCount_; + } + public Builder setMinDocCount(long value) { + bitField0_ |= 0x00000020; + minDocCount_ = value; + onChanged(); + return this; + } + public Builder clearMinDocCount() { + bitField0_ = (bitField0_ & ~0x00000020); + minDocCount_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GroupByField) + } + + static { + defaultInstance = new GroupByField(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GroupByField) + } + + public interface RangeOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional double from = 1; + boolean hasFrom(); + double getFrom(); + + // optional double to = 2; + boolean hasTo(); + double getTo(); + } + public static final class Range extends + com.google.protobuf.GeneratedMessage + implements RangeOrBuilder { + // Use Range.newBuilder() to construct. + private Range(Builder builder) { + super(builder); + } + private Range(boolean noInit) {} + + private static final Range defaultInstance; + public static Range getDefaultInstance() { + return defaultInstance; + } + + public Range getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Range_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Range_fieldAccessorTable; + } + + private int bitField0_; + // optional double from = 1; + public static final int FROM_FIELD_NUMBER = 1; + private double from_; + public boolean hasFrom() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public double getFrom() { + return from_; + } + + // optional double to = 2; + public static final int TO_FIELD_NUMBER = 2; + private double to_; + public boolean hasTo() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public double getTo() { + return to_; + } + + private void initFields() { + from_ = 0D; + to_ = 0D; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeDouble(1, from_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeDouble(2, to_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(1, from_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(2, to_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.Range parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Range parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Range parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Range parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Range parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Range parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Range parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Range parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Range parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Range parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.Range prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.RangeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Range_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Range_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.Range.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + from_ = 0D; + bitField0_ = (bitField0_ & ~0x00000001); + to_ = 0D; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.Range.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.Range getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.Range.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.Range build() { + com.alicloud.openservices.tablestore.core.protocol.Search.Range result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.Range buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.Range result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.Range buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.Range result = new com.alicloud.openservices.tablestore.core.protocol.Search.Range(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.from_ = from_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.to_ = to_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.Range) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.Range)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.Range other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.Range.getDefaultInstance()) return this; + if (other.hasFrom()) { + setFrom(other.getFrom()); + } + if (other.hasTo()) { + setTo(other.getTo()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 9: { + bitField0_ |= 0x00000001; + from_ = input.readDouble(); + break; + } + case 17: { + bitField0_ |= 0x00000002; + to_ = input.readDouble(); + break; + } + } + } + } + + private int bitField0_; + + // optional double from = 1; + private double from_ ; + public boolean hasFrom() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public double getFrom() { + return from_; + } + public Builder setFrom(double value) { + bitField0_ |= 0x00000001; + from_ = value; + onChanged(); + return this; + } + public Builder clearFrom() { + bitField0_ = (bitField0_ & ~0x00000001); + from_ = 0D; + onChanged(); + return this; + } + + // optional double to = 2; + private double to_ ; + public boolean hasTo() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public double getTo() { + return to_; + } + public Builder setTo(double value) { + bitField0_ |= 0x00000002; + to_ = value; + onChanged(); + return this; + } + public Builder clearTo() { + bitField0_ = (bitField0_ & ~0x00000002); + to_ = 0D; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.Range) + } + + static { + defaultInstance = new Range(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.Range) + } + + public interface GroupByRangeOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string field_name = 1; + boolean hasFieldName(); + String getFieldName(); + + // repeated .com.alicloud.openservices.tablestore.core.protocol.Range ranges = 2; + java.util.List + getRangesList(); + com.alicloud.openservices.tablestore.core.protocol.Search.Range getRanges(int index); + int getRangesCount(); + java.util.List + getRangesOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.Search.RangeOrBuilder getRangesOrBuilder( + int index); + + // optional .com.alicloud.openservices.tablestore.core.protocol.Aggregations sub_aggs = 3; + boolean hasSubAggs(); + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations getSubAggs(); + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsOrBuilder getSubAggsOrBuilder(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.GroupBys sub_group_bys = 4; + boolean hasSubGroupBys(); + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys getSubGroupBys(); + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysOrBuilder getSubGroupBysOrBuilder(); + } + public static final class GroupByRange extends + com.google.protobuf.GeneratedMessage + implements GroupByRangeOrBuilder { + // Use GroupByRange.newBuilder() to construct. + private GroupByRange(Builder builder) { + super(builder); + } + private GroupByRange(boolean noInit) {} + + private static final GroupByRange defaultInstance; + public static GroupByRange getDefaultInstance() { + return defaultInstance; + } + + public GroupByRange getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByRange_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByRange_fieldAccessorTable; + } + + private int bitField0_; + // optional string field_name = 1; + public static final int FIELD_NAME_FIELD_NUMBER = 1; + private java.lang.Object fieldName_; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + fieldName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getFieldNameBytes() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + fieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.Range ranges = 2; + public static final int RANGES_FIELD_NUMBER = 2; + private java.util.List ranges_; + public java.util.List getRangesList() { + return ranges_; + } + public java.util.List + getRangesOrBuilderList() { + return ranges_; + } + public int getRangesCount() { + return ranges_.size(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Range getRanges(int index) { + return ranges_.get(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.RangeOrBuilder getRangesOrBuilder( + int index) { + return ranges_.get(index); + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.Aggregations sub_aggs = 3; + public static final int SUB_AGGS_FIELD_NUMBER = 3; + private com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations subAggs_; + public boolean hasSubAggs() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations getSubAggs() { + return subAggs_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsOrBuilder getSubAggsOrBuilder() { + return subAggs_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.GroupBys sub_group_bys = 4; + public static final int SUB_GROUP_BYS_FIELD_NUMBER = 4; + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys subGroupBys_; + public boolean hasSubGroupBys() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys getSubGroupBys() { + return subGroupBys_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysOrBuilder getSubGroupBysOrBuilder() { + return subGroupBys_; + } + + private void initFields() { + fieldName_ = ""; + ranges_ = java.util.Collections.emptyList(); + subAggs_ = com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.getDefaultInstance(); + subGroupBys_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getFieldNameBytes()); + } + for (int i = 0; i < ranges_.size(); i++) { + output.writeMessage(2, ranges_.get(i)); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeMessage(3, subAggs_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeMessage(4, subGroupBys_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getFieldNameBytes()); + } + for (int i = 0; i < ranges_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, ranges_.get(i)); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, subAggs_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, subGroupBys_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRange parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRange parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRange parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRange parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRange parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRange parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRange parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRange parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRange parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRange parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRange prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByRange_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByRange_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRange.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getRangesFieldBuilder(); + getSubAggsFieldBuilder(); + getSubGroupBysFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + fieldName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + if (rangesBuilder_ == null) { + ranges_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + rangesBuilder_.clear(); + } + if (subAggsBuilder_ == null) { + subAggs_ = com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.getDefaultInstance(); + } else { + subAggsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + if (subGroupBysBuilder_ == null) { + subGroupBys_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.getDefaultInstance(); + } else { + subGroupBysBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRange.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRange getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRange.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRange build() { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRange result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRange buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRange result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRange buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRange result = new com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRange(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.fieldName_ = fieldName_; + if (rangesBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { + ranges_ = java.util.Collections.unmodifiableList(ranges_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.ranges_ = ranges_; + } else { + result.ranges_ = rangesBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000002; + } + if (subAggsBuilder_ == null) { + result.subAggs_ = subAggs_; + } else { + result.subAggs_ = subAggsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000004; + } + if (subGroupBysBuilder_ == null) { + result.subGroupBys_ = subGroupBys_; + } else { + result.subGroupBys_ = subGroupBysBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRange) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRange)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRange other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRange.getDefaultInstance()) return this; + if (other.hasFieldName()) { + setFieldName(other.getFieldName()); + } + if (rangesBuilder_ == null) { + if (!other.ranges_.isEmpty()) { + if (ranges_.isEmpty()) { + ranges_ = other.ranges_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureRangesIsMutable(); + ranges_.addAll(other.ranges_); + } + onChanged(); + } + } else { + if (!other.ranges_.isEmpty()) { + if (rangesBuilder_.isEmpty()) { + rangesBuilder_.dispose(); + rangesBuilder_ = null; + ranges_ = other.ranges_; + bitField0_ = (bitField0_ & ~0x00000002); + rangesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getRangesFieldBuilder() : null; + } else { + rangesBuilder_.addAllMessages(other.ranges_); + } + } + } + if (other.hasSubAggs()) { + mergeSubAggs(other.getSubAggs()); + } + if (other.hasSubGroupBys()) { + mergeSubGroupBys(other.getSubGroupBys()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + fieldName_ = input.readBytes(); + break; + } + case 18: { + com.alicloud.openservices.tablestore.core.protocol.Search.Range.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.Range.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addRanges(subBuilder.buildPartial()); + break; + } + case 26: { + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.newBuilder(); + if (hasSubAggs()) { + subBuilder.mergeFrom(getSubAggs()); + } + input.readMessage(subBuilder, extensionRegistry); + setSubAggs(subBuilder.buildPartial()); + break; + } + case 34: { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.newBuilder(); + if (hasSubGroupBys()) { + subBuilder.mergeFrom(getSubGroupBys()); + } + input.readMessage(subBuilder, extensionRegistry); + setSubGroupBys(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // optional string field_name = 1; + private java.lang.Object fieldName_ = ""; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + fieldName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setFieldName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + return this; + } + public Builder clearFieldName() { + bitField0_ = (bitField0_ & ~0x00000001); + fieldName_ = getDefaultInstance().getFieldName(); + onChanged(); + return this; + } + void setFieldName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.Range ranges = 2; + private java.util.List ranges_ = + java.util.Collections.emptyList(); + private void ensureRangesIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + ranges_ = new java.util.ArrayList(ranges_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Range, com.alicloud.openservices.tablestore.core.protocol.Search.Range.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.RangeOrBuilder> rangesBuilder_; + + public java.util.List getRangesList() { + if (rangesBuilder_ == null) { + return java.util.Collections.unmodifiableList(ranges_); + } else { + return rangesBuilder_.getMessageList(); + } + } + public int getRangesCount() { + if (rangesBuilder_ == null) { + return ranges_.size(); + } else { + return rangesBuilder_.getCount(); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Range getRanges(int index) { + if (rangesBuilder_ == null) { + return ranges_.get(index); + } else { + return rangesBuilder_.getMessage(index); + } + } + public Builder setRanges( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.Range value) { + if (rangesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRangesIsMutable(); + ranges_.set(index, value); + onChanged(); + } else { + rangesBuilder_.setMessage(index, value); + } + return this; + } + public Builder setRanges( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.Range.Builder builderForValue) { + if (rangesBuilder_ == null) { + ensureRangesIsMutable(); + ranges_.set(index, builderForValue.build()); + onChanged(); + } else { + rangesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + public Builder addRanges(com.alicloud.openservices.tablestore.core.protocol.Search.Range value) { + if (rangesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRangesIsMutable(); + ranges_.add(value); + onChanged(); + } else { + rangesBuilder_.addMessage(value); + } + return this; + } + public Builder addRanges( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.Range value) { + if (rangesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRangesIsMutable(); + ranges_.add(index, value); + onChanged(); + } else { + rangesBuilder_.addMessage(index, value); + } + return this; + } + public Builder addRanges( + com.alicloud.openservices.tablestore.core.protocol.Search.Range.Builder builderForValue) { + if (rangesBuilder_ == null) { + ensureRangesIsMutable(); + ranges_.add(builderForValue.build()); + onChanged(); + } else { + rangesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + public Builder addRanges( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.Range.Builder builderForValue) { + if (rangesBuilder_ == null) { + ensureRangesIsMutable(); + ranges_.add(index, builderForValue.build()); + onChanged(); + } else { + rangesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAllRanges( + java.lang.Iterable values) { + if (rangesBuilder_ == null) { + ensureRangesIsMutable(); + super.addAll(values, ranges_); + onChanged(); + } else { + rangesBuilder_.addAllMessages(values); + } + return this; + } + public Builder clearRanges() { + if (rangesBuilder_ == null) { + ranges_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + rangesBuilder_.clear(); + } + return this; + } + public Builder removeRanges(int index) { + if (rangesBuilder_ == null) { + ensureRangesIsMutable(); + ranges_.remove(index); + onChanged(); + } else { + rangesBuilder_.remove(index); + } + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Range.Builder getRangesBuilder( + int index) { + return getRangesFieldBuilder().getBuilder(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.RangeOrBuilder getRangesOrBuilder( + int index) { + if (rangesBuilder_ == null) { + return ranges_.get(index); } else { + return rangesBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getRangesOrBuilderList() { + if (rangesBuilder_ != null) { + return rangesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(ranges_); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Range.Builder addRangesBuilder() { + return getRangesFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.Search.Range.getDefaultInstance()); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Range.Builder addRangesBuilder( + int index) { + return getRangesFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.Search.Range.getDefaultInstance()); + } + public java.util.List + getRangesBuilderList() { + return getRangesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Range, com.alicloud.openservices.tablestore.core.protocol.Search.Range.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.RangeOrBuilder> + getRangesFieldBuilder() { + if (rangesBuilder_ == null) { + rangesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Range, com.alicloud.openservices.tablestore.core.protocol.Search.Range.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.RangeOrBuilder>( + ranges_, + ((bitField0_ & 0x00000002) == 0x00000002), + getParentForChildren(), + isClean()); + ranges_ = null; + } + return rangesBuilder_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.Aggregations sub_aggs = 3; + private com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations subAggs_ = com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations, com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsOrBuilder> subAggsBuilder_; + public boolean hasSubAggs() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations getSubAggs() { + if (subAggsBuilder_ == null) { + return subAggs_; + } else { + return subAggsBuilder_.getMessage(); + } + } + public Builder setSubAggs(com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations value) { + if (subAggsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subAggs_ = value; + onChanged(); + } else { + subAggsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder setSubAggs( + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.Builder builderForValue) { + if (subAggsBuilder_ == null) { + subAggs_ = builderForValue.build(); + onChanged(); + } else { + subAggsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder mergeSubAggs(com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations value) { + if (subAggsBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004) && + subAggs_ != com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.getDefaultInstance()) { + subAggs_ = + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.newBuilder(subAggs_).mergeFrom(value).buildPartial(); + } else { + subAggs_ = value; + } + onChanged(); + } else { + subAggsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder clearSubAggs() { + if (subAggsBuilder_ == null) { + subAggs_ = com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.getDefaultInstance(); + onChanged(); + } else { + subAggsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.Builder getSubAggsBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getSubAggsFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsOrBuilder getSubAggsOrBuilder() { + if (subAggsBuilder_ != null) { + return subAggsBuilder_.getMessageOrBuilder(); + } else { + return subAggs_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations, com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsOrBuilder> + getSubAggsFieldBuilder() { + if (subAggsBuilder_ == null) { + subAggsBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations, com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsOrBuilder>( + subAggs_, + getParentForChildren(), + isClean()); + subAggs_ = null; + } + return subAggsBuilder_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.GroupBys sub_group_bys = 4; + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys subGroupBys_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysOrBuilder> subGroupBysBuilder_; + public boolean hasSubGroupBys() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys getSubGroupBys() { + if (subGroupBysBuilder_ == null) { + return subGroupBys_; + } else { + return subGroupBysBuilder_.getMessage(); + } + } + public Builder setSubGroupBys(com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys value) { + if (subGroupBysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subGroupBys_ = value; + onChanged(); + } else { + subGroupBysBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder setSubGroupBys( + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.Builder builderForValue) { + if (subGroupBysBuilder_ == null) { + subGroupBys_ = builderForValue.build(); + onChanged(); + } else { + subGroupBysBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder mergeSubGroupBys(com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys value) { + if (subGroupBysBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008) && + subGroupBys_ != com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.getDefaultInstance()) { + subGroupBys_ = + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.newBuilder(subGroupBys_).mergeFrom(value).buildPartial(); + } else { + subGroupBys_ = value; + } + onChanged(); + } else { + subGroupBysBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder clearSubGroupBys() { + if (subGroupBysBuilder_ == null) { + subGroupBys_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.getDefaultInstance(); + onChanged(); + } else { + subGroupBysBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.Builder getSubGroupBysBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getSubGroupBysFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysOrBuilder getSubGroupBysOrBuilder() { + if (subGroupBysBuilder_ != null) { + return subGroupBysBuilder_.getMessageOrBuilder(); + } else { + return subGroupBys_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysOrBuilder> + getSubGroupBysFieldBuilder() { + if (subGroupBysBuilder_ == null) { + subGroupBysBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysOrBuilder>( + subGroupBys_, + getParentForChildren(), + isClean()); + subGroupBys_ = null; + } + return subGroupBysBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GroupByRange) + } + + static { + defaultInstance = new GroupByRange(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GroupByRange) + } + + public interface GroupByFilterOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // repeated .com.alicloud.openservices.tablestore.core.protocol.Query filters = 1; + java.util.List + getFiltersList(); + com.alicloud.openservices.tablestore.core.protocol.Search.Query getFilters(int index); + int getFiltersCount(); + java.util.List + getFiltersOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getFiltersOrBuilder( + int index); + + // optional .com.alicloud.openservices.tablestore.core.protocol.Aggregations sub_aggs = 2; + boolean hasSubAggs(); + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations getSubAggs(); + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsOrBuilder getSubAggsOrBuilder(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.GroupBys sub_group_bys = 3; + boolean hasSubGroupBys(); + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys getSubGroupBys(); + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysOrBuilder getSubGroupBysOrBuilder(); + } + public static final class GroupByFilter extends + com.google.protobuf.GeneratedMessage + implements GroupByFilterOrBuilder { + // Use GroupByFilter.newBuilder() to construct. + private GroupByFilter(Builder builder) { + super(builder); + } + private GroupByFilter(boolean noInit) {} + + private static final GroupByFilter defaultInstance; + public static GroupByFilter getDefaultInstance() { + return defaultInstance; + } + + public GroupByFilter getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByFilter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByFilter_fieldAccessorTable; + } + + private int bitField0_; + // repeated .com.alicloud.openservices.tablestore.core.protocol.Query filters = 1; + public static final int FILTERS_FIELD_NUMBER = 1; + private java.util.List filters_; + public java.util.List getFiltersList() { + return filters_; + } + public java.util.List + getFiltersOrBuilderList() { + return filters_; + } + public int getFiltersCount() { + return filters_.size(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Query getFilters(int index) { + return filters_.get(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getFiltersOrBuilder( + int index) { + return filters_.get(index); + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.Aggregations sub_aggs = 2; + public static final int SUB_AGGS_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations subAggs_; + public boolean hasSubAggs() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations getSubAggs() { + return subAggs_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsOrBuilder getSubAggsOrBuilder() { + return subAggs_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.GroupBys sub_group_bys = 3; + public static final int SUB_GROUP_BYS_FIELD_NUMBER = 3; + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys subGroupBys_; + public boolean hasSubGroupBys() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys getSubGroupBys() { + return subGroupBys_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysOrBuilder getSubGroupBysOrBuilder() { + return subGroupBys_; + } + + private void initFields() { + filters_ = java.util.Collections.emptyList(); + subAggs_ = com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.getDefaultInstance(); + subGroupBys_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < filters_.size(); i++) { + output.writeMessage(1, filters_.get(i)); + } + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(2, subAggs_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeMessage(3, subGroupBys_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < filters_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, filters_.get(i)); + } + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, subAggs_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, subGroupBys_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilter parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilter prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByFilter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByFilter_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getFiltersFieldBuilder(); + getSubAggsFieldBuilder(); + getSubGroupBysFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (filtersBuilder_ == null) { + filters_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + filtersBuilder_.clear(); + } + if (subAggsBuilder_ == null) { + subAggs_ = com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.getDefaultInstance(); + } else { + subAggsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + if (subGroupBysBuilder_ == null) { + subGroupBys_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.getDefaultInstance(); + } else { + subGroupBysBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilter.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilter getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilter.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilter build() { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilter buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilter buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilter result = new com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilter(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (filtersBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + filters_ = java.util.Collections.unmodifiableList(filters_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.filters_ = filters_; + } else { + result.filters_ = filtersBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000001; + } + if (subAggsBuilder_ == null) { + result.subAggs_ = subAggs_; + } else { + result.subAggs_ = subAggsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000002; + } + if (subGroupBysBuilder_ == null) { + result.subGroupBys_ = subGroupBys_; + } else { + result.subGroupBys_ = subGroupBysBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilter) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilter other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilter.getDefaultInstance()) return this; + if (filtersBuilder_ == null) { + if (!other.filters_.isEmpty()) { + if (filters_.isEmpty()) { + filters_ = other.filters_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFiltersIsMutable(); + filters_.addAll(other.filters_); + } + onChanged(); + } + } else { + if (!other.filters_.isEmpty()) { + if (filtersBuilder_.isEmpty()) { + filtersBuilder_.dispose(); + filtersBuilder_ = null; + filters_ = other.filters_; + bitField0_ = (bitField0_ & ~0x00000001); + filtersBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getFiltersFieldBuilder() : null; + } else { + filtersBuilder_.addAllMessages(other.filters_); + } + } + } + if (other.hasSubAggs()) { + mergeSubAggs(other.getSubAggs()); + } + if (other.hasSubGroupBys()) { + mergeSubGroupBys(other.getSubGroupBys()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.Query.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addFilters(subBuilder.buildPartial()); + break; + } + case 18: { + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.newBuilder(); + if (hasSubAggs()) { + subBuilder.mergeFrom(getSubAggs()); + } + input.readMessage(subBuilder, extensionRegistry); + setSubAggs(subBuilder.buildPartial()); + break; + } + case 26: { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.newBuilder(); + if (hasSubGroupBys()) { + subBuilder.mergeFrom(getSubGroupBys()); + } + input.readMessage(subBuilder, extensionRegistry); + setSubGroupBys(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // repeated .com.alicloud.openservices.tablestore.core.protocol.Query filters = 1; + private java.util.List filters_ = + java.util.Collections.emptyList(); + private void ensureFiltersIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + filters_ = new java.util.ArrayList(filters_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder> filtersBuilder_; + + public java.util.List getFiltersList() { + if (filtersBuilder_ == null) { + return java.util.Collections.unmodifiableList(filters_); + } else { + return filtersBuilder_.getMessageList(); + } + } + public int getFiltersCount() { + if (filtersBuilder_ == null) { + return filters_.size(); + } else { + return filtersBuilder_.getCount(); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Query getFilters(int index) { + if (filtersBuilder_ == null) { + return filters_.get(index); + } else { + return filtersBuilder_.getMessage(index); + } + } + public Builder setFilters( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { + if (filtersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFiltersIsMutable(); + filters_.set(index, value); + onChanged(); + } else { + filtersBuilder_.setMessage(index, value); + } + return this; + } + public Builder setFilters( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder builderForValue) { + if (filtersBuilder_ == null) { + ensureFiltersIsMutable(); + filters_.set(index, builderForValue.build()); + onChanged(); + } else { + filtersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + public Builder addFilters(com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { + if (filtersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFiltersIsMutable(); + filters_.add(value); + onChanged(); + } else { + filtersBuilder_.addMessage(value); + } + return this; + } + public Builder addFilters( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { + if (filtersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFiltersIsMutable(); + filters_.add(index, value); + onChanged(); + } else { + filtersBuilder_.addMessage(index, value); + } + return this; + } + public Builder addFilters( + com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder builderForValue) { + if (filtersBuilder_ == null) { + ensureFiltersIsMutable(); + filters_.add(builderForValue.build()); + onChanged(); + } else { + filtersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + public Builder addFilters( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder builderForValue) { + if (filtersBuilder_ == null) { + ensureFiltersIsMutable(); + filters_.add(index, builderForValue.build()); + onChanged(); + } else { + filtersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAllFilters( + java.lang.Iterable values) { + if (filtersBuilder_ == null) { + ensureFiltersIsMutable(); + super.addAll(values, filters_); + onChanged(); + } else { + filtersBuilder_.addAllMessages(values); + } + return this; + } + public Builder clearFilters() { + if (filtersBuilder_ == null) { + filters_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + filtersBuilder_.clear(); + } + return this; + } + public Builder removeFilters(int index) { + if (filtersBuilder_ == null) { + ensureFiltersIsMutable(); + filters_.remove(index); + onChanged(); + } else { + filtersBuilder_.remove(index); + } + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder getFiltersBuilder( + int index) { + return getFiltersFieldBuilder().getBuilder(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getFiltersOrBuilder( + int index) { + if (filtersBuilder_ == null) { + return filters_.get(index); } else { + return filtersBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getFiltersOrBuilderList() { + if (filtersBuilder_ != null) { + return filtersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(filters_); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder addFiltersBuilder() { + return getFiltersFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance()); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder addFiltersBuilder( + int index) { + return getFiltersFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance()); + } + public java.util.List + getFiltersBuilderList() { + return getFiltersFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder> + getFiltersFieldBuilder() { + if (filtersBuilder_ == null) { + filtersBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder>( + filters_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + filters_ = null; + } + return filtersBuilder_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.Aggregations sub_aggs = 2; + private com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations subAggs_ = com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations, com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsOrBuilder> subAggsBuilder_; + public boolean hasSubAggs() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations getSubAggs() { + if (subAggsBuilder_ == null) { + return subAggs_; + } else { + return subAggsBuilder_.getMessage(); + } + } + public Builder setSubAggs(com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations value) { + if (subAggsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subAggs_ = value; + onChanged(); + } else { + subAggsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder setSubAggs( + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.Builder builderForValue) { + if (subAggsBuilder_ == null) { + subAggs_ = builderForValue.build(); + onChanged(); + } else { + subAggsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder mergeSubAggs(com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations value) { + if (subAggsBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002) && + subAggs_ != com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.getDefaultInstance()) { + subAggs_ = + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.newBuilder(subAggs_).mergeFrom(value).buildPartial(); + } else { + subAggs_ = value; + } + onChanged(); + } else { + subAggsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder clearSubAggs() { + if (subAggsBuilder_ == null) { + subAggs_ = com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.getDefaultInstance(); + onChanged(); + } else { + subAggsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.Builder getSubAggsBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getSubAggsFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsOrBuilder getSubAggsOrBuilder() { + if (subAggsBuilder_ != null) { + return subAggsBuilder_.getMessageOrBuilder(); + } else { + return subAggs_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations, com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsOrBuilder> + getSubAggsFieldBuilder() { + if (subAggsBuilder_ == null) { + subAggsBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations, com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsOrBuilder>( + subAggs_, + getParentForChildren(), + isClean()); + subAggs_ = null; + } + return subAggsBuilder_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.GroupBys sub_group_bys = 3; + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys subGroupBys_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysOrBuilder> subGroupBysBuilder_; + public boolean hasSubGroupBys() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys getSubGroupBys() { + if (subGroupBysBuilder_ == null) { + return subGroupBys_; + } else { + return subGroupBysBuilder_.getMessage(); + } + } + public Builder setSubGroupBys(com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys value) { + if (subGroupBysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subGroupBys_ = value; + onChanged(); + } else { + subGroupBysBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder setSubGroupBys( + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.Builder builderForValue) { + if (subGroupBysBuilder_ == null) { + subGroupBys_ = builderForValue.build(); + onChanged(); + } else { + subGroupBysBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder mergeSubGroupBys(com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys value) { + if (subGroupBysBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004) && + subGroupBys_ != com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.getDefaultInstance()) { + subGroupBys_ = + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.newBuilder(subGroupBys_).mergeFrom(value).buildPartial(); + } else { + subGroupBys_ = value; + } + onChanged(); + } else { + subGroupBysBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder clearSubGroupBys() { + if (subGroupBysBuilder_ == null) { + subGroupBys_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.getDefaultInstance(); + onChanged(); + } else { + subGroupBysBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.Builder getSubGroupBysBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getSubGroupBysFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysOrBuilder getSubGroupBysOrBuilder() { + if (subGroupBysBuilder_ != null) { + return subGroupBysBuilder_.getMessageOrBuilder(); + } else { + return subGroupBys_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysOrBuilder> + getSubGroupBysFieldBuilder() { + if (subGroupBysBuilder_ == null) { + subGroupBysBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysOrBuilder>( + subGroupBys_, + getParentForChildren(), + isClean()); + subGroupBys_ = null; + } + return subGroupBysBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GroupByFilter) + } + + static { + defaultInstance = new GroupByFilter(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GroupByFilter) + } + + public interface GroupByGeoDistanceOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string field_name = 1; + boolean hasFieldName(); + String getFieldName(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.GeoPoint origin = 2; + boolean hasOrigin(); + com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint getOrigin(); + com.alicloud.openservices.tablestore.core.protocol.Search.GeoPointOrBuilder getOriginOrBuilder(); + + // repeated .com.alicloud.openservices.tablestore.core.protocol.Range ranges = 3; + java.util.List + getRangesList(); + com.alicloud.openservices.tablestore.core.protocol.Search.Range getRanges(int index); + int getRangesCount(); + java.util.List + getRangesOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.Search.RangeOrBuilder getRangesOrBuilder( + int index); + + // optional .com.alicloud.openservices.tablestore.core.protocol.Aggregations sub_aggs = 4; + boolean hasSubAggs(); + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations getSubAggs(); + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsOrBuilder getSubAggsOrBuilder(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.GroupBys sub_group_bys = 5; + boolean hasSubGroupBys(); + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys getSubGroupBys(); + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysOrBuilder getSubGroupBysOrBuilder(); + } + public static final class GroupByGeoDistance extends + com.google.protobuf.GeneratedMessage + implements GroupByGeoDistanceOrBuilder { + // Use GroupByGeoDistance.newBuilder() to construct. + private GroupByGeoDistance(Builder builder) { + super(builder); + } + private GroupByGeoDistance(boolean noInit) {} + + private static final GroupByGeoDistance defaultInstance; + public static GroupByGeoDistance getDefaultInstance() { + return defaultInstance; + } + + public GroupByGeoDistance getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByGeoDistance_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByGeoDistance_fieldAccessorTable; + } + + private int bitField0_; + // optional string field_name = 1; + public static final int FIELD_NAME_FIELD_NUMBER = 1; + private java.lang.Object fieldName_; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + fieldName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getFieldNameBytes() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + fieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.GeoPoint origin = 2; + public static final int ORIGIN_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint origin_; + public boolean hasOrigin() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint getOrigin() { + return origin_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoPointOrBuilder getOriginOrBuilder() { + return origin_; + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.Range ranges = 3; + public static final int RANGES_FIELD_NUMBER = 3; + private java.util.List ranges_; + public java.util.List getRangesList() { + return ranges_; + } + public java.util.List + getRangesOrBuilderList() { + return ranges_; + } + public int getRangesCount() { + return ranges_.size(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Range getRanges(int index) { + return ranges_.get(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.RangeOrBuilder getRangesOrBuilder( + int index) { + return ranges_.get(index); + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.Aggregations sub_aggs = 4; + public static final int SUB_AGGS_FIELD_NUMBER = 4; + private com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations subAggs_; + public boolean hasSubAggs() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations getSubAggs() { + return subAggs_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsOrBuilder getSubAggsOrBuilder() { + return subAggs_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.GroupBys sub_group_bys = 5; + public static final int SUB_GROUP_BYS_FIELD_NUMBER = 5; + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys subGroupBys_; + public boolean hasSubGroupBys() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys getSubGroupBys() { + return subGroupBys_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysOrBuilder getSubGroupBysOrBuilder() { + return subGroupBys_; + } + + private void initFields() { + fieldName_ = ""; + origin_ = com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint.getDefaultInstance(); + ranges_ = java.util.Collections.emptyList(); + subAggs_ = com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.getDefaultInstance(); + subGroupBys_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getFieldNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeMessage(2, origin_); + } + for (int i = 0; i < ranges_.size(); i++) { + output.writeMessage(3, ranges_.get(i)); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeMessage(4, subAggs_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeMessage(5, subGroupBys_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getFieldNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, origin_); + } + for (int i = 0; i < ranges_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, ranges_.get(i)); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, subAggs_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, subGroupBys_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistance parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistance parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistance parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistance parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistance parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistance parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistance parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistance parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistance parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistance parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistance prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByGeoDistance_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByGeoDistance_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistance.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getOriginFieldBuilder(); + getRangesFieldBuilder(); + getSubAggsFieldBuilder(); + getSubGroupBysFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + fieldName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + if (originBuilder_ == null) { + origin_ = com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint.getDefaultInstance(); + } else { + originBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + if (rangesBuilder_ == null) { + ranges_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + rangesBuilder_.clear(); + } + if (subAggsBuilder_ == null) { + subAggs_ = com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.getDefaultInstance(); + } else { + subAggsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + if (subGroupBysBuilder_ == null) { + subGroupBys_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.getDefaultInstance(); + } else { + subGroupBysBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistance.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistance getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistance.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistance build() { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistance result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistance buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistance result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistance buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistance result = new com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistance(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.fieldName_ = fieldName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + if (originBuilder_ == null) { + result.origin_ = origin_; + } else { + result.origin_ = originBuilder_.build(); + } + if (rangesBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004)) { + ranges_ = java.util.Collections.unmodifiableList(ranges_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.ranges_ = ranges_; + } else { + result.ranges_ = rangesBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000004; + } + if (subAggsBuilder_ == null) { + result.subAggs_ = subAggs_; + } else { + result.subAggs_ = subAggsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000008; + } + if (subGroupBysBuilder_ == null) { + result.subGroupBys_ = subGroupBys_; + } else { + result.subGroupBys_ = subGroupBysBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistance) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistance)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistance other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistance.getDefaultInstance()) return this; + if (other.hasFieldName()) { + setFieldName(other.getFieldName()); + } + if (other.hasOrigin()) { + mergeOrigin(other.getOrigin()); + } + if (rangesBuilder_ == null) { + if (!other.ranges_.isEmpty()) { + if (ranges_.isEmpty()) { + ranges_ = other.ranges_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureRangesIsMutable(); + ranges_.addAll(other.ranges_); + } + onChanged(); + } + } else { + if (!other.ranges_.isEmpty()) { + if (rangesBuilder_.isEmpty()) { + rangesBuilder_.dispose(); + rangesBuilder_ = null; + ranges_ = other.ranges_; + bitField0_ = (bitField0_ & ~0x00000004); + rangesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getRangesFieldBuilder() : null; + } else { + rangesBuilder_.addAllMessages(other.ranges_); + } + } + } + if (other.hasSubAggs()) { + mergeSubAggs(other.getSubAggs()); + } + if (other.hasSubGroupBys()) { + mergeSubGroupBys(other.getSubGroupBys()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + fieldName_ = input.readBytes(); + break; + } + case 18: { + com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint.newBuilder(); + if (hasOrigin()) { + subBuilder.mergeFrom(getOrigin()); + } + input.readMessage(subBuilder, extensionRegistry); + setOrigin(subBuilder.buildPartial()); + break; + } + case 26: { + com.alicloud.openservices.tablestore.core.protocol.Search.Range.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.Range.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addRanges(subBuilder.buildPartial()); + break; + } + case 34: { + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.newBuilder(); + if (hasSubAggs()) { + subBuilder.mergeFrom(getSubAggs()); + } + input.readMessage(subBuilder, extensionRegistry); + setSubAggs(subBuilder.buildPartial()); + break; + } + case 42: { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.newBuilder(); + if (hasSubGroupBys()) { + subBuilder.mergeFrom(getSubGroupBys()); + } + input.readMessage(subBuilder, extensionRegistry); + setSubGroupBys(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // optional string field_name = 1; + private java.lang.Object fieldName_ = ""; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + fieldName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setFieldName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + return this; + } + public Builder clearFieldName() { + bitField0_ = (bitField0_ & ~0x00000001); + fieldName_ = getDefaultInstance().getFieldName(); + onChanged(); + return this; + } + void setFieldName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.GeoPoint origin = 2; + private com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint origin_ = com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint, com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GeoPointOrBuilder> originBuilder_; + public boolean hasOrigin() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint getOrigin() { + if (originBuilder_ == null) { + return origin_; + } else { + return originBuilder_.getMessage(); + } + } + public Builder setOrigin(com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint value) { + if (originBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + origin_ = value; + onChanged(); + } else { + originBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder setOrigin( + com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint.Builder builderForValue) { + if (originBuilder_ == null) { + origin_ = builderForValue.build(); + onChanged(); + } else { + originBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder mergeOrigin(com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint value) { + if (originBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002) && + origin_ != com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint.getDefaultInstance()) { + origin_ = + com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint.newBuilder(origin_).mergeFrom(value).buildPartial(); + } else { + origin_ = value; + } + onChanged(); + } else { + originBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder clearOrigin() { + if (originBuilder_ == null) { + origin_ = com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint.getDefaultInstance(); + onChanged(); + } else { + originBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint.Builder getOriginBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getOriginFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoPointOrBuilder getOriginOrBuilder() { + if (originBuilder_ != null) { + return originBuilder_.getMessageOrBuilder(); + } else { + return origin_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint, com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GeoPointOrBuilder> + getOriginFieldBuilder() { + if (originBuilder_ == null) { + originBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint, com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GeoPointOrBuilder>( + origin_, + getParentForChildren(), + isClean()); + origin_ = null; + } + return originBuilder_; + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.Range ranges = 3; + private java.util.List ranges_ = + java.util.Collections.emptyList(); + private void ensureRangesIsMutable() { + if (!((bitField0_ & 0x00000004) == 0x00000004)) { + ranges_ = new java.util.ArrayList(ranges_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Range, com.alicloud.openservices.tablestore.core.protocol.Search.Range.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.RangeOrBuilder> rangesBuilder_; + + public java.util.List getRangesList() { + if (rangesBuilder_ == null) { + return java.util.Collections.unmodifiableList(ranges_); + } else { + return rangesBuilder_.getMessageList(); + } + } + public int getRangesCount() { + if (rangesBuilder_ == null) { + return ranges_.size(); + } else { + return rangesBuilder_.getCount(); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Range getRanges(int index) { + if (rangesBuilder_ == null) { + return ranges_.get(index); + } else { + return rangesBuilder_.getMessage(index); + } + } + public Builder setRanges( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.Range value) { + if (rangesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRangesIsMutable(); + ranges_.set(index, value); + onChanged(); + } else { + rangesBuilder_.setMessage(index, value); + } + return this; + } + public Builder setRanges( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.Range.Builder builderForValue) { + if (rangesBuilder_ == null) { + ensureRangesIsMutable(); + ranges_.set(index, builderForValue.build()); + onChanged(); + } else { + rangesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + public Builder addRanges(com.alicloud.openservices.tablestore.core.protocol.Search.Range value) { + if (rangesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRangesIsMutable(); + ranges_.add(value); + onChanged(); + } else { + rangesBuilder_.addMessage(value); + } + return this; + } + public Builder addRanges( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.Range value) { + if (rangesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRangesIsMutable(); + ranges_.add(index, value); + onChanged(); + } else { + rangesBuilder_.addMessage(index, value); + } + return this; + } + public Builder addRanges( + com.alicloud.openservices.tablestore.core.protocol.Search.Range.Builder builderForValue) { + if (rangesBuilder_ == null) { + ensureRangesIsMutable(); + ranges_.add(builderForValue.build()); + onChanged(); + } else { + rangesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + public Builder addRanges( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.Range.Builder builderForValue) { + if (rangesBuilder_ == null) { + ensureRangesIsMutable(); + ranges_.add(index, builderForValue.build()); + onChanged(); + } else { + rangesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAllRanges( + java.lang.Iterable values) { + if (rangesBuilder_ == null) { + ensureRangesIsMutable(); + super.addAll(values, ranges_); + onChanged(); + } else { + rangesBuilder_.addAllMessages(values); + } + return this; + } + public Builder clearRanges() { + if (rangesBuilder_ == null) { + ranges_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + rangesBuilder_.clear(); + } + return this; + } + public Builder removeRanges(int index) { + if (rangesBuilder_ == null) { + ensureRangesIsMutable(); + ranges_.remove(index); + onChanged(); + } else { + rangesBuilder_.remove(index); + } + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Range.Builder getRangesBuilder( + int index) { + return getRangesFieldBuilder().getBuilder(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.RangeOrBuilder getRangesOrBuilder( + int index) { + if (rangesBuilder_ == null) { + return ranges_.get(index); } else { + return rangesBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getRangesOrBuilderList() { + if (rangesBuilder_ != null) { + return rangesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(ranges_); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Range.Builder addRangesBuilder() { + return getRangesFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.Search.Range.getDefaultInstance()); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Range.Builder addRangesBuilder( + int index) { + return getRangesFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.Search.Range.getDefaultInstance()); + } + public java.util.List + getRangesBuilderList() { + return getRangesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Range, com.alicloud.openservices.tablestore.core.protocol.Search.Range.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.RangeOrBuilder> + getRangesFieldBuilder() { + if (rangesBuilder_ == null) { + rangesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Range, com.alicloud.openservices.tablestore.core.protocol.Search.Range.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.RangeOrBuilder>( + ranges_, + ((bitField0_ & 0x00000004) == 0x00000004), + getParentForChildren(), + isClean()); + ranges_ = null; + } + return rangesBuilder_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.Aggregations sub_aggs = 4; + private com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations subAggs_ = com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations, com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsOrBuilder> subAggsBuilder_; + public boolean hasSubAggs() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations getSubAggs() { + if (subAggsBuilder_ == null) { + return subAggs_; + } else { + return subAggsBuilder_.getMessage(); + } + } + public Builder setSubAggs(com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations value) { + if (subAggsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subAggs_ = value; + onChanged(); + } else { + subAggsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder setSubAggs( + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.Builder builderForValue) { + if (subAggsBuilder_ == null) { + subAggs_ = builderForValue.build(); + onChanged(); + } else { + subAggsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder mergeSubAggs(com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations value) { + if (subAggsBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008) && + subAggs_ != com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.getDefaultInstance()) { + subAggs_ = + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.newBuilder(subAggs_).mergeFrom(value).buildPartial(); + } else { + subAggs_ = value; + } + onChanged(); + } else { + subAggsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder clearSubAggs() { + if (subAggsBuilder_ == null) { + subAggs_ = com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.getDefaultInstance(); + onChanged(); + } else { + subAggsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.Builder getSubAggsBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getSubAggsFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsOrBuilder getSubAggsOrBuilder() { + if (subAggsBuilder_ != null) { + return subAggsBuilder_.getMessageOrBuilder(); + } else { + return subAggs_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations, com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsOrBuilder> + getSubAggsFieldBuilder() { + if (subAggsBuilder_ == null) { + subAggsBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations, com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsOrBuilder>( + subAggs_, + getParentForChildren(), + isClean()); + subAggs_ = null; + } + return subAggsBuilder_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.GroupBys sub_group_bys = 5; + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys subGroupBys_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysOrBuilder> subGroupBysBuilder_; + public boolean hasSubGroupBys() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys getSubGroupBys() { + if (subGroupBysBuilder_ == null) { + return subGroupBys_; + } else { + return subGroupBysBuilder_.getMessage(); + } + } + public Builder setSubGroupBys(com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys value) { + if (subGroupBysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subGroupBys_ = value; + onChanged(); + } else { + subGroupBysBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + return this; + } + public Builder setSubGroupBys( + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.Builder builderForValue) { + if (subGroupBysBuilder_ == null) { + subGroupBys_ = builderForValue.build(); + onChanged(); + } else { + subGroupBysBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + return this; + } + public Builder mergeSubGroupBys(com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys value) { + if (subGroupBysBuilder_ == null) { + if (((bitField0_ & 0x00000010) == 0x00000010) && + subGroupBys_ != com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.getDefaultInstance()) { + subGroupBys_ = + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.newBuilder(subGroupBys_).mergeFrom(value).buildPartial(); + } else { + subGroupBys_ = value; + } + onChanged(); + } else { + subGroupBysBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + return this; + } + public Builder clearSubGroupBys() { + if (subGroupBysBuilder_ == null) { + subGroupBys_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.getDefaultInstance(); + onChanged(); + } else { + subGroupBysBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.Builder getSubGroupBysBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getSubGroupBysFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysOrBuilder getSubGroupBysOrBuilder() { + if (subGroupBysBuilder_ != null) { + return subGroupBysBuilder_.getMessageOrBuilder(); + } else { + return subGroupBys_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysOrBuilder> + getSubGroupBysFieldBuilder() { + if (subGroupBysBuilder_ == null) { + subGroupBysBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysOrBuilder>( + subGroupBys_, + getParentForChildren(), + isClean()); + subGroupBys_ = null; + } + return subGroupBysBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GroupByGeoDistance) + } + + static { + defaultInstance = new GroupByGeoDistance(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GroupByGeoDistance) + } + + public interface AvgAggregationResultOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional double value = 1; + boolean hasValue(); + double getValue(); + } + public static final class AvgAggregationResult extends + com.google.protobuf.GeneratedMessage + implements AvgAggregationResultOrBuilder { + // Use AvgAggregationResult.newBuilder() to construct. + private AvgAggregationResult(Builder builder) { + super(builder); + } + private AvgAggregationResult(boolean noInit) {} + + private static final AvgAggregationResult defaultInstance; + public static AvgAggregationResult getDefaultInstance() { + return defaultInstance; + } + + public AvgAggregationResult getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_AvgAggregationResult_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_AvgAggregationResult_fieldAccessorTable; + } + + private int bitField0_; + // optional double value = 1; + public static final int VALUE_FIELD_NUMBER = 1; + private double value_; + public boolean hasValue() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public double getValue() { + return value_; + } + + private void initFields() { + value_ = 0D; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeDouble(1, value_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(1, value_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregationResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregationResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregationResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregationResult parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregationResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregationResult parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregationResult parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregationResult parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregationResult parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregationResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregationResult prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregationResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_AvgAggregationResult_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_AvgAggregationResult_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregationResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + value_ = 0D; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregationResult.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregationResult getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregationResult.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregationResult build() { + com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregationResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregationResult buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregationResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregationResult buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregationResult result = new com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregationResult(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.value_ = value_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregationResult) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregationResult)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregationResult other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregationResult.getDefaultInstance()) return this; + if (other.hasValue()) { + setValue(other.getValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 9: { + bitField0_ |= 0x00000001; + value_ = input.readDouble(); + break; + } + } + } + } + + private int bitField0_; + + // optional double value = 1; + private double value_ ; + public boolean hasValue() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public double getValue() { + return value_; + } + public Builder setValue(double value) { + bitField0_ |= 0x00000001; + value_ = value; + onChanged(); + return this; + } + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000001); + value_ = 0D; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.AvgAggregationResult) + } + + static { + defaultInstance = new AvgAggregationResult(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.AvgAggregationResult) + } + + public interface TopRowsAggregationResultOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // repeated bytes rows = 1; + java.util.List getRowsList(); + int getRowsCount(); + com.google.protobuf.ByteString getRows(int index); + } + public static final class TopRowsAggregationResult extends + com.google.protobuf.GeneratedMessage + implements TopRowsAggregationResultOrBuilder { + // Use TopRowsAggregationResult.newBuilder() to construct. + private TopRowsAggregationResult(Builder builder) { + super(builder); + } + private TopRowsAggregationResult(boolean noInit) {} + + private static final TopRowsAggregationResult defaultInstance; + public static TopRowsAggregationResult getDefaultInstance() { + return defaultInstance; + } + + public TopRowsAggregationResult getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_TopRowsAggregationResult_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_TopRowsAggregationResult_fieldAccessorTable; + } + + // repeated bytes rows = 1; + public static final int ROWS_FIELD_NUMBER = 1; + private java.util.List rows_; + public java.util.List + getRowsList() { + return rows_; + } + public int getRowsCount() { + return rows_.size(); + } + public com.google.protobuf.ByteString getRows(int index) { + return rows_.get(index); + } + + private void initFields() { + rows_ = java.util.Collections.emptyList();; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < rows_.size(); i++) { + output.writeBytes(1, rows_.get(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < rows_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(rows_.get(i)); + } + size += dataSize; + size += 1 * getRowsList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregationResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregationResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregationResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregationResult parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregationResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregationResult parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregationResult parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregationResult parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregationResult parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregationResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregationResult prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregationResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_TopRowsAggregationResult_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_TopRowsAggregationResult_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregationResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + rows_ = java.util.Collections.emptyList();; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregationResult.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregationResult getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregationResult.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregationResult build() { + com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregationResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregationResult buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregationResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregationResult buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregationResult result = new com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregationResult(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + rows_ = java.util.Collections.unmodifiableList(rows_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.rows_ = rows_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregationResult) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregationResult)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregationResult other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregationResult.getDefaultInstance()) return this; + if (!other.rows_.isEmpty()) { + if (rows_.isEmpty()) { + rows_ = other.rows_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRowsIsMutable(); + rows_.addAll(other.rows_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + ensureRowsIsMutable(); + rows_.add(input.readBytes()); + break; + } + } + } + } + + private int bitField0_; + + // repeated bytes rows = 1; + private java.util.List rows_ = java.util.Collections.emptyList();; + private void ensureRowsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + rows_ = new java.util.ArrayList(rows_); + bitField0_ |= 0x00000001; + } + } + public java.util.List + getRowsList() { + return java.util.Collections.unmodifiableList(rows_); + } + public int getRowsCount() { + return rows_.size(); + } + public com.google.protobuf.ByteString getRows(int index) { + return rows_.get(index); + } + public Builder setRows( + int index, com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRowsIsMutable(); + rows_.set(index, value); + onChanged(); + return this; + } + public Builder addRows(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRowsIsMutable(); + rows_.add(value); + onChanged(); + return this; + } + public Builder addAllRows( + java.lang.Iterable values) { + ensureRowsIsMutable(); + super.addAll(values, rows_); + onChanged(); + return this; + } + public Builder clearRows() { + rows_ = java.util.Collections.emptyList();; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.TopRowsAggregationResult) + } + + static { + defaultInstance = new TopRowsAggregationResult(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.TopRowsAggregationResult) + } + + public interface PercentilesAggregationItemOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional double key = 1; + boolean hasKey(); + double getKey(); + + // optional bytes value = 2; + boolean hasValue(); + com.google.protobuf.ByteString getValue(); + } + public static final class PercentilesAggregationItem extends + com.google.protobuf.GeneratedMessage + implements PercentilesAggregationItemOrBuilder { + // Use PercentilesAggregationItem.newBuilder() to construct. + private PercentilesAggregationItem(Builder builder) { + super(builder); + } + private PercentilesAggregationItem(boolean noInit) {} + + private static final PercentilesAggregationItem defaultInstance; + public static PercentilesAggregationItem getDefaultInstance() { + return defaultInstance; + } + + public PercentilesAggregationItem getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentilesAggregationItem_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentilesAggregationItem_fieldAccessorTable; + } + + private int bitField0_; + // optional double key = 1; + public static final int KEY_FIELD_NUMBER = 1; + private double key_; + public boolean hasKey() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public double getKey() { + return key_; + } + + // optional bytes value = 2; + public static final int VALUE_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString value_; + public boolean hasValue() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getValue() { + return value_; + } + + private void initFields() { + key_ = 0D; + value_ = com.google.protobuf.ByteString.EMPTY; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeDouble(1, key_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, value_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(1, key_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, value_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItem parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItem parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItem parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItem parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItem parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItem parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItem parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItem parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItem parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItem parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItem prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItemOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentilesAggregationItem_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentilesAggregationItem_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItem.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + key_ = 0D; + bitField0_ = (bitField0_ & ~0x00000001); + value_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItem.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItem getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItem.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItem build() { + com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItem result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItem buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItem result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItem buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItem result = new com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItem(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.key_ = key_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.value_ = value_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItem) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItem)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItem other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItem.getDefaultInstance()) return this; + if (other.hasKey()) { + setKey(other.getKey()); + } + if (other.hasValue()) { + setValue(other.getValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 9: { + bitField0_ |= 0x00000001; + key_ = input.readDouble(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + value_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // optional double key = 1; + private double key_ ; + public boolean hasKey() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public double getKey() { + return key_; + } + public Builder setKey(double value) { + bitField0_ |= 0x00000001; + key_ = value; + onChanged(); + return this; + } + public Builder clearKey() { + bitField0_ = (bitField0_ & ~0x00000001); + key_ = 0D; + onChanged(); + return this; + } + + // optional bytes value = 2; + private com.google.protobuf.ByteString value_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasValue() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getValue() { + return value_; + } + public Builder setValue(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + value_ = value; + onChanged(); + return this; + } + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000002); + value_ = getDefaultInstance().getValue(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.PercentilesAggregationItem) + } + + static { + defaultInstance = new PercentilesAggregationItem(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.PercentilesAggregationItem) + } + + public interface PercentilesAggregationResultOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // repeated .com.alicloud.openservices.tablestore.core.protocol.PercentilesAggregationItem percentiles_aggregation_items = 1; + java.util.List + getPercentilesAggregationItemsList(); + com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItem getPercentilesAggregationItems(int index); + int getPercentilesAggregationItemsCount(); + java.util.List + getPercentilesAggregationItemsOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItemOrBuilder getPercentilesAggregationItemsOrBuilder( + int index); + } + public static final class PercentilesAggregationResult extends + com.google.protobuf.GeneratedMessage + implements PercentilesAggregationResultOrBuilder { + // Use PercentilesAggregationResult.newBuilder() to construct. + private PercentilesAggregationResult(Builder builder) { + super(builder); + } + private PercentilesAggregationResult(boolean noInit) {} + + private static final PercentilesAggregationResult defaultInstance; + public static PercentilesAggregationResult getDefaultInstance() { + return defaultInstance; + } + + public PercentilesAggregationResult getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentilesAggregationResult_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentilesAggregationResult_fieldAccessorTable; + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.PercentilesAggregationItem percentiles_aggregation_items = 1; + public static final int PERCENTILES_AGGREGATION_ITEMS_FIELD_NUMBER = 1; + private java.util.List percentilesAggregationItems_; + public java.util.List getPercentilesAggregationItemsList() { + return percentilesAggregationItems_; + } + public java.util.List + getPercentilesAggregationItemsOrBuilderList() { + return percentilesAggregationItems_; + } + public int getPercentilesAggregationItemsCount() { + return percentilesAggregationItems_.size(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItem getPercentilesAggregationItems(int index) { + return percentilesAggregationItems_.get(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItemOrBuilder getPercentilesAggregationItemsOrBuilder( + int index) { + return percentilesAggregationItems_.get(index); + } + + private void initFields() { + percentilesAggregationItems_ = java.util.Collections.emptyList(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < percentilesAggregationItems_.size(); i++) { + output.writeMessage(1, percentilesAggregationItems_.get(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < percentilesAggregationItems_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, percentilesAggregationItems_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationResult parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationResult parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationResult parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationResult parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationResult parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationResult prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentilesAggregationResult_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentilesAggregationResult_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getPercentilesAggregationItemsFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (percentilesAggregationItemsBuilder_ == null) { + percentilesAggregationItems_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + percentilesAggregationItemsBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationResult.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationResult getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationResult.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationResult build() { + com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationResult buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationResult buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationResult result = new com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationResult(this); + int from_bitField0_ = bitField0_; + if (percentilesAggregationItemsBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + percentilesAggregationItems_ = java.util.Collections.unmodifiableList(percentilesAggregationItems_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.percentilesAggregationItems_ = percentilesAggregationItems_; + } else { + result.percentilesAggregationItems_ = percentilesAggregationItemsBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationResult) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationResult)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationResult other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationResult.getDefaultInstance()) return this; + if (percentilesAggregationItemsBuilder_ == null) { + if (!other.percentilesAggregationItems_.isEmpty()) { + if (percentilesAggregationItems_.isEmpty()) { + percentilesAggregationItems_ = other.percentilesAggregationItems_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePercentilesAggregationItemsIsMutable(); + percentilesAggregationItems_.addAll(other.percentilesAggregationItems_); + } + onChanged(); + } + } else { + if (!other.percentilesAggregationItems_.isEmpty()) { + if (percentilesAggregationItemsBuilder_.isEmpty()) { + percentilesAggregationItemsBuilder_.dispose(); + percentilesAggregationItemsBuilder_ = null; + percentilesAggregationItems_ = other.percentilesAggregationItems_; + bitField0_ = (bitField0_ & ~0x00000001); + percentilesAggregationItemsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getPercentilesAggregationItemsFieldBuilder() : null; + } else { + percentilesAggregationItemsBuilder_.addAllMessages(other.percentilesAggregationItems_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItem.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItem.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addPercentilesAggregationItems(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // repeated .com.alicloud.openservices.tablestore.core.protocol.PercentilesAggregationItem percentiles_aggregation_items = 1; + private java.util.List percentilesAggregationItems_ = + java.util.Collections.emptyList(); + private void ensurePercentilesAggregationItemsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + percentilesAggregationItems_ = new java.util.ArrayList(percentilesAggregationItems_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItem, com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItem.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItemOrBuilder> percentilesAggregationItemsBuilder_; + + public java.util.List getPercentilesAggregationItemsList() { + if (percentilesAggregationItemsBuilder_ == null) { + return java.util.Collections.unmodifiableList(percentilesAggregationItems_); + } else { + return percentilesAggregationItemsBuilder_.getMessageList(); + } + } + public int getPercentilesAggregationItemsCount() { + if (percentilesAggregationItemsBuilder_ == null) { + return percentilesAggregationItems_.size(); + } else { + return percentilesAggregationItemsBuilder_.getCount(); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItem getPercentilesAggregationItems(int index) { + if (percentilesAggregationItemsBuilder_ == null) { + return percentilesAggregationItems_.get(index); + } else { + return percentilesAggregationItemsBuilder_.getMessage(index); + } + } + public Builder setPercentilesAggregationItems( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItem value) { + if (percentilesAggregationItemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePercentilesAggregationItemsIsMutable(); + percentilesAggregationItems_.set(index, value); + onChanged(); + } else { + percentilesAggregationItemsBuilder_.setMessage(index, value); + } + return this; + } + public Builder setPercentilesAggregationItems( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItem.Builder builderForValue) { + if (percentilesAggregationItemsBuilder_ == null) { + ensurePercentilesAggregationItemsIsMutable(); + percentilesAggregationItems_.set(index, builderForValue.build()); + onChanged(); + } else { + percentilesAggregationItemsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + public Builder addPercentilesAggregationItems(com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItem value) { + if (percentilesAggregationItemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePercentilesAggregationItemsIsMutable(); + percentilesAggregationItems_.add(value); + onChanged(); + } else { + percentilesAggregationItemsBuilder_.addMessage(value); + } + return this; + } + public Builder addPercentilesAggregationItems( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItem value) { + if (percentilesAggregationItemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePercentilesAggregationItemsIsMutable(); + percentilesAggregationItems_.add(index, value); + onChanged(); + } else { + percentilesAggregationItemsBuilder_.addMessage(index, value); + } + return this; + } + public Builder addPercentilesAggregationItems( + com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItem.Builder builderForValue) { + if (percentilesAggregationItemsBuilder_ == null) { + ensurePercentilesAggregationItemsIsMutable(); + percentilesAggregationItems_.add(builderForValue.build()); + onChanged(); + } else { + percentilesAggregationItemsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + public Builder addPercentilesAggregationItems( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItem.Builder builderForValue) { + if (percentilesAggregationItemsBuilder_ == null) { + ensurePercentilesAggregationItemsIsMutable(); + percentilesAggregationItems_.add(index, builderForValue.build()); + onChanged(); + } else { + percentilesAggregationItemsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAllPercentilesAggregationItems( + java.lang.Iterable values) { + if (percentilesAggregationItemsBuilder_ == null) { + ensurePercentilesAggregationItemsIsMutable(); + super.addAll(values, percentilesAggregationItems_); + onChanged(); + } else { + percentilesAggregationItemsBuilder_.addAllMessages(values); + } + return this; + } + public Builder clearPercentilesAggregationItems() { + if (percentilesAggregationItemsBuilder_ == null) { + percentilesAggregationItems_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + percentilesAggregationItemsBuilder_.clear(); + } + return this; + } + public Builder removePercentilesAggregationItems(int index) { + if (percentilesAggregationItemsBuilder_ == null) { + ensurePercentilesAggregationItemsIsMutable(); + percentilesAggregationItems_.remove(index); + onChanged(); + } else { + percentilesAggregationItemsBuilder_.remove(index); + } + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItem.Builder getPercentilesAggregationItemsBuilder( + int index) { + return getPercentilesAggregationItemsFieldBuilder().getBuilder(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItemOrBuilder getPercentilesAggregationItemsOrBuilder( + int index) { + if (percentilesAggregationItemsBuilder_ == null) { + return percentilesAggregationItems_.get(index); } else { + return percentilesAggregationItemsBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getPercentilesAggregationItemsOrBuilderList() { + if (percentilesAggregationItemsBuilder_ != null) { + return percentilesAggregationItemsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(percentilesAggregationItems_); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItem.Builder addPercentilesAggregationItemsBuilder() { + return getPercentilesAggregationItemsFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItem.getDefaultInstance()); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItem.Builder addPercentilesAggregationItemsBuilder( + int index) { + return getPercentilesAggregationItemsFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItem.getDefaultInstance()); + } + public java.util.List + getPercentilesAggregationItemsBuilderList() { + return getPercentilesAggregationItemsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItem, com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItem.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItemOrBuilder> + getPercentilesAggregationItemsFieldBuilder() { + if (percentilesAggregationItemsBuilder_ == null) { + percentilesAggregationItemsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItem, com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItem.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItemOrBuilder>( + percentilesAggregationItems_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + percentilesAggregationItems_ = null; + } + return percentilesAggregationItemsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.PercentilesAggregationResult) + } + + static { + defaultInstance = new PercentilesAggregationResult(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.PercentilesAggregationResult) + } + + public interface DistinctCountAggregationResultOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional int64 value = 1; + boolean hasValue(); + long getValue(); + } + public static final class DistinctCountAggregationResult extends + com.google.protobuf.GeneratedMessage + implements DistinctCountAggregationResultOrBuilder { + // Use DistinctCountAggregationResult.newBuilder() to construct. + private DistinctCountAggregationResult(Builder builder) { + super(builder); + } + private DistinctCountAggregationResult(boolean noInit) {} + + private static final DistinctCountAggregationResult defaultInstance; + public static DistinctCountAggregationResult getDefaultInstance() { + return defaultInstance; + } + + public DistinctCountAggregationResult getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_DistinctCountAggregationResult_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_DistinctCountAggregationResult_fieldAccessorTable; + } + + private int bitField0_; + // optional int64 value = 1; + public static final int VALUE_FIELD_NUMBER = 1; + private long value_; + public boolean hasValue() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public long getValue() { + return value_; + } + + private void initFields() { + value_ = 0L; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeInt64(1, value_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, value_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregationResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregationResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregationResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregationResult parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregationResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregationResult parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregationResult parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregationResult parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregationResult parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregationResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregationResult prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregationResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_DistinctCountAggregationResult_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_DistinctCountAggregationResult_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregationResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + value_ = 0L; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregationResult.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregationResult getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregationResult.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregationResult build() { + com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregationResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregationResult buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregationResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregationResult buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregationResult result = new com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregationResult(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.value_ = value_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregationResult) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregationResult)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregationResult other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregationResult.getDefaultInstance()) return this; + if (other.hasValue()) { + setValue(other.getValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + value_ = input.readInt64(); + break; + } + } + } + } + + private int bitField0_; + + // optional int64 value = 1; + private long value_ ; + public boolean hasValue() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public long getValue() { + return value_; + } + public Builder setValue(long value) { + bitField0_ |= 0x00000001; + value_ = value; + onChanged(); + return this; + } + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000001); + value_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.DistinctCountAggregationResult) + } + + static { + defaultInstance = new DistinctCountAggregationResult(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.DistinctCountAggregationResult) + } + + public interface MaxAggregationResultOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional double value = 1; + boolean hasValue(); + double getValue(); + } + public static final class MaxAggregationResult extends + com.google.protobuf.GeneratedMessage + implements MaxAggregationResultOrBuilder { + // Use MaxAggregationResult.newBuilder() to construct. + private MaxAggregationResult(Builder builder) { + super(builder); + } + private MaxAggregationResult(boolean noInit) {} + + private static final MaxAggregationResult defaultInstance; + public static MaxAggregationResult getDefaultInstance() { + return defaultInstance; + } + + public MaxAggregationResult getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MaxAggregationResult_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MaxAggregationResult_fieldAccessorTable; + } + + private int bitField0_; + // optional double value = 1; + public static final int VALUE_FIELD_NUMBER = 1; + private double value_; + public boolean hasValue() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public double getValue() { + return value_; + } + + private void initFields() { + value_ = 0D; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeDouble(1, value_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(1, value_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregationResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregationResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregationResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregationResult parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregationResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregationResult parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregationResult parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregationResult parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregationResult parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregationResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregationResult prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregationResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MaxAggregationResult_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MaxAggregationResult_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregationResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + value_ = 0D; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregationResult.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregationResult getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregationResult.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregationResult build() { + com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregationResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregationResult buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregationResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregationResult buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregationResult result = new com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregationResult(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.value_ = value_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregationResult) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregationResult)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregationResult other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregationResult.getDefaultInstance()) return this; + if (other.hasValue()) { + setValue(other.getValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 9: { + bitField0_ |= 0x00000001; + value_ = input.readDouble(); + break; + } + } + } + } + + private int bitField0_; + + // optional double value = 1; + private double value_ ; + public boolean hasValue() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public double getValue() { + return value_; + } + public Builder setValue(double value) { + bitField0_ |= 0x00000001; + value_ = value; + onChanged(); + return this; + } + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000001); + value_ = 0D; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.MaxAggregationResult) + } + + static { + defaultInstance = new MaxAggregationResult(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.MaxAggregationResult) + } + + public interface MinAggregationResultOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional double value = 1; + boolean hasValue(); + double getValue(); + } + public static final class MinAggregationResult extends + com.google.protobuf.GeneratedMessage + implements MinAggregationResultOrBuilder { + // Use MinAggregationResult.newBuilder() to construct. + private MinAggregationResult(Builder builder) { + super(builder); + } + private MinAggregationResult(boolean noInit) {} + + private static final MinAggregationResult defaultInstance; + public static MinAggregationResult getDefaultInstance() { + return defaultInstance; + } + + public MinAggregationResult getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MinAggregationResult_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MinAggregationResult_fieldAccessorTable; + } + + private int bitField0_; + // optional double value = 1; + public static final int VALUE_FIELD_NUMBER = 1; + private double value_; + public boolean hasValue() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public double getValue() { + return value_; + } + + private void initFields() { + value_ = 0D; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeDouble(1, value_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(1, value_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregationResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregationResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregationResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregationResult parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregationResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregationResult parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregationResult parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregationResult parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregationResult parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregationResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregationResult prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregationResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MinAggregationResult_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MinAggregationResult_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregationResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + value_ = 0D; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregationResult.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregationResult getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregationResult.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregationResult build() { + com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregationResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregationResult buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregationResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregationResult buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregationResult result = new com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregationResult(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.value_ = value_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregationResult) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregationResult)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregationResult other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregationResult.getDefaultInstance()) return this; + if (other.hasValue()) { + setValue(other.getValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 9: { + bitField0_ |= 0x00000001; + value_ = input.readDouble(); + break; + } + } + } + } + + private int bitField0_; + + // optional double value = 1; + private double value_ ; + public boolean hasValue() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public double getValue() { + return value_; + } + public Builder setValue(double value) { + bitField0_ |= 0x00000001; + value_ = value; + onChanged(); + return this; + } + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000001); + value_ = 0D; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.MinAggregationResult) + } + + static { + defaultInstance = new MinAggregationResult(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.MinAggregationResult) + } + + public interface SumAggregationResultOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional double value = 1; + boolean hasValue(); + double getValue(); + } + public static final class SumAggregationResult extends + com.google.protobuf.GeneratedMessage + implements SumAggregationResultOrBuilder { + // Use SumAggregationResult.newBuilder() to construct. + private SumAggregationResult(Builder builder) { + super(builder); + } + private SumAggregationResult(boolean noInit) {} + + private static final SumAggregationResult defaultInstance; + public static SumAggregationResult getDefaultInstance() { + return defaultInstance; + } + + public SumAggregationResult getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SumAggregationResult_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SumAggregationResult_fieldAccessorTable; + } + + private int bitField0_; + // optional double value = 1; + public static final int VALUE_FIELD_NUMBER = 1; + private double value_; + public boolean hasValue() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public double getValue() { + return value_; + } + + private void initFields() { + value_ = 0D; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeDouble(1, value_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(1, value_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregationResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregationResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregationResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregationResult parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregationResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregationResult parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregationResult parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregationResult parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregationResult parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregationResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregationResult prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregationResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SumAggregationResult_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SumAggregationResult_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregationResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + value_ = 0D; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregationResult.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregationResult getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregationResult.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregationResult build() { + com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregationResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregationResult buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregationResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregationResult buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregationResult result = new com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregationResult(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.value_ = value_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregationResult) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregationResult)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregationResult other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregationResult.getDefaultInstance()) return this; + if (other.hasValue()) { + setValue(other.getValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 9: { + bitField0_ |= 0x00000001; + value_ = input.readDouble(); + break; + } + } + } + } + + private int bitField0_; + + // optional double value = 1; + private double value_ ; + public boolean hasValue() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public double getValue() { + return value_; + } + public Builder setValue(double value) { + bitField0_ |= 0x00000001; + value_ = value; + onChanged(); + return this; + } + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000001); + value_ = 0D; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.SumAggregationResult) + } + + static { + defaultInstance = new SumAggregationResult(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.SumAggregationResult) + } + + public interface CountAggregationResultOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional int64 value = 1; + boolean hasValue(); + long getValue(); + } + public static final class CountAggregationResult extends + com.google.protobuf.GeneratedMessage + implements CountAggregationResultOrBuilder { + // Use CountAggregationResult.newBuilder() to construct. + private CountAggregationResult(Builder builder) { + super(builder); + } + private CountAggregationResult(boolean noInit) {} + + private static final CountAggregationResult defaultInstance; + public static CountAggregationResult getDefaultInstance() { + return defaultInstance; + } + + public CountAggregationResult getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_CountAggregationResult_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_CountAggregationResult_fieldAccessorTable; + } + + private int bitField0_; + // optional int64 value = 1; + public static final int VALUE_FIELD_NUMBER = 1; + private long value_; + public boolean hasValue() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public long getValue() { + return value_; + } + + private void initFields() { + value_ = 0L; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeInt64(1, value_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, value_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregationResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregationResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregationResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregationResult parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregationResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregationResult parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregationResult parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregationResult parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregationResult parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregationResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregationResult prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregationResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_CountAggregationResult_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_CountAggregationResult_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregationResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + value_ = 0L; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregationResult.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregationResult getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregationResult.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregationResult build() { + com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregationResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregationResult buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregationResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregationResult buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregationResult result = new com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregationResult(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.value_ = value_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregationResult) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregationResult)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregationResult other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregationResult.getDefaultInstance()) return this; + if (other.hasValue()) { + setValue(other.getValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + value_ = input.readInt64(); + break; + } + } + } + } + + private int bitField0_; + + // optional int64 value = 1; + private long value_ ; + public boolean hasValue() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public long getValue() { + return value_; + } + public Builder setValue(long value) { + bitField0_ |= 0x00000001; + value_ = value; + onChanged(); + return this; + } + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000001); + value_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.CountAggregationResult) + } + + static { + defaultInstance = new CountAggregationResult(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.CountAggregationResult) + } + + public interface AggregationResultOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string name = 1; + boolean hasName(); + String getName(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.AggregationType type = 2; + boolean hasType(); + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationType getType(); + + // optional bytes agg_result = 3; + boolean hasAggResult(); + com.google.protobuf.ByteString getAggResult(); + } + public static final class AggregationResult extends + com.google.protobuf.GeneratedMessage + implements AggregationResultOrBuilder { + // Use AggregationResult.newBuilder() to construct. + private AggregationResult(Builder builder) { + super(builder); + } + private AggregationResult(boolean noInit) {} + + private static final AggregationResult defaultInstance; + public static AggregationResult getDefaultInstance() { + return defaultInstance; + } + + public AggregationResult getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_AggregationResult_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_AggregationResult_fieldAccessorTable; + } + + private int bitField0_; + // optional string name = 1; + public static final int NAME_FIELD_NUMBER = 1; + private java.lang.Object name_; + public boolean hasName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getName() { + java.lang.Object ref = name_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + name_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.AggregationType type = 2; + public static final int TYPE_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.Search.AggregationType type_; + public boolean hasType() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationType getType() { + return type_; + } + + // optional bytes agg_result = 3; + public static final int AGG_RESULT_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString aggResult_; + public boolean hasAggResult() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.google.protobuf.ByteString getAggResult() { + return aggResult_; + } + + private void initFields() { + name_ = ""; + type_ = com.alicloud.openservices.tablestore.core.protocol.Search.AggregationType.AGG_AVG; + aggResult_ = com.google.protobuf.ByteString.EMPTY; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeEnum(2, type_.getNumber()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeBytes(3, aggResult_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, type_.getNumber()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, aggResult_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResult parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResult parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResult parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResult parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResult parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResult prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_AggregationResult_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_AggregationResult_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + name_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + type_ = com.alicloud.openservices.tablestore.core.protocol.Search.AggregationType.AGG_AVG; + bitField0_ = (bitField0_ & ~0x00000002); + aggResult_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResult.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResult getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResult.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResult build() { + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResult buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResult buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResult result = new com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResult(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.name_ = name_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.type_ = type_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.aggResult_ = aggResult_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResult) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResult)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResult other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResult.getDefaultInstance()) return this; + if (other.hasName()) { + setName(other.getName()); + } + if (other.hasType()) { + setType(other.getType()); + } + if (other.hasAggResult()) { + setAggResult(other.getAggResult()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + name_ = input.readBytes(); + break; + } + case 16: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationType value = com.alicloud.openservices.tablestore.core.protocol.Search.AggregationType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(2, rawValue); + } else { + bitField0_ |= 0x00000002; + type_ = value; + } + break; + } + case 26: { + bitField0_ |= 0x00000004; + aggResult_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // optional string name = 1; + private java.lang.Object name_ = ""; + public boolean hasName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + name_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + name_ = value; + onChanged(); + return this; + } + public Builder clearName() { + bitField0_ = (bitField0_ & ~0x00000001); + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + void setName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + name_ = value; + onChanged(); + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.AggregationType type = 2; + private com.alicloud.openservices.tablestore.core.protocol.Search.AggregationType type_ = com.alicloud.openservices.tablestore.core.protocol.Search.AggregationType.AGG_AVG; + public boolean hasType() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationType getType() { + return type_; + } + public Builder setType(com.alicloud.openservices.tablestore.core.protocol.Search.AggregationType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + type_ = value; + onChanged(); + return this; + } + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000002); + type_ = com.alicloud.openservices.tablestore.core.protocol.Search.AggregationType.AGG_AVG; + onChanged(); + return this; + } + + // optional bytes agg_result = 3; + private com.google.protobuf.ByteString aggResult_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasAggResult() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.google.protobuf.ByteString getAggResult() { + return aggResult_; + } + public Builder setAggResult(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + aggResult_ = value; + onChanged(); + return this; + } + public Builder clearAggResult() { + bitField0_ = (bitField0_ & ~0x00000004); + aggResult_ = getDefaultInstance().getAggResult(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.AggregationResult) + } + + static { + defaultInstance = new AggregationResult(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.AggregationResult) + } + + public interface AggregationsResultOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // repeated .com.alicloud.openservices.tablestore.core.protocol.AggregationResult agg_results = 1; + java.util.List + getAggResultsList(); + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResult getAggResults(int index); + int getAggResultsCount(); + java.util.List + getAggResultsOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResultOrBuilder getAggResultsOrBuilder( + int index); + } + public static final class AggregationsResult extends + com.google.protobuf.GeneratedMessage + implements AggregationsResultOrBuilder { + // Use AggregationsResult.newBuilder() to construct. + private AggregationsResult(Builder builder) { + super(builder); + } + private AggregationsResult(boolean noInit) {} + + private static final AggregationsResult defaultInstance; + public static AggregationsResult getDefaultInstance() { + return defaultInstance; + } + + public AggregationsResult getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_AggregationsResult_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_AggregationsResult_fieldAccessorTable; + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.AggregationResult agg_results = 1; + public static final int AGG_RESULTS_FIELD_NUMBER = 1; + private java.util.List aggResults_; + public java.util.List getAggResultsList() { + return aggResults_; + } + public java.util.List + getAggResultsOrBuilderList() { + return aggResults_; + } + public int getAggResultsCount() { + return aggResults_.size(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResult getAggResults(int index) { + return aggResults_.get(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResultOrBuilder getAggResultsOrBuilder( + int index) { + return aggResults_.get(index); + } + + private void initFields() { + aggResults_ = java.util.Collections.emptyList(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < aggResults_.size(); i++) { + output.writeMessage(1, aggResults_.get(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < aggResults_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, aggResults_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_AggregationsResult_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_AggregationsResult_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getAggResultsFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (aggResultsBuilder_ == null) { + aggResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + aggResultsBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult build() { + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult result = new com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult(this); + int from_bitField0_ = bitField0_; + if (aggResultsBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + aggResults_ = java.util.Collections.unmodifiableList(aggResults_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.aggResults_ = aggResults_; + } else { + result.aggResults_ = aggResultsBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.getDefaultInstance()) return this; + if (aggResultsBuilder_ == null) { + if (!other.aggResults_.isEmpty()) { + if (aggResults_.isEmpty()) { + aggResults_ = other.aggResults_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAggResultsIsMutable(); + aggResults_.addAll(other.aggResults_); + } + onChanged(); + } + } else { + if (!other.aggResults_.isEmpty()) { + if (aggResultsBuilder_.isEmpty()) { + aggResultsBuilder_.dispose(); + aggResultsBuilder_ = null; + aggResults_ = other.aggResults_; + bitField0_ = (bitField0_ & ~0x00000001); + aggResultsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getAggResultsFieldBuilder() : null; + } else { + aggResultsBuilder_.addAllMessages(other.aggResults_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResult.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResult.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addAggResults(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // repeated .com.alicloud.openservices.tablestore.core.protocol.AggregationResult agg_results = 1; + private java.util.List aggResults_ = + java.util.Collections.emptyList(); + private void ensureAggResultsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + aggResults_ = new java.util.ArrayList(aggResults_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResult, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResult.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResultOrBuilder> aggResultsBuilder_; + + public java.util.List getAggResultsList() { + if (aggResultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(aggResults_); + } else { + return aggResultsBuilder_.getMessageList(); + } + } + public int getAggResultsCount() { + if (aggResultsBuilder_ == null) { + return aggResults_.size(); + } else { + return aggResultsBuilder_.getCount(); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResult getAggResults(int index) { + if (aggResultsBuilder_ == null) { + return aggResults_.get(index); + } else { + return aggResultsBuilder_.getMessage(index); + } + } + public Builder setAggResults( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResult value) { + if (aggResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAggResultsIsMutable(); + aggResults_.set(index, value); + onChanged(); + } else { + aggResultsBuilder_.setMessage(index, value); + } + return this; + } + public Builder setAggResults( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResult.Builder builderForValue) { + if (aggResultsBuilder_ == null) { + ensureAggResultsIsMutable(); + aggResults_.set(index, builderForValue.build()); + onChanged(); + } else { + aggResultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAggResults(com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResult value) { + if (aggResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAggResultsIsMutable(); + aggResults_.add(value); + onChanged(); + } else { + aggResultsBuilder_.addMessage(value); + } + return this; + } + public Builder addAggResults( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResult value) { + if (aggResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAggResultsIsMutable(); + aggResults_.add(index, value); + onChanged(); + } else { + aggResultsBuilder_.addMessage(index, value); + } + return this; + } + public Builder addAggResults( + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResult.Builder builderForValue) { + if (aggResultsBuilder_ == null) { + ensureAggResultsIsMutable(); + aggResults_.add(builderForValue.build()); + onChanged(); + } else { + aggResultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + public Builder addAggResults( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResult.Builder builderForValue) { + if (aggResultsBuilder_ == null) { + ensureAggResultsIsMutable(); + aggResults_.add(index, builderForValue.build()); + onChanged(); + } else { + aggResultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAllAggResults( + java.lang.Iterable values) { + if (aggResultsBuilder_ == null) { + ensureAggResultsIsMutable(); + super.addAll(values, aggResults_); + onChanged(); + } else { + aggResultsBuilder_.addAllMessages(values); + } + return this; + } + public Builder clearAggResults() { + if (aggResultsBuilder_ == null) { + aggResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + aggResultsBuilder_.clear(); + } + return this; + } + public Builder removeAggResults(int index) { + if (aggResultsBuilder_ == null) { + ensureAggResultsIsMutable(); + aggResults_.remove(index); + onChanged(); + } else { + aggResultsBuilder_.remove(index); + } + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResult.Builder getAggResultsBuilder( + int index) { + return getAggResultsFieldBuilder().getBuilder(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResultOrBuilder getAggResultsOrBuilder( + int index) { + if (aggResultsBuilder_ == null) { + return aggResults_.get(index); } else { + return aggResultsBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getAggResultsOrBuilderList() { + if (aggResultsBuilder_ != null) { + return aggResultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(aggResults_); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResult.Builder addAggResultsBuilder() { + return getAggResultsFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResult.getDefaultInstance()); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResult.Builder addAggResultsBuilder( + int index) { + return getAggResultsFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResult.getDefaultInstance()); + } + public java.util.List + getAggResultsBuilderList() { + return getAggResultsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResult, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResult.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResultOrBuilder> + getAggResultsFieldBuilder() { + if (aggResultsBuilder_ == null) { + aggResultsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResult, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResult.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResultOrBuilder>( + aggResults_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + aggResults_ = null; + } + return aggResultsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.AggregationsResult) + } + + static { + defaultInstance = new AggregationsResult(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.AggregationsResult) + } + + public interface GroupByFieldResultItemOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string key = 1; + boolean hasKey(); + String getKey(); + + // optional int64 row_count = 2; + boolean hasRowCount(); + long getRowCount(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.AggregationsResult sub_aggs_result = 3; + boolean hasSubAggsResult(); + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult getSubAggsResult(); + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResultOrBuilder getSubAggsResultOrBuilder(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.GroupBysResult sub_group_bys_result = 4; + boolean hasSubGroupBysResult(); + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult getSubGroupBysResult(); + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResultOrBuilder getSubGroupBysResultOrBuilder(); + } + public static final class GroupByFieldResultItem extends + com.google.protobuf.GeneratedMessage + implements GroupByFieldResultItemOrBuilder { + // Use GroupByFieldResultItem.newBuilder() to construct. + private GroupByFieldResultItem(Builder builder) { + super(builder); + } + private GroupByFieldResultItem(boolean noInit) {} + + private static final GroupByFieldResultItem defaultInstance; + public static GroupByFieldResultItem getDefaultInstance() { + return defaultInstance; + } + + public GroupByFieldResultItem getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByFieldResultItem_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByFieldResultItem_fieldAccessorTable; + } + + private int bitField0_; + // optional string key = 1; + public static final int KEY_FIELD_NUMBER = 1; + private java.lang.Object key_; + public boolean hasKey() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getKey() { + java.lang.Object ref = key_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + key_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional int64 row_count = 2; + public static final int ROW_COUNT_FIELD_NUMBER = 2; + private long rowCount_; + public boolean hasRowCount() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public long getRowCount() { + return rowCount_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.AggregationsResult sub_aggs_result = 3; + public static final int SUB_AGGS_RESULT_FIELD_NUMBER = 3; + private com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult subAggsResult_; + public boolean hasSubAggsResult() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult getSubAggsResult() { + return subAggsResult_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResultOrBuilder getSubAggsResultOrBuilder() { + return subAggsResult_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.GroupBysResult sub_group_bys_result = 4; + public static final int SUB_GROUP_BYS_RESULT_FIELD_NUMBER = 4; + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult subGroupBysResult_; + public boolean hasSubGroupBysResult() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult getSubGroupBysResult() { + return subGroupBysResult_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResultOrBuilder getSubGroupBysResultOrBuilder() { + return subGroupBysResult_; + } + + private void initFields() { + key_ = ""; + rowCount_ = 0L; + subAggsResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.getDefaultInstance(); + subGroupBysResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getKeyBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeInt64(2, rowCount_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeMessage(3, subAggsResult_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeMessage(4, subGroupBysResult_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getKeyBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, rowCount_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, subAggsResult_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, subGroupBysResult_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItem parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItem parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItem parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItem parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItem parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItem parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItem parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItem parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItem parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItem parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItem prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItemOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByFieldResultItem_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByFieldResultItem_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItem.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getSubAggsResultFieldBuilder(); + getSubGroupBysResultFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + key_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + rowCount_ = 0L; + bitField0_ = (bitField0_ & ~0x00000002); + if (subAggsResultBuilder_ == null) { + subAggsResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.getDefaultInstance(); + } else { + subAggsResultBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + if (subGroupBysResultBuilder_ == null) { + subGroupBysResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.getDefaultInstance(); + } else { + subGroupBysResultBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItem.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItem getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItem.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItem build() { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItem result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItem buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItem result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItem buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItem result = new com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItem(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.key_ = key_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.rowCount_ = rowCount_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + if (subAggsResultBuilder_ == null) { + result.subAggsResult_ = subAggsResult_; + } else { + result.subAggsResult_ = subAggsResultBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + if (subGroupBysResultBuilder_ == null) { + result.subGroupBysResult_ = subGroupBysResult_; + } else { + result.subGroupBysResult_ = subGroupBysResultBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItem) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItem)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItem other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItem.getDefaultInstance()) return this; + if (other.hasKey()) { + setKey(other.getKey()); + } + if (other.hasRowCount()) { + setRowCount(other.getRowCount()); + } + if (other.hasSubAggsResult()) { + mergeSubAggsResult(other.getSubAggsResult()); + } + if (other.hasSubGroupBysResult()) { + mergeSubGroupBysResult(other.getSubGroupBysResult()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + key_ = input.readBytes(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + rowCount_ = input.readInt64(); + break; + } + case 26: { + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.newBuilder(); + if (hasSubAggsResult()) { + subBuilder.mergeFrom(getSubAggsResult()); + } + input.readMessage(subBuilder, extensionRegistry); + setSubAggsResult(subBuilder.buildPartial()); + break; + } + case 34: { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.newBuilder(); + if (hasSubGroupBysResult()) { + subBuilder.mergeFrom(getSubGroupBysResult()); + } + input.readMessage(subBuilder, extensionRegistry); + setSubGroupBysResult(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // optional string key = 1; + private java.lang.Object key_ = ""; + public boolean hasKey() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + key_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setKey(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + key_ = value; + onChanged(); + return this; + } + public Builder clearKey() { + bitField0_ = (bitField0_ & ~0x00000001); + key_ = getDefaultInstance().getKey(); + onChanged(); + return this; + } + void setKey(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + key_ = value; + onChanged(); + } + + // optional int64 row_count = 2; + private long rowCount_ ; + public boolean hasRowCount() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public long getRowCount() { + return rowCount_; + } + public Builder setRowCount(long value) { + bitField0_ |= 0x00000002; + rowCount_ = value; + onChanged(); + return this; + } + public Builder clearRowCount() { + bitField0_ = (bitField0_ & ~0x00000002); + rowCount_ = 0L; + onChanged(); + return this; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.AggregationsResult sub_aggs_result = 3; + private com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult subAggsResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResultOrBuilder> subAggsResultBuilder_; + public boolean hasSubAggsResult() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult getSubAggsResult() { + if (subAggsResultBuilder_ == null) { + return subAggsResult_; + } else { + return subAggsResultBuilder_.getMessage(); + } + } + public Builder setSubAggsResult(com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult value) { + if (subAggsResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subAggsResult_ = value; + onChanged(); + } else { + subAggsResultBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder setSubAggsResult( + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.Builder builderForValue) { + if (subAggsResultBuilder_ == null) { + subAggsResult_ = builderForValue.build(); + onChanged(); + } else { + subAggsResultBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder mergeSubAggsResult(com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult value) { + if (subAggsResultBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004) && + subAggsResult_ != com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.getDefaultInstance()) { + subAggsResult_ = + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.newBuilder(subAggsResult_).mergeFrom(value).buildPartial(); + } else { + subAggsResult_ = value; + } + onChanged(); + } else { + subAggsResultBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder clearSubAggsResult() { + if (subAggsResultBuilder_ == null) { + subAggsResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.getDefaultInstance(); + onChanged(); + } else { + subAggsResultBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.Builder getSubAggsResultBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getSubAggsResultFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResultOrBuilder getSubAggsResultOrBuilder() { + if (subAggsResultBuilder_ != null) { + return subAggsResultBuilder_.getMessageOrBuilder(); + } else { + return subAggsResult_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResultOrBuilder> + getSubAggsResultFieldBuilder() { + if (subAggsResultBuilder_ == null) { + subAggsResultBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResultOrBuilder>( + subAggsResult_, + getParentForChildren(), + isClean()); + subAggsResult_ = null; + } + return subAggsResultBuilder_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.GroupBysResult sub_group_bys_result = 4; + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult subGroupBysResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResultOrBuilder> subGroupBysResultBuilder_; + public boolean hasSubGroupBysResult() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult getSubGroupBysResult() { + if (subGroupBysResultBuilder_ == null) { + return subGroupBysResult_; + } else { + return subGroupBysResultBuilder_.getMessage(); + } + } + public Builder setSubGroupBysResult(com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult value) { + if (subGroupBysResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subGroupBysResult_ = value; + onChanged(); + } else { + subGroupBysResultBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder setSubGroupBysResult( + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.Builder builderForValue) { + if (subGroupBysResultBuilder_ == null) { + subGroupBysResult_ = builderForValue.build(); + onChanged(); + } else { + subGroupBysResultBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder mergeSubGroupBysResult(com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult value) { + if (subGroupBysResultBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008) && + subGroupBysResult_ != com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.getDefaultInstance()) { + subGroupBysResult_ = + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.newBuilder(subGroupBysResult_).mergeFrom(value).buildPartial(); + } else { + subGroupBysResult_ = value; + } + onChanged(); + } else { + subGroupBysResultBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder clearSubGroupBysResult() { + if (subGroupBysResultBuilder_ == null) { + subGroupBysResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.getDefaultInstance(); + onChanged(); + } else { + subGroupBysResultBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.Builder getSubGroupBysResultBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getSubGroupBysResultFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResultOrBuilder getSubGroupBysResultOrBuilder() { + if (subGroupBysResultBuilder_ != null) { + return subGroupBysResultBuilder_.getMessageOrBuilder(); + } else { + return subGroupBysResult_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResultOrBuilder> + getSubGroupBysResultFieldBuilder() { + if (subGroupBysResultBuilder_ == null) { + subGroupBysResultBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResultOrBuilder>( + subGroupBysResult_, + getParentForChildren(), + isClean()); + subGroupBysResult_ = null; + } + return subGroupBysResultBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GroupByFieldResultItem) + } + + static { + defaultInstance = new GroupByFieldResultItem(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GroupByFieldResultItem) + } + + public interface GroupByFieldResultOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // repeated .com.alicloud.openservices.tablestore.core.protocol.GroupByFieldResultItem group_by_field_result_items = 1; + java.util.List + getGroupByFieldResultItemsList(); + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItem getGroupByFieldResultItems(int index); + int getGroupByFieldResultItemsCount(); + java.util.List + getGroupByFieldResultItemsOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItemOrBuilder getGroupByFieldResultItemsOrBuilder( + int index); + } + public static final class GroupByFieldResult extends + com.google.protobuf.GeneratedMessage + implements GroupByFieldResultOrBuilder { + // Use GroupByFieldResult.newBuilder() to construct. + private GroupByFieldResult(Builder builder) { + super(builder); + } + private GroupByFieldResult(boolean noInit) {} + + private static final GroupByFieldResult defaultInstance; + public static GroupByFieldResult getDefaultInstance() { + return defaultInstance; + } + + public GroupByFieldResult getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByFieldResult_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByFieldResult_fieldAccessorTable; + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.GroupByFieldResultItem group_by_field_result_items = 1; + public static final int GROUP_BY_FIELD_RESULT_ITEMS_FIELD_NUMBER = 1; + private java.util.List groupByFieldResultItems_; + public java.util.List getGroupByFieldResultItemsList() { + return groupByFieldResultItems_; + } + public java.util.List + getGroupByFieldResultItemsOrBuilderList() { + return groupByFieldResultItems_; + } + public int getGroupByFieldResultItemsCount() { + return groupByFieldResultItems_.size(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItem getGroupByFieldResultItems(int index) { + return groupByFieldResultItems_.get(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItemOrBuilder getGroupByFieldResultItemsOrBuilder( + int index) { + return groupByFieldResultItems_.get(index); + } + + private void initFields() { + groupByFieldResultItems_ = java.util.Collections.emptyList(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < groupByFieldResultItems_.size(); i++) { + output.writeMessage(1, groupByFieldResultItems_.get(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < groupByFieldResultItems_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, groupByFieldResultItems_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResult parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResult parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResult parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResult parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResult parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResult prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByFieldResult_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByFieldResult_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getGroupByFieldResultItemsFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (groupByFieldResultItemsBuilder_ == null) { + groupByFieldResultItems_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + groupByFieldResultItemsBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResult.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResult getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResult.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResult build() { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResult buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResult buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResult result = new com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResult(this); + int from_bitField0_ = bitField0_; + if (groupByFieldResultItemsBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + groupByFieldResultItems_ = java.util.Collections.unmodifiableList(groupByFieldResultItems_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.groupByFieldResultItems_ = groupByFieldResultItems_; + } else { + result.groupByFieldResultItems_ = groupByFieldResultItemsBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResult) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResult)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResult other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResult.getDefaultInstance()) return this; + if (groupByFieldResultItemsBuilder_ == null) { + if (!other.groupByFieldResultItems_.isEmpty()) { + if (groupByFieldResultItems_.isEmpty()) { + groupByFieldResultItems_ = other.groupByFieldResultItems_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureGroupByFieldResultItemsIsMutable(); + groupByFieldResultItems_.addAll(other.groupByFieldResultItems_); + } + onChanged(); + } + } else { + if (!other.groupByFieldResultItems_.isEmpty()) { + if (groupByFieldResultItemsBuilder_.isEmpty()) { + groupByFieldResultItemsBuilder_.dispose(); + groupByFieldResultItemsBuilder_ = null; + groupByFieldResultItems_ = other.groupByFieldResultItems_; + bitField0_ = (bitField0_ & ~0x00000001); + groupByFieldResultItemsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getGroupByFieldResultItemsFieldBuilder() : null; + } else { + groupByFieldResultItemsBuilder_.addAllMessages(other.groupByFieldResultItems_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItem.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItem.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addGroupByFieldResultItems(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // repeated .com.alicloud.openservices.tablestore.core.protocol.GroupByFieldResultItem group_by_field_result_items = 1; + private java.util.List groupByFieldResultItems_ = + java.util.Collections.emptyList(); + private void ensureGroupByFieldResultItemsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + groupByFieldResultItems_ = new java.util.ArrayList(groupByFieldResultItems_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItem, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItem.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItemOrBuilder> groupByFieldResultItemsBuilder_; + + public java.util.List getGroupByFieldResultItemsList() { + if (groupByFieldResultItemsBuilder_ == null) { + return java.util.Collections.unmodifiableList(groupByFieldResultItems_); + } else { + return groupByFieldResultItemsBuilder_.getMessageList(); + } + } + public int getGroupByFieldResultItemsCount() { + if (groupByFieldResultItemsBuilder_ == null) { + return groupByFieldResultItems_.size(); + } else { + return groupByFieldResultItemsBuilder_.getCount(); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItem getGroupByFieldResultItems(int index) { + if (groupByFieldResultItemsBuilder_ == null) { + return groupByFieldResultItems_.get(index); + } else { + return groupByFieldResultItemsBuilder_.getMessage(index); + } + } + public Builder setGroupByFieldResultItems( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItem value) { + if (groupByFieldResultItemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupByFieldResultItemsIsMutable(); + groupByFieldResultItems_.set(index, value); + onChanged(); + } else { + groupByFieldResultItemsBuilder_.setMessage(index, value); + } + return this; + } + public Builder setGroupByFieldResultItems( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItem.Builder builderForValue) { + if (groupByFieldResultItemsBuilder_ == null) { + ensureGroupByFieldResultItemsIsMutable(); + groupByFieldResultItems_.set(index, builderForValue.build()); + onChanged(); + } else { + groupByFieldResultItemsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + public Builder addGroupByFieldResultItems(com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItem value) { + if (groupByFieldResultItemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupByFieldResultItemsIsMutable(); + groupByFieldResultItems_.add(value); + onChanged(); + } else { + groupByFieldResultItemsBuilder_.addMessage(value); + } + return this; + } + public Builder addGroupByFieldResultItems( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItem value) { + if (groupByFieldResultItemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupByFieldResultItemsIsMutable(); + groupByFieldResultItems_.add(index, value); + onChanged(); + } else { + groupByFieldResultItemsBuilder_.addMessage(index, value); + } + return this; + } + public Builder addGroupByFieldResultItems( + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItem.Builder builderForValue) { + if (groupByFieldResultItemsBuilder_ == null) { + ensureGroupByFieldResultItemsIsMutable(); + groupByFieldResultItems_.add(builderForValue.build()); + onChanged(); + } else { + groupByFieldResultItemsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + public Builder addGroupByFieldResultItems( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItem.Builder builderForValue) { + if (groupByFieldResultItemsBuilder_ == null) { + ensureGroupByFieldResultItemsIsMutable(); + groupByFieldResultItems_.add(index, builderForValue.build()); + onChanged(); + } else { + groupByFieldResultItemsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAllGroupByFieldResultItems( + java.lang.Iterable values) { + if (groupByFieldResultItemsBuilder_ == null) { + ensureGroupByFieldResultItemsIsMutable(); + super.addAll(values, groupByFieldResultItems_); + onChanged(); + } else { + groupByFieldResultItemsBuilder_.addAllMessages(values); + } + return this; + } + public Builder clearGroupByFieldResultItems() { + if (groupByFieldResultItemsBuilder_ == null) { + groupByFieldResultItems_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + groupByFieldResultItemsBuilder_.clear(); + } + return this; + } + public Builder removeGroupByFieldResultItems(int index) { + if (groupByFieldResultItemsBuilder_ == null) { + ensureGroupByFieldResultItemsIsMutable(); + groupByFieldResultItems_.remove(index); + onChanged(); + } else { + groupByFieldResultItemsBuilder_.remove(index); + } + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItem.Builder getGroupByFieldResultItemsBuilder( + int index) { + return getGroupByFieldResultItemsFieldBuilder().getBuilder(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItemOrBuilder getGroupByFieldResultItemsOrBuilder( + int index) { + if (groupByFieldResultItemsBuilder_ == null) { + return groupByFieldResultItems_.get(index); } else { + return groupByFieldResultItemsBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getGroupByFieldResultItemsOrBuilderList() { + if (groupByFieldResultItemsBuilder_ != null) { + return groupByFieldResultItemsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(groupByFieldResultItems_); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItem.Builder addGroupByFieldResultItemsBuilder() { + return getGroupByFieldResultItemsFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItem.getDefaultInstance()); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItem.Builder addGroupByFieldResultItemsBuilder( + int index) { + return getGroupByFieldResultItemsFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItem.getDefaultInstance()); + } + public java.util.List + getGroupByFieldResultItemsBuilderList() { + return getGroupByFieldResultItemsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItem, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItem.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItemOrBuilder> + getGroupByFieldResultItemsFieldBuilder() { + if (groupByFieldResultItemsBuilder_ == null) { + groupByFieldResultItemsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItem, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItem.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItemOrBuilder>( + groupByFieldResultItems_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + groupByFieldResultItems_ = null; + } + return groupByFieldResultItemsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GroupByFieldResult) + } + + static { + defaultInstance = new GroupByFieldResult(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GroupByFieldResult) + } + + public interface GroupByRangeResultItemOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional double from = 1; + boolean hasFrom(); + double getFrom(); + + // optional double to = 2; + boolean hasTo(); + double getTo(); + + // optional int64 row_count = 3; + boolean hasRowCount(); + long getRowCount(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.AggregationsResult sub_aggs_result = 4; + boolean hasSubAggsResult(); + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult getSubAggsResult(); + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResultOrBuilder getSubAggsResultOrBuilder(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.GroupBysResult sub_group_bys_result = 5; + boolean hasSubGroupBysResult(); + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult getSubGroupBysResult(); + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResultOrBuilder getSubGroupBysResultOrBuilder(); + } + public static final class GroupByRangeResultItem extends + com.google.protobuf.GeneratedMessage + implements GroupByRangeResultItemOrBuilder { + // Use GroupByRangeResultItem.newBuilder() to construct. + private GroupByRangeResultItem(Builder builder) { + super(builder); + } + private GroupByRangeResultItem(boolean noInit) {} + + private static final GroupByRangeResultItem defaultInstance; + public static GroupByRangeResultItem getDefaultInstance() { + return defaultInstance; + } + + public GroupByRangeResultItem getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByRangeResultItem_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByRangeResultItem_fieldAccessorTable; + } + + private int bitField0_; + // optional double from = 1; + public static final int FROM_FIELD_NUMBER = 1; + private double from_; + public boolean hasFrom() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public double getFrom() { + return from_; + } + + // optional double to = 2; + public static final int TO_FIELD_NUMBER = 2; + private double to_; + public boolean hasTo() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public double getTo() { + return to_; + } + + // optional int64 row_count = 3; + public static final int ROW_COUNT_FIELD_NUMBER = 3; + private long rowCount_; + public boolean hasRowCount() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public long getRowCount() { + return rowCount_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.AggregationsResult sub_aggs_result = 4; + public static final int SUB_AGGS_RESULT_FIELD_NUMBER = 4; + private com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult subAggsResult_; + public boolean hasSubAggsResult() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult getSubAggsResult() { + return subAggsResult_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResultOrBuilder getSubAggsResultOrBuilder() { + return subAggsResult_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.GroupBysResult sub_group_bys_result = 5; + public static final int SUB_GROUP_BYS_RESULT_FIELD_NUMBER = 5; + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult subGroupBysResult_; + public boolean hasSubGroupBysResult() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult getSubGroupBysResult() { + return subGroupBysResult_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResultOrBuilder getSubGroupBysResultOrBuilder() { + return subGroupBysResult_; + } + + private void initFields() { + from_ = 0D; + to_ = 0D; + rowCount_ = 0L; + subAggsResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.getDefaultInstance(); + subGroupBysResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeDouble(1, from_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeDouble(2, to_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeInt64(3, rowCount_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeMessage(4, subAggsResult_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeMessage(5, subGroupBysResult_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(1, from_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(2, to_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, rowCount_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, subAggsResult_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, subGroupBysResult_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItem parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItem parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItem parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItem parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItem parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItem parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItem parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItem parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItem parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItem parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItem prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItemOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByRangeResultItem_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByRangeResultItem_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItem.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getSubAggsResultFieldBuilder(); + getSubGroupBysResultFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + from_ = 0D; + bitField0_ = (bitField0_ & ~0x00000001); + to_ = 0D; + bitField0_ = (bitField0_ & ~0x00000002); + rowCount_ = 0L; + bitField0_ = (bitField0_ & ~0x00000004); + if (subAggsResultBuilder_ == null) { + subAggsResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.getDefaultInstance(); + } else { + subAggsResultBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + if (subGroupBysResultBuilder_ == null) { + subGroupBysResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.getDefaultInstance(); + } else { + subGroupBysResultBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItem.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItem getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItem.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItem build() { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItem result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItem buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItem result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItem buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItem result = new com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItem(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.from_ = from_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.to_ = to_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.rowCount_ = rowCount_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + if (subAggsResultBuilder_ == null) { + result.subAggsResult_ = subAggsResult_; + } else { + result.subAggsResult_ = subAggsResultBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + if (subGroupBysResultBuilder_ == null) { + result.subGroupBysResult_ = subGroupBysResult_; + } else { + result.subGroupBysResult_ = subGroupBysResultBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItem) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItem)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItem other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItem.getDefaultInstance()) return this; + if (other.hasFrom()) { + setFrom(other.getFrom()); + } + if (other.hasTo()) { + setTo(other.getTo()); + } + if (other.hasRowCount()) { + setRowCount(other.getRowCount()); + } + if (other.hasSubAggsResult()) { + mergeSubAggsResult(other.getSubAggsResult()); + } + if (other.hasSubGroupBysResult()) { + mergeSubGroupBysResult(other.getSubGroupBysResult()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 9: { + bitField0_ |= 0x00000001; + from_ = input.readDouble(); + break; + } + case 17: { + bitField0_ |= 0x00000002; + to_ = input.readDouble(); + break; + } + case 24: { + bitField0_ |= 0x00000004; + rowCount_ = input.readInt64(); + break; + } + case 34: { + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.newBuilder(); + if (hasSubAggsResult()) { + subBuilder.mergeFrom(getSubAggsResult()); + } + input.readMessage(subBuilder, extensionRegistry); + setSubAggsResult(subBuilder.buildPartial()); + break; + } + case 42: { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.newBuilder(); + if (hasSubGroupBysResult()) { + subBuilder.mergeFrom(getSubGroupBysResult()); + } + input.readMessage(subBuilder, extensionRegistry); + setSubGroupBysResult(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // optional double from = 1; + private double from_ ; + public boolean hasFrom() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public double getFrom() { + return from_; + } + public Builder setFrom(double value) { + bitField0_ |= 0x00000001; + from_ = value; + onChanged(); + return this; + } + public Builder clearFrom() { + bitField0_ = (bitField0_ & ~0x00000001); + from_ = 0D; + onChanged(); + return this; + } + + // optional double to = 2; + private double to_ ; + public boolean hasTo() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public double getTo() { + return to_; + } + public Builder setTo(double value) { + bitField0_ |= 0x00000002; + to_ = value; + onChanged(); + return this; + } + public Builder clearTo() { + bitField0_ = (bitField0_ & ~0x00000002); + to_ = 0D; + onChanged(); + return this; + } + + // optional int64 row_count = 3; + private long rowCount_ ; + public boolean hasRowCount() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public long getRowCount() { + return rowCount_; + } + public Builder setRowCount(long value) { + bitField0_ |= 0x00000004; + rowCount_ = value; + onChanged(); + return this; + } + public Builder clearRowCount() { + bitField0_ = (bitField0_ & ~0x00000004); + rowCount_ = 0L; + onChanged(); + return this; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.AggregationsResult sub_aggs_result = 4; + private com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult subAggsResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResultOrBuilder> subAggsResultBuilder_; + public boolean hasSubAggsResult() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult getSubAggsResult() { + if (subAggsResultBuilder_ == null) { + return subAggsResult_; + } else { + return subAggsResultBuilder_.getMessage(); + } + } + public Builder setSubAggsResult(com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult value) { + if (subAggsResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subAggsResult_ = value; + onChanged(); + } else { + subAggsResultBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder setSubAggsResult( + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.Builder builderForValue) { + if (subAggsResultBuilder_ == null) { + subAggsResult_ = builderForValue.build(); + onChanged(); + } else { + subAggsResultBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder mergeSubAggsResult(com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult value) { + if (subAggsResultBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008) && + subAggsResult_ != com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.getDefaultInstance()) { + subAggsResult_ = + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.newBuilder(subAggsResult_).mergeFrom(value).buildPartial(); + } else { + subAggsResult_ = value; + } + onChanged(); + } else { + subAggsResultBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder clearSubAggsResult() { + if (subAggsResultBuilder_ == null) { + subAggsResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.getDefaultInstance(); + onChanged(); + } else { + subAggsResultBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.Builder getSubAggsResultBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getSubAggsResultFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResultOrBuilder getSubAggsResultOrBuilder() { + if (subAggsResultBuilder_ != null) { + return subAggsResultBuilder_.getMessageOrBuilder(); + } else { + return subAggsResult_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResultOrBuilder> + getSubAggsResultFieldBuilder() { + if (subAggsResultBuilder_ == null) { + subAggsResultBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResultOrBuilder>( + subAggsResult_, + getParentForChildren(), + isClean()); + subAggsResult_ = null; + } + return subAggsResultBuilder_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.GroupBysResult sub_group_bys_result = 5; + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult subGroupBysResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResultOrBuilder> subGroupBysResultBuilder_; + public boolean hasSubGroupBysResult() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult getSubGroupBysResult() { + if (subGroupBysResultBuilder_ == null) { + return subGroupBysResult_; + } else { + return subGroupBysResultBuilder_.getMessage(); + } + } + public Builder setSubGroupBysResult(com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult value) { + if (subGroupBysResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subGroupBysResult_ = value; + onChanged(); + } else { + subGroupBysResultBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + return this; + } + public Builder setSubGroupBysResult( + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.Builder builderForValue) { + if (subGroupBysResultBuilder_ == null) { + subGroupBysResult_ = builderForValue.build(); + onChanged(); + } else { + subGroupBysResultBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + return this; + } + public Builder mergeSubGroupBysResult(com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult value) { + if (subGroupBysResultBuilder_ == null) { + if (((bitField0_ & 0x00000010) == 0x00000010) && + subGroupBysResult_ != com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.getDefaultInstance()) { + subGroupBysResult_ = + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.newBuilder(subGroupBysResult_).mergeFrom(value).buildPartial(); + } else { + subGroupBysResult_ = value; + } + onChanged(); + } else { + subGroupBysResultBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + return this; + } + public Builder clearSubGroupBysResult() { + if (subGroupBysResultBuilder_ == null) { + subGroupBysResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.getDefaultInstance(); + onChanged(); + } else { + subGroupBysResultBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.Builder getSubGroupBysResultBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getSubGroupBysResultFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResultOrBuilder getSubGroupBysResultOrBuilder() { + if (subGroupBysResultBuilder_ != null) { + return subGroupBysResultBuilder_.getMessageOrBuilder(); + } else { + return subGroupBysResult_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResultOrBuilder> + getSubGroupBysResultFieldBuilder() { + if (subGroupBysResultBuilder_ == null) { + subGroupBysResultBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResultOrBuilder>( + subGroupBysResult_, + getParentForChildren(), + isClean()); + subGroupBysResult_ = null; + } + return subGroupBysResultBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GroupByRangeResultItem) + } + + static { + defaultInstance = new GroupByRangeResultItem(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GroupByRangeResultItem) + } + + public interface GroupByRangeResultOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // repeated .com.alicloud.openservices.tablestore.core.protocol.GroupByRangeResultItem group_by_range_result_items = 1; + java.util.List + getGroupByRangeResultItemsList(); + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItem getGroupByRangeResultItems(int index); + int getGroupByRangeResultItemsCount(); + java.util.List + getGroupByRangeResultItemsOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItemOrBuilder getGroupByRangeResultItemsOrBuilder( + int index); + } + public static final class GroupByRangeResult extends + com.google.protobuf.GeneratedMessage + implements GroupByRangeResultOrBuilder { + // Use GroupByRangeResult.newBuilder() to construct. + private GroupByRangeResult(Builder builder) { + super(builder); + } + private GroupByRangeResult(boolean noInit) {} + + private static final GroupByRangeResult defaultInstance; + public static GroupByRangeResult getDefaultInstance() { + return defaultInstance; + } + + public GroupByRangeResult getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByRangeResult_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByRangeResult_fieldAccessorTable; + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.GroupByRangeResultItem group_by_range_result_items = 1; + public static final int GROUP_BY_RANGE_RESULT_ITEMS_FIELD_NUMBER = 1; + private java.util.List groupByRangeResultItems_; + public java.util.List getGroupByRangeResultItemsList() { + return groupByRangeResultItems_; + } + public java.util.List + getGroupByRangeResultItemsOrBuilderList() { + return groupByRangeResultItems_; + } + public int getGroupByRangeResultItemsCount() { + return groupByRangeResultItems_.size(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItem getGroupByRangeResultItems(int index) { + return groupByRangeResultItems_.get(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItemOrBuilder getGroupByRangeResultItemsOrBuilder( + int index) { + return groupByRangeResultItems_.get(index); + } + + private void initFields() { + groupByRangeResultItems_ = java.util.Collections.emptyList(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < groupByRangeResultItems_.size(); i++) { + output.writeMessage(1, groupByRangeResultItems_.get(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < groupByRangeResultItems_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, groupByRangeResultItems_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResult parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResult parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResult parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResult parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResult parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResult prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByRangeResult_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByRangeResult_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getGroupByRangeResultItemsFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (groupByRangeResultItemsBuilder_ == null) { + groupByRangeResultItems_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + groupByRangeResultItemsBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResult.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResult getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResult.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResult build() { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResult buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResult buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResult result = new com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResult(this); + int from_bitField0_ = bitField0_; + if (groupByRangeResultItemsBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + groupByRangeResultItems_ = java.util.Collections.unmodifiableList(groupByRangeResultItems_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.groupByRangeResultItems_ = groupByRangeResultItems_; + } else { + result.groupByRangeResultItems_ = groupByRangeResultItemsBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResult) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResult)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResult other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResult.getDefaultInstance()) return this; + if (groupByRangeResultItemsBuilder_ == null) { + if (!other.groupByRangeResultItems_.isEmpty()) { + if (groupByRangeResultItems_.isEmpty()) { + groupByRangeResultItems_ = other.groupByRangeResultItems_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureGroupByRangeResultItemsIsMutable(); + groupByRangeResultItems_.addAll(other.groupByRangeResultItems_); + } + onChanged(); + } + } else { + if (!other.groupByRangeResultItems_.isEmpty()) { + if (groupByRangeResultItemsBuilder_.isEmpty()) { + groupByRangeResultItemsBuilder_.dispose(); + groupByRangeResultItemsBuilder_ = null; + groupByRangeResultItems_ = other.groupByRangeResultItems_; + bitField0_ = (bitField0_ & ~0x00000001); + groupByRangeResultItemsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getGroupByRangeResultItemsFieldBuilder() : null; + } else { + groupByRangeResultItemsBuilder_.addAllMessages(other.groupByRangeResultItems_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItem.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItem.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addGroupByRangeResultItems(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // repeated .com.alicloud.openservices.tablestore.core.protocol.GroupByRangeResultItem group_by_range_result_items = 1; + private java.util.List groupByRangeResultItems_ = + java.util.Collections.emptyList(); + private void ensureGroupByRangeResultItemsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + groupByRangeResultItems_ = new java.util.ArrayList(groupByRangeResultItems_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItem, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItem.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItemOrBuilder> groupByRangeResultItemsBuilder_; + + public java.util.List getGroupByRangeResultItemsList() { + if (groupByRangeResultItemsBuilder_ == null) { + return java.util.Collections.unmodifiableList(groupByRangeResultItems_); + } else { + return groupByRangeResultItemsBuilder_.getMessageList(); + } + } + public int getGroupByRangeResultItemsCount() { + if (groupByRangeResultItemsBuilder_ == null) { + return groupByRangeResultItems_.size(); + } else { + return groupByRangeResultItemsBuilder_.getCount(); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItem getGroupByRangeResultItems(int index) { + if (groupByRangeResultItemsBuilder_ == null) { + return groupByRangeResultItems_.get(index); + } else { + return groupByRangeResultItemsBuilder_.getMessage(index); + } + } + public Builder setGroupByRangeResultItems( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItem value) { + if (groupByRangeResultItemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupByRangeResultItemsIsMutable(); + groupByRangeResultItems_.set(index, value); + onChanged(); + } else { + groupByRangeResultItemsBuilder_.setMessage(index, value); + } + return this; + } + public Builder setGroupByRangeResultItems( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItem.Builder builderForValue) { + if (groupByRangeResultItemsBuilder_ == null) { + ensureGroupByRangeResultItemsIsMutable(); + groupByRangeResultItems_.set(index, builderForValue.build()); + onChanged(); + } else { + groupByRangeResultItemsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + public Builder addGroupByRangeResultItems(com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItem value) { + if (groupByRangeResultItemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupByRangeResultItemsIsMutable(); + groupByRangeResultItems_.add(value); + onChanged(); + } else { + groupByRangeResultItemsBuilder_.addMessage(value); + } + return this; + } + public Builder addGroupByRangeResultItems( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItem value) { + if (groupByRangeResultItemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupByRangeResultItemsIsMutable(); + groupByRangeResultItems_.add(index, value); + onChanged(); + } else { + groupByRangeResultItemsBuilder_.addMessage(index, value); + } + return this; + } + public Builder addGroupByRangeResultItems( + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItem.Builder builderForValue) { + if (groupByRangeResultItemsBuilder_ == null) { + ensureGroupByRangeResultItemsIsMutable(); + groupByRangeResultItems_.add(builderForValue.build()); + onChanged(); + } else { + groupByRangeResultItemsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + public Builder addGroupByRangeResultItems( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItem.Builder builderForValue) { + if (groupByRangeResultItemsBuilder_ == null) { + ensureGroupByRangeResultItemsIsMutable(); + groupByRangeResultItems_.add(index, builderForValue.build()); + onChanged(); + } else { + groupByRangeResultItemsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAllGroupByRangeResultItems( + java.lang.Iterable values) { + if (groupByRangeResultItemsBuilder_ == null) { + ensureGroupByRangeResultItemsIsMutable(); + super.addAll(values, groupByRangeResultItems_); + onChanged(); + } else { + groupByRangeResultItemsBuilder_.addAllMessages(values); + } + return this; + } + public Builder clearGroupByRangeResultItems() { + if (groupByRangeResultItemsBuilder_ == null) { + groupByRangeResultItems_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + groupByRangeResultItemsBuilder_.clear(); + } + return this; + } + public Builder removeGroupByRangeResultItems(int index) { + if (groupByRangeResultItemsBuilder_ == null) { + ensureGroupByRangeResultItemsIsMutable(); + groupByRangeResultItems_.remove(index); + onChanged(); + } else { + groupByRangeResultItemsBuilder_.remove(index); + } + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItem.Builder getGroupByRangeResultItemsBuilder( + int index) { + return getGroupByRangeResultItemsFieldBuilder().getBuilder(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItemOrBuilder getGroupByRangeResultItemsOrBuilder( + int index) { + if (groupByRangeResultItemsBuilder_ == null) { + return groupByRangeResultItems_.get(index); } else { + return groupByRangeResultItemsBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getGroupByRangeResultItemsOrBuilderList() { + if (groupByRangeResultItemsBuilder_ != null) { + return groupByRangeResultItemsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(groupByRangeResultItems_); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItem.Builder addGroupByRangeResultItemsBuilder() { + return getGroupByRangeResultItemsFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItem.getDefaultInstance()); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItem.Builder addGroupByRangeResultItemsBuilder( + int index) { + return getGroupByRangeResultItemsFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItem.getDefaultInstance()); + } + public java.util.List + getGroupByRangeResultItemsBuilderList() { + return getGroupByRangeResultItemsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItem, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItem.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItemOrBuilder> + getGroupByRangeResultItemsFieldBuilder() { + if (groupByRangeResultItemsBuilder_ == null) { + groupByRangeResultItemsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItem, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItem.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItemOrBuilder>( + groupByRangeResultItems_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + groupByRangeResultItems_ = null; + } + return groupByRangeResultItemsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GroupByRangeResult) + } + + static { + defaultInstance = new GroupByRangeResult(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GroupByRangeResult) + } + + public interface GroupByGeoDistanceResultItemOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional double from = 1; + boolean hasFrom(); + double getFrom(); + + // optional double to = 2; + boolean hasTo(); + double getTo(); + + // optional int64 row_count = 3; + boolean hasRowCount(); + long getRowCount(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.AggregationsResult sub_aggs_result = 4; + boolean hasSubAggsResult(); + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult getSubAggsResult(); + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResultOrBuilder getSubAggsResultOrBuilder(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.GroupBysResult sub_group_bys_result = 5; + boolean hasSubGroupBysResult(); + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult getSubGroupBysResult(); + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResultOrBuilder getSubGroupBysResultOrBuilder(); + } + public static final class GroupByGeoDistanceResultItem extends + com.google.protobuf.GeneratedMessage + implements GroupByGeoDistanceResultItemOrBuilder { + // Use GroupByGeoDistanceResultItem.newBuilder() to construct. + private GroupByGeoDistanceResultItem(Builder builder) { + super(builder); + } + private GroupByGeoDistanceResultItem(boolean noInit) {} + + private static final GroupByGeoDistanceResultItem defaultInstance; + public static GroupByGeoDistanceResultItem getDefaultInstance() { + return defaultInstance; + } + + public GroupByGeoDistanceResultItem getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByGeoDistanceResultItem_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByGeoDistanceResultItem_fieldAccessorTable; + } + + private int bitField0_; + // optional double from = 1; + public static final int FROM_FIELD_NUMBER = 1; + private double from_; + public boolean hasFrom() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public double getFrom() { + return from_; + } + + // optional double to = 2; + public static final int TO_FIELD_NUMBER = 2; + private double to_; + public boolean hasTo() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public double getTo() { + return to_; + } + + // optional int64 row_count = 3; + public static final int ROW_COUNT_FIELD_NUMBER = 3; + private long rowCount_; + public boolean hasRowCount() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public long getRowCount() { + return rowCount_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.AggregationsResult sub_aggs_result = 4; + public static final int SUB_AGGS_RESULT_FIELD_NUMBER = 4; + private com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult subAggsResult_; + public boolean hasSubAggsResult() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult getSubAggsResult() { + return subAggsResult_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResultOrBuilder getSubAggsResultOrBuilder() { + return subAggsResult_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.GroupBysResult sub_group_bys_result = 5; + public static final int SUB_GROUP_BYS_RESULT_FIELD_NUMBER = 5; + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult subGroupBysResult_; + public boolean hasSubGroupBysResult() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult getSubGroupBysResult() { + return subGroupBysResult_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResultOrBuilder getSubGroupBysResultOrBuilder() { + return subGroupBysResult_; + } + + private void initFields() { + from_ = 0D; + to_ = 0D; + rowCount_ = 0L; + subAggsResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.getDefaultInstance(); + subGroupBysResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeDouble(1, from_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeDouble(2, to_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeInt64(3, rowCount_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeMessage(4, subAggsResult_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeMessage(5, subGroupBysResult_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(1, from_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(2, to_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, rowCount_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, subAggsResult_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, subGroupBysResult_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItem parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItem parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItem parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItem parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItem parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItem parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItem parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItem parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItem parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItem parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItem prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItemOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByGeoDistanceResultItem_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByGeoDistanceResultItem_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItem.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getSubAggsResultFieldBuilder(); + getSubGroupBysResultFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + from_ = 0D; + bitField0_ = (bitField0_ & ~0x00000001); + to_ = 0D; + bitField0_ = (bitField0_ & ~0x00000002); + rowCount_ = 0L; + bitField0_ = (bitField0_ & ~0x00000004); + if (subAggsResultBuilder_ == null) { + subAggsResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.getDefaultInstance(); + } else { + subAggsResultBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + if (subGroupBysResultBuilder_ == null) { + subGroupBysResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.getDefaultInstance(); + } else { + subGroupBysResultBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItem.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItem getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItem.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItem build() { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItem result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItem buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItem result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItem buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItem result = new com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItem(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.from_ = from_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.to_ = to_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.rowCount_ = rowCount_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + if (subAggsResultBuilder_ == null) { + result.subAggsResult_ = subAggsResult_; + } else { + result.subAggsResult_ = subAggsResultBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + if (subGroupBysResultBuilder_ == null) { + result.subGroupBysResult_ = subGroupBysResult_; + } else { + result.subGroupBysResult_ = subGroupBysResultBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItem) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItem)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItem other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItem.getDefaultInstance()) return this; + if (other.hasFrom()) { + setFrom(other.getFrom()); + } + if (other.hasTo()) { + setTo(other.getTo()); + } + if (other.hasRowCount()) { + setRowCount(other.getRowCount()); + } + if (other.hasSubAggsResult()) { + mergeSubAggsResult(other.getSubAggsResult()); + } + if (other.hasSubGroupBysResult()) { + mergeSubGroupBysResult(other.getSubGroupBysResult()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 9: { + bitField0_ |= 0x00000001; + from_ = input.readDouble(); + break; + } + case 17: { + bitField0_ |= 0x00000002; + to_ = input.readDouble(); + break; + } + case 24: { + bitField0_ |= 0x00000004; + rowCount_ = input.readInt64(); + break; + } + case 34: { + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.newBuilder(); + if (hasSubAggsResult()) { + subBuilder.mergeFrom(getSubAggsResult()); + } + input.readMessage(subBuilder, extensionRegistry); + setSubAggsResult(subBuilder.buildPartial()); + break; + } + case 42: { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.newBuilder(); + if (hasSubGroupBysResult()) { + subBuilder.mergeFrom(getSubGroupBysResult()); + } + input.readMessage(subBuilder, extensionRegistry); + setSubGroupBysResult(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // optional double from = 1; + private double from_ ; + public boolean hasFrom() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public double getFrom() { + return from_; + } + public Builder setFrom(double value) { + bitField0_ |= 0x00000001; + from_ = value; + onChanged(); + return this; + } + public Builder clearFrom() { + bitField0_ = (bitField0_ & ~0x00000001); + from_ = 0D; + onChanged(); + return this; + } + + // optional double to = 2; + private double to_ ; + public boolean hasTo() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public double getTo() { + return to_; + } + public Builder setTo(double value) { + bitField0_ |= 0x00000002; + to_ = value; + onChanged(); + return this; + } + public Builder clearTo() { + bitField0_ = (bitField0_ & ~0x00000002); + to_ = 0D; + onChanged(); + return this; + } + + // optional int64 row_count = 3; + private long rowCount_ ; + public boolean hasRowCount() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public long getRowCount() { + return rowCount_; + } + public Builder setRowCount(long value) { + bitField0_ |= 0x00000004; + rowCount_ = value; + onChanged(); + return this; + } + public Builder clearRowCount() { + bitField0_ = (bitField0_ & ~0x00000004); + rowCount_ = 0L; + onChanged(); + return this; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.AggregationsResult sub_aggs_result = 4; + private com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult subAggsResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResultOrBuilder> subAggsResultBuilder_; + public boolean hasSubAggsResult() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult getSubAggsResult() { + if (subAggsResultBuilder_ == null) { + return subAggsResult_; + } else { + return subAggsResultBuilder_.getMessage(); + } + } + public Builder setSubAggsResult(com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult value) { + if (subAggsResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subAggsResult_ = value; + onChanged(); + } else { + subAggsResultBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder setSubAggsResult( + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.Builder builderForValue) { + if (subAggsResultBuilder_ == null) { + subAggsResult_ = builderForValue.build(); + onChanged(); + } else { + subAggsResultBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder mergeSubAggsResult(com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult value) { + if (subAggsResultBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008) && + subAggsResult_ != com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.getDefaultInstance()) { + subAggsResult_ = + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.newBuilder(subAggsResult_).mergeFrom(value).buildPartial(); + } else { + subAggsResult_ = value; + } + onChanged(); + } else { + subAggsResultBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder clearSubAggsResult() { + if (subAggsResultBuilder_ == null) { + subAggsResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.getDefaultInstance(); + onChanged(); + } else { + subAggsResultBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.Builder getSubAggsResultBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getSubAggsResultFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResultOrBuilder getSubAggsResultOrBuilder() { + if (subAggsResultBuilder_ != null) { + return subAggsResultBuilder_.getMessageOrBuilder(); + } else { + return subAggsResult_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResultOrBuilder> + getSubAggsResultFieldBuilder() { + if (subAggsResultBuilder_ == null) { + subAggsResultBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResultOrBuilder>( + subAggsResult_, + getParentForChildren(), + isClean()); + subAggsResult_ = null; + } + return subAggsResultBuilder_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.GroupBysResult sub_group_bys_result = 5; + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult subGroupBysResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResultOrBuilder> subGroupBysResultBuilder_; + public boolean hasSubGroupBysResult() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult getSubGroupBysResult() { + if (subGroupBysResultBuilder_ == null) { + return subGroupBysResult_; + } else { + return subGroupBysResultBuilder_.getMessage(); + } + } + public Builder setSubGroupBysResult(com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult value) { + if (subGroupBysResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subGroupBysResult_ = value; + onChanged(); + } else { + subGroupBysResultBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + return this; + } + public Builder setSubGroupBysResult( + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.Builder builderForValue) { + if (subGroupBysResultBuilder_ == null) { + subGroupBysResult_ = builderForValue.build(); + onChanged(); + } else { + subGroupBysResultBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + return this; + } + public Builder mergeSubGroupBysResult(com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult value) { + if (subGroupBysResultBuilder_ == null) { + if (((bitField0_ & 0x00000010) == 0x00000010) && + subGroupBysResult_ != com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.getDefaultInstance()) { + subGroupBysResult_ = + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.newBuilder(subGroupBysResult_).mergeFrom(value).buildPartial(); + } else { + subGroupBysResult_ = value; + } + onChanged(); + } else { + subGroupBysResultBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + return this; + } + public Builder clearSubGroupBysResult() { + if (subGroupBysResultBuilder_ == null) { + subGroupBysResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.getDefaultInstance(); + onChanged(); + } else { + subGroupBysResultBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.Builder getSubGroupBysResultBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getSubGroupBysResultFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResultOrBuilder getSubGroupBysResultOrBuilder() { + if (subGroupBysResultBuilder_ != null) { + return subGroupBysResultBuilder_.getMessageOrBuilder(); + } else { + return subGroupBysResult_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResultOrBuilder> + getSubGroupBysResultFieldBuilder() { + if (subGroupBysResultBuilder_ == null) { + subGroupBysResultBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResultOrBuilder>( + subGroupBysResult_, + getParentForChildren(), + isClean()); + subGroupBysResult_ = null; + } + return subGroupBysResultBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GroupByGeoDistanceResultItem) + } + + static { + defaultInstance = new GroupByGeoDistanceResultItem(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GroupByGeoDistanceResultItem) + } + + public interface GroupByGeoDistanceResultOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // repeated .com.alicloud.openservices.tablestore.core.protocol.GroupByGeoDistanceResultItem group_by_geo_distance_result_items = 1; + java.util.List + getGroupByGeoDistanceResultItemsList(); + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItem getGroupByGeoDistanceResultItems(int index); + int getGroupByGeoDistanceResultItemsCount(); + java.util.List + getGroupByGeoDistanceResultItemsOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItemOrBuilder getGroupByGeoDistanceResultItemsOrBuilder( + int index); + } + public static final class GroupByGeoDistanceResult extends + com.google.protobuf.GeneratedMessage + implements GroupByGeoDistanceResultOrBuilder { + // Use GroupByGeoDistanceResult.newBuilder() to construct. + private GroupByGeoDistanceResult(Builder builder) { + super(builder); + } + private GroupByGeoDistanceResult(boolean noInit) {} + + private static final GroupByGeoDistanceResult defaultInstance; + public static GroupByGeoDistanceResult getDefaultInstance() { + return defaultInstance; + } + + public GroupByGeoDistanceResult getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByGeoDistanceResult_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByGeoDistanceResult_fieldAccessorTable; + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.GroupByGeoDistanceResultItem group_by_geo_distance_result_items = 1; + public static final int GROUP_BY_GEO_DISTANCE_RESULT_ITEMS_FIELD_NUMBER = 1; + private java.util.List groupByGeoDistanceResultItems_; + public java.util.List getGroupByGeoDistanceResultItemsList() { + return groupByGeoDistanceResultItems_; + } + public java.util.List + getGroupByGeoDistanceResultItemsOrBuilderList() { + return groupByGeoDistanceResultItems_; + } + public int getGroupByGeoDistanceResultItemsCount() { + return groupByGeoDistanceResultItems_.size(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItem getGroupByGeoDistanceResultItems(int index) { + return groupByGeoDistanceResultItems_.get(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItemOrBuilder getGroupByGeoDistanceResultItemsOrBuilder( + int index) { + return groupByGeoDistanceResultItems_.get(index); + } + + private void initFields() { + groupByGeoDistanceResultItems_ = java.util.Collections.emptyList(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < groupByGeoDistanceResultItems_.size(); i++) { + output.writeMessage(1, groupByGeoDistanceResultItems_.get(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < groupByGeoDistanceResultItems_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, groupByGeoDistanceResultItems_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResult parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResult parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResult parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResult parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResult parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResult prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByGeoDistanceResult_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByGeoDistanceResult_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getGroupByGeoDistanceResultItemsFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (groupByGeoDistanceResultItemsBuilder_ == null) { + groupByGeoDistanceResultItems_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + groupByGeoDistanceResultItemsBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResult.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResult getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResult.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResult build() { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResult buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResult buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResult result = new com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResult(this); + int from_bitField0_ = bitField0_; + if (groupByGeoDistanceResultItemsBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + groupByGeoDistanceResultItems_ = java.util.Collections.unmodifiableList(groupByGeoDistanceResultItems_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.groupByGeoDistanceResultItems_ = groupByGeoDistanceResultItems_; + } else { + result.groupByGeoDistanceResultItems_ = groupByGeoDistanceResultItemsBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResult) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResult)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResult other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResult.getDefaultInstance()) return this; + if (groupByGeoDistanceResultItemsBuilder_ == null) { + if (!other.groupByGeoDistanceResultItems_.isEmpty()) { + if (groupByGeoDistanceResultItems_.isEmpty()) { + groupByGeoDistanceResultItems_ = other.groupByGeoDistanceResultItems_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureGroupByGeoDistanceResultItemsIsMutable(); + groupByGeoDistanceResultItems_.addAll(other.groupByGeoDistanceResultItems_); + } + onChanged(); + } + } else { + if (!other.groupByGeoDistanceResultItems_.isEmpty()) { + if (groupByGeoDistanceResultItemsBuilder_.isEmpty()) { + groupByGeoDistanceResultItemsBuilder_.dispose(); + groupByGeoDistanceResultItemsBuilder_ = null; + groupByGeoDistanceResultItems_ = other.groupByGeoDistanceResultItems_; + bitField0_ = (bitField0_ & ~0x00000001); + groupByGeoDistanceResultItemsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getGroupByGeoDistanceResultItemsFieldBuilder() : null; + } else { + groupByGeoDistanceResultItemsBuilder_.addAllMessages(other.groupByGeoDistanceResultItems_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItem.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItem.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addGroupByGeoDistanceResultItems(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // repeated .com.alicloud.openservices.tablestore.core.protocol.GroupByGeoDistanceResultItem group_by_geo_distance_result_items = 1; + private java.util.List groupByGeoDistanceResultItems_ = + java.util.Collections.emptyList(); + private void ensureGroupByGeoDistanceResultItemsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + groupByGeoDistanceResultItems_ = new java.util.ArrayList(groupByGeoDistanceResultItems_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItem, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItem.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItemOrBuilder> groupByGeoDistanceResultItemsBuilder_; + + public java.util.List getGroupByGeoDistanceResultItemsList() { + if (groupByGeoDistanceResultItemsBuilder_ == null) { + return java.util.Collections.unmodifiableList(groupByGeoDistanceResultItems_); + } else { + return groupByGeoDistanceResultItemsBuilder_.getMessageList(); + } + } + public int getGroupByGeoDistanceResultItemsCount() { + if (groupByGeoDistanceResultItemsBuilder_ == null) { + return groupByGeoDistanceResultItems_.size(); + } else { + return groupByGeoDistanceResultItemsBuilder_.getCount(); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItem getGroupByGeoDistanceResultItems(int index) { + if (groupByGeoDistanceResultItemsBuilder_ == null) { + return groupByGeoDistanceResultItems_.get(index); + } else { + return groupByGeoDistanceResultItemsBuilder_.getMessage(index); + } + } + public Builder setGroupByGeoDistanceResultItems( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItem value) { + if (groupByGeoDistanceResultItemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupByGeoDistanceResultItemsIsMutable(); + groupByGeoDistanceResultItems_.set(index, value); + onChanged(); + } else { + groupByGeoDistanceResultItemsBuilder_.setMessage(index, value); + } + return this; + } + public Builder setGroupByGeoDistanceResultItems( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItem.Builder builderForValue) { + if (groupByGeoDistanceResultItemsBuilder_ == null) { + ensureGroupByGeoDistanceResultItemsIsMutable(); + groupByGeoDistanceResultItems_.set(index, builderForValue.build()); + onChanged(); + } else { + groupByGeoDistanceResultItemsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + public Builder addGroupByGeoDistanceResultItems(com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItem value) { + if (groupByGeoDistanceResultItemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupByGeoDistanceResultItemsIsMutable(); + groupByGeoDistanceResultItems_.add(value); + onChanged(); + } else { + groupByGeoDistanceResultItemsBuilder_.addMessage(value); + } + return this; + } + public Builder addGroupByGeoDistanceResultItems( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItem value) { + if (groupByGeoDistanceResultItemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupByGeoDistanceResultItemsIsMutable(); + groupByGeoDistanceResultItems_.add(index, value); + onChanged(); + } else { + groupByGeoDistanceResultItemsBuilder_.addMessage(index, value); + } + return this; + } + public Builder addGroupByGeoDistanceResultItems( + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItem.Builder builderForValue) { + if (groupByGeoDistanceResultItemsBuilder_ == null) { + ensureGroupByGeoDistanceResultItemsIsMutable(); + groupByGeoDistanceResultItems_.add(builderForValue.build()); + onChanged(); + } else { + groupByGeoDistanceResultItemsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + public Builder addGroupByGeoDistanceResultItems( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItem.Builder builderForValue) { + if (groupByGeoDistanceResultItemsBuilder_ == null) { + ensureGroupByGeoDistanceResultItemsIsMutable(); + groupByGeoDistanceResultItems_.add(index, builderForValue.build()); + onChanged(); + } else { + groupByGeoDistanceResultItemsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAllGroupByGeoDistanceResultItems( + java.lang.Iterable values) { + if (groupByGeoDistanceResultItemsBuilder_ == null) { + ensureGroupByGeoDistanceResultItemsIsMutable(); + super.addAll(values, groupByGeoDistanceResultItems_); + onChanged(); + } else { + groupByGeoDistanceResultItemsBuilder_.addAllMessages(values); + } + return this; + } + public Builder clearGroupByGeoDistanceResultItems() { + if (groupByGeoDistanceResultItemsBuilder_ == null) { + groupByGeoDistanceResultItems_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + groupByGeoDistanceResultItemsBuilder_.clear(); + } + return this; + } + public Builder removeGroupByGeoDistanceResultItems(int index) { + if (groupByGeoDistanceResultItemsBuilder_ == null) { + ensureGroupByGeoDistanceResultItemsIsMutable(); + groupByGeoDistanceResultItems_.remove(index); + onChanged(); + } else { + groupByGeoDistanceResultItemsBuilder_.remove(index); + } + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItem.Builder getGroupByGeoDistanceResultItemsBuilder( + int index) { + return getGroupByGeoDistanceResultItemsFieldBuilder().getBuilder(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItemOrBuilder getGroupByGeoDistanceResultItemsOrBuilder( + int index) { + if (groupByGeoDistanceResultItemsBuilder_ == null) { + return groupByGeoDistanceResultItems_.get(index); } else { + return groupByGeoDistanceResultItemsBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getGroupByGeoDistanceResultItemsOrBuilderList() { + if (groupByGeoDistanceResultItemsBuilder_ != null) { + return groupByGeoDistanceResultItemsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(groupByGeoDistanceResultItems_); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItem.Builder addGroupByGeoDistanceResultItemsBuilder() { + return getGroupByGeoDistanceResultItemsFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItem.getDefaultInstance()); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItem.Builder addGroupByGeoDistanceResultItemsBuilder( + int index) { + return getGroupByGeoDistanceResultItemsFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItem.getDefaultInstance()); + } + public java.util.List + getGroupByGeoDistanceResultItemsBuilderList() { + return getGroupByGeoDistanceResultItemsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItem, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItem.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItemOrBuilder> + getGroupByGeoDistanceResultItemsFieldBuilder() { + if (groupByGeoDistanceResultItemsBuilder_ == null) { + groupByGeoDistanceResultItemsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItem, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItem.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItemOrBuilder>( + groupByGeoDistanceResultItems_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + groupByGeoDistanceResultItems_ = null; + } + return groupByGeoDistanceResultItemsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GroupByGeoDistanceResult) + } + + static { + defaultInstance = new GroupByGeoDistanceResult(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GroupByGeoDistanceResult) + } + + public interface GroupByFilterResultItemOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional int64 row_count = 1; + boolean hasRowCount(); + long getRowCount(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.AggregationsResult sub_aggs_result = 2; + boolean hasSubAggsResult(); + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult getSubAggsResult(); + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResultOrBuilder getSubAggsResultOrBuilder(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.GroupBysResult sub_group_bys_result = 3; + boolean hasSubGroupBysResult(); + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult getSubGroupBysResult(); + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResultOrBuilder getSubGroupBysResultOrBuilder(); + } + public static final class GroupByFilterResultItem extends + com.google.protobuf.GeneratedMessage + implements GroupByFilterResultItemOrBuilder { + // Use GroupByFilterResultItem.newBuilder() to construct. + private GroupByFilterResultItem(Builder builder) { + super(builder); + } + private GroupByFilterResultItem(boolean noInit) {} + + private static final GroupByFilterResultItem defaultInstance; + public static GroupByFilterResultItem getDefaultInstance() { + return defaultInstance; + } + + public GroupByFilterResultItem getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByFilterResultItem_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByFilterResultItem_fieldAccessorTable; + } + + private int bitField0_; + // optional int64 row_count = 1; + public static final int ROW_COUNT_FIELD_NUMBER = 1; + private long rowCount_; + public boolean hasRowCount() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public long getRowCount() { + return rowCount_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.AggregationsResult sub_aggs_result = 2; + public static final int SUB_AGGS_RESULT_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult subAggsResult_; + public boolean hasSubAggsResult() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult getSubAggsResult() { + return subAggsResult_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResultOrBuilder getSubAggsResultOrBuilder() { + return subAggsResult_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.GroupBysResult sub_group_bys_result = 3; + public static final int SUB_GROUP_BYS_RESULT_FIELD_NUMBER = 3; + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult subGroupBysResult_; + public boolean hasSubGroupBysResult() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult getSubGroupBysResult() { + return subGroupBysResult_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResultOrBuilder getSubGroupBysResultOrBuilder() { + return subGroupBysResult_; + } + + private void initFields() { + rowCount_ = 0L; + subAggsResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.getDefaultInstance(); + subGroupBysResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeInt64(1, rowCount_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeMessage(2, subAggsResult_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeMessage(3, subGroupBysResult_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, rowCount_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, subAggsResult_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, subGroupBysResult_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItem parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItem parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItem parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItem parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItem parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItem parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItem parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItem parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItem parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItem parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItem prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItemOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByFilterResultItem_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByFilterResultItem_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItem.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getSubAggsResultFieldBuilder(); + getSubGroupBysResultFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + rowCount_ = 0L; + bitField0_ = (bitField0_ & ~0x00000001); + if (subAggsResultBuilder_ == null) { + subAggsResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.getDefaultInstance(); + } else { + subAggsResultBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + if (subGroupBysResultBuilder_ == null) { + subGroupBysResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.getDefaultInstance(); + } else { + subGroupBysResultBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItem.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItem getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItem.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItem build() { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItem result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItem buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItem result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItem buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItem result = new com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItem(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.rowCount_ = rowCount_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + if (subAggsResultBuilder_ == null) { + result.subAggsResult_ = subAggsResult_; + } else { + result.subAggsResult_ = subAggsResultBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + if (subGroupBysResultBuilder_ == null) { + result.subGroupBysResult_ = subGroupBysResult_; + } else { + result.subGroupBysResult_ = subGroupBysResultBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItem) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItem)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItem other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItem.getDefaultInstance()) return this; + if (other.hasRowCount()) { + setRowCount(other.getRowCount()); + } + if (other.hasSubAggsResult()) { + mergeSubAggsResult(other.getSubAggsResult()); + } + if (other.hasSubGroupBysResult()) { + mergeSubGroupBysResult(other.getSubGroupBysResult()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + rowCount_ = input.readInt64(); + break; + } + case 18: { + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.newBuilder(); + if (hasSubAggsResult()) { + subBuilder.mergeFrom(getSubAggsResult()); + } + input.readMessage(subBuilder, extensionRegistry); + setSubAggsResult(subBuilder.buildPartial()); + break; + } + case 26: { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.newBuilder(); + if (hasSubGroupBysResult()) { + subBuilder.mergeFrom(getSubGroupBysResult()); + } + input.readMessage(subBuilder, extensionRegistry); + setSubGroupBysResult(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // optional int64 row_count = 1; + private long rowCount_ ; + public boolean hasRowCount() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public long getRowCount() { + return rowCount_; + } + public Builder setRowCount(long value) { + bitField0_ |= 0x00000001; + rowCount_ = value; + onChanged(); + return this; + } + public Builder clearRowCount() { + bitField0_ = (bitField0_ & ~0x00000001); + rowCount_ = 0L; + onChanged(); + return this; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.AggregationsResult sub_aggs_result = 2; + private com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult subAggsResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResultOrBuilder> subAggsResultBuilder_; + public boolean hasSubAggsResult() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult getSubAggsResult() { + if (subAggsResultBuilder_ == null) { + return subAggsResult_; + } else { + return subAggsResultBuilder_.getMessage(); + } + } + public Builder setSubAggsResult(com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult value) { + if (subAggsResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subAggsResult_ = value; + onChanged(); + } else { + subAggsResultBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder setSubAggsResult( + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.Builder builderForValue) { + if (subAggsResultBuilder_ == null) { + subAggsResult_ = builderForValue.build(); + onChanged(); + } else { + subAggsResultBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder mergeSubAggsResult(com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult value) { + if (subAggsResultBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002) && + subAggsResult_ != com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.getDefaultInstance()) { + subAggsResult_ = + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.newBuilder(subAggsResult_).mergeFrom(value).buildPartial(); + } else { + subAggsResult_ = value; + } + onChanged(); + } else { + subAggsResultBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder clearSubAggsResult() { + if (subAggsResultBuilder_ == null) { + subAggsResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.getDefaultInstance(); + onChanged(); + } else { + subAggsResultBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.Builder getSubAggsResultBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getSubAggsResultFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResultOrBuilder getSubAggsResultOrBuilder() { + if (subAggsResultBuilder_ != null) { + return subAggsResultBuilder_.getMessageOrBuilder(); + } else { + return subAggsResult_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResultOrBuilder> + getSubAggsResultFieldBuilder() { + if (subAggsResultBuilder_ == null) { + subAggsResultBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResultOrBuilder>( + subAggsResult_, + getParentForChildren(), + isClean()); + subAggsResult_ = null; + } + return subAggsResultBuilder_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.GroupBysResult sub_group_bys_result = 3; + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult subGroupBysResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResultOrBuilder> subGroupBysResultBuilder_; + public boolean hasSubGroupBysResult() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult getSubGroupBysResult() { + if (subGroupBysResultBuilder_ == null) { + return subGroupBysResult_; + } else { + return subGroupBysResultBuilder_.getMessage(); + } + } + public Builder setSubGroupBysResult(com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult value) { + if (subGroupBysResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subGroupBysResult_ = value; + onChanged(); + } else { + subGroupBysResultBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder setSubGroupBysResult( + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.Builder builderForValue) { + if (subGroupBysResultBuilder_ == null) { + subGroupBysResult_ = builderForValue.build(); + onChanged(); + } else { + subGroupBysResultBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder mergeSubGroupBysResult(com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult value) { + if (subGroupBysResultBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004) && + subGroupBysResult_ != com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.getDefaultInstance()) { + subGroupBysResult_ = + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.newBuilder(subGroupBysResult_).mergeFrom(value).buildPartial(); + } else { + subGroupBysResult_ = value; + } + onChanged(); + } else { + subGroupBysResultBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder clearSubGroupBysResult() { + if (subGroupBysResultBuilder_ == null) { + subGroupBysResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.getDefaultInstance(); + onChanged(); + } else { + subGroupBysResultBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.Builder getSubGroupBysResultBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getSubGroupBysResultFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResultOrBuilder getSubGroupBysResultOrBuilder() { + if (subGroupBysResultBuilder_ != null) { + return subGroupBysResultBuilder_.getMessageOrBuilder(); + } else { + return subGroupBysResult_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResultOrBuilder> + getSubGroupBysResultFieldBuilder() { + if (subGroupBysResultBuilder_ == null) { + subGroupBysResultBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResultOrBuilder>( + subGroupBysResult_, + getParentForChildren(), + isClean()); + subGroupBysResult_ = null; + } + return subGroupBysResultBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GroupByFilterResultItem) + } + + static { + defaultInstance = new GroupByFilterResultItem(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GroupByFilterResultItem) + } + + public interface GroupByFilterResultOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // repeated .com.alicloud.openservices.tablestore.core.protocol.GroupByFilterResultItem group_by_filter_result_items = 1; + java.util.List + getGroupByFilterResultItemsList(); + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItem getGroupByFilterResultItems(int index); + int getGroupByFilterResultItemsCount(); + java.util.List + getGroupByFilterResultItemsOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItemOrBuilder getGroupByFilterResultItemsOrBuilder( + int index); + } + public static final class GroupByFilterResult extends + com.google.protobuf.GeneratedMessage + implements GroupByFilterResultOrBuilder { + // Use GroupByFilterResult.newBuilder() to construct. + private GroupByFilterResult(Builder builder) { + super(builder); + } + private GroupByFilterResult(boolean noInit) {} + + private static final GroupByFilterResult defaultInstance; + public static GroupByFilterResult getDefaultInstance() { + return defaultInstance; + } + + public GroupByFilterResult getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByFilterResult_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByFilterResult_fieldAccessorTable; + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.GroupByFilterResultItem group_by_filter_result_items = 1; + public static final int GROUP_BY_FILTER_RESULT_ITEMS_FIELD_NUMBER = 1; + private java.util.List groupByFilterResultItems_; + public java.util.List getGroupByFilterResultItemsList() { + return groupByFilterResultItems_; + } + public java.util.List + getGroupByFilterResultItemsOrBuilderList() { + return groupByFilterResultItems_; + } + public int getGroupByFilterResultItemsCount() { + return groupByFilterResultItems_.size(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItem getGroupByFilterResultItems(int index) { + return groupByFilterResultItems_.get(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItemOrBuilder getGroupByFilterResultItemsOrBuilder( + int index) { + return groupByFilterResultItems_.get(index); + } + + private void initFields() { + groupByFilterResultItems_ = java.util.Collections.emptyList(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < groupByFilterResultItems_.size(); i++) { + output.writeMessage(1, groupByFilterResultItems_.get(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < groupByFilterResultItems_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, groupByFilterResultItems_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResult parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResult parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResult parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResult parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResult parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResult prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByFilterResult_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByFilterResult_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getGroupByFilterResultItemsFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (groupByFilterResultItemsBuilder_ == null) { + groupByFilterResultItems_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + groupByFilterResultItemsBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResult.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResult getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResult.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResult build() { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResult buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResult buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResult result = new com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResult(this); + int from_bitField0_ = bitField0_; + if (groupByFilterResultItemsBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + groupByFilterResultItems_ = java.util.Collections.unmodifiableList(groupByFilterResultItems_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.groupByFilterResultItems_ = groupByFilterResultItems_; + } else { + result.groupByFilterResultItems_ = groupByFilterResultItemsBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResult) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResult)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResult other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResult.getDefaultInstance()) return this; + if (groupByFilterResultItemsBuilder_ == null) { + if (!other.groupByFilterResultItems_.isEmpty()) { + if (groupByFilterResultItems_.isEmpty()) { + groupByFilterResultItems_ = other.groupByFilterResultItems_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureGroupByFilterResultItemsIsMutable(); + groupByFilterResultItems_.addAll(other.groupByFilterResultItems_); + } + onChanged(); + } + } else { + if (!other.groupByFilterResultItems_.isEmpty()) { + if (groupByFilterResultItemsBuilder_.isEmpty()) { + groupByFilterResultItemsBuilder_.dispose(); + groupByFilterResultItemsBuilder_ = null; + groupByFilterResultItems_ = other.groupByFilterResultItems_; + bitField0_ = (bitField0_ & ~0x00000001); + groupByFilterResultItemsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getGroupByFilterResultItemsFieldBuilder() : null; + } else { + groupByFilterResultItemsBuilder_.addAllMessages(other.groupByFilterResultItems_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItem.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItem.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addGroupByFilterResultItems(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // repeated .com.alicloud.openservices.tablestore.core.protocol.GroupByFilterResultItem group_by_filter_result_items = 1; + private java.util.List groupByFilterResultItems_ = + java.util.Collections.emptyList(); + private void ensureGroupByFilterResultItemsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + groupByFilterResultItems_ = new java.util.ArrayList(groupByFilterResultItems_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItem, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItem.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItemOrBuilder> groupByFilterResultItemsBuilder_; + + public java.util.List getGroupByFilterResultItemsList() { + if (groupByFilterResultItemsBuilder_ == null) { + return java.util.Collections.unmodifiableList(groupByFilterResultItems_); + } else { + return groupByFilterResultItemsBuilder_.getMessageList(); + } + } + public int getGroupByFilterResultItemsCount() { + if (groupByFilterResultItemsBuilder_ == null) { + return groupByFilterResultItems_.size(); + } else { + return groupByFilterResultItemsBuilder_.getCount(); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItem getGroupByFilterResultItems(int index) { + if (groupByFilterResultItemsBuilder_ == null) { + return groupByFilterResultItems_.get(index); + } else { + return groupByFilterResultItemsBuilder_.getMessage(index); + } + } + public Builder setGroupByFilterResultItems( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItem value) { + if (groupByFilterResultItemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupByFilterResultItemsIsMutable(); + groupByFilterResultItems_.set(index, value); + onChanged(); + } else { + groupByFilterResultItemsBuilder_.setMessage(index, value); + } + return this; + } + public Builder setGroupByFilterResultItems( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItem.Builder builderForValue) { + if (groupByFilterResultItemsBuilder_ == null) { + ensureGroupByFilterResultItemsIsMutable(); + groupByFilterResultItems_.set(index, builderForValue.build()); + onChanged(); + } else { + groupByFilterResultItemsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + public Builder addGroupByFilterResultItems(com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItem value) { + if (groupByFilterResultItemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupByFilterResultItemsIsMutable(); + groupByFilterResultItems_.add(value); + onChanged(); + } else { + groupByFilterResultItemsBuilder_.addMessage(value); + } + return this; + } + public Builder addGroupByFilterResultItems( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItem value) { + if (groupByFilterResultItemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupByFilterResultItemsIsMutable(); + groupByFilterResultItems_.add(index, value); + onChanged(); + } else { + groupByFilterResultItemsBuilder_.addMessage(index, value); + } + return this; + } + public Builder addGroupByFilterResultItems( + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItem.Builder builderForValue) { + if (groupByFilterResultItemsBuilder_ == null) { + ensureGroupByFilterResultItemsIsMutable(); + groupByFilterResultItems_.add(builderForValue.build()); + onChanged(); + } else { + groupByFilterResultItemsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + public Builder addGroupByFilterResultItems( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItem.Builder builderForValue) { + if (groupByFilterResultItemsBuilder_ == null) { + ensureGroupByFilterResultItemsIsMutable(); + groupByFilterResultItems_.add(index, builderForValue.build()); + onChanged(); + } else { + groupByFilterResultItemsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAllGroupByFilterResultItems( + java.lang.Iterable values) { + if (groupByFilterResultItemsBuilder_ == null) { + ensureGroupByFilterResultItemsIsMutable(); + super.addAll(values, groupByFilterResultItems_); + onChanged(); + } else { + groupByFilterResultItemsBuilder_.addAllMessages(values); + } + return this; + } + public Builder clearGroupByFilterResultItems() { + if (groupByFilterResultItemsBuilder_ == null) { + groupByFilterResultItems_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + groupByFilterResultItemsBuilder_.clear(); + } + return this; + } + public Builder removeGroupByFilterResultItems(int index) { + if (groupByFilterResultItemsBuilder_ == null) { + ensureGroupByFilterResultItemsIsMutable(); + groupByFilterResultItems_.remove(index); + onChanged(); + } else { + groupByFilterResultItemsBuilder_.remove(index); + } + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItem.Builder getGroupByFilterResultItemsBuilder( + int index) { + return getGroupByFilterResultItemsFieldBuilder().getBuilder(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItemOrBuilder getGroupByFilterResultItemsOrBuilder( + int index) { + if (groupByFilterResultItemsBuilder_ == null) { + return groupByFilterResultItems_.get(index); } else { + return groupByFilterResultItemsBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getGroupByFilterResultItemsOrBuilderList() { + if (groupByFilterResultItemsBuilder_ != null) { + return groupByFilterResultItemsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(groupByFilterResultItems_); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItem.Builder addGroupByFilterResultItemsBuilder() { + return getGroupByFilterResultItemsFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItem.getDefaultInstance()); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItem.Builder addGroupByFilterResultItemsBuilder( + int index) { + return getGroupByFilterResultItemsFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItem.getDefaultInstance()); + } + public java.util.List + getGroupByFilterResultItemsBuilderList() { + return getGroupByFilterResultItemsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItem, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItem.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItemOrBuilder> + getGroupByFilterResultItemsFieldBuilder() { + if (groupByFilterResultItemsBuilder_ == null) { + groupByFilterResultItemsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItem, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItem.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItemOrBuilder>( + groupByFilterResultItems_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + groupByFilterResultItems_ = null; + } + return groupByFilterResultItemsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GroupByFilterResult) + } + + static { + defaultInstance = new GroupByFilterResult(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GroupByFilterResult) + } + + public interface GroupByResultOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string name = 1; + boolean hasName(); + String getName(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.GroupByType type = 2; + boolean hasType(); + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByType getType(); + + // optional bytes group_by_result = 3; + boolean hasGroupByResult(); + com.google.protobuf.ByteString getGroupByResult(); + } + public static final class GroupByResult extends + com.google.protobuf.GeneratedMessage + implements GroupByResultOrBuilder { + // Use GroupByResult.newBuilder() to construct. + private GroupByResult(Builder builder) { + super(builder); + } + private GroupByResult(boolean noInit) {} + + private static final GroupByResult defaultInstance; + public static GroupByResult getDefaultInstance() { + return defaultInstance; + } + + public GroupByResult getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByResult_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByResult_fieldAccessorTable; + } + + private int bitField0_; + // optional string name = 1; + public static final int NAME_FIELD_NUMBER = 1; + private java.lang.Object name_; + public boolean hasName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getName() { + java.lang.Object ref = name_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + name_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.GroupByType type = 2; + public static final int TYPE_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupByType type_; + public boolean hasType() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByType getType() { + return type_; + } + + // optional bytes group_by_result = 3; + public static final int GROUP_BY_RESULT_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString groupByResult_; + public boolean hasGroupByResult() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.google.protobuf.ByteString getGroupByResult() { + return groupByResult_; + } + + private void initFields() { + name_ = ""; + type_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupByType.GROUP_BY_FIELD; + groupByResult_ = com.google.protobuf.ByteString.EMPTY; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeEnum(2, type_.getNumber()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeBytes(3, groupByResult_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, type_.getNumber()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, groupByResult_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResult parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResult parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResult parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResult parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResult parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResult prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByResult_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByResult_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + name_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + type_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupByType.GROUP_BY_FIELD; + bitField0_ = (bitField0_ & ~0x00000002); + groupByResult_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResult.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResult getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResult.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResult build() { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResult buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResult buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResult result = new com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResult(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.name_ = name_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.type_ = type_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.groupByResult_ = groupByResult_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResult) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResult)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResult other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResult.getDefaultInstance()) return this; + if (other.hasName()) { + setName(other.getName()); + } + if (other.hasType()) { + setType(other.getType()); + } + if (other.hasGroupByResult()) { + setGroupByResult(other.getGroupByResult()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + name_ = input.readBytes(); + break; + } + case 16: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByType value = com.alicloud.openservices.tablestore.core.protocol.Search.GroupByType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(2, rawValue); + } else { + bitField0_ |= 0x00000002; + type_ = value; + } + break; + } + case 26: { + bitField0_ |= 0x00000004; + groupByResult_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // optional string name = 1; + private java.lang.Object name_ = ""; + public boolean hasName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + name_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + name_ = value; + onChanged(); + return this; + } + public Builder clearName() { + bitField0_ = (bitField0_ & ~0x00000001); + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + void setName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + name_ = value; + onChanged(); + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.GroupByType type = 2; + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupByType type_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupByType.GROUP_BY_FIELD; + public boolean hasType() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByType getType() { + return type_; + } + public Builder setType(com.alicloud.openservices.tablestore.core.protocol.Search.GroupByType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + type_ = value; + onChanged(); + return this; + } + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000002); + type_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupByType.GROUP_BY_FIELD; + onChanged(); + return this; + } + + // optional bytes group_by_result = 3; + private com.google.protobuf.ByteString groupByResult_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasGroupByResult() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.google.protobuf.ByteString getGroupByResult() { + return groupByResult_; + } + public Builder setGroupByResult(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + groupByResult_ = value; + onChanged(); + return this; + } + public Builder clearGroupByResult() { + bitField0_ = (bitField0_ & ~0x00000004); + groupByResult_ = getDefaultInstance().getGroupByResult(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GroupByResult) + } + + static { + defaultInstance = new GroupByResult(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GroupByResult) + } + + public interface GroupBysResultOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // repeated .com.alicloud.openservices.tablestore.core.protocol.GroupByResult group_by_results = 1; + java.util.List + getGroupByResultsList(); + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResult getGroupByResults(int index); + int getGroupByResultsCount(); + java.util.List + getGroupByResultsOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResultOrBuilder getGroupByResultsOrBuilder( + int index); + } + public static final class GroupBysResult extends + com.google.protobuf.GeneratedMessage + implements GroupBysResultOrBuilder { + // Use GroupBysResult.newBuilder() to construct. + private GroupBysResult(Builder builder) { + super(builder); + } + private GroupBysResult(boolean noInit) {} + + private static final GroupBysResult defaultInstance; + public static GroupBysResult getDefaultInstance() { + return defaultInstance; + } + + public GroupBysResult getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupBysResult_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupBysResult_fieldAccessorTable; + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.GroupByResult group_by_results = 1; + public static final int GROUP_BY_RESULTS_FIELD_NUMBER = 1; + private java.util.List groupByResults_; + public java.util.List getGroupByResultsList() { + return groupByResults_; + } + public java.util.List + getGroupByResultsOrBuilderList() { + return groupByResults_; + } + public int getGroupByResultsCount() { + return groupByResults_.size(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResult getGroupByResults(int index) { + return groupByResults_.get(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResultOrBuilder getGroupByResultsOrBuilder( + int index) { + return groupByResults_.get(index); + } + + private void initFields() { + groupByResults_ = java.util.Collections.emptyList(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < groupByResults_.size(); i++) { + output.writeMessage(1, groupByResults_.get(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < groupByResults_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, groupByResults_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupBysResult_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupBysResult_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getGroupByResultsFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (groupByResultsBuilder_ == null) { + groupByResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + groupByResultsBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult build() { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult result = new com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult(this); + int from_bitField0_ = bitField0_; + if (groupByResultsBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + groupByResults_ = java.util.Collections.unmodifiableList(groupByResults_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.groupByResults_ = groupByResults_; + } else { + result.groupByResults_ = groupByResultsBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.getDefaultInstance()) return this; + if (groupByResultsBuilder_ == null) { + if (!other.groupByResults_.isEmpty()) { + if (groupByResults_.isEmpty()) { + groupByResults_ = other.groupByResults_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureGroupByResultsIsMutable(); + groupByResults_.addAll(other.groupByResults_); + } + onChanged(); + } + } else { + if (!other.groupByResults_.isEmpty()) { + if (groupByResultsBuilder_.isEmpty()) { + groupByResultsBuilder_.dispose(); + groupByResultsBuilder_ = null; + groupByResults_ = other.groupByResults_; + bitField0_ = (bitField0_ & ~0x00000001); + groupByResultsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getGroupByResultsFieldBuilder() : null; + } else { + groupByResultsBuilder_.addAllMessages(other.groupByResults_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResult.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResult.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addGroupByResults(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // repeated .com.alicloud.openservices.tablestore.core.protocol.GroupByResult group_by_results = 1; + private java.util.List groupByResults_ = + java.util.Collections.emptyList(); + private void ensureGroupByResultsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + groupByResults_ = new java.util.ArrayList(groupByResults_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResult, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResult.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResultOrBuilder> groupByResultsBuilder_; + + public java.util.List getGroupByResultsList() { + if (groupByResultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(groupByResults_); + } else { + return groupByResultsBuilder_.getMessageList(); + } + } + public int getGroupByResultsCount() { + if (groupByResultsBuilder_ == null) { + return groupByResults_.size(); + } else { + return groupByResultsBuilder_.getCount(); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResult getGroupByResults(int index) { + if (groupByResultsBuilder_ == null) { + return groupByResults_.get(index); + } else { + return groupByResultsBuilder_.getMessage(index); + } + } + public Builder setGroupByResults( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResult value) { + if (groupByResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupByResultsIsMutable(); + groupByResults_.set(index, value); + onChanged(); + } else { + groupByResultsBuilder_.setMessage(index, value); + } + return this; + } + public Builder setGroupByResults( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResult.Builder builderForValue) { + if (groupByResultsBuilder_ == null) { + ensureGroupByResultsIsMutable(); + groupByResults_.set(index, builderForValue.build()); + onChanged(); + } else { + groupByResultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + public Builder addGroupByResults(com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResult value) { + if (groupByResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupByResultsIsMutable(); + groupByResults_.add(value); + onChanged(); + } else { + groupByResultsBuilder_.addMessage(value); + } + return this; + } + public Builder addGroupByResults( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResult value) { + if (groupByResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupByResultsIsMutable(); + groupByResults_.add(index, value); + onChanged(); + } else { + groupByResultsBuilder_.addMessage(index, value); + } + return this; + } + public Builder addGroupByResults( + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResult.Builder builderForValue) { + if (groupByResultsBuilder_ == null) { + ensureGroupByResultsIsMutable(); + groupByResults_.add(builderForValue.build()); + onChanged(); + } else { + groupByResultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + public Builder addGroupByResults( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResult.Builder builderForValue) { + if (groupByResultsBuilder_ == null) { + ensureGroupByResultsIsMutable(); + groupByResults_.add(index, builderForValue.build()); + onChanged(); + } else { + groupByResultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAllGroupByResults( + java.lang.Iterable values) { + if (groupByResultsBuilder_ == null) { + ensureGroupByResultsIsMutable(); + super.addAll(values, groupByResults_); + onChanged(); + } else { + groupByResultsBuilder_.addAllMessages(values); + } + return this; + } + public Builder clearGroupByResults() { + if (groupByResultsBuilder_ == null) { + groupByResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + groupByResultsBuilder_.clear(); + } + return this; + } + public Builder removeGroupByResults(int index) { + if (groupByResultsBuilder_ == null) { + ensureGroupByResultsIsMutable(); + groupByResults_.remove(index); + onChanged(); + } else { + groupByResultsBuilder_.remove(index); + } + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResult.Builder getGroupByResultsBuilder( + int index) { + return getGroupByResultsFieldBuilder().getBuilder(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResultOrBuilder getGroupByResultsOrBuilder( + int index) { + if (groupByResultsBuilder_ == null) { + return groupByResults_.get(index); } else { + return groupByResultsBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getGroupByResultsOrBuilderList() { + if (groupByResultsBuilder_ != null) { + return groupByResultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(groupByResults_); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResult.Builder addGroupByResultsBuilder() { + return getGroupByResultsFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResult.getDefaultInstance()); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResult.Builder addGroupByResultsBuilder( + int index) { + return getGroupByResultsFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResult.getDefaultInstance()); + } + public java.util.List + getGroupByResultsBuilderList() { + return getGroupByResultsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResult, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResult.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResultOrBuilder> + getGroupByResultsFieldBuilder() { + if (groupByResultsBuilder_ == null) { + groupByResultsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResult, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResult.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResultOrBuilder>( + groupByResults_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + groupByResults_ = null; + } + return groupByResultsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GroupBysResult) + } + + static { + defaultInstance = new GroupBysResult(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GroupBysResult) + } + + public interface GroupByHistogramItemOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional bytes key = 1; + boolean hasKey(); + com.google.protobuf.ByteString getKey(); + + // optional int64 value = 2; + boolean hasValue(); + long getValue(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.AggregationsResult sub_aggs_result = 3; + boolean hasSubAggsResult(); + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult getSubAggsResult(); + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResultOrBuilder getSubAggsResultOrBuilder(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.GroupBysResult sub_group_bys_result = 4; + boolean hasSubGroupBysResult(); + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult getSubGroupBysResult(); + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResultOrBuilder getSubGroupBysResultOrBuilder(); + } + public static final class GroupByHistogramItem extends + com.google.protobuf.GeneratedMessage + implements GroupByHistogramItemOrBuilder { + // Use GroupByHistogramItem.newBuilder() to construct. + private GroupByHistogramItem(Builder builder) { + super(builder); + } + private GroupByHistogramItem(boolean noInit) {} + + private static final GroupByHistogramItem defaultInstance; + public static GroupByHistogramItem getDefaultInstance() { + return defaultInstance; + } + + public GroupByHistogramItem getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByHistogramItem_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByHistogramItem_fieldAccessorTable; + } + + private int bitField0_; + // optional bytes key = 1; + public static final int KEY_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString key_; + public boolean hasKey() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.google.protobuf.ByteString getKey() { + return key_; + } + + // optional int64 value = 2; + public static final int VALUE_FIELD_NUMBER = 2; + private long value_; + public boolean hasValue() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public long getValue() { + return value_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.AggregationsResult sub_aggs_result = 3; + public static final int SUB_AGGS_RESULT_FIELD_NUMBER = 3; + private com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult subAggsResult_; + public boolean hasSubAggsResult() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult getSubAggsResult() { + return subAggsResult_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResultOrBuilder getSubAggsResultOrBuilder() { + return subAggsResult_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.GroupBysResult sub_group_bys_result = 4; + public static final int SUB_GROUP_BYS_RESULT_FIELD_NUMBER = 4; + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult subGroupBysResult_; + public boolean hasSubGroupBysResult() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult getSubGroupBysResult() { + return subGroupBysResult_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResultOrBuilder getSubGroupBysResultOrBuilder() { + return subGroupBysResult_; + } + + private void initFields() { + key_ = com.google.protobuf.ByteString.EMPTY; + value_ = 0L; + subAggsResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.getDefaultInstance(); + subGroupBysResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, key_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeInt64(2, value_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeMessage(3, subAggsResult_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeMessage(4, subGroupBysResult_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, key_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, value_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, subAggsResult_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, subGroupBysResult_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItem parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItem parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItem parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItem parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItem parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItem parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItem parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItem parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItem parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItem parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItem prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItemOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByHistogramItem_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByHistogramItem_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItem.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getSubAggsResultFieldBuilder(); + getSubGroupBysResultFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + key_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + value_ = 0L; + bitField0_ = (bitField0_ & ~0x00000002); + if (subAggsResultBuilder_ == null) { + subAggsResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.getDefaultInstance(); + } else { + subAggsResultBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + if (subGroupBysResultBuilder_ == null) { + subGroupBysResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.getDefaultInstance(); + } else { + subGroupBysResultBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItem.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItem getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItem.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItem build() { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItem result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItem buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItem result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItem buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItem result = new com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItem(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.key_ = key_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.value_ = value_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + if (subAggsResultBuilder_ == null) { + result.subAggsResult_ = subAggsResult_; + } else { + result.subAggsResult_ = subAggsResultBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + if (subGroupBysResultBuilder_ == null) { + result.subGroupBysResult_ = subGroupBysResult_; + } else { + result.subGroupBysResult_ = subGroupBysResultBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItem) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItem)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItem other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItem.getDefaultInstance()) return this; + if (other.hasKey()) { + setKey(other.getKey()); + } + if (other.hasValue()) { + setValue(other.getValue()); + } + if (other.hasSubAggsResult()) { + mergeSubAggsResult(other.getSubAggsResult()); + } + if (other.hasSubGroupBysResult()) { + mergeSubGroupBysResult(other.getSubGroupBysResult()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + key_ = input.readBytes(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + value_ = input.readInt64(); + break; + } + case 26: { + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.newBuilder(); + if (hasSubAggsResult()) { + subBuilder.mergeFrom(getSubAggsResult()); + } + input.readMessage(subBuilder, extensionRegistry); + setSubAggsResult(subBuilder.buildPartial()); + break; + } + case 34: { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.newBuilder(); + if (hasSubGroupBysResult()) { + subBuilder.mergeFrom(getSubGroupBysResult()); + } + input.readMessage(subBuilder, extensionRegistry); + setSubGroupBysResult(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // optional bytes key = 1; + private com.google.protobuf.ByteString key_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasKey() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.google.protobuf.ByteString getKey() { + return key_; + } + public Builder setKey(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + key_ = value; + onChanged(); + return this; + } + public Builder clearKey() { + bitField0_ = (bitField0_ & ~0x00000001); + key_ = getDefaultInstance().getKey(); + onChanged(); + return this; + } + + // optional int64 value = 2; + private long value_ ; + public boolean hasValue() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public long getValue() { + return value_; + } + public Builder setValue(long value) { + bitField0_ |= 0x00000002; + value_ = value; + onChanged(); + return this; + } + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000002); + value_ = 0L; + onChanged(); + return this; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.AggregationsResult sub_aggs_result = 3; + private com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult subAggsResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResultOrBuilder> subAggsResultBuilder_; + public boolean hasSubAggsResult() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult getSubAggsResult() { + if (subAggsResultBuilder_ == null) { + return subAggsResult_; + } else { + return subAggsResultBuilder_.getMessage(); + } + } + public Builder setSubAggsResult(com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult value) { + if (subAggsResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subAggsResult_ = value; + onChanged(); + } else { + subAggsResultBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder setSubAggsResult( + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.Builder builderForValue) { + if (subAggsResultBuilder_ == null) { + subAggsResult_ = builderForValue.build(); + onChanged(); + } else { + subAggsResultBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder mergeSubAggsResult(com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult value) { + if (subAggsResultBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004) && + subAggsResult_ != com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.getDefaultInstance()) { + subAggsResult_ = + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.newBuilder(subAggsResult_).mergeFrom(value).buildPartial(); + } else { + subAggsResult_ = value; + } + onChanged(); + } else { + subAggsResultBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder clearSubAggsResult() { + if (subAggsResultBuilder_ == null) { + subAggsResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.getDefaultInstance(); + onChanged(); + } else { + subAggsResultBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.Builder getSubAggsResultBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getSubAggsResultFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResultOrBuilder getSubAggsResultOrBuilder() { + if (subAggsResultBuilder_ != null) { + return subAggsResultBuilder_.getMessageOrBuilder(); + } else { + return subAggsResult_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResultOrBuilder> + getSubAggsResultFieldBuilder() { + if (subAggsResultBuilder_ == null) { + subAggsResultBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResultOrBuilder>( + subAggsResult_, + getParentForChildren(), + isClean()); + subAggsResult_ = null; + } + return subAggsResultBuilder_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.GroupBysResult sub_group_bys_result = 4; + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult subGroupBysResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResultOrBuilder> subGroupBysResultBuilder_; + public boolean hasSubGroupBysResult() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult getSubGroupBysResult() { + if (subGroupBysResultBuilder_ == null) { + return subGroupBysResult_; + } else { + return subGroupBysResultBuilder_.getMessage(); + } + } + public Builder setSubGroupBysResult(com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult value) { + if (subGroupBysResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subGroupBysResult_ = value; + onChanged(); + } else { + subGroupBysResultBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder setSubGroupBysResult( + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.Builder builderForValue) { + if (subGroupBysResultBuilder_ == null) { + subGroupBysResult_ = builderForValue.build(); + onChanged(); + } else { + subGroupBysResultBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder mergeSubGroupBysResult(com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult value) { + if (subGroupBysResultBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008) && + subGroupBysResult_ != com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.getDefaultInstance()) { + subGroupBysResult_ = + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.newBuilder(subGroupBysResult_).mergeFrom(value).buildPartial(); + } else { + subGroupBysResult_ = value; + } + onChanged(); + } else { + subGroupBysResultBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder clearSubGroupBysResult() { + if (subGroupBysResultBuilder_ == null) { + subGroupBysResult_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.getDefaultInstance(); + onChanged(); + } else { + subGroupBysResultBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.Builder getSubGroupBysResultBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getSubGroupBysResultFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResultOrBuilder getSubGroupBysResultOrBuilder() { + if (subGroupBysResultBuilder_ != null) { + return subGroupBysResultBuilder_.getMessageOrBuilder(); + } else { + return subGroupBysResult_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResultOrBuilder> + getSubGroupBysResultFieldBuilder() { + if (subGroupBysResultBuilder_ == null) { + subGroupBysResultBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResultOrBuilder>( + subGroupBysResult_, + getParentForChildren(), + isClean()); + subGroupBysResult_ = null; + } + return subGroupBysResultBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GroupByHistogramItem) + } + + static { + defaultInstance = new GroupByHistogramItem(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GroupByHistogramItem) + } + + public interface GroupByHistogramResultOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // repeated .com.alicloud.openservices.tablestore.core.protocol.GroupByHistogramItem group_by_histogra_items = 1; + java.util.List + getGroupByHistograItemsList(); + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItem getGroupByHistograItems(int index); + int getGroupByHistograItemsCount(); + java.util.List + getGroupByHistograItemsOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItemOrBuilder getGroupByHistograItemsOrBuilder( + int index); + } + public static final class GroupByHistogramResult extends + com.google.protobuf.GeneratedMessage + implements GroupByHistogramResultOrBuilder { + // Use GroupByHistogramResult.newBuilder() to construct. + private GroupByHistogramResult(Builder builder) { + super(builder); + } + private GroupByHistogramResult(boolean noInit) {} + + private static final GroupByHistogramResult defaultInstance; + public static GroupByHistogramResult getDefaultInstance() { + return defaultInstance; + } + + public GroupByHistogramResult getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByHistogramResult_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByHistogramResult_fieldAccessorTable; + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.GroupByHistogramItem group_by_histogra_items = 1; + public static final int GROUP_BY_HISTOGRA_ITEMS_FIELD_NUMBER = 1; + private java.util.List groupByHistograItems_; + public java.util.List getGroupByHistograItemsList() { + return groupByHistograItems_; + } + public java.util.List + getGroupByHistograItemsOrBuilderList() { + return groupByHistograItems_; + } + public int getGroupByHistograItemsCount() { + return groupByHistograItems_.size(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItem getGroupByHistograItems(int index) { + return groupByHistograItems_.get(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItemOrBuilder getGroupByHistograItemsOrBuilder( + int index) { + return groupByHistograItems_.get(index); + } + + private void initFields() { + groupByHistograItems_ = java.util.Collections.emptyList(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < groupByHistograItems_.size(); i++) { + output.writeMessage(1, groupByHistograItems_.get(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < groupByHistograItems_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, groupByHistograItems_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramResult parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramResult parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramResult parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramResult parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramResult parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramResult parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramResult prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByHistogramResult_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByHistogramResult_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getGroupByHistograItemsFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (groupByHistograItemsBuilder_ == null) { + groupByHistograItems_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + groupByHistograItemsBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramResult.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramResult getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramResult.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramResult build() { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramResult buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramResult buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramResult result = new com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramResult(this); + int from_bitField0_ = bitField0_; + if (groupByHistograItemsBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + groupByHistograItems_ = java.util.Collections.unmodifiableList(groupByHistograItems_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.groupByHistograItems_ = groupByHistograItems_; + } else { + result.groupByHistograItems_ = groupByHistograItemsBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramResult) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramResult)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramResult other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramResult.getDefaultInstance()) return this; + if (groupByHistograItemsBuilder_ == null) { + if (!other.groupByHistograItems_.isEmpty()) { + if (groupByHistograItems_.isEmpty()) { + groupByHistograItems_ = other.groupByHistograItems_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureGroupByHistograItemsIsMutable(); + groupByHistograItems_.addAll(other.groupByHistograItems_); + } + onChanged(); + } + } else { + if (!other.groupByHistograItems_.isEmpty()) { + if (groupByHistograItemsBuilder_.isEmpty()) { + groupByHistograItemsBuilder_.dispose(); + groupByHistograItemsBuilder_ = null; + groupByHistograItems_ = other.groupByHistograItems_; + bitField0_ = (bitField0_ & ~0x00000001); + groupByHistograItemsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getGroupByHistograItemsFieldBuilder() : null; + } else { + groupByHistograItemsBuilder_.addAllMessages(other.groupByHistograItems_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItem.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItem.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addGroupByHistograItems(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // repeated .com.alicloud.openservices.tablestore.core.protocol.GroupByHistogramItem group_by_histogra_items = 1; + private java.util.List groupByHistograItems_ = + java.util.Collections.emptyList(); + private void ensureGroupByHistograItemsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + groupByHistograItems_ = new java.util.ArrayList(groupByHistograItems_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItem, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItem.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItemOrBuilder> groupByHistograItemsBuilder_; + + public java.util.List getGroupByHistograItemsList() { + if (groupByHistograItemsBuilder_ == null) { + return java.util.Collections.unmodifiableList(groupByHistograItems_); + } else { + return groupByHistograItemsBuilder_.getMessageList(); + } + } + public int getGroupByHistograItemsCount() { + if (groupByHistograItemsBuilder_ == null) { + return groupByHistograItems_.size(); + } else { + return groupByHistograItemsBuilder_.getCount(); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItem getGroupByHistograItems(int index) { + if (groupByHistograItemsBuilder_ == null) { + return groupByHistograItems_.get(index); + } else { + return groupByHistograItemsBuilder_.getMessage(index); + } + } + public Builder setGroupByHistograItems( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItem value) { + if (groupByHistograItemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupByHistograItemsIsMutable(); + groupByHistograItems_.set(index, value); + onChanged(); + } else { + groupByHistograItemsBuilder_.setMessage(index, value); + } + return this; + } + public Builder setGroupByHistograItems( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItem.Builder builderForValue) { + if (groupByHistograItemsBuilder_ == null) { + ensureGroupByHistograItemsIsMutable(); + groupByHistograItems_.set(index, builderForValue.build()); + onChanged(); + } else { + groupByHistograItemsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + public Builder addGroupByHistograItems(com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItem value) { + if (groupByHistograItemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupByHistograItemsIsMutable(); + groupByHistograItems_.add(value); + onChanged(); + } else { + groupByHistograItemsBuilder_.addMessage(value); + } + return this; + } + public Builder addGroupByHistograItems( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItem value) { + if (groupByHistograItemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupByHistograItemsIsMutable(); + groupByHistograItems_.add(index, value); + onChanged(); + } else { + groupByHistograItemsBuilder_.addMessage(index, value); + } + return this; + } + public Builder addGroupByHistograItems( + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItem.Builder builderForValue) { + if (groupByHistograItemsBuilder_ == null) { + ensureGroupByHistograItemsIsMutable(); + groupByHistograItems_.add(builderForValue.build()); + onChanged(); + } else { + groupByHistograItemsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + public Builder addGroupByHistograItems( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItem.Builder builderForValue) { + if (groupByHistograItemsBuilder_ == null) { + ensureGroupByHistograItemsIsMutable(); + groupByHistograItems_.add(index, builderForValue.build()); + onChanged(); + } else { + groupByHistograItemsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAllGroupByHistograItems( + java.lang.Iterable values) { + if (groupByHistograItemsBuilder_ == null) { + ensureGroupByHistograItemsIsMutable(); + super.addAll(values, groupByHistograItems_); + onChanged(); + } else { + groupByHistograItemsBuilder_.addAllMessages(values); + } + return this; + } + public Builder clearGroupByHistograItems() { + if (groupByHistograItemsBuilder_ == null) { + groupByHistograItems_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + groupByHistograItemsBuilder_.clear(); + } + return this; + } + public Builder removeGroupByHistograItems(int index) { + if (groupByHistograItemsBuilder_ == null) { + ensureGroupByHistograItemsIsMutable(); + groupByHistograItems_.remove(index); + onChanged(); + } else { + groupByHistograItemsBuilder_.remove(index); + } + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItem.Builder getGroupByHistograItemsBuilder( + int index) { + return getGroupByHistograItemsFieldBuilder().getBuilder(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItemOrBuilder getGroupByHistograItemsOrBuilder( + int index) { + if (groupByHistograItemsBuilder_ == null) { + return groupByHistograItems_.get(index); } else { + return groupByHistograItemsBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getGroupByHistograItemsOrBuilderList() { + if (groupByHistograItemsBuilder_ != null) { + return groupByHistograItemsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(groupByHistograItems_); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItem.Builder addGroupByHistograItemsBuilder() { + return getGroupByHistograItemsFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItem.getDefaultInstance()); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItem.Builder addGroupByHistograItemsBuilder( + int index) { + return getGroupByHistograItemsFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItem.getDefaultInstance()); + } + public java.util.List + getGroupByHistograItemsBuilderList() { + return getGroupByHistograItemsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItem, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItem.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItemOrBuilder> + getGroupByHistograItemsFieldBuilder() { + if (groupByHistograItemsBuilder_ == null) { + groupByHistograItemsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItem, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItem.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItemOrBuilder>( + groupByHistograItems_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + groupByHistograItems_ = null; + } + return groupByHistograItemsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GroupByHistogramResult) + } + + static { + defaultInstance = new GroupByHistogramResult(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GroupByHistogramResult) + } + + public interface MatchQueryOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string field_name = 1; + boolean hasFieldName(); + String getFieldName(); + + // optional string text = 2; + boolean hasText(); + String getText(); + + // optional int32 minimum_should_match = 3; + boolean hasMinimumShouldMatch(); + int getMinimumShouldMatch(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.QueryOperator operator = 4; + boolean hasOperator(); + com.alicloud.openservices.tablestore.core.protocol.Search.QueryOperator getOperator(); + + // optional float weight = 5; + boolean hasWeight(); + float getWeight(); + } + public static final class MatchQuery extends + com.google.protobuf.GeneratedMessage + implements MatchQueryOrBuilder { + // Use MatchQuery.newBuilder() to construct. + private MatchQuery(Builder builder) { + super(builder); + } + private MatchQuery(boolean noInit) {} + + private static final MatchQuery defaultInstance; + public static MatchQuery getDefaultInstance() { + return defaultInstance; + } + + public MatchQuery getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MatchQuery_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MatchQuery_fieldAccessorTable; + } + + private int bitField0_; + // optional string field_name = 1; + public static final int FIELD_NAME_FIELD_NUMBER = 1; + private java.lang.Object fieldName_; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + fieldName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getFieldNameBytes() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + fieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional string text = 2; + public static final int TEXT_FIELD_NUMBER = 2; + private java.lang.Object text_; + public boolean hasText() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getText() { + java.lang.Object ref = text_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + text_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional int32 minimum_should_match = 3; + public static final int MINIMUM_SHOULD_MATCH_FIELD_NUMBER = 3; + private int minimumShouldMatch_; + public boolean hasMinimumShouldMatch() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public int getMinimumShouldMatch() { + return minimumShouldMatch_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.QueryOperator operator = 4; + public static final int OPERATOR_FIELD_NUMBER = 4; + private com.alicloud.openservices.tablestore.core.protocol.Search.QueryOperator operator_; + public boolean hasOperator() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.QueryOperator getOperator() { + return operator_; + } + + // optional float weight = 5; + public static final int WEIGHT_FIELD_NUMBER = 5; + private float weight_; + public boolean hasWeight() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public float getWeight() { + return weight_; + } + + private void initFields() { + fieldName_ = ""; + text_ = ""; + minimumShouldMatch_ = 0; + operator_ = com.alicloud.openservices.tablestore.core.protocol.Search.QueryOperator.OR; + weight_ = 0F; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getFieldNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getTextBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeInt32(3, minimumShouldMatch_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeEnum(4, operator_.getNumber()); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeFloat(5, weight_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getFieldNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getTextBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, minimumShouldMatch_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, operator_.getNumber()); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(5, weight_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.MatchQueryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MatchQuery_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MatchQuery_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + fieldName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + text_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + minimumShouldMatch_ = 0; + bitField0_ = (bitField0_ & ~0x00000004); + operator_ = com.alicloud.openservices.tablestore.core.protocol.Search.QueryOperator.OR; + bitField0_ = (bitField0_ & ~0x00000008); + weight_ = 0F; + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery build() { + com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery result = new com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.fieldName_ = fieldName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.text_ = text_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.minimumShouldMatch_ = minimumShouldMatch_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.operator_ = operator_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + result.weight_ = weight_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery.getDefaultInstance()) return this; + if (other.hasFieldName()) { + setFieldName(other.getFieldName()); + } + if (other.hasText()) { + setText(other.getText()); + } + if (other.hasMinimumShouldMatch()) { + setMinimumShouldMatch(other.getMinimumShouldMatch()); + } + if (other.hasOperator()) { + setOperator(other.getOperator()); + } + if (other.hasWeight()) { + setWeight(other.getWeight()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + fieldName_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + text_ = input.readBytes(); + break; + } + case 24: { + bitField0_ |= 0x00000004; + minimumShouldMatch_ = input.readInt32(); + break; + } + case 32: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.Search.QueryOperator value = com.alicloud.openservices.tablestore.core.protocol.Search.QueryOperator.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(4, rawValue); + } else { + bitField0_ |= 0x00000008; + operator_ = value; + } + break; + } + case 45: { + bitField0_ |= 0x00000010; + weight_ = input.readFloat(); + break; + } + } + } + } + + private int bitField0_; + + // optional string field_name = 1; + private java.lang.Object fieldName_ = ""; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + fieldName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setFieldName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + return this; + } + public Builder clearFieldName() { + bitField0_ = (bitField0_ & ~0x00000001); + fieldName_ = getDefaultInstance().getFieldName(); + onChanged(); + return this; + } + void setFieldName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + } + + // optional string text = 2; + private java.lang.Object text_ = ""; + public boolean hasText() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getText() { + java.lang.Object ref = text_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + text_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setText(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + text_ = value; + onChanged(); + return this; + } + public Builder clearText() { + bitField0_ = (bitField0_ & ~0x00000002); + text_ = getDefaultInstance().getText(); + onChanged(); + return this; + } + void setText(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000002; + text_ = value; + onChanged(); + } + + // optional int32 minimum_should_match = 3; + private int minimumShouldMatch_ ; + public boolean hasMinimumShouldMatch() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public int getMinimumShouldMatch() { + return minimumShouldMatch_; + } + public Builder setMinimumShouldMatch(int value) { + bitField0_ |= 0x00000004; + minimumShouldMatch_ = value; + onChanged(); + return this; + } + public Builder clearMinimumShouldMatch() { + bitField0_ = (bitField0_ & ~0x00000004); + minimumShouldMatch_ = 0; + onChanged(); + return this; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.QueryOperator operator = 4; + private com.alicloud.openservices.tablestore.core.protocol.Search.QueryOperator operator_ = com.alicloud.openservices.tablestore.core.protocol.Search.QueryOperator.OR; + public boolean hasOperator() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.QueryOperator getOperator() { + return operator_; + } + public Builder setOperator(com.alicloud.openservices.tablestore.core.protocol.Search.QueryOperator value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + operator_ = value; + onChanged(); + return this; + } + public Builder clearOperator() { + bitField0_ = (bitField0_ & ~0x00000008); + operator_ = com.alicloud.openservices.tablestore.core.protocol.Search.QueryOperator.OR; + onChanged(); + return this; + } + + // optional float weight = 5; + private float weight_ ; + public boolean hasWeight() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public float getWeight() { + return weight_; + } + public Builder setWeight(float value) { + bitField0_ |= 0x00000010; + weight_ = value; + onChanged(); + return this; + } + public Builder clearWeight() { + bitField0_ = (bitField0_ & ~0x00000010); + weight_ = 0F; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.MatchQuery) + } + + static { + defaultInstance = new MatchQuery(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.MatchQuery) + } + + public interface MatchPhraseQueryOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string field_name = 1; + boolean hasFieldName(); + String getFieldName(); + + // optional string text = 2; + boolean hasText(); + String getText(); + + // optional float weight = 3; + boolean hasWeight(); + float getWeight(); + } + public static final class MatchPhraseQuery extends + com.google.protobuf.GeneratedMessage + implements MatchPhraseQueryOrBuilder { + // Use MatchPhraseQuery.newBuilder() to construct. + private MatchPhraseQuery(Builder builder) { + super(builder); + } + private MatchPhraseQuery(boolean noInit) {} + + private static final MatchPhraseQuery defaultInstance; + public static MatchPhraseQuery getDefaultInstance() { + return defaultInstance; + } + + public MatchPhraseQuery getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MatchPhraseQuery_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MatchPhraseQuery_fieldAccessorTable; + } + + private int bitField0_; + // optional string field_name = 1; + public static final int FIELD_NAME_FIELD_NUMBER = 1; + private java.lang.Object fieldName_; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + fieldName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getFieldNameBytes() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + fieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional string text = 2; + public static final int TEXT_FIELD_NUMBER = 2; + private java.lang.Object text_; + public boolean hasText() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getText() { + java.lang.Object ref = text_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + text_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional float weight = 3; + public static final int WEIGHT_FIELD_NUMBER = 3; + private float weight_; + public boolean hasWeight() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public float getWeight() { + return weight_; + } + + private void initFields() { + fieldName_ = ""; + text_ = ""; + weight_ = 0F; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getFieldNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getTextBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeFloat(3, weight_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getFieldNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getTextBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(3, weight_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQueryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MatchPhraseQuery_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MatchPhraseQuery_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + fieldName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + text_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + weight_ = 0F; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery build() { + com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery result = new com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.fieldName_ = fieldName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.text_ = text_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.weight_ = weight_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery.getDefaultInstance()) return this; + if (other.hasFieldName()) { + setFieldName(other.getFieldName()); + } + if (other.hasText()) { + setText(other.getText()); + } + if (other.hasWeight()) { + setWeight(other.getWeight()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + fieldName_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + text_ = input.readBytes(); + break; + } + case 29: { + bitField0_ |= 0x00000004; + weight_ = input.readFloat(); + break; + } + } + } + } + + private int bitField0_; + + // optional string field_name = 1; + private java.lang.Object fieldName_ = ""; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + fieldName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setFieldName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + return this; + } + public Builder clearFieldName() { + bitField0_ = (bitField0_ & ~0x00000001); + fieldName_ = getDefaultInstance().getFieldName(); + onChanged(); + return this; + } + void setFieldName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + } + + // optional string text = 2; + private java.lang.Object text_ = ""; + public boolean hasText() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getText() { + java.lang.Object ref = text_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + text_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setText(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + text_ = value; + onChanged(); + return this; + } + public Builder clearText() { + bitField0_ = (bitField0_ & ~0x00000002); + text_ = getDefaultInstance().getText(); + onChanged(); + return this; + } + void setText(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000002; + text_ = value; + onChanged(); + } + + // optional float weight = 3; + private float weight_ ; + public boolean hasWeight() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public float getWeight() { + return weight_; + } + public Builder setWeight(float value) { + bitField0_ |= 0x00000004; + weight_ = value; + onChanged(); + return this; + } + public Builder clearWeight() { + bitField0_ = (bitField0_ & ~0x00000004); + weight_ = 0F; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.MatchPhraseQuery) + } + + static { + defaultInstance = new MatchPhraseQuery(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.MatchPhraseQuery) + } + + public interface MatchAllQueryOrBuilder + extends com.google.protobuf.MessageOrBuilder { + } + public static final class MatchAllQuery extends + com.google.protobuf.GeneratedMessage + implements MatchAllQueryOrBuilder { + // Use MatchAllQuery.newBuilder() to construct. + private MatchAllQuery(Builder builder) { + super(builder); + } + private MatchAllQuery(boolean noInit) {} + + private static final MatchAllQuery defaultInstance; + public static MatchAllQuery getDefaultInstance() { + return defaultInstance; + } + + public MatchAllQuery getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MatchAllQuery_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MatchAllQuery_fieldAccessorTable; + } + + private void initFields() { + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQueryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MatchAllQuery_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MatchAllQuery_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery build() { + com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery result = new com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery(this); + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + } + } + } + + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.MatchAllQuery) + } + + static { + defaultInstance = new MatchAllQuery(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.MatchAllQuery) + } + + public interface TermQueryOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string field_name = 1; + boolean hasFieldName(); + String getFieldName(); + + // optional bytes term = 2; + boolean hasTerm(); + com.google.protobuf.ByteString getTerm(); + + // optional float weight = 3; + boolean hasWeight(); + float getWeight(); + } + public static final class TermQuery extends + com.google.protobuf.GeneratedMessage + implements TermQueryOrBuilder { + // Use TermQuery.newBuilder() to construct. + private TermQuery(Builder builder) { + super(builder); + } + private TermQuery(boolean noInit) {} + + private static final TermQuery defaultInstance; + public static TermQuery getDefaultInstance() { + return defaultInstance; + } + + public TermQuery getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_TermQuery_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_TermQuery_fieldAccessorTable; + } + + private int bitField0_; + // optional string field_name = 1; + public static final int FIELD_NAME_FIELD_NUMBER = 1; + private java.lang.Object fieldName_; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + fieldName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getFieldNameBytes() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + fieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional bytes term = 2; + public static final int TERM_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString term_; + public boolean hasTerm() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getTerm() { + return term_; + } + + // optional float weight = 3; + public static final int WEIGHT_FIELD_NUMBER = 3; + private float weight_; + public boolean hasWeight() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public float getWeight() { + return weight_; + } + + private void initFields() { + fieldName_ = ""; + term_ = com.google.protobuf.ByteString.EMPTY; + weight_ = 0F; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getFieldNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, term_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeFloat(3, weight_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getFieldNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, term_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(3, weight_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.TermQueryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_TermQuery_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_TermQuery_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + fieldName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + term_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + weight_ = 0F; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery build() { + com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery result = new com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.fieldName_ = fieldName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.term_ = term_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.weight_ = weight_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery.getDefaultInstance()) return this; + if (other.hasFieldName()) { + setFieldName(other.getFieldName()); + } + if (other.hasTerm()) { + setTerm(other.getTerm()); + } + if (other.hasWeight()) { + setWeight(other.getWeight()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + fieldName_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + term_ = input.readBytes(); + break; + } + case 29: { + bitField0_ |= 0x00000004; + weight_ = input.readFloat(); + break; + } + } + } + } + + private int bitField0_; + + // optional string field_name = 1; + private java.lang.Object fieldName_ = ""; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + fieldName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setFieldName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + return this; + } + public Builder clearFieldName() { + bitField0_ = (bitField0_ & ~0x00000001); + fieldName_ = getDefaultInstance().getFieldName(); + onChanged(); + return this; + } + void setFieldName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + } + + // optional bytes term = 2; + private com.google.protobuf.ByteString term_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasTerm() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getTerm() { + return term_; + } + public Builder setTerm(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + term_ = value; + onChanged(); + return this; + } + public Builder clearTerm() { + bitField0_ = (bitField0_ & ~0x00000002); + term_ = getDefaultInstance().getTerm(); + onChanged(); + return this; + } + + // optional float weight = 3; + private float weight_ ; + public boolean hasWeight() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public float getWeight() { + return weight_; + } + public Builder setWeight(float value) { + bitField0_ |= 0x00000004; + weight_ = value; + onChanged(); + return this; + } + public Builder clearWeight() { + bitField0_ = (bitField0_ & ~0x00000004); + weight_ = 0F; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.TermQuery) + } + + static { + defaultInstance = new TermQuery(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.TermQuery) + } + + public interface TermsQueryOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string field_name = 1; + boolean hasFieldName(); + String getFieldName(); + + // repeated bytes terms = 2; + java.util.List getTermsList(); + int getTermsCount(); + com.google.protobuf.ByteString getTerms(int index); + + // optional float weight = 3; + boolean hasWeight(); + float getWeight(); + } + public static final class TermsQuery extends + com.google.protobuf.GeneratedMessage + implements TermsQueryOrBuilder { + // Use TermsQuery.newBuilder() to construct. + private TermsQuery(Builder builder) { + super(builder); + } + private TermsQuery(boolean noInit) {} + + private static final TermsQuery defaultInstance; + public static TermsQuery getDefaultInstance() { + return defaultInstance; + } + + public TermsQuery getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_TermsQuery_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_TermsQuery_fieldAccessorTable; + } + + private int bitField0_; + // optional string field_name = 1; + public static final int FIELD_NAME_FIELD_NUMBER = 1; + private java.lang.Object fieldName_; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + fieldName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getFieldNameBytes() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + fieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // repeated bytes terms = 2; + public static final int TERMS_FIELD_NUMBER = 2; + private java.util.List terms_; + public java.util.List + getTermsList() { + return terms_; + } + public int getTermsCount() { + return terms_.size(); + } + public com.google.protobuf.ByteString getTerms(int index) { + return terms_.get(index); + } + + // optional float weight = 3; + public static final int WEIGHT_FIELD_NUMBER = 3; + private float weight_; + public boolean hasWeight() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public float getWeight() { + return weight_; + } + + private void initFields() { + fieldName_ = ""; + terms_ = java.util.Collections.emptyList();; + weight_ = 0F; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getFieldNameBytes()); + } + for (int i = 0; i < terms_.size(); i++) { + output.writeBytes(2, terms_.get(i)); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeFloat(3, weight_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getFieldNameBytes()); + } + { + int dataSize = 0; + for (int i = 0; i < terms_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(terms_.get(i)); + } + size += dataSize; + size += 1 * getTermsList().size(); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(3, weight_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.TermsQueryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_TermsQuery_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_TermsQuery_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + fieldName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + terms_ = java.util.Collections.emptyList();; + bitField0_ = (bitField0_ & ~0x00000002); + weight_ = 0F; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery build() { + com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery result = new com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.fieldName_ = fieldName_; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + terms_ = java.util.Collections.unmodifiableList(terms_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.terms_ = terms_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000002; + } + result.weight_ = weight_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery.getDefaultInstance()) return this; + if (other.hasFieldName()) { + setFieldName(other.getFieldName()); + } + if (!other.terms_.isEmpty()) { + if (terms_.isEmpty()) { + terms_ = other.terms_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureTermsIsMutable(); + terms_.addAll(other.terms_); + } + onChanged(); + } + if (other.hasWeight()) { + setWeight(other.getWeight()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + fieldName_ = input.readBytes(); + break; + } + case 18: { + ensureTermsIsMutable(); + terms_.add(input.readBytes()); + break; + } + case 29: { + bitField0_ |= 0x00000004; + weight_ = input.readFloat(); + break; + } + } + } + } + + private int bitField0_; + + // optional string field_name = 1; + private java.lang.Object fieldName_ = ""; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + fieldName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setFieldName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + return this; + } + public Builder clearFieldName() { + bitField0_ = (bitField0_ & ~0x00000001); + fieldName_ = getDefaultInstance().getFieldName(); + onChanged(); + return this; + } + void setFieldName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + } + + // repeated bytes terms = 2; + private java.util.List terms_ = java.util.Collections.emptyList();; + private void ensureTermsIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + terms_ = new java.util.ArrayList(terms_); + bitField0_ |= 0x00000002; + } + } + public java.util.List + getTermsList() { + return java.util.Collections.unmodifiableList(terms_); + } + public int getTermsCount() { + return terms_.size(); + } + public com.google.protobuf.ByteString getTerms(int index) { + return terms_.get(index); + } + public Builder setTerms( + int index, com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTermsIsMutable(); + terms_.set(index, value); + onChanged(); + return this; + } + public Builder addTerms(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTermsIsMutable(); + terms_.add(value); + onChanged(); + return this; + } + public Builder addAllTerms( + java.lang.Iterable values) { + ensureTermsIsMutable(); + super.addAll(values, terms_); + onChanged(); + return this; + } + public Builder clearTerms() { + terms_ = java.util.Collections.emptyList();; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + // optional float weight = 3; + private float weight_ ; + public boolean hasWeight() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public float getWeight() { + return weight_; + } + public Builder setWeight(float value) { + bitField0_ |= 0x00000004; + weight_ = value; + onChanged(); + return this; + } + public Builder clearWeight() { + bitField0_ = (bitField0_ & ~0x00000004); + weight_ = 0F; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.TermsQuery) + } + + static { + defaultInstance = new TermsQuery(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.TermsQuery) + } + + public interface RangeQueryOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string field_name = 1; + boolean hasFieldName(); + String getFieldName(); + + // optional bytes range_from = 2; + boolean hasRangeFrom(); + com.google.protobuf.ByteString getRangeFrom(); + + // optional bytes range_to = 3; + boolean hasRangeTo(); + com.google.protobuf.ByteString getRangeTo(); + + // optional bool include_lower = 4; + boolean hasIncludeLower(); + boolean getIncludeLower(); + + // optional bool include_upper = 5; + boolean hasIncludeUpper(); + boolean getIncludeUpper(); + } + public static final class RangeQuery extends + com.google.protobuf.GeneratedMessage + implements RangeQueryOrBuilder { + // Use RangeQuery.newBuilder() to construct. + private RangeQuery(Builder builder) { + super(builder); + } + private RangeQuery(boolean noInit) {} + + private static final RangeQuery defaultInstance; + public static RangeQuery getDefaultInstance() { + return defaultInstance; + } + + public RangeQuery getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_RangeQuery_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_RangeQuery_fieldAccessorTable; + } + + private int bitField0_; + // optional string field_name = 1; + public static final int FIELD_NAME_FIELD_NUMBER = 1; + private java.lang.Object fieldName_; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + fieldName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getFieldNameBytes() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + fieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional bytes range_from = 2; + public static final int RANGE_FROM_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString rangeFrom_; + public boolean hasRangeFrom() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getRangeFrom() { + return rangeFrom_; + } + + // optional bytes range_to = 3; + public static final int RANGE_TO_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString rangeTo_; + public boolean hasRangeTo() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.google.protobuf.ByteString getRangeTo() { + return rangeTo_; + } + + // optional bool include_lower = 4; + public static final int INCLUDE_LOWER_FIELD_NUMBER = 4; + private boolean includeLower_; + public boolean hasIncludeLower() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public boolean getIncludeLower() { + return includeLower_; + } + + // optional bool include_upper = 5; + public static final int INCLUDE_UPPER_FIELD_NUMBER = 5; + private boolean includeUpper_; + public boolean hasIncludeUpper() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public boolean getIncludeUpper() { + return includeUpper_; + } + + private void initFields() { + fieldName_ = ""; + rangeFrom_ = com.google.protobuf.ByteString.EMPTY; + rangeTo_ = com.google.protobuf.ByteString.EMPTY; + includeLower_ = false; + includeUpper_ = false; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getFieldNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, rangeFrom_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeBytes(3, rangeTo_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeBool(4, includeLower_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeBool(5, includeUpper_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getFieldNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, rangeFrom_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, rangeTo_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, includeLower_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(5, includeUpper_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.RangeQueryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_RangeQuery_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_RangeQuery_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + fieldName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + rangeFrom_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + rangeTo_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + includeLower_ = false; + bitField0_ = (bitField0_ & ~0x00000008); + includeUpper_ = false; + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery build() { + com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery result = new com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.fieldName_ = fieldName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.rangeFrom_ = rangeFrom_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.rangeTo_ = rangeTo_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.includeLower_ = includeLower_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + result.includeUpper_ = includeUpper_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery.getDefaultInstance()) return this; + if (other.hasFieldName()) { + setFieldName(other.getFieldName()); + } + if (other.hasRangeFrom()) { + setRangeFrom(other.getRangeFrom()); + } + if (other.hasRangeTo()) { + setRangeTo(other.getRangeTo()); + } + if (other.hasIncludeLower()) { + setIncludeLower(other.getIncludeLower()); + } + if (other.hasIncludeUpper()) { + setIncludeUpper(other.getIncludeUpper()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + fieldName_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + rangeFrom_ = input.readBytes(); + break; + } + case 26: { + bitField0_ |= 0x00000004; + rangeTo_ = input.readBytes(); + break; + } + case 32: { + bitField0_ |= 0x00000008; + includeLower_ = input.readBool(); + break; + } + case 40: { + bitField0_ |= 0x00000010; + includeUpper_ = input.readBool(); + break; + } + } + } + } + + private int bitField0_; + + // optional string field_name = 1; + private java.lang.Object fieldName_ = ""; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + fieldName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setFieldName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + return this; + } + public Builder clearFieldName() { + bitField0_ = (bitField0_ & ~0x00000001); + fieldName_ = getDefaultInstance().getFieldName(); + onChanged(); + return this; + } + void setFieldName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + } + + // optional bytes range_from = 2; + private com.google.protobuf.ByteString rangeFrom_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasRangeFrom() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getRangeFrom() { + return rangeFrom_; + } + public Builder setRangeFrom(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + rangeFrom_ = value; + onChanged(); + return this; + } + public Builder clearRangeFrom() { + bitField0_ = (bitField0_ & ~0x00000002); + rangeFrom_ = getDefaultInstance().getRangeFrom(); + onChanged(); + return this; + } + + // optional bytes range_to = 3; + private com.google.protobuf.ByteString rangeTo_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasRangeTo() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.google.protobuf.ByteString getRangeTo() { + return rangeTo_; + } + public Builder setRangeTo(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + rangeTo_ = value; + onChanged(); + return this; + } + public Builder clearRangeTo() { + bitField0_ = (bitField0_ & ~0x00000004); + rangeTo_ = getDefaultInstance().getRangeTo(); + onChanged(); + return this; + } + + // optional bool include_lower = 4; + private boolean includeLower_ ; + public boolean hasIncludeLower() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public boolean getIncludeLower() { + return includeLower_; + } + public Builder setIncludeLower(boolean value) { + bitField0_ |= 0x00000008; + includeLower_ = value; + onChanged(); + return this; + } + public Builder clearIncludeLower() { + bitField0_ = (bitField0_ & ~0x00000008); + includeLower_ = false; + onChanged(); + return this; + } + + // optional bool include_upper = 5; + private boolean includeUpper_ ; + public boolean hasIncludeUpper() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public boolean getIncludeUpper() { + return includeUpper_; + } + public Builder setIncludeUpper(boolean value) { + bitField0_ |= 0x00000010; + includeUpper_ = value; + onChanged(); + return this; + } + public Builder clearIncludeUpper() { + bitField0_ = (bitField0_ & ~0x00000010); + includeUpper_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.RangeQuery) + } + + static { + defaultInstance = new RangeQuery(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.RangeQuery) + } + + public interface PrefixQueryOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string field_name = 1; + boolean hasFieldName(); + String getFieldName(); + + // optional string prefix = 2; + boolean hasPrefix(); + String getPrefix(); + + // optional float weight = 3; + boolean hasWeight(); + float getWeight(); + } + public static final class PrefixQuery extends + com.google.protobuf.GeneratedMessage + implements PrefixQueryOrBuilder { + // Use PrefixQuery.newBuilder() to construct. + private PrefixQuery(Builder builder) { + super(builder); + } + private PrefixQuery(boolean noInit) {} + + private static final PrefixQuery defaultInstance; + public static PrefixQuery getDefaultInstance() { + return defaultInstance; + } + + public PrefixQuery getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_PrefixQuery_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_PrefixQuery_fieldAccessorTable; + } + + private int bitField0_; + // optional string field_name = 1; + public static final int FIELD_NAME_FIELD_NUMBER = 1; + private java.lang.Object fieldName_; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + fieldName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getFieldNameBytes() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + fieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional string prefix = 2; + public static final int PREFIX_FIELD_NUMBER = 2; + private java.lang.Object prefix_; + public boolean hasPrefix() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getPrefix() { + java.lang.Object ref = prefix_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + prefix_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getPrefixBytes() { + java.lang.Object ref = prefix_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + prefix_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional float weight = 3; + public static final int WEIGHT_FIELD_NUMBER = 3; + private float weight_; + public boolean hasWeight() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public float getWeight() { + return weight_; + } + + private void initFields() { + fieldName_ = ""; + prefix_ = ""; + weight_ = 0F; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getFieldNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getPrefixBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeFloat(3, weight_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getFieldNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getPrefixBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(3, weight_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQueryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_PrefixQuery_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_PrefixQuery_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + fieldName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + prefix_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + weight_ = 0F; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery build() { + com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery result = new com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.fieldName_ = fieldName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.prefix_ = prefix_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.weight_ = weight_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery.getDefaultInstance()) return this; + if (other.hasFieldName()) { + setFieldName(other.getFieldName()); + } + if (other.hasPrefix()) { + setPrefix(other.getPrefix()); + } + if (other.hasWeight()) { + setWeight(other.getWeight()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + fieldName_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + prefix_ = input.readBytes(); + break; + } + case 29: { + bitField0_ |= 0x00000004; + weight_ = input.readFloat(); + break; + } + } + } + } + + private int bitField0_; + + // optional string field_name = 1; + private java.lang.Object fieldName_ = ""; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + fieldName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setFieldName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + return this; + } + public Builder clearFieldName() { + bitField0_ = (bitField0_ & ~0x00000001); + fieldName_ = getDefaultInstance().getFieldName(); + onChanged(); + return this; + } + void setFieldName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + } + + // optional string prefix = 2; + private java.lang.Object prefix_ = ""; + public boolean hasPrefix() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getPrefix() { + java.lang.Object ref = prefix_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + prefix_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setPrefix(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + prefix_ = value; + onChanged(); + return this; + } + public Builder clearPrefix() { + bitField0_ = (bitField0_ & ~0x00000002); + prefix_ = getDefaultInstance().getPrefix(); + onChanged(); + return this; + } + void setPrefix(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000002; + prefix_ = value; + onChanged(); + } + + // optional float weight = 3; + private float weight_ ; + public boolean hasWeight() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public float getWeight() { + return weight_; + } + public Builder setWeight(float value) { + bitField0_ |= 0x00000004; + weight_ = value; + onChanged(); + return this; + } + public Builder clearWeight() { + bitField0_ = (bitField0_ & ~0x00000004); + weight_ = 0F; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.PrefixQuery) + } + + static { + defaultInstance = new PrefixQuery(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.PrefixQuery) + } + + public interface WildcardQueryOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string field_name = 1; + boolean hasFieldName(); + String getFieldName(); + + // optional string value = 2; + boolean hasValue(); + String getValue(); + + // optional float weight = 3; + boolean hasWeight(); + float getWeight(); + } + public static final class WildcardQuery extends + com.google.protobuf.GeneratedMessage + implements WildcardQueryOrBuilder { + // Use WildcardQuery.newBuilder() to construct. + private WildcardQuery(Builder builder) { + super(builder); + } + private WildcardQuery(boolean noInit) {} + + private static final WildcardQuery defaultInstance; + public static WildcardQuery getDefaultInstance() { + return defaultInstance; + } + + public WildcardQuery getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_WildcardQuery_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_WildcardQuery_fieldAccessorTable; + } + + private int bitField0_; + // optional string field_name = 1; + public static final int FIELD_NAME_FIELD_NUMBER = 1; + private java.lang.Object fieldName_; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + fieldName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getFieldNameBytes() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + fieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional string value = 2; + public static final int VALUE_FIELD_NUMBER = 2; + private java.lang.Object value_; + public boolean hasValue() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getValue() { + java.lang.Object ref = value_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + value_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional float weight = 3; + public static final int WEIGHT_FIELD_NUMBER = 3; + private float weight_; + public boolean hasWeight() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public float getWeight() { + return weight_; + } + + private void initFields() { + fieldName_ = ""; + value_ = ""; + weight_ = 0F; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getFieldNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getValueBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeFloat(3, weight_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getFieldNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getValueBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(3, weight_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQueryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_WildcardQuery_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_WildcardQuery_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + fieldName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + value_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + weight_ = 0F; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery build() { + com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery result = new com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.fieldName_ = fieldName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.value_ = value_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.weight_ = weight_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery.getDefaultInstance()) return this; + if (other.hasFieldName()) { + setFieldName(other.getFieldName()); + } + if (other.hasValue()) { + setValue(other.getValue()); + } + if (other.hasWeight()) { + setWeight(other.getWeight()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + fieldName_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + value_ = input.readBytes(); + break; + } + case 29: { + bitField0_ |= 0x00000004; + weight_ = input.readFloat(); + break; + } + } + } + } + + private int bitField0_; + + // optional string field_name = 1; + private java.lang.Object fieldName_ = ""; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + fieldName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setFieldName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + return this; + } + public Builder clearFieldName() { + bitField0_ = (bitField0_ & ~0x00000001); + fieldName_ = getDefaultInstance().getFieldName(); + onChanged(); + return this; + } + void setFieldName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + } + + // optional string value = 2; + private java.lang.Object value_ = ""; + public boolean hasValue() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + value_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setValue(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + value_ = value; + onChanged(); + return this; + } + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000002); + value_ = getDefaultInstance().getValue(); + onChanged(); + return this; + } + void setValue(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000002; + value_ = value; + onChanged(); + } + + // optional float weight = 3; + private float weight_ ; + public boolean hasWeight() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public float getWeight() { + return weight_; + } + public Builder setWeight(float value) { + bitField0_ |= 0x00000004; + weight_ = value; + onChanged(); + return this; + } + public Builder clearWeight() { + bitField0_ = (bitField0_ & ~0x00000004); + weight_ = 0F; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.WildcardQuery) + } + + static { + defaultInstance = new WildcardQuery(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.WildcardQuery) + } + + public interface BoolQueryOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // repeated .com.alicloud.openservices.tablestore.core.protocol.Query must_queries = 1; + java.util.List + getMustQueriesList(); + com.alicloud.openservices.tablestore.core.protocol.Search.Query getMustQueries(int index); + int getMustQueriesCount(); + java.util.List + getMustQueriesOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getMustQueriesOrBuilder( + int index); + + // repeated .com.alicloud.openservices.tablestore.core.protocol.Query must_not_queries = 2; + java.util.List + getMustNotQueriesList(); + com.alicloud.openservices.tablestore.core.protocol.Search.Query getMustNotQueries(int index); + int getMustNotQueriesCount(); + java.util.List + getMustNotQueriesOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getMustNotQueriesOrBuilder( + int index); + + // repeated .com.alicloud.openservices.tablestore.core.protocol.Query filter_queries = 3; + java.util.List + getFilterQueriesList(); + com.alicloud.openservices.tablestore.core.protocol.Search.Query getFilterQueries(int index); + int getFilterQueriesCount(); + java.util.List + getFilterQueriesOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getFilterQueriesOrBuilder( + int index); + + // repeated .com.alicloud.openservices.tablestore.core.protocol.Query should_queries = 4; + java.util.List + getShouldQueriesList(); + com.alicloud.openservices.tablestore.core.protocol.Search.Query getShouldQueries(int index); + int getShouldQueriesCount(); + java.util.List + getShouldQueriesOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getShouldQueriesOrBuilder( + int index); + + // optional int32 minimum_should_match = 5; + boolean hasMinimumShouldMatch(); + int getMinimumShouldMatch(); + } + public static final class BoolQuery extends + com.google.protobuf.GeneratedMessage + implements BoolQueryOrBuilder { + // Use BoolQuery.newBuilder() to construct. + private BoolQuery(Builder builder) { + super(builder); + } + private BoolQuery(boolean noInit) {} + + private static final BoolQuery defaultInstance; + public static BoolQuery getDefaultInstance() { + return defaultInstance; + } + + public BoolQuery getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_BoolQuery_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_BoolQuery_fieldAccessorTable; + } + + private int bitField0_; + // repeated .com.alicloud.openservices.tablestore.core.protocol.Query must_queries = 1; + public static final int MUST_QUERIES_FIELD_NUMBER = 1; + private java.util.List mustQueries_; + public java.util.List getMustQueriesList() { + return mustQueries_; + } + public java.util.List + getMustQueriesOrBuilderList() { + return mustQueries_; + } + public int getMustQueriesCount() { + return mustQueries_.size(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Query getMustQueries(int index) { + return mustQueries_.get(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getMustQueriesOrBuilder( + int index) { + return mustQueries_.get(index); + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.Query must_not_queries = 2; + public static final int MUST_NOT_QUERIES_FIELD_NUMBER = 2; + private java.util.List mustNotQueries_; + public java.util.List getMustNotQueriesList() { + return mustNotQueries_; + } + public java.util.List + getMustNotQueriesOrBuilderList() { + return mustNotQueries_; + } + public int getMustNotQueriesCount() { + return mustNotQueries_.size(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Query getMustNotQueries(int index) { + return mustNotQueries_.get(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getMustNotQueriesOrBuilder( + int index) { + return mustNotQueries_.get(index); + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.Query filter_queries = 3; + public static final int FILTER_QUERIES_FIELD_NUMBER = 3; + private java.util.List filterQueries_; + public java.util.List getFilterQueriesList() { + return filterQueries_; + } + public java.util.List + getFilterQueriesOrBuilderList() { + return filterQueries_; + } + public int getFilterQueriesCount() { + return filterQueries_.size(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Query getFilterQueries(int index) { + return filterQueries_.get(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getFilterQueriesOrBuilder( + int index) { + return filterQueries_.get(index); + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.Query should_queries = 4; + public static final int SHOULD_QUERIES_FIELD_NUMBER = 4; + private java.util.List shouldQueries_; + public java.util.List getShouldQueriesList() { + return shouldQueries_; + } + public java.util.List + getShouldQueriesOrBuilderList() { + return shouldQueries_; + } + public int getShouldQueriesCount() { + return shouldQueries_.size(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Query getShouldQueries(int index) { + return shouldQueries_.get(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getShouldQueriesOrBuilder( + int index) { + return shouldQueries_.get(index); + } + + // optional int32 minimum_should_match = 5; + public static final int MINIMUM_SHOULD_MATCH_FIELD_NUMBER = 5; + private int minimumShouldMatch_; + public boolean hasMinimumShouldMatch() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public int getMinimumShouldMatch() { + return minimumShouldMatch_; + } + + private void initFields() { + mustQueries_ = java.util.Collections.emptyList(); + mustNotQueries_ = java.util.Collections.emptyList(); + filterQueries_ = java.util.Collections.emptyList(); + shouldQueries_ = java.util.Collections.emptyList(); + minimumShouldMatch_ = 0; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < mustQueries_.size(); i++) { + output.writeMessage(1, mustQueries_.get(i)); + } + for (int i = 0; i < mustNotQueries_.size(); i++) { + output.writeMessage(2, mustNotQueries_.get(i)); + } + for (int i = 0; i < filterQueries_.size(); i++) { + output.writeMessage(3, filterQueries_.get(i)); + } + for (int i = 0; i < shouldQueries_.size(); i++) { + output.writeMessage(4, shouldQueries_.get(i)); + } + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeInt32(5, minimumShouldMatch_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < mustQueries_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, mustQueries_.get(i)); + } + for (int i = 0; i < mustNotQueries_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, mustNotQueries_.get(i)); + } + for (int i = 0; i < filterQueries_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, filterQueries_.get(i)); + } + for (int i = 0; i < shouldQueries_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, shouldQueries_.get(i)); + } + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(5, minimumShouldMatch_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.BoolQueryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_BoolQuery_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_BoolQuery_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getMustQueriesFieldBuilder(); + getMustNotQueriesFieldBuilder(); + getFilterQueriesFieldBuilder(); + getShouldQueriesFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (mustQueriesBuilder_ == null) { + mustQueries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + mustQueriesBuilder_.clear(); + } + if (mustNotQueriesBuilder_ == null) { + mustNotQueries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + mustNotQueriesBuilder_.clear(); + } + if (filterQueriesBuilder_ == null) { + filterQueries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + filterQueriesBuilder_.clear(); + } + if (shouldQueriesBuilder_ == null) { + shouldQueries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + shouldQueriesBuilder_.clear(); + } + minimumShouldMatch_ = 0; + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery build() { + com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery result = new com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (mustQueriesBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + mustQueries_ = java.util.Collections.unmodifiableList(mustQueries_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.mustQueries_ = mustQueries_; + } else { + result.mustQueries_ = mustQueriesBuilder_.build(); + } + if (mustNotQueriesBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { + mustNotQueries_ = java.util.Collections.unmodifiableList(mustNotQueries_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.mustNotQueries_ = mustNotQueries_; + } else { + result.mustNotQueries_ = mustNotQueriesBuilder_.build(); + } + if (filterQueriesBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004)) { + filterQueries_ = java.util.Collections.unmodifiableList(filterQueries_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.filterQueries_ = filterQueries_; + } else { + result.filterQueries_ = filterQueriesBuilder_.build(); + } + if (shouldQueriesBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008)) { + shouldQueries_ = java.util.Collections.unmodifiableList(shouldQueries_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.shouldQueries_ = shouldQueries_; + } else { + result.shouldQueries_ = shouldQueriesBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000001; + } + result.minimumShouldMatch_ = minimumShouldMatch_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery.getDefaultInstance()) return this; + if (mustQueriesBuilder_ == null) { + if (!other.mustQueries_.isEmpty()) { + if (mustQueries_.isEmpty()) { + mustQueries_ = other.mustQueries_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureMustQueriesIsMutable(); + mustQueries_.addAll(other.mustQueries_); + } + onChanged(); + } + } else { + if (!other.mustQueries_.isEmpty()) { + if (mustQueriesBuilder_.isEmpty()) { + mustQueriesBuilder_.dispose(); + mustQueriesBuilder_ = null; + mustQueries_ = other.mustQueries_; + bitField0_ = (bitField0_ & ~0x00000001); + mustQueriesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getMustQueriesFieldBuilder() : null; + } else { + mustQueriesBuilder_.addAllMessages(other.mustQueries_); + } + } + } + if (mustNotQueriesBuilder_ == null) { + if (!other.mustNotQueries_.isEmpty()) { + if (mustNotQueries_.isEmpty()) { + mustNotQueries_ = other.mustNotQueries_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureMustNotQueriesIsMutable(); + mustNotQueries_.addAll(other.mustNotQueries_); + } + onChanged(); + } + } else { + if (!other.mustNotQueries_.isEmpty()) { + if (mustNotQueriesBuilder_.isEmpty()) { + mustNotQueriesBuilder_.dispose(); + mustNotQueriesBuilder_ = null; + mustNotQueries_ = other.mustNotQueries_; + bitField0_ = (bitField0_ & ~0x00000002); + mustNotQueriesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getMustNotQueriesFieldBuilder() : null; + } else { + mustNotQueriesBuilder_.addAllMessages(other.mustNotQueries_); + } + } + } + if (filterQueriesBuilder_ == null) { + if (!other.filterQueries_.isEmpty()) { + if (filterQueries_.isEmpty()) { + filterQueries_ = other.filterQueries_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureFilterQueriesIsMutable(); + filterQueries_.addAll(other.filterQueries_); + } + onChanged(); + } + } else { + if (!other.filterQueries_.isEmpty()) { + if (filterQueriesBuilder_.isEmpty()) { + filterQueriesBuilder_.dispose(); + filterQueriesBuilder_ = null; + filterQueries_ = other.filterQueries_; + bitField0_ = (bitField0_ & ~0x00000004); + filterQueriesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getFilterQueriesFieldBuilder() : null; + } else { + filterQueriesBuilder_.addAllMessages(other.filterQueries_); + } + } + } + if (shouldQueriesBuilder_ == null) { + if (!other.shouldQueries_.isEmpty()) { + if (shouldQueries_.isEmpty()) { + shouldQueries_ = other.shouldQueries_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureShouldQueriesIsMutable(); + shouldQueries_.addAll(other.shouldQueries_); + } + onChanged(); + } + } else { + if (!other.shouldQueries_.isEmpty()) { + if (shouldQueriesBuilder_.isEmpty()) { + shouldQueriesBuilder_.dispose(); + shouldQueriesBuilder_ = null; + shouldQueries_ = other.shouldQueries_; + bitField0_ = (bitField0_ & ~0x00000008); + shouldQueriesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getShouldQueriesFieldBuilder() : null; + } else { + shouldQueriesBuilder_.addAllMessages(other.shouldQueries_); + } + } + } + if (other.hasMinimumShouldMatch()) { + setMinimumShouldMatch(other.getMinimumShouldMatch()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.Query.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addMustQueries(subBuilder.buildPartial()); + break; + } + case 18: { + com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.Query.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addMustNotQueries(subBuilder.buildPartial()); + break; + } + case 26: { + com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.Query.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addFilterQueries(subBuilder.buildPartial()); + break; + } + case 34: { + com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.Query.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addShouldQueries(subBuilder.buildPartial()); + break; + } + case 40: { + bitField0_ |= 0x00000010; + minimumShouldMatch_ = input.readInt32(); + break; + } + } + } + } + + private int bitField0_; + + // repeated .com.alicloud.openservices.tablestore.core.protocol.Query must_queries = 1; + private java.util.List mustQueries_ = + java.util.Collections.emptyList(); + private void ensureMustQueriesIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + mustQueries_ = new java.util.ArrayList(mustQueries_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder> mustQueriesBuilder_; + + public java.util.List getMustQueriesList() { + if (mustQueriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(mustQueries_); + } else { + return mustQueriesBuilder_.getMessageList(); + } + } + public int getMustQueriesCount() { + if (mustQueriesBuilder_ == null) { + return mustQueries_.size(); + } else { + return mustQueriesBuilder_.getCount(); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Query getMustQueries(int index) { + if (mustQueriesBuilder_ == null) { + return mustQueries_.get(index); + } else { + return mustQueriesBuilder_.getMessage(index); + } + } + public Builder setMustQueries( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { + if (mustQueriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMustQueriesIsMutable(); + mustQueries_.set(index, value); + onChanged(); + } else { + mustQueriesBuilder_.setMessage(index, value); + } + return this; + } + public Builder setMustQueries( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder builderForValue) { + if (mustQueriesBuilder_ == null) { + ensureMustQueriesIsMutable(); + mustQueries_.set(index, builderForValue.build()); + onChanged(); + } else { + mustQueriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + public Builder addMustQueries(com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { + if (mustQueriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMustQueriesIsMutable(); + mustQueries_.add(value); + onChanged(); + } else { + mustQueriesBuilder_.addMessage(value); + } + return this; + } + public Builder addMustQueries( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { + if (mustQueriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMustQueriesIsMutable(); + mustQueries_.add(index, value); + onChanged(); + } else { + mustQueriesBuilder_.addMessage(index, value); + } + return this; + } + public Builder addMustQueries( + com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder builderForValue) { + if (mustQueriesBuilder_ == null) { + ensureMustQueriesIsMutable(); + mustQueries_.add(builderForValue.build()); + onChanged(); + } else { + mustQueriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + public Builder addMustQueries( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder builderForValue) { + if (mustQueriesBuilder_ == null) { + ensureMustQueriesIsMutable(); + mustQueries_.add(index, builderForValue.build()); + onChanged(); + } else { + mustQueriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAllMustQueries( + java.lang.Iterable values) { + if (mustQueriesBuilder_ == null) { + ensureMustQueriesIsMutable(); + super.addAll(values, mustQueries_); + onChanged(); + } else { + mustQueriesBuilder_.addAllMessages(values); + } + return this; + } + public Builder clearMustQueries() { + if (mustQueriesBuilder_ == null) { + mustQueries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + mustQueriesBuilder_.clear(); + } + return this; + } + public Builder removeMustQueries(int index) { + if (mustQueriesBuilder_ == null) { + ensureMustQueriesIsMutable(); + mustQueries_.remove(index); + onChanged(); + } else { + mustQueriesBuilder_.remove(index); + } + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder getMustQueriesBuilder( + int index) { + return getMustQueriesFieldBuilder().getBuilder(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getMustQueriesOrBuilder( + int index) { + if (mustQueriesBuilder_ == null) { + return mustQueries_.get(index); } else { + return mustQueriesBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getMustQueriesOrBuilderList() { + if (mustQueriesBuilder_ != null) { + return mustQueriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(mustQueries_); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder addMustQueriesBuilder() { + return getMustQueriesFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance()); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder addMustQueriesBuilder( + int index) { + return getMustQueriesFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance()); + } + public java.util.List + getMustQueriesBuilderList() { + return getMustQueriesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder> + getMustQueriesFieldBuilder() { + if (mustQueriesBuilder_ == null) { + mustQueriesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder>( + mustQueries_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + mustQueries_ = null; + } + return mustQueriesBuilder_; + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.Query must_not_queries = 2; + private java.util.List mustNotQueries_ = + java.util.Collections.emptyList(); + private void ensureMustNotQueriesIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + mustNotQueries_ = new java.util.ArrayList(mustNotQueries_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder> mustNotQueriesBuilder_; + + public java.util.List getMustNotQueriesList() { + if (mustNotQueriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(mustNotQueries_); + } else { + return mustNotQueriesBuilder_.getMessageList(); + } + } + public int getMustNotQueriesCount() { + if (mustNotQueriesBuilder_ == null) { + return mustNotQueries_.size(); + } else { + return mustNotQueriesBuilder_.getCount(); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Query getMustNotQueries(int index) { + if (mustNotQueriesBuilder_ == null) { + return mustNotQueries_.get(index); + } else { + return mustNotQueriesBuilder_.getMessage(index); + } + } + public Builder setMustNotQueries( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { + if (mustNotQueriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMustNotQueriesIsMutable(); + mustNotQueries_.set(index, value); + onChanged(); + } else { + mustNotQueriesBuilder_.setMessage(index, value); + } + return this; + } + public Builder setMustNotQueries( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder builderForValue) { + if (mustNotQueriesBuilder_ == null) { + ensureMustNotQueriesIsMutable(); + mustNotQueries_.set(index, builderForValue.build()); + onChanged(); + } else { + mustNotQueriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + public Builder addMustNotQueries(com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { + if (mustNotQueriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMustNotQueriesIsMutable(); + mustNotQueries_.add(value); + onChanged(); + } else { + mustNotQueriesBuilder_.addMessage(value); + } + return this; + } + public Builder addMustNotQueries( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { + if (mustNotQueriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMustNotQueriesIsMutable(); + mustNotQueries_.add(index, value); + onChanged(); + } else { + mustNotQueriesBuilder_.addMessage(index, value); + } + return this; + } + public Builder addMustNotQueries( + com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder builderForValue) { + if (mustNotQueriesBuilder_ == null) { + ensureMustNotQueriesIsMutable(); + mustNotQueries_.add(builderForValue.build()); + onChanged(); + } else { + mustNotQueriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + public Builder addMustNotQueries( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder builderForValue) { + if (mustNotQueriesBuilder_ == null) { + ensureMustNotQueriesIsMutable(); + mustNotQueries_.add(index, builderForValue.build()); + onChanged(); + } else { + mustNotQueriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAllMustNotQueries( + java.lang.Iterable values) { + if (mustNotQueriesBuilder_ == null) { + ensureMustNotQueriesIsMutable(); + super.addAll(values, mustNotQueries_); + onChanged(); + } else { + mustNotQueriesBuilder_.addAllMessages(values); + } + return this; + } + public Builder clearMustNotQueries() { + if (mustNotQueriesBuilder_ == null) { + mustNotQueries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + mustNotQueriesBuilder_.clear(); + } + return this; + } + public Builder removeMustNotQueries(int index) { + if (mustNotQueriesBuilder_ == null) { + ensureMustNotQueriesIsMutable(); + mustNotQueries_.remove(index); + onChanged(); + } else { + mustNotQueriesBuilder_.remove(index); + } + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder getMustNotQueriesBuilder( + int index) { + return getMustNotQueriesFieldBuilder().getBuilder(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getMustNotQueriesOrBuilder( + int index) { + if (mustNotQueriesBuilder_ == null) { + return mustNotQueries_.get(index); } else { + return mustNotQueriesBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getMustNotQueriesOrBuilderList() { + if (mustNotQueriesBuilder_ != null) { + return mustNotQueriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(mustNotQueries_); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder addMustNotQueriesBuilder() { + return getMustNotQueriesFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance()); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder addMustNotQueriesBuilder( + int index) { + return getMustNotQueriesFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance()); + } + public java.util.List + getMustNotQueriesBuilderList() { + return getMustNotQueriesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder> + getMustNotQueriesFieldBuilder() { + if (mustNotQueriesBuilder_ == null) { + mustNotQueriesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder>( + mustNotQueries_, + ((bitField0_ & 0x00000002) == 0x00000002), + getParentForChildren(), + isClean()); + mustNotQueries_ = null; + } + return mustNotQueriesBuilder_; + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.Query filter_queries = 3; + private java.util.List filterQueries_ = + java.util.Collections.emptyList(); + private void ensureFilterQueriesIsMutable() { + if (!((bitField0_ & 0x00000004) == 0x00000004)) { + filterQueries_ = new java.util.ArrayList(filterQueries_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder> filterQueriesBuilder_; + + public java.util.List getFilterQueriesList() { + if (filterQueriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(filterQueries_); + } else { + return filterQueriesBuilder_.getMessageList(); + } + } + public int getFilterQueriesCount() { + if (filterQueriesBuilder_ == null) { + return filterQueries_.size(); + } else { + return filterQueriesBuilder_.getCount(); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Query getFilterQueries(int index) { + if (filterQueriesBuilder_ == null) { + return filterQueries_.get(index); + } else { + return filterQueriesBuilder_.getMessage(index); + } + } + public Builder setFilterQueries( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { + if (filterQueriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFilterQueriesIsMutable(); + filterQueries_.set(index, value); + onChanged(); + } else { + filterQueriesBuilder_.setMessage(index, value); + } + return this; + } + public Builder setFilterQueries( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder builderForValue) { + if (filterQueriesBuilder_ == null) { + ensureFilterQueriesIsMutable(); + filterQueries_.set(index, builderForValue.build()); + onChanged(); + } else { + filterQueriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + public Builder addFilterQueries(com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { + if (filterQueriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFilterQueriesIsMutable(); + filterQueries_.add(value); + onChanged(); + } else { + filterQueriesBuilder_.addMessage(value); + } + return this; + } + public Builder addFilterQueries( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { + if (filterQueriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFilterQueriesIsMutable(); + filterQueries_.add(index, value); + onChanged(); + } else { + filterQueriesBuilder_.addMessage(index, value); + } + return this; + } + public Builder addFilterQueries( + com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder builderForValue) { + if (filterQueriesBuilder_ == null) { + ensureFilterQueriesIsMutable(); + filterQueries_.add(builderForValue.build()); + onChanged(); + } else { + filterQueriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + public Builder addFilterQueries( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder builderForValue) { + if (filterQueriesBuilder_ == null) { + ensureFilterQueriesIsMutable(); + filterQueries_.add(index, builderForValue.build()); + onChanged(); + } else { + filterQueriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAllFilterQueries( + java.lang.Iterable values) { + if (filterQueriesBuilder_ == null) { + ensureFilterQueriesIsMutable(); + super.addAll(values, filterQueries_); + onChanged(); + } else { + filterQueriesBuilder_.addAllMessages(values); + } + return this; + } + public Builder clearFilterQueries() { + if (filterQueriesBuilder_ == null) { + filterQueries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + filterQueriesBuilder_.clear(); + } + return this; + } + public Builder removeFilterQueries(int index) { + if (filterQueriesBuilder_ == null) { + ensureFilterQueriesIsMutable(); + filterQueries_.remove(index); + onChanged(); + } else { + filterQueriesBuilder_.remove(index); + } + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder getFilterQueriesBuilder( + int index) { + return getFilterQueriesFieldBuilder().getBuilder(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getFilterQueriesOrBuilder( + int index) { + if (filterQueriesBuilder_ == null) { + return filterQueries_.get(index); } else { + return filterQueriesBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getFilterQueriesOrBuilderList() { + if (filterQueriesBuilder_ != null) { + return filterQueriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(filterQueries_); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder addFilterQueriesBuilder() { + return getFilterQueriesFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance()); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder addFilterQueriesBuilder( + int index) { + return getFilterQueriesFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance()); + } + public java.util.List + getFilterQueriesBuilderList() { + return getFilterQueriesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder> + getFilterQueriesFieldBuilder() { + if (filterQueriesBuilder_ == null) { + filterQueriesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder>( + filterQueries_, + ((bitField0_ & 0x00000004) == 0x00000004), + getParentForChildren(), + isClean()); + filterQueries_ = null; + } + return filterQueriesBuilder_; + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.Query should_queries = 4; + private java.util.List shouldQueries_ = + java.util.Collections.emptyList(); + private void ensureShouldQueriesIsMutable() { + if (!((bitField0_ & 0x00000008) == 0x00000008)) { + shouldQueries_ = new java.util.ArrayList(shouldQueries_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder> shouldQueriesBuilder_; + + public java.util.List getShouldQueriesList() { + if (shouldQueriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(shouldQueries_); + } else { + return shouldQueriesBuilder_.getMessageList(); + } + } + public int getShouldQueriesCount() { + if (shouldQueriesBuilder_ == null) { + return shouldQueries_.size(); + } else { + return shouldQueriesBuilder_.getCount(); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Query getShouldQueries(int index) { + if (shouldQueriesBuilder_ == null) { + return shouldQueries_.get(index); + } else { + return shouldQueriesBuilder_.getMessage(index); + } + } + public Builder setShouldQueries( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { + if (shouldQueriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureShouldQueriesIsMutable(); + shouldQueries_.set(index, value); + onChanged(); + } else { + shouldQueriesBuilder_.setMessage(index, value); + } + return this; + } + public Builder setShouldQueries( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder builderForValue) { + if (shouldQueriesBuilder_ == null) { + ensureShouldQueriesIsMutable(); + shouldQueries_.set(index, builderForValue.build()); + onChanged(); + } else { + shouldQueriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + public Builder addShouldQueries(com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { + if (shouldQueriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureShouldQueriesIsMutable(); + shouldQueries_.add(value); + onChanged(); + } else { + shouldQueriesBuilder_.addMessage(value); + } + return this; + } + public Builder addShouldQueries( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { + if (shouldQueriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureShouldQueriesIsMutable(); + shouldQueries_.add(index, value); + onChanged(); + } else { + shouldQueriesBuilder_.addMessage(index, value); + } + return this; + } + public Builder addShouldQueries( + com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder builderForValue) { + if (shouldQueriesBuilder_ == null) { + ensureShouldQueriesIsMutable(); + shouldQueries_.add(builderForValue.build()); + onChanged(); + } else { + shouldQueriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + public Builder addShouldQueries( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder builderForValue) { + if (shouldQueriesBuilder_ == null) { + ensureShouldQueriesIsMutable(); + shouldQueries_.add(index, builderForValue.build()); + onChanged(); + } else { + shouldQueriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAllShouldQueries( + java.lang.Iterable values) { + if (shouldQueriesBuilder_ == null) { + ensureShouldQueriesIsMutable(); + super.addAll(values, shouldQueries_); + onChanged(); + } else { + shouldQueriesBuilder_.addAllMessages(values); + } + return this; + } + public Builder clearShouldQueries() { + if (shouldQueriesBuilder_ == null) { + shouldQueries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + shouldQueriesBuilder_.clear(); + } + return this; + } + public Builder removeShouldQueries(int index) { + if (shouldQueriesBuilder_ == null) { + ensureShouldQueriesIsMutable(); + shouldQueries_.remove(index); + onChanged(); + } else { + shouldQueriesBuilder_.remove(index); + } + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder getShouldQueriesBuilder( + int index) { + return getShouldQueriesFieldBuilder().getBuilder(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getShouldQueriesOrBuilder( + int index) { + if (shouldQueriesBuilder_ == null) { + return shouldQueries_.get(index); } else { + return shouldQueriesBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getShouldQueriesOrBuilderList() { + if (shouldQueriesBuilder_ != null) { + return shouldQueriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(shouldQueries_); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder addShouldQueriesBuilder() { + return getShouldQueriesFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance()); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder addShouldQueriesBuilder( + int index) { + return getShouldQueriesFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance()); + } + public java.util.List + getShouldQueriesBuilderList() { + return getShouldQueriesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder> + getShouldQueriesFieldBuilder() { + if (shouldQueriesBuilder_ == null) { + shouldQueriesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder>( + shouldQueries_, + ((bitField0_ & 0x00000008) == 0x00000008), + getParentForChildren(), + isClean()); + shouldQueries_ = null; + } + return shouldQueriesBuilder_; + } + + // optional int32 minimum_should_match = 5; + private int minimumShouldMatch_ ; + public boolean hasMinimumShouldMatch() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public int getMinimumShouldMatch() { + return minimumShouldMatch_; + } + public Builder setMinimumShouldMatch(int value) { + bitField0_ |= 0x00000010; + minimumShouldMatch_ = value; + onChanged(); + return this; + } + public Builder clearMinimumShouldMatch() { + bitField0_ = (bitField0_ & ~0x00000010); + minimumShouldMatch_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.BoolQuery) + } + + static { + defaultInstance = new BoolQuery(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.BoolQuery) + } + + public interface ConstScoreQueryOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional .com.alicloud.openservices.tablestore.core.protocol.Query filter = 1; + boolean hasFilter(); + com.alicloud.openservices.tablestore.core.protocol.Search.Query getFilter(); + com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getFilterOrBuilder(); + } + public static final class ConstScoreQuery extends + com.google.protobuf.GeneratedMessage + implements ConstScoreQueryOrBuilder { + // Use ConstScoreQuery.newBuilder() to construct. + private ConstScoreQuery(Builder builder) { + super(builder); + } + private ConstScoreQuery(boolean noInit) {} + + private static final ConstScoreQuery defaultInstance; + public static ConstScoreQuery getDefaultInstance() { + return defaultInstance; + } + + public ConstScoreQuery getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ConstScoreQuery_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ConstScoreQuery_fieldAccessorTable; + } + + private int bitField0_; + // optional .com.alicloud.openservices.tablestore.core.protocol.Query filter = 1; + public static final int FILTER_FIELD_NUMBER = 1; + private com.alicloud.openservices.tablestore.core.protocol.Search.Query filter_; + public boolean hasFilter() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Query getFilter() { + return filter_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getFilterOrBuilder() { + return filter_; + } + + private void initFields() { + filter_ = com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(1, filter_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, filter_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQueryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ConstScoreQuery_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ConstScoreQuery_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getFilterFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (filterBuilder_ == null) { + filter_ = com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance(); + } else { + filterBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery build() { + com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery result = new com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + if (filterBuilder_ == null) { + result.filter_ = filter_; + } else { + result.filter_ = filterBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery.getDefaultInstance()) return this; + if (other.hasFilter()) { + mergeFilter(other.getFilter()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.Query.newBuilder(); + if (hasFilter()) { + subBuilder.mergeFrom(getFilter()); + } + input.readMessage(subBuilder, extensionRegistry); + setFilter(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // optional .com.alicloud.openservices.tablestore.core.protocol.Query filter = 1; + private com.alicloud.openservices.tablestore.core.protocol.Search.Query filter_ = com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder> filterBuilder_; + public boolean hasFilter() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Query getFilter() { + if (filterBuilder_ == null) { + return filter_; + } else { + return filterBuilder_.getMessage(); + } + } + public Builder setFilter(com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { + if (filterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + onChanged(); + } else { + filterBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder setFilter( + com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder builderForValue) { + if (filterBuilder_ == null) { + filter_ = builderForValue.build(); + onChanged(); + } else { + filterBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder mergeFilter(com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { + if (filterBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001) && + filter_ != com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance()) { + filter_ = + com.alicloud.openservices.tablestore.core.protocol.Search.Query.newBuilder(filter_).mergeFrom(value).buildPartial(); + } else { + filter_ = value; + } + onChanged(); + } else { + filterBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder clearFilter() { + if (filterBuilder_ == null) { + filter_ = com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance(); + onChanged(); + } else { + filterBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder getFilterBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getFilterFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getFilterOrBuilder() { + if (filterBuilder_ != null) { + return filterBuilder_.getMessageOrBuilder(); + } else { + return filter_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder> + getFilterFieldBuilder() { + if (filterBuilder_ == null) { + filterBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder>( + filter_, + getParentForChildren(), + isClean()); + filter_ = null; + } + return filterBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.ConstScoreQuery) + } + + static { + defaultInstance = new ConstScoreQuery(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.ConstScoreQuery) + } + + public interface FieldValueFactorOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string field_name = 1; + boolean hasFieldName(); + String getFieldName(); + } + public static final class FieldValueFactor extends + com.google.protobuf.GeneratedMessage + implements FieldValueFactorOrBuilder { + // Use FieldValueFactor.newBuilder() to construct. + private FieldValueFactor(Builder builder) { + super(builder); + } + private FieldValueFactor(boolean noInit) {} + + private static final FieldValueFactor defaultInstance; + public static FieldValueFactor getDefaultInstance() { + return defaultInstance; + } + + public FieldValueFactor getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_FieldValueFactor_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_FieldValueFactor_fieldAccessorTable; + } + + private int bitField0_; + // optional string field_name = 1; + public static final int FIELD_NAME_FIELD_NUMBER = 1; + private java.lang.Object fieldName_; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + fieldName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getFieldNameBytes() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + fieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + fieldName_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getFieldNameBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getFieldNameBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_FieldValueFactor_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_FieldValueFactor_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + fieldName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor build() { + com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor result = new com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.fieldName_ = fieldName_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor.getDefaultInstance()) return this; + if (other.hasFieldName()) { + setFieldName(other.getFieldName()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + fieldName_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // optional string field_name = 1; + private java.lang.Object fieldName_ = ""; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + fieldName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setFieldName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + return this; + } + public Builder clearFieldName() { + bitField0_ = (bitField0_ & ~0x00000001); + fieldName_ = getDefaultInstance().getFieldName(); + onChanged(); + return this; + } + void setFieldName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.FieldValueFactor) + } + + static { + defaultInstance = new FieldValueFactor(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.FieldValueFactor) + } + + public interface FunctionScoreQueryOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional .com.alicloud.openservices.tablestore.core.protocol.Query query = 1; + boolean hasQuery(); + com.alicloud.openservices.tablestore.core.protocol.Search.Query getQuery(); + com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getQueryOrBuilder(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.FieldValueFactor field_value_factor = 2; + boolean hasFieldValueFactor(); + com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor getFieldValueFactor(); + com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactorOrBuilder getFieldValueFactorOrBuilder(); + } + public static final class FunctionScoreQuery extends + com.google.protobuf.GeneratedMessage + implements FunctionScoreQueryOrBuilder { + // Use FunctionScoreQuery.newBuilder() to construct. + private FunctionScoreQuery(Builder builder) { + super(builder); + } + private FunctionScoreQuery(boolean noInit) {} + + private static final FunctionScoreQuery defaultInstance; + public static FunctionScoreQuery getDefaultInstance() { + return defaultInstance; + } + + public FunctionScoreQuery getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_FunctionScoreQuery_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_FunctionScoreQuery_fieldAccessorTable; + } + + private int bitField0_; + // optional .com.alicloud.openservices.tablestore.core.protocol.Query query = 1; + public static final int QUERY_FIELD_NUMBER = 1; + private com.alicloud.openservices.tablestore.core.protocol.Search.Query query_; + public boolean hasQuery() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Query getQuery() { + return query_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getQueryOrBuilder() { + return query_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.FieldValueFactor field_value_factor = 2; + public static final int FIELD_VALUE_FACTOR_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor fieldValueFactor_; + public boolean hasFieldValueFactor() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor getFieldValueFactor() { + return fieldValueFactor_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactorOrBuilder getFieldValueFactorOrBuilder() { + return fieldValueFactor_; + } + + private void initFields() { + query_ = com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance(); + fieldValueFactor_ = com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(1, query_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeMessage(2, fieldValueFactor_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, query_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, fieldValueFactor_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQueryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_FunctionScoreQuery_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_FunctionScoreQuery_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getQueryFieldBuilder(); + getFieldValueFactorFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (queryBuilder_ == null) { + query_ = com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance(); + } else { + queryBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (fieldValueFactorBuilder_ == null) { + fieldValueFactor_ = com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor.getDefaultInstance(); + } else { + fieldValueFactorBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery build() { + com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery result = new com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + if (queryBuilder_ == null) { + result.query_ = query_; + } else { + result.query_ = queryBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + if (fieldValueFactorBuilder_ == null) { + result.fieldValueFactor_ = fieldValueFactor_; + } else { + result.fieldValueFactor_ = fieldValueFactorBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery.getDefaultInstance()) return this; + if (other.hasQuery()) { + mergeQuery(other.getQuery()); + } + if (other.hasFieldValueFactor()) { + mergeFieldValueFactor(other.getFieldValueFactor()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.Query.newBuilder(); + if (hasQuery()) { + subBuilder.mergeFrom(getQuery()); + } + input.readMessage(subBuilder, extensionRegistry); + setQuery(subBuilder.buildPartial()); + break; + } + case 18: { + com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor.newBuilder(); + if (hasFieldValueFactor()) { + subBuilder.mergeFrom(getFieldValueFactor()); + } + input.readMessage(subBuilder, extensionRegistry); + setFieldValueFactor(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // optional .com.alicloud.openservices.tablestore.core.protocol.Query query = 1; + private com.alicloud.openservices.tablestore.core.protocol.Search.Query query_ = com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder> queryBuilder_; + public boolean hasQuery() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Query getQuery() { + if (queryBuilder_ == null) { + return query_; + } else { + return queryBuilder_.getMessage(); + } + } + public Builder setQuery(com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { + if (queryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + query_ = value; + onChanged(); + } else { + queryBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder setQuery( + com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder builderForValue) { + if (queryBuilder_ == null) { + query_ = builderForValue.build(); + onChanged(); + } else { + queryBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder mergeQuery(com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { + if (queryBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001) && + query_ != com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance()) { + query_ = + com.alicloud.openservices.tablestore.core.protocol.Search.Query.newBuilder(query_).mergeFrom(value).buildPartial(); + } else { + query_ = value; + } + onChanged(); + } else { + queryBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder clearQuery() { + if (queryBuilder_ == null) { + query_ = com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance(); + onChanged(); + } else { + queryBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder getQueryBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getQueryFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getQueryOrBuilder() { + if (queryBuilder_ != null) { + return queryBuilder_.getMessageOrBuilder(); + } else { + return query_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder> + getQueryFieldBuilder() { + if (queryBuilder_ == null) { + queryBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder>( + query_, + getParentForChildren(), + isClean()); + query_ = null; + } + return queryBuilder_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.FieldValueFactor field_value_factor = 2; + private com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor fieldValueFactor_ = com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor, com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactorOrBuilder> fieldValueFactorBuilder_; + public boolean hasFieldValueFactor() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor getFieldValueFactor() { + if (fieldValueFactorBuilder_ == null) { + return fieldValueFactor_; + } else { + return fieldValueFactorBuilder_.getMessage(); + } + } + public Builder setFieldValueFactor(com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor value) { + if (fieldValueFactorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fieldValueFactor_ = value; + onChanged(); + } else { + fieldValueFactorBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder setFieldValueFactor( + com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor.Builder builderForValue) { + if (fieldValueFactorBuilder_ == null) { + fieldValueFactor_ = builderForValue.build(); + onChanged(); + } else { + fieldValueFactorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder mergeFieldValueFactor(com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor value) { + if (fieldValueFactorBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002) && + fieldValueFactor_ != com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor.getDefaultInstance()) { + fieldValueFactor_ = + com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor.newBuilder(fieldValueFactor_).mergeFrom(value).buildPartial(); + } else { + fieldValueFactor_ = value; + } + onChanged(); + } else { + fieldValueFactorBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder clearFieldValueFactor() { + if (fieldValueFactorBuilder_ == null) { + fieldValueFactor_ = com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor.getDefaultInstance(); + onChanged(); + } else { + fieldValueFactorBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor.Builder getFieldValueFactorBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getFieldValueFactorFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactorOrBuilder getFieldValueFactorOrBuilder() { + if (fieldValueFactorBuilder_ != null) { + return fieldValueFactorBuilder_.getMessageOrBuilder(); + } else { + return fieldValueFactor_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor, com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactorOrBuilder> + getFieldValueFactorFieldBuilder() { + if (fieldValueFactorBuilder_ == null) { + fieldValueFactorBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor, com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactorOrBuilder>( + fieldValueFactor_, + getParentForChildren(), + isClean()); + fieldValueFactor_ = null; + } + return fieldValueFactorBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.FunctionScoreQuery) + } + + static { + defaultInstance = new FunctionScoreQuery(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.FunctionScoreQuery) + } + + public interface NestedQueryOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string path = 1; + boolean hasPath(); + String getPath(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.Query query = 2; + boolean hasQuery(); + com.alicloud.openservices.tablestore.core.protocol.Search.Query getQuery(); + com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getQueryOrBuilder(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.ScoreMode score_mode = 3; + boolean hasScoreMode(); + com.alicloud.openservices.tablestore.core.protocol.Search.ScoreMode getScoreMode(); + + // optional float weight = 4; + boolean hasWeight(); + float getWeight(); + } + public static final class NestedQuery extends + com.google.protobuf.GeneratedMessage + implements NestedQueryOrBuilder { + // Use NestedQuery.newBuilder() to construct. + private NestedQuery(Builder builder) { + super(builder); + } + private NestedQuery(boolean noInit) {} + + private static final NestedQuery defaultInstance; + public static NestedQuery getDefaultInstance() { + return defaultInstance; + } + + public NestedQuery getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_NestedQuery_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_NestedQuery_fieldAccessorTable; + } + + private int bitField0_; + // optional string path = 1; + public static final int PATH_FIELD_NUMBER = 1; + private java.lang.Object path_; + public boolean hasPath() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getPath() { + java.lang.Object ref = path_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + path_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.Query query = 2; + public static final int QUERY_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.Search.Query query_; + public boolean hasQuery() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Query getQuery() { + return query_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getQueryOrBuilder() { + return query_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.ScoreMode score_mode = 3; + public static final int SCORE_MODE_FIELD_NUMBER = 3; + private com.alicloud.openservices.tablestore.core.protocol.Search.ScoreMode scoreMode_; + public boolean hasScoreMode() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.ScoreMode getScoreMode() { + return scoreMode_; + } + + // optional float weight = 4; + public static final int WEIGHT_FIELD_NUMBER = 4; + private float weight_; + public boolean hasWeight() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public float getWeight() { + return weight_; + } + + private void initFields() { + path_ = ""; + query_ = com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance(); + scoreMode_ = com.alicloud.openservices.tablestore.core.protocol.Search.ScoreMode.SCORE_MODE_NONE; + weight_ = 0F; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getPathBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeMessage(2, query_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeEnum(3, scoreMode_.getNumber()); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeFloat(4, weight_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getPathBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, query_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, scoreMode_.getNumber()); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(4, weight_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.NestedQueryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_NestedQuery_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_NestedQuery_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getQueryFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + path_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + if (queryBuilder_ == null) { + query_ = com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance(); + } else { + queryBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + scoreMode_ = com.alicloud.openservices.tablestore.core.protocol.Search.ScoreMode.SCORE_MODE_NONE; + bitField0_ = (bitField0_ & ~0x00000004); + weight_ = 0F; + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery build() { + com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery result = new com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.path_ = path_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + if (queryBuilder_ == null) { + result.query_ = query_; + } else { + result.query_ = queryBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.scoreMode_ = scoreMode_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.weight_ = weight_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery.getDefaultInstance()) return this; + if (other.hasPath()) { + setPath(other.getPath()); + } + if (other.hasQuery()) { + mergeQuery(other.getQuery()); + } + if (other.hasScoreMode()) { + setScoreMode(other.getScoreMode()); + } + if (other.hasWeight()) { + setWeight(other.getWeight()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + path_ = input.readBytes(); + break; + } + case 18: { + com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.Query.newBuilder(); + if (hasQuery()) { + subBuilder.mergeFrom(getQuery()); + } + input.readMessage(subBuilder, extensionRegistry); + setQuery(subBuilder.buildPartial()); + break; + } + case 24: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.Search.ScoreMode value = com.alicloud.openservices.tablestore.core.protocol.Search.ScoreMode.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(3, rawValue); + } else { + bitField0_ |= 0x00000004; + scoreMode_ = value; + } + break; + } + case 37: { + bitField0_ |= 0x00000008; + weight_ = input.readFloat(); + break; + } + } + } + } + + private int bitField0_; + + // optional string path = 1; + private java.lang.Object path_ = ""; + public boolean hasPath() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getPath() { + java.lang.Object ref = path_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + path_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setPath(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + path_ = value; + onChanged(); + return this; + } + public Builder clearPath() { + bitField0_ = (bitField0_ & ~0x00000001); + path_ = getDefaultInstance().getPath(); + onChanged(); + return this; + } + void setPath(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + path_ = value; + onChanged(); + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.Query query = 2; + private com.alicloud.openservices.tablestore.core.protocol.Search.Query query_ = com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder> queryBuilder_; + public boolean hasQuery() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Query getQuery() { + if (queryBuilder_ == null) { + return query_; + } else { + return queryBuilder_.getMessage(); + } + } + public Builder setQuery(com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { + if (queryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + query_ = value; + onChanged(); + } else { + queryBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder setQuery( + com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder builderForValue) { + if (queryBuilder_ == null) { + query_ = builderForValue.build(); + onChanged(); + } else { + queryBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder mergeQuery(com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { + if (queryBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002) && + query_ != com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance()) { + query_ = + com.alicloud.openservices.tablestore.core.protocol.Search.Query.newBuilder(query_).mergeFrom(value).buildPartial(); + } else { + query_ = value; + } + onChanged(); + } else { + queryBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder clearQuery() { + if (queryBuilder_ == null) { + query_ = com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance(); + onChanged(); + } else { + queryBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder getQueryBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getQueryFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getQueryOrBuilder() { + if (queryBuilder_ != null) { + return queryBuilder_.getMessageOrBuilder(); + } else { + return query_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder> + getQueryFieldBuilder() { + if (queryBuilder_ == null) { + queryBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder>( + query_, + getParentForChildren(), + isClean()); + query_ = null; + } + return queryBuilder_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.ScoreMode score_mode = 3; + private com.alicloud.openservices.tablestore.core.protocol.Search.ScoreMode scoreMode_ = com.alicloud.openservices.tablestore.core.protocol.Search.ScoreMode.SCORE_MODE_NONE; + public boolean hasScoreMode() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.ScoreMode getScoreMode() { + return scoreMode_; + } + public Builder setScoreMode(com.alicloud.openservices.tablestore.core.protocol.Search.ScoreMode value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + scoreMode_ = value; + onChanged(); + return this; + } + public Builder clearScoreMode() { + bitField0_ = (bitField0_ & ~0x00000004); + scoreMode_ = com.alicloud.openservices.tablestore.core.protocol.Search.ScoreMode.SCORE_MODE_NONE; + onChanged(); + return this; + } + + // optional float weight = 4; + private float weight_ ; + public boolean hasWeight() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public float getWeight() { + return weight_; + } + public Builder setWeight(float value) { + bitField0_ |= 0x00000008; + weight_ = value; + onChanged(); + return this; + } + public Builder clearWeight() { + bitField0_ = (bitField0_ & ~0x00000008); + weight_ = 0F; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.NestedQuery) + } + + static { + defaultInstance = new NestedQuery(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.NestedQuery) + } + + public interface GeoBoundingBoxQueryOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string field_name = 1; + boolean hasFieldName(); + String getFieldName(); + + // optional string top_left = 2; + boolean hasTopLeft(); + String getTopLeft(); + + // optional string bottom_right = 3; + boolean hasBottomRight(); + String getBottomRight(); + } + public static final class GeoBoundingBoxQuery extends + com.google.protobuf.GeneratedMessage + implements GeoBoundingBoxQueryOrBuilder { + // Use GeoBoundingBoxQuery.newBuilder() to construct. + private GeoBoundingBoxQuery(Builder builder) { + super(builder); + } + private GeoBoundingBoxQuery(boolean noInit) {} + + private static final GeoBoundingBoxQuery defaultInstance; + public static GeoBoundingBoxQuery getDefaultInstance() { + return defaultInstance; + } + + public GeoBoundingBoxQuery getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoBoundingBoxQuery_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoBoundingBoxQuery_fieldAccessorTable; + } + + private int bitField0_; + // optional string field_name = 1; + public static final int FIELD_NAME_FIELD_NUMBER = 1; + private java.lang.Object fieldName_; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + fieldName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getFieldNameBytes() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + fieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional string top_left = 2; + public static final int TOP_LEFT_FIELD_NUMBER = 2; + private java.lang.Object topLeft_; + public boolean hasTopLeft() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getTopLeft() { + java.lang.Object ref = topLeft_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + topLeft_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTopLeftBytes() { + java.lang.Object ref = topLeft_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + topLeft_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional string bottom_right = 3; + public static final int BOTTOM_RIGHT_FIELD_NUMBER = 3; + private java.lang.Object bottomRight_; + public boolean hasBottomRight() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public String getBottomRight() { + java.lang.Object ref = bottomRight_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + bottomRight_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getBottomRightBytes() { + java.lang.Object ref = bottomRight_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + bottomRight_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + fieldName_ = ""; + topLeft_ = ""; + bottomRight_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getFieldNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getTopLeftBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeBytes(3, getBottomRightBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getFieldNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getTopLeftBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, getBottomRightBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQueryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoBoundingBoxQuery_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoBoundingBoxQuery_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + fieldName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + topLeft_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + bottomRight_ = ""; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery build() { + com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery result = new com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.fieldName_ = fieldName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.topLeft_ = topLeft_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.bottomRight_ = bottomRight_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery.getDefaultInstance()) return this; + if (other.hasFieldName()) { + setFieldName(other.getFieldName()); + } + if (other.hasTopLeft()) { + setTopLeft(other.getTopLeft()); + } + if (other.hasBottomRight()) { + setBottomRight(other.getBottomRight()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + fieldName_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + topLeft_ = input.readBytes(); + break; + } + case 26: { + bitField0_ |= 0x00000004; + bottomRight_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // optional string field_name = 1; + private java.lang.Object fieldName_ = ""; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + fieldName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setFieldName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + return this; + } + public Builder clearFieldName() { + bitField0_ = (bitField0_ & ~0x00000001); + fieldName_ = getDefaultInstance().getFieldName(); + onChanged(); + return this; + } + void setFieldName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + } + + // optional string top_left = 2; + private java.lang.Object topLeft_ = ""; + public boolean hasTopLeft() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getTopLeft() { + java.lang.Object ref = topLeft_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + topLeft_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setTopLeft(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + topLeft_ = value; + onChanged(); + return this; + } + public Builder clearTopLeft() { + bitField0_ = (bitField0_ & ~0x00000002); + topLeft_ = getDefaultInstance().getTopLeft(); + onChanged(); + return this; + } + void setTopLeft(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000002; + topLeft_ = value; + onChanged(); + } + + // optional string bottom_right = 3; + private java.lang.Object bottomRight_ = ""; + public boolean hasBottomRight() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public String getBottomRight() { + java.lang.Object ref = bottomRight_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + bottomRight_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setBottomRight(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + bottomRight_ = value; + onChanged(); + return this; + } + public Builder clearBottomRight() { + bitField0_ = (bitField0_ & ~0x00000004); + bottomRight_ = getDefaultInstance().getBottomRight(); + onChanged(); + return this; + } + void setBottomRight(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000004; + bottomRight_ = value; + onChanged(); + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GeoBoundingBoxQuery) + } + + static { + defaultInstance = new GeoBoundingBoxQuery(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GeoBoundingBoxQuery) + } + + public interface GeoDistanceQueryOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string field_name = 1; + boolean hasFieldName(); + String getFieldName(); + + // optional string center_point = 2; + boolean hasCenterPoint(); + String getCenterPoint(); + + // optional double distance = 3; + boolean hasDistance(); + double getDistance(); + } + public static final class GeoDistanceQuery extends + com.google.protobuf.GeneratedMessage + implements GeoDistanceQueryOrBuilder { + // Use GeoDistanceQuery.newBuilder() to construct. + private GeoDistanceQuery(Builder builder) { + super(builder); + } + private GeoDistanceQuery(boolean noInit) {} + + private static final GeoDistanceQuery defaultInstance; + public static GeoDistanceQuery getDefaultInstance() { + return defaultInstance; + } + + public GeoDistanceQuery getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoDistanceQuery_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoDistanceQuery_fieldAccessorTable; + } + + private int bitField0_; + // optional string field_name = 1; + public static final int FIELD_NAME_FIELD_NUMBER = 1; + private java.lang.Object fieldName_; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + fieldName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getFieldNameBytes() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + fieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional string center_point = 2; + public static final int CENTER_POINT_FIELD_NUMBER = 2; + private java.lang.Object centerPoint_; + public boolean hasCenterPoint() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getCenterPoint() { + java.lang.Object ref = centerPoint_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + centerPoint_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getCenterPointBytes() { + java.lang.Object ref = centerPoint_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + centerPoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional double distance = 3; + public static final int DISTANCE_FIELD_NUMBER = 3; + private double distance_; + public boolean hasDistance() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public double getDistance() { + return distance_; + } + + private void initFields() { + fieldName_ = ""; + centerPoint_ = ""; + distance_ = 0D; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getFieldNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getCenterPointBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeDouble(3, distance_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getFieldNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getCenterPointBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(3, distance_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQueryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoDistanceQuery_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoDistanceQuery_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + fieldName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + centerPoint_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + distance_ = 0D; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery build() { + com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery result = new com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.fieldName_ = fieldName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.centerPoint_ = centerPoint_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.distance_ = distance_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery.getDefaultInstance()) return this; + if (other.hasFieldName()) { + setFieldName(other.getFieldName()); + } + if (other.hasCenterPoint()) { + setCenterPoint(other.getCenterPoint()); + } + if (other.hasDistance()) { + setDistance(other.getDistance()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + fieldName_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + centerPoint_ = input.readBytes(); + break; + } + case 25: { + bitField0_ |= 0x00000004; + distance_ = input.readDouble(); + break; + } + } + } + } + + private int bitField0_; + + // optional string field_name = 1; + private java.lang.Object fieldName_ = ""; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + fieldName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setFieldName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + return this; + } + public Builder clearFieldName() { + bitField0_ = (bitField0_ & ~0x00000001); + fieldName_ = getDefaultInstance().getFieldName(); + onChanged(); + return this; + } + void setFieldName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + } + + // optional string center_point = 2; + private java.lang.Object centerPoint_ = ""; + public boolean hasCenterPoint() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getCenterPoint() { + java.lang.Object ref = centerPoint_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + centerPoint_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setCenterPoint(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + centerPoint_ = value; + onChanged(); + return this; + } + public Builder clearCenterPoint() { + bitField0_ = (bitField0_ & ~0x00000002); + centerPoint_ = getDefaultInstance().getCenterPoint(); + onChanged(); + return this; + } + void setCenterPoint(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000002; + centerPoint_ = value; + onChanged(); + } + + // optional double distance = 3; + private double distance_ ; + public boolean hasDistance() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public double getDistance() { + return distance_; + } + public Builder setDistance(double value) { + bitField0_ |= 0x00000004; + distance_ = value; + onChanged(); + return this; + } + public Builder clearDistance() { + bitField0_ = (bitField0_ & ~0x00000004); + distance_ = 0D; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GeoDistanceQuery) + } + + static { + defaultInstance = new GeoDistanceQuery(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GeoDistanceQuery) + } + + public interface GeoPolygonQueryOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string field_name = 1; + boolean hasFieldName(); + String getFieldName(); + + // repeated string points = 2; + java.util.List getPointsList(); + int getPointsCount(); + String getPoints(int index); + } + public static final class GeoPolygonQuery extends + com.google.protobuf.GeneratedMessage + implements GeoPolygonQueryOrBuilder { + // Use GeoPolygonQuery.newBuilder() to construct. + private GeoPolygonQuery(Builder builder) { + super(builder); + } + private GeoPolygonQuery(boolean noInit) {} + + private static final GeoPolygonQuery defaultInstance; + public static GeoPolygonQuery getDefaultInstance() { + return defaultInstance; + } + + public GeoPolygonQuery getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoPolygonQuery_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoPolygonQuery_fieldAccessorTable; + } + + private int bitField0_; + // optional string field_name = 1; + public static final int FIELD_NAME_FIELD_NUMBER = 1; + private java.lang.Object fieldName_; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + fieldName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getFieldNameBytes() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + fieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // repeated string points = 2; + public static final int POINTS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList points_; + public java.util.List + getPointsList() { + return points_; + } + public int getPointsCount() { + return points_.size(); + } + public String getPoints(int index) { + return points_.get(index); + } + + private void initFields() { + fieldName_ = ""; + points_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getFieldNameBytes()); + } + for (int i = 0; i < points_.size(); i++) { + output.writeBytes(2, points_.getByteString(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getFieldNameBytes()); + } + { + int dataSize = 0; + for (int i = 0; i < points_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(points_.getByteString(i)); + } + size += dataSize; + size += 1 * getPointsList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQueryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoPolygonQuery_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoPolygonQuery_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + fieldName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + points_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery build() { + com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery result = new com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.fieldName_ = fieldName_; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + points_ = new com.google.protobuf.UnmodifiableLazyStringList( + points_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.points_ = points_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery.getDefaultInstance()) return this; + if (other.hasFieldName()) { + setFieldName(other.getFieldName()); + } + if (!other.points_.isEmpty()) { + if (points_.isEmpty()) { + points_ = other.points_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensurePointsIsMutable(); + points_.addAll(other.points_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + fieldName_ = input.readBytes(); + break; + } + case 18: { + ensurePointsIsMutable(); + points_.add(input.readBytes()); + break; + } + } + } + } + + private int bitField0_; + + // optional string field_name = 1; + private java.lang.Object fieldName_ = ""; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + fieldName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setFieldName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + return this; + } + public Builder clearFieldName() { + bitField0_ = (bitField0_ & ~0x00000001); + fieldName_ = getDefaultInstance().getFieldName(); + onChanged(); + return this; + } + void setFieldName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + } + + // repeated string points = 2; + private com.google.protobuf.LazyStringList points_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensurePointsIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + points_ = new com.google.protobuf.LazyStringArrayList(points_); + bitField0_ |= 0x00000002; + } + } + public java.util.List + getPointsList() { + return java.util.Collections.unmodifiableList(points_); + } + public int getPointsCount() { + return points_.size(); + } + public String getPoints(int index) { + return points_.get(index); + } + public Builder setPoints( + int index, String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePointsIsMutable(); + points_.set(index, value); + onChanged(); + return this; + } + public Builder addPoints(String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePointsIsMutable(); + points_.add(value); + onChanged(); + return this; + } + public Builder addAllPoints( + java.lang.Iterable values) { + ensurePointsIsMutable(); + super.addAll(values, points_); + onChanged(); + return this; + } + public Builder clearPoints() { + points_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + void addPoints(com.google.protobuf.ByteString value) { + ensurePointsIsMutable(); + points_.add(value); + onChanged(); + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GeoPolygonQuery) + } + + static { + defaultInstance = new GeoPolygonQuery(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GeoPolygonQuery) + } + + public interface ExistsQueryOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string field_name = 1; + boolean hasFieldName(); + String getFieldName(); + } + public static final class ExistsQuery extends + com.google.protobuf.GeneratedMessage + implements ExistsQueryOrBuilder { + // Use ExistsQuery.newBuilder() to construct. + private ExistsQuery(Builder builder) { + super(builder); + } + private ExistsQuery(boolean noInit) {} + + private static final ExistsQuery defaultInstance; + public static ExistsQuery getDefaultInstance() { + return defaultInstance; + } + + public ExistsQuery getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ExistsQuery_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ExistsQuery_fieldAccessorTable; + } + + private int bitField0_; + // optional string field_name = 1; + public static final int FIELD_NAME_FIELD_NUMBER = 1; + private java.lang.Object fieldName_; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + fieldName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getFieldNameBytes() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + fieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + fieldName_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getFieldNameBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getFieldNameBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.ExistsQuery parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ExistsQuery parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ExistsQuery parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ExistsQuery parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ExistsQuery parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ExistsQuery parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ExistsQuery parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ExistsQuery parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ExistsQuery parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ExistsQuery parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.ExistsQuery prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.ExistsQueryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ExistsQuery_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ExistsQuery_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.ExistsQuery.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + fieldName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.ExistsQuery.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.ExistsQuery getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.ExistsQuery.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.ExistsQuery build() { + com.alicloud.openservices.tablestore.core.protocol.Search.ExistsQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.ExistsQuery buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.ExistsQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.ExistsQuery buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.ExistsQuery result = new com.alicloud.openservices.tablestore.core.protocol.Search.ExistsQuery(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.fieldName_ = fieldName_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.ExistsQuery) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.ExistsQuery)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.ExistsQuery other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.ExistsQuery.getDefaultInstance()) return this; + if (other.hasFieldName()) { + setFieldName(other.getFieldName()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + fieldName_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // optional string field_name = 1; + private java.lang.Object fieldName_ = ""; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + fieldName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setFieldName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + return this; + } + public Builder clearFieldName() { + bitField0_ = (bitField0_ & ~0x00000001); + fieldName_ = getDefaultInstance().getFieldName(); + onChanged(); + return this; + } + void setFieldName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.ExistsQuery) + } + + static { + defaultInstance = new ExistsQuery(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.ExistsQuery) + } + + public interface QueryOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional .com.alicloud.openservices.tablestore.core.protocol.QueryType type = 1; + boolean hasType(); + com.alicloud.openservices.tablestore.core.protocol.Search.QueryType getType(); + + // optional bytes query = 2; + boolean hasQuery(); + com.google.protobuf.ByteString getQuery(); + } + public static final class Query extends + com.google.protobuf.GeneratedMessage + implements QueryOrBuilder { + // Use Query.newBuilder() to construct. + private Query(Builder builder) { + super(builder); + } + private Query(boolean noInit) {} + + private static final Query defaultInstance; + public static Query getDefaultInstance() { + return defaultInstance; + } + + public Query getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Query_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Query_fieldAccessorTable; + } + + private int bitField0_; + // optional .com.alicloud.openservices.tablestore.core.protocol.QueryType type = 1; + public static final int TYPE_FIELD_NUMBER = 1; + private com.alicloud.openservices.tablestore.core.protocol.Search.QueryType type_; + public boolean hasType() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.QueryType getType() { + return type_; + } + + // optional bytes query = 2; + public static final int QUERY_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString query_; + public boolean hasQuery() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getQuery() { + return query_; + } + + private void initFields() { + type_ = com.alicloud.openservices.tablestore.core.protocol.Search.QueryType.MATCH_QUERY; + query_ = com.google.protobuf.ByteString.EMPTY; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeEnum(1, type_.getNumber()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, query_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, type_.getNumber()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, query_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.Query parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Query parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Query parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Query parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Query parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Query parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Query parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Query parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Query parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Query parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.Query prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Query_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Query_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.Query.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + type_ = com.alicloud.openservices.tablestore.core.protocol.Search.QueryType.MATCH_QUERY; + bitField0_ = (bitField0_ & ~0x00000001); + query_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.Query getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.Query build() { + com.alicloud.openservices.tablestore.core.protocol.Search.Query result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.Query buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.Query result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.Query buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.Query result = new com.alicloud.openservices.tablestore.core.protocol.Search.Query(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.type_ = type_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.query_ = query_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.Query) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.Query)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.Query other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance()) return this; + if (other.hasType()) { + setType(other.getType()); + } + if (other.hasQuery()) { + setQuery(other.getQuery()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.Search.QueryType value = com.alicloud.openservices.tablestore.core.protocol.Search.QueryType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + type_ = value; + } + break; + } + case 18: { + bitField0_ |= 0x00000002; + query_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // optional .com.alicloud.openservices.tablestore.core.protocol.QueryType type = 1; + private com.alicloud.openservices.tablestore.core.protocol.Search.QueryType type_ = com.alicloud.openservices.tablestore.core.protocol.Search.QueryType.MATCH_QUERY; + public boolean hasType() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.QueryType getType() { + return type_; + } + public Builder setType(com.alicloud.openservices.tablestore.core.protocol.Search.QueryType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + type_ = value; + onChanged(); + return this; + } + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000001); + type_ = com.alicloud.openservices.tablestore.core.protocol.Search.QueryType.MATCH_QUERY; + onChanged(); + return this; + } + + // optional bytes query = 2; + private com.google.protobuf.ByteString query_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasQuery() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getQuery() { + return query_; + } + public Builder setQuery(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + query_ = value; + onChanged(); + return this; + } + public Builder clearQuery() { + bitField0_ = (bitField0_ & ~0x00000002); + query_ = getDefaultInstance().getQuery(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.Query) + } + + static { + defaultInstance = new Query(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.Query) + } + + public interface CollapseOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string field_name = 1; + boolean hasFieldName(); + String getFieldName(); + } + public static final class Collapse extends + com.google.protobuf.GeneratedMessage + implements CollapseOrBuilder { + // Use Collapse.newBuilder() to construct. + private Collapse(Builder builder) { + super(builder); + } + private Collapse(boolean noInit) {} + + private static final Collapse defaultInstance; + public static Collapse getDefaultInstance() { + return defaultInstance; + } + + public Collapse getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Collapse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Collapse_fieldAccessorTable; + } + + private int bitField0_; + // optional string field_name = 1; + public static final int FIELD_NAME_FIELD_NUMBER = 1; + private java.lang.Object fieldName_; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + fieldName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getFieldNameBytes() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + fieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + fieldName_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getFieldNameBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getFieldNameBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.Collapse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Collapse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Collapse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Collapse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Collapse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Collapse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Collapse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Collapse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Collapse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Collapse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.Collapse prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.CollapseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Collapse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Collapse_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.Collapse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + fieldName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.Collapse.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.Collapse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.Collapse.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.Collapse build() { + com.alicloud.openservices.tablestore.core.protocol.Search.Collapse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.Collapse buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.Collapse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.Collapse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.Collapse result = new com.alicloud.openservices.tablestore.core.protocol.Search.Collapse(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.fieldName_ = fieldName_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.Collapse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.Collapse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.Collapse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.Collapse.getDefaultInstance()) return this; + if (other.hasFieldName()) { + setFieldName(other.getFieldName()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + fieldName_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // optional string field_name = 1; + private java.lang.Object fieldName_ = ""; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + fieldName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setFieldName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + return this; + } + public Builder clearFieldName() { + bitField0_ = (bitField0_ & ~0x00000001); + fieldName_ = getDefaultInstance().getFieldName(); + onChanged(); + return this; + } + void setFieldName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.Collapse) + } + + static { + defaultInstance = new Collapse(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.Collapse) + } + + public interface NestedFilterOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string path = 1; + boolean hasPath(); + String getPath(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.Query filter = 2; + boolean hasFilter(); + com.alicloud.openservices.tablestore.core.protocol.Search.Query getFilter(); + com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getFilterOrBuilder(); + } + public static final class NestedFilter extends + com.google.protobuf.GeneratedMessage + implements NestedFilterOrBuilder { + // Use NestedFilter.newBuilder() to construct. + private NestedFilter(Builder builder) { + super(builder); + } + private NestedFilter(boolean noInit) {} + + private static final NestedFilter defaultInstance; + public static NestedFilter getDefaultInstance() { + return defaultInstance; + } + + public NestedFilter getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_NestedFilter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_NestedFilter_fieldAccessorTable; + } + + private int bitField0_; + // optional string path = 1; + public static final int PATH_FIELD_NUMBER = 1; + private java.lang.Object path_; + public boolean hasPath() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getPath() { + java.lang.Object ref = path_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + path_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.Query filter = 2; + public static final int FILTER_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.Search.Query filter_; + public boolean hasFilter() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Query getFilter() { + return filter_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getFilterOrBuilder() { + return filter_; + } + + private void initFields() { + path_ = ""; + filter_ = com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getPathBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeMessage(2, filter_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getPathBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, filter_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_NestedFilter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_NestedFilter_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getFilterFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + path_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + if (filterBuilder_ == null) { + filter_ = com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance(); + } else { + filterBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter build() { + com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter result = new com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.path_ = path_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + if (filterBuilder_ == null) { + result.filter_ = filter_; + } else { + result.filter_ = filterBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.getDefaultInstance()) return this; + if (other.hasPath()) { + setPath(other.getPath()); + } + if (other.hasFilter()) { + mergeFilter(other.getFilter()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + path_ = input.readBytes(); + break; + } + case 18: { + com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.Query.newBuilder(); + if (hasFilter()) { + subBuilder.mergeFrom(getFilter()); + } + input.readMessage(subBuilder, extensionRegistry); + setFilter(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // optional string path = 1; + private java.lang.Object path_ = ""; + public boolean hasPath() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getPath() { + java.lang.Object ref = path_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + path_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setPath(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + path_ = value; + onChanged(); + return this; + } + public Builder clearPath() { + bitField0_ = (bitField0_ & ~0x00000001); + path_ = getDefaultInstance().getPath(); + onChanged(); + return this; + } + void setPath(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + path_ = value; + onChanged(); + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.Query filter = 2; + private com.alicloud.openservices.tablestore.core.protocol.Search.Query filter_ = com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder> filterBuilder_; + public boolean hasFilter() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Query getFilter() { + if (filterBuilder_ == null) { + return filter_; + } else { + return filterBuilder_.getMessage(); + } + } + public Builder setFilter(com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { + if (filterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + onChanged(); + } else { + filterBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder setFilter( + com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder builderForValue) { + if (filterBuilder_ == null) { + filter_ = builderForValue.build(); + onChanged(); + } else { + filterBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder mergeFilter(com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { + if (filterBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002) && + filter_ != com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance()) { + filter_ = + com.alicloud.openservices.tablestore.core.protocol.Search.Query.newBuilder(filter_).mergeFrom(value).buildPartial(); + } else { + filter_ = value; + } + onChanged(); + } else { + filterBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder clearFilter() { + if (filterBuilder_ == null) { + filter_ = com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance(); + onChanged(); + } else { + filterBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder getFilterBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getFilterFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getFilterOrBuilder() { + if (filterBuilder_ != null) { + return filterBuilder_.getMessageOrBuilder(); + } else { + return filter_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder> + getFilterFieldBuilder() { + if (filterBuilder_ == null) { + filterBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder>( + filter_, + getParentForChildren(), + isClean()); + filter_ = null; + } + return filterBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.NestedFilter) + } + + static { + defaultInstance = new NestedFilter(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.NestedFilter) + } + + public interface ScoreSortOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional .com.alicloud.openservices.tablestore.core.protocol.SortOrder order = 1; + boolean hasOrder(); + com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder getOrder(); + } + public static final class ScoreSort extends + com.google.protobuf.GeneratedMessage + implements ScoreSortOrBuilder { + // Use ScoreSort.newBuilder() to construct. + private ScoreSort(Builder builder) { + super(builder); + } + private ScoreSort(boolean noInit) {} + + private static final ScoreSort defaultInstance; + public static ScoreSort getDefaultInstance() { + return defaultInstance; + } + + public ScoreSort getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ScoreSort_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ScoreSort_fieldAccessorTable; + } + + private int bitField0_; + // optional .com.alicloud.openservices.tablestore.core.protocol.SortOrder order = 1; + public static final int ORDER_FIELD_NUMBER = 1; + private com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder order_; + public boolean hasOrder() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder getOrder() { + return order_; + } + + private void initFields() { + order_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.SORT_ORDER_ASC; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeEnum(1, order_.getNumber()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, order_.getNumber()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSortOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ScoreSort_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ScoreSort_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + order_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.SORT_ORDER_ASC; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort build() { + com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort result = new com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.order_ = order_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort.getDefaultInstance()) return this; + if (other.hasOrder()) { + setOrder(other.getOrder()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder value = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + order_ = value; + } + break; + } + } + } + } + + private int bitField0_; + + // optional .com.alicloud.openservices.tablestore.core.protocol.SortOrder order = 1; + private com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder order_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.SORT_ORDER_ASC; + public boolean hasOrder() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder getOrder() { + return order_; + } + public Builder setOrder(com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + order_ = value; + onChanged(); + return this; + } + public Builder clearOrder() { + bitField0_ = (bitField0_ & ~0x00000001); + order_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.SORT_ORDER_ASC; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.ScoreSort) + } + + static { + defaultInstance = new ScoreSort(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.ScoreSort) + } + + public interface PrimaryKeySortOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional .com.alicloud.openservices.tablestore.core.protocol.SortOrder order = 1; + boolean hasOrder(); + com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder getOrder(); + } + public static final class PrimaryKeySort extends + com.google.protobuf.GeneratedMessage + implements PrimaryKeySortOrBuilder { + // Use PrimaryKeySort.newBuilder() to construct. + private PrimaryKeySort(Builder builder) { + super(builder); + } + private PrimaryKeySort(boolean noInit) {} + + private static final PrimaryKeySort defaultInstance; + public static PrimaryKeySort getDefaultInstance() { + return defaultInstance; + } + + public PrimaryKeySort getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_PrimaryKeySort_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_PrimaryKeySort_fieldAccessorTable; + } + + private int bitField0_; + // optional .com.alicloud.openservices.tablestore.core.protocol.SortOrder order = 1; + public static final int ORDER_FIELD_NUMBER = 1; + private com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder order_; + public boolean hasOrder() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder getOrder() { + return order_; + } + + private void initFields() { + order_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.SORT_ORDER_ASC; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeEnum(1, order_.getNumber()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, order_.getNumber()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySortOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_PrimaryKeySort_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_PrimaryKeySort_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + order_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.SORT_ORDER_ASC; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort build() { + com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort result = new com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.order_ = order_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort.getDefaultInstance()) return this; + if (other.hasOrder()) { + setOrder(other.getOrder()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder value = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + order_ = value; + } + break; + } + } + } + } + + private int bitField0_; + + // optional .com.alicloud.openservices.tablestore.core.protocol.SortOrder order = 1; + private com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder order_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.SORT_ORDER_ASC; + public boolean hasOrder() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder getOrder() { + return order_; + } + public Builder setOrder(com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + order_ = value; + onChanged(); + return this; + } + public Builder clearOrder() { + bitField0_ = (bitField0_ & ~0x00000001); + order_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.SORT_ORDER_ASC; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.PrimaryKeySort) + } + + static { + defaultInstance = new PrimaryKeySort(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.PrimaryKeySort) + } + + public interface FieldSortOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string field_name = 1; + boolean hasFieldName(); + String getFieldName(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.SortOrder order = 2; + boolean hasOrder(); + com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder getOrder(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.SortMode mode = 3; + boolean hasMode(); + com.alicloud.openservices.tablestore.core.protocol.Search.SortMode getMode(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.NestedFilter nested_filter = 4; + boolean hasNestedFilter(); + com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter getNestedFilter(); + com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilterOrBuilder getNestedFilterOrBuilder(); + + // optional bytes missing = 5; + boolean hasMissing(); + com.google.protobuf.ByteString getMissing(); + } + public static final class FieldSort extends + com.google.protobuf.GeneratedMessage + implements FieldSortOrBuilder { + // Use FieldSort.newBuilder() to construct. + private FieldSort(Builder builder) { + super(builder); + } + private FieldSort(boolean noInit) {} + + private static final FieldSort defaultInstance; + public static FieldSort getDefaultInstance() { + return defaultInstance; + } + + public FieldSort getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_FieldSort_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_FieldSort_fieldAccessorTable; + } + + private int bitField0_; + // optional string field_name = 1; + public static final int FIELD_NAME_FIELD_NUMBER = 1; + private java.lang.Object fieldName_; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + fieldName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getFieldNameBytes() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + fieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.SortOrder order = 2; + public static final int ORDER_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder order_; + public boolean hasOrder() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder getOrder() { + return order_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.SortMode mode = 3; + public static final int MODE_FIELD_NUMBER = 3; + private com.alicloud.openservices.tablestore.core.protocol.Search.SortMode mode_; + public boolean hasMode() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.SortMode getMode() { + return mode_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.NestedFilter nested_filter = 4; + public static final int NESTED_FILTER_FIELD_NUMBER = 4; + private com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter nestedFilter_; + public boolean hasNestedFilter() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter getNestedFilter() { + return nestedFilter_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilterOrBuilder getNestedFilterOrBuilder() { + return nestedFilter_; + } + + // optional bytes missing = 5; + public static final int MISSING_FIELD_NUMBER = 5; + private com.google.protobuf.ByteString missing_; + public boolean hasMissing() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public com.google.protobuf.ByteString getMissing() { + return missing_; + } + + private void initFields() { + fieldName_ = ""; + order_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.SORT_ORDER_ASC; + mode_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortMode.SORT_MODE_MIN; + nestedFilter_ = com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.getDefaultInstance(); + missing_ = com.google.protobuf.ByteString.EMPTY; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getFieldNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeEnum(2, order_.getNumber()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeEnum(3, mode_.getNumber()); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeMessage(4, nestedFilter_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeBytes(5, missing_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getFieldNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, order_.getNumber()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, mode_.getNumber()); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, nestedFilter_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(5, missing_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.FieldSortOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_FieldSort_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_FieldSort_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getNestedFilterFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + fieldName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + order_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.SORT_ORDER_ASC; + bitField0_ = (bitField0_ & ~0x00000002); + mode_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortMode.SORT_MODE_MIN; + bitField0_ = (bitField0_ & ~0x00000004); + if (nestedFilterBuilder_ == null) { + nestedFilter_ = com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.getDefaultInstance(); + } else { + nestedFilterBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + missing_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort build() { + com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort result = new com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.fieldName_ = fieldName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.order_ = order_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.mode_ = mode_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + if (nestedFilterBuilder_ == null) { + result.nestedFilter_ = nestedFilter_; + } else { + result.nestedFilter_ = nestedFilterBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + result.missing_ = missing_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort.getDefaultInstance()) return this; + if (other.hasFieldName()) { + setFieldName(other.getFieldName()); + } + if (other.hasOrder()) { + setOrder(other.getOrder()); + } + if (other.hasMode()) { + setMode(other.getMode()); + } + if (other.hasNestedFilter()) { + mergeNestedFilter(other.getNestedFilter()); + } + if (other.hasMissing()) { + setMissing(other.getMissing()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + fieldName_ = input.readBytes(); + break; + } + case 16: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder value = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(2, rawValue); + } else { + bitField0_ |= 0x00000002; + order_ = value; + } + break; + } + case 24: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.Search.SortMode value = com.alicloud.openservices.tablestore.core.protocol.Search.SortMode.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(3, rawValue); + } else { + bitField0_ |= 0x00000004; + mode_ = value; + } + break; + } + case 34: { + com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.newBuilder(); + if (hasNestedFilter()) { + subBuilder.mergeFrom(getNestedFilter()); + } + input.readMessage(subBuilder, extensionRegistry); + setNestedFilter(subBuilder.buildPartial()); + break; + } + case 42: { + bitField0_ |= 0x00000010; + missing_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // optional string field_name = 1; + private java.lang.Object fieldName_ = ""; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + fieldName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setFieldName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + return this; + } + public Builder clearFieldName() { + bitField0_ = (bitField0_ & ~0x00000001); + fieldName_ = getDefaultInstance().getFieldName(); + onChanged(); + return this; + } + void setFieldName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.SortOrder order = 2; + private com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder order_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.SORT_ORDER_ASC; + public boolean hasOrder() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder getOrder() { + return order_; + } + public Builder setOrder(com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + order_ = value; + onChanged(); + return this; + } + public Builder clearOrder() { + bitField0_ = (bitField0_ & ~0x00000002); + order_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.SORT_ORDER_ASC; + onChanged(); + return this; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.SortMode mode = 3; + private com.alicloud.openservices.tablestore.core.protocol.Search.SortMode mode_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortMode.SORT_MODE_MIN; + public boolean hasMode() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.SortMode getMode() { + return mode_; + } + public Builder setMode(com.alicloud.openservices.tablestore.core.protocol.Search.SortMode value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + mode_ = value; + onChanged(); + return this; + } + public Builder clearMode() { + bitField0_ = (bitField0_ & ~0x00000004); + mode_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortMode.SORT_MODE_MIN; + onChanged(); + return this; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.NestedFilter nested_filter = 4; + private com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter nestedFilter_ = com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter, com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilterOrBuilder> nestedFilterBuilder_; + public boolean hasNestedFilter() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter getNestedFilter() { + if (nestedFilterBuilder_ == null) { + return nestedFilter_; + } else { + return nestedFilterBuilder_.getMessage(); + } + } + public Builder setNestedFilter(com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter value) { + if (nestedFilterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + nestedFilter_ = value; + onChanged(); + } else { + nestedFilterBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder setNestedFilter( + com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.Builder builderForValue) { + if (nestedFilterBuilder_ == null) { + nestedFilter_ = builderForValue.build(); + onChanged(); + } else { + nestedFilterBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder mergeNestedFilter(com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter value) { + if (nestedFilterBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008) && + nestedFilter_ != com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.getDefaultInstance()) { + nestedFilter_ = + com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.newBuilder(nestedFilter_).mergeFrom(value).buildPartial(); + } else { + nestedFilter_ = value; + } + onChanged(); + } else { + nestedFilterBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder clearNestedFilter() { + if (nestedFilterBuilder_ == null) { + nestedFilter_ = com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.getDefaultInstance(); + onChanged(); + } else { + nestedFilterBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.Builder getNestedFilterBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getNestedFilterFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilterOrBuilder getNestedFilterOrBuilder() { + if (nestedFilterBuilder_ != null) { + return nestedFilterBuilder_.getMessageOrBuilder(); + } else { + return nestedFilter_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter, com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilterOrBuilder> + getNestedFilterFieldBuilder() { + if (nestedFilterBuilder_ == null) { + nestedFilterBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter, com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilterOrBuilder>( + nestedFilter_, + getParentForChildren(), + isClean()); + nestedFilter_ = null; + } + return nestedFilterBuilder_; + } + + // optional bytes missing = 5; + private com.google.protobuf.ByteString missing_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasMissing() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public com.google.protobuf.ByteString getMissing() { + return missing_; + } + public Builder setMissing(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + missing_ = value; + onChanged(); + return this; + } + public Builder clearMissing() { + bitField0_ = (bitField0_ & ~0x00000010); + missing_ = getDefaultInstance().getMissing(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.FieldSort) + } + + static { + defaultInstance = new FieldSort(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.FieldSort) + } + + public interface GeoDistanceSortOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string field_name = 1; + boolean hasFieldName(); + String getFieldName(); + + // repeated string points = 2; + java.util.List getPointsList(); + int getPointsCount(); + String getPoints(int index); + + // optional .com.alicloud.openservices.tablestore.core.protocol.SortOrder order = 3; + boolean hasOrder(); + com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder getOrder(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.SortMode mode = 4; + boolean hasMode(); + com.alicloud.openservices.tablestore.core.protocol.Search.SortMode getMode(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.GeoDistanceType distance_type = 5; + boolean hasDistanceType(); + com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceType getDistanceType(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.NestedFilter nested_filter = 6; + boolean hasNestedFilter(); + com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter getNestedFilter(); + com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilterOrBuilder getNestedFilterOrBuilder(); + } + public static final class GeoDistanceSort extends + com.google.protobuf.GeneratedMessage + implements GeoDistanceSortOrBuilder { + // Use GeoDistanceSort.newBuilder() to construct. + private GeoDistanceSort(Builder builder) { + super(builder); + } + private GeoDistanceSort(boolean noInit) {} + + private static final GeoDistanceSort defaultInstance; + public static GeoDistanceSort getDefaultInstance() { + return defaultInstance; + } + + public GeoDistanceSort getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoDistanceSort_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoDistanceSort_fieldAccessorTable; + } + + private int bitField0_; + // optional string field_name = 1; + public static final int FIELD_NAME_FIELD_NUMBER = 1; + private java.lang.Object fieldName_; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + fieldName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getFieldNameBytes() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + fieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // repeated string points = 2; + public static final int POINTS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList points_; + public java.util.List + getPointsList() { + return points_; + } + public int getPointsCount() { + return points_.size(); + } + public String getPoints(int index) { + return points_.get(index); + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.SortOrder order = 3; + public static final int ORDER_FIELD_NUMBER = 3; + private com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder order_; + public boolean hasOrder() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder getOrder() { + return order_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.SortMode mode = 4; + public static final int MODE_FIELD_NUMBER = 4; + private com.alicloud.openservices.tablestore.core.protocol.Search.SortMode mode_; + public boolean hasMode() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.SortMode getMode() { + return mode_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.GeoDistanceType distance_type = 5; + public static final int DISTANCE_TYPE_FIELD_NUMBER = 5; + private com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceType distanceType_; + public boolean hasDistanceType() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceType getDistanceType() { + return distanceType_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.NestedFilter nested_filter = 6; + public static final int NESTED_FILTER_FIELD_NUMBER = 6; + private com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter nestedFilter_; + public boolean hasNestedFilter() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter getNestedFilter() { + return nestedFilter_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilterOrBuilder getNestedFilterOrBuilder() { + return nestedFilter_; + } + + private void initFields() { + fieldName_ = ""; + points_ = com.google.protobuf.LazyStringArrayList.EMPTY; + order_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.SORT_ORDER_ASC; + mode_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortMode.SORT_MODE_MIN; + distanceType_ = com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceType.GEO_DISTANCE_ARC; + nestedFilter_ = com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getFieldNameBytes()); + } + for (int i = 0; i < points_.size(); i++) { + output.writeBytes(2, points_.getByteString(i)); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeEnum(3, order_.getNumber()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeEnum(4, mode_.getNumber()); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeEnum(5, distanceType_.getNumber()); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeMessage(6, nestedFilter_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getFieldNameBytes()); + } + { + int dataSize = 0; + for (int i = 0; i < points_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(points_.getByteString(i)); + } + size += dataSize; + size += 1 * getPointsList().size(); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, order_.getNumber()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, mode_.getNumber()); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(5, distanceType_.getNumber()); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, nestedFilter_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSortOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoDistanceSort_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoDistanceSort_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getNestedFilterFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + fieldName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + points_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + order_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.SORT_ORDER_ASC; + bitField0_ = (bitField0_ & ~0x00000004); + mode_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortMode.SORT_MODE_MIN; + bitField0_ = (bitField0_ & ~0x00000008); + distanceType_ = com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceType.GEO_DISTANCE_ARC; + bitField0_ = (bitField0_ & ~0x00000010); + if (nestedFilterBuilder_ == null) { + nestedFilter_ = com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.getDefaultInstance(); + } else { + nestedFilterBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort build() { + com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort result = new com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.fieldName_ = fieldName_; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + points_ = new com.google.protobuf.UnmodifiableLazyStringList( + points_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.points_ = points_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000002; + } + result.order_ = order_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000004; + } + result.mode_ = mode_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000008; + } + result.distanceType_ = distanceType_; + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000010; + } + if (nestedFilterBuilder_ == null) { + result.nestedFilter_ = nestedFilter_; + } else { + result.nestedFilter_ = nestedFilterBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort.getDefaultInstance()) return this; + if (other.hasFieldName()) { + setFieldName(other.getFieldName()); + } + if (!other.points_.isEmpty()) { + if (points_.isEmpty()) { + points_ = other.points_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensurePointsIsMutable(); + points_.addAll(other.points_); + } + onChanged(); + } + if (other.hasOrder()) { + setOrder(other.getOrder()); + } + if (other.hasMode()) { + setMode(other.getMode()); + } + if (other.hasDistanceType()) { + setDistanceType(other.getDistanceType()); + } + if (other.hasNestedFilter()) { + mergeNestedFilter(other.getNestedFilter()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + fieldName_ = input.readBytes(); + break; + } + case 18: { + ensurePointsIsMutable(); + points_.add(input.readBytes()); + break; + } + case 24: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder value = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(3, rawValue); + } else { + bitField0_ |= 0x00000004; + order_ = value; + } + break; + } + case 32: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.Search.SortMode value = com.alicloud.openservices.tablestore.core.protocol.Search.SortMode.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(4, rawValue); + } else { + bitField0_ |= 0x00000008; + mode_ = value; + } + break; + } + case 40: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceType value = com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(5, rawValue); + } else { + bitField0_ |= 0x00000010; + distanceType_ = value; + } + break; + } + case 50: { + com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.newBuilder(); + if (hasNestedFilter()) { + subBuilder.mergeFrom(getNestedFilter()); + } + input.readMessage(subBuilder, extensionRegistry); + setNestedFilter(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // optional string field_name = 1; + private java.lang.Object fieldName_ = ""; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + fieldName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setFieldName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + return this; + } + public Builder clearFieldName() { + bitField0_ = (bitField0_ & ~0x00000001); + fieldName_ = getDefaultInstance().getFieldName(); + onChanged(); + return this; + } + void setFieldName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + } + + // repeated string points = 2; + private com.google.protobuf.LazyStringList points_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensurePointsIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + points_ = new com.google.protobuf.LazyStringArrayList(points_); + bitField0_ |= 0x00000002; + } + } + public java.util.List + getPointsList() { + return java.util.Collections.unmodifiableList(points_); + } + public int getPointsCount() { + return points_.size(); + } + public String getPoints(int index) { + return points_.get(index); + } + public Builder setPoints( + int index, String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePointsIsMutable(); + points_.set(index, value); + onChanged(); + return this; + } + public Builder addPoints(String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePointsIsMutable(); + points_.add(value); + onChanged(); + return this; + } + public Builder addAllPoints( + java.lang.Iterable values) { + ensurePointsIsMutable(); + super.addAll(values, points_); + onChanged(); + return this; + } + public Builder clearPoints() { + points_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + void addPoints(com.google.protobuf.ByteString value) { + ensurePointsIsMutable(); + points_.add(value); + onChanged(); + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.SortOrder order = 3; + private com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder order_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.SORT_ORDER_ASC; + public boolean hasOrder() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder getOrder() { + return order_; + } + public Builder setOrder(com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + order_ = value; + onChanged(); + return this; + } + public Builder clearOrder() { + bitField0_ = (bitField0_ & ~0x00000004); + order_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortOrder.SORT_ORDER_ASC; + onChanged(); + return this; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.SortMode mode = 4; + private com.alicloud.openservices.tablestore.core.protocol.Search.SortMode mode_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortMode.SORT_MODE_MIN; + public boolean hasMode() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.SortMode getMode() { + return mode_; + } + public Builder setMode(com.alicloud.openservices.tablestore.core.protocol.Search.SortMode value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + mode_ = value; + onChanged(); + return this; + } + public Builder clearMode() { + bitField0_ = (bitField0_ & ~0x00000008); + mode_ = com.alicloud.openservices.tablestore.core.protocol.Search.SortMode.SORT_MODE_MIN; + onChanged(); + return this; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.GeoDistanceType distance_type = 5; + private com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceType distanceType_ = com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceType.GEO_DISTANCE_ARC; + public boolean hasDistanceType() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceType getDistanceType() { + return distanceType_; + } + public Builder setDistanceType(com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + distanceType_ = value; + onChanged(); + return this; + } + public Builder clearDistanceType() { + bitField0_ = (bitField0_ & ~0x00000010); + distanceType_ = com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceType.GEO_DISTANCE_ARC; + onChanged(); + return this; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.NestedFilter nested_filter = 6; + private com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter nestedFilter_ = com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter, com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilterOrBuilder> nestedFilterBuilder_; + public boolean hasNestedFilter() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter getNestedFilter() { + if (nestedFilterBuilder_ == null) { + return nestedFilter_; + } else { + return nestedFilterBuilder_.getMessage(); + } + } + public Builder setNestedFilter(com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter value) { + if (nestedFilterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + nestedFilter_ = value; + onChanged(); + } else { + nestedFilterBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + return this; + } + public Builder setNestedFilter( + com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.Builder builderForValue) { + if (nestedFilterBuilder_ == null) { + nestedFilter_ = builderForValue.build(); + onChanged(); + } else { + nestedFilterBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + return this; + } + public Builder mergeNestedFilter(com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter value) { + if (nestedFilterBuilder_ == null) { + if (((bitField0_ & 0x00000020) == 0x00000020) && + nestedFilter_ != com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.getDefaultInstance()) { + nestedFilter_ = + com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.newBuilder(nestedFilter_).mergeFrom(value).buildPartial(); + } else { + nestedFilter_ = value; + } + onChanged(); + } else { + nestedFilterBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + return this; + } + public Builder clearNestedFilter() { + if (nestedFilterBuilder_ == null) { + nestedFilter_ = com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.getDefaultInstance(); + onChanged(); + } else { + nestedFilterBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.Builder getNestedFilterBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getNestedFilterFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilterOrBuilder getNestedFilterOrBuilder() { + if (nestedFilterBuilder_ != null) { + return nestedFilterBuilder_.getMessageOrBuilder(); + } else { + return nestedFilter_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter, com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilterOrBuilder> + getNestedFilterFieldBuilder() { + if (nestedFilterBuilder_ == null) { + nestedFilterBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter, com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilterOrBuilder>( + nestedFilter_, + getParentForChildren(), + isClean()); + nestedFilter_ = null; + } + return nestedFilterBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GeoDistanceSort) + } + + static { + defaultInstance = new GeoDistanceSort(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GeoDistanceSort) + } + + public interface SorterOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional .com.alicloud.openservices.tablestore.core.protocol.FieldSort field_sort = 1; + boolean hasFieldSort(); + com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort getFieldSort(); + com.alicloud.openservices.tablestore.core.protocol.Search.FieldSortOrBuilder getFieldSortOrBuilder(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.GeoDistanceSort geo_distance_sort = 2; + boolean hasGeoDistanceSort(); + com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort getGeoDistanceSort(); + com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSortOrBuilder getGeoDistanceSortOrBuilder(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.ScoreSort score_sort = 3; + boolean hasScoreSort(); + com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort getScoreSort(); + com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSortOrBuilder getScoreSortOrBuilder(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.PrimaryKeySort pk_sort = 4; + boolean hasPkSort(); + com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort getPkSort(); + com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySortOrBuilder getPkSortOrBuilder(); + } + public static final class Sorter extends + com.google.protobuf.GeneratedMessage + implements SorterOrBuilder { + // Use Sorter.newBuilder() to construct. + private Sorter(Builder builder) { + super(builder); + } + private Sorter(boolean noInit) {} + + private static final Sorter defaultInstance; + public static Sorter getDefaultInstance() { + return defaultInstance; + } + + public Sorter getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Sorter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Sorter_fieldAccessorTable; + } + + private int bitField0_; + // optional .com.alicloud.openservices.tablestore.core.protocol.FieldSort field_sort = 1; + public static final int FIELD_SORT_FIELD_NUMBER = 1; + private com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort fieldSort_; + public boolean hasFieldSort() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort getFieldSort() { + return fieldSort_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.FieldSortOrBuilder getFieldSortOrBuilder() { + return fieldSort_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.GeoDistanceSort geo_distance_sort = 2; + public static final int GEO_DISTANCE_SORT_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort geoDistanceSort_; + public boolean hasGeoDistanceSort() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort getGeoDistanceSort() { + return geoDistanceSort_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSortOrBuilder getGeoDistanceSortOrBuilder() { + return geoDistanceSort_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.ScoreSort score_sort = 3; + public static final int SCORE_SORT_FIELD_NUMBER = 3; + private com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort scoreSort_; + public boolean hasScoreSort() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort getScoreSort() { + return scoreSort_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSortOrBuilder getScoreSortOrBuilder() { + return scoreSort_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.PrimaryKeySort pk_sort = 4; + public static final int PK_SORT_FIELD_NUMBER = 4; + private com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort pkSort_; + public boolean hasPkSort() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort getPkSort() { + return pkSort_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySortOrBuilder getPkSortOrBuilder() { + return pkSort_; + } + + private void initFields() { + fieldSort_ = com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort.getDefaultInstance(); + geoDistanceSort_ = com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort.getDefaultInstance(); + scoreSort_ = com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort.getDefaultInstance(); + pkSort_ = com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(1, fieldSort_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeMessage(2, geoDistanceSort_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeMessage(3, scoreSort_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeMessage(4, pkSort_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, fieldSort_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, geoDistanceSort_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, scoreSort_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, pkSort_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.Sorter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Sorter parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Sorter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Sorter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Sorter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Sorter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Sorter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Sorter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Sorter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Sorter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.Sorter prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.SorterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Sorter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Sorter_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.Sorter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getFieldSortFieldBuilder(); + getGeoDistanceSortFieldBuilder(); + getScoreSortFieldBuilder(); + getPkSortFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (fieldSortBuilder_ == null) { + fieldSort_ = com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort.getDefaultInstance(); + } else { + fieldSortBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (geoDistanceSortBuilder_ == null) { + geoDistanceSort_ = com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort.getDefaultInstance(); + } else { + geoDistanceSortBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + if (scoreSortBuilder_ == null) { + scoreSort_ = com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort.getDefaultInstance(); + } else { + scoreSortBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + if (pkSortBuilder_ == null) { + pkSort_ = com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort.getDefaultInstance(); + } else { + pkSortBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.Sorter.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.Sorter getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.Sorter.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.Sorter build() { + com.alicloud.openservices.tablestore.core.protocol.Search.Sorter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.Sorter buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.Sorter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.Sorter buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.Sorter result = new com.alicloud.openservices.tablestore.core.protocol.Search.Sorter(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + if (fieldSortBuilder_ == null) { + result.fieldSort_ = fieldSort_; + } else { + result.fieldSort_ = fieldSortBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + if (geoDistanceSortBuilder_ == null) { + result.geoDistanceSort_ = geoDistanceSort_; + } else { + result.geoDistanceSort_ = geoDistanceSortBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + if (scoreSortBuilder_ == null) { + result.scoreSort_ = scoreSort_; + } else { + result.scoreSort_ = scoreSortBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + if (pkSortBuilder_ == null) { + result.pkSort_ = pkSort_; + } else { + result.pkSort_ = pkSortBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.Sorter) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.Sorter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.Sorter other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.Sorter.getDefaultInstance()) return this; + if (other.hasFieldSort()) { + mergeFieldSort(other.getFieldSort()); + } + if (other.hasGeoDistanceSort()) { + mergeGeoDistanceSort(other.getGeoDistanceSort()); + } + if (other.hasScoreSort()) { + mergeScoreSort(other.getScoreSort()); + } + if (other.hasPkSort()) { + mergePkSort(other.getPkSort()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort.newBuilder(); + if (hasFieldSort()) { + subBuilder.mergeFrom(getFieldSort()); + } + input.readMessage(subBuilder, extensionRegistry); + setFieldSort(subBuilder.buildPartial()); + break; + } + case 18: { + com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort.newBuilder(); + if (hasGeoDistanceSort()) { + subBuilder.mergeFrom(getGeoDistanceSort()); + } + input.readMessage(subBuilder, extensionRegistry); + setGeoDistanceSort(subBuilder.buildPartial()); + break; + } + case 26: { + com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort.newBuilder(); + if (hasScoreSort()) { + subBuilder.mergeFrom(getScoreSort()); + } + input.readMessage(subBuilder, extensionRegistry); + setScoreSort(subBuilder.buildPartial()); + break; + } + case 34: { + com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort.newBuilder(); + if (hasPkSort()) { + subBuilder.mergeFrom(getPkSort()); + } + input.readMessage(subBuilder, extensionRegistry); + setPkSort(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // optional .com.alicloud.openservices.tablestore.core.protocol.FieldSort field_sort = 1; + private com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort fieldSort_ = com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSortOrBuilder> fieldSortBuilder_; + public boolean hasFieldSort() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort getFieldSort() { + if (fieldSortBuilder_ == null) { + return fieldSort_; + } else { + return fieldSortBuilder_.getMessage(); + } + } + public Builder setFieldSort(com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort value) { + if (fieldSortBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fieldSort_ = value; + onChanged(); + } else { + fieldSortBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder setFieldSort( + com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort.Builder builderForValue) { + if (fieldSortBuilder_ == null) { + fieldSort_ = builderForValue.build(); + onChanged(); + } else { + fieldSortBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder mergeFieldSort(com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort value) { + if (fieldSortBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001) && + fieldSort_ != com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort.getDefaultInstance()) { + fieldSort_ = + com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort.newBuilder(fieldSort_).mergeFrom(value).buildPartial(); + } else { + fieldSort_ = value; + } + onChanged(); + } else { + fieldSortBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder clearFieldSort() { + if (fieldSortBuilder_ == null) { + fieldSort_ = com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort.getDefaultInstance(); + onChanged(); + } else { + fieldSortBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort.Builder getFieldSortBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getFieldSortFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.FieldSortOrBuilder getFieldSortOrBuilder() { + if (fieldSortBuilder_ != null) { + return fieldSortBuilder_.getMessageOrBuilder(); + } else { + return fieldSort_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSortOrBuilder> + getFieldSortFieldBuilder() { + if (fieldSortBuilder_ == null) { + fieldSortBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSortOrBuilder>( + fieldSort_, + getParentForChildren(), + isClean()); + fieldSort_ = null; + } + return fieldSortBuilder_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.GeoDistanceSort geo_distance_sort = 2; + private com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort geoDistanceSort_ = com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort, com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSortOrBuilder> geoDistanceSortBuilder_; + public boolean hasGeoDistanceSort() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort getGeoDistanceSort() { + if (geoDistanceSortBuilder_ == null) { + return geoDistanceSort_; + } else { + return geoDistanceSortBuilder_.getMessage(); + } + } + public Builder setGeoDistanceSort(com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort value) { + if (geoDistanceSortBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + geoDistanceSort_ = value; + onChanged(); + } else { + geoDistanceSortBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder setGeoDistanceSort( + com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort.Builder builderForValue) { + if (geoDistanceSortBuilder_ == null) { + geoDistanceSort_ = builderForValue.build(); + onChanged(); + } else { + geoDistanceSortBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder mergeGeoDistanceSort(com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort value) { + if (geoDistanceSortBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002) && + geoDistanceSort_ != com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort.getDefaultInstance()) { + geoDistanceSort_ = + com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort.newBuilder(geoDistanceSort_).mergeFrom(value).buildPartial(); + } else { + geoDistanceSort_ = value; + } + onChanged(); + } else { + geoDistanceSortBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder clearGeoDistanceSort() { + if (geoDistanceSortBuilder_ == null) { + geoDistanceSort_ = com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort.getDefaultInstance(); + onChanged(); + } else { + geoDistanceSortBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort.Builder getGeoDistanceSortBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getGeoDistanceSortFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSortOrBuilder getGeoDistanceSortOrBuilder() { + if (geoDistanceSortBuilder_ != null) { + return geoDistanceSortBuilder_.getMessageOrBuilder(); + } else { + return geoDistanceSort_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort, com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSortOrBuilder> + getGeoDistanceSortFieldBuilder() { + if (geoDistanceSortBuilder_ == null) { + geoDistanceSortBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort, com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSortOrBuilder>( + geoDistanceSort_, + getParentForChildren(), + isClean()); + geoDistanceSort_ = null; + } + return geoDistanceSortBuilder_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.ScoreSort score_sort = 3; + private com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort scoreSort_ = com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort, com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSortOrBuilder> scoreSortBuilder_; + public boolean hasScoreSort() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort getScoreSort() { + if (scoreSortBuilder_ == null) { + return scoreSort_; + } else { + return scoreSortBuilder_.getMessage(); + } + } + public Builder setScoreSort(com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort value) { + if (scoreSortBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + scoreSort_ = value; + onChanged(); + } else { + scoreSortBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder setScoreSort( + com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort.Builder builderForValue) { + if (scoreSortBuilder_ == null) { + scoreSort_ = builderForValue.build(); + onChanged(); + } else { + scoreSortBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder mergeScoreSort(com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort value) { + if (scoreSortBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004) && + scoreSort_ != com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort.getDefaultInstance()) { + scoreSort_ = + com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort.newBuilder(scoreSort_).mergeFrom(value).buildPartial(); + } else { + scoreSort_ = value; + } + onChanged(); + } else { + scoreSortBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder clearScoreSort() { + if (scoreSortBuilder_ == null) { + scoreSort_ = com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort.getDefaultInstance(); + onChanged(); + } else { + scoreSortBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort.Builder getScoreSortBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getScoreSortFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSortOrBuilder getScoreSortOrBuilder() { + if (scoreSortBuilder_ != null) { + return scoreSortBuilder_.getMessageOrBuilder(); + } else { + return scoreSort_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort, com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSortOrBuilder> + getScoreSortFieldBuilder() { + if (scoreSortBuilder_ == null) { + scoreSortBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort, com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSortOrBuilder>( + scoreSort_, + getParentForChildren(), + isClean()); + scoreSort_ = null; + } + return scoreSortBuilder_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.PrimaryKeySort pk_sort = 4; + private com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort pkSort_ = com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort, com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySortOrBuilder> pkSortBuilder_; + public boolean hasPkSort() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort getPkSort() { + if (pkSortBuilder_ == null) { + return pkSort_; + } else { + return pkSortBuilder_.getMessage(); + } + } + public Builder setPkSort(com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort value) { + if (pkSortBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + pkSort_ = value; + onChanged(); + } else { + pkSortBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder setPkSort( + com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort.Builder builderForValue) { + if (pkSortBuilder_ == null) { + pkSort_ = builderForValue.build(); + onChanged(); + } else { + pkSortBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder mergePkSort(com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort value) { + if (pkSortBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008) && + pkSort_ != com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort.getDefaultInstance()) { + pkSort_ = + com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort.newBuilder(pkSort_).mergeFrom(value).buildPartial(); + } else { + pkSort_ = value; + } + onChanged(); + } else { + pkSortBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder clearPkSort() { + if (pkSortBuilder_ == null) { + pkSort_ = com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort.getDefaultInstance(); + onChanged(); + } else { + pkSortBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort.Builder getPkSortBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getPkSortFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySortOrBuilder getPkSortOrBuilder() { + if (pkSortBuilder_ != null) { + return pkSortBuilder_.getMessageOrBuilder(); + } else { + return pkSort_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort, com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySortOrBuilder> + getPkSortFieldBuilder() { + if (pkSortBuilder_ == null) { + pkSortBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort, com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySortOrBuilder>( + pkSort_, + getParentForChildren(), + isClean()); + pkSort_ = null; + } + return pkSortBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.Sorter) + } + + static { + defaultInstance = new Sorter(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.Sorter) + } + + public interface SortOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // repeated .com.alicloud.openservices.tablestore.core.protocol.Sorter sorter = 1; + java.util.List + getSorterList(); + com.alicloud.openservices.tablestore.core.protocol.Search.Sorter getSorter(int index); + int getSorterCount(); + java.util.List + getSorterOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.Search.SorterOrBuilder getSorterOrBuilder( + int index); + } + public static final class Sort extends + com.google.protobuf.GeneratedMessage + implements SortOrBuilder { + // Use Sort.newBuilder() to construct. + private Sort(Builder builder) { + super(builder); + } + private Sort(boolean noInit) {} + + private static final Sort defaultInstance; + public static Sort getDefaultInstance() { + return defaultInstance; + } + + public Sort getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Sort_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Sort_fieldAccessorTable; + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.Sorter sorter = 1; + public static final int SORTER_FIELD_NUMBER = 1; + private java.util.List sorter_; + public java.util.List getSorterList() { + return sorter_; + } + public java.util.List + getSorterOrBuilderList() { + return sorter_; + } + public int getSorterCount() { + return sorter_.size(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Sorter getSorter(int index) { + return sorter_.get(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.SorterOrBuilder getSorterOrBuilder( + int index) { + return sorter_.get(index); + } + + private void initFields() { + sorter_ = java.util.Collections.emptyList(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < sorter_.size(); i++) { + output.writeMessage(1, sorter_.get(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < sorter_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, sorter_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.Sort parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Sort parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Sort parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Sort parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Sort parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Sort parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Sort parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Sort parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Sort parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.Sort parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.Sort prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.SortOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Sort_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_Sort_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.Sort.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getSorterFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (sorterBuilder_ == null) { + sorter_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + sorterBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.Sort.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.Sort getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.Sort.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.Sort build() { + com.alicloud.openservices.tablestore.core.protocol.Search.Sort result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.Sort buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.Sort result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.Sort buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.Sort result = new com.alicloud.openservices.tablestore.core.protocol.Search.Sort(this); + int from_bitField0_ = bitField0_; + if (sorterBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + sorter_ = java.util.Collections.unmodifiableList(sorter_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.sorter_ = sorter_; + } else { + result.sorter_ = sorterBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.Sort) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.Sort)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.Sort other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.Sort.getDefaultInstance()) return this; + if (sorterBuilder_ == null) { + if (!other.sorter_.isEmpty()) { + if (sorter_.isEmpty()) { + sorter_ = other.sorter_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSorterIsMutable(); + sorter_.addAll(other.sorter_); + } + onChanged(); + } + } else { + if (!other.sorter_.isEmpty()) { + if (sorterBuilder_.isEmpty()) { + sorterBuilder_.dispose(); + sorterBuilder_ = null; + sorter_ = other.sorter_; + bitField0_ = (bitField0_ & ~0x00000001); + sorterBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getSorterFieldBuilder() : null; + } else { + sorterBuilder_.addAllMessages(other.sorter_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + com.alicloud.openservices.tablestore.core.protocol.Search.Sorter.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.Sorter.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addSorter(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // repeated .com.alicloud.openservices.tablestore.core.protocol.Sorter sorter = 1; + private java.util.List sorter_ = + java.util.Collections.emptyList(); + private void ensureSorterIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + sorter_ = new java.util.ArrayList(sorter_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Sorter, com.alicloud.openservices.tablestore.core.protocol.Search.Sorter.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.SorterOrBuilder> sorterBuilder_; + + public java.util.List getSorterList() { + if (sorterBuilder_ == null) { + return java.util.Collections.unmodifiableList(sorter_); + } else { + return sorterBuilder_.getMessageList(); + } + } + public int getSorterCount() { + if (sorterBuilder_ == null) { + return sorter_.size(); + } else { + return sorterBuilder_.getCount(); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Sorter getSorter(int index) { + if (sorterBuilder_ == null) { + return sorter_.get(index); + } else { + return sorterBuilder_.getMessage(index); + } + } + public Builder setSorter( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.Sorter value) { + if (sorterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSorterIsMutable(); + sorter_.set(index, value); + onChanged(); + } else { + sorterBuilder_.setMessage(index, value); + } + return this; + } + public Builder setSorter( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.Sorter.Builder builderForValue) { + if (sorterBuilder_ == null) { + ensureSorterIsMutable(); + sorter_.set(index, builderForValue.build()); + onChanged(); + } else { + sorterBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + public Builder addSorter(com.alicloud.openservices.tablestore.core.protocol.Search.Sorter value) { + if (sorterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSorterIsMutable(); + sorter_.add(value); + onChanged(); + } else { + sorterBuilder_.addMessage(value); + } + return this; + } + public Builder addSorter( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.Sorter value) { + if (sorterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSorterIsMutable(); + sorter_.add(index, value); + onChanged(); + } else { + sorterBuilder_.addMessage(index, value); + } + return this; + } + public Builder addSorter( + com.alicloud.openservices.tablestore.core.protocol.Search.Sorter.Builder builderForValue) { + if (sorterBuilder_ == null) { + ensureSorterIsMutable(); + sorter_.add(builderForValue.build()); + onChanged(); + } else { + sorterBuilder_.addMessage(builderForValue.build()); + } + return this; + } + public Builder addSorter( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.Sorter.Builder builderForValue) { + if (sorterBuilder_ == null) { + ensureSorterIsMutable(); + sorter_.add(index, builderForValue.build()); + onChanged(); + } else { + sorterBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAllSorter( + java.lang.Iterable values) { + if (sorterBuilder_ == null) { + ensureSorterIsMutable(); + super.addAll(values, sorter_); + onChanged(); + } else { + sorterBuilder_.addAllMessages(values); + } + return this; + } + public Builder clearSorter() { + if (sorterBuilder_ == null) { + sorter_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + sorterBuilder_.clear(); + } + return this; + } + public Builder removeSorter(int index) { + if (sorterBuilder_ == null) { + ensureSorterIsMutable(); + sorter_.remove(index); + onChanged(); + } else { + sorterBuilder_.remove(index); + } + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Sorter.Builder getSorterBuilder( + int index) { + return getSorterFieldBuilder().getBuilder(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.SorterOrBuilder getSorterOrBuilder( + int index) { + if (sorterBuilder_ == null) { + return sorter_.get(index); } else { + return sorterBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getSorterOrBuilderList() { + if (sorterBuilder_ != null) { + return sorterBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(sorter_); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Sorter.Builder addSorterBuilder() { + return getSorterFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.Search.Sorter.getDefaultInstance()); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Sorter.Builder addSorterBuilder( + int index) { + return getSorterFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.Search.Sorter.getDefaultInstance()); + } + public java.util.List + getSorterBuilderList() { + return getSorterFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Sorter, com.alicloud.openservices.tablestore.core.protocol.Search.Sorter.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.SorterOrBuilder> + getSorterFieldBuilder() { + if (sorterBuilder_ == null) { + sorterBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Sorter, com.alicloud.openservices.tablestore.core.protocol.Search.Sorter.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.SorterOrBuilder>( + sorter_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + sorter_ = null; + } + return sorterBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.Sort) + } + + static { + defaultInstance = new Sort(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.Sort) + } + + public interface SearchQueryOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional int32 offset = 1; + boolean hasOffset(); + int getOffset(); + + // optional int32 limit = 2; + boolean hasLimit(); + int getLimit(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.Query query = 4; + boolean hasQuery(); + com.alicloud.openservices.tablestore.core.protocol.Search.Query getQuery(); + com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getQueryOrBuilder(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.Collapse collapse = 5; + boolean hasCollapse(); + com.alicloud.openservices.tablestore.core.protocol.Search.Collapse getCollapse(); + com.alicloud.openservices.tablestore.core.protocol.Search.CollapseOrBuilder getCollapseOrBuilder(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.Sort sort = 6; + boolean hasSort(); + com.alicloud.openservices.tablestore.core.protocol.Search.Sort getSort(); + com.alicloud.openservices.tablestore.core.protocol.Search.SortOrBuilder getSortOrBuilder(); + + // optional bool getTotalCount = 8; + boolean hasGetTotalCount(); + boolean getGetTotalCount(); + + // optional bytes token = 9; + boolean hasToken(); + com.google.protobuf.ByteString getToken(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.Aggregations aggs = 10; + boolean hasAggs(); + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations getAggs(); + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsOrBuilder getAggsOrBuilder(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.GroupBys group_bys = 11; + boolean hasGroupBys(); + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys getGroupBys(); + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysOrBuilder getGroupBysOrBuilder(); + } + public static final class SearchQuery extends + com.google.protobuf.GeneratedMessage + implements SearchQueryOrBuilder { + // Use SearchQuery.newBuilder() to construct. + private SearchQuery(Builder builder) { + super(builder); + } + private SearchQuery(boolean noInit) {} + + private static final SearchQuery defaultInstance; + public static SearchQuery getDefaultInstance() { + return defaultInstance; + } + + public SearchQuery getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SearchQuery_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SearchQuery_fieldAccessorTable; + } + + private int bitField0_; + // optional int32 offset = 1; + public static final int OFFSET_FIELD_NUMBER = 1; + private int offset_; + public boolean hasOffset() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public int getOffset() { + return offset_; + } + + // optional int32 limit = 2; + public static final int LIMIT_FIELD_NUMBER = 2; + private int limit_; + public boolean hasLimit() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public int getLimit() { + return limit_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.Query query = 4; + public static final int QUERY_FIELD_NUMBER = 4; + private com.alicloud.openservices.tablestore.core.protocol.Search.Query query_; + public boolean hasQuery() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Query getQuery() { + return query_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getQueryOrBuilder() { + return query_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.Collapse collapse = 5; + public static final int COLLAPSE_FIELD_NUMBER = 5; + private com.alicloud.openservices.tablestore.core.protocol.Search.Collapse collapse_; + public boolean hasCollapse() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Collapse getCollapse() { + return collapse_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.CollapseOrBuilder getCollapseOrBuilder() { + return collapse_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.Sort sort = 6; + public static final int SORT_FIELD_NUMBER = 6; + private com.alicloud.openservices.tablestore.core.protocol.Search.Sort sort_; + public boolean hasSort() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Sort getSort() { + return sort_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.SortOrBuilder getSortOrBuilder() { + return sort_; + } + + // optional bool getTotalCount = 8; + public static final int GETTOTALCOUNT_FIELD_NUMBER = 8; + private boolean getTotalCount_; + public boolean hasGetTotalCount() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + public boolean getGetTotalCount() { + return getTotalCount_; + } + + // optional bytes token = 9; + public static final int TOKEN_FIELD_NUMBER = 9; + private com.google.protobuf.ByteString token_; + public boolean hasToken() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + public com.google.protobuf.ByteString getToken() { + return token_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.Aggregations aggs = 10; + public static final int AGGS_FIELD_NUMBER = 10; + private com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations aggs_; + public boolean hasAggs() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations getAggs() { + return aggs_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsOrBuilder getAggsOrBuilder() { + return aggs_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.GroupBys group_bys = 11; + public static final int GROUP_BYS_FIELD_NUMBER = 11; + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys groupBys_; + public boolean hasGroupBys() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys getGroupBys() { + return groupBys_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysOrBuilder getGroupBysOrBuilder() { + return groupBys_; + } + + private void initFields() { + offset_ = 0; + limit_ = 0; + query_ = com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance(); + collapse_ = com.alicloud.openservices.tablestore.core.protocol.Search.Collapse.getDefaultInstance(); + sort_ = com.alicloud.openservices.tablestore.core.protocol.Search.Sort.getDefaultInstance(); + getTotalCount_ = false; + token_ = com.google.protobuf.ByteString.EMPTY; + aggs_ = com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.getDefaultInstance(); + groupBys_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeInt32(1, offset_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeInt32(2, limit_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeMessage(4, query_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeMessage(5, collapse_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeMessage(6, sort_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeBool(8, getTotalCount_); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + output.writeBytes(9, token_); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + output.writeMessage(10, aggs_); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + output.writeMessage(11, groupBys_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, offset_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, limit_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, query_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, collapse_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, sort_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(8, getTotalCount_); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(9, token_); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, aggs_); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, groupBys_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.SearchQueryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SearchQuery_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SearchQuery_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getQueryFieldBuilder(); + getCollapseFieldBuilder(); + getSortFieldBuilder(); + getAggsFieldBuilder(); + getGroupBysFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + offset_ = 0; + bitField0_ = (bitField0_ & ~0x00000001); + limit_ = 0; + bitField0_ = (bitField0_ & ~0x00000002); + if (queryBuilder_ == null) { + query_ = com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance(); + } else { + queryBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + if (collapseBuilder_ == null) { + collapse_ = com.alicloud.openservices.tablestore.core.protocol.Search.Collapse.getDefaultInstance(); + } else { + collapseBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + if (sortBuilder_ == null) { + sort_ = com.alicloud.openservices.tablestore.core.protocol.Search.Sort.getDefaultInstance(); + } else { + sortBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + getTotalCount_ = false; + bitField0_ = (bitField0_ & ~0x00000020); + token_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000040); + if (aggsBuilder_ == null) { + aggs_ = com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.getDefaultInstance(); + } else { + aggsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000080); + if (groupBysBuilder_ == null) { + groupBys_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.getDefaultInstance(); + } else { + groupBysBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000100); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery build() { + com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery result = new com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.offset_ = offset_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.limit_ = limit_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + if (queryBuilder_ == null) { + result.query_ = query_; + } else { + result.query_ = queryBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + if (collapseBuilder_ == null) { + result.collapse_ = collapse_; + } else { + result.collapse_ = collapseBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + if (sortBuilder_ == null) { + result.sort_ = sort_; + } else { + result.sort_ = sortBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000020; + } + result.getTotalCount_ = getTotalCount_; + if (((from_bitField0_ & 0x00000040) == 0x00000040)) { + to_bitField0_ |= 0x00000040; + } + result.token_ = token_; + if (((from_bitField0_ & 0x00000080) == 0x00000080)) { + to_bitField0_ |= 0x00000080; + } + if (aggsBuilder_ == null) { + result.aggs_ = aggs_; + } else { + result.aggs_ = aggsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000100) == 0x00000100)) { + to_bitField0_ |= 0x00000100; + } + if (groupBysBuilder_ == null) { + result.groupBys_ = groupBys_; + } else { + result.groupBys_ = groupBysBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery.getDefaultInstance()) return this; + if (other.hasOffset()) { + setOffset(other.getOffset()); + } + if (other.hasLimit()) { + setLimit(other.getLimit()); + } + if (other.hasQuery()) { + mergeQuery(other.getQuery()); + } + if (other.hasCollapse()) { + mergeCollapse(other.getCollapse()); + } + if (other.hasSort()) { + mergeSort(other.getSort()); + } + if (other.hasGetTotalCount()) { + setGetTotalCount(other.getGetTotalCount()); + } + if (other.hasToken()) { + setToken(other.getToken()); + } + if (other.hasAggs()) { + mergeAggs(other.getAggs()); + } + if (other.hasGroupBys()) { + mergeGroupBys(other.getGroupBys()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + offset_ = input.readInt32(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + limit_ = input.readInt32(); + break; + } + case 34: { + com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.Query.newBuilder(); + if (hasQuery()) { + subBuilder.mergeFrom(getQuery()); + } + input.readMessage(subBuilder, extensionRegistry); + setQuery(subBuilder.buildPartial()); + break; + } + case 42: { + com.alicloud.openservices.tablestore.core.protocol.Search.Collapse.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.Collapse.newBuilder(); + if (hasCollapse()) { + subBuilder.mergeFrom(getCollapse()); + } + input.readMessage(subBuilder, extensionRegistry); + setCollapse(subBuilder.buildPartial()); + break; + } + case 50: { + com.alicloud.openservices.tablestore.core.protocol.Search.Sort.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.Sort.newBuilder(); + if (hasSort()) { + subBuilder.mergeFrom(getSort()); + } + input.readMessage(subBuilder, extensionRegistry); + setSort(subBuilder.buildPartial()); + break; + } + case 64: { + bitField0_ |= 0x00000020; + getTotalCount_ = input.readBool(); + break; + } + case 74: { + bitField0_ |= 0x00000040; + token_ = input.readBytes(); + break; + } + case 82: { + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.newBuilder(); + if (hasAggs()) { + subBuilder.mergeFrom(getAggs()); + } + input.readMessage(subBuilder, extensionRegistry); + setAggs(subBuilder.buildPartial()); + break; + } + case 90: { + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.newBuilder(); + if (hasGroupBys()) { + subBuilder.mergeFrom(getGroupBys()); + } + input.readMessage(subBuilder, extensionRegistry); + setGroupBys(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // optional int32 offset = 1; + private int offset_ ; + public boolean hasOffset() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public int getOffset() { + return offset_; + } + public Builder setOffset(int value) { + bitField0_ |= 0x00000001; + offset_ = value; + onChanged(); + return this; + } + public Builder clearOffset() { + bitField0_ = (bitField0_ & ~0x00000001); + offset_ = 0; + onChanged(); + return this; + } + + // optional int32 limit = 2; + private int limit_ ; + public boolean hasLimit() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public int getLimit() { + return limit_; + } + public Builder setLimit(int value) { + bitField0_ |= 0x00000002; + limit_ = value; + onChanged(); + return this; + } + public Builder clearLimit() { + bitField0_ = (bitField0_ & ~0x00000002); + limit_ = 0; + onChanged(); + return this; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.Query query = 4; + private com.alicloud.openservices.tablestore.core.protocol.Search.Query query_ = com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder> queryBuilder_; + public boolean hasQuery() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Query getQuery() { + if (queryBuilder_ == null) { + return query_; + } else { + return queryBuilder_.getMessage(); + } + } + public Builder setQuery(com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { + if (queryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + query_ = value; + onChanged(); + } else { + queryBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder setQuery( + com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder builderForValue) { + if (queryBuilder_ == null) { + query_ = builderForValue.build(); + onChanged(); + } else { + queryBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder mergeQuery(com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { + if (queryBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004) && + query_ != com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance()) { + query_ = + com.alicloud.openservices.tablestore.core.protocol.Search.Query.newBuilder(query_).mergeFrom(value).buildPartial(); + } else { + query_ = value; + } + onChanged(); + } else { + queryBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder clearQuery() { + if (queryBuilder_ == null) { + query_ = com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance(); + onChanged(); + } else { + queryBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder getQueryBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getQueryFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getQueryOrBuilder() { + if (queryBuilder_ != null) { + return queryBuilder_.getMessageOrBuilder(); + } else { + return query_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder> + getQueryFieldBuilder() { + if (queryBuilder_ == null) { + queryBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder>( + query_, + getParentForChildren(), + isClean()); + query_ = null; + } + return queryBuilder_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.Collapse collapse = 5; + private com.alicloud.openservices.tablestore.core.protocol.Search.Collapse collapse_ = com.alicloud.openservices.tablestore.core.protocol.Search.Collapse.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Collapse, com.alicloud.openservices.tablestore.core.protocol.Search.Collapse.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.CollapseOrBuilder> collapseBuilder_; + public boolean hasCollapse() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Collapse getCollapse() { + if (collapseBuilder_ == null) { + return collapse_; + } else { + return collapseBuilder_.getMessage(); + } + } + public Builder setCollapse(com.alicloud.openservices.tablestore.core.protocol.Search.Collapse value) { + if (collapseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + collapse_ = value; + onChanged(); + } else { + collapseBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder setCollapse( + com.alicloud.openservices.tablestore.core.protocol.Search.Collapse.Builder builderForValue) { + if (collapseBuilder_ == null) { + collapse_ = builderForValue.build(); + onChanged(); + } else { + collapseBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder mergeCollapse(com.alicloud.openservices.tablestore.core.protocol.Search.Collapse value) { + if (collapseBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008) && + collapse_ != com.alicloud.openservices.tablestore.core.protocol.Search.Collapse.getDefaultInstance()) { + collapse_ = + com.alicloud.openservices.tablestore.core.protocol.Search.Collapse.newBuilder(collapse_).mergeFrom(value).buildPartial(); + } else { + collapse_ = value; + } + onChanged(); + } else { + collapseBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder clearCollapse() { + if (collapseBuilder_ == null) { + collapse_ = com.alicloud.openservices.tablestore.core.protocol.Search.Collapse.getDefaultInstance(); + onChanged(); + } else { + collapseBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Collapse.Builder getCollapseBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getCollapseFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.CollapseOrBuilder getCollapseOrBuilder() { + if (collapseBuilder_ != null) { + return collapseBuilder_.getMessageOrBuilder(); + } else { + return collapse_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Collapse, com.alicloud.openservices.tablestore.core.protocol.Search.Collapse.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.CollapseOrBuilder> + getCollapseFieldBuilder() { + if (collapseBuilder_ == null) { + collapseBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Collapse, com.alicloud.openservices.tablestore.core.protocol.Search.Collapse.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.CollapseOrBuilder>( + collapse_, + getParentForChildren(), + isClean()); + collapse_ = null; + } + return collapseBuilder_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.Sort sort = 6; + private com.alicloud.openservices.tablestore.core.protocol.Search.Sort sort_ = com.alicloud.openservices.tablestore.core.protocol.Search.Sort.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Sort, com.alicloud.openservices.tablestore.core.protocol.Search.Sort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.SortOrBuilder> sortBuilder_; + public boolean hasSort() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Sort getSort() { + if (sortBuilder_ == null) { + return sort_; + } else { + return sortBuilder_.getMessage(); + } + } + public Builder setSort(com.alicloud.openservices.tablestore.core.protocol.Search.Sort value) { + if (sortBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sort_ = value; + onChanged(); + } else { + sortBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + return this; + } + public Builder setSort( + com.alicloud.openservices.tablestore.core.protocol.Search.Sort.Builder builderForValue) { + if (sortBuilder_ == null) { + sort_ = builderForValue.build(); + onChanged(); + } else { + sortBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + return this; + } + public Builder mergeSort(com.alicloud.openservices.tablestore.core.protocol.Search.Sort value) { + if (sortBuilder_ == null) { + if (((bitField0_ & 0x00000010) == 0x00000010) && + sort_ != com.alicloud.openservices.tablestore.core.protocol.Search.Sort.getDefaultInstance()) { + sort_ = + com.alicloud.openservices.tablestore.core.protocol.Search.Sort.newBuilder(sort_).mergeFrom(value).buildPartial(); + } else { + sort_ = value; + } + onChanged(); + } else { + sortBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + return this; + } + public Builder clearSort() { + if (sortBuilder_ == null) { + sort_ = com.alicloud.openservices.tablestore.core.protocol.Search.Sort.getDefaultInstance(); + onChanged(); + } else { + sortBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Sort.Builder getSortBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getSortFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.SortOrBuilder getSortOrBuilder() { + if (sortBuilder_ != null) { + return sortBuilder_.getMessageOrBuilder(); + } else { + return sort_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Sort, com.alicloud.openservices.tablestore.core.protocol.Search.Sort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.SortOrBuilder> + getSortFieldBuilder() { + if (sortBuilder_ == null) { + sortBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Sort, com.alicloud.openservices.tablestore.core.protocol.Search.Sort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.SortOrBuilder>( + sort_, + getParentForChildren(), + isClean()); + sort_ = null; + } + return sortBuilder_; + } + + // optional bool getTotalCount = 8; + private boolean getTotalCount_ ; + public boolean hasGetTotalCount() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + public boolean getGetTotalCount() { + return getTotalCount_; + } + public Builder setGetTotalCount(boolean value) { + bitField0_ |= 0x00000020; + getTotalCount_ = value; + onChanged(); + return this; + } + public Builder clearGetTotalCount() { + bitField0_ = (bitField0_ & ~0x00000020); + getTotalCount_ = false; + onChanged(); + return this; + } + + // optional bytes token = 9; + private com.google.protobuf.ByteString token_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasToken() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + public com.google.protobuf.ByteString getToken() { + return token_; + } + public Builder setToken(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + token_ = value; + onChanged(); + return this; + } + public Builder clearToken() { + bitField0_ = (bitField0_ & ~0x00000040); + token_ = getDefaultInstance().getToken(); + onChanged(); + return this; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.Aggregations aggs = 10; + private com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations aggs_ = com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations, com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsOrBuilder> aggsBuilder_; + public boolean hasAggs() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations getAggs() { + if (aggsBuilder_ == null) { + return aggs_; + } else { + return aggsBuilder_.getMessage(); + } + } + public Builder setAggs(com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations value) { + if (aggsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + aggs_ = value; + onChanged(); + } else { + aggsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + return this; + } + public Builder setAggs( + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.Builder builderForValue) { + if (aggsBuilder_ == null) { + aggs_ = builderForValue.build(); + onChanged(); + } else { + aggsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + return this; + } + public Builder mergeAggs(com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations value) { + if (aggsBuilder_ == null) { + if (((bitField0_ & 0x00000080) == 0x00000080) && + aggs_ != com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.getDefaultInstance()) { + aggs_ = + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.newBuilder(aggs_).mergeFrom(value).buildPartial(); + } else { + aggs_ = value; + } + onChanged(); + } else { + aggsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + return this; + } + public Builder clearAggs() { + if (aggsBuilder_ == null) { + aggs_ = com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.getDefaultInstance(); + onChanged(); + } else { + aggsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000080); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.Builder getAggsBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getAggsFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsOrBuilder getAggsOrBuilder() { + if (aggsBuilder_ != null) { + return aggsBuilder_.getMessageOrBuilder(); + } else { + return aggs_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations, com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsOrBuilder> + getAggsFieldBuilder() { + if (aggsBuilder_ == null) { + aggsBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations, com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsOrBuilder>( + aggs_, + getParentForChildren(), + isClean()); + aggs_ = null; + } + return aggsBuilder_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.GroupBys group_bys = 11; + private com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys groupBys_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysOrBuilder> groupBysBuilder_; + public boolean hasGroupBys() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys getGroupBys() { + if (groupBysBuilder_ == null) { + return groupBys_; + } else { + return groupBysBuilder_.getMessage(); + } + } + public Builder setGroupBys(com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys value) { + if (groupBysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + groupBys_ = value; + onChanged(); + } else { + groupBysBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + return this; + } + public Builder setGroupBys( + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.Builder builderForValue) { + if (groupBysBuilder_ == null) { + groupBys_ = builderForValue.build(); + onChanged(); + } else { + groupBysBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + return this; + } + public Builder mergeGroupBys(com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys value) { + if (groupBysBuilder_ == null) { + if (((bitField0_ & 0x00000100) == 0x00000100) && + groupBys_ != com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.getDefaultInstance()) { + groupBys_ = + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.newBuilder(groupBys_).mergeFrom(value).buildPartial(); + } else { + groupBys_ = value; + } + onChanged(); + } else { + groupBysBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000100; + return this; + } + public Builder clearGroupBys() { + if (groupBysBuilder_ == null) { + groupBys_ = com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.getDefaultInstance(); + onChanged(); + } else { + groupBysBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000100); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.Builder getGroupBysBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return getGroupBysFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysOrBuilder getGroupBysOrBuilder() { + if (groupBysBuilder_ != null) { + return groupBysBuilder_.getMessageOrBuilder(); + } else { + return groupBys_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysOrBuilder> + getGroupBysFieldBuilder() { + if (groupBysBuilder_ == null) { + groupBysBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysOrBuilder>( + groupBys_, + getParentForChildren(), + isClean()); + groupBys_ = null; + } + return groupBysBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.SearchQuery) + } + + static { + defaultInstance = new SearchQuery(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.SearchQuery) + } + + public interface ColumnsToGetOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional .com.alicloud.openservices.tablestore.core.protocol.ColumnReturnType return_type = 1; + boolean hasReturnType(); + com.alicloud.openservices.tablestore.core.protocol.Search.ColumnReturnType getReturnType(); + + // repeated string column_names = 2; + java.util.List getColumnNamesList(); + int getColumnNamesCount(); + String getColumnNames(int index); + } + public static final class ColumnsToGet extends + com.google.protobuf.GeneratedMessage + implements ColumnsToGetOrBuilder { + // Use ColumnsToGet.newBuilder() to construct. + private ColumnsToGet(Builder builder) { + super(builder); + } + private ColumnsToGet(boolean noInit) {} + + private static final ColumnsToGet defaultInstance; + public static ColumnsToGet getDefaultInstance() { + return defaultInstance; + } + + public ColumnsToGet getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ColumnsToGet_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ColumnsToGet_fieldAccessorTable; + } + + private int bitField0_; + // optional .com.alicloud.openservices.tablestore.core.protocol.ColumnReturnType return_type = 1; + public static final int RETURN_TYPE_FIELD_NUMBER = 1; + private com.alicloud.openservices.tablestore.core.protocol.Search.ColumnReturnType returnType_; + public boolean hasReturnType() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.ColumnReturnType getReturnType() { + return returnType_; + } + + // repeated string column_names = 2; + public static final int COLUMN_NAMES_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList columnNames_; + public java.util.List + getColumnNamesList() { + return columnNames_; + } + public int getColumnNamesCount() { + return columnNames_.size(); + } + public String getColumnNames(int index) { + return columnNames_.get(index); + } + + private void initFields() { + returnType_ = com.alicloud.openservices.tablestore.core.protocol.Search.ColumnReturnType.RETURN_ALL; + columnNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeEnum(1, returnType_.getNumber()); + } + for (int i = 0; i < columnNames_.size(); i++) { + output.writeBytes(2, columnNames_.getByteString(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, returnType_.getNumber()); + } + { + int dataSize = 0; + for (int i = 0; i < columnNames_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(columnNames_.getByteString(i)); + } + size += dataSize; + size += 1 * getColumnNamesList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ColumnsToGet_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ColumnsToGet_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + returnType_ = com.alicloud.openservices.tablestore.core.protocol.Search.ColumnReturnType.RETURN_ALL; + bitField0_ = (bitField0_ & ~0x00000001); + columnNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet build() { + com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet result = new com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.returnType_ = returnType_; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + columnNames_ = new com.google.protobuf.UnmodifiableLazyStringList( + columnNames_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.columnNames_ = columnNames_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet.getDefaultInstance()) return this; + if (other.hasReturnType()) { + setReturnType(other.getReturnType()); + } + if (!other.columnNames_.isEmpty()) { + if (columnNames_.isEmpty()) { + columnNames_ = other.columnNames_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureColumnNamesIsMutable(); + columnNames_.addAll(other.columnNames_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.Search.ColumnReturnType value = com.alicloud.openservices.tablestore.core.protocol.Search.ColumnReturnType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + returnType_ = value; + } + break; + } + case 18: { + ensureColumnNamesIsMutable(); + columnNames_.add(input.readBytes()); + break; + } + } + } + } + + private int bitField0_; + + // optional .com.alicloud.openservices.tablestore.core.protocol.ColumnReturnType return_type = 1; + private com.alicloud.openservices.tablestore.core.protocol.Search.ColumnReturnType returnType_ = com.alicloud.openservices.tablestore.core.protocol.Search.ColumnReturnType.RETURN_ALL; + public boolean hasReturnType() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.ColumnReturnType getReturnType() { + return returnType_; + } + public Builder setReturnType(com.alicloud.openservices.tablestore.core.protocol.Search.ColumnReturnType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + returnType_ = value; + onChanged(); + return this; + } + public Builder clearReturnType() { + bitField0_ = (bitField0_ & ~0x00000001); + returnType_ = com.alicloud.openservices.tablestore.core.protocol.Search.ColumnReturnType.RETURN_ALL; + onChanged(); + return this; + } + + // repeated string column_names = 2; + private com.google.protobuf.LazyStringList columnNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureColumnNamesIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + columnNames_ = new com.google.protobuf.LazyStringArrayList(columnNames_); + bitField0_ |= 0x00000002; + } + } + public java.util.List + getColumnNamesList() { + return java.util.Collections.unmodifiableList(columnNames_); + } + public int getColumnNamesCount() { + return columnNames_.size(); + } + public String getColumnNames(int index) { + return columnNames_.get(index); + } + public Builder setColumnNames( + int index, String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureColumnNamesIsMutable(); + columnNames_.set(index, value); + onChanged(); + return this; + } + public Builder addColumnNames(String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureColumnNamesIsMutable(); + columnNames_.add(value); + onChanged(); + return this; + } + public Builder addAllColumnNames( + java.lang.Iterable values) { + ensureColumnNamesIsMutable(); + super.addAll(values, columnNames_); + onChanged(); + return this; + } + public Builder clearColumnNames() { + columnNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + void addColumnNames(com.google.protobuf.ByteString value) { + ensureColumnNamesIsMutable(); + columnNames_.add(value); + onChanged(); + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.ColumnsToGet) + } + + static { + defaultInstance = new ColumnsToGet(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.ColumnsToGet) + } + + public interface SearchRequestOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string table_name = 1; + boolean hasTableName(); + String getTableName(); + + // optional string index_name = 2; + boolean hasIndexName(); + String getIndexName(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.ColumnsToGet columns_to_get = 3; + boolean hasColumnsToGet(); + com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet getColumnsToGet(); + com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGetOrBuilder getColumnsToGetOrBuilder(); + + // optional bytes search_query = 4; + boolean hasSearchQuery(); + com.google.protobuf.ByteString getSearchQuery(); + + // repeated bytes routing_values = 5; + java.util.List getRoutingValuesList(); + int getRoutingValuesCount(); + com.google.protobuf.ByteString getRoutingValues(int index); + + // optional int32 timeout_ms = 6; + boolean hasTimeoutMs(); + int getTimeoutMs(); + } + public static final class SearchRequest extends + com.google.protobuf.GeneratedMessage + implements SearchRequestOrBuilder { + // Use SearchRequest.newBuilder() to construct. + private SearchRequest(Builder builder) { + super(builder); + } + private SearchRequest(boolean noInit) {} + + private static final SearchRequest defaultInstance; + public static SearchRequest getDefaultInstance() { + return defaultInstance; + } + + public SearchRequest getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SearchRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SearchRequest_fieldAccessorTable; + } + + private int bitField0_; + // optional string table_name = 1; + public static final int TABLE_NAME_FIELD_NUMBER = 1; + private java.lang.Object tableName_; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + tableName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional string index_name = 2; + public static final int INDEX_NAME_FIELD_NUMBER = 2; + private java.lang.Object indexName_; + public boolean hasIndexName() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getIndexName() { + java.lang.Object ref = indexName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + indexName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getIndexNameBytes() { + java.lang.Object ref = indexName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + indexName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.ColumnsToGet columns_to_get = 3; + public static final int COLUMNS_TO_GET_FIELD_NUMBER = 3; + private com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet columnsToGet_; + public boolean hasColumnsToGet() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet getColumnsToGet() { + return columnsToGet_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGetOrBuilder getColumnsToGetOrBuilder() { + return columnsToGet_; + } + + // optional bytes search_query = 4; + public static final int SEARCH_QUERY_FIELD_NUMBER = 4; + private com.google.protobuf.ByteString searchQuery_; + public boolean hasSearchQuery() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.google.protobuf.ByteString getSearchQuery() { + return searchQuery_; + } + + // repeated bytes routing_values = 5; + public static final int ROUTING_VALUES_FIELD_NUMBER = 5; + private java.util.List routingValues_; + public java.util.List + getRoutingValuesList() { + return routingValues_; + } + public int getRoutingValuesCount() { + return routingValues_.size(); + } + public com.google.protobuf.ByteString getRoutingValues(int index) { + return routingValues_.get(index); + } + + // optional int32 timeout_ms = 6; + public static final int TIMEOUT_MS_FIELD_NUMBER = 6; + private int timeoutMs_; + public boolean hasTimeoutMs() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public int getTimeoutMs() { + return timeoutMs_; + } + + private void initFields() { + tableName_ = ""; + indexName_ = ""; + columnsToGet_ = com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet.getDefaultInstance(); + searchQuery_ = com.google.protobuf.ByteString.EMPTY; + routingValues_ = java.util.Collections.emptyList();; + timeoutMs_ = 0; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getIndexNameBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeMessage(3, columnsToGet_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeBytes(4, searchQuery_); + } + for (int i = 0; i < routingValues_.size(); i++) { + output.writeBytes(5, routingValues_.get(i)); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeInt32(6, timeoutMs_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getIndexNameBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, columnsToGet_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(4, searchQuery_); + } + { + int dataSize = 0; + for (int i = 0; i < routingValues_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(routingValues_.get(i)); + } + size += dataSize; + size += 1 * getRoutingValuesList().size(); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(6, timeoutMs_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SearchRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SearchRequest_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getColumnsToGetFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + tableName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + indexName_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + if (columnsToGetBuilder_ == null) { + columnsToGet_ = com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet.getDefaultInstance(); + } else { + columnsToGetBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + searchQuery_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + routingValues_ = java.util.Collections.emptyList();; + bitField0_ = (bitField0_ & ~0x00000010); + timeoutMs_ = 0; + bitField0_ = (bitField0_ & ~0x00000020); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest build() { + com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest result = new com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.tableName_ = tableName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.indexName_ = indexName_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + if (columnsToGetBuilder_ == null) { + result.columnsToGet_ = columnsToGet_; + } else { + result.columnsToGet_ = columnsToGetBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.searchQuery_ = searchQuery_; + if (((bitField0_ & 0x00000010) == 0x00000010)) { + routingValues_ = java.util.Collections.unmodifiableList(routingValues_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.routingValues_ = routingValues_; + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000010; + } + result.timeoutMs_ = timeoutMs_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest.getDefaultInstance()) return this; + if (other.hasTableName()) { + setTableName(other.getTableName()); + } + if (other.hasIndexName()) { + setIndexName(other.getIndexName()); + } + if (other.hasColumnsToGet()) { + mergeColumnsToGet(other.getColumnsToGet()); + } + if (other.hasSearchQuery()) { + setSearchQuery(other.getSearchQuery()); + } + if (!other.routingValues_.isEmpty()) { + if (routingValues_.isEmpty()) { + routingValues_ = other.routingValues_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureRoutingValuesIsMutable(); + routingValues_.addAll(other.routingValues_); + } + onChanged(); + } + if (other.hasTimeoutMs()) { + setTimeoutMs(other.getTimeoutMs()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + tableName_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + indexName_ = input.readBytes(); + break; + } + case 26: { + com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet.newBuilder(); + if (hasColumnsToGet()) { + subBuilder.mergeFrom(getColumnsToGet()); + } + input.readMessage(subBuilder, extensionRegistry); + setColumnsToGet(subBuilder.buildPartial()); + break; + } + case 34: { + bitField0_ |= 0x00000008; + searchQuery_ = input.readBytes(); + break; + } + case 42: { + ensureRoutingValuesIsMutable(); + routingValues_.add(input.readBytes()); + break; + } + case 48: { + bitField0_ |= 0x00000020; + timeoutMs_ = input.readInt32(); + break; + } + } + } + } + + private int bitField0_; + + // optional string table_name = 1; + private java.lang.Object tableName_ = ""; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + tableName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setTableName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + return this; + } + public Builder clearTableName() { + bitField0_ = (bitField0_ & ~0x00000001); + tableName_ = getDefaultInstance().getTableName(); + onChanged(); + return this; + } + void setTableName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + } + + // optional string index_name = 2; + private java.lang.Object indexName_ = ""; + public boolean hasIndexName() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getIndexName() { + java.lang.Object ref = indexName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + indexName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setIndexName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + indexName_ = value; + onChanged(); + return this; + } + public Builder clearIndexName() { + bitField0_ = (bitField0_ & ~0x00000002); + indexName_ = getDefaultInstance().getIndexName(); + onChanged(); + return this; + } + void setIndexName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000002; + indexName_ = value; + onChanged(); + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.ColumnsToGet columns_to_get = 3; + private com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet columnsToGet_ = com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet, com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGetOrBuilder> columnsToGetBuilder_; + public boolean hasColumnsToGet() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet getColumnsToGet() { + if (columnsToGetBuilder_ == null) { + return columnsToGet_; + } else { + return columnsToGetBuilder_.getMessage(); + } + } + public Builder setColumnsToGet(com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet value) { + if (columnsToGetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + columnsToGet_ = value; + onChanged(); + } else { + columnsToGetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder setColumnsToGet( + com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet.Builder builderForValue) { + if (columnsToGetBuilder_ == null) { + columnsToGet_ = builderForValue.build(); + onChanged(); + } else { + columnsToGetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder mergeColumnsToGet(com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet value) { + if (columnsToGetBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004) && + columnsToGet_ != com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet.getDefaultInstance()) { + columnsToGet_ = + com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet.newBuilder(columnsToGet_).mergeFrom(value).buildPartial(); + } else { + columnsToGet_ = value; + } + onChanged(); + } else { + columnsToGetBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder clearColumnsToGet() { + if (columnsToGetBuilder_ == null) { + columnsToGet_ = com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet.getDefaultInstance(); + onChanged(); + } else { + columnsToGetBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet.Builder getColumnsToGetBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getColumnsToGetFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGetOrBuilder getColumnsToGetOrBuilder() { + if (columnsToGetBuilder_ != null) { + return columnsToGetBuilder_.getMessageOrBuilder(); + } else { + return columnsToGet_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet, com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGetOrBuilder> + getColumnsToGetFieldBuilder() { + if (columnsToGetBuilder_ == null) { + columnsToGetBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet, com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGetOrBuilder>( + columnsToGet_, + getParentForChildren(), + isClean()); + columnsToGet_ = null; + } + return columnsToGetBuilder_; + } + + // optional bytes search_query = 4; + private com.google.protobuf.ByteString searchQuery_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasSearchQuery() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.google.protobuf.ByteString getSearchQuery() { + return searchQuery_; + } + public Builder setSearchQuery(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + searchQuery_ = value; + onChanged(); + return this; + } + public Builder clearSearchQuery() { + bitField0_ = (bitField0_ & ~0x00000008); + searchQuery_ = getDefaultInstance().getSearchQuery(); + onChanged(); + return this; + } + + // repeated bytes routing_values = 5; + private java.util.List routingValues_ = java.util.Collections.emptyList();; + private void ensureRoutingValuesIsMutable() { + if (!((bitField0_ & 0x00000010) == 0x00000010)) { + routingValues_ = new java.util.ArrayList(routingValues_); + bitField0_ |= 0x00000010; + } + } + public java.util.List + getRoutingValuesList() { + return java.util.Collections.unmodifiableList(routingValues_); + } + public int getRoutingValuesCount() { + return routingValues_.size(); + } + public com.google.protobuf.ByteString getRoutingValues(int index) { + return routingValues_.get(index); + } + public Builder setRoutingValues( + int index, com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRoutingValuesIsMutable(); + routingValues_.set(index, value); + onChanged(); + return this; + } + public Builder addRoutingValues(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRoutingValuesIsMutable(); + routingValues_.add(value); + onChanged(); + return this; + } + public Builder addAllRoutingValues( + java.lang.Iterable values) { + ensureRoutingValuesIsMutable(); + super.addAll(values, routingValues_); + onChanged(); + return this; + } + public Builder clearRoutingValues() { + routingValues_ = java.util.Collections.emptyList();; + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + // optional int32 timeout_ms = 6; + private int timeoutMs_ ; + public boolean hasTimeoutMs() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + public int getTimeoutMs() { + return timeoutMs_; + } + public Builder setTimeoutMs(int value) { + bitField0_ |= 0x00000020; + timeoutMs_ = value; + onChanged(); + return this; + } + public Builder clearTimeoutMs() { + bitField0_ = (bitField0_ & ~0x00000020); + timeoutMs_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.SearchRequest) + } + + static { + defaultInstance = new SearchRequest(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.SearchRequest) + } + + public interface SearchResponseOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional int64 total_hits = 1; + boolean hasTotalHits(); + long getTotalHits(); + + // repeated bytes rows = 2; + java.util.List getRowsList(); + int getRowsCount(); + com.google.protobuf.ByteString getRows(int index); + + // optional bool is_all_succeeded = 3; + boolean hasIsAllSucceeded(); + boolean getIsAllSucceeded(); + + // optional bytes next_token = 6; + boolean hasNextToken(); + com.google.protobuf.ByteString getNextToken(); + + // optional bytes aggs = 7; + boolean hasAggs(); + com.google.protobuf.ByteString getAggs(); + + // optional bytes group_bys = 8; + boolean hasGroupBys(); + com.google.protobuf.ByteString getGroupBys(); + } + public static final class SearchResponse extends + com.google.protobuf.GeneratedMessage + implements SearchResponseOrBuilder { + // Use SearchResponse.newBuilder() to construct. + private SearchResponse(Builder builder) { + super(builder); + } + private SearchResponse(boolean noInit) {} + + private static final SearchResponse defaultInstance; + public static SearchResponse getDefaultInstance() { + return defaultInstance; + } + + public SearchResponse getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SearchResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SearchResponse_fieldAccessorTable; + } + + private int bitField0_; + // optional int64 total_hits = 1; + public static final int TOTAL_HITS_FIELD_NUMBER = 1; + private long totalHits_; + public boolean hasTotalHits() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public long getTotalHits() { + return totalHits_; + } + + // repeated bytes rows = 2; + public static final int ROWS_FIELD_NUMBER = 2; + private java.util.List rows_; + public java.util.List + getRowsList() { + return rows_; + } + public int getRowsCount() { + return rows_.size(); + } + public com.google.protobuf.ByteString getRows(int index) { + return rows_.get(index); + } + + // optional bool is_all_succeeded = 3; + public static final int IS_ALL_SUCCEEDED_FIELD_NUMBER = 3; + private boolean isAllSucceeded_; + public boolean hasIsAllSucceeded() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public boolean getIsAllSucceeded() { + return isAllSucceeded_; + } + + // optional bytes next_token = 6; + public static final int NEXT_TOKEN_FIELD_NUMBER = 6; + private com.google.protobuf.ByteString nextToken_; + public boolean hasNextToken() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.google.protobuf.ByteString getNextToken() { + return nextToken_; + } + + // optional bytes aggs = 7; + public static final int AGGS_FIELD_NUMBER = 7; + private com.google.protobuf.ByteString aggs_; + public boolean hasAggs() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.google.protobuf.ByteString getAggs() { + return aggs_; + } + + // optional bytes group_bys = 8; + public static final int GROUP_BYS_FIELD_NUMBER = 8; + private com.google.protobuf.ByteString groupBys_; + public boolean hasGroupBys() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public com.google.protobuf.ByteString getGroupBys() { + return groupBys_; + } + + private void initFields() { + totalHits_ = 0L; + rows_ = java.util.Collections.emptyList();; + isAllSucceeded_ = false; + nextToken_ = com.google.protobuf.ByteString.EMPTY; + aggs_ = com.google.protobuf.ByteString.EMPTY; + groupBys_ = com.google.protobuf.ByteString.EMPTY; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeInt64(1, totalHits_); + } + for (int i = 0; i < rows_.size(); i++) { + output.writeBytes(2, rows_.get(i)); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBool(3, isAllSucceeded_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeBytes(6, nextToken_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeBytes(7, aggs_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeBytes(8, groupBys_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, totalHits_); + } + { + int dataSize = 0; + for (int i = 0; i < rows_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(rows_.get(i)); + } + size += dataSize; + size += 1 * getRowsList().size(); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, isAllSucceeded_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(6, nextToken_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(7, aggs_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(8, groupBys_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SearchResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SearchResponse_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + totalHits_ = 0L; + bitField0_ = (bitField0_ & ~0x00000001); + rows_ = java.util.Collections.emptyList();; + bitField0_ = (bitField0_ & ~0x00000002); + isAllSucceeded_ = false; + bitField0_ = (bitField0_ & ~0x00000004); + nextToken_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + aggs_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000010); + groupBys_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000020); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse build() { + com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse result = new com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.totalHits_ = totalHits_; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + rows_ = java.util.Collections.unmodifiableList(rows_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.rows_ = rows_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000002; + } + result.isAllSucceeded_ = isAllSucceeded_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000004; + } + result.nextToken_ = nextToken_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000008; + } + result.aggs_ = aggs_; + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000010; + } + result.groupBys_ = groupBys_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse.getDefaultInstance()) return this; + if (other.hasTotalHits()) { + setTotalHits(other.getTotalHits()); + } + if (!other.rows_.isEmpty()) { + if (rows_.isEmpty()) { + rows_ = other.rows_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureRowsIsMutable(); + rows_.addAll(other.rows_); + } + onChanged(); + } + if (other.hasIsAllSucceeded()) { + setIsAllSucceeded(other.getIsAllSucceeded()); + } + if (other.hasNextToken()) { + setNextToken(other.getNextToken()); + } + if (other.hasAggs()) { + setAggs(other.getAggs()); + } + if (other.hasGroupBys()) { + setGroupBys(other.getGroupBys()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + totalHits_ = input.readInt64(); + break; + } + case 18: { + ensureRowsIsMutable(); + rows_.add(input.readBytes()); + break; + } + case 24: { + bitField0_ |= 0x00000004; + isAllSucceeded_ = input.readBool(); + break; + } + case 50: { + bitField0_ |= 0x00000008; + nextToken_ = input.readBytes(); + break; + } + case 58: { + bitField0_ |= 0x00000010; + aggs_ = input.readBytes(); + break; + } + case 66: { + bitField0_ |= 0x00000020; + groupBys_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // optional int64 total_hits = 1; + private long totalHits_ ; + public boolean hasTotalHits() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public long getTotalHits() { + return totalHits_; + } + public Builder setTotalHits(long value) { + bitField0_ |= 0x00000001; + totalHits_ = value; + onChanged(); + return this; + } + public Builder clearTotalHits() { + bitField0_ = (bitField0_ & ~0x00000001); + totalHits_ = 0L; + onChanged(); + return this; + } + + // repeated bytes rows = 2; + private java.util.List rows_ = java.util.Collections.emptyList();; + private void ensureRowsIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + rows_ = new java.util.ArrayList(rows_); + bitField0_ |= 0x00000002; + } + } + public java.util.List + getRowsList() { + return java.util.Collections.unmodifiableList(rows_); + } + public int getRowsCount() { + return rows_.size(); + } + public com.google.protobuf.ByteString getRows(int index) { + return rows_.get(index); + } + public Builder setRows( + int index, com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRowsIsMutable(); + rows_.set(index, value); + onChanged(); + return this; + } + public Builder addRows(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRowsIsMutable(); + rows_.add(value); + onChanged(); + return this; + } + public Builder addAllRows( + java.lang.Iterable values) { + ensureRowsIsMutable(); + super.addAll(values, rows_); + onChanged(); + return this; + } + public Builder clearRows() { + rows_ = java.util.Collections.emptyList();; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + // optional bool is_all_succeeded = 3; + private boolean isAllSucceeded_ ; + public boolean hasIsAllSucceeded() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public boolean getIsAllSucceeded() { + return isAllSucceeded_; + } + public Builder setIsAllSucceeded(boolean value) { + bitField0_ |= 0x00000004; + isAllSucceeded_ = value; + onChanged(); + return this; + } + public Builder clearIsAllSucceeded() { + bitField0_ = (bitField0_ & ~0x00000004); + isAllSucceeded_ = false; + onChanged(); + return this; + } + + // optional bytes next_token = 6; + private com.google.protobuf.ByteString nextToken_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasNextToken() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.google.protobuf.ByteString getNextToken() { + return nextToken_; + } + public Builder setNextToken(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + nextToken_ = value; + onChanged(); + return this; + } + public Builder clearNextToken() { + bitField0_ = (bitField0_ & ~0x00000008); + nextToken_ = getDefaultInstance().getNextToken(); + onChanged(); + return this; + } + + // optional bytes aggs = 7; + private com.google.protobuf.ByteString aggs_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasAggs() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public com.google.protobuf.ByteString getAggs() { + return aggs_; + } + public Builder setAggs(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + aggs_ = value; + onChanged(); + return this; + } + public Builder clearAggs() { + bitField0_ = (bitField0_ & ~0x00000010); + aggs_ = getDefaultInstance().getAggs(); + onChanged(); + return this; + } + + // optional bytes group_bys = 8; + private com.google.protobuf.ByteString groupBys_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasGroupBys() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + public com.google.protobuf.ByteString getGroupBys() { + return groupBys_; + } + public Builder setGroupBys(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + groupBys_ = value; + onChanged(); + return this; + } + public Builder clearGroupBys() { + bitField0_ = (bitField0_ & ~0x00000020); + groupBys_ = getDefaultInstance().getGroupBys(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.SearchResponse) + } + + static { + defaultInstance = new SearchResponse(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.SearchResponse) + } + + public interface SingleWordAnalyzerParameterOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional bool case_sensitive = 1; + boolean hasCaseSensitive(); + boolean getCaseSensitive(); + + // optional bool delimit_word = 2; + boolean hasDelimitWord(); + boolean getDelimitWord(); + } + public static final class SingleWordAnalyzerParameter extends + com.google.protobuf.GeneratedMessage + implements SingleWordAnalyzerParameterOrBuilder { + // Use SingleWordAnalyzerParameter.newBuilder() to construct. + private SingleWordAnalyzerParameter(Builder builder) { + super(builder); + } + private SingleWordAnalyzerParameter(boolean noInit) {} + + private static final SingleWordAnalyzerParameter defaultInstance; + public static SingleWordAnalyzerParameter getDefaultInstance() { + return defaultInstance; + } + + public SingleWordAnalyzerParameter getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SingleWordAnalyzerParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SingleWordAnalyzerParameter_fieldAccessorTable; + } + + private int bitField0_; + // optional bool case_sensitive = 1; + public static final int CASE_SENSITIVE_FIELD_NUMBER = 1; + private boolean caseSensitive_; + public boolean hasCaseSensitive() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public boolean getCaseSensitive() { + return caseSensitive_; + } + + // optional bool delimit_word = 2; + public static final int DELIMIT_WORD_FIELD_NUMBER = 2; + private boolean delimitWord_; + public boolean hasDelimitWord() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public boolean getDelimitWord() { + return delimitWord_; + } + + private void initFields() { + caseSensitive_ = false; + delimitWord_ = false; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBool(1, caseSensitive_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBool(2, delimitWord_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, caseSensitive_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, delimitWord_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.SingleWordAnalyzerParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SingleWordAnalyzerParameter parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SingleWordAnalyzerParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SingleWordAnalyzerParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SingleWordAnalyzerParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SingleWordAnalyzerParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SingleWordAnalyzerParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SingleWordAnalyzerParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SingleWordAnalyzerParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SingleWordAnalyzerParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.SingleWordAnalyzerParameter prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.SingleWordAnalyzerParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SingleWordAnalyzerParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SingleWordAnalyzerParameter_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.SingleWordAnalyzerParameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + caseSensitive_ = false; + bitField0_ = (bitField0_ & ~0x00000001); + delimitWord_ = false; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.SingleWordAnalyzerParameter.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.SingleWordAnalyzerParameter getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.SingleWordAnalyzerParameter.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.SingleWordAnalyzerParameter build() { + com.alicloud.openservices.tablestore.core.protocol.Search.SingleWordAnalyzerParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.SingleWordAnalyzerParameter buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.SingleWordAnalyzerParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.SingleWordAnalyzerParameter buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.SingleWordAnalyzerParameter result = new com.alicloud.openservices.tablestore.core.protocol.Search.SingleWordAnalyzerParameter(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.caseSensitive_ = caseSensitive_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.delimitWord_ = delimitWord_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.SingleWordAnalyzerParameter) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.SingleWordAnalyzerParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.SingleWordAnalyzerParameter other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.SingleWordAnalyzerParameter.getDefaultInstance()) return this; + if (other.hasCaseSensitive()) { + setCaseSensitive(other.getCaseSensitive()); + } + if (other.hasDelimitWord()) { + setDelimitWord(other.getDelimitWord()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + caseSensitive_ = input.readBool(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + delimitWord_ = input.readBool(); + break; + } + } + } + } + + private int bitField0_; + + // optional bool case_sensitive = 1; + private boolean caseSensitive_ ; + public boolean hasCaseSensitive() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public boolean getCaseSensitive() { + return caseSensitive_; + } + public Builder setCaseSensitive(boolean value) { + bitField0_ |= 0x00000001; + caseSensitive_ = value; + onChanged(); + return this; + } + public Builder clearCaseSensitive() { + bitField0_ = (bitField0_ & ~0x00000001); + caseSensitive_ = false; + onChanged(); + return this; + } + + // optional bool delimit_word = 2; + private boolean delimitWord_ ; + public boolean hasDelimitWord() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public boolean getDelimitWord() { + return delimitWord_; + } + public Builder setDelimitWord(boolean value) { + bitField0_ |= 0x00000002; + delimitWord_ = value; + onChanged(); + return this; + } + public Builder clearDelimitWord() { + bitField0_ = (bitField0_ & ~0x00000002); + delimitWord_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.SingleWordAnalyzerParameter) + } + + static { + defaultInstance = new SingleWordAnalyzerParameter(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.SingleWordAnalyzerParameter) + } + + public interface SplitAnalyzerParameterOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string delimiter = 1; + boolean hasDelimiter(); + String getDelimiter(); + } + public static final class SplitAnalyzerParameter extends + com.google.protobuf.GeneratedMessage + implements SplitAnalyzerParameterOrBuilder { + // Use SplitAnalyzerParameter.newBuilder() to construct. + private SplitAnalyzerParameter(Builder builder) { + super(builder); + } + private SplitAnalyzerParameter(boolean noInit) {} + + private static final SplitAnalyzerParameter defaultInstance; + public static SplitAnalyzerParameter getDefaultInstance() { + return defaultInstance; + } + + public SplitAnalyzerParameter getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SplitAnalyzerParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SplitAnalyzerParameter_fieldAccessorTable; + } + + private int bitField0_; + // optional string delimiter = 1; + public static final int DELIMITER_FIELD_NUMBER = 1; + private java.lang.Object delimiter_; + public boolean hasDelimiter() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getDelimiter() { + java.lang.Object ref = delimiter_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + delimiter_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getDelimiterBytes() { + java.lang.Object ref = delimiter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + delimiter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + delimiter_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getDelimiterBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getDelimiterBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.SplitAnalyzerParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SplitAnalyzerParameter parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SplitAnalyzerParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SplitAnalyzerParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SplitAnalyzerParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SplitAnalyzerParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SplitAnalyzerParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SplitAnalyzerParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SplitAnalyzerParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SplitAnalyzerParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.SplitAnalyzerParameter prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.SplitAnalyzerParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SplitAnalyzerParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SplitAnalyzerParameter_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.SplitAnalyzerParameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + delimiter_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.SplitAnalyzerParameter.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.SplitAnalyzerParameter getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.SplitAnalyzerParameter.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.SplitAnalyzerParameter build() { + com.alicloud.openservices.tablestore.core.protocol.Search.SplitAnalyzerParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.SplitAnalyzerParameter buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.SplitAnalyzerParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.SplitAnalyzerParameter buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.SplitAnalyzerParameter result = new com.alicloud.openservices.tablestore.core.protocol.Search.SplitAnalyzerParameter(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.delimiter_ = delimiter_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.SplitAnalyzerParameter) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.SplitAnalyzerParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.SplitAnalyzerParameter other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.SplitAnalyzerParameter.getDefaultInstance()) return this; + if (other.hasDelimiter()) { + setDelimiter(other.getDelimiter()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + delimiter_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // optional string delimiter = 1; + private java.lang.Object delimiter_ = ""; + public boolean hasDelimiter() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getDelimiter() { + java.lang.Object ref = delimiter_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + delimiter_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setDelimiter(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + delimiter_ = value; + onChanged(); + return this; + } + public Builder clearDelimiter() { + bitField0_ = (bitField0_ & ~0x00000001); + delimiter_ = getDefaultInstance().getDelimiter(); + onChanged(); + return this; + } + void setDelimiter(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + delimiter_ = value; + onChanged(); + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.SplitAnalyzerParameter) + } + + static { + defaultInstance = new SplitAnalyzerParameter(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.SplitAnalyzerParameter) + } + + public interface FuzzyAnalyzerParameterOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional int32 min_chars = 1; + boolean hasMinChars(); + int getMinChars(); + + // optional int32 max_chars = 2; + boolean hasMaxChars(); + int getMaxChars(); + } + public static final class FuzzyAnalyzerParameter extends + com.google.protobuf.GeneratedMessage + implements FuzzyAnalyzerParameterOrBuilder { + // Use FuzzyAnalyzerParameter.newBuilder() to construct. + private FuzzyAnalyzerParameter(Builder builder) { + super(builder); + } + private FuzzyAnalyzerParameter(boolean noInit) {} + + private static final FuzzyAnalyzerParameter defaultInstance; + public static FuzzyAnalyzerParameter getDefaultInstance() { + return defaultInstance; + } + + public FuzzyAnalyzerParameter getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_FuzzyAnalyzerParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_FuzzyAnalyzerParameter_fieldAccessorTable; + } + + private int bitField0_; + // optional int32 min_chars = 1; + public static final int MIN_CHARS_FIELD_NUMBER = 1; + private int minChars_; + public boolean hasMinChars() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public int getMinChars() { + return minChars_; + } + + // optional int32 max_chars = 2; + public static final int MAX_CHARS_FIELD_NUMBER = 2; + private int maxChars_; + public boolean hasMaxChars() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public int getMaxChars() { + return maxChars_; + } + + private void initFields() { + minChars_ = 0; + maxChars_ = 0; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeInt32(1, minChars_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeInt32(2, maxChars_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, minChars_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, maxChars_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.FuzzyAnalyzerParameter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FuzzyAnalyzerParameter parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FuzzyAnalyzerParameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FuzzyAnalyzerParameter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FuzzyAnalyzerParameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FuzzyAnalyzerParameter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FuzzyAnalyzerParameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FuzzyAnalyzerParameter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FuzzyAnalyzerParameter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FuzzyAnalyzerParameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.FuzzyAnalyzerParameter prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.FuzzyAnalyzerParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_FuzzyAnalyzerParameter_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_FuzzyAnalyzerParameter_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.FuzzyAnalyzerParameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + minChars_ = 0; + bitField0_ = (bitField0_ & ~0x00000001); + maxChars_ = 0; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.FuzzyAnalyzerParameter.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.FuzzyAnalyzerParameter getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.FuzzyAnalyzerParameter.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.FuzzyAnalyzerParameter build() { + com.alicloud.openservices.tablestore.core.protocol.Search.FuzzyAnalyzerParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.FuzzyAnalyzerParameter buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.FuzzyAnalyzerParameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.FuzzyAnalyzerParameter buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.FuzzyAnalyzerParameter result = new com.alicloud.openservices.tablestore.core.protocol.Search.FuzzyAnalyzerParameter(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.minChars_ = minChars_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.maxChars_ = maxChars_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.FuzzyAnalyzerParameter) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.FuzzyAnalyzerParameter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.FuzzyAnalyzerParameter other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.FuzzyAnalyzerParameter.getDefaultInstance()) return this; + if (other.hasMinChars()) { + setMinChars(other.getMinChars()); + } + if (other.hasMaxChars()) { + setMaxChars(other.getMaxChars()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + minChars_ = input.readInt32(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + maxChars_ = input.readInt32(); + break; + } + } + } + } + + private int bitField0_; + + // optional int32 min_chars = 1; + private int minChars_ ; + public boolean hasMinChars() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public int getMinChars() { + return minChars_; + } + public Builder setMinChars(int value) { + bitField0_ |= 0x00000001; + minChars_ = value; + onChanged(); + return this; + } + public Builder clearMinChars() { + bitField0_ = (bitField0_ & ~0x00000001); + minChars_ = 0; + onChanged(); + return this; + } + + // optional int32 max_chars = 2; + private int maxChars_ ; + public boolean hasMaxChars() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public int getMaxChars() { + return maxChars_; + } + public Builder setMaxChars(int value) { + bitField0_ |= 0x00000002; + maxChars_ = value; + onChanged(); + return this; + } + public Builder clearMaxChars() { + bitField0_ = (bitField0_ & ~0x00000002); + maxChars_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.FuzzyAnalyzerParameter) + } + + static { + defaultInstance = new FuzzyAnalyzerParameter(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.FuzzyAnalyzerParameter) + } + + public interface FieldSchemaOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string field_name = 1; + boolean hasFieldName(); + String getFieldName(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.FieldType field_type = 2; + boolean hasFieldType(); + com.alicloud.openservices.tablestore.core.protocol.Search.FieldType getFieldType(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.IndexOptions index_options = 3; + boolean hasIndexOptions(); + com.alicloud.openservices.tablestore.core.protocol.Search.IndexOptions getIndexOptions(); + + // optional string analyzer = 4; + boolean hasAnalyzer(); + String getAnalyzer(); + + // optional bool index = 5; + boolean hasIndex(); + boolean getIndex(); + + // optional bool sort_and_agg = 6; + boolean hasSortAndAgg(); + boolean getSortAndAgg(); + + // optional bool store = 7; + boolean hasStore(); + boolean getStore(); + + // repeated .com.alicloud.openservices.tablestore.core.protocol.FieldSchema field_schemas = 8; + java.util.List + getFieldSchemasList(); + com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema getFieldSchemas(int index); + int getFieldSchemasCount(); + java.util.List + getFieldSchemasOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchemaOrBuilder getFieldSchemasOrBuilder( + int index); + + // optional bool is_array = 9; + boolean hasIsArray(); + boolean getIsArray(); + + // optional bytes analyzer_parameter = 10; + boolean hasAnalyzerParameter(); + com.google.protobuf.ByteString getAnalyzerParameter(); + + // optional bool is_virtual_field = 11; + boolean hasIsVirtualField(); + boolean getIsVirtualField(); + + // repeated string source_field_names = 12; + java.util.List getSourceFieldNamesList(); + int getSourceFieldNamesCount(); + String getSourceFieldNames(int index); + } + public static final class FieldSchema extends + com.google.protobuf.GeneratedMessage + implements FieldSchemaOrBuilder { + // Use FieldSchema.newBuilder() to construct. + private FieldSchema(Builder builder) { + super(builder); + } + private FieldSchema(boolean noInit) {} + + private static final FieldSchema defaultInstance; + public static FieldSchema getDefaultInstance() { + return defaultInstance; + } + + public FieldSchema getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_FieldSchema_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_FieldSchema_fieldAccessorTable; + } + + private int bitField0_; + // optional string field_name = 1; + public static final int FIELD_NAME_FIELD_NUMBER = 1; + private java.lang.Object fieldName_; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + fieldName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getFieldNameBytes() { + java.lang.Object ref = fieldName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + fieldName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.FieldType field_type = 2; + public static final int FIELD_TYPE_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.Search.FieldType fieldType_; + public boolean hasFieldType() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.FieldType getFieldType() { + return fieldType_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.IndexOptions index_options = 3; + public static final int INDEX_OPTIONS_FIELD_NUMBER = 3; + private com.alicloud.openservices.tablestore.core.protocol.Search.IndexOptions indexOptions_; + public boolean hasIndexOptions() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.IndexOptions getIndexOptions() { + return indexOptions_; + } + + // optional string analyzer = 4; + public static final int ANALYZER_FIELD_NUMBER = 4; + private java.lang.Object analyzer_; + public boolean hasAnalyzer() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public String getAnalyzer() { + java.lang.Object ref = analyzer_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + analyzer_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getAnalyzerBytes() { + java.lang.Object ref = analyzer_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + analyzer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional bool index = 5; + public static final int INDEX_FIELD_NUMBER = 5; + private boolean index_; + public boolean hasIndex() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public boolean getIndex() { + return index_; + } + + // optional bool sort_and_agg = 6; + public static final int SORT_AND_AGG_FIELD_NUMBER = 6; + private boolean sortAndAgg_; + public boolean hasSortAndAgg() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + public boolean getSortAndAgg() { + return sortAndAgg_; + } + + // optional bool store = 7; + public static final int STORE_FIELD_NUMBER = 7; + private boolean store_; + public boolean hasStore() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + public boolean getStore() { + return store_; + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.FieldSchema field_schemas = 8; + public static final int FIELD_SCHEMAS_FIELD_NUMBER = 8; + private java.util.List fieldSchemas_; + public java.util.List getFieldSchemasList() { + return fieldSchemas_; + } + public java.util.List + getFieldSchemasOrBuilderList() { + return fieldSchemas_; + } + public int getFieldSchemasCount() { + return fieldSchemas_.size(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema getFieldSchemas(int index) { + return fieldSchemas_.get(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchemaOrBuilder getFieldSchemasOrBuilder( + int index) { + return fieldSchemas_.get(index); + } + + // optional bool is_array = 9; + public static final int IS_ARRAY_FIELD_NUMBER = 9; + private boolean isArray_; + public boolean hasIsArray() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + public boolean getIsArray() { + return isArray_; + } + + // optional bytes analyzer_parameter = 10; + public static final int ANALYZER_PARAMETER_FIELD_NUMBER = 10; + private com.google.protobuf.ByteString analyzerParameter_; + public boolean hasAnalyzerParameter() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + public com.google.protobuf.ByteString getAnalyzerParameter() { + return analyzerParameter_; + } + + // optional bool is_virtual_field = 11; + public static final int IS_VIRTUAL_FIELD_FIELD_NUMBER = 11; + private boolean isVirtualField_; + public boolean hasIsVirtualField() { + return ((bitField0_ & 0x00000200) == 0x00000200); + } + public boolean getIsVirtualField() { + return isVirtualField_; + } + + // repeated string source_field_names = 12; + public static final int SOURCE_FIELD_NAMES_FIELD_NUMBER = 12; + private com.google.protobuf.LazyStringList sourceFieldNames_; + public java.util.List + getSourceFieldNamesList() { + return sourceFieldNames_; + } + public int getSourceFieldNamesCount() { + return sourceFieldNames_.size(); + } + public String getSourceFieldNames(int index) { + return sourceFieldNames_.get(index); + } + + private void initFields() { + fieldName_ = ""; + fieldType_ = com.alicloud.openservices.tablestore.core.protocol.Search.FieldType.LONG; + indexOptions_ = com.alicloud.openservices.tablestore.core.protocol.Search.IndexOptions.DOCS; + analyzer_ = ""; + index_ = false; + sortAndAgg_ = false; + store_ = false; + fieldSchemas_ = java.util.Collections.emptyList(); + isArray_ = false; + analyzerParameter_ = com.google.protobuf.ByteString.EMPTY; + isVirtualField_ = false; + sourceFieldNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getFieldNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeEnum(2, fieldType_.getNumber()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeEnum(3, indexOptions_.getNumber()); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeBytes(4, getAnalyzerBytes()); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeBool(5, index_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeBool(6, sortAndAgg_); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + output.writeBool(7, store_); + } + for (int i = 0; i < fieldSchemas_.size(); i++) { + output.writeMessage(8, fieldSchemas_.get(i)); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + output.writeBool(9, isArray_); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + output.writeBytes(10, analyzerParameter_); + } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + output.writeBool(11, isVirtualField_); + } + for (int i = 0; i < sourceFieldNames_.size(); i++) { + output.writeBytes(12, sourceFieldNames_.getByteString(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getFieldNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, fieldType_.getNumber()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, indexOptions_.getNumber()); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(4, getAnalyzerBytes()); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(5, index_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(6, sortAndAgg_); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(7, store_); + } + for (int i = 0; i < fieldSchemas_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, fieldSchemas_.get(i)); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(9, isArray_); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(10, analyzerParameter_); + } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(11, isVirtualField_); + } + { + int dataSize = 0; + for (int i = 0; i < sourceFieldNames_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(sourceFieldNames_.getByteString(i)); + } + size += dataSize; + size += 1 * getSourceFieldNamesList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchemaOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_FieldSchema_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_FieldSchema_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getFieldSchemasFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + fieldName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + fieldType_ = com.alicloud.openservices.tablestore.core.protocol.Search.FieldType.LONG; + bitField0_ = (bitField0_ & ~0x00000002); + indexOptions_ = com.alicloud.openservices.tablestore.core.protocol.Search.IndexOptions.DOCS; + bitField0_ = (bitField0_ & ~0x00000004); + analyzer_ = ""; + bitField0_ = (bitField0_ & ~0x00000008); + index_ = false; + bitField0_ = (bitField0_ & ~0x00000010); + sortAndAgg_ = false; + bitField0_ = (bitField0_ & ~0x00000020); + store_ = false; + bitField0_ = (bitField0_ & ~0x00000040); + if (fieldSchemasBuilder_ == null) { + fieldSchemas_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + } else { + fieldSchemasBuilder_.clear(); + } + isArray_ = false; + bitField0_ = (bitField0_ & ~0x00000100); + analyzerParameter_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000200); + isVirtualField_ = false; + bitField0_ = (bitField0_ & ~0x00000400); + sourceFieldNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000800); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema build() { + com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema result = new com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.fieldName_ = fieldName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.fieldType_ = fieldType_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.indexOptions_ = indexOptions_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.analyzer_ = analyzer_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + result.index_ = index_; + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000020; + } + result.sortAndAgg_ = sortAndAgg_; + if (((from_bitField0_ & 0x00000040) == 0x00000040)) { + to_bitField0_ |= 0x00000040; + } + result.store_ = store_; + if (fieldSchemasBuilder_ == null) { + if (((bitField0_ & 0x00000080) == 0x00000080)) { + fieldSchemas_ = java.util.Collections.unmodifiableList(fieldSchemas_); + bitField0_ = (bitField0_ & ~0x00000080); + } + result.fieldSchemas_ = fieldSchemas_; + } else { + result.fieldSchemas_ = fieldSchemasBuilder_.build(); + } + if (((from_bitField0_ & 0x00000100) == 0x00000100)) { + to_bitField0_ |= 0x00000080; + } + result.isArray_ = isArray_; + if (((from_bitField0_ & 0x00000200) == 0x00000200)) { + to_bitField0_ |= 0x00000100; + } + result.analyzerParameter_ = analyzerParameter_; + if (((from_bitField0_ & 0x00000400) == 0x00000400)) { + to_bitField0_ |= 0x00000200; + } + result.isVirtualField_ = isVirtualField_; + if (((bitField0_ & 0x00000800) == 0x00000800)) { + sourceFieldNames_ = new com.google.protobuf.UnmodifiableLazyStringList( + sourceFieldNames_); + bitField0_ = (bitField0_ & ~0x00000800); + } + result.sourceFieldNames_ = sourceFieldNames_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.getDefaultInstance()) return this; + if (other.hasFieldName()) { + setFieldName(other.getFieldName()); + } + if (other.hasFieldType()) { + setFieldType(other.getFieldType()); + } + if (other.hasIndexOptions()) { + setIndexOptions(other.getIndexOptions()); + } + if (other.hasAnalyzer()) { + setAnalyzer(other.getAnalyzer()); + } + if (other.hasIndex()) { + setIndex(other.getIndex()); + } + if (other.hasSortAndAgg()) { + setSortAndAgg(other.getSortAndAgg()); + } + if (other.hasStore()) { + setStore(other.getStore()); + } + if (fieldSchemasBuilder_ == null) { + if (!other.fieldSchemas_.isEmpty()) { + if (fieldSchemas_.isEmpty()) { + fieldSchemas_ = other.fieldSchemas_; + bitField0_ = (bitField0_ & ~0x00000080); + } else { + ensureFieldSchemasIsMutable(); + fieldSchemas_.addAll(other.fieldSchemas_); + } + onChanged(); + } + } else { + if (!other.fieldSchemas_.isEmpty()) { + if (fieldSchemasBuilder_.isEmpty()) { + fieldSchemasBuilder_.dispose(); + fieldSchemasBuilder_ = null; + fieldSchemas_ = other.fieldSchemas_; + bitField0_ = (bitField0_ & ~0x00000080); + fieldSchemasBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getFieldSchemasFieldBuilder() : null; + } else { + fieldSchemasBuilder_.addAllMessages(other.fieldSchemas_); + } + } + } + if (other.hasIsArray()) { + setIsArray(other.getIsArray()); + } + if (other.hasAnalyzerParameter()) { + setAnalyzerParameter(other.getAnalyzerParameter()); + } + if (other.hasIsVirtualField()) { + setIsVirtualField(other.getIsVirtualField()); + } + if (!other.sourceFieldNames_.isEmpty()) { + if (sourceFieldNames_.isEmpty()) { + sourceFieldNames_ = other.sourceFieldNames_; + bitField0_ = (bitField0_ & ~0x00000800); + } else { + ensureSourceFieldNamesIsMutable(); + sourceFieldNames_.addAll(other.sourceFieldNames_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + fieldName_ = input.readBytes(); + break; + } + case 16: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.Search.FieldType value = com.alicloud.openservices.tablestore.core.protocol.Search.FieldType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(2, rawValue); + } else { + bitField0_ |= 0x00000002; + fieldType_ = value; + } + break; + } + case 24: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.Search.IndexOptions value = com.alicloud.openservices.tablestore.core.protocol.Search.IndexOptions.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(3, rawValue); + } else { + bitField0_ |= 0x00000004; + indexOptions_ = value; + } + break; + } + case 34: { + bitField0_ |= 0x00000008; + analyzer_ = input.readBytes(); + break; + } + case 40: { + bitField0_ |= 0x00000010; + index_ = input.readBool(); + break; + } + case 48: { + bitField0_ |= 0x00000020; + sortAndAgg_ = input.readBool(); + break; + } + case 56: { + bitField0_ |= 0x00000040; + store_ = input.readBool(); + break; + } + case 66: { + com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addFieldSchemas(subBuilder.buildPartial()); + break; + } + case 72: { + bitField0_ |= 0x00000100; + isArray_ = input.readBool(); + break; + } + case 82: { + bitField0_ |= 0x00000200; + analyzerParameter_ = input.readBytes(); + break; + } + case 88: { + bitField0_ |= 0x00000400; + isVirtualField_ = input.readBool(); + break; + } + case 98: { + ensureSourceFieldNamesIsMutable(); + sourceFieldNames_.add(input.readBytes()); + break; + } + } + } + } + + private int bitField0_; + + // optional string field_name = 1; + private java.lang.Object fieldName_ = ""; + public boolean hasFieldName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getFieldName() { + java.lang.Object ref = fieldName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + fieldName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setFieldName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + return this; + } + public Builder clearFieldName() { + bitField0_ = (bitField0_ & ~0x00000001); + fieldName_ = getDefaultInstance().getFieldName(); + onChanged(); + return this; + } + void setFieldName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + fieldName_ = value; + onChanged(); + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.FieldType field_type = 2; + private com.alicloud.openservices.tablestore.core.protocol.Search.FieldType fieldType_ = com.alicloud.openservices.tablestore.core.protocol.Search.FieldType.LONG; + public boolean hasFieldType() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.FieldType getFieldType() { + return fieldType_; + } + public Builder setFieldType(com.alicloud.openservices.tablestore.core.protocol.Search.FieldType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + fieldType_ = value; + onChanged(); + return this; + } + public Builder clearFieldType() { + bitField0_ = (bitField0_ & ~0x00000002); + fieldType_ = com.alicloud.openservices.tablestore.core.protocol.Search.FieldType.LONG; + onChanged(); + return this; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.IndexOptions index_options = 3; + private com.alicloud.openservices.tablestore.core.protocol.Search.IndexOptions indexOptions_ = com.alicloud.openservices.tablestore.core.protocol.Search.IndexOptions.DOCS; + public boolean hasIndexOptions() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.IndexOptions getIndexOptions() { + return indexOptions_; + } + public Builder setIndexOptions(com.alicloud.openservices.tablestore.core.protocol.Search.IndexOptions value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + indexOptions_ = value; + onChanged(); + return this; + } + public Builder clearIndexOptions() { + bitField0_ = (bitField0_ & ~0x00000004); + indexOptions_ = com.alicloud.openservices.tablestore.core.protocol.Search.IndexOptions.DOCS; + onChanged(); + return this; + } + + // optional string analyzer = 4; + private java.lang.Object analyzer_ = ""; + public boolean hasAnalyzer() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public String getAnalyzer() { + java.lang.Object ref = analyzer_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + analyzer_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setAnalyzer(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + analyzer_ = value; + onChanged(); + return this; + } + public Builder clearAnalyzer() { + bitField0_ = (bitField0_ & ~0x00000008); + analyzer_ = getDefaultInstance().getAnalyzer(); + onChanged(); + return this; + } + void setAnalyzer(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000008; + analyzer_ = value; + onChanged(); + } + + // optional bool index = 5; + private boolean index_ ; + public boolean hasIndex() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public boolean getIndex() { + return index_; + } + public Builder setIndex(boolean value) { + bitField0_ |= 0x00000010; + index_ = value; + onChanged(); + return this; + } + public Builder clearIndex() { + bitField0_ = (bitField0_ & ~0x00000010); + index_ = false; + onChanged(); + return this; + } + + // optional bool sort_and_agg = 6; + private boolean sortAndAgg_ ; + public boolean hasSortAndAgg() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + public boolean getSortAndAgg() { + return sortAndAgg_; + } + public Builder setSortAndAgg(boolean value) { + bitField0_ |= 0x00000020; + sortAndAgg_ = value; + onChanged(); + return this; + } + public Builder clearSortAndAgg() { + bitField0_ = (bitField0_ & ~0x00000020); + sortAndAgg_ = false; + onChanged(); + return this; + } + + // optional bool store = 7; + private boolean store_ ; + public boolean hasStore() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + public boolean getStore() { + return store_; + } + public Builder setStore(boolean value) { + bitField0_ |= 0x00000040; + store_ = value; + onChanged(); + return this; + } + public Builder clearStore() { + bitField0_ = (bitField0_ & ~0x00000040); + store_ = false; + onChanged(); + return this; + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.FieldSchema field_schemas = 8; + private java.util.List fieldSchemas_ = + java.util.Collections.emptyList(); + private void ensureFieldSchemasIsMutable() { + if (!((bitField0_ & 0x00000080) == 0x00000080)) { + fieldSchemas_ = new java.util.ArrayList(fieldSchemas_); + bitField0_ |= 0x00000080; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchemaOrBuilder> fieldSchemasBuilder_; + + public java.util.List getFieldSchemasList() { + if (fieldSchemasBuilder_ == null) { + return java.util.Collections.unmodifiableList(fieldSchemas_); + } else { + return fieldSchemasBuilder_.getMessageList(); + } + } + public int getFieldSchemasCount() { + if (fieldSchemasBuilder_ == null) { + return fieldSchemas_.size(); + } else { + return fieldSchemasBuilder_.getCount(); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema getFieldSchemas(int index) { + if (fieldSchemasBuilder_ == null) { + return fieldSchemas_.get(index); + } else { + return fieldSchemasBuilder_.getMessage(index); + } + } + public Builder setFieldSchemas( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema value) { + if (fieldSchemasBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldSchemasIsMutable(); + fieldSchemas_.set(index, value); + onChanged(); + } else { + fieldSchemasBuilder_.setMessage(index, value); + } + return this; + } + public Builder setFieldSchemas( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.Builder builderForValue) { + if (fieldSchemasBuilder_ == null) { + ensureFieldSchemasIsMutable(); + fieldSchemas_.set(index, builderForValue.build()); + onChanged(); + } else { + fieldSchemasBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + public Builder addFieldSchemas(com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema value) { + if (fieldSchemasBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldSchemasIsMutable(); + fieldSchemas_.add(value); + onChanged(); + } else { + fieldSchemasBuilder_.addMessage(value); + } + return this; + } + public Builder addFieldSchemas( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema value) { + if (fieldSchemasBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldSchemasIsMutable(); + fieldSchemas_.add(index, value); + onChanged(); + } else { + fieldSchemasBuilder_.addMessage(index, value); + } + return this; + } + public Builder addFieldSchemas( + com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.Builder builderForValue) { + if (fieldSchemasBuilder_ == null) { + ensureFieldSchemasIsMutable(); + fieldSchemas_.add(builderForValue.build()); + onChanged(); + } else { + fieldSchemasBuilder_.addMessage(builderForValue.build()); + } + return this; + } + public Builder addFieldSchemas( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.Builder builderForValue) { + if (fieldSchemasBuilder_ == null) { + ensureFieldSchemasIsMutable(); + fieldSchemas_.add(index, builderForValue.build()); + onChanged(); + } else { + fieldSchemasBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAllFieldSchemas( + java.lang.Iterable values) { + if (fieldSchemasBuilder_ == null) { + ensureFieldSchemasIsMutable(); + super.addAll(values, fieldSchemas_); + onChanged(); + } else { + fieldSchemasBuilder_.addAllMessages(values); + } + return this; + } + public Builder clearFieldSchemas() { + if (fieldSchemasBuilder_ == null) { + fieldSchemas_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + } else { + fieldSchemasBuilder_.clear(); + } + return this; + } + public Builder removeFieldSchemas(int index) { + if (fieldSchemasBuilder_ == null) { + ensureFieldSchemasIsMutable(); + fieldSchemas_.remove(index); + onChanged(); + } else { + fieldSchemasBuilder_.remove(index); + } + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.Builder getFieldSchemasBuilder( + int index) { + return getFieldSchemasFieldBuilder().getBuilder(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchemaOrBuilder getFieldSchemasOrBuilder( + int index) { + if (fieldSchemasBuilder_ == null) { + return fieldSchemas_.get(index); } else { + return fieldSchemasBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getFieldSchemasOrBuilderList() { + if (fieldSchemasBuilder_ != null) { + return fieldSchemasBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(fieldSchemas_); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.Builder addFieldSchemasBuilder() { + return getFieldSchemasFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.getDefaultInstance()); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.Builder addFieldSchemasBuilder( + int index) { + return getFieldSchemasFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.getDefaultInstance()); + } + public java.util.List + getFieldSchemasBuilderList() { + return getFieldSchemasFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchemaOrBuilder> + getFieldSchemasFieldBuilder() { + if (fieldSchemasBuilder_ == null) { + fieldSchemasBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchemaOrBuilder>( + fieldSchemas_, + ((bitField0_ & 0x00000080) == 0x00000080), + getParentForChildren(), + isClean()); + fieldSchemas_ = null; + } + return fieldSchemasBuilder_; + } + + // optional bool is_array = 9; + private boolean isArray_ ; + public boolean hasIsArray() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + public boolean getIsArray() { + return isArray_; + } + public Builder setIsArray(boolean value) { + bitField0_ |= 0x00000100; + isArray_ = value; + onChanged(); + return this; + } + public Builder clearIsArray() { + bitField0_ = (bitField0_ & ~0x00000100); + isArray_ = false; + onChanged(); + return this; + } + + // optional bytes analyzer_parameter = 10; + private com.google.protobuf.ByteString analyzerParameter_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasAnalyzerParameter() { + return ((bitField0_ & 0x00000200) == 0x00000200); + } + public com.google.protobuf.ByteString getAnalyzerParameter() { + return analyzerParameter_; + } + public Builder setAnalyzerParameter(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + analyzerParameter_ = value; + onChanged(); + return this; + } + public Builder clearAnalyzerParameter() { + bitField0_ = (bitField0_ & ~0x00000200); + analyzerParameter_ = getDefaultInstance().getAnalyzerParameter(); + onChanged(); + return this; + } + + // optional bool is_virtual_field = 11; + private boolean isVirtualField_ ; + public boolean hasIsVirtualField() { + return ((bitField0_ & 0x00000400) == 0x00000400); + } + public boolean getIsVirtualField() { + return isVirtualField_; + } + public Builder setIsVirtualField(boolean value) { + bitField0_ |= 0x00000400; + isVirtualField_ = value; + onChanged(); + return this; + } + public Builder clearIsVirtualField() { + bitField0_ = (bitField0_ & ~0x00000400); + isVirtualField_ = false; + onChanged(); + return this; + } + + // repeated string source_field_names = 12; + private com.google.protobuf.LazyStringList sourceFieldNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureSourceFieldNamesIsMutable() { + if (!((bitField0_ & 0x00000800) == 0x00000800)) { + sourceFieldNames_ = new com.google.protobuf.LazyStringArrayList(sourceFieldNames_); + bitField0_ |= 0x00000800; + } + } + public java.util.List + getSourceFieldNamesList() { + return java.util.Collections.unmodifiableList(sourceFieldNames_); + } + public int getSourceFieldNamesCount() { + return sourceFieldNames_.size(); + } + public String getSourceFieldNames(int index) { + return sourceFieldNames_.get(index); + } + public Builder setSourceFieldNames( + int index, String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSourceFieldNamesIsMutable(); + sourceFieldNames_.set(index, value); + onChanged(); + return this; + } + public Builder addSourceFieldNames(String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSourceFieldNamesIsMutable(); + sourceFieldNames_.add(value); + onChanged(); + return this; + } + public Builder addAllSourceFieldNames( + java.lang.Iterable values) { + ensureSourceFieldNamesIsMutable(); + super.addAll(values, sourceFieldNames_); + onChanged(); + return this; + } + public Builder clearSourceFieldNames() { + sourceFieldNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000800); + onChanged(); + return this; + } + void addSourceFieldNames(com.google.protobuf.ByteString value) { + ensureSourceFieldNamesIsMutable(); + sourceFieldNames_.add(value); + onChanged(); + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.FieldSchema) + } + + static { + defaultInstance = new FieldSchema(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.FieldSchema) + } + + public interface IndexSchemaOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // repeated .com.alicloud.openservices.tablestore.core.protocol.FieldSchema field_schemas = 1; + java.util.List + getFieldSchemasList(); + com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema getFieldSchemas(int index); + int getFieldSchemasCount(); + java.util.List + getFieldSchemasOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchemaOrBuilder getFieldSchemasOrBuilder( + int index); + + // optional .com.alicloud.openservices.tablestore.core.protocol.IndexSetting index_setting = 2; + boolean hasIndexSetting(); + com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting getIndexSetting(); + com.alicloud.openservices.tablestore.core.protocol.Search.IndexSettingOrBuilder getIndexSettingOrBuilder(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.Sort index_sort = 3; + boolean hasIndexSort(); + com.alicloud.openservices.tablestore.core.protocol.Search.Sort getIndexSort(); + com.alicloud.openservices.tablestore.core.protocol.Search.SortOrBuilder getIndexSortOrBuilder(); + } + public static final class IndexSchema extends + com.google.protobuf.GeneratedMessage + implements IndexSchemaOrBuilder { + // Use IndexSchema.newBuilder() to construct. + private IndexSchema(Builder builder) { + super(builder); + } + private IndexSchema(boolean noInit) {} + + private static final IndexSchema defaultInstance; + public static IndexSchema getDefaultInstance() { + return defaultInstance; + } + + public IndexSchema getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_IndexSchema_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_IndexSchema_fieldAccessorTable; + } + + private int bitField0_; + // repeated .com.alicloud.openservices.tablestore.core.protocol.FieldSchema field_schemas = 1; + public static final int FIELD_SCHEMAS_FIELD_NUMBER = 1; + private java.util.List fieldSchemas_; + public java.util.List getFieldSchemasList() { + return fieldSchemas_; + } + public java.util.List + getFieldSchemasOrBuilderList() { + return fieldSchemas_; + } + public int getFieldSchemasCount() { + return fieldSchemas_.size(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema getFieldSchemas(int index) { + return fieldSchemas_.get(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchemaOrBuilder getFieldSchemasOrBuilder( + int index) { + return fieldSchemas_.get(index); + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.IndexSetting index_setting = 2; + public static final int INDEX_SETTING_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting indexSetting_; + public boolean hasIndexSetting() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting getIndexSetting() { + return indexSetting_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.IndexSettingOrBuilder getIndexSettingOrBuilder() { + return indexSetting_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.Sort index_sort = 3; + public static final int INDEX_SORT_FIELD_NUMBER = 3; + private com.alicloud.openservices.tablestore.core.protocol.Search.Sort indexSort_; + public boolean hasIndexSort() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Sort getIndexSort() { + return indexSort_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.SortOrBuilder getIndexSortOrBuilder() { + return indexSort_; + } + + private void initFields() { + fieldSchemas_ = java.util.Collections.emptyList(); + indexSetting_ = com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting.getDefaultInstance(); + indexSort_ = com.alicloud.openservices.tablestore.core.protocol.Search.Sort.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < fieldSchemas_.size(); i++) { + output.writeMessage(1, fieldSchemas_.get(i)); + } + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(2, indexSetting_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeMessage(3, indexSort_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < fieldSchemas_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, fieldSchemas_.get(i)); + } + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, indexSetting_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, indexSort_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchemaOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_IndexSchema_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_IndexSchema_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getFieldSchemasFieldBuilder(); + getIndexSettingFieldBuilder(); + getIndexSortFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (fieldSchemasBuilder_ == null) { + fieldSchemas_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + fieldSchemasBuilder_.clear(); + } + if (indexSettingBuilder_ == null) { + indexSetting_ = com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting.getDefaultInstance(); + } else { + indexSettingBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + if (indexSortBuilder_ == null) { + indexSort_ = com.alicloud.openservices.tablestore.core.protocol.Search.Sort.getDefaultInstance(); + } else { + indexSortBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema build() { + com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema result = new com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (fieldSchemasBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + fieldSchemas_ = java.util.Collections.unmodifiableList(fieldSchemas_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.fieldSchemas_ = fieldSchemas_; + } else { + result.fieldSchemas_ = fieldSchemasBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000001; + } + if (indexSettingBuilder_ == null) { + result.indexSetting_ = indexSetting_; + } else { + result.indexSetting_ = indexSettingBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000002; + } + if (indexSortBuilder_ == null) { + result.indexSort_ = indexSort_; + } else { + result.indexSort_ = indexSortBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.getDefaultInstance()) return this; + if (fieldSchemasBuilder_ == null) { + if (!other.fieldSchemas_.isEmpty()) { + if (fieldSchemas_.isEmpty()) { + fieldSchemas_ = other.fieldSchemas_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFieldSchemasIsMutable(); + fieldSchemas_.addAll(other.fieldSchemas_); + } + onChanged(); + } + } else { + if (!other.fieldSchemas_.isEmpty()) { + if (fieldSchemasBuilder_.isEmpty()) { + fieldSchemasBuilder_.dispose(); + fieldSchemasBuilder_ = null; + fieldSchemas_ = other.fieldSchemas_; + bitField0_ = (bitField0_ & ~0x00000001); + fieldSchemasBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getFieldSchemasFieldBuilder() : null; + } else { + fieldSchemasBuilder_.addAllMessages(other.fieldSchemas_); + } + } + } + if (other.hasIndexSetting()) { + mergeIndexSetting(other.getIndexSetting()); + } + if (other.hasIndexSort()) { + mergeIndexSort(other.getIndexSort()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addFieldSchemas(subBuilder.buildPartial()); + break; + } + case 18: { + com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting.newBuilder(); + if (hasIndexSetting()) { + subBuilder.mergeFrom(getIndexSetting()); + } + input.readMessage(subBuilder, extensionRegistry); + setIndexSetting(subBuilder.buildPartial()); + break; + } + case 26: { + com.alicloud.openservices.tablestore.core.protocol.Search.Sort.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.Sort.newBuilder(); + if (hasIndexSort()) { + subBuilder.mergeFrom(getIndexSort()); + } + input.readMessage(subBuilder, extensionRegistry); + setIndexSort(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // repeated .com.alicloud.openservices.tablestore.core.protocol.FieldSchema field_schemas = 1; + private java.util.List fieldSchemas_ = + java.util.Collections.emptyList(); + private void ensureFieldSchemasIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + fieldSchemas_ = new java.util.ArrayList(fieldSchemas_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchemaOrBuilder> fieldSchemasBuilder_; + + public java.util.List getFieldSchemasList() { + if (fieldSchemasBuilder_ == null) { + return java.util.Collections.unmodifiableList(fieldSchemas_); + } else { + return fieldSchemasBuilder_.getMessageList(); + } + } + public int getFieldSchemasCount() { + if (fieldSchemasBuilder_ == null) { + return fieldSchemas_.size(); + } else { + return fieldSchemasBuilder_.getCount(); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema getFieldSchemas(int index) { + if (fieldSchemasBuilder_ == null) { + return fieldSchemas_.get(index); + } else { + return fieldSchemasBuilder_.getMessage(index); + } + } + public Builder setFieldSchemas( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema value) { + if (fieldSchemasBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldSchemasIsMutable(); + fieldSchemas_.set(index, value); + onChanged(); + } else { + fieldSchemasBuilder_.setMessage(index, value); + } + return this; + } + public Builder setFieldSchemas( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.Builder builderForValue) { + if (fieldSchemasBuilder_ == null) { + ensureFieldSchemasIsMutable(); + fieldSchemas_.set(index, builderForValue.build()); + onChanged(); + } else { + fieldSchemasBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + public Builder addFieldSchemas(com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema value) { + if (fieldSchemasBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldSchemasIsMutable(); + fieldSchemas_.add(value); + onChanged(); + } else { + fieldSchemasBuilder_.addMessage(value); + } + return this; + } + public Builder addFieldSchemas( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema value) { + if (fieldSchemasBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldSchemasIsMutable(); + fieldSchemas_.add(index, value); + onChanged(); + } else { + fieldSchemasBuilder_.addMessage(index, value); + } + return this; + } + public Builder addFieldSchemas( + com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.Builder builderForValue) { + if (fieldSchemasBuilder_ == null) { + ensureFieldSchemasIsMutable(); + fieldSchemas_.add(builderForValue.build()); + onChanged(); + } else { + fieldSchemasBuilder_.addMessage(builderForValue.build()); + } + return this; + } + public Builder addFieldSchemas( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.Builder builderForValue) { + if (fieldSchemasBuilder_ == null) { + ensureFieldSchemasIsMutable(); + fieldSchemas_.add(index, builderForValue.build()); + onChanged(); + } else { + fieldSchemasBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAllFieldSchemas( + java.lang.Iterable values) { + if (fieldSchemasBuilder_ == null) { + ensureFieldSchemasIsMutable(); + super.addAll(values, fieldSchemas_); + onChanged(); + } else { + fieldSchemasBuilder_.addAllMessages(values); + } + return this; + } + public Builder clearFieldSchemas() { + if (fieldSchemasBuilder_ == null) { + fieldSchemas_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + fieldSchemasBuilder_.clear(); + } + return this; + } + public Builder removeFieldSchemas(int index) { + if (fieldSchemasBuilder_ == null) { + ensureFieldSchemasIsMutable(); + fieldSchemas_.remove(index); + onChanged(); + } else { + fieldSchemasBuilder_.remove(index); + } + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.Builder getFieldSchemasBuilder( + int index) { + return getFieldSchemasFieldBuilder().getBuilder(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchemaOrBuilder getFieldSchemasOrBuilder( + int index) { + if (fieldSchemasBuilder_ == null) { + return fieldSchemas_.get(index); } else { + return fieldSchemasBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getFieldSchemasOrBuilderList() { + if (fieldSchemasBuilder_ != null) { + return fieldSchemasBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(fieldSchemas_); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.Builder addFieldSchemasBuilder() { + return getFieldSchemasFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.getDefaultInstance()); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.Builder addFieldSchemasBuilder( + int index) { + return getFieldSchemasFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.getDefaultInstance()); + } + public java.util.List + getFieldSchemasBuilderList() { + return getFieldSchemasFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchemaOrBuilder> + getFieldSchemasFieldBuilder() { + if (fieldSchemasBuilder_ == null) { + fieldSchemasBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchemaOrBuilder>( + fieldSchemas_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + fieldSchemas_ = null; + } + return fieldSchemasBuilder_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.IndexSetting index_setting = 2; + private com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting indexSetting_ = com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting, com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.IndexSettingOrBuilder> indexSettingBuilder_; + public boolean hasIndexSetting() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting getIndexSetting() { + if (indexSettingBuilder_ == null) { + return indexSetting_; + } else { + return indexSettingBuilder_.getMessage(); + } + } + public Builder setIndexSetting(com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting value) { + if (indexSettingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + indexSetting_ = value; + onChanged(); + } else { + indexSettingBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder setIndexSetting( + com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting.Builder builderForValue) { + if (indexSettingBuilder_ == null) { + indexSetting_ = builderForValue.build(); + onChanged(); + } else { + indexSettingBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder mergeIndexSetting(com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting value) { + if (indexSettingBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002) && + indexSetting_ != com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting.getDefaultInstance()) { + indexSetting_ = + com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting.newBuilder(indexSetting_).mergeFrom(value).buildPartial(); + } else { + indexSetting_ = value; + } + onChanged(); + } else { + indexSettingBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder clearIndexSetting() { + if (indexSettingBuilder_ == null) { + indexSetting_ = com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting.getDefaultInstance(); + onChanged(); + } else { + indexSettingBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting.Builder getIndexSettingBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getIndexSettingFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.IndexSettingOrBuilder getIndexSettingOrBuilder() { + if (indexSettingBuilder_ != null) { + return indexSettingBuilder_.getMessageOrBuilder(); + } else { + return indexSetting_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting, com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.IndexSettingOrBuilder> + getIndexSettingFieldBuilder() { + if (indexSettingBuilder_ == null) { + indexSettingBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting, com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.IndexSettingOrBuilder>( + indexSetting_, + getParentForChildren(), + isClean()); + indexSetting_ = null; + } + return indexSettingBuilder_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.Sort index_sort = 3; + private com.alicloud.openservices.tablestore.core.protocol.Search.Sort indexSort_ = com.alicloud.openservices.tablestore.core.protocol.Search.Sort.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Sort, com.alicloud.openservices.tablestore.core.protocol.Search.Sort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.SortOrBuilder> indexSortBuilder_; + public boolean hasIndexSort() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Sort getIndexSort() { + if (indexSortBuilder_ == null) { + return indexSort_; + } else { + return indexSortBuilder_.getMessage(); + } + } + public Builder setIndexSort(com.alicloud.openservices.tablestore.core.protocol.Search.Sort value) { + if (indexSortBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + indexSort_ = value; + onChanged(); + } else { + indexSortBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder setIndexSort( + com.alicloud.openservices.tablestore.core.protocol.Search.Sort.Builder builderForValue) { + if (indexSortBuilder_ == null) { + indexSort_ = builderForValue.build(); + onChanged(); + } else { + indexSortBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder mergeIndexSort(com.alicloud.openservices.tablestore.core.protocol.Search.Sort value) { + if (indexSortBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004) && + indexSort_ != com.alicloud.openservices.tablestore.core.protocol.Search.Sort.getDefaultInstance()) { + indexSort_ = + com.alicloud.openservices.tablestore.core.protocol.Search.Sort.newBuilder(indexSort_).mergeFrom(value).buildPartial(); + } else { + indexSort_ = value; + } + onChanged(); + } else { + indexSortBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder clearIndexSort() { + if (indexSortBuilder_ == null) { + indexSort_ = com.alicloud.openservices.tablestore.core.protocol.Search.Sort.getDefaultInstance(); + onChanged(); + } else { + indexSortBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.Sort.Builder getIndexSortBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getIndexSortFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.SortOrBuilder getIndexSortOrBuilder() { + if (indexSortBuilder_ != null) { + return indexSortBuilder_.getMessageOrBuilder(); + } else { + return indexSort_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Sort, com.alicloud.openservices.tablestore.core.protocol.Search.Sort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.SortOrBuilder> + getIndexSortFieldBuilder() { + if (indexSortBuilder_ == null) { + indexSortBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Sort, com.alicloud.openservices.tablestore.core.protocol.Search.Sort.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.SortOrBuilder>( + indexSort_, + getParentForChildren(), + isClean()); + indexSort_ = null; + } + return indexSortBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.IndexSchema) + } + + static { + defaultInstance = new IndexSchema(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.IndexSchema) + } + + public interface IndexSettingOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional int32 number_of_shards = 1; + boolean hasNumberOfShards(); + int getNumberOfShards(); + + // repeated string routing_fields = 2; + java.util.List getRoutingFieldsList(); + int getRoutingFieldsCount(); + String getRoutingFields(int index); + + // optional int32 routing_partition_size = 3; + boolean hasRoutingPartitionSize(); + int getRoutingPartitionSize(); + } + public static final class IndexSetting extends + com.google.protobuf.GeneratedMessage + implements IndexSettingOrBuilder { + // Use IndexSetting.newBuilder() to construct. + private IndexSetting(Builder builder) { + super(builder); + } + private IndexSetting(boolean noInit) {} + + private static final IndexSetting defaultInstance; + public static IndexSetting getDefaultInstance() { + return defaultInstance; + } + + public IndexSetting getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_IndexSetting_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_IndexSetting_fieldAccessorTable; + } + + private int bitField0_; + // optional int32 number_of_shards = 1; + public static final int NUMBER_OF_SHARDS_FIELD_NUMBER = 1; + private int numberOfShards_; + public boolean hasNumberOfShards() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public int getNumberOfShards() { + return numberOfShards_; + } + + // repeated string routing_fields = 2; + public static final int ROUTING_FIELDS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList routingFields_; + public java.util.List + getRoutingFieldsList() { + return routingFields_; + } + public int getRoutingFieldsCount() { + return routingFields_.size(); + } + public String getRoutingFields(int index) { + return routingFields_.get(index); + } + + // optional int32 routing_partition_size = 3; + public static final int ROUTING_PARTITION_SIZE_FIELD_NUMBER = 3; + private int routingPartitionSize_; + public boolean hasRoutingPartitionSize() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public int getRoutingPartitionSize() { + return routingPartitionSize_; + } + + private void initFields() { + numberOfShards_ = 0; + routingFields_ = com.google.protobuf.LazyStringArrayList.EMPTY; + routingPartitionSize_ = 0; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeInt32(1, numberOfShards_); + } + for (int i = 0; i < routingFields_.size(); i++) { + output.writeBytes(2, routingFields_.getByteString(i)); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeInt32(3, routingPartitionSize_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, numberOfShards_); + } + { + int dataSize = 0; + for (int i = 0; i < routingFields_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(routingFields_.getByteString(i)); + } + size += dataSize; + size += 1 * getRoutingFieldsList().size(); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, routingPartitionSize_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.IndexSettingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_IndexSetting_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_IndexSetting_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + numberOfShards_ = 0; + bitField0_ = (bitField0_ & ~0x00000001); + routingFields_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + routingPartitionSize_ = 0; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting build() { + com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting result = new com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.numberOfShards_ = numberOfShards_; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + routingFields_ = new com.google.protobuf.UnmodifiableLazyStringList( + routingFields_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.routingFields_ = routingFields_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000002; + } + result.routingPartitionSize_ = routingPartitionSize_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting.getDefaultInstance()) return this; + if (other.hasNumberOfShards()) { + setNumberOfShards(other.getNumberOfShards()); + } + if (!other.routingFields_.isEmpty()) { + if (routingFields_.isEmpty()) { + routingFields_ = other.routingFields_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureRoutingFieldsIsMutable(); + routingFields_.addAll(other.routingFields_); + } + onChanged(); + } + if (other.hasRoutingPartitionSize()) { + setRoutingPartitionSize(other.getRoutingPartitionSize()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + numberOfShards_ = input.readInt32(); + break; + } + case 18: { + ensureRoutingFieldsIsMutable(); + routingFields_.add(input.readBytes()); + break; + } + case 24: { + bitField0_ |= 0x00000004; + routingPartitionSize_ = input.readInt32(); + break; + } + } + } + } + + private int bitField0_; + + // optional int32 number_of_shards = 1; + private int numberOfShards_ ; + public boolean hasNumberOfShards() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public int getNumberOfShards() { + return numberOfShards_; + } + public Builder setNumberOfShards(int value) { + bitField0_ |= 0x00000001; + numberOfShards_ = value; + onChanged(); + return this; + } + public Builder clearNumberOfShards() { + bitField0_ = (bitField0_ & ~0x00000001); + numberOfShards_ = 0; + onChanged(); + return this; + } + + // repeated string routing_fields = 2; + private com.google.protobuf.LazyStringList routingFields_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureRoutingFieldsIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + routingFields_ = new com.google.protobuf.LazyStringArrayList(routingFields_); + bitField0_ |= 0x00000002; + } + } + public java.util.List + getRoutingFieldsList() { + return java.util.Collections.unmodifiableList(routingFields_); + } + public int getRoutingFieldsCount() { + return routingFields_.size(); + } + public String getRoutingFields(int index) { + return routingFields_.get(index); + } + public Builder setRoutingFields( + int index, String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRoutingFieldsIsMutable(); + routingFields_.set(index, value); + onChanged(); + return this; + } + public Builder addRoutingFields(String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRoutingFieldsIsMutable(); + routingFields_.add(value); + onChanged(); + return this; + } + public Builder addAllRoutingFields( + java.lang.Iterable values) { + ensureRoutingFieldsIsMutable(); + super.addAll(values, routingFields_); + onChanged(); + return this; + } + public Builder clearRoutingFields() { + routingFields_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + void addRoutingFields(com.google.protobuf.ByteString value) { + ensureRoutingFieldsIsMutable(); + routingFields_.add(value); + onChanged(); + } + + // optional int32 routing_partition_size = 3; + private int routingPartitionSize_ ; + public boolean hasRoutingPartitionSize() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public int getRoutingPartitionSize() { + return routingPartitionSize_; + } + public Builder setRoutingPartitionSize(int value) { + bitField0_ |= 0x00000004; + routingPartitionSize_ = value; + onChanged(); + return this; + } + public Builder clearRoutingPartitionSize() { + bitField0_ = (bitField0_ & ~0x00000004); + routingPartitionSize_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.IndexSetting) + } + + static { + defaultInstance = new IndexSetting(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.IndexSetting) + } + + public interface CreateSearchIndexRequestOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string table_name = 1; + boolean hasTableName(); + String getTableName(); + + // required string index_name = 2; + boolean hasIndexName(); + String getIndexName(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.IndexSchema schema = 3; + boolean hasSchema(); + com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema getSchema(); + com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchemaOrBuilder getSchemaOrBuilder(); + + // optional string source_index_name = 4; + boolean hasSourceIndexName(); + String getSourceIndexName(); + + // optional int32 time_to_live = 5; + boolean hasTimeToLive(); + int getTimeToLive(); + } + public static final class CreateSearchIndexRequest extends + com.google.protobuf.GeneratedMessage + implements CreateSearchIndexRequestOrBuilder { + // Use CreateSearchIndexRequest.newBuilder() to construct. + private CreateSearchIndexRequest(Builder builder) { + super(builder); + } + private CreateSearchIndexRequest(boolean noInit) {} + + private static final CreateSearchIndexRequest defaultInstance; + public static CreateSearchIndexRequest getDefaultInstance() { + return defaultInstance; + } + + public CreateSearchIndexRequest getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateSearchIndexRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateSearchIndexRequest_fieldAccessorTable; + } + + private int bitField0_; + // required string table_name = 1; + public static final int TABLE_NAME_FIELD_NUMBER = 1; + private java.lang.Object tableName_; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + tableName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // required string index_name = 2; + public static final int INDEX_NAME_FIELD_NUMBER = 2; + private java.lang.Object indexName_; + public boolean hasIndexName() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getIndexName() { + java.lang.Object ref = indexName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + indexName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getIndexNameBytes() { + java.lang.Object ref = indexName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + indexName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.IndexSchema schema = 3; + public static final int SCHEMA_FIELD_NUMBER = 3; + private com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema schema_; + public boolean hasSchema() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema getSchema() { + return schema_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchemaOrBuilder getSchemaOrBuilder() { + return schema_; + } + + // optional string source_index_name = 4; + public static final int SOURCE_INDEX_NAME_FIELD_NUMBER = 4; + private java.lang.Object sourceIndexName_; + public boolean hasSourceIndexName() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public String getSourceIndexName() { + java.lang.Object ref = sourceIndexName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + sourceIndexName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getSourceIndexNameBytes() { + java.lang.Object ref = sourceIndexName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + sourceIndexName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional int32 time_to_live = 5; + public static final int TIME_TO_LIVE_FIELD_NUMBER = 5; + private int timeToLive_; + public boolean hasTimeToLive() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public int getTimeToLive() { + return timeToLive_; + } + + private void initFields() { + tableName_ = ""; + indexName_ = ""; + schema_ = com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.getDefaultInstance(); + sourceIndexName_ = ""; + timeToLive_ = 0; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasTableName()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasIndexName()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getIndexNameBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeMessage(3, schema_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeBytes(4, getSourceIndexNameBytes()); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeInt32(5, timeToLive_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getIndexNameBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, schema_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(4, getSourceIndexNameBytes()); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(5, timeToLive_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateSearchIndexRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateSearchIndexRequest_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getSchemaFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + tableName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + indexName_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + if (schemaBuilder_ == null) { + schema_ = com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.getDefaultInstance(); + } else { + schemaBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + sourceIndexName_ = ""; + bitField0_ = (bitField0_ & ~0x00000008); + timeToLive_ = 0; + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest build() { + com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest result = new com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.tableName_ = tableName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.indexName_ = indexName_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + if (schemaBuilder_ == null) { + result.schema_ = schema_; + } else { + result.schema_ = schemaBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.sourceIndexName_ = sourceIndexName_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + result.timeToLive_ = timeToLive_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest.getDefaultInstance()) return this; + if (other.hasTableName()) { + setTableName(other.getTableName()); + } + if (other.hasIndexName()) { + setIndexName(other.getIndexName()); + } + if (other.hasSchema()) { + mergeSchema(other.getSchema()); + } + if (other.hasSourceIndexName()) { + setSourceIndexName(other.getSourceIndexName()); + } + if (other.hasTimeToLive()) { + setTimeToLive(other.getTimeToLive()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasTableName()) { + + return false; + } + if (!hasIndexName()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + tableName_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + indexName_ = input.readBytes(); + break; + } + case 26: { + com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.newBuilder(); + if (hasSchema()) { + subBuilder.mergeFrom(getSchema()); + } + input.readMessage(subBuilder, extensionRegistry); + setSchema(subBuilder.buildPartial()); + break; + } + case 34: { + bitField0_ |= 0x00000008; + sourceIndexName_ = input.readBytes(); + break; + } + case 40: { + bitField0_ |= 0x00000010; + timeToLive_ = input.readInt32(); + break; + } + } + } + } + + private int bitField0_; + + // required string table_name = 1; + private java.lang.Object tableName_ = ""; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + tableName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setTableName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + return this; + } + public Builder clearTableName() { + bitField0_ = (bitField0_ & ~0x00000001); + tableName_ = getDefaultInstance().getTableName(); + onChanged(); + return this; + } + void setTableName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + } + + // required string index_name = 2; + private java.lang.Object indexName_ = ""; + public boolean hasIndexName() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getIndexName() { + java.lang.Object ref = indexName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + indexName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setIndexName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + indexName_ = value; + onChanged(); + return this; + } + public Builder clearIndexName() { + bitField0_ = (bitField0_ & ~0x00000002); + indexName_ = getDefaultInstance().getIndexName(); + onChanged(); + return this; + } + void setIndexName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000002; + indexName_ = value; + onChanged(); + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.IndexSchema schema = 3; + private com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema schema_ = com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema, com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchemaOrBuilder> schemaBuilder_; + public boolean hasSchema() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema getSchema() { + if (schemaBuilder_ == null) { + return schema_; + } else { + return schemaBuilder_.getMessage(); + } + } + public Builder setSchema(com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema value) { + if (schemaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + schema_ = value; + onChanged(); + } else { + schemaBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder setSchema( + com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.Builder builderForValue) { + if (schemaBuilder_ == null) { + schema_ = builderForValue.build(); + onChanged(); + } else { + schemaBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder mergeSchema(com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema value) { + if (schemaBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004) && + schema_ != com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.getDefaultInstance()) { + schema_ = + com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.newBuilder(schema_).mergeFrom(value).buildPartial(); + } else { + schema_ = value; + } + onChanged(); + } else { + schemaBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder clearSchema() { + if (schemaBuilder_ == null) { + schema_ = com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.getDefaultInstance(); + onChanged(); + } else { + schemaBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.Builder getSchemaBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getSchemaFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchemaOrBuilder getSchemaOrBuilder() { + if (schemaBuilder_ != null) { + return schemaBuilder_.getMessageOrBuilder(); + } else { + return schema_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema, com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchemaOrBuilder> + getSchemaFieldBuilder() { + if (schemaBuilder_ == null) { + schemaBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema, com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchemaOrBuilder>( + schema_, + getParentForChildren(), + isClean()); + schema_ = null; + } + return schemaBuilder_; + } + + // optional string source_index_name = 4; + private java.lang.Object sourceIndexName_ = ""; + public boolean hasSourceIndexName() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public String getSourceIndexName() { + java.lang.Object ref = sourceIndexName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + sourceIndexName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setSourceIndexName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + sourceIndexName_ = value; + onChanged(); + return this; + } + public Builder clearSourceIndexName() { + bitField0_ = (bitField0_ & ~0x00000008); + sourceIndexName_ = getDefaultInstance().getSourceIndexName(); + onChanged(); + return this; + } + void setSourceIndexName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000008; + sourceIndexName_ = value; + onChanged(); + } + + // optional int32 time_to_live = 5; + private int timeToLive_ ; + public boolean hasTimeToLive() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public int getTimeToLive() { + return timeToLive_; + } + public Builder setTimeToLive(int value) { + bitField0_ |= 0x00000010; + timeToLive_ = value; + onChanged(); + return this; + } + public Builder clearTimeToLive() { + bitField0_ = (bitField0_ & ~0x00000010); + timeToLive_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.CreateSearchIndexRequest) + } + + static { + defaultInstance = new CreateSearchIndexRequest(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.CreateSearchIndexRequest) + } + + public interface CreateSearchIndexResponseOrBuilder + extends com.google.protobuf.MessageOrBuilder { + } + public static final class CreateSearchIndexResponse extends + com.google.protobuf.GeneratedMessage + implements CreateSearchIndexResponseOrBuilder { + // Use CreateSearchIndexResponse.newBuilder() to construct. + private CreateSearchIndexResponse(Builder builder) { + super(builder); + } + private CreateSearchIndexResponse(boolean noInit) {} + + private static final CreateSearchIndexResponse defaultInstance; + public static CreateSearchIndexResponse getDefaultInstance() { + return defaultInstance; + } + + public CreateSearchIndexResponse getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateSearchIndexResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateSearchIndexResponse_fieldAccessorTable; + } + + private void initFields() { + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateSearchIndexResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateSearchIndexResponse_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse build() { + com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse result = new com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse(this); + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + } + } + } + + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.CreateSearchIndexResponse) + } + + static { + defaultInstance = new CreateSearchIndexResponse(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.CreateSearchIndexResponse) + } + + public interface QueryFlowWeightOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string index_name = 1; + boolean hasIndexName(); + String getIndexName(); + + // optional int32 weight = 2; + boolean hasWeight(); + int getWeight(); + } + public static final class QueryFlowWeight extends + com.google.protobuf.GeneratedMessage + implements QueryFlowWeightOrBuilder { + // Use QueryFlowWeight.newBuilder() to construct. + private QueryFlowWeight(Builder builder) { + super(builder); + } + private QueryFlowWeight(boolean noInit) {} + + private static final QueryFlowWeight defaultInstance; + public static QueryFlowWeight getDefaultInstance() { + return defaultInstance; + } + + public QueryFlowWeight getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_QueryFlowWeight_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_QueryFlowWeight_fieldAccessorTable; + } + + private int bitField0_; + // optional string index_name = 1; + public static final int INDEX_NAME_FIELD_NUMBER = 1; + private java.lang.Object indexName_; + public boolean hasIndexName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getIndexName() { + java.lang.Object ref = indexName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + indexName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getIndexNameBytes() { + java.lang.Object ref = indexName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + indexName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional int32 weight = 2; + public static final int WEIGHT_FIELD_NUMBER = 2; + private int weight_; + public boolean hasWeight() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public int getWeight() { + return weight_; + } + + private void initFields() { + indexName_ = ""; + weight_ = 0; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getIndexNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeInt32(2, weight_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getIndexNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, weight_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeightOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_QueryFlowWeight_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_QueryFlowWeight_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + indexName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + weight_ = 0; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight build() { + com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight result = new com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.indexName_ = indexName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.weight_ = weight_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight.getDefaultInstance()) return this; + if (other.hasIndexName()) { + setIndexName(other.getIndexName()); + } + if (other.hasWeight()) { + setWeight(other.getWeight()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + indexName_ = input.readBytes(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + weight_ = input.readInt32(); + break; + } + } + } + } + + private int bitField0_; + + // optional string index_name = 1; + private java.lang.Object indexName_ = ""; + public boolean hasIndexName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getIndexName() { + java.lang.Object ref = indexName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + indexName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setIndexName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + indexName_ = value; + onChanged(); + return this; + } + public Builder clearIndexName() { + bitField0_ = (bitField0_ & ~0x00000001); + indexName_ = getDefaultInstance().getIndexName(); + onChanged(); + return this; + } + void setIndexName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + indexName_ = value; + onChanged(); + } + + // optional int32 weight = 2; + private int weight_ ; + public boolean hasWeight() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public int getWeight() { + return weight_; + } + public Builder setWeight(int value) { + bitField0_ |= 0x00000002; + weight_ = value; + onChanged(); + return this; + } + public Builder clearWeight() { + bitField0_ = (bitField0_ & ~0x00000002); + weight_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.QueryFlowWeight) + } + + static { + defaultInstance = new QueryFlowWeight(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.QueryFlowWeight) + } + + public interface UpdateSearchIndexRequestOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string table_name = 1; + boolean hasTableName(); + String getTableName(); + + // optional string index_name = 2; + boolean hasIndexName(); + String getIndexName(); + + // optional string switch_index_name = 3; + boolean hasSwitchIndexName(); + String getSwitchIndexName(); + + // repeated .com.alicloud.openservices.tablestore.core.protocol.QueryFlowWeight query_flow_weight = 4; + java.util.List + getQueryFlowWeightList(); + com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight getQueryFlowWeight(int index); + int getQueryFlowWeightCount(); + java.util.List + getQueryFlowWeightOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeightOrBuilder getQueryFlowWeightOrBuilder( + int index); + + // optional int32 time_to_live = 5; + boolean hasTimeToLive(); + int getTimeToLive(); + } + public static final class UpdateSearchIndexRequest extends + com.google.protobuf.GeneratedMessage + implements UpdateSearchIndexRequestOrBuilder { + // Use UpdateSearchIndexRequest.newBuilder() to construct. + private UpdateSearchIndexRequest(Builder builder) { + super(builder); + } + private UpdateSearchIndexRequest(boolean noInit) {} + + private static final UpdateSearchIndexRequest defaultInstance; + public static UpdateSearchIndexRequest getDefaultInstance() { + return defaultInstance; + } + + public UpdateSearchIndexRequest getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateSearchIndexRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateSearchIndexRequest_fieldAccessorTable; + } + + private int bitField0_; + // optional string table_name = 1; + public static final int TABLE_NAME_FIELD_NUMBER = 1; + private java.lang.Object tableName_; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + tableName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional string index_name = 2; + public static final int INDEX_NAME_FIELD_NUMBER = 2; + private java.lang.Object indexName_; + public boolean hasIndexName() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getIndexName() { + java.lang.Object ref = indexName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + indexName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getIndexNameBytes() { + java.lang.Object ref = indexName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + indexName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional string switch_index_name = 3; + public static final int SWITCH_INDEX_NAME_FIELD_NUMBER = 3; + private java.lang.Object switchIndexName_; + public boolean hasSwitchIndexName() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public String getSwitchIndexName() { + java.lang.Object ref = switchIndexName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + switchIndexName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getSwitchIndexNameBytes() { + java.lang.Object ref = switchIndexName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + switchIndexName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.QueryFlowWeight query_flow_weight = 4; + public static final int QUERY_FLOW_WEIGHT_FIELD_NUMBER = 4; + private java.util.List queryFlowWeight_; + public java.util.List getQueryFlowWeightList() { + return queryFlowWeight_; + } + public java.util.List + getQueryFlowWeightOrBuilderList() { + return queryFlowWeight_; + } + public int getQueryFlowWeightCount() { + return queryFlowWeight_.size(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight getQueryFlowWeight(int index) { + return queryFlowWeight_.get(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeightOrBuilder getQueryFlowWeightOrBuilder( + int index) { + return queryFlowWeight_.get(index); + } + + // optional int32 time_to_live = 5; + public static final int TIME_TO_LIVE_FIELD_NUMBER = 5; + private int timeToLive_; + public boolean hasTimeToLive() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public int getTimeToLive() { + return timeToLive_; + } + + private void initFields() { + tableName_ = ""; + indexName_ = ""; + switchIndexName_ = ""; + queryFlowWeight_ = java.util.Collections.emptyList(); + timeToLive_ = 0; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getIndexNameBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeBytes(3, getSwitchIndexNameBytes()); + } + for (int i = 0; i < queryFlowWeight_.size(); i++) { + output.writeMessage(4, queryFlowWeight_.get(i)); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeInt32(5, timeToLive_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getIndexNameBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, getSwitchIndexNameBytes()); + } + for (int i = 0; i < queryFlowWeight_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, queryFlowWeight_.get(i)); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(5, timeToLive_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexRequest prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateSearchIndexRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateSearchIndexRequest_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getQueryFlowWeightFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + tableName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + indexName_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + switchIndexName_ = ""; + bitField0_ = (bitField0_ & ~0x00000004); + if (queryFlowWeightBuilder_ == null) { + queryFlowWeight_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + queryFlowWeightBuilder_.clear(); + } + timeToLive_ = 0; + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexRequest.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexRequest.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexRequest build() { + com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexRequest buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexRequest result = new com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.tableName_ = tableName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.indexName_ = indexName_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.switchIndexName_ = switchIndexName_; + if (queryFlowWeightBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008)) { + queryFlowWeight_ = java.util.Collections.unmodifiableList(queryFlowWeight_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.queryFlowWeight_ = queryFlowWeight_; + } else { + result.queryFlowWeight_ = queryFlowWeightBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000008; + } + result.timeToLive_ = timeToLive_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexRequest.getDefaultInstance()) return this; + if (other.hasTableName()) { + setTableName(other.getTableName()); + } + if (other.hasIndexName()) { + setIndexName(other.getIndexName()); + } + if (other.hasSwitchIndexName()) { + setSwitchIndexName(other.getSwitchIndexName()); + } + if (queryFlowWeightBuilder_ == null) { + if (!other.queryFlowWeight_.isEmpty()) { + if (queryFlowWeight_.isEmpty()) { + queryFlowWeight_ = other.queryFlowWeight_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureQueryFlowWeightIsMutable(); + queryFlowWeight_.addAll(other.queryFlowWeight_); + } + onChanged(); + } + } else { + if (!other.queryFlowWeight_.isEmpty()) { + if (queryFlowWeightBuilder_.isEmpty()) { + queryFlowWeightBuilder_.dispose(); + queryFlowWeightBuilder_ = null; + queryFlowWeight_ = other.queryFlowWeight_; + bitField0_ = (bitField0_ & ~0x00000008); + queryFlowWeightBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getQueryFlowWeightFieldBuilder() : null; + } else { + queryFlowWeightBuilder_.addAllMessages(other.queryFlowWeight_); + } + } + } + if (other.hasTimeToLive()) { + setTimeToLive(other.getTimeToLive()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + tableName_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + indexName_ = input.readBytes(); + break; + } + case 26: { + bitField0_ |= 0x00000004; + switchIndexName_ = input.readBytes(); + break; + } + case 34: { + com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addQueryFlowWeight(subBuilder.buildPartial()); + break; + } + case 40: { + bitField0_ |= 0x00000010; + timeToLive_ = input.readInt32(); + break; + } + } + } + } + + private int bitField0_; + + // optional string table_name = 1; + private java.lang.Object tableName_ = ""; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + tableName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setTableName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + return this; + } + public Builder clearTableName() { + bitField0_ = (bitField0_ & ~0x00000001); + tableName_ = getDefaultInstance().getTableName(); + onChanged(); + return this; + } + void setTableName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + } + + // optional string index_name = 2; + private java.lang.Object indexName_ = ""; + public boolean hasIndexName() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getIndexName() { + java.lang.Object ref = indexName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + indexName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setIndexName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + indexName_ = value; + onChanged(); + return this; + } + public Builder clearIndexName() { + bitField0_ = (bitField0_ & ~0x00000002); + indexName_ = getDefaultInstance().getIndexName(); + onChanged(); + return this; + } + void setIndexName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000002; + indexName_ = value; + onChanged(); + } + + // optional string switch_index_name = 3; + private java.lang.Object switchIndexName_ = ""; + public boolean hasSwitchIndexName() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public String getSwitchIndexName() { + java.lang.Object ref = switchIndexName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + switchIndexName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setSwitchIndexName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + switchIndexName_ = value; + onChanged(); + return this; + } + public Builder clearSwitchIndexName() { + bitField0_ = (bitField0_ & ~0x00000004); + switchIndexName_ = getDefaultInstance().getSwitchIndexName(); + onChanged(); + return this; + } + void setSwitchIndexName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000004; + switchIndexName_ = value; + onChanged(); + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.QueryFlowWeight query_flow_weight = 4; + private java.util.List queryFlowWeight_ = + java.util.Collections.emptyList(); + private void ensureQueryFlowWeightIsMutable() { + if (!((bitField0_ & 0x00000008) == 0x00000008)) { + queryFlowWeight_ = new java.util.ArrayList(queryFlowWeight_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight, com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeightOrBuilder> queryFlowWeightBuilder_; + + public java.util.List getQueryFlowWeightList() { + if (queryFlowWeightBuilder_ == null) { + return java.util.Collections.unmodifiableList(queryFlowWeight_); + } else { + return queryFlowWeightBuilder_.getMessageList(); + } + } + public int getQueryFlowWeightCount() { + if (queryFlowWeightBuilder_ == null) { + return queryFlowWeight_.size(); + } else { + return queryFlowWeightBuilder_.getCount(); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight getQueryFlowWeight(int index) { + if (queryFlowWeightBuilder_ == null) { + return queryFlowWeight_.get(index); + } else { + return queryFlowWeightBuilder_.getMessage(index); + } + } + public Builder setQueryFlowWeight( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight value) { + if (queryFlowWeightBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQueryFlowWeightIsMutable(); + queryFlowWeight_.set(index, value); + onChanged(); + } else { + queryFlowWeightBuilder_.setMessage(index, value); + } + return this; + } + public Builder setQueryFlowWeight( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight.Builder builderForValue) { + if (queryFlowWeightBuilder_ == null) { + ensureQueryFlowWeightIsMutable(); + queryFlowWeight_.set(index, builderForValue.build()); + onChanged(); + } else { + queryFlowWeightBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + public Builder addQueryFlowWeight(com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight value) { + if (queryFlowWeightBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQueryFlowWeightIsMutable(); + queryFlowWeight_.add(value); + onChanged(); + } else { + queryFlowWeightBuilder_.addMessage(value); + } + return this; + } + public Builder addQueryFlowWeight( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight value) { + if (queryFlowWeightBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQueryFlowWeightIsMutable(); + queryFlowWeight_.add(index, value); + onChanged(); + } else { + queryFlowWeightBuilder_.addMessage(index, value); + } + return this; + } + public Builder addQueryFlowWeight( + com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight.Builder builderForValue) { + if (queryFlowWeightBuilder_ == null) { + ensureQueryFlowWeightIsMutable(); + queryFlowWeight_.add(builderForValue.build()); + onChanged(); + } else { + queryFlowWeightBuilder_.addMessage(builderForValue.build()); + } + return this; + } + public Builder addQueryFlowWeight( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight.Builder builderForValue) { + if (queryFlowWeightBuilder_ == null) { + ensureQueryFlowWeightIsMutable(); + queryFlowWeight_.add(index, builderForValue.build()); + onChanged(); + } else { + queryFlowWeightBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAllQueryFlowWeight( + java.lang.Iterable values) { + if (queryFlowWeightBuilder_ == null) { + ensureQueryFlowWeightIsMutable(); + super.addAll(values, queryFlowWeight_); + onChanged(); + } else { + queryFlowWeightBuilder_.addAllMessages(values); + } + return this; + } + public Builder clearQueryFlowWeight() { + if (queryFlowWeightBuilder_ == null) { + queryFlowWeight_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + queryFlowWeightBuilder_.clear(); + } + return this; + } + public Builder removeQueryFlowWeight(int index) { + if (queryFlowWeightBuilder_ == null) { + ensureQueryFlowWeightIsMutable(); + queryFlowWeight_.remove(index); + onChanged(); + } else { + queryFlowWeightBuilder_.remove(index); + } + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight.Builder getQueryFlowWeightBuilder( + int index) { + return getQueryFlowWeightFieldBuilder().getBuilder(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeightOrBuilder getQueryFlowWeightOrBuilder( + int index) { + if (queryFlowWeightBuilder_ == null) { + return queryFlowWeight_.get(index); } else { + return queryFlowWeightBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getQueryFlowWeightOrBuilderList() { + if (queryFlowWeightBuilder_ != null) { + return queryFlowWeightBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(queryFlowWeight_); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight.Builder addQueryFlowWeightBuilder() { + return getQueryFlowWeightFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight.getDefaultInstance()); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight.Builder addQueryFlowWeightBuilder( + int index) { + return getQueryFlowWeightFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight.getDefaultInstance()); + } + public java.util.List + getQueryFlowWeightBuilderList() { + return getQueryFlowWeightFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight, com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeightOrBuilder> + getQueryFlowWeightFieldBuilder() { + if (queryFlowWeightBuilder_ == null) { + queryFlowWeightBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight, com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeightOrBuilder>( + queryFlowWeight_, + ((bitField0_ & 0x00000008) == 0x00000008), + getParentForChildren(), + isClean()); + queryFlowWeight_ = null; + } + return queryFlowWeightBuilder_; + } + + // optional int32 time_to_live = 5; + private int timeToLive_ ; + public boolean hasTimeToLive() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public int getTimeToLive() { + return timeToLive_; + } + public Builder setTimeToLive(int value) { + bitField0_ |= 0x00000010; + timeToLive_ = value; + onChanged(); + return this; + } + public Builder clearTimeToLive() { + bitField0_ = (bitField0_ & ~0x00000010); + timeToLive_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.UpdateSearchIndexRequest) + } + + static { + defaultInstance = new UpdateSearchIndexRequest(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.UpdateSearchIndexRequest) + } + + public interface UpdateSearchIndexResponseOrBuilder + extends com.google.protobuf.MessageOrBuilder { + } + public static final class UpdateSearchIndexResponse extends + com.google.protobuf.GeneratedMessage + implements UpdateSearchIndexResponseOrBuilder { + // Use UpdateSearchIndexResponse.newBuilder() to construct. + private UpdateSearchIndexResponse(Builder builder) { + super(builder); + } + private UpdateSearchIndexResponse(boolean noInit) {} + + private static final UpdateSearchIndexResponse defaultInstance; + public static UpdateSearchIndexResponse getDefaultInstance() { + return defaultInstance; + } + + public UpdateSearchIndexResponse getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateSearchIndexResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateSearchIndexResponse_fieldAccessorTable; + } + + private void initFields() { + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexResponse prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateSearchIndexResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateSearchIndexResponse_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexResponse.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexResponse.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexResponse build() { + com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexResponse buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexResponse result = new com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexResponse(this); + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + } + } + } + + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.UpdateSearchIndexResponse) + } + + static { + defaultInstance = new UpdateSearchIndexResponse(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.UpdateSearchIndexResponse) + } + + public interface IndexInfoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string table_name = 1; + boolean hasTableName(); + String getTableName(); + + // optional string index_name = 2; + boolean hasIndexName(); + String getIndexName(); + } + public static final class IndexInfo extends + com.google.protobuf.GeneratedMessage + implements IndexInfoOrBuilder { + // Use IndexInfo.newBuilder() to construct. + private IndexInfo(Builder builder) { + super(builder); + } + private IndexInfo(boolean noInit) {} + + private static final IndexInfo defaultInstance; + public static IndexInfo getDefaultInstance() { + return defaultInstance; + } + + public IndexInfo getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_IndexInfo_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_IndexInfo_fieldAccessorTable; + } + + private int bitField0_; + // optional string table_name = 1; + public static final int TABLE_NAME_FIELD_NUMBER = 1; + private java.lang.Object tableName_; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + tableName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional string index_name = 2; + public static final int INDEX_NAME_FIELD_NUMBER = 2; + private java.lang.Object indexName_; + public boolean hasIndexName() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getIndexName() { + java.lang.Object ref = indexName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + indexName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getIndexNameBytes() { + java.lang.Object ref = indexName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + indexName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + tableName_ = ""; + indexName_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getIndexNameBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getIndexNameBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_IndexInfo_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_IndexInfo_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + tableName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + indexName_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo build() { + com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo result = new com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.tableName_ = tableName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.indexName_ = indexName_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo.getDefaultInstance()) return this; + if (other.hasTableName()) { + setTableName(other.getTableName()); + } + if (other.hasIndexName()) { + setIndexName(other.getIndexName()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + tableName_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + indexName_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // optional string table_name = 1; + private java.lang.Object tableName_ = ""; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + tableName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setTableName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + return this; + } + public Builder clearTableName() { + bitField0_ = (bitField0_ & ~0x00000001); + tableName_ = getDefaultInstance().getTableName(); + onChanged(); + return this; + } + void setTableName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + } + + // optional string index_name = 2; + private java.lang.Object indexName_ = ""; + public boolean hasIndexName() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getIndexName() { + java.lang.Object ref = indexName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + indexName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setIndexName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + indexName_ = value; + onChanged(); + return this; + } + public Builder clearIndexName() { + bitField0_ = (bitField0_ & ~0x00000002); + indexName_ = getDefaultInstance().getIndexName(); + onChanged(); + return this; + } + void setIndexName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000002; + indexName_ = value; + onChanged(); + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.IndexInfo) + } + + static { + defaultInstance = new IndexInfo(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.IndexInfo) + } + + public interface ListSearchIndexRequestOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string table_name = 1; + boolean hasTableName(); + String getTableName(); + } + public static final class ListSearchIndexRequest extends + com.google.protobuf.GeneratedMessage + implements ListSearchIndexRequestOrBuilder { + // Use ListSearchIndexRequest.newBuilder() to construct. + private ListSearchIndexRequest(Builder builder) { + super(builder); + } + private ListSearchIndexRequest(boolean noInit) {} + + private static final ListSearchIndexRequest defaultInstance; + public static ListSearchIndexRequest getDefaultInstance() { + return defaultInstance; + } + + public ListSearchIndexRequest getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListSearchIndexRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListSearchIndexRequest_fieldAccessorTable; + } + + private int bitField0_; + // optional string table_name = 1; + public static final int TABLE_NAME_FIELD_NUMBER = 1; + private java.lang.Object tableName_; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + tableName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + tableName_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getTableNameBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getTableNameBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListSearchIndexRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListSearchIndexRequest_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + tableName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest build() { + com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest result = new com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.tableName_ = tableName_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest.getDefaultInstance()) return this; + if (other.hasTableName()) { + setTableName(other.getTableName()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + tableName_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // optional string table_name = 1; + private java.lang.Object tableName_ = ""; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + tableName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setTableName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + return this; + } + public Builder clearTableName() { + bitField0_ = (bitField0_ & ~0x00000001); + tableName_ = getDefaultInstance().getTableName(); + onChanged(); + return this; + } + void setTableName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.ListSearchIndexRequest) + } + + static { + defaultInstance = new ListSearchIndexRequest(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.ListSearchIndexRequest) + } + + public interface ListSearchIndexResponseOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // repeated .com.alicloud.openservices.tablestore.core.protocol.IndexInfo indices = 1; + java.util.List + getIndicesList(); + com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo getIndices(int index); + int getIndicesCount(); + java.util.List + getIndicesOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfoOrBuilder getIndicesOrBuilder( + int index); + } + public static final class ListSearchIndexResponse extends + com.google.protobuf.GeneratedMessage + implements ListSearchIndexResponseOrBuilder { + // Use ListSearchIndexResponse.newBuilder() to construct. + private ListSearchIndexResponse(Builder builder) { + super(builder); + } + private ListSearchIndexResponse(boolean noInit) {} + + private static final ListSearchIndexResponse defaultInstance; + public static ListSearchIndexResponse getDefaultInstance() { + return defaultInstance; + } + + public ListSearchIndexResponse getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListSearchIndexResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListSearchIndexResponse_fieldAccessorTable; + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.IndexInfo indices = 1; + public static final int INDICES_FIELD_NUMBER = 1; + private java.util.List indices_; + public java.util.List getIndicesList() { + return indices_; + } + public java.util.List + getIndicesOrBuilderList() { + return indices_; + } + public int getIndicesCount() { + return indices_.size(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo getIndices(int index) { + return indices_.get(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfoOrBuilder getIndicesOrBuilder( + int index) { + return indices_.get(index); + } + + private void initFields() { + indices_ = java.util.Collections.emptyList(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < indices_.size(); i++) { + output.writeMessage(1, indices_.get(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < indices_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, indices_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListSearchIndexResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ListSearchIndexResponse_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getIndicesFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (indicesBuilder_ == null) { + indices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + indicesBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse build() { + com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse result = new com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse(this); + int from_bitField0_ = bitField0_; + if (indicesBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + indices_ = java.util.Collections.unmodifiableList(indices_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.indices_ = indices_; + } else { + result.indices_ = indicesBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse.getDefaultInstance()) return this; + if (indicesBuilder_ == null) { + if (!other.indices_.isEmpty()) { + if (indices_.isEmpty()) { + indices_ = other.indices_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureIndicesIsMutable(); + indices_.addAll(other.indices_); + } + onChanged(); + } + } else { + if (!other.indices_.isEmpty()) { + if (indicesBuilder_.isEmpty()) { + indicesBuilder_.dispose(); + indicesBuilder_ = null; + indices_ = other.indices_; + bitField0_ = (bitField0_ & ~0x00000001); + indicesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getIndicesFieldBuilder() : null; + } else { + indicesBuilder_.addAllMessages(other.indices_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addIndices(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // repeated .com.alicloud.openservices.tablestore.core.protocol.IndexInfo indices = 1; + private java.util.List indices_ = + java.util.Collections.emptyList(); + private void ensureIndicesIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + indices_ = new java.util.ArrayList(indices_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo, com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfoOrBuilder> indicesBuilder_; + + public java.util.List getIndicesList() { + if (indicesBuilder_ == null) { + return java.util.Collections.unmodifiableList(indices_); + } else { + return indicesBuilder_.getMessageList(); + } + } + public int getIndicesCount() { + if (indicesBuilder_ == null) { + return indices_.size(); + } else { + return indicesBuilder_.getCount(); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo getIndices(int index) { + if (indicesBuilder_ == null) { + return indices_.get(index); + } else { + return indicesBuilder_.getMessage(index); + } + } + public Builder setIndices( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo value) { + if (indicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIndicesIsMutable(); + indices_.set(index, value); + onChanged(); + } else { + indicesBuilder_.setMessage(index, value); + } + return this; + } + public Builder setIndices( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo.Builder builderForValue) { + if (indicesBuilder_ == null) { + ensureIndicesIsMutable(); + indices_.set(index, builderForValue.build()); + onChanged(); + } else { + indicesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + public Builder addIndices(com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo value) { + if (indicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIndicesIsMutable(); + indices_.add(value); + onChanged(); + } else { + indicesBuilder_.addMessage(value); + } + return this; + } + public Builder addIndices( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo value) { + if (indicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIndicesIsMutable(); + indices_.add(index, value); + onChanged(); + } else { + indicesBuilder_.addMessage(index, value); + } + return this; + } + public Builder addIndices( + com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo.Builder builderForValue) { + if (indicesBuilder_ == null) { + ensureIndicesIsMutable(); + indices_.add(builderForValue.build()); + onChanged(); + } else { + indicesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + public Builder addIndices( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo.Builder builderForValue) { + if (indicesBuilder_ == null) { + ensureIndicesIsMutable(); + indices_.add(index, builderForValue.build()); + onChanged(); + } else { + indicesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAllIndices( + java.lang.Iterable values) { + if (indicesBuilder_ == null) { + ensureIndicesIsMutable(); + super.addAll(values, indices_); + onChanged(); + } else { + indicesBuilder_.addAllMessages(values); + } + return this; + } + public Builder clearIndices() { + if (indicesBuilder_ == null) { + indices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + indicesBuilder_.clear(); + } + return this; + } + public Builder removeIndices(int index) { + if (indicesBuilder_ == null) { + ensureIndicesIsMutable(); + indices_.remove(index); + onChanged(); + } else { + indicesBuilder_.remove(index); + } + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo.Builder getIndicesBuilder( + int index) { + return getIndicesFieldBuilder().getBuilder(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfoOrBuilder getIndicesOrBuilder( + int index) { + if (indicesBuilder_ == null) { + return indices_.get(index); } else { + return indicesBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getIndicesOrBuilderList() { + if (indicesBuilder_ != null) { + return indicesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(indices_); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo.Builder addIndicesBuilder() { + return getIndicesFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo.getDefaultInstance()); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo.Builder addIndicesBuilder( + int index) { + return getIndicesFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo.getDefaultInstance()); + } + public java.util.List + getIndicesBuilderList() { + return getIndicesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo, com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfoOrBuilder> + getIndicesFieldBuilder() { + if (indicesBuilder_ == null) { + indicesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo, com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfoOrBuilder>( + indices_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + indices_ = null; + } + return indicesBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.ListSearchIndexResponse) + } + + static { + defaultInstance = new ListSearchIndexResponse(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.ListSearchIndexResponse) + } + + public interface DeleteSearchIndexRequestOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string table_name = 1; + boolean hasTableName(); + String getTableName(); + + // optional string index_name = 2; + boolean hasIndexName(); + String getIndexName(); + } + public static final class DeleteSearchIndexRequest extends + com.google.protobuf.GeneratedMessage + implements DeleteSearchIndexRequestOrBuilder { + // Use DeleteSearchIndexRequest.newBuilder() to construct. + private DeleteSearchIndexRequest(Builder builder) { + super(builder); + } + private DeleteSearchIndexRequest(boolean noInit) {} + + private static final DeleteSearchIndexRequest defaultInstance; + public static DeleteSearchIndexRequest getDefaultInstance() { + return defaultInstance; + } + + public DeleteSearchIndexRequest getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteSearchIndexRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteSearchIndexRequest_fieldAccessorTable; + } + + private int bitField0_; + // optional string table_name = 1; + public static final int TABLE_NAME_FIELD_NUMBER = 1; + private java.lang.Object tableName_; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + tableName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional string index_name = 2; + public static final int INDEX_NAME_FIELD_NUMBER = 2; + private java.lang.Object indexName_; + public boolean hasIndexName() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getIndexName() { + java.lang.Object ref = indexName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + indexName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getIndexNameBytes() { + java.lang.Object ref = indexName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + indexName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + tableName_ = ""; + indexName_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getIndexNameBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getIndexNameBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteSearchIndexRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteSearchIndexRequest_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + tableName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + indexName_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest build() { + com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest result = new com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.tableName_ = tableName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.indexName_ = indexName_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest.getDefaultInstance()) return this; + if (other.hasTableName()) { + setTableName(other.getTableName()); + } + if (other.hasIndexName()) { + setIndexName(other.getIndexName()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + tableName_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + indexName_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // optional string table_name = 1; + private java.lang.Object tableName_ = ""; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + tableName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setTableName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + return this; + } + public Builder clearTableName() { + bitField0_ = (bitField0_ & ~0x00000001); + tableName_ = getDefaultInstance().getTableName(); + onChanged(); + return this; + } + void setTableName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + } + + // optional string index_name = 2; + private java.lang.Object indexName_ = ""; + public boolean hasIndexName() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getIndexName() { + java.lang.Object ref = indexName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + indexName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setIndexName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + indexName_ = value; + onChanged(); + return this; + } + public Builder clearIndexName() { + bitField0_ = (bitField0_ & ~0x00000002); + indexName_ = getDefaultInstance().getIndexName(); + onChanged(); + return this; + } + void setIndexName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000002; + indexName_ = value; + onChanged(); + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.DeleteSearchIndexRequest) + } + + static { + defaultInstance = new DeleteSearchIndexRequest(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.DeleteSearchIndexRequest) + } + + public interface DeleteSearchIndexResponseOrBuilder + extends com.google.protobuf.MessageOrBuilder { + } + public static final class DeleteSearchIndexResponse extends + com.google.protobuf.GeneratedMessage + implements DeleteSearchIndexResponseOrBuilder { + // Use DeleteSearchIndexResponse.newBuilder() to construct. + private DeleteSearchIndexResponse(Builder builder) { + super(builder); + } + private DeleteSearchIndexResponse(boolean noInit) {} + + private static final DeleteSearchIndexResponse defaultInstance; + public static DeleteSearchIndexResponse getDefaultInstance() { + return defaultInstance; + } + + public DeleteSearchIndexResponse getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteSearchIndexResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteSearchIndexResponse_fieldAccessorTable; + } + + private void initFields() { + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteSearchIndexResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteSearchIndexResponse_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse build() { + com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse result = new com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse(this); + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + } + } + } + + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.DeleteSearchIndexResponse) + } + + static { + defaultInstance = new DeleteSearchIndexResponse(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.DeleteSearchIndexResponse) + } + + public interface SyncStatOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional .com.alicloud.openservices.tablestore.core.protocol.SyncPhase sync_phase = 1; + boolean hasSyncPhase(); + com.alicloud.openservices.tablestore.core.protocol.Search.SyncPhase getSyncPhase(); + + // optional int64 current_sync_timestamp = 2; + boolean hasCurrentSyncTimestamp(); + long getCurrentSyncTimestamp(); + } + public static final class SyncStat extends + com.google.protobuf.GeneratedMessage + implements SyncStatOrBuilder { + // Use SyncStat.newBuilder() to construct. + private SyncStat(Builder builder) { + super(builder); + } + private SyncStat(boolean noInit) {} + + private static final SyncStat defaultInstance; + public static SyncStat getDefaultInstance() { + return defaultInstance; + } + + public SyncStat getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SyncStat_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SyncStat_fieldAccessorTable; + } + + private int bitField0_; + // optional .com.alicloud.openservices.tablestore.core.protocol.SyncPhase sync_phase = 1; + public static final int SYNC_PHASE_FIELD_NUMBER = 1; + private com.alicloud.openservices.tablestore.core.protocol.Search.SyncPhase syncPhase_; + public boolean hasSyncPhase() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.SyncPhase getSyncPhase() { + return syncPhase_; + } + + // optional int64 current_sync_timestamp = 2; + public static final int CURRENT_SYNC_TIMESTAMP_FIELD_NUMBER = 2; + private long currentSyncTimestamp_; + public boolean hasCurrentSyncTimestamp() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public long getCurrentSyncTimestamp() { + return currentSyncTimestamp_; + } + + private void initFields() { + syncPhase_ = com.alicloud.openservices.tablestore.core.protocol.Search.SyncPhase.FULL; + currentSyncTimestamp_ = 0L; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeEnum(1, syncPhase_.getNumber()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeInt64(2, currentSyncTimestamp_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, syncPhase_.getNumber()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, currentSyncTimestamp_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.SyncStatOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SyncStat_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SyncStat_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + syncPhase_ = com.alicloud.openservices.tablestore.core.protocol.Search.SyncPhase.FULL; + bitField0_ = (bitField0_ & ~0x00000001); + currentSyncTimestamp_ = 0L; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat build() { + com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat result = new com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.syncPhase_ = syncPhase_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.currentSyncTimestamp_ = currentSyncTimestamp_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat.getDefaultInstance()) return this; + if (other.hasSyncPhase()) { + setSyncPhase(other.getSyncPhase()); + } + if (other.hasCurrentSyncTimestamp()) { + setCurrentSyncTimestamp(other.getCurrentSyncTimestamp()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.Search.SyncPhase value = com.alicloud.openservices.tablestore.core.protocol.Search.SyncPhase.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + syncPhase_ = value; + } + break; + } + case 16: { + bitField0_ |= 0x00000002; + currentSyncTimestamp_ = input.readInt64(); + break; + } + } + } + } + + private int bitField0_; + + // optional .com.alicloud.openservices.tablestore.core.protocol.SyncPhase sync_phase = 1; + private com.alicloud.openservices.tablestore.core.protocol.Search.SyncPhase syncPhase_ = com.alicloud.openservices.tablestore.core.protocol.Search.SyncPhase.FULL; + public boolean hasSyncPhase() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.SyncPhase getSyncPhase() { + return syncPhase_; + } + public Builder setSyncPhase(com.alicloud.openservices.tablestore.core.protocol.Search.SyncPhase value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + syncPhase_ = value; + onChanged(); + return this; + } + public Builder clearSyncPhase() { + bitField0_ = (bitField0_ & ~0x00000001); + syncPhase_ = com.alicloud.openservices.tablestore.core.protocol.Search.SyncPhase.FULL; + onChanged(); + return this; + } + + // optional int64 current_sync_timestamp = 2; + private long currentSyncTimestamp_ ; + public boolean hasCurrentSyncTimestamp() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public long getCurrentSyncTimestamp() { + return currentSyncTimestamp_; + } + public Builder setCurrentSyncTimestamp(long value) { + bitField0_ |= 0x00000002; + currentSyncTimestamp_ = value; + onChanged(); + return this; + } + public Builder clearCurrentSyncTimestamp() { + bitField0_ = (bitField0_ & ~0x00000002); + currentSyncTimestamp_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.SyncStat) + } + + static { + defaultInstance = new SyncStat(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.SyncStat) + } + + public interface MeteringInfoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional int64 storage_size = 1; + boolean hasStorageSize(); + long getStorageSize(); + + // optional int64 row_count = 2; + boolean hasRowCount(); + long getRowCount(); + + // optional int64 reserved_read_cu = 3; + boolean hasReservedReadCu(); + long getReservedReadCu(); + + // optional int64 timestamp = 4; + boolean hasTimestamp(); + long getTimestamp(); + } + public static final class MeteringInfo extends + com.google.protobuf.GeneratedMessage + implements MeteringInfoOrBuilder { + // Use MeteringInfo.newBuilder() to construct. + private MeteringInfo(Builder builder) { + super(builder); + } + private MeteringInfo(boolean noInit) {} + + private static final MeteringInfo defaultInstance; + public static MeteringInfo getDefaultInstance() { + return defaultInstance; + } + + public MeteringInfo getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MeteringInfo_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MeteringInfo_fieldAccessorTable; + } + + private int bitField0_; + // optional int64 storage_size = 1; + public static final int STORAGE_SIZE_FIELD_NUMBER = 1; + private long storageSize_; + public boolean hasStorageSize() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public long getStorageSize() { + return storageSize_; + } + + // optional int64 row_count = 2; + public static final int ROW_COUNT_FIELD_NUMBER = 2; + private long rowCount_; + public boolean hasRowCount() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public long getRowCount() { + return rowCount_; + } + + // optional int64 reserved_read_cu = 3; + public static final int RESERVED_READ_CU_FIELD_NUMBER = 3; + private long reservedReadCu_; + public boolean hasReservedReadCu() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public long getReservedReadCu() { + return reservedReadCu_; + } + + // optional int64 timestamp = 4; + public static final int TIMESTAMP_FIELD_NUMBER = 4; + private long timestamp_; + public boolean hasTimestamp() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public long getTimestamp() { + return timestamp_; + } + + private void initFields() { + storageSize_ = 0L; + rowCount_ = 0L; + reservedReadCu_ = 0L; + timestamp_ = 0L; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeInt64(1, storageSize_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeInt64(2, rowCount_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeInt64(3, reservedReadCu_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeInt64(4, timestamp_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, storageSize_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, rowCount_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, reservedReadCu_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(4, timestamp_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MeteringInfo_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MeteringInfo_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + storageSize_ = 0L; + bitField0_ = (bitField0_ & ~0x00000001); + rowCount_ = 0L; + bitField0_ = (bitField0_ & ~0x00000002); + reservedReadCu_ = 0L; + bitField0_ = (bitField0_ & ~0x00000004); + timestamp_ = 0L; + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo build() { + com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo result = new com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.storageSize_ = storageSize_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.rowCount_ = rowCount_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.reservedReadCu_ = reservedReadCu_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.timestamp_ = timestamp_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo.getDefaultInstance()) return this; + if (other.hasStorageSize()) { + setStorageSize(other.getStorageSize()); + } + if (other.hasRowCount()) { + setRowCount(other.getRowCount()); + } + if (other.hasReservedReadCu()) { + setReservedReadCu(other.getReservedReadCu()); + } + if (other.hasTimestamp()) { + setTimestamp(other.getTimestamp()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + storageSize_ = input.readInt64(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + rowCount_ = input.readInt64(); + break; + } + case 24: { + bitField0_ |= 0x00000004; + reservedReadCu_ = input.readInt64(); + break; + } + case 32: { + bitField0_ |= 0x00000008; + timestamp_ = input.readInt64(); + break; + } + } + } + } + + private int bitField0_; + + // optional int64 storage_size = 1; + private long storageSize_ ; + public boolean hasStorageSize() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public long getStorageSize() { + return storageSize_; + } + public Builder setStorageSize(long value) { + bitField0_ |= 0x00000001; + storageSize_ = value; + onChanged(); + return this; + } + public Builder clearStorageSize() { + bitField0_ = (bitField0_ & ~0x00000001); + storageSize_ = 0L; + onChanged(); + return this; + } + + // optional int64 row_count = 2; + private long rowCount_ ; + public boolean hasRowCount() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public long getRowCount() { + return rowCount_; + } + public Builder setRowCount(long value) { + bitField0_ |= 0x00000002; + rowCount_ = value; + onChanged(); + return this; + } + public Builder clearRowCount() { + bitField0_ = (bitField0_ & ~0x00000002); + rowCount_ = 0L; + onChanged(); + return this; + } + + // optional int64 reserved_read_cu = 3; + private long reservedReadCu_ ; + public boolean hasReservedReadCu() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public long getReservedReadCu() { + return reservedReadCu_; + } + public Builder setReservedReadCu(long value) { + bitField0_ |= 0x00000004; + reservedReadCu_ = value; + onChanged(); + return this; + } + public Builder clearReservedReadCu() { + bitField0_ = (bitField0_ & ~0x00000004); + reservedReadCu_ = 0L; + onChanged(); + return this; + } + + // optional int64 timestamp = 4; + private long timestamp_ ; + public boolean hasTimestamp() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public long getTimestamp() { + return timestamp_; + } + public Builder setTimestamp(long value) { + bitField0_ |= 0x00000008; + timestamp_ = value; + onChanged(); + return this; + } + public Builder clearTimestamp() { + bitField0_ = (bitField0_ & ~0x00000008); + timestamp_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.MeteringInfo) + } + + static { + defaultInstance = new MeteringInfo(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.MeteringInfo) + } + + public interface DescribeSearchIndexRequestOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string table_name = 1; + boolean hasTableName(); + String getTableName(); + + // optional string index_name = 2; + boolean hasIndexName(); + String getIndexName(); + } + public static final class DescribeSearchIndexRequest extends + com.google.protobuf.GeneratedMessage + implements DescribeSearchIndexRequestOrBuilder { + // Use DescribeSearchIndexRequest.newBuilder() to construct. + private DescribeSearchIndexRequest(Builder builder) { + super(builder); + } + private DescribeSearchIndexRequest(boolean noInit) {} + + private static final DescribeSearchIndexRequest defaultInstance; + public static DescribeSearchIndexRequest getDefaultInstance() { + return defaultInstance; + } + + public DescribeSearchIndexRequest getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeSearchIndexRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeSearchIndexRequest_fieldAccessorTable; + } + + private int bitField0_; + // optional string table_name = 1; + public static final int TABLE_NAME_FIELD_NUMBER = 1; + private java.lang.Object tableName_; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + tableName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional string index_name = 2; + public static final int INDEX_NAME_FIELD_NUMBER = 2; + private java.lang.Object indexName_; + public boolean hasIndexName() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getIndexName() { + java.lang.Object ref = indexName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + indexName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getIndexNameBytes() { + java.lang.Object ref = indexName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + indexName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + tableName_ = ""; + indexName_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getIndexNameBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getIndexNameBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeSearchIndexRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeSearchIndexRequest_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + tableName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + indexName_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest build() { + com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest result = new com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.tableName_ = tableName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.indexName_ = indexName_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest.getDefaultInstance()) return this; + if (other.hasTableName()) { + setTableName(other.getTableName()); + } + if (other.hasIndexName()) { + setIndexName(other.getIndexName()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + tableName_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + indexName_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // optional string table_name = 1; + private java.lang.Object tableName_ = ""; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + tableName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setTableName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + return this; + } + public Builder clearTableName() { + bitField0_ = (bitField0_ & ~0x00000001); + tableName_ = getDefaultInstance().getTableName(); + onChanged(); + return this; + } + void setTableName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + } + + // optional string index_name = 2; + private java.lang.Object indexName_ = ""; + public boolean hasIndexName() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getIndexName() { + java.lang.Object ref = indexName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + indexName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setIndexName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + indexName_ = value; + onChanged(); + return this; + } + public Builder clearIndexName() { + bitField0_ = (bitField0_ & ~0x00000002); + indexName_ = getDefaultInstance().getIndexName(); + onChanged(); + return this; + } + void setIndexName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000002; + indexName_ = value; + onChanged(); + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.DescribeSearchIndexRequest) + } + + static { + defaultInstance = new DescribeSearchIndexRequest(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.DescribeSearchIndexRequest) + } + + public interface DescribeSearchIndexResponseOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional .com.alicloud.openservices.tablestore.core.protocol.IndexSchema schema = 1; + boolean hasSchema(); + com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema getSchema(); + com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchemaOrBuilder getSchemaOrBuilder(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.SyncStat sync_stat = 2; + boolean hasSyncStat(); + com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat getSyncStat(); + com.alicloud.openservices.tablestore.core.protocol.Search.SyncStatOrBuilder getSyncStatOrBuilder(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.MeteringInfo metering_info = 3; + boolean hasMeteringInfo(); + com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo getMeteringInfo(); + com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfoOrBuilder getMeteringInfoOrBuilder(); + + // optional string brother_index_name = 4; + boolean hasBrotherIndexName(); + String getBrotherIndexName(); + + // repeated .com.alicloud.openservices.tablestore.core.protocol.QueryFlowWeight query_flow_weight = 5; + java.util.List + getQueryFlowWeightList(); + com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight getQueryFlowWeight(int index); + int getQueryFlowWeightCount(); + java.util.List + getQueryFlowWeightOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeightOrBuilder getQueryFlowWeightOrBuilder( + int index); + + // optional int64 create_time = 6; + boolean hasCreateTime(); + long getCreateTime(); + + // optional int32 time_to_live = 7; + boolean hasTimeToLive(); + int getTimeToLive(); + } + public static final class DescribeSearchIndexResponse extends + com.google.protobuf.GeneratedMessage + implements DescribeSearchIndexResponseOrBuilder { + // Use DescribeSearchIndexResponse.newBuilder() to construct. + private DescribeSearchIndexResponse(Builder builder) { + super(builder); + } + private DescribeSearchIndexResponse(boolean noInit) {} + + private static final DescribeSearchIndexResponse defaultInstance; + public static DescribeSearchIndexResponse getDefaultInstance() { + return defaultInstance; + } + + public DescribeSearchIndexResponse getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeSearchIndexResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeSearchIndexResponse_fieldAccessorTable; + } + + private int bitField0_; + // optional .com.alicloud.openservices.tablestore.core.protocol.IndexSchema schema = 1; + public static final int SCHEMA_FIELD_NUMBER = 1; + private com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema schema_; + public boolean hasSchema() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema getSchema() { + return schema_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchemaOrBuilder getSchemaOrBuilder() { + return schema_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.SyncStat sync_stat = 2; + public static final int SYNC_STAT_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat syncStat_; + public boolean hasSyncStat() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat getSyncStat() { + return syncStat_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.SyncStatOrBuilder getSyncStatOrBuilder() { + return syncStat_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.MeteringInfo metering_info = 3; + public static final int METERING_INFO_FIELD_NUMBER = 3; + private com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo meteringInfo_; + public boolean hasMeteringInfo() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo getMeteringInfo() { + return meteringInfo_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfoOrBuilder getMeteringInfoOrBuilder() { + return meteringInfo_; + } + + // optional string brother_index_name = 4; + public static final int BROTHER_INDEX_NAME_FIELD_NUMBER = 4; + private java.lang.Object brotherIndexName_; + public boolean hasBrotherIndexName() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public String getBrotherIndexName() { + java.lang.Object ref = brotherIndexName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + brotherIndexName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getBrotherIndexNameBytes() { + java.lang.Object ref = brotherIndexName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + brotherIndexName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.QueryFlowWeight query_flow_weight = 5; + public static final int QUERY_FLOW_WEIGHT_FIELD_NUMBER = 5; + private java.util.List queryFlowWeight_; + public java.util.List getQueryFlowWeightList() { + return queryFlowWeight_; + } + public java.util.List + getQueryFlowWeightOrBuilderList() { + return queryFlowWeight_; + } + public int getQueryFlowWeightCount() { + return queryFlowWeight_.size(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight getQueryFlowWeight(int index) { + return queryFlowWeight_.get(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeightOrBuilder getQueryFlowWeightOrBuilder( + int index) { + return queryFlowWeight_.get(index); + } + + // optional int64 create_time = 6; + public static final int CREATE_TIME_FIELD_NUMBER = 6; + private long createTime_; + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public long getCreateTime() { + return createTime_; + } + + // optional int32 time_to_live = 7; + public static final int TIME_TO_LIVE_FIELD_NUMBER = 7; + private int timeToLive_; + public boolean hasTimeToLive() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + public int getTimeToLive() { + return timeToLive_; + } + + private void initFields() { + schema_ = com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.getDefaultInstance(); + syncStat_ = com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat.getDefaultInstance(); + meteringInfo_ = com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo.getDefaultInstance(); + brotherIndexName_ = ""; + queryFlowWeight_ = java.util.Collections.emptyList(); + createTime_ = 0L; + timeToLive_ = 0; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(1, schema_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeMessage(2, syncStat_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeMessage(3, meteringInfo_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeBytes(4, getBrotherIndexNameBytes()); + } + for (int i = 0; i < queryFlowWeight_.size(); i++) { + output.writeMessage(5, queryFlowWeight_.get(i)); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeInt64(6, createTime_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeInt32(7, timeToLive_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, schema_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, syncStat_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, meteringInfo_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(4, getBrotherIndexNameBytes()); + } + for (int i = 0; i < queryFlowWeight_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, queryFlowWeight_.get(i)); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(6, createTime_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(7, timeToLive_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeSearchIndexResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeSearchIndexResponse_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getSchemaFieldBuilder(); + getSyncStatFieldBuilder(); + getMeteringInfoFieldBuilder(); + getQueryFlowWeightFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (schemaBuilder_ == null) { + schema_ = com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.getDefaultInstance(); + } else { + schemaBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (syncStatBuilder_ == null) { + syncStat_ = com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat.getDefaultInstance(); + } else { + syncStatBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + if (meteringInfoBuilder_ == null) { + meteringInfo_ = com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo.getDefaultInstance(); + } else { + meteringInfoBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + brotherIndexName_ = ""; + bitField0_ = (bitField0_ & ~0x00000008); + if (queryFlowWeightBuilder_ == null) { + queryFlowWeight_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + } else { + queryFlowWeightBuilder_.clear(); + } + createTime_ = 0L; + bitField0_ = (bitField0_ & ~0x00000020); + timeToLive_ = 0; + bitField0_ = (bitField0_ & ~0x00000040); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse build() { + com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse result = new com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + if (schemaBuilder_ == null) { + result.schema_ = schema_; + } else { + result.schema_ = schemaBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + if (syncStatBuilder_ == null) { + result.syncStat_ = syncStat_; + } else { + result.syncStat_ = syncStatBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + if (meteringInfoBuilder_ == null) { + result.meteringInfo_ = meteringInfo_; + } else { + result.meteringInfo_ = meteringInfoBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.brotherIndexName_ = brotherIndexName_; + if (queryFlowWeightBuilder_ == null) { + if (((bitField0_ & 0x00000010) == 0x00000010)) { + queryFlowWeight_ = java.util.Collections.unmodifiableList(queryFlowWeight_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.queryFlowWeight_ = queryFlowWeight_; + } else { + result.queryFlowWeight_ = queryFlowWeightBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000010; + } + result.createTime_ = createTime_; + if (((from_bitField0_ & 0x00000040) == 0x00000040)) { + to_bitField0_ |= 0x00000020; + } + result.timeToLive_ = timeToLive_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse.getDefaultInstance()) return this; + if (other.hasSchema()) { + mergeSchema(other.getSchema()); + } + if (other.hasSyncStat()) { + mergeSyncStat(other.getSyncStat()); + } + if (other.hasMeteringInfo()) { + mergeMeteringInfo(other.getMeteringInfo()); + } + if (other.hasBrotherIndexName()) { + setBrotherIndexName(other.getBrotherIndexName()); + } + if (queryFlowWeightBuilder_ == null) { + if (!other.queryFlowWeight_.isEmpty()) { + if (queryFlowWeight_.isEmpty()) { + queryFlowWeight_ = other.queryFlowWeight_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureQueryFlowWeightIsMutable(); + queryFlowWeight_.addAll(other.queryFlowWeight_); + } + onChanged(); + } + } else { + if (!other.queryFlowWeight_.isEmpty()) { + if (queryFlowWeightBuilder_.isEmpty()) { + queryFlowWeightBuilder_.dispose(); + queryFlowWeightBuilder_ = null; + queryFlowWeight_ = other.queryFlowWeight_; + bitField0_ = (bitField0_ & ~0x00000010); + queryFlowWeightBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getQueryFlowWeightFieldBuilder() : null; + } else { + queryFlowWeightBuilder_.addAllMessages(other.queryFlowWeight_); + } + } + } + if (other.hasCreateTime()) { + setCreateTime(other.getCreateTime()); + } + if (other.hasTimeToLive()) { + setTimeToLive(other.getTimeToLive()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.newBuilder(); + if (hasSchema()) { + subBuilder.mergeFrom(getSchema()); + } + input.readMessage(subBuilder, extensionRegistry); + setSchema(subBuilder.buildPartial()); + break; + } + case 18: { + com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat.newBuilder(); + if (hasSyncStat()) { + subBuilder.mergeFrom(getSyncStat()); + } + input.readMessage(subBuilder, extensionRegistry); + setSyncStat(subBuilder.buildPartial()); + break; + } + case 26: { + com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo.newBuilder(); + if (hasMeteringInfo()) { + subBuilder.mergeFrom(getMeteringInfo()); + } + input.readMessage(subBuilder, extensionRegistry); + setMeteringInfo(subBuilder.buildPartial()); + break; + } + case 34: { + bitField0_ |= 0x00000008; + brotherIndexName_ = input.readBytes(); + break; + } + case 42: { + com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addQueryFlowWeight(subBuilder.buildPartial()); + break; + } + case 48: { + bitField0_ |= 0x00000020; + createTime_ = input.readInt64(); + break; + } + case 56: { + bitField0_ |= 0x00000040; + timeToLive_ = input.readInt32(); + break; + } + } + } + } + + private int bitField0_; + + // optional .com.alicloud.openservices.tablestore.core.protocol.IndexSchema schema = 1; + private com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema schema_ = com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema, com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchemaOrBuilder> schemaBuilder_; + public boolean hasSchema() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema getSchema() { + if (schemaBuilder_ == null) { + return schema_; + } else { + return schemaBuilder_.getMessage(); + } + } + public Builder setSchema(com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema value) { + if (schemaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + schema_ = value; + onChanged(); + } else { + schemaBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder setSchema( + com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.Builder builderForValue) { + if (schemaBuilder_ == null) { + schema_ = builderForValue.build(); + onChanged(); + } else { + schemaBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder mergeSchema(com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema value) { + if (schemaBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001) && + schema_ != com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.getDefaultInstance()) { + schema_ = + com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.newBuilder(schema_).mergeFrom(value).buildPartial(); + } else { + schema_ = value; + } + onChanged(); + } else { + schemaBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder clearSchema() { + if (schemaBuilder_ == null) { + schema_ = com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.getDefaultInstance(); + onChanged(); + } else { + schemaBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.Builder getSchemaBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getSchemaFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchemaOrBuilder getSchemaOrBuilder() { + if (schemaBuilder_ != null) { + return schemaBuilder_.getMessageOrBuilder(); + } else { + return schema_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema, com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchemaOrBuilder> + getSchemaFieldBuilder() { + if (schemaBuilder_ == null) { + schemaBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema, com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchemaOrBuilder>( + schema_, + getParentForChildren(), + isClean()); + schema_ = null; + } + return schemaBuilder_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.SyncStat sync_stat = 2; + private com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat syncStat_ = com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat, com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.SyncStatOrBuilder> syncStatBuilder_; + public boolean hasSyncStat() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat getSyncStat() { + if (syncStatBuilder_ == null) { + return syncStat_; + } else { + return syncStatBuilder_.getMessage(); + } + } + public Builder setSyncStat(com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat value) { + if (syncStatBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + syncStat_ = value; + onChanged(); + } else { + syncStatBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder setSyncStat( + com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat.Builder builderForValue) { + if (syncStatBuilder_ == null) { + syncStat_ = builderForValue.build(); + onChanged(); + } else { + syncStatBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder mergeSyncStat(com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat value) { + if (syncStatBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002) && + syncStat_ != com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat.getDefaultInstance()) { + syncStat_ = + com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat.newBuilder(syncStat_).mergeFrom(value).buildPartial(); + } else { + syncStat_ = value; + } + onChanged(); + } else { + syncStatBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder clearSyncStat() { + if (syncStatBuilder_ == null) { + syncStat_ = com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat.getDefaultInstance(); + onChanged(); + } else { + syncStatBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat.Builder getSyncStatBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getSyncStatFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.SyncStatOrBuilder getSyncStatOrBuilder() { + if (syncStatBuilder_ != null) { + return syncStatBuilder_.getMessageOrBuilder(); + } else { + return syncStat_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat, com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.SyncStatOrBuilder> + getSyncStatFieldBuilder() { + if (syncStatBuilder_ == null) { + syncStatBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat, com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.SyncStatOrBuilder>( + syncStat_, + getParentForChildren(), + isClean()); + syncStat_ = null; + } + return syncStatBuilder_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.MeteringInfo metering_info = 3; + private com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo meteringInfo_ = com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo, com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfoOrBuilder> meteringInfoBuilder_; + public boolean hasMeteringInfo() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo getMeteringInfo() { + if (meteringInfoBuilder_ == null) { + return meteringInfo_; + } else { + return meteringInfoBuilder_.getMessage(); + } + } + public Builder setMeteringInfo(com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo value) { + if (meteringInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + meteringInfo_ = value; + onChanged(); + } else { + meteringInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder setMeteringInfo( + com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo.Builder builderForValue) { + if (meteringInfoBuilder_ == null) { + meteringInfo_ = builderForValue.build(); + onChanged(); + } else { + meteringInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder mergeMeteringInfo(com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo value) { + if (meteringInfoBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004) && + meteringInfo_ != com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo.getDefaultInstance()) { + meteringInfo_ = + com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo.newBuilder(meteringInfo_).mergeFrom(value).buildPartial(); + } else { + meteringInfo_ = value; + } + onChanged(); + } else { + meteringInfoBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder clearMeteringInfo() { + if (meteringInfoBuilder_ == null) { + meteringInfo_ = com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo.getDefaultInstance(); + onChanged(); + } else { + meteringInfoBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo.Builder getMeteringInfoBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getMeteringInfoFieldBuilder().getBuilder(); } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_SyncStat_fieldAccessorTable; + public com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfoOrBuilder getMeteringInfoOrBuilder() { + if (meteringInfoBuilder_ != null) { + return meteringInfoBuilder_.getMessageOrBuilder(); + } else { + return meteringInfo_; + } } - - // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo, com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfoOrBuilder> + getMeteringInfoFieldBuilder() { + if (meteringInfoBuilder_ == null) { + meteringInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo, com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfoOrBuilder>( + meteringInfo_, + getParentForChildren(), + isClean()); + meteringInfo_ = null; + } + return meteringInfoBuilder_; } - private Builder(BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); + // optional string brother_index_name = 4; + private java.lang.Object brotherIndexName_ = ""; + public boolean hasBrotherIndexName() { + return ((bitField0_ & 0x00000008) == 0x00000008); } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + public String getBrotherIndexName() { + java.lang.Object ref = brotherIndexName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + brotherIndexName_ = s; + return s; + } else { + return (String) ref; } } - private static Builder create() { - return new Builder(); + public Builder setBrotherIndexName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + brotherIndexName_ = value; + onChanged(); + return this; } - - public Builder clear() { - super.clear(); - syncPhase_ = com.alicloud.openservices.tablestore.core.protocol.Search.SyncPhase.FULL; - bitField0_ = (bitField0_ & ~0x00000001); - currentSyncTimestamp_ = 0L; - bitField0_ = (bitField0_ & ~0x00000002); + public Builder clearBrotherIndexName() { + bitField0_ = (bitField0_ & ~0x00000008); + brotherIndexName_ = getDefaultInstance().getBrotherIndexName(); + onChanged(); return this; } - - public Builder clone() { - return create().mergeFrom(buildPartial()); + void setBrotherIndexName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000008; + brotherIndexName_ = value; + onChanged(); } - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat.getDescriptor(); + // repeated .com.alicloud.openservices.tablestore.core.protocol.QueryFlowWeight query_flow_weight = 5; + private java.util.List queryFlowWeight_ = + java.util.Collections.emptyList(); + private void ensureQueryFlowWeightIsMutable() { + if (!((bitField0_ & 0x00000010) == 0x00000010)) { + queryFlowWeight_ = new java.util.ArrayList(queryFlowWeight_); + bitField0_ |= 0x00000010; + } } - public com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat.getDefaultInstance(); - } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight, com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeightOrBuilder> queryFlowWeightBuilder_; - public com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat build() { - com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); + public java.util.List getQueryFlowWeightList() { + if (queryFlowWeightBuilder_ == null) { + return java.util.Collections.unmodifiableList(queryFlowWeight_); + } else { + return queryFlowWeightBuilder_.getMessageList(); } - return result; } - - private com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); + public int getQueryFlowWeightCount() { + if (queryFlowWeightBuilder_ == null) { + return queryFlowWeight_.size(); + } else { + return queryFlowWeightBuilder_.getCount(); } - return result; } - - public com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat result = new com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; + public com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight getQueryFlowWeight(int index) { + if (queryFlowWeightBuilder_ == null) { + return queryFlowWeight_.get(index); + } else { + return queryFlowWeightBuilder_.getMessage(index); } - result.syncPhase_ = syncPhase_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; + } + public Builder setQueryFlowWeight( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight value) { + if (queryFlowWeightBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQueryFlowWeightIsMutable(); + queryFlowWeight_.set(index, value); + onChanged(); + } else { + queryFlowWeightBuilder_.setMessage(index, value); } - result.currentSyncTimestamp_ = currentSyncTimestamp_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; + return this; } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat)other); + public Builder setQueryFlowWeight( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight.Builder builderForValue) { + if (queryFlowWeightBuilder_ == null) { + ensureQueryFlowWeightIsMutable(); + queryFlowWeight_.set(index, builderForValue.build()); + onChanged(); } else { - super.mergeFrom(other); - return this; + queryFlowWeightBuilder_.setMessage(index, builderForValue.build()); } + return this; } - - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat.getDefaultInstance()) return this; - if (other.hasSyncPhase()) { - setSyncPhase(other.getSyncPhase()); + public Builder addQueryFlowWeight(com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight value) { + if (queryFlowWeightBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQueryFlowWeightIsMutable(); + queryFlowWeight_.add(value); + onChanged(); + } else { + queryFlowWeightBuilder_.addMessage(value); } - if (other.hasCurrentSyncTimestamp()) { - setCurrentSyncTimestamp(other.getCurrentSyncTimestamp()); + return this; + } + public Builder addQueryFlowWeight( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight value) { + if (queryFlowWeightBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQueryFlowWeightIsMutable(); + queryFlowWeight_.add(index, value); + onChanged(); + } else { + queryFlowWeightBuilder_.addMessage(index, value); } - this.mergeUnknownFields(other.getUnknownFields()); return this; } - - public final boolean isInitialized() { - return true; + public Builder addQueryFlowWeight( + com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight.Builder builderForValue) { + if (queryFlowWeightBuilder_ == null) { + ensureQueryFlowWeightIsMutable(); + queryFlowWeight_.add(builderForValue.build()); + onChanged(); + } else { + queryFlowWeightBuilder_.addMessage(builderForValue.build()); + } + return this; } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 8: { - int rawValue = input.readEnum(); - com.alicloud.openservices.tablestore.core.protocol.Search.SyncPhase value = com.alicloud.openservices.tablestore.core.protocol.Search.SyncPhase.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(1, rawValue); - } else { - bitField0_ |= 0x00000001; - syncPhase_ = value; - } - break; - } - case 16: { - bitField0_ |= 0x00000002; - currentSyncTimestamp_ = input.readInt64(); - break; - } - } + public Builder addQueryFlowWeight( + int index, com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight.Builder builderForValue) { + if (queryFlowWeightBuilder_ == null) { + ensureQueryFlowWeightIsMutable(); + queryFlowWeight_.add(index, builderForValue.build()); + onChanged(); + } else { + queryFlowWeightBuilder_.addMessage(index, builderForValue.build()); } + return this; } - - private int bitField0_; - - // optional .com.alicloud.openservices.tablestore.core.protocol.SyncPhase sync_phase = 1; - private com.alicloud.openservices.tablestore.core.protocol.Search.SyncPhase syncPhase_ = com.alicloud.openservices.tablestore.core.protocol.Search.SyncPhase.FULL; - public boolean hasSyncPhase() { - return ((bitField0_ & 0x00000001) == 0x00000001); + public Builder addAllQueryFlowWeight( + java.lang.Iterable values) { + if (queryFlowWeightBuilder_ == null) { + ensureQueryFlowWeightIsMutable(); + super.addAll(values, queryFlowWeight_); + onChanged(); + } else { + queryFlowWeightBuilder_.addAllMessages(values); + } + return this; } - public com.alicloud.openservices.tablestore.core.protocol.Search.SyncPhase getSyncPhase() { - return syncPhase_; + public Builder clearQueryFlowWeight() { + if (queryFlowWeightBuilder_ == null) { + queryFlowWeight_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + queryFlowWeightBuilder_.clear(); + } + return this; } - public Builder setSyncPhase(com.alicloud.openservices.tablestore.core.protocol.Search.SyncPhase value) { - if (value == null) { - throw new NullPointerException(); + public Builder removeQueryFlowWeight(int index) { + if (queryFlowWeightBuilder_ == null) { + ensureQueryFlowWeightIsMutable(); + queryFlowWeight_.remove(index); + onChanged(); + } else { + queryFlowWeightBuilder_.remove(index); } - bitField0_ |= 0x00000001; - syncPhase_ = value; + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight.Builder getQueryFlowWeightBuilder( + int index) { + return getQueryFlowWeightFieldBuilder().getBuilder(index); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeightOrBuilder getQueryFlowWeightOrBuilder( + int index) { + if (queryFlowWeightBuilder_ == null) { + return queryFlowWeight_.get(index); } else { + return queryFlowWeightBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getQueryFlowWeightOrBuilderList() { + if (queryFlowWeightBuilder_ != null) { + return queryFlowWeightBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(queryFlowWeight_); + } + } + public com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight.Builder addQueryFlowWeightBuilder() { + return getQueryFlowWeightFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight.getDefaultInstance()); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight.Builder addQueryFlowWeightBuilder( + int index) { + return getQueryFlowWeightFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight.getDefaultInstance()); + } + public java.util.List + getQueryFlowWeightBuilderList() { + return getQueryFlowWeightFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight, com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeightOrBuilder> + getQueryFlowWeightFieldBuilder() { + if (queryFlowWeightBuilder_ == null) { + queryFlowWeightBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight, com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeightOrBuilder>( + queryFlowWeight_, + ((bitField0_ & 0x00000010) == 0x00000010), + getParentForChildren(), + isClean()); + queryFlowWeight_ = null; + } + return queryFlowWeightBuilder_; + } + + // optional int64 create_time = 6; + private long createTime_ ; + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + public long getCreateTime() { + return createTime_; + } + public Builder setCreateTime(long value) { + bitField0_ |= 0x00000020; + createTime_ = value; onChanged(); return this; } - public Builder clearSyncPhase() { - bitField0_ = (bitField0_ & ~0x00000001); - syncPhase_ = com.alicloud.openservices.tablestore.core.protocol.Search.SyncPhase.FULL; + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000020); + createTime_ = 0L; onChanged(); return this; } - // optional int64 current_sync_timestamp = 2; - private long currentSyncTimestamp_ ; - public boolean hasCurrentSyncTimestamp() { - return ((bitField0_ & 0x00000002) == 0x00000002); + // optional int32 time_to_live = 7; + private int timeToLive_ ; + public boolean hasTimeToLive() { + return ((bitField0_ & 0x00000040) == 0x00000040); } - public long getCurrentSyncTimestamp() { - return currentSyncTimestamp_; + public int getTimeToLive() { + return timeToLive_; } - public Builder setCurrentSyncTimestamp(long value) { - bitField0_ |= 0x00000002; - currentSyncTimestamp_ = value; + public Builder setTimeToLive(int value) { + bitField0_ |= 0x00000040; + timeToLive_ = value; onChanged(); return this; } - public Builder clearCurrentSyncTimestamp() { - bitField0_ = (bitField0_ & ~0x00000002); - currentSyncTimestamp_ = 0L; + public Builder clearTimeToLive() { + bitField0_ = (bitField0_ & ~0x00000040); + timeToLive_ = 0; onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.SyncStat) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.DescribeSearchIndexResponse) } static { - defaultInstance = new SyncStat(true); + defaultInstance = new DescribeSearchIndexResponse(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.SyncStat) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.DescribeSearchIndexResponse) } - public interface MeteringInfoOrBuilder + public interface ScanQueryOrBuilder extends com.google.protobuf.MessageOrBuilder { - // optional int64 storage_size = 1; - boolean hasStorageSize(); - long getStorageSize(); + // optional .com.alicloud.openservices.tablestore.core.protocol.Query query = 1; + boolean hasQuery(); + com.alicloud.openservices.tablestore.core.protocol.Search.Query getQuery(); + com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getQueryOrBuilder(); - // optional int64 doc_count = 2; - boolean hasDocCount(); - long getDocCount(); + // optional int32 limit = 2; + boolean hasLimit(); + int getLimit(); - // optional int64 reserved_read_cu = 3; - boolean hasReservedReadCu(); - long getReservedReadCu(); + // optional int32 alive_time = 3; + boolean hasAliveTime(); + int getAliveTime(); - // optional int64 timestamp = 4; - boolean hasTimestamp(); - long getTimestamp(); + // optional bytes token = 4; + boolean hasToken(); + com.google.protobuf.ByteString getToken(); + + // optional int32 current_parallel_id = 5; + boolean hasCurrentParallelId(); + int getCurrentParallelId(); + + // optional int32 max_parallel = 6; + boolean hasMaxParallel(); + int getMaxParallel(); } - public static final class MeteringInfo extends + public static final class ScanQuery extends com.google.protobuf.GeneratedMessage - implements MeteringInfoOrBuilder { - // Use MeteringInfo.newBuilder() to construct. - private MeteringInfo(Builder builder) { + implements ScanQueryOrBuilder { + // Use ScanQuery.newBuilder() to construct. + private ScanQuery(Builder builder) { super(builder); } - private MeteringInfo(boolean noInit) {} + private ScanQuery(boolean noInit) {} - private static final MeteringInfo defaultInstance; - public static MeteringInfo getDefaultInstance() { + private static final ScanQuery defaultInstance; + public static ScanQuery getDefaultInstance() { return defaultInstance; } - public MeteringInfo getDefaultInstanceForType() { + public ScanQuery getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MeteringInfo_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ScanQuery_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MeteringInfo_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ScanQuery_fieldAccessorTable; } private int bitField0_; - // optional int64 storage_size = 1; - public static final int STORAGE_SIZE_FIELD_NUMBER = 1; - private long storageSize_; - public boolean hasStorageSize() { + // optional .com.alicloud.openservices.tablestore.core.protocol.Query query = 1; + public static final int QUERY_FIELD_NUMBER = 1; + private com.alicloud.openservices.tablestore.core.protocol.Search.Query query_; + public boolean hasQuery() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public long getStorageSize() { - return storageSize_; + public com.alicloud.openservices.tablestore.core.protocol.Search.Query getQuery() { + return query_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getQueryOrBuilder() { + return query_; } - // optional int64 doc_count = 2; - public static final int DOC_COUNT_FIELD_NUMBER = 2; - private long docCount_; - public boolean hasDocCount() { + // optional int32 limit = 2; + public static final int LIMIT_FIELD_NUMBER = 2; + private int limit_; + public boolean hasLimit() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public long getDocCount() { - return docCount_; + public int getLimit() { + return limit_; } - // optional int64 reserved_read_cu = 3; - public static final int RESERVED_READ_CU_FIELD_NUMBER = 3; - private long reservedReadCu_; - public boolean hasReservedReadCu() { + // optional int32 alive_time = 3; + public static final int ALIVE_TIME_FIELD_NUMBER = 3; + private int aliveTime_; + public boolean hasAliveTime() { return ((bitField0_ & 0x00000004) == 0x00000004); } - public long getReservedReadCu() { - return reservedReadCu_; + public int getAliveTime() { + return aliveTime_; } - // optional int64 timestamp = 4; - public static final int TIMESTAMP_FIELD_NUMBER = 4; - private long timestamp_; - public boolean hasTimestamp() { + // optional bytes token = 4; + public static final int TOKEN_FIELD_NUMBER = 4; + private com.google.protobuf.ByteString token_; + public boolean hasToken() { return ((bitField0_ & 0x00000008) == 0x00000008); } - public long getTimestamp() { - return timestamp_; + public com.google.protobuf.ByteString getToken() { + return token_; + } + + // optional int32 current_parallel_id = 5; + public static final int CURRENT_PARALLEL_ID_FIELD_NUMBER = 5; + private int currentParallelId_; + public boolean hasCurrentParallelId() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public int getCurrentParallelId() { + return currentParallelId_; + } + + // optional int32 max_parallel = 6; + public static final int MAX_PARALLEL_FIELD_NUMBER = 6; + private int maxParallel_; + public boolean hasMaxParallel() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + public int getMaxParallel() { + return maxParallel_; } private void initFields() { - storageSize_ = 0L; - docCount_ = 0L; - reservedReadCu_ = 0L; - timestamp_ = 0L; + query_ = com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance(); + limit_ = 0; + aliveTime_ = 0; + token_ = com.google.protobuf.ByteString.EMPTY; + currentParallelId_ = 0; + maxParallel_ = 0; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -23141,16 +75043,22 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeInt64(1, storageSize_); + output.writeMessage(1, query_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeInt64(2, docCount_); + output.writeInt32(2, limit_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeInt64(3, reservedReadCu_); + output.writeInt32(3, aliveTime_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeInt64(4, timestamp_); + output.writeBytes(4, token_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeInt32(5, currentParallelId_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeInt32(6, maxParallel_); } getUnknownFields().writeTo(output); } @@ -23163,19 +75071,27 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, storageSize_); + .computeMessageSize(1, query_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeInt64Size(2, docCount_); + .computeInt32Size(2, limit_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream - .computeInt64Size(3, reservedReadCu_); + .computeInt32Size(3, aliveTime_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream - .computeInt64Size(4, timestamp_); + .computeBytesSize(4, token_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(5, currentParallelId_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(6, maxParallel_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -23189,41 +75105,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -23232,7 +75148,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.Metering return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -23243,12 +75159,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.Metering return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -23258,7 +75174,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.Metering public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -23271,18 +75187,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfoOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.Search.ScanQueryOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MeteringInfo_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ScanQuery_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_MeteringInfo_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ScanQuery_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -23293,6 +75209,7 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getQueryFieldBuilder(); } } private static Builder create() { @@ -23301,14 +75218,22 @@ private static Builder create() { public Builder clear() { super.clear(); - storageSize_ = 0L; + if (queryBuilder_ == null) { + query_ = com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance(); + } else { + queryBuilder_.clear(); + } bitField0_ = (bitField0_ & ~0x00000001); - docCount_ = 0L; + limit_ = 0; bitField0_ = (bitField0_ & ~0x00000002); - reservedReadCu_ = 0L; + aliveTime_ = 0; bitField0_ = (bitField0_ & ~0x00000004); - timestamp_ = 0L; + token_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000008); + currentParallelId_ = 0; + bitField0_ = (bitField0_ & ~0x00000010); + maxParallel_ = 0; + bitField0_ = (bitField0_ & ~0x00000020); return this; } @@ -23318,24 +75243,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo build() { - com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery build() { + com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -23343,53 +75268,71 @@ private com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo b return result; } - public com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo result = new com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo(this); + public com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery result = new com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.storageSize_ = storageSize_; + if (queryBuilder_ == null) { + result.query_ = query_; + } else { + result.query_ = queryBuilder_.build(); + } if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - result.docCount_ = docCount_; + result.limit_ = limit_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } - result.reservedReadCu_ = reservedReadCu_; + result.aliveTime_ = aliveTime_; if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; } - result.timestamp_ = timestamp_; + result.token_ = token_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + result.currentParallelId_ = currentParallelId_; + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000020; + } + result.maxParallel_ = maxParallel_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo.getDefaultInstance()) return this; - if (other.hasStorageSize()) { - setStorageSize(other.getStorageSize()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery.getDefaultInstance()) return this; + if (other.hasQuery()) { + mergeQuery(other.getQuery()); } - if (other.hasDocCount()) { - setDocCount(other.getDocCount()); + if (other.hasLimit()) { + setLimit(other.getLimit()); } - if (other.hasReservedReadCu()) { - setReservedReadCu(other.getReservedReadCu()); + if (other.hasAliveTime()) { + setAliveTime(other.getAliveTime()); } - if (other.hasTimestamp()) { - setTimestamp(other.getTimestamp()); + if (other.hasToken()) { + setToken(other.getToken()); + } + if (other.hasCurrentParallelId()) { + setCurrentParallelId(other.getCurrentParallelId()); + } + if (other.hasMaxParallel()) { + setMaxParallel(other.getMaxParallel()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -23422,24 +75365,38 @@ public Builder mergeFrom( } break; } - case 8: { - bitField0_ |= 0x00000001; - storageSize_ = input.readInt64(); + case 10: { + com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.Query.newBuilder(); + if (hasQuery()) { + subBuilder.mergeFrom(getQuery()); + } + input.readMessage(subBuilder, extensionRegistry); + setQuery(subBuilder.buildPartial()); break; } case 16: { bitField0_ |= 0x00000002; - docCount_ = input.readInt64(); + limit_ = input.readInt32(); + break; + } + case 24: { + bitField0_ |= 0x00000004; + aliveTime_ = input.readInt32(); + break; + } + case 34: { + bitField0_ |= 0x00000008; + token_ = input.readBytes(); break; } - case 24: { - bitField0_ |= 0x00000004; - reservedReadCu_ = input.readInt64(); + case 40: { + bitField0_ |= 0x00000010; + currentParallelId_ = input.readInt32(); break; } - case 32: { - bitField0_ |= 0x00000008; - timestamp_ = input.readInt64(); + case 48: { + bitField0_ |= 0x00000020; + maxParallel_ = input.readInt32(); break; } } @@ -23448,102 +75405,216 @@ public Builder mergeFrom( private int bitField0_; - // optional int64 storage_size = 1; - private long storageSize_ ; - public boolean hasStorageSize() { + // optional .com.alicloud.openservices.tablestore.core.protocol.Query query = 1; + private com.alicloud.openservices.tablestore.core.protocol.Search.Query query_ = com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder> queryBuilder_; + public boolean hasQuery() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public long getStorageSize() { - return storageSize_; + public com.alicloud.openservices.tablestore.core.protocol.Search.Query getQuery() { + if (queryBuilder_ == null) { + return query_; + } else { + return queryBuilder_.getMessage(); + } } - public Builder setStorageSize(long value) { + public Builder setQuery(com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { + if (queryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + query_ = value; + onChanged(); + } else { + queryBuilder_.setMessage(value); + } bitField0_ |= 0x00000001; - storageSize_ = value; - onChanged(); return this; } - public Builder clearStorageSize() { + public Builder setQuery( + com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder builderForValue) { + if (queryBuilder_ == null) { + query_ = builderForValue.build(); + onChanged(); + } else { + queryBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder mergeQuery(com.alicloud.openservices.tablestore.core.protocol.Search.Query value) { + if (queryBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001) && + query_ != com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance()) { + query_ = + com.alicloud.openservices.tablestore.core.protocol.Search.Query.newBuilder(query_).mergeFrom(value).buildPartial(); + } else { + query_ = value; + } + onChanged(); + } else { + queryBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder clearQuery() { + if (queryBuilder_ == null) { + query_ = com.alicloud.openservices.tablestore.core.protocol.Search.Query.getDefaultInstance(); + onChanged(); + } else { + queryBuilder_.clear(); + } bitField0_ = (bitField0_ & ~0x00000001); - storageSize_ = 0L; - onChanged(); return this; } + public com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder getQueryBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getQueryFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder getQueryOrBuilder() { + if (queryBuilder_ != null) { + return queryBuilder_.getMessageOrBuilder(); + } else { + return query_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder> + getQueryFieldBuilder() { + if (queryBuilder_ == null) { + queryBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.Query, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.QueryOrBuilder>( + query_, + getParentForChildren(), + isClean()); + query_ = null; + } + return queryBuilder_; + } - // optional int64 doc_count = 2; - private long docCount_ ; - public boolean hasDocCount() { + // optional int32 limit = 2; + private int limit_ ; + public boolean hasLimit() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public long getDocCount() { - return docCount_; + public int getLimit() { + return limit_; } - public Builder setDocCount(long value) { + public Builder setLimit(int value) { bitField0_ |= 0x00000002; - docCount_ = value; + limit_ = value; onChanged(); return this; } - public Builder clearDocCount() { + public Builder clearLimit() { bitField0_ = (bitField0_ & ~0x00000002); - docCount_ = 0L; + limit_ = 0; onChanged(); return this; } - // optional int64 reserved_read_cu = 3; - private long reservedReadCu_ ; - public boolean hasReservedReadCu() { + // optional int32 alive_time = 3; + private int aliveTime_ ; + public boolean hasAliveTime() { return ((bitField0_ & 0x00000004) == 0x00000004); } - public long getReservedReadCu() { - return reservedReadCu_; + public int getAliveTime() { + return aliveTime_; } - public Builder setReservedReadCu(long value) { + public Builder setAliveTime(int value) { bitField0_ |= 0x00000004; - reservedReadCu_ = value; + aliveTime_ = value; onChanged(); return this; } - public Builder clearReservedReadCu() { + public Builder clearAliveTime() { bitField0_ = (bitField0_ & ~0x00000004); - reservedReadCu_ = 0L; + aliveTime_ = 0; onChanged(); return this; } - // optional int64 timestamp = 4; - private long timestamp_ ; - public boolean hasTimestamp() { + // optional bytes token = 4; + private com.google.protobuf.ByteString token_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasToken() { return ((bitField0_ & 0x00000008) == 0x00000008); } - public long getTimestamp() { - return timestamp_; + public com.google.protobuf.ByteString getToken() { + return token_; } - public Builder setTimestamp(long value) { - bitField0_ |= 0x00000008; - timestamp_ = value; + public Builder setToken(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + token_ = value; onChanged(); return this; } - public Builder clearTimestamp() { + public Builder clearToken() { bitField0_ = (bitField0_ & ~0x00000008); - timestamp_ = 0L; + token_ = getDefaultInstance().getToken(); onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.MeteringInfo) + // optional int32 current_parallel_id = 5; + private int currentParallelId_ ; + public boolean hasCurrentParallelId() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public int getCurrentParallelId() { + return currentParallelId_; + } + public Builder setCurrentParallelId(int value) { + bitField0_ |= 0x00000010; + currentParallelId_ = value; + onChanged(); + return this; + } + public Builder clearCurrentParallelId() { + bitField0_ = (bitField0_ & ~0x00000010); + currentParallelId_ = 0; + onChanged(); + return this; + } + + // optional int32 max_parallel = 6; + private int maxParallel_ ; + public boolean hasMaxParallel() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + public int getMaxParallel() { + return maxParallel_; + } + public Builder setMaxParallel(int value) { + bitField0_ |= 0x00000020; + maxParallel_ = value; + onChanged(); + return this; + } + public Builder clearMaxParallel() { + bitField0_ = (bitField0_ & ~0x00000020); + maxParallel_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.ScanQuery) } static { - defaultInstance = new MeteringInfo(true); + defaultInstance = new ScanQuery(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.MeteringInfo) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.ScanQuery) } - public interface DescribeSearchIndexRequestOrBuilder + public interface ParallelScanRequestOrBuilder extends com.google.protobuf.MessageOrBuilder { // optional string table_name = 1; @@ -23553,33 +75624,51 @@ public interface DescribeSearchIndexRequestOrBuilder // optional string index_name = 2; boolean hasIndexName(); String getIndexName(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.ColumnsToGet columns_to_get = 3; + boolean hasColumnsToGet(); + com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet getColumnsToGet(); + com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGetOrBuilder getColumnsToGetOrBuilder(); + + // optional bytes session_id = 4; + boolean hasSessionId(); + com.google.protobuf.ByteString getSessionId(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.ScanQuery scan_query = 5; + boolean hasScanQuery(); + com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery getScanQuery(); + com.alicloud.openservices.tablestore.core.protocol.Search.ScanQueryOrBuilder getScanQueryOrBuilder(); + + // optional int32 timeout_ms = 6; + boolean hasTimeoutMs(); + int getTimeoutMs(); } - public static final class DescribeSearchIndexRequest extends + public static final class ParallelScanRequest extends com.google.protobuf.GeneratedMessage - implements DescribeSearchIndexRequestOrBuilder { - // Use DescribeSearchIndexRequest.newBuilder() to construct. - private DescribeSearchIndexRequest(Builder builder) { + implements ParallelScanRequestOrBuilder { + // Use ParallelScanRequest.newBuilder() to construct. + private ParallelScanRequest(Builder builder) { super(builder); } - private DescribeSearchIndexRequest(boolean noInit) {} + private ParallelScanRequest(boolean noInit) {} - private static final DescribeSearchIndexRequest defaultInstance; - public static DescribeSearchIndexRequest getDefaultInstance() { + private static final ParallelScanRequest defaultInstance; + public static ParallelScanRequest getDefaultInstance() { return defaultInstance; } - public DescribeSearchIndexRequest getDefaultInstanceForType() { + public ParallelScanRequest getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeSearchIndexRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ParallelScanRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeSearchIndexRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ParallelScanRequest_fieldAccessorTable; } private int bitField0_; @@ -23647,9 +75736,59 @@ private com.google.protobuf.ByteString getIndexNameBytes() { } } + // optional .com.alicloud.openservices.tablestore.core.protocol.ColumnsToGet columns_to_get = 3; + public static final int COLUMNS_TO_GET_FIELD_NUMBER = 3; + private com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet columnsToGet_; + public boolean hasColumnsToGet() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet getColumnsToGet() { + return columnsToGet_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGetOrBuilder getColumnsToGetOrBuilder() { + return columnsToGet_; + } + + // optional bytes session_id = 4; + public static final int SESSION_ID_FIELD_NUMBER = 4; + private com.google.protobuf.ByteString sessionId_; + public boolean hasSessionId() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.google.protobuf.ByteString getSessionId() { + return sessionId_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.ScanQuery scan_query = 5; + public static final int SCAN_QUERY_FIELD_NUMBER = 5; + private com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery scanQuery_; + public boolean hasScanQuery() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery getScanQuery() { + return scanQuery_; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.ScanQueryOrBuilder getScanQueryOrBuilder() { + return scanQuery_; + } + + // optional int32 timeout_ms = 6; + public static final int TIMEOUT_MS_FIELD_NUMBER = 6; + private int timeoutMs_; + public boolean hasTimeoutMs() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + public int getTimeoutMs() { + return timeoutMs_; + } + private void initFields() { tableName_ = ""; indexName_ = ""; + columnsToGet_ = com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet.getDefaultInstance(); + sessionId_ = com.google.protobuf.ByteString.EMPTY; + scanQuery_ = com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery.getDefaultInstance(); + timeoutMs_ = 0; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -23669,6 +75808,18 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(2, getIndexNameBytes()); } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeMessage(3, columnsToGet_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeBytes(4, sessionId_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeMessage(5, scanQuery_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeInt32(6, timeoutMs_); + } getUnknownFields().writeTo(output); } @@ -23686,6 +75837,22 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, getIndexNameBytes()); } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, columnsToGet_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(4, sessionId_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, scanQuery_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(6, timeoutMs_); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -23698,41 +75865,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -23741,7 +75908,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.Describe return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -23752,12 +75919,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.Describe return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -23767,7 +75934,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.Describe public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanRequest prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -23780,18 +75947,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequestOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeSearchIndexRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ParallelScanRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeSearchIndexRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ParallelScanRequest_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -23802,6 +75969,8 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getColumnsToGetFieldBuilder(); + getScanQueryFieldBuilder(); } } private static Builder create() { @@ -23814,6 +75983,22 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); indexName_ = ""; bitField0_ = (bitField0_ & ~0x00000002); + if (columnsToGetBuilder_ == null) { + columnsToGet_ = com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet.getDefaultInstance(); + } else { + columnsToGetBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + sessionId_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + if (scanQueryBuilder_ == null) { + scanQuery_ = com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery.getDefaultInstance(); + } else { + scanQueryBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + timeoutMs_ = 0; + bitField0_ = (bitField0_ & ~0x00000020); return this; } @@ -23823,24 +76008,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanRequest.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanRequest.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest build() { - com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanRequest build() { + com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanRequest buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -23848,8 +76033,8 @@ private com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearch return result; } - public com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest result = new com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest(this); + public com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanRequest result = new com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanRequest(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { @@ -23860,28 +76045,64 @@ public com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchI to_bitField0_ |= 0x00000002; } result.indexName_ = indexName_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + if (columnsToGetBuilder_ == null) { + result.columnsToGet_ = columnsToGet_; + } else { + result.columnsToGet_ = columnsToGetBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.sessionId_ = sessionId_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + if (scanQueryBuilder_ == null) { + result.scanQuery_ = scanQuery_; + } else { + result.scanQuery_ = scanQueryBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000020; + } + result.timeoutMs_ = timeoutMs_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanRequest)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest.getDefaultInstance()) return this; + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanRequest.getDefaultInstance()) return this; if (other.hasTableName()) { setTableName(other.getTableName()); } if (other.hasIndexName()) { setIndexName(other.getIndexName()); } + if (other.hasColumnsToGet()) { + mergeColumnsToGet(other.getColumnsToGet()); + } + if (other.hasSessionId()) { + setSessionId(other.getSessionId()); + } + if (other.hasScanQuery()) { + mergeScanQuery(other.getScanQuery()); + } + if (other.hasTimeoutMs()) { + setTimeoutMs(other.getTimeoutMs()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -23923,6 +76144,34 @@ public Builder mergeFrom( indexName_ = input.readBytes(); break; } + case 26: { + com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet.newBuilder(); + if (hasColumnsToGet()) { + subBuilder.mergeFrom(getColumnsToGet()); + } + input.readMessage(subBuilder, extensionRegistry); + setColumnsToGet(subBuilder.buildPartial()); + break; + } + case 34: { + bitField0_ |= 0x00000008; + sessionId_ = input.readBytes(); + break; + } + case 42: { + com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery.newBuilder(); + if (hasScanQuery()) { + subBuilder.mergeFrom(getScanQuery()); + } + input.readMessage(subBuilder, extensionRegistry); + setScanQuery(subBuilder.buildPartial()); + break; + } + case 48: { + bitField0_ |= 0x00000020; + timeoutMs_ = input.readInt32(); + break; + } } } } @@ -24001,107 +76250,310 @@ void setIndexName(com.google.protobuf.ByteString value) { onChanged(); } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.DescribeSearchIndexRequest) + // optional .com.alicloud.openservices.tablestore.core.protocol.ColumnsToGet columns_to_get = 3; + private com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet columnsToGet_ = com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet, com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGetOrBuilder> columnsToGetBuilder_; + public boolean hasColumnsToGet() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet getColumnsToGet() { + if (columnsToGetBuilder_ == null) { + return columnsToGet_; + } else { + return columnsToGetBuilder_.getMessage(); + } + } + public Builder setColumnsToGet(com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet value) { + if (columnsToGetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + columnsToGet_ = value; + onChanged(); + } else { + columnsToGetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder setColumnsToGet( + com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet.Builder builderForValue) { + if (columnsToGetBuilder_ == null) { + columnsToGet_ = builderForValue.build(); + onChanged(); + } else { + columnsToGetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder mergeColumnsToGet(com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet value) { + if (columnsToGetBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004) && + columnsToGet_ != com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet.getDefaultInstance()) { + columnsToGet_ = + com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet.newBuilder(columnsToGet_).mergeFrom(value).buildPartial(); + } else { + columnsToGet_ = value; + } + onChanged(); + } else { + columnsToGetBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + return this; + } + public Builder clearColumnsToGet() { + if (columnsToGetBuilder_ == null) { + columnsToGet_ = com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet.getDefaultInstance(); + onChanged(); + } else { + columnsToGetBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet.Builder getColumnsToGetBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getColumnsToGetFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGetOrBuilder getColumnsToGetOrBuilder() { + if (columnsToGetBuilder_ != null) { + return columnsToGetBuilder_.getMessageOrBuilder(); + } else { + return columnsToGet_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet, com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGetOrBuilder> + getColumnsToGetFieldBuilder() { + if (columnsToGetBuilder_ == null) { + columnsToGetBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet, com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGetOrBuilder>( + columnsToGet_, + getParentForChildren(), + isClean()); + columnsToGet_ = null; + } + return columnsToGetBuilder_; + } + + // optional bytes session_id = 4; + private com.google.protobuf.ByteString sessionId_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasSessionId() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.google.protobuf.ByteString getSessionId() { + return sessionId_; + } + public Builder setSessionId(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + sessionId_ = value; + onChanged(); + return this; + } + public Builder clearSessionId() { + bitField0_ = (bitField0_ & ~0x00000008); + sessionId_ = getDefaultInstance().getSessionId(); + onChanged(); + return this; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.ScanQuery scan_query = 5; + private com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery scanQuery_ = com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery, com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.ScanQueryOrBuilder> scanQueryBuilder_; + public boolean hasScanQuery() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery getScanQuery() { + if (scanQueryBuilder_ == null) { + return scanQuery_; + } else { + return scanQueryBuilder_.getMessage(); + } + } + public Builder setScanQuery(com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery value) { + if (scanQueryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + scanQuery_ = value; + onChanged(); + } else { + scanQueryBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + return this; + } + public Builder setScanQuery( + com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery.Builder builderForValue) { + if (scanQueryBuilder_ == null) { + scanQuery_ = builderForValue.build(); + onChanged(); + } else { + scanQueryBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + return this; + } + public Builder mergeScanQuery(com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery value) { + if (scanQueryBuilder_ == null) { + if (((bitField0_ & 0x00000010) == 0x00000010) && + scanQuery_ != com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery.getDefaultInstance()) { + scanQuery_ = + com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery.newBuilder(scanQuery_).mergeFrom(value).buildPartial(); + } else { + scanQuery_ = value; + } + onChanged(); + } else { + scanQueryBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + return this; + } + public Builder clearScanQuery() { + if (scanQueryBuilder_ == null) { + scanQuery_ = com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery.getDefaultInstance(); + onChanged(); + } else { + scanQueryBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery.Builder getScanQueryBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getScanQueryFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.Search.ScanQueryOrBuilder getScanQueryOrBuilder() { + if (scanQueryBuilder_ != null) { + return scanQueryBuilder_.getMessageOrBuilder(); + } else { + return scanQuery_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery, com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.ScanQueryOrBuilder> + getScanQueryFieldBuilder() { + if (scanQueryBuilder_ == null) { + scanQueryBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery, com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.ScanQueryOrBuilder>( + scanQuery_, + getParentForChildren(), + isClean()); + scanQuery_ = null; + } + return scanQueryBuilder_; + } + + // optional int32 timeout_ms = 6; + private int timeoutMs_ ; + public boolean hasTimeoutMs() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + public int getTimeoutMs() { + return timeoutMs_; + } + public Builder setTimeoutMs(int value) { + bitField0_ |= 0x00000020; + timeoutMs_ = value; + onChanged(); + return this; + } + public Builder clearTimeoutMs() { + bitField0_ = (bitField0_ & ~0x00000020); + timeoutMs_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.ParallelScanRequest) } static { - defaultInstance = new DescribeSearchIndexRequest(true); + defaultInstance = new ParallelScanRequest(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.DescribeSearchIndexRequest) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.ParallelScanRequest) } - public interface DescribeSearchIndexResponseOrBuilder + public interface ParallelScanResponseOrBuilder extends com.google.protobuf.MessageOrBuilder { - // optional .com.alicloud.openservices.tablestore.core.protocol.IndexSchema schema = 1; - boolean hasSchema(); - com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema getSchema(); - com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchemaOrBuilder getSchemaOrBuilder(); - - // optional .com.alicloud.openservices.tablestore.core.protocol.SyncStat sync_stat = 2; - boolean hasSyncStat(); - com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat getSyncStat(); - com.alicloud.openservices.tablestore.core.protocol.Search.SyncStatOrBuilder getSyncStatOrBuilder(); + // repeated bytes rows = 1; + java.util.List getRowsList(); + int getRowsCount(); + com.google.protobuf.ByteString getRows(int index); - // optional .com.alicloud.openservices.tablestore.core.protocol.MeteringInfo metering_info = 3; - boolean hasMeteringInfo(); - com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo getMeteringInfo(); - com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfoOrBuilder getMeteringInfoOrBuilder(); + // optional bytes next_token = 2; + boolean hasNextToken(); + com.google.protobuf.ByteString getNextToken(); } - public static final class DescribeSearchIndexResponse extends + public static final class ParallelScanResponse extends com.google.protobuf.GeneratedMessage - implements DescribeSearchIndexResponseOrBuilder { - // Use DescribeSearchIndexResponse.newBuilder() to construct. - private DescribeSearchIndexResponse(Builder builder) { + implements ParallelScanResponseOrBuilder { + // Use ParallelScanResponse.newBuilder() to construct. + private ParallelScanResponse(Builder builder) { super(builder); } - private DescribeSearchIndexResponse(boolean noInit) {} + private ParallelScanResponse(boolean noInit) {} - private static final DescribeSearchIndexResponse defaultInstance; - public static DescribeSearchIndexResponse getDefaultInstance() { + private static final ParallelScanResponse defaultInstance; + public static ParallelScanResponse getDefaultInstance() { return defaultInstance; } - public DescribeSearchIndexResponse getDefaultInstanceForType() { + public ParallelScanResponse getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeSearchIndexResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ParallelScanResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeSearchIndexResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ParallelScanResponse_fieldAccessorTable; } private int bitField0_; - // optional .com.alicloud.openservices.tablestore.core.protocol.IndexSchema schema = 1; - public static final int SCHEMA_FIELD_NUMBER = 1; - private com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema schema_; - public boolean hasSchema() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema getSchema() { - return schema_; - } - public com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchemaOrBuilder getSchemaOrBuilder() { - return schema_; - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.SyncStat sync_stat = 2; - public static final int SYNC_STAT_FIELD_NUMBER = 2; - private com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat syncStat_; - public boolean hasSyncStat() { - return ((bitField0_ & 0x00000002) == 0x00000002); + // repeated bytes rows = 1; + public static final int ROWS_FIELD_NUMBER = 1; + private java.util.List rows_; + public java.util.List + getRowsList() { + return rows_; } - public com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat getSyncStat() { - return syncStat_; + public int getRowsCount() { + return rows_.size(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.SyncStatOrBuilder getSyncStatOrBuilder() { - return syncStat_; + public com.google.protobuf.ByteString getRows(int index) { + return rows_.get(index); } - // optional .com.alicloud.openservices.tablestore.core.protocol.MeteringInfo metering_info = 3; - public static final int METERING_INFO_FIELD_NUMBER = 3; - private com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo meteringInfo_; - public boolean hasMeteringInfo() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo getMeteringInfo() { - return meteringInfo_; + // optional bytes next_token = 2; + public static final int NEXT_TOKEN_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString nextToken_; + public boolean hasNextToken() { + return ((bitField0_ & 0x00000001) == 0x00000001); } - public com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfoOrBuilder getMeteringInfoOrBuilder() { - return meteringInfo_; + public com.google.protobuf.ByteString getNextToken() { + return nextToken_; } private void initFields() { - schema_ = com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.getDefaultInstance(); - syncStat_ = com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat.getDefaultInstance(); - meteringInfo_ = com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo.getDefaultInstance(); + rows_ = java.util.Collections.emptyList();; + nextToken_ = com.google.protobuf.ByteString.EMPTY; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -24115,14 +76567,11 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeMessage(1, schema_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeMessage(2, syncStat_); + for (int i = 0; i < rows_.size(); i++) { + output.writeBytes(1, rows_.get(i)); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeMessage(3, meteringInfo_); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(2, nextToken_); } getUnknownFields().writeTo(output); } @@ -24133,17 +76582,18 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, schema_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, syncStat_); + { + int dataSize = 0; + for (int i = 0; i < rows_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(rows_.get(i)); + } + size += dataSize; + size += 1 * getRowsList().size(); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, meteringInfo_); + .computeBytesSize(2, nextToken_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -24157,41 +76607,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -24200,7 +76650,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.Describe return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -24211,12 +76661,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.Describe return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -24226,7 +76676,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.Search.Describe public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanResponse prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -24239,18 +76689,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponseOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeSearchIndexResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ParallelScanResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeSearchIndexResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.Search.internal_static_com_alicloud_openservices_tablestore_core_protocol_ParallelScanResponse_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -24261,9 +76711,6 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getSchemaFieldBuilder(); - getSyncStatFieldBuilder(); - getMeteringInfoFieldBuilder(); } } private static Builder create() { @@ -24272,24 +76719,10 @@ private static Builder create() { public Builder clear() { super.clear(); - if (schemaBuilder_ == null) { - schema_ = com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.getDefaultInstance(); - } else { - schemaBuilder_.clear(); - } + rows_ = java.util.Collections.emptyList();; bitField0_ = (bitField0_ & ~0x00000001); - if (syncStatBuilder_ == null) { - syncStat_ = com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat.getDefaultInstance(); - } else { - syncStatBuilder_.clear(); - } + nextToken_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); - if (meteringInfoBuilder_ == null) { - meteringInfo_ = com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo.getDefaultInstance(); - } else { - meteringInfoBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); return this; } @@ -24299,24 +76732,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanResponse.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanResponse.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse build() { - com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanResponse build() { + com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanResponse buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -24324,58 +76757,47 @@ private com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearch return result; } - public com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse result = new com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse(this); + public com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanResponse result = new com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanResponse(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - if (schemaBuilder_ == null) { - result.schema_ = schema_; - } else { - result.schema_ = schemaBuilder_.build(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + rows_ = java.util.Collections.unmodifiableList(rows_); + bitField0_ = (bitField0_ & ~0x00000001); } + result.rows_ = rows_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - if (syncStatBuilder_ == null) { - result.syncStat_ = syncStat_; - } else { - result.syncStat_ = syncStatBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - if (meteringInfoBuilder_ == null) { - result.meteringInfo_ = meteringInfo_; - } else { - result.meteringInfo_ = meteringInfoBuilder_.build(); + to_bitField0_ |= 0x00000001; } + result.nextToken_ = nextToken_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanResponse)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse.getDefaultInstance()) return this; - if (other.hasSchema()) { - mergeSchema(other.getSchema()); - } - if (other.hasSyncStat()) { - mergeSyncStat(other.getSyncStat()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanResponse.getDefaultInstance()) return this; + if (!other.rows_.isEmpty()) { + if (rows_.isEmpty()) { + rows_ = other.rows_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRowsIsMutable(); + rows_.addAll(other.rows_); + } + onChanged(); } - if (other.hasMeteringInfo()) { - mergeMeteringInfo(other.getMeteringInfo()); + if (other.hasNextToken()) { + setNextToken(other.getNextToken()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -24409,30 +76831,13 @@ public Builder mergeFrom( break; } case 10: { - com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.newBuilder(); - if (hasSchema()) { - subBuilder.mergeFrom(getSchema()); - } - input.readMessage(subBuilder, extensionRegistry); - setSchema(subBuilder.buildPartial()); + ensureRowsIsMutable(); + rows_.add(input.readBytes()); break; } case 18: { - com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat.newBuilder(); - if (hasSyncStat()) { - subBuilder.mergeFrom(getSyncStat()); - } - input.readMessage(subBuilder, extensionRegistry); - setSyncStat(subBuilder.buildPartial()); - break; - } - case 26: { - com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo.newBuilder(); - if (hasMeteringInfo()) { - subBuilder.mergeFrom(getMeteringInfo()); - } - input.readMessage(subBuilder, extensionRegistry); - setMeteringInfo(subBuilder.buildPartial()); + bitField0_ |= 0x00000002; + nextToken_ = input.readBytes(); break; } } @@ -24441,287 +76846,527 @@ public Builder mergeFrom( private int bitField0_; - // optional .com.alicloud.openservices.tablestore.core.protocol.IndexSchema schema = 1; - private com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema schema_ = com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema, com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchemaOrBuilder> schemaBuilder_; - public boolean hasSchema() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema getSchema() { - if (schemaBuilder_ == null) { - return schema_; - } else { - return schemaBuilder_.getMessage(); - } - } - public Builder setSchema(com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema value) { - if (schemaBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - schema_ = value; - onChanged(); - } else { - schemaBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - return this; + // repeated bytes rows = 1; + private java.util.List rows_ = java.util.Collections.emptyList();; + private void ensureRowsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + rows_ = new java.util.ArrayList(rows_); + bitField0_ |= 0x00000001; + } } - public Builder setSchema( - com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.Builder builderForValue) { - if (schemaBuilder_ == null) { - schema_ = builderForValue.build(); - onChanged(); - } else { - schemaBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - return this; + public java.util.List + getRowsList() { + return java.util.Collections.unmodifiableList(rows_); } - public Builder mergeSchema(com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema value) { - if (schemaBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001) && - schema_ != com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.getDefaultInstance()) { - schema_ = - com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.newBuilder(schema_).mergeFrom(value).buildPartial(); - } else { - schema_ = value; - } - onChanged(); - } else { - schemaBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - return this; + public int getRowsCount() { + return rows_.size(); } - public Builder clearSchema() { - if (schemaBuilder_ == null) { - schema_ = com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.getDefaultInstance(); - onChanged(); - } else { - schemaBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; + public com.google.protobuf.ByteString getRows(int index) { + return rows_.get(index); } - public com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.Builder getSchemaBuilder() { - bitField0_ |= 0x00000001; + public Builder setRows( + int index, com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRowsIsMutable(); + rows_.set(index, value); onChanged(); - return getSchemaFieldBuilder().getBuilder(); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchemaOrBuilder getSchemaOrBuilder() { - if (schemaBuilder_ != null) { - return schemaBuilder_.getMessageOrBuilder(); - } else { - return schema_; - } - } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema, com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchemaOrBuilder> - getSchemaFieldBuilder() { - if (schemaBuilder_ == null) { - schemaBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema, com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchemaOrBuilder>( - schema_, - getParentForChildren(), - isClean()); - schema_ = null; - } - return schemaBuilder_; - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.SyncStat sync_stat = 2; - private com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat syncStat_ = com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat, com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.SyncStatOrBuilder> syncStatBuilder_; - public boolean hasSyncStat() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat getSyncStat() { - if (syncStatBuilder_ == null) { - return syncStat_; - } else { - return syncStatBuilder_.getMessage(); - } - } - public Builder setSyncStat(com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat value) { - if (syncStatBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - syncStat_ = value; - onChanged(); - } else { - syncStatBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - return this; - } - public Builder setSyncStat( - com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat.Builder builderForValue) { - if (syncStatBuilder_ == null) { - syncStat_ = builderForValue.build(); - onChanged(); - } else { - syncStatBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - return this; - } - public Builder mergeSyncStat(com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat value) { - if (syncStatBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002) && - syncStat_ != com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat.getDefaultInstance()) { - syncStat_ = - com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat.newBuilder(syncStat_).mergeFrom(value).buildPartial(); - } else { - syncStat_ = value; - } - onChanged(); - } else { - syncStatBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; return this; } - public Builder clearSyncStat() { - if (syncStatBuilder_ == null) { - syncStat_ = com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat.getDefaultInstance(); - onChanged(); - } else { - syncStatBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); + public Builder addRows(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRowsIsMutable(); + rows_.add(value); + onChanged(); return this; } - public com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat.Builder getSyncStatBuilder() { - bitField0_ |= 0x00000002; + public Builder addAllRows( + java.lang.Iterable values) { + ensureRowsIsMutable(); + super.addAll(values, rows_); onChanged(); - return getSyncStatFieldBuilder().getBuilder(); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.SyncStatOrBuilder getSyncStatOrBuilder() { - if (syncStatBuilder_ != null) { - return syncStatBuilder_.getMessageOrBuilder(); - } else { - return syncStat_; - } - } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat, com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.SyncStatOrBuilder> - getSyncStatFieldBuilder() { - if (syncStatBuilder_ == null) { - syncStatBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat, com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.SyncStatOrBuilder>( - syncStat_, - getParentForChildren(), - isClean()); - syncStat_ = null; - } - return syncStatBuilder_; - } - - // optional .com.alicloud.openservices.tablestore.core.protocol.MeteringInfo metering_info = 3; - private com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo meteringInfo_ = com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo, com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfoOrBuilder> meteringInfoBuilder_; - public boolean hasMeteringInfo() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo getMeteringInfo() { - if (meteringInfoBuilder_ == null) { - return meteringInfo_; - } else { - return meteringInfoBuilder_.getMessage(); - } - } - public Builder setMeteringInfo(com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo value) { - if (meteringInfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - meteringInfo_ = value; - onChanged(); - } else { - meteringInfoBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; return this; } - public Builder setMeteringInfo( - com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo.Builder builderForValue) { - if (meteringInfoBuilder_ == null) { - meteringInfo_ = builderForValue.build(); - onChanged(); - } else { - meteringInfoBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; + public Builder clearRows() { + rows_ = java.util.Collections.emptyList();; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); return this; } - public Builder mergeMeteringInfo(com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo value) { - if (meteringInfoBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004) && - meteringInfo_ != com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo.getDefaultInstance()) { - meteringInfo_ = - com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo.newBuilder(meteringInfo_).mergeFrom(value).buildPartial(); - } else { - meteringInfo_ = value; - } - onChanged(); - } else { - meteringInfoBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000004; - return this; + + // optional bytes next_token = 2; + private com.google.protobuf.ByteString nextToken_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasNextToken() { + return ((bitField0_ & 0x00000002) == 0x00000002); } - public Builder clearMeteringInfo() { - if (meteringInfoBuilder_ == null) { - meteringInfo_ = com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo.getDefaultInstance(); - onChanged(); - } else { - meteringInfoBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - return this; + public com.google.protobuf.ByteString getNextToken() { + return nextToken_; } - public com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo.Builder getMeteringInfoBuilder() { - bitField0_ |= 0x00000004; + public Builder setNextToken(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + nextToken_ = value; onChanged(); - return getMeteringInfoFieldBuilder().getBuilder(); - } - public com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfoOrBuilder getMeteringInfoOrBuilder() { - if (meteringInfoBuilder_ != null) { - return meteringInfoBuilder_.getMessageOrBuilder(); - } else { - return meteringInfo_; - } + return this; } - private com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo, com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfoOrBuilder> - getMeteringInfoFieldBuilder() { - if (meteringInfoBuilder_ == null) { - meteringInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo, com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo.Builder, com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfoOrBuilder>( - meteringInfo_, - getParentForChildren(), - isClean()); - meteringInfo_ = null; - } - return meteringInfoBuilder_; + public Builder clearNextToken() { + bitField0_ = (bitField0_ & ~0x00000002); + nextToken_ = getDefaultInstance().getNextToken(); + onChanged(); + return this; } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.DescribeSearchIndexResponse) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.ParallelScanResponse) } static { - defaultInstance = new DescribeSearchIndexResponse(true); + defaultInstance = new ParallelScanResponse(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.DescribeSearchIndexResponse) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.ParallelScanResponse) } + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_AvgAgg_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_AvgAgg_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_CardinalityAgg_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_CardinalityAgg_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_MaxAgg_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_MaxAgg_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_MinAgg_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_MinAgg_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_SumAgg_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_SumAgg_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_TermsAgg_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_TermsAgg_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_FilterAgg_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_FilterAgg_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_NestedPath_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_NestedPath_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_NestedAgg_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_NestedAgg_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoBoundsAgg_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoBoundsAgg_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoDistanceAggRange_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoDistanceAggRange_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoDistanceAgg_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoDistanceAgg_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_StatsAgg_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_StatsAgg_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_ExtendedStatsAgg_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_ExtendedStatsAgg_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentilesAgg_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentilesAgg_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentileRanksAgg_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentileRanksAgg_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_ValueCountAgg_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_ValueCountAgg_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_AggClause_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_AggClause_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_Agg_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_Agg_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_AvgAggResult_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_AvgAggResult_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_MaxAggResult_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_MaxAggResult_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_MinAggResult_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_MinAggResult_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_SumAggResult_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_SumAggResult_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_CardinalityAggResult_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_CardinalityAggResult_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_Bucket_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_Bucket_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_TermsAggResult_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_TermsAggResult_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_FilterAggResult_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_FilterAggResult_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_NestedAggResult_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_NestedAggResult_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoPoint_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoPoint_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoBoundsAggResult_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoBoundsAggResult_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_RangeBucket_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_RangeBucket_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoDistanceAggResult_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoDistanceAggResult_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_StatsAggResult_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_StatsAggResult_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_ExtendedStatsAggResult_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_ExtendedStatsAggResult_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_Percentile_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_Percentile_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentilesAggResult_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentilesAggResult_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentileRanksAggResult_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentileRanksAggResult_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_ValueCountAggResult_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_ValueCountAggResult_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_SubAggResult_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_SubAggResult_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_AggResult_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_AggResult_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_Aggregation_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_Aggregation_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_Aggregations_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_Aggregations_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupBy_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupBy_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupBys_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupBys_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_AvgAggregation_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_AvgAggregation_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_MaxAggregation_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_MaxAggregation_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_MinAggregation_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_MinAggregation_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_SumAggregation_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_SumAggregation_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_CountAggregation_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_CountAggregation_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_DistinctCountAggregation_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_DistinctCountAggregation_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_TopRowsAggregation_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_TopRowsAggregation_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentilesAggregation_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentilesAggregation_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_FieldRange_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_FieldRange_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByHistogram_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByHistogram_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupKeySort_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupKeySort_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_RowCountSort_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_RowCountSort_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_SubAggSort_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_SubAggSort_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupBySorter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupBySorter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupBySort_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupBySort_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByField_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByField_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_Range_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_Range_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByRange_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByRange_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByFilter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByFilter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByGeoDistance_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByGeoDistance_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_AvgAggregationResult_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_AvgAggregationResult_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_TopRowsAggregationResult_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_TopRowsAggregationResult_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentilesAggregationItem_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentilesAggregationItem_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentilesAggregationResult_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentilesAggregationResult_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_DistinctCountAggregationResult_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_DistinctCountAggregationResult_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_MaxAggregationResult_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_MaxAggregationResult_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_MinAggregationResult_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_MinAggregationResult_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_SumAggregationResult_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_SumAggregationResult_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_CountAggregationResult_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_CountAggregationResult_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_AggregationResult_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_AggregationResult_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_AggregationsResult_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_AggregationsResult_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByFieldResultItem_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByFieldResultItem_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByFieldResult_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByFieldResult_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByRangeResultItem_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByRangeResultItem_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByRangeResult_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByRangeResult_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByGeoDistanceResultItem_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByGeoDistanceResultItem_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByGeoDistanceResult_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByGeoDistanceResult_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByFilterResultItem_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByFilterResultItem_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByFilterResult_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByFilterResult_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByResult_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByResult_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupBysResult_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupBysResult_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByHistogramItem_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByHistogramItem_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByHistogramResult_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByHistogramResult_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor internal_static_com_alicloud_openservices_tablestore_core_protocol_MatchQuery_descriptor; private static @@ -24802,6 +77447,11 @@ public com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfoOrB private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoPolygonQuery_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_ExistsQuery_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_ExistsQuery_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor internal_static_com_alicloud_openservices_tablestore_core_protocol_Query_descriptor; private static @@ -24867,6 +77517,21 @@ public com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfoOrB private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alicloud_openservices_tablestore_core_protocol_SearchResponse_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_SingleWordAnalyzerParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_SingleWordAnalyzerParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_SplitAnalyzerParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_SplitAnalyzerParameter_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_FuzzyAnalyzerParameter_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_FuzzyAnalyzerParameter_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor internal_static_com_alicloud_openservices_tablestore_core_protocol_FieldSchema_descriptor; private static @@ -24892,6 +77557,21 @@ public com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfoOrB private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateSearchIndexResponse_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_QueryFlowWeight_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_QueryFlowWeight_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateSearchIndexRequest_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateSearchIndexRequest_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateSearchIndexResponse_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateSearchIndexResponse_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor internal_static_com_alicloud_openservices_tablestore_core_protocol_IndexInfo_descriptor; private static @@ -24937,6 +77617,21 @@ public com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfoOrB private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeSearchIndexResponse_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_ScanQuery_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_ScanQuery_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_ParallelScanRequest_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_ParallelScanRequest_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_ParallelScanResponse_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_ParallelScanResponse_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -24947,198 +77642,1196 @@ public com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfoOrB static { java.lang.String[] descriptorData = { "\n\014search.proto\0222com.alicloud.openservice" + - "s.tablestore.core.protocol\"\241\001\n\nMatchQuer" + - "y\022\022\n\nfield_name\030\001 \001(\t\022\014\n\004text\030\002 \001(\t\022\034\n\024m" + - "inimum_should_match\030\003 \001(\005\022S\n\010operator\030\004 " + - "\001(\0162A.com.alicloud.openservices.tablesto" + - "re.core.protocol.QueryOperator\"4\n\020MatchP" + - "hraseQuery\022\022\n\nfield_name\030\001 \001(\t\022\014\n\004text\030\002" + - " \001(\t\"\017\n\rMatchAllQuery\"-\n\tTermQuery\022\022\n\nfi" + - "eld_name\030\001 \001(\t\022\014\n\004term\030\002 \001(\014\"/\n\nTermsQue" + - "ry\022\022\n\nfield_name\030\001 \001(\t\022\r\n\005terms\030\002 \003(\014\"t\n", - "\nRangeQuery\022\022\n\nfield_name\030\001 \001(\t\022\022\n\nrange" + - "_from\030\002 \001(\014\022\020\n\010range_to\030\003 \001(\014\022\025\n\rinclude" + - "_lower\030\004 \001(\010\022\025\n\rinclude_upper\030\005 \001(\010\"1\n\013P" + - "refixQuery\022\022\n\nfield_name\030\001 \001(\t\022\016\n\006prefix" + - "\030\002 \001(\t\"2\n\rWildcardQuery\022\022\n\nfield_name\030\001 " + - "\001(\t\022\r\n\005value\030\002 \001(\t\"\365\002\n\tBoolQuery\022O\n\014must" + - "_queries\030\001 \003(\01329.com.alicloud.openservic" + - "es.tablestore.core.protocol.Query\022S\n\020mus" + - "t_not_queries\030\002 \003(\01329.com.alicloud.opens" + - "ervices.tablestore.core.protocol.Query\022Q", - "\n\016filter_queries\030\003 \003(\01329.com.alicloud.op" + - "enservices.tablestore.core.protocol.Quer" + - "y\022Q\n\016should_queries\030\004 \003(\01329.com.alicloud" + - ".openservices.tablestore.core.protocol.Q" + - "uery\022\034\n\024minimum_should_match\030\005 \001(\005\"\\\n\017Co" + - "nstScoreQuery\022I\n\006filter\030\001 \001(\01329.com.alic" + - "loud.openservices.tablestore.core.protoc" + - "ol.Query\"&\n\020FieldValueFactor\022\022\n\nfield_na" + - "me\030\001 \001(\t\"\300\001\n\022FunctionScoreQuery\022H\n\005query" + - "\030\001 \001(\01329.com.alicloud.openservices.table", - "store.core.protocol.Query\022`\n\022field_value" + - "_factor\030\002 \001(\0132D.com.alicloud.openservice" + - "s.tablestore.core.protocol.FieldValueFac" + - "tor\"\270\001\n\013NestedQuery\022\014\n\004path\030\001 \001(\t\022H\n\005que" + - "ry\030\002 \001(\01329.com.alicloud.openservices.tab" + - "lestore.core.protocol.Query\022Q\n\nscore_mod" + - "e\030\003 \001(\0162=.com.alicloud.openservices.tabl" + - "estore.core.protocol.ScoreMode\"Q\n\023GeoBou" + - "ndingBoxQuery\022\022\n\nfield_name\030\001 \001(\t\022\020\n\010top" + - "_left\030\002 \001(\t\022\024\n\014bottom_right\030\003 \001(\t\"N\n\020Geo", - "DistanceQuery\022\022\n\nfield_name\030\001 \001(\t\022\024\n\014cen" + - "ter_point\030\002 \001(\t\022\020\n\010distance\030\003 \001(\001\"5\n\017Geo" + - "PolygonQuery\022\022\n\nfield_name\030\001 \001(\t\022\016\n\006poin" + - "ts\030\002 \003(\t\"c\n\005Query\022K\n\004type\030\001 \001(\0162=.com.al" + - "icloud.openservices.tablestore.core.prot" + - "ocol.QueryType\022\r\n\005query\030\002 \001(\014\"\036\n\010Collaps" + - "e\022\022\n\nfield_name\030\001 \001(\t\"g\n\014NestedFilter\022\014\n" + - "\004path\030\001 \001(\t\022I\n\006filter\030\002 \001(\01329.com.aliclo" + + "s.tablestore.core.protocol\"-\n\006AvgAgg\022\022\n\n" + + "field_name\030\001 \001(\t\022\017\n\007missing\030\002 \001(\014\"$\n\016Car" + + "dinalityAgg\022\022\n\nfield_name\030\001 \001(\t\"-\n\006MaxAg" + + "g\022\022\n\nfield_name\030\001 \001(\t\022\017\n\007missing\030\002 \001(\014\"-" + + "\n\006MinAgg\022\022\n\nfield_name\030\001 \001(\t\022\017\n\007missing\030" + + "\002 \001(\014\"-\n\006SumAgg\022\022\n\nfield_name\030\001 \001(\t\022\017\n\007m" + + "issing\030\002 \001(\014\"r\n\010TermsAgg\022\022\n\nfield_name\030\001" + + " \001(\t\022\014\n\004size\030\002 \001(\005\022D\n\003agg\030\003 \001(\01327.com.al" + + "icloud.openservices.tablestore.core.prot", + "ocol.Agg\"\234\001\n\tFilterAgg\022I\n\006filter\030\001 \001(\01329" + + ".com.alicloud.openservices.tablestore.co" + + "re.protocol.Query\022D\n\003agg\030\002 \001(\01327.com.ali" + + "cloud.openservices.tablestore.core.proto" + + "col.Agg\"\032\n\nNestedPath\022\014\n\004path\030\001 \001(\t\"\246\001\n\t" + + "NestedAgg\022S\n\013nested_path\030\001 \001(\0132>.com.ali" + + "cloud.openservices.tablestore.core.proto" + + "col.NestedPath\022D\n\003agg\030\002 \001(\01327.com.aliclo" + "ud.openservices.tablestore.core.protocol" + - ".Query\"Y\n\tScoreSort\022L\n\005order\030\001 \001(\0162=.com", - ".alicloud.openservices.tablestore.core.p" + - "rotocol.SortOrder\"^\n\016PrimaryKeySort\022L\n\005o" + - "rder\030\001 \001(\0162=.com.alicloud.openservices.t" + - "ablestore.core.protocol.SortOrder\"\222\002\n\tFi" + - "eldSort\022\022\n\nfield_name\030\001 \001(\t\022L\n\005order\030\002 \001" + - "(\0162=.com.alicloud.openservices.tablestor" + - "e.core.protocol.SortOrder\022J\n\004mode\030\003 \001(\0162" + - "<.com.alicloud.openservices.tablestore.c" + - "ore.protocol.SortMode\022W\n\rnested_filter\030\004" + - " \001(\0132@.com.alicloud.openservices.tablest", - "ore.core.protocol.NestedFilter\"\204\003\n\017GeoDi" + - "stanceSort\022\022\n\nfield_name\030\001 \001(\t\022\016\n\006points" + - "\030\002 \003(\t\022L\n\005order\030\003 \001(\0162=.com.alicloud.ope" + - "nservices.tablestore.core.protocol.SortO" + - "rder\022J\n\004mode\030\004 \001(\0162<.com.alicloud.opense" + - "rvices.tablestore.core.protocol.SortMode" + - "\022Z\n\rdistance_type\030\005 \001(\0162C.com.alicloud.o" + - "penservices.tablestore.core.protocol.Geo" + - "DistanceType\022W\n\rnested_filter\030\006 \001(\0132@.co" + - "m.alicloud.openservices.tablestore.core.", - "protocol.NestedFilter\"\343\002\n\006Sorter\022Q\n\nfiel" + - "d_sort\030\001 \001(\0132=.com.alicloud.openservices" + - ".tablestore.core.protocol.FieldSort\022^\n\021g" + - "eo_distance_sort\030\002 \001(\0132C.com.alicloud.op" + - "enservices.tablestore.core.protocol.GeoD" + - "istanceSort\022Q\n\nscore_sort\030\003 \001(\0132=.com.al" + - "icloud.openservices.tablestore.core.prot" + - "ocol.ScoreSort\022S\n\007pk_sort\030\004 \001(\0132B.com.al" + - "icloud.openservices.tablestore.core.prot" + - "ocol.PrimaryKeySort\"R\n\004Sort\022J\n\006sorter\030\001 ", - "\003(\0132:.com.alicloud.openservices.tablesto" + - "re.core.protocol.Sorter\"\264\002\n\013SearchQuery\022" + - "\016\n\006offset\030\001 \001(\005\022\r\n\005limit\030\002 \001(\005\022H\n\005query\030" + - "\004 \001(\01329.com.alicloud.openservices.tables" + - "tore.core.protocol.Query\022N\n\010collapse\030\005 \001" + - "(\0132<.com.alicloud.openservices.tablestor" + - "e.core.protocol.Collapse\022F\n\004sort\030\006 \001(\01328" + + ".Agg\":\n\014GeoBoundsAgg\022\022\n\nfield_name\030\001 \001(\t", + "\022\026\n\016wrap_longitude\030\002 \001(\010\"H\n\023GeoDistanceA" + + "ggRange\022\013\n\003key\030\001 \001(\t\022\022\n\nrange_from\030\002 \001(\001" + + "\022\020\n\010range_to\030\003 \001(\001\"\215\001\n\016GeoDistanceAgg\022\022\n" + + "\nfield_name\030\001 \001(\t\022\016\n\006origin\030\002 \001(\t\022W\n\006ran" + + "ges\030\003 \003(\0132G.com.alicloud.openservices.ta" + + "blestore.core.protocol.GeoDistanceAggRan" + + "ge\"/\n\010StatsAgg\022\022\n\nfield_name\030\001 \001(\t\022\017\n\007mi" + + "ssing\030\002 \001(\014\"7\n\020ExtendedStatsAgg\022\022\n\nfield" + + "_name\030\001 \001(\t\022\017\n\007missing\030\002 \001(\014\"G\n\016Percenti" + + "lesAgg\022\022\n\nfield_name\030\001 \001(\t\022\020\n\010percents\030\002", + " \003(\001\022\017\n\007missing\030\003 \001(\014\"I\n\022PercentileRanks" + + "Agg\022\022\n\nfield_name\030\001 \001(\t\022\016\n\006values\030\002 \003(\001\022" + + "\017\n\007missing\030\003 \001(\014\"#\n\rValueCountAgg\022\022\n\nfie" + + "ld_name\030\001 \001(\t\"~\n\tAggClause\022\020\n\010agg_name\030\001" + + " \001(\t\022M\n\010agg_type\030\002 \001(\0162;.com.alicloud.op" + + "enservices.tablestore.core.protocol.AggT" + + "ype\022\020\n\010agg_body\030\003 \001(\014\"X\n\003Agg\022Q\n\nagg_clau" + + "se\030\001 \003(\0132=.com.alicloud.openservices.tab" + + "lestore.core.protocol.AggClause\"\035\n\014AvgAg" + + "gResult\022\r\n\005value\030\001 \001(\001\"\035\n\014MaxAggResult\022\r", + "\n\005value\030\001 \001(\001\"\035\n\014MinAggResult\022\r\n\005value\030\001" + + " \001(\001\"\035\n\014SumAggResult\022\r\n\005value\030\001 \001(\001\"%\n\024C" + + "ardinalityAggResult\022\r\n\005value\030\001 \001(\003\"{\n\006Bu" + + "cket\022\013\n\003key\030\001 \001(\t\022\021\n\tdoc_count\030\002 \001(\003\022Q\n\n" + + "agg_result\030\003 \001(\0132=.com.alicloud.openserv" + + "ices.tablestore.core.protocol.AggResult\"" + + "\241\001\n\016TermsAggResult\022#\n\033doc_count_error_up" + + "per_bound\030\001 \001(\003\022\036\n\026sum_of_other_doc_coun" + + "t\030\002 \001(\003\022J\n\006bucket\030\003 \003(\0132:.com.alicloud.o" + + "penservices.tablestore.core.protocol.Buc", + "ket\"w\n\017FilterAggResult\022\021\n\tdoc_count\030\001 \001(" + + "\003\022Q\n\nagg_result\030\002 \001(\0132=.com.alicloud.ope" + + "nservices.tablestore.core.protocol.AggRe" + + "sult\"w\n\017NestedAggResult\022\021\n\tdoc_count\030\001 \001" + + "(\003\022Q\n\nagg_result\030\002 \001(\0132=.com.alicloud.op" + + "enservices.tablestore.core.protocol.AggR" + + "esult\"$\n\010GeoPoint\022\013\n\003lat\030\001 \001(\001\022\013\n\003lon\030\002 " + + "\001(\001\"\270\001\n\022GeoBoundsAggResult\022N\n\010top_left\030\001" + + " \001(\0132<.com.alicloud.openservices.tablest" + + "ore.core.protocol.GeoPoint\022R\n\014bottom_rig", + "ht\030\002 \001(\0132<.com.alicloud.openservices.tab" + + "lestore.core.protocol.GeoPoint\"S\n\013RangeB" + + "ucket\022\013\n\003key\030\001 \001(\t\022\022\n\nrange_from\030\002 \001(\001\022\020" + + "\n\010range_to\030\003 \001(\001\022\021\n\tdoc_count\030\004 \001(\003\"g\n\024G" + + "eoDistanceAggResult\022O\n\006bucket\030\001 \003(\0132?.co" + + "m.alicloud.openservices.tablestore.core." + + "protocol.RangeBucket\"S\n\016StatsAggResult\022\r" + + "\n\005count\030\001 \001(\003\022\013\n\003min\030\002 \001(\001\022\013\n\003max\030\003 \001(\001\022" + + "\013\n\003avg\030\004 \001(\001\022\013\n\003sum\030\005 \001(\001\"\344\001\n\026ExtendedSt" + + "atsAggResult\022\r\n\005count\030\001 \001(\003\022\013\n\003min\030\002 \001(\001", + "\022\013\n\003max\030\003 \001(\001\022\013\n\003avg\030\004 \001(\001\022\013\n\003sum\030\005 \001(\001\022" + + "\026\n\016sum_of_squares\030\006 \001(\001\022\020\n\010variance\030\007 \001(" + + "\001\022\025\n\rstd_deviation\030\010 \001(\001\022\"\n\032std_deviatio" + + "n_bounds_upper\030\t \001(\001\022\"\n\032std_deviation_bo" + + "unds_lower\030\n \001(\001\",\n\nPercentile\022\017\n\007percen" + + "t\030\001 \001(\001\022\r\n\005value\030\002 \001(\001\"k\n\024PercentilesAgg" + + "Result\022S\n\013percentiles\030\001 \003(\0132>.com.aliclo" + + "ud.openservices.tablestore.core.protocol" + + ".Percentile\"o\n\030PercentileRanksAggResult\022" + + "S\n\013percentiles\030\001 \003(\0132>.com.alicloud.open", + "services.tablestore.core.protocol.Percen" + + "tile\"$\n\023ValueCountAggResult\022\r\n\005count\030\001 \001" + + "(\003\"{\n\014SubAggResult\022\014\n\004name\030\001 \001(\t\022I\n\004type" + + "\030\002 \001(\0162;.com.alicloud.openservices.table" + + "store.core.protocol.AggType\022\022\n\nagg_resul" + + "t\030\003 \001(\014\"f\n\tAggResult\022Y\n\017sub_agg_results\030" + + "\001 \003(\0132@.com.alicloud.openservices.tables" + + "tore.core.protocol.SubAggResult\"|\n\013Aggre" + + "gation\022\014\n\004name\030\001 \001(\t\022Q\n\004type\030\002 \001(\0162C.com" + + ".alicloud.openservices.tablestore.core.p", + "rotocol.AggregationType\022\014\n\004body\030\003 \001(\014\"]\n" + + "\014Aggregations\022M\n\004aggs\030\001 \003(\0132?.com.aliclo" + + "ud.openservices.tablestore.core.protocol" + + ".Aggregation\"t\n\007GroupBy\022\014\n\004name\030\001 \001(\t\022M\n" + + "\004type\030\002 \001(\0162?.com.alicloud.openservices." + + "tablestore.core.protocol.GroupByType\022\014\n\004" + + "body\030\003 \001(\014\"Z\n\010GroupBys\022N\n\tgroup_bys\030\001 \003(" + + "\0132;.com.alicloud.openservices.tablestore" + + ".core.protocol.GroupBy\"5\n\016AvgAggregation" + + "\022\022\n\nfield_name\030\001 \001(\t\022\017\n\007missing\030\002 \001(\014\"5\n", + "\016MaxAggregation\022\022\n\nfield_name\030\001 \001(\t\022\017\n\007m" + + "issing\030\002 \001(\014\"5\n\016MinAggregation\022\022\n\nfield_" + + "name\030\001 \001(\t\022\017\n\007missing\030\002 \001(\014\"5\n\016SumAggreg" + + "ation\022\022\n\nfield_name\030\001 \001(\t\022\017\n\007missing\030\002 \001" + + "(\014\"&\n\020CountAggregation\022\022\n\nfield_name\030\001 \001" + + "(\t\"?\n\030DistinctCountAggregation\022\022\n\nfield_" + + "name\030\001 \001(\t\022\017\n\007missing\030\002 \001(\014\"k\n\022TopRowsAg" + + "gregation\022\r\n\005limit\030\001 \001(\005\022F\n\004sort\030\002 \001(\01328" + ".com.alicloud.openservices.tablestore.co" + - "re.protocol.Sort\022\025\n\rgetTotalCount\030\010 \001(\010\022" + - "\r\n\005token\030\t \001(\014\"\177\n\014ColumnsToGet\022Y\n\013return", - "_type\030\001 \001(\0162D.com.alicloud.openservices." + - "tablestore.core.protocol.ColumnReturnTyp" + - "e\022\024\n\014column_names\030\002 \003(\t\"\277\001\n\rSearchReques" + - "t\022\022\n\ntable_name\030\001 \001(\t\022\022\n\nindex_name\030\002 \001(" + - "\t\022X\n\016columns_to_get\030\003 \001(\0132@.com.alicloud" + - ".openservices.tablestore.core.protocol.C" + - "olumnsToGet\022\024\n\014search_query\030\004 \001(\014\022\026\n\016rou" + - "ting_values\030\005 \003(\014\"`\n\016SearchResponse\022\022\n\nt" + - "otal_hits\030\001 \001(\003\022\014\n\004rows\030\002 \003(\014\022\030\n\020is_all_" + - "succeeded\030\003 \001(\010\022\022\n\nnext_token\030\006 \001(\014\"\373\002\n\013", - "FieldSchema\022\022\n\nfield_name\030\001 \001(\t\022Q\n\nfield" + - "_type\030\002 \001(\0162=.com.alicloud.openservices." + - "tablestore.core.protocol.FieldType\022W\n\rin" + - "dex_options\030\003 \001(\0162@.com.alicloud.openser" + - "vices.tablestore.core.protocol.IndexOpti" + - "ons\022\020\n\010analyzer\030\004 \001(\t\022\r\n\005index\030\005 \001(\010\022\022\n\n" + - "doc_values\030\006 \001(\010\022\r\n\005store\030\007 \001(\010\022V\n\rfield" + - "_schemas\030\010 \003(\0132?.com.alicloud.openservic" + - "es.tablestore.core.protocol.FieldSchema\022" + - "\020\n\010is_array\030\t \001(\010\"\214\002\n\013IndexSchema\022V\n\rfie", - "ld_schemas\030\001 \003(\0132?.com.alicloud.openserv" + - "ices.tablestore.core.protocol.FieldSchem" + - "a\022W\n\rindex_setting\030\002 \001(\0132@.com.alicloud." + - "openservices.tablestore.core.protocol.In" + - "dexSetting\022L\n\nindex_sort\030\003 \001(\01328.com.ali" + + "re.protocol.Sort\"R\n\026PercentilesAggregati", + "on\022\022\n\nfield_name\030\001 \001(\t\022\023\n\013percentiles\030\002 " + + "\003(\001\022\017\n\007missing\030\003 \001(\014\"&\n\nFieldRange\022\013\n\003mi" + + "n\030\001 \001(\014\022\013\n\003max\030\002 \001(\014\"\255\003\n\020GroupByHistogra" + + "m\022\022\n\nfield_name\030\001 \001(\t\022\020\n\010interval\030\002 \001(\014\022" + + "\017\n\007missing\030\003 \001(\014\022\025\n\rmin_doc_count\030\004 \001(\003\022" + + "M\n\004sort\030\005 \001(\0132?.com.alicloud.openservice" + + "s.tablestore.core.protocol.GroupBySort\022S" + + "\n\013field_range\030\006 \001(\0132>.com.alicloud.opens" + + "ervices.tablestore.core.protocol.FieldRa" + + "nge\022R\n\010sub_aggs\030\007 \001(\0132@.com.alicloud.ope", + "nservices.tablestore.core.protocol.Aggre" + + "gations\022S\n\rsub_group_bys\030\010 \001(\0132<.com.ali" + "cloud.openservices.tablestore.core.proto" + - "col.Sort\"`\n\014IndexSetting\022\030\n\020number_of_sh" + - "ards\030\001 \001(\005\022\026\n\016routing_fields\030\002 \003(\t\022\036\n\026ro" + - "uting_partition_size\030\003 \001(\005\"\223\001\n\030CreateSea" + - "rchIndexRequest\022\022\n\ntable_name\030\001 \002(\t\022\022\n\ni", - "ndex_name\030\002 \002(\t\022O\n\006schema\030\003 \001(\0132?.com.al" + + "col.GroupBys\"\\\n\014GroupKeySort\022L\n\005order\030\001 " + + "\001(\0162=.com.alicloud.openservices.tablesto" + + "re.core.protocol.SortOrder\"\\\n\014RowCountSo" + + "rt\022L\n\005order\030\001 \001(\0162=.com.alicloud.openser" + + "vices.tablestore.core.protocol.SortOrder" + + "\"p\n\nSubAggSort\022\024\n\014sub_agg_name\030\001 \001(\t\022L\n\005" + + "order\030\002 \001(\0162=.com.alicloud.openservices.", + "tablestore.core.protocol.SortOrder\"\231\002\n\rG" + + "roupBySorter\022X\n\016group_key_sort\030\001 \001(\0132@.c" + + "om.alicloud.openservices.tablestore.core" + + ".protocol.GroupKeySort\022X\n\016row_count_sort" + + "\030\002 \001(\0132@.com.alicloud.openservices.table" + + "store.core.protocol.RowCountSort\022T\n\014sub_" + + "agg_sort\030\003 \001(\0132>.com.alicloud.openservic" + + "es.tablestore.core.protocol.SubAggSort\"a" + + "\n\013GroupBySort\022R\n\007sorters\030\001 \003(\0132A.com.ali" + + "cloud.openservices.tablestore.core.proto", + "col.GroupBySorter\"\277\002\n\014GroupByField\022\022\n\nfi" + + "eld_name\030\001 \001(\t\022\014\n\004size\030\002 \001(\005\022M\n\004sort\030\003 \001" + + "(\0132?.com.alicloud.openservices.tablestor" + + "e.core.protocol.GroupBySort\022R\n\010sub_aggs\030" + + "\004 \001(\0132@.com.alicloud.openservices.tables" + + "tore.core.protocol.Aggregations\022S\n\rsub_g" + + "roup_bys\030\005 \001(\0132<.com.alicloud.openservic" + + "es.tablestore.core.protocol.GroupBys\022\025\n\r" + + "min_doc_count\030\006 \001(\003\"!\n\005Range\022\014\n\004from\030\001 \001" + + "(\001\022\n\n\002to\030\002 \001(\001\"\226\002\n\014GroupByRange\022\022\n\nfield", + "_name\030\001 \001(\t\022I\n\006ranges\030\002 \003(\01329.com.aliclo" + + "ud.openservices.tablestore.core.protocol" + + ".Range\022R\n\010sub_aggs\030\003 \001(\0132@.com.alicloud." + + "openservices.tablestore.core.protocol.Ag" + + "gregations\022S\n\rsub_group_bys\030\004 \001(\0132<.com." + + "alicloud.openservices.tablestore.core.pr" + + "otocol.GroupBys\"\204\002\n\rGroupByFilter\022J\n\007fil" + + "ters\030\001 \003(\01329.com.alicloud.openservices.t" + + "ablestore.core.protocol.Query\022R\n\010sub_agg" + + "s\030\002 \001(\0132@.com.alicloud.openservices.tabl", + "estore.core.protocol.Aggregations\022S\n\rsub" + + "_group_bys\030\003 \001(\0132<.com.alicloud.openserv" + + "ices.tablestore.core.protocol.GroupBys\"\352" + + "\002\n\022GroupByGeoDistance\022\022\n\nfield_name\030\001 \001(" + + "\t\022L\n\006origin\030\002 \001(\0132<.com.alicloud.openser" + + "vices.tablestore.core.protocol.GeoPoint\022" + + "I\n\006ranges\030\003 \003(\01329.com.alicloud.openservi" + + "ces.tablestore.core.protocol.Range\022R\n\010su" + + "b_aggs\030\004 \001(\0132@.com.alicloud.openservices" + + ".tablestore.core.protocol.Aggregations\022S", + "\n\rsub_group_bys\030\005 \001(\0132<.com.alicloud.ope" + + "nservices.tablestore.core.protocol.Group" + + "Bys\"%\n\024AvgAggregationResult\022\r\n\005value\030\001 \001" + + "(\001\"(\n\030TopRowsAggregationResult\022\014\n\004rows\030\001" + + " \003(\014\"8\n\032PercentilesAggregationItem\022\013\n\003ke" + + "y\030\001 \001(\001\022\r\n\005value\030\002 \001(\014\"\225\001\n\034PercentilesAg" + + "gregationResult\022u\n\035percentiles_aggregati" + + "on_items\030\001 \003(\0132N.com.alicloud.openservic" + + "es.tablestore.core.protocol.PercentilesA" + + "ggregationItem\"/\n\036DistinctCountAggregati", + "onResult\022\r\n\005value\030\001 \001(\003\"%\n\024MaxAggregatio" + + "nResult\022\r\n\005value\030\001 \001(\001\"%\n\024MinAggregation" + + "Result\022\r\n\005value\030\001 \001(\001\"%\n\024SumAggregationR" + + "esult\022\r\n\005value\030\001 \001(\001\"\'\n\026CountAggregation" + + "Result\022\r\n\005value\030\001 \001(\003\"\210\001\n\021AggregationRes" + + "ult\022\014\n\004name\030\001 \001(\t\022Q\n\004type\030\002 \001(\0162C.com.al" + + "icloud.openservices.tablestore.core.prot" + + "ocol.AggregationType\022\022\n\nagg_result\030\003 \001(\014" + + "\"p\n\022AggregationsResult\022Z\n\013agg_results\030\001 " + + "\003(\0132E.com.alicloud.openservices.tablesto", + "re.core.protocol.AggregationResult\"\373\001\n\026G" + + "roupByFieldResultItem\022\013\n\003key\030\001 \001(\t\022\021\n\tro" + + "w_count\030\002 \001(\003\022_\n\017sub_aggs_result\030\003 \001(\0132F" + + ".com.alicloud.openservices.tablestore.co" + + "re.protocol.AggregationsResult\022`\n\024sub_gr" + + "oup_bys_result\030\004 \001(\0132B.com.alicloud.open" + + "services.tablestore.core.protocol.GroupB" + + "ysResult\"\205\001\n\022GroupByFieldResult\022o\n\033group" + + "_by_field_result_items\030\001 \003(\0132J.com.alicl" + + "oud.openservices.tablestore.core.protoco", + "l.GroupByFieldResultItem\"\210\002\n\026GroupByRang" + + "eResultItem\022\014\n\004from\030\001 \001(\001\022\n\n\002to\030\002 \001(\001\022\021\n" + + "\trow_count\030\003 \001(\003\022_\n\017sub_aggs_result\030\004 \001(" + + "\0132F.com.alicloud.openservices.tablestore" + + ".core.protocol.AggregationsResult\022`\n\024sub" + + "_group_bys_result\030\005 \001(\0132B.com.alicloud.o" + + "penservices.tablestore.core.protocol.Gro" + + "upBysResult\"\205\001\n\022GroupByRangeResult\022o\n\033gr" + + "oup_by_range_result_items\030\001 \003(\0132J.com.al" + + "icloud.openservices.tablestore.core.prot", + "ocol.GroupByRangeResultItem\"\216\002\n\034GroupByG" + + "eoDistanceResultItem\022\014\n\004from\030\001 \001(\001\022\n\n\002to" + + "\030\002 \001(\001\022\021\n\trow_count\030\003 \001(\003\022_\n\017sub_aggs_re" + + "sult\030\004 \001(\0132F.com.alicloud.openservices.t" + + "ablestore.core.protocol.AggregationsResu" + + "lt\022`\n\024sub_group_bys_result\030\005 \001(\0132B.com.a" + + "licloud.openservices.tablestore.core.pro" + + "tocol.GroupBysResult\"\230\001\n\030GroupByGeoDista" + + "nceResult\022|\n\"group_by_geo_distance_resul" + + "t_items\030\001 \003(\0132P.com.alicloud.openservice", + "s.tablestore.core.protocol.GroupByGeoDis" + + "tanceResultItem\"\357\001\n\027GroupByFilterResultI" + + "tem\022\021\n\trow_count\030\001 \001(\003\022_\n\017sub_aggs_resul" + + "t\030\002 \001(\0132F.com.alicloud.openservices.tabl" + + "estore.core.protocol.AggregationsResult\022" + + "`\n\024sub_group_bys_result\030\003 \001(\0132B.com.alic" + + "loud.openservices.tablestore.core.protoc" + + "ol.GroupBysResult\"\210\001\n\023GroupByFilterResul" + + "t\022q\n\034group_by_filter_result_items\030\001 \003(\0132" + + "K.com.alicloud.openservices.tablestore.c", + "ore.protocol.GroupByFilterResultItem\"\205\001\n" + + "\rGroupByResult\022\014\n\004name\030\001 \001(\t\022M\n\004type\030\002 \001" + + "(\0162?.com.alicloud.openservices.tablestor" + + "e.core.protocol.GroupByType\022\027\n\017group_by_" + + "result\030\003 \001(\014\"m\n\016GroupBysResult\022[\n\020group_" + + "by_results\030\001 \003(\0132A.com.alicloud.openserv" + + "ices.tablestore.core.protocol.GroupByRes" + + "ult\"\365\001\n\024GroupByHistogramItem\022\013\n\003key\030\001 \001(" + + "\014\022\r\n\005value\030\002 \001(\003\022_\n\017sub_aggs_result\030\003 \001(" + + "\0132F.com.alicloud.openservices.tablestore", + ".core.protocol.AggregationsResult\022`\n\024sub" + + "_group_bys_result\030\004 \001(\0132B.com.alicloud.o" + + "penservices.tablestore.core.protocol.Gro" + + "upBysResult\"\203\001\n\026GroupByHistogramResult\022i" + + "\n\027group_by_histogra_items\030\001 \003(\0132H.com.al" + "icloud.openservices.tablestore.core.prot" + - "ocol.IndexSchema\"\033\n\031CreateSearchIndexRes" + - "ponse\"3\n\tIndexInfo\022\022\n\ntable_name\030\001 \001(\t\022\022" + - "\n\nindex_name\030\002 \001(\t\",\n\026ListSearchIndexReq" + - "uest\022\022\n\ntable_name\030\001 \001(\t\"i\n\027ListSearchIn" + - "dexResponse\022N\n\007indices\030\001 \003(\0132=.com.alicl" + + "ocol.GroupByHistogramItem\"\261\001\n\nMatchQuery" + + "\022\022\n\nfield_name\030\001 \001(\t\022\014\n\004text\030\002 \001(\t\022\034\n\024mi" + + "nimum_should_match\030\003 \001(\005\022S\n\010operator\030\004 \001" + + "(\0162A.com.alicloud.openservices.tablestor", + "e.core.protocol.QueryOperator\022\016\n\006weight\030" + + "\005 \001(\002\"D\n\020MatchPhraseQuery\022\022\n\nfield_name\030" + + "\001 \001(\t\022\014\n\004text\030\002 \001(\t\022\016\n\006weight\030\003 \001(\002\"\017\n\rM" + + "atchAllQuery\"=\n\tTermQuery\022\022\n\nfield_name\030" + + "\001 \001(\t\022\014\n\004term\030\002 \001(\014\022\016\n\006weight\030\003 \001(\002\"?\n\nT" + + "ermsQuery\022\022\n\nfield_name\030\001 \001(\t\022\r\n\005terms\030\002" + + " \003(\014\022\016\n\006weight\030\003 \001(\002\"t\n\nRangeQuery\022\022\n\nfi" + + "eld_name\030\001 \001(\t\022\022\n\nrange_from\030\002 \001(\014\022\020\n\010ra" + + "nge_to\030\003 \001(\014\022\025\n\rinclude_lower\030\004 \001(\010\022\025\n\ri" + + "nclude_upper\030\005 \001(\010\"A\n\013PrefixQuery\022\022\n\nfie", + "ld_name\030\001 \001(\t\022\016\n\006prefix\030\002 \001(\t\022\016\n\006weight\030" + + "\003 \001(\002\"B\n\rWildcardQuery\022\022\n\nfield_name\030\001 \001" + + "(\t\022\r\n\005value\030\002 \001(\t\022\016\n\006weight\030\003 \001(\002\"\365\002\n\tBo" + + "olQuery\022O\n\014must_queries\030\001 \003(\01329.com.alic" + + "loud.openservices.tablestore.core.protoc" + + "ol.Query\022S\n\020must_not_queries\030\002 \003(\01329.com" + + ".alicloud.openservices.tablestore.core.p" + + "rotocol.Query\022Q\n\016filter_queries\030\003 \003(\01329." + + "com.alicloud.openservices.tablestore.cor" + + "e.protocol.Query\022Q\n\016should_queries\030\004 \003(\013", + "29.com.alicloud.openservices.tablestore." + + "core.protocol.Query\022\034\n\024minimum_should_ma" + + "tch\030\005 \001(\005\"\\\n\017ConstScoreQuery\022I\n\006filter\030\001" + + " \001(\01329.com.alicloud.openservices.tablest" + + "ore.core.protocol.Query\"&\n\020FieldValueFac" + + "tor\022\022\n\nfield_name\030\001 \001(\t\"\300\001\n\022FunctionScor" + + "eQuery\022H\n\005query\030\001 \001(\01329.com.alicloud.ope" + + "nservices.tablestore.core.protocol.Query" + + "\022`\n\022field_value_factor\030\002 \001(\0132D.com.alicl" + + "oud.openservices.tablestore.core.protoco", + "l.FieldValueFactor\"\310\001\n\013NestedQuery\022\014\n\004pa" + + "th\030\001 \001(\t\022H\n\005query\030\002 \001(\01329.com.alicloud.o" + + "penservices.tablestore.core.protocol.Que" + + "ry\022Q\n\nscore_mode\030\003 \001(\0162=.com.alicloud.op" + + "enservices.tablestore.core.protocol.Scor" + + "eMode\022\016\n\006weight\030\004 \001(\002\"Q\n\023GeoBoundingBoxQ" + + "uery\022\022\n\nfield_name\030\001 \001(\t\022\020\n\010top_left\030\002 \001" + + "(\t\022\024\n\014bottom_right\030\003 \001(\t\"N\n\020GeoDistanceQ" + + "uery\022\022\n\nfield_name\030\001 \001(\t\022\024\n\014center_point" + + "\030\002 \001(\t\022\020\n\010distance\030\003 \001(\001\"5\n\017GeoPolygonQu", + "ery\022\022\n\nfield_name\030\001 \001(\t\022\016\n\006points\030\002 \003(\t\"" + + "!\n\013ExistsQuery\022\022\n\nfield_name\030\001 \001(\t\"c\n\005Qu" + + "ery\022K\n\004type\030\001 \001(\0162=.com.alicloud.openser" + + "vices.tablestore.core.protocol.QueryType" + + "\022\r\n\005query\030\002 \001(\014\"\036\n\010Collapse\022\022\n\nfield_nam" + + "e\030\001 \001(\t\"g\n\014NestedFilter\022\014\n\004path\030\001 \001(\t\022I\n" + + "\006filter\030\002 \001(\01329.com.alicloud.openservice" + + "s.tablestore.core.protocol.Query\"Y\n\tScor" + + "eSort\022L\n\005order\030\001 \001(\0162=.com.alicloud.open" + + "services.tablestore.core.protocol.SortOr", + "der\"^\n\016PrimaryKeySort\022L\n\005order\030\001 \001(\0162=.c" + + "om.alicloud.openservices.tablestore.core" + + ".protocol.SortOrder\"\243\002\n\tFieldSort\022\022\n\nfie" + + "ld_name\030\001 \001(\t\022L\n\005order\030\002 \001(\0162=.com.alicl" + "oud.openservices.tablestore.core.protoco" + - "l.IndexInfo\"B\n\030DeleteSearchIndexRequest\022" + - "\022\n\ntable_name\030\001 \001(\t\022\022\n\nindex_name\030\002 \001(\t\"", - "\033\n\031DeleteSearchIndexResponse\"}\n\010SyncStat" + - "\022Q\n\nsync_phase\030\001 \001(\0162=.com.alicloud.open" + - "services.tablestore.core.protocol.SyncPh" + - "ase\022\036\n\026current_sync_timestamp\030\002 \001(\003\"d\n\014M" + - "eteringInfo\022\024\n\014storage_size\030\001 \001(\003\022\021\n\tdoc" + - "_count\030\002 \001(\003\022\030\n\020reserved_read_cu\030\003 \001(\003\022\021" + - "\n\ttimestamp\030\004 \001(\003\"D\n\032DescribeSearchIndex" + - "Request\022\022\n\ntable_name\030\001 \001(\t\022\022\n\nindex_nam" + - "e\030\002 \001(\t\"\230\002\n\033DescribeSearchIndexResponse\022" + - "O\n\006schema\030\001 \001(\0132?.com.alicloud.openservi", - "ces.tablestore.core.protocol.IndexSchema" + - "\022O\n\tsync_stat\030\002 \001(\0132<.com.alicloud.opens" + - "ervices.tablestore.core.protocol.SyncSta" + - "t\022W\n\rmetering_info\030\003 \001(\0132@.com.alicloud." + - "openservices.tablestore.core.protocol.Me" + - "teringInfo*\277\002\n\tQueryType\022\017\n\013MATCH_QUERY\020" + - "\001\022\026\n\022MATCH_PHRASE_QUERY\020\002\022\016\n\nTERM_QUERY\020" + - "\003\022\017\n\013RANGE_QUERY\020\004\022\020\n\014PREFIX_QUERY\020\005\022\016\n\n" + - "BOOL_QUERY\020\006\022\025\n\021CONST_SCORE_QUERY\020\007\022\030\n\024F" + - "UNCTION_SCORE_QUERY\020\010\022\020\n\014NESTED_QUERY\020\t\022", - "\022\n\016WILDCARD_QUERY\020\n\022\023\n\017MATCH_ALL_QUERY\020\013" + - "\022\032\n\026GEO_BOUNDING_BOX_QUERY\020\014\022\026\n\022GEO_DIST" + - "ANCE_QUERY\020\r\022\025\n\021GEO_POLYGON_QUERY\020\016\022\017\n\013T" + - "ERMS_QUERY\020\017* \n\rQueryOperator\022\006\n\002OR\020\001\022\007\n" + - "\003AND\020\002*r\n\tScoreMode\022\023\n\017SCORE_MODE_NONE\020\001" + - "\022\022\n\016SCORE_MODE_AVG\020\002\022\022\n\016SCORE_MODE_MAX\020\003" + - "\022\024\n\020SCORE_MODE_TOTAL\020\004\022\022\n\016SCORE_MODE_MIN" + - "\020\005*4\n\tSortOrder\022\022\n\016SORT_ORDER_ASC\020\000\022\023\n\017S" + - "ORT_ORDER_DESC\020\001*C\n\010SortMode\022\021\n\rSORT_MOD" + - "E_MIN\020\000\022\021\n\rSORT_MODE_MAX\020\001\022\021\n\rSORT_MODE_", - "AVG\020\002*?\n\017GeoDistanceType\022\024\n\020GEO_DISTANCE" + - "_ARC\020\000\022\026\n\022GEO_DISTANCE_PLANE\020\001*I\n\020Column" + - "ReturnType\022\016\n\nRETURN_ALL\020\001\022\024\n\020RETURN_SPE" + - "CIFIED\020\002\022\017\n\013RETURN_NONE\020\003*?\n\014IndexOption" + - "s\022\010\n\004DOCS\020\001\022\t\n\005FREQS\020\002\022\r\n\tPOSITIONS\020\003\022\013\n" + - "\007OFFSETS\020\004*`\n\tFieldType\022\010\n\004LONG\020\001\022\n\n\006DOU" + - "BLE\020\002\022\013\n\007BOOLEAN\020\003\022\013\n\007KEYWORD\020\004\022\010\n\004TEXT\020" + - "\005\022\n\n\006NESTED\020\006\022\r\n\tGEO_POINT\020\007*\037\n\tSyncPhas" + - "e\022\010\n\004FULL\020\001\022\010\n\004INCR\020\002" + "l.SortOrder\022J\n\004mode\030\003 \001(\0162<.com.alicloud" + + ".openservices.tablestore.core.protocol.S" + + "ortMode\022W\n\rnested_filter\030\004 \001(\0132@.com.ali" + + "cloud.openservices.tablestore.core.proto" + + "col.NestedFilter\022\017\n\007missing\030\005 \001(\014\"\204\003\n\017Ge", + "oDistanceSort\022\022\n\nfield_name\030\001 \001(\t\022\016\n\006poi" + + "nts\030\002 \003(\t\022L\n\005order\030\003 \001(\0162=.com.alicloud." + + "openservices.tablestore.core.protocol.So" + + "rtOrder\022J\n\004mode\030\004 \001(\0162<.com.alicloud.ope" + + "nservices.tablestore.core.protocol.SortM" + + "ode\022Z\n\rdistance_type\030\005 \001(\0162C.com.aliclou" + + "d.openservices.tablestore.core.protocol." + + "GeoDistanceType\022W\n\rnested_filter\030\006 \001(\0132@" + + ".com.alicloud.openservices.tablestore.co" + + "re.protocol.NestedFilter\"\343\002\n\006Sorter\022Q\n\nf", + "ield_sort\030\001 \001(\0132=.com.alicloud.openservi" + + "ces.tablestore.core.protocol.FieldSort\022^" + + "\n\021geo_distance_sort\030\002 \001(\0132C.com.alicloud" + + ".openservices.tablestore.core.protocol.G" + + "eoDistanceSort\022Q\n\nscore_sort\030\003 \001(\0132=.com" + + ".alicloud.openservices.tablestore.core.p" + + "rotocol.ScoreSort\022S\n\007pk_sort\030\004 \001(\0132B.com" + + ".alicloud.openservices.tablestore.core.p" + + "rotocol.PrimaryKeySort\"R\n\004Sort\022J\n\006sorter" + + "\030\001 \003(\0132:.com.alicloud.openservices.table", + "store.core.protocol.Sorter\"\325\003\n\013SearchQue" + + "ry\022\016\n\006offset\030\001 \001(\005\022\r\n\005limit\030\002 \001(\005\022H\n\005que" + + "ry\030\004 \001(\01329.com.alicloud.openservices.tab" + + "lestore.core.protocol.Query\022N\n\010collapse\030" + + "\005 \001(\0132<.com.alicloud.openservices.tables" + + "tore.core.protocol.Collapse\022F\n\004sort\030\006 \001(" + + "\01328.com.alicloud.openservices.tablestore" + + ".core.protocol.Sort\022\025\n\rgetTotalCount\030\010 \001" + + "(\010\022\r\n\005token\030\t \001(\014\022N\n\004aggs\030\n \001(\0132@.com.al" + + "icloud.openservices.tablestore.core.prot", + "ocol.Aggregations\022O\n\tgroup_bys\030\013 \001(\0132<.c" + + "om.alicloud.openservices.tablestore.core" + + ".protocol.GroupBys\"\177\n\014ColumnsToGet\022Y\n\013re" + + "turn_type\030\001 \001(\0162D.com.alicloud.openservi" + + "ces.tablestore.core.protocol.ColumnRetur" + + "nType\022\024\n\014column_names\030\002 \003(\t\"\323\001\n\rSearchRe" + + "quest\022\022\n\ntable_name\030\001 \001(\t\022\022\n\nindex_name\030" + + "\002 \001(\t\022X\n\016columns_to_get\030\003 \001(\0132@.com.alic" + + "loud.openservices.tablestore.core.protoc" + + "ol.ColumnsToGet\022\024\n\014search_query\030\004 \001(\014\022\026\n", + "\016routing_values\030\005 \003(\014\022\022\n\ntimeout_ms\030\006 \001(" + + "\005\"\201\001\n\016SearchResponse\022\022\n\ntotal_hits\030\001 \001(\003" + + "\022\014\n\004rows\030\002 \003(\014\022\030\n\020is_all_succeeded\030\003 \001(\010" + + "\022\022\n\nnext_token\030\006 \001(\014\022\014\n\004aggs\030\007 \001(\014\022\021\n\tgr" + + "oup_bys\030\010 \001(\014\"K\n\033SingleWordAnalyzerParam" + + "eter\022\026\n\016case_sensitive\030\001 \001(\010\022\024\n\014delimit_" + + "word\030\002 \001(\010\"+\n\026SplitAnalyzerParameter\022\021\n\t" + + "delimiter\030\001 \001(\t\">\n\026FuzzyAnalyzerParamete" + + "r\022\021\n\tmin_chars\030\001 \001(\005\022\021\n\tmax_chars\030\002 \001(\005\"" + + "\317\003\n\013FieldSchema\022\022\n\nfield_name\030\001 \001(\t\022Q\n\nf", + "ield_type\030\002 \001(\0162=.com.alicloud.openservi" + + "ces.tablestore.core.protocol.FieldType\022W" + + "\n\rindex_options\030\003 \001(\0162@.com.alicloud.ope" + + "nservices.tablestore.core.protocol.Index" + + "Options\022\020\n\010analyzer\030\004 \001(\t\022\r\n\005index\030\005 \001(\010" + + "\022\024\n\014sort_and_agg\030\006 \001(\010\022\r\n\005store\030\007 \001(\010\022V\n" + + "\rfield_schemas\030\010 \003(\0132?.com.alicloud.open" + + "services.tablestore.core.protocol.FieldS" + + "chema\022\020\n\010is_array\030\t \001(\010\022\032\n\022analyzer_para" + + "meter\030\n \001(\014\022\030\n\020is_virtual_field\030\013 \001(\010\022\032\n", + "\022source_field_names\030\014 \003(\t\"\214\002\n\013IndexSchem" + + "a\022V\n\rfield_schemas\030\001 \003(\0132?.com.alicloud." + + "openservices.tablestore.core.protocol.Fi" + + "eldSchema\022W\n\rindex_setting\030\002 \001(\0132@.com.a" + + "licloud.openservices.tablestore.core.pro" + + "tocol.IndexSetting\022L\n\nindex_sort\030\003 \001(\01328" + + ".com.alicloud.openservices.tablestore.co" + + "re.protocol.Sort\"`\n\014IndexSetting\022\030\n\020numb" + + "er_of_shards\030\001 \001(\005\022\026\n\016routing_fields\030\002 \003" + + "(\t\022\036\n\026routing_partition_size\030\003 \001(\005\"\304\001\n\030C", + "reateSearchIndexRequest\022\022\n\ntable_name\030\001 " + + "\002(\t\022\022\n\nindex_name\030\002 \002(\t\022O\n\006schema\030\003 \001(\0132" + + "?.com.alicloud.openservices.tablestore.c" + + "ore.protocol.IndexSchema\022\031\n\021source_index" + + "_name\030\004 \001(\t\022\024\n\014time_to_live\030\005 \001(\005\"\033\n\031Cre" + + "ateSearchIndexResponse\"5\n\017QueryFlowWeigh" + + "t\022\022\n\nindex_name\030\001 \001(\t\022\016\n\006weight\030\002 \001(\005\"\323\001" + + "\n\030UpdateSearchIndexRequest\022\022\n\ntable_name" + + "\030\001 \001(\t\022\022\n\nindex_name\030\002 \001(\t\022\031\n\021switch_ind" + + "ex_name\030\003 \001(\t\022^\n\021query_flow_weight\030\004 \003(\013", + "2C.com.alicloud.openservices.tablestore." + + "core.protocol.QueryFlowWeight\022\024\n\014time_to" + + "_live\030\005 \001(\005\"\033\n\031UpdateSearchIndexResponse" + + "\"3\n\tIndexInfo\022\022\n\ntable_name\030\001 \001(\t\022\022\n\nind" + + "ex_name\030\002 \001(\t\",\n\026ListSearchIndexRequest\022" + + "\022\n\ntable_name\030\001 \001(\t\"i\n\027ListSearchIndexRe" + + "sponse\022N\n\007indices\030\001 \003(\0132=.com.alicloud.o" + + "penservices.tablestore.core.protocol.Ind" + + "exInfo\"B\n\030DeleteSearchIndexRequest\022\022\n\nta" + + "ble_name\030\001 \001(\t\022\022\n\nindex_name\030\002 \001(\t\"\033\n\031De", + "leteSearchIndexResponse\"}\n\010SyncStat\022Q\n\ns" + + "ync_phase\030\001 \001(\0162=.com.alicloud.openservi" + + "ces.tablestore.core.protocol.SyncPhase\022\036" + + "\n\026current_sync_timestamp\030\002 \001(\003\"d\n\014Meteri" + + "ngInfo\022\024\n\014storage_size\030\001 \001(\003\022\021\n\trow_coun" + + "t\030\002 \001(\003\022\030\n\020reserved_read_cu\030\003 \001(\003\022\021\n\ttim" + + "estamp\030\004 \001(\003\"D\n\032DescribeSearchIndexReque" + + "st\022\022\n\ntable_name\030\001 \001(\t\022\022\n\nindex_name\030\002 \001" + + "(\t\"\277\003\n\033DescribeSearchIndexResponse\022O\n\006sc" + + "hema\030\001 \001(\0132?.com.alicloud.openservices.t", + "ablestore.core.protocol.IndexSchema\022O\n\ts" + + "ync_stat\030\002 \001(\0132<.com.alicloud.openservic" + + "es.tablestore.core.protocol.SyncStat\022W\n\r" + + "metering_info\030\003 \001(\0132@.com.alicloud.opens" + + "ervices.tablestore.core.protocol.Meterin" + + "gInfo\022\032\n\022brother_index_name\030\004 \001(\t\022^\n\021que" + + "ry_flow_weight\030\005 \003(\0132C.com.alicloud.open" + + "services.tablestore.core.protocol.QueryF" + + "lowWeight\022\023\n\013create_time\030\006 \001(\003\022\024\n\014time_t" + + "o_live\030\007 \001(\005\"\272\001\n\tScanQuery\022H\n\005query\030\001 \001(", + "\01329.com.alicloud.openservices.tablestore" + + ".core.protocol.Query\022\r\n\005limit\030\002 \001(\005\022\022\n\na" + + "live_time\030\003 \001(\005\022\r\n\005token\030\004 \001(\014\022\033\n\023curren" + + "t_parallel_id\030\005 \001(\005\022\024\n\014max_parallel\030\006 \001(" + + "\005\"\222\002\n\023ParallelScanRequest\022\022\n\ntable_name\030" + + "\001 \001(\t\022\022\n\nindex_name\030\002 \001(\t\022X\n\016columns_to_" + + "get\030\003 \001(\0132@.com.alicloud.openservices.ta" + + "blestore.core.protocol.ColumnsToGet\022\022\n\ns" + + "ession_id\030\004 \001(\014\022Q\n\nscan_query\030\005 \001(\0132=.co" + + "m.alicloud.openservices.tablestore.core.", + "protocol.ScanQuery\022\022\n\ntimeout_ms\030\006 \001(\005\"8" + + "\n\024ParallelScanResponse\022\014\n\004rows\030\001 \003(\014\022\022\n\n" + + "next_token\030\002 \001(\014*\226\002\n\007AggType\022\013\n\007AVG_AGG\020" + + "\001\022\023\n\017CARDINALITY_AGG\020\002\022\013\n\007MAX_AGG\020\003\022\013\n\007M" + + "IN_AGG\020\004\022\013\n\007SUM_AGG\020\005\022\r\n\tTERMS_AGG\020\006\022\016\n\n" + + "FILTER_AGG\020\007\022\016\n\nNESTED_AGG\020\010\022\022\n\016GEO_BOUN" + + "DS_AGG\020\t\022\024\n\020GEO_DISTANCE_AGG\020\n\022\r\n\tSTATS_" + + "AGG\020\013\022\026\n\022EXTENDED_STATS_AGG\020\014\022\023\n\017PERCENT" + + "ILES_AGG\020\r\022\030\n\024PERCENTILE_RANKS_AGG\020\016\022\023\n\017" + + "VALUE_COUNT_AGG\020\017*\223\001\n\017AggregationType\022\013\n", + "\007AGG_AVG\020\001\022\026\n\022AGG_DISTINCT_COUNT\020\006\022\013\n\007AG" + + "G_MAX\020\002\022\013\n\007AGG_MIN\020\003\022\013\n\007AGG_SUM\020\004\022\r\n\tAGG" + + "_COUNT\020\005\022\020\n\014AGG_TOP_ROWS\020\007\022\023\n\017AGG_PERCEN" + + "TILES\020\010*}\n\013GroupByType\022\022\n\016GROUP_BY_FIELD" + + "\020\001\022\022\n\016GROUP_BY_RANGE\020\002\022\023\n\017GROUP_BY_FILTE" + + "R\020\003\022\031\n\025GROUP_BY_GEO_DISTANCE\020\004\022\026\n\022GROUP_" + + "BY_HISTOGRAM\020\005*\321\002\n\tQueryType\022\017\n\013MATCH_QU" + + "ERY\020\001\022\026\n\022MATCH_PHRASE_QUERY\020\002\022\016\n\nTERM_QU" + + "ERY\020\003\022\017\n\013RANGE_QUERY\020\004\022\020\n\014PREFIX_QUERY\020\005" + + "\022\016\n\nBOOL_QUERY\020\006\022\025\n\021CONST_SCORE_QUERY\020\007\022", + "\030\n\024FUNCTION_SCORE_QUERY\020\010\022\020\n\014NESTED_QUER" + + "Y\020\t\022\022\n\016WILDCARD_QUERY\020\n\022\023\n\017MATCH_ALL_QUE" + + "RY\020\013\022\032\n\026GEO_BOUNDING_BOX_QUERY\020\014\022\026\n\022GEO_" + + "DISTANCE_QUERY\020\r\022\025\n\021GEO_POLYGON_QUERY\020\016\022" + + "\017\n\013TERMS_QUERY\020\017\022\020\n\014EXISTS_QUERY\020\020* \n\rQu" + + "eryOperator\022\006\n\002OR\020\001\022\007\n\003AND\020\002*r\n\tScoreMod" + + "e\022\023\n\017SCORE_MODE_NONE\020\001\022\022\n\016SCORE_MODE_AVG" + + "\020\002\022\022\n\016SCORE_MODE_MAX\020\003\022\024\n\020SCORE_MODE_TOT" + + "AL\020\004\022\022\n\016SCORE_MODE_MIN\020\005*4\n\tSortOrder\022\022\n" + + "\016SORT_ORDER_ASC\020\000\022\023\n\017SORT_ORDER_DESC\020\001*C", + "\n\010SortMode\022\021\n\rSORT_MODE_MIN\020\000\022\021\n\rSORT_MO" + + "DE_MAX\020\001\022\021\n\rSORT_MODE_AVG\020\002*?\n\017GeoDistan" + + "ceType\022\024\n\020GEO_DISTANCE_ARC\020\000\022\026\n\022GEO_DIST" + + "ANCE_PLANE\020\001*d\n\020ColumnReturnType\022\016\n\nRETU" + + "RN_ALL\020\001\022\024\n\020RETURN_SPECIFIED\020\002\022\017\n\013RETURN" + + "_NONE\020\003\022\031\n\025RETURN_ALL_FROM_INDEX\020\004*?\n\014In" + + "dexOptions\022\010\n\004DOCS\020\001\022\t\n\005FREQS\020\002\022\r\n\tPOSIT" + + "IONS\020\003\022\013\n\007OFFSETS\020\004*`\n\tFieldType\022\010\n\004LONG" + + "\020\001\022\n\n\006DOUBLE\020\002\022\013\n\007BOOLEAN\020\003\022\013\n\007KEYWORD\020\004" + + "\022\010\n\004TEXT\020\005\022\n\n\006NESTED\020\006\022\r\n\tGEO_POINT\020\007*\037\n", + "\tSyncPhase\022\010\n\004FULL\020\001\022\010\n\004INCR\020\002" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { public com.google.protobuf.ExtensionRegistry assignDescriptors( com.google.protobuf.Descriptors.FileDescriptor root) { descriptor = root; - internal_static_com_alicloud_openservices_tablestore_core_protocol_MatchQuery_descriptor = + internal_static_com_alicloud_openservices_tablestore_core_protocol_AvgAgg_descriptor = getDescriptor().getMessageTypes().get(0); + internal_static_com_alicloud_openservices_tablestore_core_protocol_AvgAgg_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_AvgAgg_descriptor, + new java.lang.String[] { "FieldName", "Missing", }, + com.alicloud.openservices.tablestore.core.protocol.Search.AvgAgg.class, + com.alicloud.openservices.tablestore.core.protocol.Search.AvgAgg.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_CardinalityAgg_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_com_alicloud_openservices_tablestore_core_protocol_CardinalityAgg_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_CardinalityAgg_descriptor, + new java.lang.String[] { "FieldName", }, + com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAgg.class, + com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAgg.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_MaxAgg_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_com_alicloud_openservices_tablestore_core_protocol_MaxAgg_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_MaxAgg_descriptor, + new java.lang.String[] { "FieldName", "Missing", }, + com.alicloud.openservices.tablestore.core.protocol.Search.MaxAgg.class, + com.alicloud.openservices.tablestore.core.protocol.Search.MaxAgg.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_MinAgg_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_com_alicloud_openservices_tablestore_core_protocol_MinAgg_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_MinAgg_descriptor, + new java.lang.String[] { "FieldName", "Missing", }, + com.alicloud.openservices.tablestore.core.protocol.Search.MinAgg.class, + com.alicloud.openservices.tablestore.core.protocol.Search.MinAgg.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_SumAgg_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_com_alicloud_openservices_tablestore_core_protocol_SumAgg_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_SumAgg_descriptor, + new java.lang.String[] { "FieldName", "Missing", }, + com.alicloud.openservices.tablestore.core.protocol.Search.SumAgg.class, + com.alicloud.openservices.tablestore.core.protocol.Search.SumAgg.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_TermsAgg_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_com_alicloud_openservices_tablestore_core_protocol_TermsAgg_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_TermsAgg_descriptor, + new java.lang.String[] { "FieldName", "Size", "Agg", }, + com.alicloud.openservices.tablestore.core.protocol.Search.TermsAgg.class, + com.alicloud.openservices.tablestore.core.protocol.Search.TermsAgg.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_FilterAgg_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_com_alicloud_openservices_tablestore_core_protocol_FilterAgg_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_FilterAgg_descriptor, + new java.lang.String[] { "Filter", "Agg", }, + com.alicloud.openservices.tablestore.core.protocol.Search.FilterAgg.class, + com.alicloud.openservices.tablestore.core.protocol.Search.FilterAgg.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_NestedPath_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_com_alicloud_openservices_tablestore_core_protocol_NestedPath_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_NestedPath_descriptor, + new java.lang.String[] { "Path", }, + com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath.class, + com.alicloud.openservices.tablestore.core.protocol.Search.NestedPath.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_NestedAgg_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_com_alicloud_openservices_tablestore_core_protocol_NestedAgg_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_NestedAgg_descriptor, + new java.lang.String[] { "NestedPath", "Agg", }, + com.alicloud.openservices.tablestore.core.protocol.Search.NestedAgg.class, + com.alicloud.openservices.tablestore.core.protocol.Search.NestedAgg.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoBoundsAgg_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoBoundsAgg_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoBoundsAgg_descriptor, + new java.lang.String[] { "FieldName", "WrapLongitude", }, + com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAgg.class, + com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAgg.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoDistanceAggRange_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoDistanceAggRange_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoDistanceAggRange_descriptor, + new java.lang.String[] { "Key", "RangeFrom", "RangeTo", }, + com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRange.class, + com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggRange.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoDistanceAgg_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoDistanceAgg_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoDistanceAgg_descriptor, + new java.lang.String[] { "FieldName", "Origin", "Ranges", }, + com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAgg.class, + com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAgg.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_StatsAgg_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_com_alicloud_openservices_tablestore_core_protocol_StatsAgg_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_StatsAgg_descriptor, + new java.lang.String[] { "FieldName", "Missing", }, + com.alicloud.openservices.tablestore.core.protocol.Search.StatsAgg.class, + com.alicloud.openservices.tablestore.core.protocol.Search.StatsAgg.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_ExtendedStatsAgg_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_com_alicloud_openservices_tablestore_core_protocol_ExtendedStatsAgg_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_ExtendedStatsAgg_descriptor, + new java.lang.String[] { "FieldName", "Missing", }, + com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAgg.class, + com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAgg.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentilesAgg_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentilesAgg_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentilesAgg_descriptor, + new java.lang.String[] { "FieldName", "Percents", "Missing", }, + com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAgg.class, + com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAgg.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentileRanksAgg_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentileRanksAgg_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentileRanksAgg_descriptor, + new java.lang.String[] { "FieldName", "Values", "Missing", }, + com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAgg.class, + com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAgg.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_ValueCountAgg_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_com_alicloud_openservices_tablestore_core_protocol_ValueCountAgg_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_ValueCountAgg_descriptor, + new java.lang.String[] { "FieldName", }, + com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAgg.class, + com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAgg.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_AggClause_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_com_alicloud_openservices_tablestore_core_protocol_AggClause_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_AggClause_descriptor, + new java.lang.String[] { "AggName", "AggType", "AggBody", }, + com.alicloud.openservices.tablestore.core.protocol.Search.AggClause.class, + com.alicloud.openservices.tablestore.core.protocol.Search.AggClause.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_Agg_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_com_alicloud_openservices_tablestore_core_protocol_Agg_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_Agg_descriptor, + new java.lang.String[] { "AggClause", }, + com.alicloud.openservices.tablestore.core.protocol.Search.Agg.class, + com.alicloud.openservices.tablestore.core.protocol.Search.Agg.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_AvgAggResult_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_com_alicloud_openservices_tablestore_core_protocol_AvgAggResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_AvgAggResult_descriptor, + new java.lang.String[] { "Value", }, + com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggResult.class, + com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggResult.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_MaxAggResult_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_com_alicloud_openservices_tablestore_core_protocol_MaxAggResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_MaxAggResult_descriptor, + new java.lang.String[] { "Value", }, + com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggResult.class, + com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggResult.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_MinAggResult_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_com_alicloud_openservices_tablestore_core_protocol_MinAggResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_MinAggResult_descriptor, + new java.lang.String[] { "Value", }, + com.alicloud.openservices.tablestore.core.protocol.Search.MinAggResult.class, + com.alicloud.openservices.tablestore.core.protocol.Search.MinAggResult.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_SumAggResult_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_com_alicloud_openservices_tablestore_core_protocol_SumAggResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_SumAggResult_descriptor, + new java.lang.String[] { "Value", }, + com.alicloud.openservices.tablestore.core.protocol.Search.SumAggResult.class, + com.alicloud.openservices.tablestore.core.protocol.Search.SumAggResult.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_CardinalityAggResult_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_com_alicloud_openservices_tablestore_core_protocol_CardinalityAggResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_CardinalityAggResult_descriptor, + new java.lang.String[] { "Value", }, + com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAggResult.class, + com.alicloud.openservices.tablestore.core.protocol.Search.CardinalityAggResult.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_Bucket_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_com_alicloud_openservices_tablestore_core_protocol_Bucket_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_Bucket_descriptor, + new java.lang.String[] { "Key", "DocCount", "AggResult", }, + com.alicloud.openservices.tablestore.core.protocol.Search.Bucket.class, + com.alicloud.openservices.tablestore.core.protocol.Search.Bucket.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_TermsAggResult_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_com_alicloud_openservices_tablestore_core_protocol_TermsAggResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_TermsAggResult_descriptor, + new java.lang.String[] { "DocCountErrorUpperBound", "SumOfOtherDocCount", "Bucket", }, + com.alicloud.openservices.tablestore.core.protocol.Search.TermsAggResult.class, + com.alicloud.openservices.tablestore.core.protocol.Search.TermsAggResult.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_FilterAggResult_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_com_alicloud_openservices_tablestore_core_protocol_FilterAggResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_FilterAggResult_descriptor, + new java.lang.String[] { "DocCount", "AggResult", }, + com.alicloud.openservices.tablestore.core.protocol.Search.FilterAggResult.class, + com.alicloud.openservices.tablestore.core.protocol.Search.FilterAggResult.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_NestedAggResult_descriptor = + getDescriptor().getMessageTypes().get(27); + internal_static_com_alicloud_openservices_tablestore_core_protocol_NestedAggResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_NestedAggResult_descriptor, + new java.lang.String[] { "DocCount", "AggResult", }, + com.alicloud.openservices.tablestore.core.protocol.Search.NestedAggResult.class, + com.alicloud.openservices.tablestore.core.protocol.Search.NestedAggResult.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoPoint_descriptor = + getDescriptor().getMessageTypes().get(28); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoPoint_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoPoint_descriptor, + new java.lang.String[] { "Lat", "Lon", }, + com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint.class, + com.alicloud.openservices.tablestore.core.protocol.Search.GeoPoint.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoBoundsAggResult_descriptor = + getDescriptor().getMessageTypes().get(29); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoBoundsAggResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoBoundsAggResult_descriptor, + new java.lang.String[] { "TopLeft", "BottomRight", }, + com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAggResult.class, + com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundsAggResult.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_RangeBucket_descriptor = + getDescriptor().getMessageTypes().get(30); + internal_static_com_alicloud_openservices_tablestore_core_protocol_RangeBucket_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_RangeBucket_descriptor, + new java.lang.String[] { "Key", "RangeFrom", "RangeTo", "DocCount", }, + com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucket.class, + com.alicloud.openservices.tablestore.core.protocol.Search.RangeBucket.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoDistanceAggResult_descriptor = + getDescriptor().getMessageTypes().get(31); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoDistanceAggResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoDistanceAggResult_descriptor, + new java.lang.String[] { "Bucket", }, + com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggResult.class, + com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceAggResult.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_StatsAggResult_descriptor = + getDescriptor().getMessageTypes().get(32); + internal_static_com_alicloud_openservices_tablestore_core_protocol_StatsAggResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_StatsAggResult_descriptor, + new java.lang.String[] { "Count", "Min", "Max", "Avg", "Sum", }, + com.alicloud.openservices.tablestore.core.protocol.Search.StatsAggResult.class, + com.alicloud.openservices.tablestore.core.protocol.Search.StatsAggResult.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_ExtendedStatsAggResult_descriptor = + getDescriptor().getMessageTypes().get(33); + internal_static_com_alicloud_openservices_tablestore_core_protocol_ExtendedStatsAggResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_ExtendedStatsAggResult_descriptor, + new java.lang.String[] { "Count", "Min", "Max", "Avg", "Sum", "SumOfSquares", "Variance", "StdDeviation", "StdDeviationBoundsUpper", "StdDeviationBoundsLower", }, + com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAggResult.class, + com.alicloud.openservices.tablestore.core.protocol.Search.ExtendedStatsAggResult.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_Percentile_descriptor = + getDescriptor().getMessageTypes().get(34); + internal_static_com_alicloud_openservices_tablestore_core_protocol_Percentile_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_Percentile_descriptor, + new java.lang.String[] { "Percent", "Value", }, + com.alicloud.openservices.tablestore.core.protocol.Search.Percentile.class, + com.alicloud.openservices.tablestore.core.protocol.Search.Percentile.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentilesAggResult_descriptor = + getDescriptor().getMessageTypes().get(35); + internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentilesAggResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentilesAggResult_descriptor, + new java.lang.String[] { "Percentiles", }, + com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggResult.class, + com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggResult.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentileRanksAggResult_descriptor = + getDescriptor().getMessageTypes().get(36); + internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentileRanksAggResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentileRanksAggResult_descriptor, + new java.lang.String[] { "Percentiles", }, + com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAggResult.class, + com.alicloud.openservices.tablestore.core.protocol.Search.PercentileRanksAggResult.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_ValueCountAggResult_descriptor = + getDescriptor().getMessageTypes().get(37); + internal_static_com_alicloud_openservices_tablestore_core_protocol_ValueCountAggResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_ValueCountAggResult_descriptor, + new java.lang.String[] { "Count", }, + com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAggResult.class, + com.alicloud.openservices.tablestore.core.protocol.Search.ValueCountAggResult.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_SubAggResult_descriptor = + getDescriptor().getMessageTypes().get(38); + internal_static_com_alicloud_openservices_tablestore_core_protocol_SubAggResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_SubAggResult_descriptor, + new java.lang.String[] { "Name", "Type", "AggResult", }, + com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResult.class, + com.alicloud.openservices.tablestore.core.protocol.Search.SubAggResult.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_AggResult_descriptor = + getDescriptor().getMessageTypes().get(39); + internal_static_com_alicloud_openservices_tablestore_core_protocol_AggResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_AggResult_descriptor, + new java.lang.String[] { "SubAggResults", }, + com.alicloud.openservices.tablestore.core.protocol.Search.AggResult.class, + com.alicloud.openservices.tablestore.core.protocol.Search.AggResult.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_Aggregation_descriptor = + getDescriptor().getMessageTypes().get(40); + internal_static_com_alicloud_openservices_tablestore_core_protocol_Aggregation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_Aggregation_descriptor, + new java.lang.String[] { "Name", "Type", "Body", }, + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregation.class, + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregation.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_Aggregations_descriptor = + getDescriptor().getMessageTypes().get(41); + internal_static_com_alicloud_openservices_tablestore_core_protocol_Aggregations_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_Aggregations_descriptor, + new java.lang.String[] { "Aggs", }, + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.class, + com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupBy_descriptor = + getDescriptor().getMessageTypes().get(42); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupBy_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupBy_descriptor, + new java.lang.String[] { "Name", "Type", "Body", }, + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBy.class, + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBy.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupBys_descriptor = + getDescriptor().getMessageTypes().get(43); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupBys_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupBys_descriptor, + new java.lang.String[] { "GroupBys", }, + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.class, + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_AvgAggregation_descriptor = + getDescriptor().getMessageTypes().get(44); + internal_static_com_alicloud_openservices_tablestore_core_protocol_AvgAggregation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_AvgAggregation_descriptor, + new java.lang.String[] { "FieldName", "Missing", }, + com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregation.class, + com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregation.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_MaxAggregation_descriptor = + getDescriptor().getMessageTypes().get(45); + internal_static_com_alicloud_openservices_tablestore_core_protocol_MaxAggregation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_MaxAggregation_descriptor, + new java.lang.String[] { "FieldName", "Missing", }, + com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregation.class, + com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregation.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_MinAggregation_descriptor = + getDescriptor().getMessageTypes().get(46); + internal_static_com_alicloud_openservices_tablestore_core_protocol_MinAggregation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_MinAggregation_descriptor, + new java.lang.String[] { "FieldName", "Missing", }, + com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregation.class, + com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregation.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_SumAggregation_descriptor = + getDescriptor().getMessageTypes().get(47); + internal_static_com_alicloud_openservices_tablestore_core_protocol_SumAggregation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_SumAggregation_descriptor, + new java.lang.String[] { "FieldName", "Missing", }, + com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregation.class, + com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregation.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_CountAggregation_descriptor = + getDescriptor().getMessageTypes().get(48); + internal_static_com_alicloud_openservices_tablestore_core_protocol_CountAggregation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_CountAggregation_descriptor, + new java.lang.String[] { "FieldName", }, + com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregation.class, + com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregation.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_DistinctCountAggregation_descriptor = + getDescriptor().getMessageTypes().get(49); + internal_static_com_alicloud_openservices_tablestore_core_protocol_DistinctCountAggregation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_DistinctCountAggregation_descriptor, + new java.lang.String[] { "FieldName", "Missing", }, + com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregation.class, + com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregation.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_TopRowsAggregation_descriptor = + getDescriptor().getMessageTypes().get(50); + internal_static_com_alicloud_openservices_tablestore_core_protocol_TopRowsAggregation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_TopRowsAggregation_descriptor, + new java.lang.String[] { "Limit", "Sort", }, + com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregation.class, + com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregation.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentilesAggregation_descriptor = + getDescriptor().getMessageTypes().get(51); + internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentilesAggregation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentilesAggregation_descriptor, + new java.lang.String[] { "FieldName", "Percentiles", "Missing", }, + com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregation.class, + com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregation.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_FieldRange_descriptor = + getDescriptor().getMessageTypes().get(52); + internal_static_com_alicloud_openservices_tablestore_core_protocol_FieldRange_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_FieldRange_descriptor, + new java.lang.String[] { "Min", "Max", }, + com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange.class, + com.alicloud.openservices.tablestore.core.protocol.Search.FieldRange.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByHistogram_descriptor = + getDescriptor().getMessageTypes().get(53); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByHistogram_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByHistogram_descriptor, + new java.lang.String[] { "FieldName", "Interval", "Missing", "MinDocCount", "Sort", "FieldRange", "SubAggs", "SubGroupBys", }, + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogram.class, + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogram.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupKeySort_descriptor = + getDescriptor().getMessageTypes().get(54); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupKeySort_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupKeySort_descriptor, + new java.lang.String[] { "Order", }, + com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort.class, + com.alicloud.openservices.tablestore.core.protocol.Search.GroupKeySort.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_RowCountSort_descriptor = + getDescriptor().getMessageTypes().get(55); + internal_static_com_alicloud_openservices_tablestore_core_protocol_RowCountSort_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_RowCountSort_descriptor, + new java.lang.String[] { "Order", }, + com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort.class, + com.alicloud.openservices.tablestore.core.protocol.Search.RowCountSort.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_SubAggSort_descriptor = + getDescriptor().getMessageTypes().get(56); + internal_static_com_alicloud_openservices_tablestore_core_protocol_SubAggSort_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_SubAggSort_descriptor, + new java.lang.String[] { "SubAggName", "Order", }, + com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort.class, + com.alicloud.openservices.tablestore.core.protocol.Search.SubAggSort.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupBySorter_descriptor = + getDescriptor().getMessageTypes().get(57); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupBySorter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupBySorter_descriptor, + new java.lang.String[] { "GroupKeySort", "RowCountSort", "SubAggSort", }, + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorter.class, + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySorter.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupBySort_descriptor = + getDescriptor().getMessageTypes().get(58); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupBySort_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupBySort_descriptor, + new java.lang.String[] { "Sorters", }, + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort.class, + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByField_descriptor = + getDescriptor().getMessageTypes().get(59); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByField_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByField_descriptor, + new java.lang.String[] { "FieldName", "Size", "Sort", "SubAggs", "SubGroupBys", "MinDocCount", }, + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByField.class, + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByField.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_Range_descriptor = + getDescriptor().getMessageTypes().get(60); + internal_static_com_alicloud_openservices_tablestore_core_protocol_Range_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_Range_descriptor, + new java.lang.String[] { "From", "To", }, + com.alicloud.openservices.tablestore.core.protocol.Search.Range.class, + com.alicloud.openservices.tablestore.core.protocol.Search.Range.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByRange_descriptor = + getDescriptor().getMessageTypes().get(61); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByRange_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByRange_descriptor, + new java.lang.String[] { "FieldName", "Ranges", "SubAggs", "SubGroupBys", }, + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRange.class, + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRange.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByFilter_descriptor = + getDescriptor().getMessageTypes().get(62); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByFilter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByFilter_descriptor, + new java.lang.String[] { "Filters", "SubAggs", "SubGroupBys", }, + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilter.class, + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilter.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByGeoDistance_descriptor = + getDescriptor().getMessageTypes().get(63); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByGeoDistance_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByGeoDistance_descriptor, + new java.lang.String[] { "FieldName", "Origin", "Ranges", "SubAggs", "SubGroupBys", }, + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistance.class, + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistance.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_AvgAggregationResult_descriptor = + getDescriptor().getMessageTypes().get(64); + internal_static_com_alicloud_openservices_tablestore_core_protocol_AvgAggregationResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_AvgAggregationResult_descriptor, + new java.lang.String[] { "Value", }, + com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregationResult.class, + com.alicloud.openservices.tablestore.core.protocol.Search.AvgAggregationResult.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_TopRowsAggregationResult_descriptor = + getDescriptor().getMessageTypes().get(65); + internal_static_com_alicloud_openservices_tablestore_core_protocol_TopRowsAggregationResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_TopRowsAggregationResult_descriptor, + new java.lang.String[] { "Rows", }, + com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregationResult.class, + com.alicloud.openservices.tablestore.core.protocol.Search.TopRowsAggregationResult.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentilesAggregationItem_descriptor = + getDescriptor().getMessageTypes().get(66); + internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentilesAggregationItem_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentilesAggregationItem_descriptor, + new java.lang.String[] { "Key", "Value", }, + com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItem.class, + com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationItem.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentilesAggregationResult_descriptor = + getDescriptor().getMessageTypes().get(67); + internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentilesAggregationResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_PercentilesAggregationResult_descriptor, + new java.lang.String[] { "PercentilesAggregationItems", }, + com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationResult.class, + com.alicloud.openservices.tablestore.core.protocol.Search.PercentilesAggregationResult.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_DistinctCountAggregationResult_descriptor = + getDescriptor().getMessageTypes().get(68); + internal_static_com_alicloud_openservices_tablestore_core_protocol_DistinctCountAggregationResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_DistinctCountAggregationResult_descriptor, + new java.lang.String[] { "Value", }, + com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregationResult.class, + com.alicloud.openservices.tablestore.core.protocol.Search.DistinctCountAggregationResult.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_MaxAggregationResult_descriptor = + getDescriptor().getMessageTypes().get(69); + internal_static_com_alicloud_openservices_tablestore_core_protocol_MaxAggregationResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_MaxAggregationResult_descriptor, + new java.lang.String[] { "Value", }, + com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregationResult.class, + com.alicloud.openservices.tablestore.core.protocol.Search.MaxAggregationResult.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_MinAggregationResult_descriptor = + getDescriptor().getMessageTypes().get(70); + internal_static_com_alicloud_openservices_tablestore_core_protocol_MinAggregationResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_MinAggregationResult_descriptor, + new java.lang.String[] { "Value", }, + com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregationResult.class, + com.alicloud.openservices.tablestore.core.protocol.Search.MinAggregationResult.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_SumAggregationResult_descriptor = + getDescriptor().getMessageTypes().get(71); + internal_static_com_alicloud_openservices_tablestore_core_protocol_SumAggregationResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_SumAggregationResult_descriptor, + new java.lang.String[] { "Value", }, + com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregationResult.class, + com.alicloud.openservices.tablestore.core.protocol.Search.SumAggregationResult.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_CountAggregationResult_descriptor = + getDescriptor().getMessageTypes().get(72); + internal_static_com_alicloud_openservices_tablestore_core_protocol_CountAggregationResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_CountAggregationResult_descriptor, + new java.lang.String[] { "Value", }, + com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregationResult.class, + com.alicloud.openservices.tablestore.core.protocol.Search.CountAggregationResult.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_AggregationResult_descriptor = + getDescriptor().getMessageTypes().get(73); + internal_static_com_alicloud_openservices_tablestore_core_protocol_AggregationResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_AggregationResult_descriptor, + new java.lang.String[] { "Name", "Type", "AggResult", }, + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResult.class, + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationResult.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_AggregationsResult_descriptor = + getDescriptor().getMessageTypes().get(74); + internal_static_com_alicloud_openservices_tablestore_core_protocol_AggregationsResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_AggregationsResult_descriptor, + new java.lang.String[] { "AggResults", }, + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.class, + com.alicloud.openservices.tablestore.core.protocol.Search.AggregationsResult.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByFieldResultItem_descriptor = + getDescriptor().getMessageTypes().get(75); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByFieldResultItem_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByFieldResultItem_descriptor, + new java.lang.String[] { "Key", "RowCount", "SubAggsResult", "SubGroupBysResult", }, + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItem.class, + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResultItem.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByFieldResult_descriptor = + getDescriptor().getMessageTypes().get(76); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByFieldResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByFieldResult_descriptor, + new java.lang.String[] { "GroupByFieldResultItems", }, + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResult.class, + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFieldResult.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByRangeResultItem_descriptor = + getDescriptor().getMessageTypes().get(77); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByRangeResultItem_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByRangeResultItem_descriptor, + new java.lang.String[] { "From", "To", "RowCount", "SubAggsResult", "SubGroupBysResult", }, + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItem.class, + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResultItem.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByRangeResult_descriptor = + getDescriptor().getMessageTypes().get(78); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByRangeResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByRangeResult_descriptor, + new java.lang.String[] { "GroupByRangeResultItems", }, + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResult.class, + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByRangeResult.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByGeoDistanceResultItem_descriptor = + getDescriptor().getMessageTypes().get(79); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByGeoDistanceResultItem_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByGeoDistanceResultItem_descriptor, + new java.lang.String[] { "From", "To", "RowCount", "SubAggsResult", "SubGroupBysResult", }, + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItem.class, + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResultItem.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByGeoDistanceResult_descriptor = + getDescriptor().getMessageTypes().get(80); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByGeoDistanceResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByGeoDistanceResult_descriptor, + new java.lang.String[] { "GroupByGeoDistanceResultItems", }, + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResult.class, + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByGeoDistanceResult.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByFilterResultItem_descriptor = + getDescriptor().getMessageTypes().get(81); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByFilterResultItem_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByFilterResultItem_descriptor, + new java.lang.String[] { "RowCount", "SubAggsResult", "SubGroupBysResult", }, + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItem.class, + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResultItem.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByFilterResult_descriptor = + getDescriptor().getMessageTypes().get(82); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByFilterResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByFilterResult_descriptor, + new java.lang.String[] { "GroupByFilterResultItems", }, + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResult.class, + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByFilterResult.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByResult_descriptor = + getDescriptor().getMessageTypes().get(83); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByResult_descriptor, + new java.lang.String[] { "Name", "Type", "GroupByResult", }, + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResult.class, + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByResult.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupBysResult_descriptor = + getDescriptor().getMessageTypes().get(84); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupBysResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupBysResult_descriptor, + new java.lang.String[] { "GroupByResults", }, + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.class, + com.alicloud.openservices.tablestore.core.protocol.Search.GroupBysResult.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByHistogramItem_descriptor = + getDescriptor().getMessageTypes().get(85); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByHistogramItem_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByHistogramItem_descriptor, + new java.lang.String[] { "Key", "Value", "SubAggsResult", "SubGroupBysResult", }, + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItem.class, + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramItem.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByHistogramResult_descriptor = + getDescriptor().getMessageTypes().get(86); + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByHistogramResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_GroupByHistogramResult_descriptor, + new java.lang.String[] { "GroupByHistograItems", }, + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramResult.class, + com.alicloud.openservices.tablestore.core.protocol.Search.GroupByHistogramResult.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_MatchQuery_descriptor = + getDescriptor().getMessageTypes().get(87); internal_static_com_alicloud_openservices_tablestore_core_protocol_MatchQuery_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_MatchQuery_descriptor, - new java.lang.String[] { "FieldName", "Text", "MinimumShouldMatch", "Operator", }, + new java.lang.String[] { "FieldName", "Text", "MinimumShouldMatch", "Operator", "Weight", }, com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery.class, com.alicloud.openservices.tablestore.core.protocol.Search.MatchQuery.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_MatchPhraseQuery_descriptor = - getDescriptor().getMessageTypes().get(1); + getDescriptor().getMessageTypes().get(88); internal_static_com_alicloud_openservices_tablestore_core_protocol_MatchPhraseQuery_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_MatchPhraseQuery_descriptor, - new java.lang.String[] { "FieldName", "Text", }, + new java.lang.String[] { "FieldName", "Text", "Weight", }, com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery.class, com.alicloud.openservices.tablestore.core.protocol.Search.MatchPhraseQuery.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_MatchAllQuery_descriptor = - getDescriptor().getMessageTypes().get(2); + getDescriptor().getMessageTypes().get(89); internal_static_com_alicloud_openservices_tablestore_core_protocol_MatchAllQuery_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_MatchAllQuery_descriptor, @@ -25146,23 +78839,23 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery.class, com.alicloud.openservices.tablestore.core.protocol.Search.MatchAllQuery.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_TermQuery_descriptor = - getDescriptor().getMessageTypes().get(3); + getDescriptor().getMessageTypes().get(90); internal_static_com_alicloud_openservices_tablestore_core_protocol_TermQuery_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_TermQuery_descriptor, - new java.lang.String[] { "FieldName", "Term", }, + new java.lang.String[] { "FieldName", "Term", "Weight", }, com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery.class, com.alicloud.openservices.tablestore.core.protocol.Search.TermQuery.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_TermsQuery_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageTypes().get(91); internal_static_com_alicloud_openservices_tablestore_core_protocol_TermsQuery_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_TermsQuery_descriptor, - new java.lang.String[] { "FieldName", "Terms", }, + new java.lang.String[] { "FieldName", "Terms", "Weight", }, com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery.class, com.alicloud.openservices.tablestore.core.protocol.Search.TermsQuery.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_RangeQuery_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageTypes().get(92); internal_static_com_alicloud_openservices_tablestore_core_protocol_RangeQuery_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_RangeQuery_descriptor, @@ -25170,23 +78863,23 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery.class, com.alicloud.openservices.tablestore.core.protocol.Search.RangeQuery.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_PrefixQuery_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageTypes().get(93); internal_static_com_alicloud_openservices_tablestore_core_protocol_PrefixQuery_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_PrefixQuery_descriptor, - new java.lang.String[] { "FieldName", "Prefix", }, + new java.lang.String[] { "FieldName", "Prefix", "Weight", }, com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery.class, com.alicloud.openservices.tablestore.core.protocol.Search.PrefixQuery.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_WildcardQuery_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(94); internal_static_com_alicloud_openservices_tablestore_core_protocol_WildcardQuery_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_WildcardQuery_descriptor, - new java.lang.String[] { "FieldName", "Value", }, + new java.lang.String[] { "FieldName", "Value", "Weight", }, com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery.class, com.alicloud.openservices.tablestore.core.protocol.Search.WildcardQuery.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_BoolQuery_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageTypes().get(95); internal_static_com_alicloud_openservices_tablestore_core_protocol_BoolQuery_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_BoolQuery_descriptor, @@ -25194,7 +78887,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery.class, com.alicloud.openservices.tablestore.core.protocol.Search.BoolQuery.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_ConstScoreQuery_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(96); internal_static_com_alicloud_openservices_tablestore_core_protocol_ConstScoreQuery_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_ConstScoreQuery_descriptor, @@ -25202,7 +78895,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery.class, com.alicloud.openservices.tablestore.core.protocol.Search.ConstScoreQuery.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_FieldValueFactor_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(97); internal_static_com_alicloud_openservices_tablestore_core_protocol_FieldValueFactor_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_FieldValueFactor_descriptor, @@ -25210,7 +78903,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor.class, com.alicloud.openservices.tablestore.core.protocol.Search.FieldValueFactor.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_FunctionScoreQuery_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageTypes().get(98); internal_static_com_alicloud_openservices_tablestore_core_protocol_FunctionScoreQuery_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_FunctionScoreQuery_descriptor, @@ -25218,15 +78911,15 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery.class, com.alicloud.openservices.tablestore.core.protocol.Search.FunctionScoreQuery.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_NestedQuery_descriptor = - getDescriptor().getMessageTypes().get(12); + getDescriptor().getMessageTypes().get(99); internal_static_com_alicloud_openservices_tablestore_core_protocol_NestedQuery_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_NestedQuery_descriptor, - new java.lang.String[] { "Path", "Query", "ScoreMode", }, + new java.lang.String[] { "Path", "Query", "ScoreMode", "Weight", }, com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery.class, com.alicloud.openservices.tablestore.core.protocol.Search.NestedQuery.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoBoundingBoxQuery_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageTypes().get(100); internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoBoundingBoxQuery_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoBoundingBoxQuery_descriptor, @@ -25234,7 +78927,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery.class, com.alicloud.openservices.tablestore.core.protocol.Search.GeoBoundingBoxQuery.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoDistanceQuery_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageTypes().get(101); internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoDistanceQuery_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoDistanceQuery_descriptor, @@ -25242,15 +78935,23 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery.class, com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceQuery.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoPolygonQuery_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(102); internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoPolygonQuery_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoPolygonQuery_descriptor, new java.lang.String[] { "FieldName", "Points", }, com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery.class, com.alicloud.openservices.tablestore.core.protocol.Search.GeoPolygonQuery.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_ExistsQuery_descriptor = + getDescriptor().getMessageTypes().get(103); + internal_static_com_alicloud_openservices_tablestore_core_protocol_ExistsQuery_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_ExistsQuery_descriptor, + new java.lang.String[] { "FieldName", }, + com.alicloud.openservices.tablestore.core.protocol.Search.ExistsQuery.class, + com.alicloud.openservices.tablestore.core.protocol.Search.ExistsQuery.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_Query_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(104); internal_static_com_alicloud_openservices_tablestore_core_protocol_Query_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_Query_descriptor, @@ -25258,7 +78959,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.Search.Query.class, com.alicloud.openservices.tablestore.core.protocol.Search.Query.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_Collapse_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageTypes().get(105); internal_static_com_alicloud_openservices_tablestore_core_protocol_Collapse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_Collapse_descriptor, @@ -25266,7 +78967,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.Search.Collapse.class, com.alicloud.openservices.tablestore.core.protocol.Search.Collapse.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_NestedFilter_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageTypes().get(106); internal_static_com_alicloud_openservices_tablestore_core_protocol_NestedFilter_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_NestedFilter_descriptor, @@ -25274,7 +78975,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.class, com.alicloud.openservices.tablestore.core.protocol.Search.NestedFilter.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_ScoreSort_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageTypes().get(107); internal_static_com_alicloud_openservices_tablestore_core_protocol_ScoreSort_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_ScoreSort_descriptor, @@ -25282,7 +78983,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort.class, com.alicloud.openservices.tablestore.core.protocol.Search.ScoreSort.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_PrimaryKeySort_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageTypes().get(108); internal_static_com_alicloud_openservices_tablestore_core_protocol_PrimaryKeySort_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_PrimaryKeySort_descriptor, @@ -25290,15 +78991,15 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort.class, com.alicloud.openservices.tablestore.core.protocol.Search.PrimaryKeySort.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_FieldSort_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageTypes().get(109); internal_static_com_alicloud_openservices_tablestore_core_protocol_FieldSort_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_FieldSort_descriptor, - new java.lang.String[] { "FieldName", "Order", "Mode", "NestedFilter", }, + new java.lang.String[] { "FieldName", "Order", "Mode", "NestedFilter", "Missing", }, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort.class, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSort.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoDistanceSort_descriptor = - getDescriptor().getMessageTypes().get(22); + getDescriptor().getMessageTypes().get(110); internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoDistanceSort_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_GeoDistanceSort_descriptor, @@ -25306,7 +79007,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort.class, com.alicloud.openservices.tablestore.core.protocol.Search.GeoDistanceSort.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_Sorter_descriptor = - getDescriptor().getMessageTypes().get(23); + getDescriptor().getMessageTypes().get(111); internal_static_com_alicloud_openservices_tablestore_core_protocol_Sorter_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_Sorter_descriptor, @@ -25314,7 +79015,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.Search.Sorter.class, com.alicloud.openservices.tablestore.core.protocol.Search.Sorter.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_Sort_descriptor = - getDescriptor().getMessageTypes().get(24); + getDescriptor().getMessageTypes().get(112); internal_static_com_alicloud_openservices_tablestore_core_protocol_Sort_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_Sort_descriptor, @@ -25322,15 +79023,15 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.Search.Sort.class, com.alicloud.openservices.tablestore.core.protocol.Search.Sort.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_SearchQuery_descriptor = - getDescriptor().getMessageTypes().get(25); + getDescriptor().getMessageTypes().get(113); internal_static_com_alicloud_openservices_tablestore_core_protocol_SearchQuery_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_SearchQuery_descriptor, - new java.lang.String[] { "Offset", "Limit", "Query", "Collapse", "Sort", "GetTotalCount", "Token", }, + new java.lang.String[] { "Offset", "Limit", "Query", "Collapse", "Sort", "GetTotalCount", "Token", "Aggs", "GroupBys", }, com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery.class, com.alicloud.openservices.tablestore.core.protocol.Search.SearchQuery.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_ColumnsToGet_descriptor = - getDescriptor().getMessageTypes().get(26); + getDescriptor().getMessageTypes().get(114); internal_static_com_alicloud_openservices_tablestore_core_protocol_ColumnsToGet_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_ColumnsToGet_descriptor, @@ -25338,31 +79039,55 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet.class, com.alicloud.openservices.tablestore.core.protocol.Search.ColumnsToGet.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_SearchRequest_descriptor = - getDescriptor().getMessageTypes().get(27); + getDescriptor().getMessageTypes().get(115); internal_static_com_alicloud_openservices_tablestore_core_protocol_SearchRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_SearchRequest_descriptor, - new java.lang.String[] { "TableName", "IndexName", "ColumnsToGet", "SearchQuery", "RoutingValues", }, + new java.lang.String[] { "TableName", "IndexName", "ColumnsToGet", "SearchQuery", "RoutingValues", "TimeoutMs", }, com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest.class, com.alicloud.openservices.tablestore.core.protocol.Search.SearchRequest.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_SearchResponse_descriptor = - getDescriptor().getMessageTypes().get(28); + getDescriptor().getMessageTypes().get(116); internal_static_com_alicloud_openservices_tablestore_core_protocol_SearchResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_SearchResponse_descriptor, - new java.lang.String[] { "TotalHits", "Rows", "IsAllSucceeded", "NextToken", }, + new java.lang.String[] { "TotalHits", "Rows", "IsAllSucceeded", "NextToken", "Aggs", "GroupBys", }, com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse.class, com.alicloud.openservices.tablestore.core.protocol.Search.SearchResponse.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_SingleWordAnalyzerParameter_descriptor = + getDescriptor().getMessageTypes().get(117); + internal_static_com_alicloud_openservices_tablestore_core_protocol_SingleWordAnalyzerParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_SingleWordAnalyzerParameter_descriptor, + new java.lang.String[] { "CaseSensitive", "DelimitWord", }, + com.alicloud.openservices.tablestore.core.protocol.Search.SingleWordAnalyzerParameter.class, + com.alicloud.openservices.tablestore.core.protocol.Search.SingleWordAnalyzerParameter.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_SplitAnalyzerParameter_descriptor = + getDescriptor().getMessageTypes().get(118); + internal_static_com_alicloud_openservices_tablestore_core_protocol_SplitAnalyzerParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_SplitAnalyzerParameter_descriptor, + new java.lang.String[] { "Delimiter", }, + com.alicloud.openservices.tablestore.core.protocol.Search.SplitAnalyzerParameter.class, + com.alicloud.openservices.tablestore.core.protocol.Search.SplitAnalyzerParameter.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_FuzzyAnalyzerParameter_descriptor = + getDescriptor().getMessageTypes().get(119); + internal_static_com_alicloud_openservices_tablestore_core_protocol_FuzzyAnalyzerParameter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_FuzzyAnalyzerParameter_descriptor, + new java.lang.String[] { "MinChars", "MaxChars", }, + com.alicloud.openservices.tablestore.core.protocol.Search.FuzzyAnalyzerParameter.class, + com.alicloud.openservices.tablestore.core.protocol.Search.FuzzyAnalyzerParameter.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_FieldSchema_descriptor = - getDescriptor().getMessageTypes().get(29); + getDescriptor().getMessageTypes().get(120); internal_static_com_alicloud_openservices_tablestore_core_protocol_FieldSchema_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_FieldSchema_descriptor, - new java.lang.String[] { "FieldName", "FieldType", "IndexOptions", "Analyzer", "Index", "DocValues", "Store", "FieldSchemas", "IsArray", }, + new java.lang.String[] { "FieldName", "FieldType", "IndexOptions", "Analyzer", "Index", "SortAndAgg", "Store", "FieldSchemas", "IsArray", "AnalyzerParameter", "IsVirtualField", "SourceFieldNames", }, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.class, com.alicloud.openservices.tablestore.core.protocol.Search.FieldSchema.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_IndexSchema_descriptor = - getDescriptor().getMessageTypes().get(30); + getDescriptor().getMessageTypes().get(121); internal_static_com_alicloud_openservices_tablestore_core_protocol_IndexSchema_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_IndexSchema_descriptor, @@ -25370,7 +79095,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.class, com.alicloud.openservices.tablestore.core.protocol.Search.IndexSchema.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_IndexSetting_descriptor = - getDescriptor().getMessageTypes().get(31); + getDescriptor().getMessageTypes().get(122); internal_static_com_alicloud_openservices_tablestore_core_protocol_IndexSetting_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_IndexSetting_descriptor, @@ -25378,23 +79103,47 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting.class, com.alicloud.openservices.tablestore.core.protocol.Search.IndexSetting.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateSearchIndexRequest_descriptor = - getDescriptor().getMessageTypes().get(32); + getDescriptor().getMessageTypes().get(123); internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateSearchIndexRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateSearchIndexRequest_descriptor, - new java.lang.String[] { "TableName", "IndexName", "Schema", }, + new java.lang.String[] { "TableName", "IndexName", "Schema", "SourceIndexName", "TimeToLive", }, com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest.class, com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexRequest.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateSearchIndexResponse_descriptor = - getDescriptor().getMessageTypes().get(33); + getDescriptor().getMessageTypes().get(124); internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateSearchIndexResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateSearchIndexResponse_descriptor, new java.lang.String[] { }, com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse.class, com.alicloud.openservices.tablestore.core.protocol.Search.CreateSearchIndexResponse.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_QueryFlowWeight_descriptor = + getDescriptor().getMessageTypes().get(125); + internal_static_com_alicloud_openservices_tablestore_core_protocol_QueryFlowWeight_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_QueryFlowWeight_descriptor, + new java.lang.String[] { "IndexName", "Weight", }, + com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight.class, + com.alicloud.openservices.tablestore.core.protocol.Search.QueryFlowWeight.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateSearchIndexRequest_descriptor = + getDescriptor().getMessageTypes().get(126); + internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateSearchIndexRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateSearchIndexRequest_descriptor, + new java.lang.String[] { "TableName", "IndexName", "SwitchIndexName", "QueryFlowWeight", "TimeToLive", }, + com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexRequest.class, + com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexRequest.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateSearchIndexResponse_descriptor = + getDescriptor().getMessageTypes().get(127); + internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateSearchIndexResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_UpdateSearchIndexResponse_descriptor, + new java.lang.String[] { }, + com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexResponse.class, + com.alicloud.openservices.tablestore.core.protocol.Search.UpdateSearchIndexResponse.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_IndexInfo_descriptor = - getDescriptor().getMessageTypes().get(34); + getDescriptor().getMessageTypes().get(128); internal_static_com_alicloud_openservices_tablestore_core_protocol_IndexInfo_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_IndexInfo_descriptor, @@ -25402,7 +79151,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo.class, com.alicloud.openservices.tablestore.core.protocol.Search.IndexInfo.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_ListSearchIndexRequest_descriptor = - getDescriptor().getMessageTypes().get(35); + getDescriptor().getMessageTypes().get(129); internal_static_com_alicloud_openservices_tablestore_core_protocol_ListSearchIndexRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_ListSearchIndexRequest_descriptor, @@ -25410,7 +79159,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest.class, com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexRequest.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_ListSearchIndexResponse_descriptor = - getDescriptor().getMessageTypes().get(36); + getDescriptor().getMessageTypes().get(130); internal_static_com_alicloud_openservices_tablestore_core_protocol_ListSearchIndexResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_ListSearchIndexResponse_descriptor, @@ -25418,7 +79167,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse.class, com.alicloud.openservices.tablestore.core.protocol.Search.ListSearchIndexResponse.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteSearchIndexRequest_descriptor = - getDescriptor().getMessageTypes().get(37); + getDescriptor().getMessageTypes().get(131); internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteSearchIndexRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteSearchIndexRequest_descriptor, @@ -25426,7 +79175,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest.class, com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexRequest.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteSearchIndexResponse_descriptor = - getDescriptor().getMessageTypes().get(38); + getDescriptor().getMessageTypes().get(132); internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteSearchIndexResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_DeleteSearchIndexResponse_descriptor, @@ -25434,7 +79183,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse.class, com.alicloud.openservices.tablestore.core.protocol.Search.DeleteSearchIndexResponse.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_SyncStat_descriptor = - getDescriptor().getMessageTypes().get(39); + getDescriptor().getMessageTypes().get(133); internal_static_com_alicloud_openservices_tablestore_core_protocol_SyncStat_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_SyncStat_descriptor, @@ -25442,15 +79191,15 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat.class, com.alicloud.openservices.tablestore.core.protocol.Search.SyncStat.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_MeteringInfo_descriptor = - getDescriptor().getMessageTypes().get(40); + getDescriptor().getMessageTypes().get(134); internal_static_com_alicloud_openservices_tablestore_core_protocol_MeteringInfo_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_MeteringInfo_descriptor, - new java.lang.String[] { "StorageSize", "DocCount", "ReservedReadCu", "Timestamp", }, + new java.lang.String[] { "StorageSize", "RowCount", "ReservedReadCu", "Timestamp", }, com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo.class, com.alicloud.openservices.tablestore.core.protocol.Search.MeteringInfo.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeSearchIndexRequest_descriptor = - getDescriptor().getMessageTypes().get(41); + getDescriptor().getMessageTypes().get(135); internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeSearchIndexRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeSearchIndexRequest_descriptor, @@ -25458,13 +79207,37 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest.class, com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexRequest.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeSearchIndexResponse_descriptor = - getDescriptor().getMessageTypes().get(42); + getDescriptor().getMessageTypes().get(136); internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeSearchIndexResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_DescribeSearchIndexResponse_descriptor, - new java.lang.String[] { "Schema", "SyncStat", "MeteringInfo", }, + new java.lang.String[] { "Schema", "SyncStat", "MeteringInfo", "BrotherIndexName", "QueryFlowWeight", "CreateTime", "TimeToLive", }, com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse.class, com.alicloud.openservices.tablestore.core.protocol.Search.DescribeSearchIndexResponse.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_ScanQuery_descriptor = + getDescriptor().getMessageTypes().get(137); + internal_static_com_alicloud_openservices_tablestore_core_protocol_ScanQuery_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_ScanQuery_descriptor, + new java.lang.String[] { "Query", "Limit", "AliveTime", "Token", "CurrentParallelId", "MaxParallel", }, + com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery.class, + com.alicloud.openservices.tablestore.core.protocol.Search.ScanQuery.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_ParallelScanRequest_descriptor = + getDescriptor().getMessageTypes().get(138); + internal_static_com_alicloud_openservices_tablestore_core_protocol_ParallelScanRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_ParallelScanRequest_descriptor, + new java.lang.String[] { "TableName", "IndexName", "ColumnsToGet", "SessionId", "ScanQuery", "TimeoutMs", }, + com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanRequest.class, + com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanRequest.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_ParallelScanResponse_descriptor = + getDescriptor().getMessageTypes().get(139); + internal_static_com_alicloud_openservices_tablestore_core_protocol_ParallelScanResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_ParallelScanResponse_descriptor, + new java.lang.String[] { "Rows", "NextToken", }, + com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanResponse.class, + com.alicloud.openservices.tablestore.core.protocol.Search.ParallelScanResponse.Builder.class); return null; } }; diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchAggregationBuilder.java b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchAggregationBuilder.java new file mode 100644 index 0000000..f7cae58 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchAggregationBuilder.java @@ -0,0 +1,137 @@ +package com.alicloud.openservices.tablestore.core.protocol; + +import java.util.List; + +import com.alicloud.openservices.tablestore.model.search.agg.Aggregation; +import com.alicloud.openservices.tablestore.model.search.agg.AggregationType; +import com.alicloud.openservices.tablestore.model.search.agg.AvgAggregation; +import com.alicloud.openservices.tablestore.model.search.agg.CountAggregation; +import com.alicloud.openservices.tablestore.model.search.agg.DistinctCountAggregation; +import com.alicloud.openservices.tablestore.model.search.agg.MaxAggregation; +import com.alicloud.openservices.tablestore.model.search.agg.MinAggregation; +import com.alicloud.openservices.tablestore.model.search.agg.PercentilesAggregation; +import com.alicloud.openservices.tablestore.model.search.agg.SumAggregation; +import com.alicloud.openservices.tablestore.model.search.agg.TopRowsAggregation; +import com.google.protobuf.ByteString; + +/** + * {@link Aggregation} serialization tool class. For deserialization, please refer to {@link SearchAggregationParser} + */ +public class SearchAggregationBuilder { + + private static Search.AggregationType buildAggregationType(AggregationType type) { + switch (type) { + case AGG_AVG: + return Search.AggregationType.AGG_AVG; + case AGG_MIN: + return Search.AggregationType.AGG_MIN; + case AGG_MAX: + return Search.AggregationType.AGG_MAX; + case AGG_SUM: + return Search.AggregationType.AGG_SUM; + case AGG_COUNT: + return Search.AggregationType.AGG_COUNT; + case AGG_DISTINCT_COUNT: + return Search.AggregationType.AGG_DISTINCT_COUNT; + case AGG_TOP_ROWS: + return Search.AggregationType.AGG_TOP_ROWS; + case AGG_PERCENTILES: + return Search.AggregationType.AGG_PERCENTILES; + default: + throw new IllegalArgumentException("unknown AggregationType: " + type.name()); + } + } + + public static Search.MaxAggregation buildMaxAggregation(MaxAggregation agg) { + Search.MaxAggregation.Builder builder = Search.MaxAggregation.newBuilder(); + builder.setFieldName(agg.getFieldName()); + if (agg.getMissing() != null) { + builder.setMissing(ByteString.copyFrom(SearchVariantType.toVariant(agg.getMissing()))); + } + return builder.build(); + } + + public static Search.AvgAggregation buildAvgAggregation(AvgAggregation agg) { + Search.AvgAggregation.Builder builder = Search.AvgAggregation.newBuilder(); + builder.setFieldName(agg.getFieldName()); + if (agg.getMissing() != null) { + builder.setMissing(ByteString.copyFrom(SearchVariantType.toVariant(agg.getMissing()))); + } + return builder.build(); + } + + public static Search.MinAggregation buildMinAggregation(MinAggregation agg) { + Search.MinAggregation.Builder builder = Search.MinAggregation.newBuilder(); + builder.setFieldName(agg.getFieldName()); + if (agg.getMissing() != null) { + builder.setMissing(ByteString.copyFrom(SearchVariantType.toVariant(agg.getMissing()))); + } + return builder.build(); + } + + public static Search.SumAggregation buildSumAggregation(SumAggregation agg) { + Search.SumAggregation.Builder builder = Search.SumAggregation.newBuilder(); + builder.setFieldName(agg.getFieldName()); + if (agg.getMissing() != null) { + builder.setMissing(ByteString.copyFrom(SearchVariantType.toVariant(agg.getMissing()))); + } + return builder.build(); + } + + public static Search.CountAggregation buildCountAggregation(CountAggregation agg) { + Search.CountAggregation.Builder builder = Search.CountAggregation.newBuilder(); + builder.setFieldName(agg.getFieldName()); + return builder.build(); + } + + public static Search.DistinctCountAggregation buildDistinctCountAggregation(DistinctCountAggregation agg) { + Search.DistinctCountAggregation.Builder builder = Search.DistinctCountAggregation.newBuilder(); + builder.setFieldName(agg.getFieldName()); + if (agg.getMissing() != null) { + builder.setMissing(ByteString.copyFrom(SearchVariantType.toVariant(agg.getMissing()))); + } + return builder.build(); + } + + public static Search.TopRowsAggregation buildTopRowsAggregation(TopRowsAggregation agg) { + Search.TopRowsAggregation.Builder builder = Search.TopRowsAggregation.newBuilder(); + if (agg.getLimit() != null) { + builder.setLimit(agg.getLimit()); + } + if (agg.getSort() != null) { + builder.setSort(SearchSortBuilder.buildSort(agg.getSort())); + } + return builder.build(); + } + + public static Search.PercentilesAggregation buildPercentilesAggregation(PercentilesAggregation agg) { + Search.PercentilesAggregation.Builder builder = Search.PercentilesAggregation.newBuilder(); + if (agg.getFieldName() != null) { + builder.setFieldName(agg.getFieldName()); + } + if (agg.getPercentiles() != null) { + builder.addAllPercentiles(agg.getPercentiles()); + } + if (agg.getMissing() != null) { + builder.setMissing(ByteString.copyFrom(SearchVariantType.toVariant(agg.getMissing()))); + } + return builder.build(); + } + + private static Search.Aggregation buildAggregation(Aggregation aggregation) { + Search.Aggregation.Builder builder = Search.Aggregation.newBuilder(); + builder.setName(aggregation.getAggName()); + builder.setType(buildAggregationType(aggregation.getAggType())); + builder.setBody(aggregation.serialize()); + return builder.build(); + } + + public static Search.Aggregations buildAggregations(List aggregations) { + Search.Aggregations.Builder builder = Search.Aggregations.newBuilder(); + for (Aggregation aggregation : aggregations) { + builder.addAggs(buildAggregation(aggregation)); + } + return builder.build(); + } + +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchAggregationParser.java b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchAggregationParser.java new file mode 100644 index 0000000..fcf9a9b --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchAggregationParser.java @@ -0,0 +1,167 @@ +package com.alicloud.openservices.tablestore.core.protocol; + +import com.alicloud.openservices.tablestore.core.protocol.Search.AggregationType; +import com.alicloud.openservices.tablestore.core.utils.ValueUtil; +import com.alicloud.openservices.tablestore.model.ColumnValue; +import com.alicloud.openservices.tablestore.model.search.agg.Aggregation; +import com.alicloud.openservices.tablestore.model.search.agg.AvgAggregation; +import com.alicloud.openservices.tablestore.model.search.agg.CountAggregation; +import com.alicloud.openservices.tablestore.model.search.agg.DistinctCountAggregation; +import com.alicloud.openservices.tablestore.model.search.agg.MaxAggregation; +import com.alicloud.openservices.tablestore.model.search.agg.MinAggregation; +import com.alicloud.openservices.tablestore.model.search.agg.PercentilesAggregation; +import com.alicloud.openservices.tablestore.model.search.agg.SumAggregation; +import com.alicloud.openservices.tablestore.model.search.agg.TopRowsAggregation; +import com.google.protobuf.ByteString; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * {@link Aggregation} deserialization tool class. For serialization, please refer to {@link SearchAggregationBuilder} + */ +public class SearchAggregationParser { + + private static MaxAggregation toMaxAggregation(String aggName, ByteString aggByteString) throws IOException { + Search.MaxAggregation pb = Search.MaxAggregation.parseFrom(aggByteString); + MaxAggregation agg = new MaxAggregation(); + agg.setAggName(aggName); + if (pb.hasFieldName()) { + agg.setFieldName(pb.getFieldName()); + } + if (pb.hasMissing()) { + ColumnValue columnValue = ValueUtil.toColumnValue(SearchVariantType.getValue(pb.getMissing().toByteArray())); + agg.setMissing(columnValue); + } + return agg; + } + + private static AvgAggregation toAvgAggregation(String aggName, ByteString aggByteString) throws IOException { + Search.AvgAggregation pb = Search.AvgAggregation.parseFrom(aggByteString); + AvgAggregation agg = new AvgAggregation(); + agg.setAggName(aggName); + if (pb.hasFieldName()) { + agg.setFieldName(pb.getFieldName()); + } + if (pb.hasMissing()) { + ColumnValue columnValue = ValueUtil.toColumnValue(SearchVariantType.getValue(pb.getMissing().toByteArray())); + agg.setMissing(columnValue); + } + return agg; + } + + private static MinAggregation toMinAggregation(String aggName, ByteString aggByteString) throws IOException { + Search.MinAggregation pb = Search.MinAggregation.parseFrom(aggByteString); + MinAggregation agg = new MinAggregation(); + agg.setAggName(aggName); + if (pb.hasFieldName()) { + agg.setFieldName(pb.getFieldName()); + } + if (pb.hasMissing()) { + ColumnValue columnValue = ValueUtil.toColumnValue(SearchVariantType.getValue(pb.getMissing().toByteArray())); + agg.setMissing(columnValue); + } + return agg; + } + + private static SumAggregation toSumAggregation(String aggName, ByteString aggByteString) throws IOException { + Search.SumAggregation pb = Search.SumAggregation.parseFrom(aggByteString); + SumAggregation agg = new SumAggregation(); + agg.setAggName(aggName); + if (pb.hasFieldName()) { + agg.setFieldName(pb.getFieldName()); + } + if (pb.hasMissing()) { + ColumnValue columnValue = ValueUtil.toColumnValue(SearchVariantType.getValue(pb.getMissing().toByteArray())); + agg.setMissing(columnValue); + } + return agg; + } + + private static CountAggregation toCountAggregation(String aggName, ByteString aggByteString) throws IOException { + Search.CountAggregation pb = Search.CountAggregation.parseFrom(aggByteString); + CountAggregation agg = new CountAggregation(); + agg.setAggName(aggName); + if (pb.hasFieldName()) { + agg.setFieldName(pb.getFieldName()); + } + return agg; + } + + private static DistinctCountAggregation toDistinctCountAggregation(String aggName, ByteString aggByteString) throws IOException { + Search.DistinctCountAggregation pb = Search.DistinctCountAggregation.parseFrom(aggByteString); + DistinctCountAggregation agg = new DistinctCountAggregation(); + agg.setAggName(aggName); + if (pb.hasFieldName()) { + agg.setFieldName(pb.getFieldName()); + } + if (pb.hasMissing()) { + ColumnValue columnValue = ValueUtil.toColumnValue(SearchVariantType.getValue(pb.getMissing().toByteArray())); + agg.setMissing(columnValue); + } + return agg; + } + + private static TopRowsAggregation toTopRowsAggregation(String aggName, ByteString aggByteString) throws IOException { + Search.TopRowsAggregation pb = Search.TopRowsAggregation.parseFrom(aggByteString); + TopRowsAggregation agg = new TopRowsAggregation(); + agg.setAggName(aggName); + if (pb.hasLimit()) { + agg.setLimit(pb.getLimit()); + } + if (pb.hasSort()) { + agg.setSort(SearchSortParser.toSort(pb.getSort())); + } + return agg; + } + + private static PercentilesAggregation toPercentilesAggregation(String aggName, ByteString aggByteString) throws IOException { + Search.PercentilesAggregation pb = Search.PercentilesAggregation.parseFrom(aggByteString); + PercentilesAggregation agg = new PercentilesAggregation(); + agg.setAggName(aggName); + if (pb.hasFieldName()) { + agg.setFieldName(pb.getFieldName()); + } + if (pb.hasMissing()) { + ColumnValue columnValue = ValueUtil.toColumnValue(SearchVariantType.getValue(pb.getMissing().toByteArray())); + agg.setMissing(columnValue); + } + agg.setPercentiles(pb.getPercentilesList()); + return agg; + } + + public static Aggregation toAggregation(Search.Aggregation pb) throws IOException { + ByteString body = pb.getBody(); + String aggName = pb.getName(); + AggregationType type = pb.getType(); + switch (type) { + case AGG_AVG: + return toAvgAggregation(aggName, body); + case AGG_MIN: + return toMinAggregation(aggName, body); + case AGG_MAX: + return toMaxAggregation(aggName, body); + case AGG_SUM: + return toSumAggregation(aggName, body); + case AGG_COUNT: + return toCountAggregation(aggName, body); + case AGG_DISTINCT_COUNT: + return toDistinctCountAggregation(aggName, body); + case AGG_TOP_ROWS: + return toTopRowsAggregation(aggName, body); + case AGG_PERCENTILES: + return toPercentilesAggregation(aggName, body); + default: + throw new IllegalArgumentException("unknown AggregationType: " + type.name()); + } + } + + public static List toAggregations(Search.Aggregations pb) throws IOException { + List aggregations = new ArrayList(); + for (Search.Aggregation aggregation : pb.getAggsList()) { + aggregations.add(toAggregation(aggregation)); + } + return aggregations; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchAggregationResultBuilder.java b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchAggregationResultBuilder.java new file mode 100644 index 0000000..5bedd8f --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchAggregationResultBuilder.java @@ -0,0 +1,170 @@ +package com.alicloud.openservices.tablestore.core.protocol; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import com.alicloud.openservices.tablestore.ClientException; +import com.alicloud.openservices.tablestore.model.Row; +import com.alicloud.openservices.tablestore.model.search.agg.AggregationResult; +import com.alicloud.openservices.tablestore.model.search.agg.AggregationResults; +import com.alicloud.openservices.tablestore.model.search.agg.AvgAggregationResult; +import com.alicloud.openservices.tablestore.model.search.agg.CountAggregationResult; +import com.alicloud.openservices.tablestore.model.search.agg.DistinctCountAggregationResult; +import com.alicloud.openservices.tablestore.model.search.agg.MaxAggregationResult; +import com.alicloud.openservices.tablestore.model.search.agg.MinAggregationResult; +import com.alicloud.openservices.tablestore.model.search.agg.PercentilesAggregationItem; +import com.alicloud.openservices.tablestore.model.search.agg.PercentilesAggregationResult; +import com.alicloud.openservices.tablestore.model.search.agg.SumAggregationResult; +import com.alicloud.openservices.tablestore.model.search.agg.TopRowsAggregationResult; +import com.google.protobuf.ByteString; +import com.google.protobuf.InvalidProtocolBufferException; + +class SearchAggregationResultBuilder { + + private static AvgAggregationResult buildAvgAggregationResult(String aggName, ByteString aggBody) + throws InvalidProtocolBufferException { + Search.AvgAggregationResult aggResult = Search.AvgAggregationResult.parseFrom(aggBody); + AvgAggregationResult result = new AvgAggregationResult(); + result.setAggName(aggName); + result.setValue(aggResult.getValue()); + return result; + } + + private static MaxAggregationResult buildMaxAggregationResult(String aggName, ByteString aggBody) + throws InvalidProtocolBufferException { + Search.MaxAggregationResult aggResult = Search.MaxAggregationResult.parseFrom(aggBody); + MaxAggregationResult result = new MaxAggregationResult(); + result.setAggName(aggName); + result.setValue(aggResult.getValue()); + return result; + } + + private static MinAggregationResult buildMinAggregationResult(String aggName, ByteString aggBody) + throws InvalidProtocolBufferException { + Search.MinAggregationResult aggResult = Search.MinAggregationResult.parseFrom(aggBody); + MinAggregationResult result = new MinAggregationResult(); + result.setAggName(aggName); + result.setValue(aggResult.getValue()); + return result; + } + + private static SumAggregationResult buildSumAggregationResult(String aggName, ByteString aggBody) + throws InvalidProtocolBufferException { + Search.SumAggregationResult aggResult = Search.SumAggregationResult.parseFrom(aggBody); + SumAggregationResult result = new SumAggregationResult(); + result.setAggName(aggName); + result.setValue(aggResult.getValue()); + return result; + } + + private static DistinctCountAggregationResult buildDistinctCountAggregationResult(String aggName, + ByteString aggBody) + throws InvalidProtocolBufferException { + Search.DistinctCountAggregationResult aggResult = Search.DistinctCountAggregationResult.parseFrom(aggBody); + DistinctCountAggregationResult result = new DistinctCountAggregationResult(); + result.setAggName(aggName); + result.setValue(aggResult.getValue()); + return result; + } + + private static CountAggregationResult buildCountAggregationResult(String aggName, ByteString aggBody) + throws InvalidProtocolBufferException { + Search.CountAggregationResult aggResult = Search.CountAggregationResult.parseFrom(aggBody); + CountAggregationResult result = new CountAggregationResult(); + result.setAggName(aggName); + result.setValue(aggResult.getValue()); + return result; + } + + private static TopRowsAggregationResult buildTopRowsAggregationResult(String aggName, ByteString aggBody) + throws IOException { + Search.TopRowsAggregationResult aggResult = Search.TopRowsAggregationResult.parseFrom(aggBody); + TopRowsAggregationResult result = new TopRowsAggregationResult(); + result.setAggName(aggName); + // build rows by plainBuffer + List rows = new ArrayList(aggResult.getRowsCount()); + for (ByteString byteString : aggResult.getRowsList()) { + rows.add(parseRow(byteString)); + } + result.setRows(rows); + return result; + } + + private static PercentilesAggregationResult buildPercentilesAggregationResult(String aggName, ByteString aggBody) + throws IOException { + Search.PercentilesAggregationResult aggResult = Search.PercentilesAggregationResult.parseFrom(aggBody); + PercentilesAggregationResult result = new PercentilesAggregationResult(); + result.setAggName(aggName); + // build percentilesAggregationItem by plainBuffer + List percentilesAggregationItems = new ArrayList(aggResult.getPercentilesAggregationItemsCount()); + for (Search.PercentilesAggregationItem item : aggResult.getPercentilesAggregationItemsList()) { + percentilesAggregationItems.add(buildPercentilesAggregationItem(item)); + } + result.setPercentilesAggregationItems(percentilesAggregationItems); + return result; + } + + public static Row parseRow(ByteString byteString) throws IOException { + PlainBufferCodedInputStream coded = new PlainBufferCodedInputStream(new PlainBufferInputStream(byteString.asReadOnlyByteBuffer())); + List plainBufferRows = coded.readRowsWithHeader(); + if (plainBufferRows.size() != 1) { + throw new IOException("Expect only returns one row. Row count: " + plainBufferRows.size()); + } + return PlainBufferConversion.toRow(plainBufferRows.get(0)); + } + + private static AggregationResult buildAggResult(Search.AggregationResult aggregationResult) + throws IOException { + switch (aggregationResult.getType()) { + case AGG_AVG: + return buildAvgAggregationResult(aggregationResult.getName(), aggregationResult.getAggResult()); + case AGG_MAX: + return buildMaxAggregationResult(aggregationResult.getName(), aggregationResult.getAggResult()); + case AGG_MIN: + return buildMinAggregationResult(aggregationResult.getName(), aggregationResult.getAggResult()); + case AGG_SUM: + return buildSumAggregationResult(aggregationResult.getName(), aggregationResult.getAggResult()); + case AGG_DISTINCT_COUNT: + return buildDistinctCountAggregationResult(aggregationResult.getName(), + aggregationResult.getAggResult()); + case AGG_COUNT: + return buildCountAggregationResult(aggregationResult.getName(), aggregationResult.getAggResult()); + case AGG_TOP_ROWS: + return buildTopRowsAggregationResult(aggregationResult.getName(), aggregationResult.getAggResult()); + case AGG_PERCENTILES: + return buildPercentilesAggregationResult(aggregationResult.getName(), aggregationResult.getAggResult()); + default: + throw new ClientException("unsupported aggType: " + aggregationResult.getType()); + } + } + + static AggregationResults buildAggregationResults(Search.AggregationsResult aggregationsResult) + throws IOException { + AggregationResults aggregationResults = new AggregationResults(); + Map map = new HashMap(); + + for (Search.AggregationResult s : aggregationsResult.getAggResultsList()) { + map.put(s.getName(), buildAggResult(s)); + } + aggregationResults.setResultMap(map); + return aggregationResults; + } + + static AggregationResults buildAggregationResultsFromByteString(ByteString agg) + throws IOException { + Search.AggregationsResult aggregationsResult = Search.AggregationsResult.parseFrom(agg); + return buildAggregationResults(aggregationsResult); + } + + private static PercentilesAggregationItem buildPercentilesAggregationItem( + Search.PercentilesAggregationItem percentilesAggregationItem) throws IOException { + PercentilesAggregationItem result = new PercentilesAggregationItem(); + result.setKey(percentilesAggregationItem.getKey()); + result.setValue(SearchVariantType.forceConvertToDestColumnValue(percentilesAggregationItem.getValue().toByteArray())); + return result; + } + +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchGroupByBuilder.java b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchGroupByBuilder.java new file mode 100644 index 0000000..10c7537 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchGroupByBuilder.java @@ -0,0 +1,189 @@ +package com.alicloud.openservices.tablestore.core.protocol; + +import com.alicloud.openservices.tablestore.model.search.GeoPoint; +import com.alicloud.openservices.tablestore.model.search.groupby.FieldRange; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupBy; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupByField; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupByFilter; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupByGeoDistance; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupBy; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupByHistogram; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupByRange; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupByType; +import com.alicloud.openservices.tablestore.model.search.groupby.Range; +import com.alicloud.openservices.tablestore.model.search.query.Query; +import com.google.protobuf.ByteString; + +import java.util.List; + +/** + * {@link GroupBy} serialization tool class. For deserialization, please refer to {@link SearchGroupByParser} + */ +public class SearchGroupByBuilder { + + private static Search.GroupByType buildGroupByType(GroupByType type) { + switch (type) { + case GROUP_BY_FIELD: + return Search.GroupByType.GROUP_BY_FIELD; + case GROUP_BY_RANGE: + return Search.GroupByType.GROUP_BY_RANGE; + case GROUP_BY_FILTER: + return Search.GroupByType.GROUP_BY_FILTER; + case GROUP_BY_GEO_DISTANCE: + return Search.GroupByType.GROUP_BY_GEO_DISTANCE; + case GROUP_BY_HISTOGRAM: + return Search.GroupByType.GROUP_BY_HISTOGRAM; + default: + throw new IllegalArgumentException("unknown GroupByType: " + type.name()); + } + } + + public static Search.GroupByField buildGroupByField(GroupByField groupBy) { + Search.GroupByField.Builder builder = Search.GroupByField.newBuilder(); + builder.setFieldName(groupBy.getFieldName()); + if (groupBy.getSize() != null) { + builder.setSize(groupBy.getSize()); + } + if (groupBy.getMinDocCount() != null) { + builder.setMinDocCount(groupBy.getMinDocCount()); + } + if (groupBy.getSubAggregations() != null) { + builder.setSubAggs(SearchAggregationBuilder.buildAggregations(groupBy.getSubAggregations())); + } + if (groupBy.getSubGroupBys() != null) { + builder.setSubGroupBys(buildGroupBys(groupBy.getSubGroupBys())); + } + if (groupBy.getGroupBySorters() != null) { + builder.setSort(SearchSortBuilder.buildGroupBySort(groupBy.getGroupBySorters())); + } + return builder.build(); + } + + public static Search.GroupByHistogram buildGroupByHistogram(GroupByHistogram groupBy) { + Search.GroupByHistogram.Builder builder = Search.GroupByHistogram.newBuilder(); + if (groupBy.getFieldName() != null) { + builder.setFieldName(groupBy.getFieldName()); + } + if (groupBy.getInterval() != null) { + builder.setInterval(ByteString.copyFrom(SearchVariantType.toVariant(groupBy.getInterval()))); + } + if (groupBy.getMinDocCount() != null) { + builder.setMinDocCount(groupBy.getMinDocCount()); + } + if (groupBy.getMissing() != null) { + builder.setMissing(ByteString.copyFrom(SearchVariantType.toVariant(groupBy.getMissing()))); + } + if (groupBy.getGroupBySorters() != null) { + builder.setSort(SearchSortBuilder.buildGroupBySort(groupBy.getGroupBySorters())); + } + if (groupBy.getSubAggregations() != null) { + builder.setSubAggs(SearchAggregationBuilder.buildAggregations(groupBy.getSubAggregations())); + } + if (groupBy.getSubGroupBys() != null) { + builder.setSubGroupBys(buildGroupBys(groupBy.getSubGroupBys())); + } + if (groupBy.getFieldRange() != null) { + builder.setFieldRange(buildFieldRange(groupBy.getFieldRange())); + } + return builder.build(); + } + + public static Search.GroupByGeoDistance buildGroupByGeoDistance(GroupByGeoDistance groupBy) { + Search.GroupByGeoDistance.Builder builder = Search.GroupByGeoDistance.newBuilder(); + builder.setFieldName(groupBy.getFieldName()); + if (groupBy.getOrigin() == null) { + throw new IllegalArgumentException("GroupByGeoDistance must set origin."); + } + builder.setOrigin(buildGeoPoint(groupBy.getOrigin())); + + if (groupBy.getRanges() == null || groupBy.getRanges().size() == 0) { + throw new IllegalArgumentException("GroupByGeoDistance must add range."); + } + for (Range range : groupBy.getRanges()) { + builder.addRanges(buildRange(range)); + } + if (groupBy.getSubGroupBys() != null) { + builder.setSubGroupBys(buildGroupBys(groupBy.getSubGroupBys())); + } + if (groupBy.getSubAggregations() != null) { + builder.setSubAggs(SearchAggregationBuilder.buildAggregations(groupBy.getSubAggregations())); + } + return builder.build(); + } + + public static Search.GroupByRange buildGroupByRange(GroupByRange groupBy) { + Search.GroupByRange.Builder builder = Search.GroupByRange.newBuilder(); + builder.setFieldName(groupBy.getFieldName()); + if (groupBy.getRanges() == null || groupBy.getRanges().size() == 0) { + throw new IllegalArgumentException("GroupByRange must add range."); + } + for (Range range : groupBy.getRanges()) { + builder.addRanges(buildRange(range)); + } + if (groupBy.getSubGroupBys() != null) { + builder.setSubGroupBys(buildGroupBys(groupBy.getSubGroupBys())); + } + if (groupBy.getSubAggregations() != null) { + builder.setSubAggs(SearchAggregationBuilder.buildAggregations(groupBy.getSubAggregations())); + } + return builder.build(); + } + + public static Search.GroupByFilter buildGroupByFilter(GroupByFilter groupBy) { + Search.GroupByFilter.Builder builder = Search.GroupByFilter.newBuilder(); + if (groupBy.getFilters() != null) { + for (Query query : groupBy.getFilters()) { + builder.addFilters(SearchQueryBuilder.buildQuery(query)); + } + } + if (groupBy.getSubGroupBys() != null) { + builder.setSubGroupBys(buildGroupBys(groupBy.getSubGroupBys())); + } + if (groupBy.getSubAggregations() != null) { + builder.setSubAggs(SearchAggregationBuilder.buildAggregations(groupBy.getSubAggregations())); + } + return builder.build(); + } + + private static Search.Range buildRange(Range range) { + Search.Range.Builder builder = Search.Range.newBuilder(); + if (!range.getFrom().equals(Double.MIN_VALUE)){ + builder.setFrom(range.getFrom()); + } + if (!range.getTo().equals(Double.MAX_VALUE)){ + builder.setTo(range.getTo()); + } + return builder.build(); + } + + private static Search.GeoPoint buildGeoPoint(GeoPoint geoPoint) { + Search.GeoPoint.Builder builder = Search.GeoPoint.newBuilder(); + builder.setLat(geoPoint.getLat()); + builder.setLon(geoPoint.getLon()); + return builder.build(); + } + + public static Search.GroupBy buildGroupBy(GroupBy groupBy) { + Search.GroupBy.Builder builder = Search.GroupBy.newBuilder(); + builder.setName(groupBy.getGroupByName()); + builder.setType(buildGroupByType(groupBy.getGroupByType())); + builder.setBody(groupBy.serialize()); + return builder.build(); + } + + private static Search.FieldRange buildFieldRange(FieldRange groupBy) { + Search.FieldRange.Builder builder = Search.FieldRange.newBuilder(); + builder.setMin(ByteString.copyFrom(SearchVariantType.toVariant(groupBy.getMin()))); + builder.setMax(ByteString.copyFrom(SearchVariantType.toVariant(groupBy.getMax()))); + return builder.build(); + } + + public static Search.GroupBys buildGroupBys(List groupBys) { + Search.GroupBys.Builder builder = Search.GroupBys.newBuilder(); + for (GroupBy groupBy : groupBys) { + builder.addGroupBys(buildGroupBy(groupBy)); + } + return builder.build(); + } + +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchGroupByParser.java b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchGroupByParser.java new file mode 100644 index 0000000..f9f2b7b --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchGroupByParser.java @@ -0,0 +1,194 @@ +package com.alicloud.openservices.tablestore.core.protocol; + +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.alicloud.openservices.tablestore.core.utils.ValueUtil; +import com.alicloud.openservices.tablestore.model.ColumnValue; +import com.alicloud.openservices.tablestore.model.search.GeoPoint; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupBy; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupByField; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupByFilter; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupByGeoDistance; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupByHistogram; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupByRange; +import com.alicloud.openservices.tablestore.model.search.groupby.Range; +import com.alicloud.openservices.tablestore.model.search.query.Query; +import com.google.protobuf.ByteString; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * {@link GroupBy} deserialization tool class. For serialization, please refer to {@link SearchGroupByBuilder} + */ +public class SearchGroupByParser { + + private static GroupByField toGroupByField(String groupByName, ByteString groupByByteString) throws IOException { + Search.GroupByField pb = Search.GroupByField.parseFrom(groupByByteString); + GroupByField groupBy = new GroupByField(); + groupBy.setGroupByName(groupByName); + if (pb.hasFieldName()) { + groupBy.setFieldName(pb.getFieldName()); + } + if (pb.hasSort()) { + groupBy.setGroupBySorters(SearchSortParser.toGroupBySort(pb.getSort())); + } + if (pb.hasSize()) { + groupBy.setSize(pb.getSize()); + } + if (pb.hasSubGroupBys()) { + groupBy.setSubGroupBys(toGroupBys(pb.getSubGroupBys())); + } + if (pb.hasSubAggs()) { + groupBy.setSubAggregations(SearchAggregationParser.toAggregations(pb.getSubAggs())); + } + if (pb.hasMinDocCount()) { + groupBy.setMinDocCount(pb.getMinDocCount()); + } + return groupBy; + } + + private static GroupByHistogram toGroupByHistogram(String groupByName, ByteString groupByByteString) throws IOException { + Search.GroupByHistogram pb = Search.GroupByHistogram.parseFrom(groupByByteString); + GroupByHistogram groupBy = new GroupByHistogram(); + groupBy.setGroupByName(groupByName); + if (pb.hasFieldName()) { + groupBy.setFieldName(pb.getFieldName()); + } + if (pb.hasSort()) { + groupBy.setGroupBySorters(SearchSortParser.toGroupBySort(pb.getSort())); + } + if (pb.hasInterval()) { + ColumnValue columnValue = ValueUtil.toColumnValue(SearchVariantType.getValue(pb.getInterval().toByteArray())); + groupBy.setInterval(columnValue); + } + if (pb.hasFieldRange()) { + Search.FieldRange fieldRangePb = pb.getFieldRange(); + ColumnValue min = ValueUtil.toColumnValue(SearchVariantType.getValue(fieldRangePb.getMin().toByteArray())); + ColumnValue max = ValueUtil.toColumnValue(SearchVariantType.getValue(fieldRangePb.getMax().toByteArray())); + groupBy.setFieldRange(new com.alicloud.openservices.tablestore.model.search.groupby.FieldRange(min, max)); + } + if (pb.hasMissing()) { + ColumnValue missing = ValueUtil.toColumnValue(SearchVariantType.getValue(pb.getMissing().toByteArray())); + groupBy.setMissing(missing); + } + if (pb.hasSubGroupBys()) { + groupBy.setSubGroupBys(toGroupBys(pb.getSubGroupBys())); + } + if (pb.hasSubAggs()) { + groupBy.setSubAggregations(SearchAggregationParser.toAggregations(pb.getSubAggs())); + } + if (pb.hasMinDocCount()) { + groupBy.setMinDocCount(pb.getMinDocCount()); + } + return groupBy; + } + + private static GroupByGeoDistance toGroupByGeoDistance(String groupByName, ByteString groupByByteString) throws IOException { + Search.GroupByGeoDistance pb = Search.GroupByGeoDistance.parseFrom(groupByByteString); + GroupByGeoDistance groupBy = new GroupByGeoDistance(); + groupBy.setGroupByName(groupByName); + if (pb.hasFieldName()) { + groupBy.setFieldName(pb.getFieldName()); + } + if (pb.hasOrigin()) { + groupBy.setOrigin(toGeoPoint(pb.getOrigin())); + } + List rangesList = pb.getRangesList(); + List list = new ArrayList(); + for (Search.Range range : rangesList) { + list.add(toRange(range)); + } + groupBy.setRanges(list); + if (pb.hasSubGroupBys()) { + groupBy.setSubGroupBys(toGroupBys(pb.getSubGroupBys())); + } + if (pb.hasSubAggs()) { + groupBy.setSubAggregations(SearchAggregationParser.toAggregations(pb.getSubAggs())); + } + return groupBy; + } + + private static GroupByRange toGroupByRange(String groupByName, ByteString groupByByteString) throws IOException { + Search.GroupByRange pb = Search.GroupByRange.parseFrom(groupByByteString); + GroupByRange groupBy = new GroupByRange(); + groupBy.setGroupByName(groupByName); + if (pb.hasFieldName()) { + groupBy.setFieldName(pb.getFieldName()); + } + List rangesList = pb.getRangesList(); + List list = new ArrayList(); + for (Search.Range range : rangesList) { + list.add(toRange(range)); + } + groupBy.setRanges(list); + if (pb.hasSubGroupBys()) { + groupBy.setSubGroupBys(toGroupBys(pb.getSubGroupBys())); + } + if (pb.hasSubAggs()) { + groupBy.setSubAggregations(SearchAggregationParser.toAggregations(pb.getSubAggs())); + } + return groupBy; + } + + private static GroupByFilter toGroupByFilter(String groupByName, ByteString groupByByteString) throws IOException { + Search.GroupByFilter pb = Search.GroupByFilter.parseFrom(groupByByteString); + GroupByFilter groupBy = new GroupByFilter(); + groupBy.setGroupByName(groupByName); + List rangesList = pb.getFiltersList(); + List list = new ArrayList(); + for (Search.Query query : rangesList) { + list.add(SearchQueryParser.toQuery(query)); + } + groupBy.setFilters(list); + if (pb.hasSubGroupBys()) { + groupBy.setSubGroupBys(toGroupBys(pb.getSubGroupBys())); + } + if (pb.hasSubAggs()) { + groupBy.setSubAggregations(SearchAggregationParser.toAggregations(pb.getSubAggs())); + } + return groupBy; + } + + private static Range toRange(Search.Range pb) { + Preconditions.checkArgument(pb.hasFrom(), "Search.Range must has 'from'"); + Preconditions.checkArgument(pb.hasTo(), "Search.Range must has 'to'"); + return new Range(pb.getFrom(), pb.getTo()); + } + + private static GeoPoint toGeoPoint(Search.GeoPoint pb) { + Preconditions.checkArgument(pb.hasLat(), "Search.GeoPoint must has 'lat'"); + Preconditions.checkArgument(pb.hasLon(), "Search.GeoPoint must has 'lon'"); + return new GeoPoint(pb.getLat(), pb.getLon()); + } + + public static GroupBy toGroupBy(Search.GroupBy pb) throws IOException { + String groupByName = pb.getName(); + ByteString body = pb.getBody(); + Search.GroupByType type = pb.getType(); + switch (type) { + case GROUP_BY_FIELD: + return toGroupByField(groupByName, body); + case GROUP_BY_GEO_DISTANCE: + return toGroupByGeoDistance(groupByName, body); + case GROUP_BY_RANGE: + return toGroupByRange(groupByName, body); + case GROUP_BY_FILTER: + return toGroupByFilter(groupByName, body); + case GROUP_BY_HISTOGRAM: + return toGroupByHistogram(groupByName, body); + default: + throw new IllegalArgumentException("unknown GroupByType: " + type.name()); + } + } + + + public static List toGroupBys(Search.GroupBys pb) throws IOException { + List groupBys = new ArrayList(); + for (Search.GroupBy groupBy : pb.getGroupBysList()) { + groupBys.add(toGroupBy(groupBy)); + } + return groupBys; + } + +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchGroupByResultBuilder.java b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchGroupByResultBuilder.java new file mode 100644 index 0000000..5058265 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchGroupByResultBuilder.java @@ -0,0 +1,208 @@ +package com.alicloud.openservices.tablestore.core.protocol; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import com.alicloud.openservices.tablestore.ClientException; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupByFieldResult; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupByFieldResultItem; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupByFilterResult; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupByFilterResultItem; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupByGeoDistanceResult; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupByGeoDistanceResultItem; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupByHistogramItem; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupByHistogramResult; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupByRangeResult; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupByRangeResultItem; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupByResult; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupByResults; +import com.google.protobuf.ByteString; +import com.google.protobuf.InvalidProtocolBufferException; + +import static com.alicloud.openservices.tablestore.core.protocol.SearchAggregationResultBuilder.buildAggregationResults; + +class SearchGroupByResultBuilder { + + private static GroupByResult buildGroupByFieldResult(String groupByName, ByteString groupByBody) + throws IOException { + Search.GroupByFieldResult groupByResult = Search.GroupByFieldResult.parseFrom(groupByBody); + GroupByFieldResult result = new GroupByFieldResult(); + result.setGroupByName(groupByName); + + List items = new ArrayList(); + for (Search.GroupByFieldResultItem item : groupByResult.getGroupByFieldResultItemsList()) { + items.add(buildGroupByFieldResultItem(item)); + } + result.setGroupByFieldResultItems(items); + return result; + } + + private static GroupByFieldResultItem buildGroupByFieldResultItem( + Search.GroupByFieldResultItem fieldGroupByResultItem) throws IOException { + GroupByFieldResultItem result = new GroupByFieldResultItem(); + result.setKey(fieldGroupByResultItem.getKey()); + result.setRowCount(fieldGroupByResultItem.getRowCount()); + if (fieldGroupByResultItem.hasSubAggsResult()) { + result.setSubAggregationResults(buildAggregationResults(fieldGroupByResultItem.getSubAggsResult())); + } + if (fieldGroupByResultItem.hasSubGroupBysResult()) { + result.setSubGroupByResults(buildGroupByResults(fieldGroupByResultItem.getSubGroupBysResult())); + } + return result; + } + + private static GroupByRangeResultItem buildGroupByRangeResultItem( + Search.GroupByRangeResultItem rangeGroupByResultItem) throws IOException { + GroupByRangeResultItem result = new GroupByRangeResultItem(); + result.setRowCount(rangeGroupByResultItem.getRowCount()); + result.setFrom(rangeGroupByResultItem.getFrom()); + result.setTo(rangeGroupByResultItem.getTo()); + if (rangeGroupByResultItem.hasSubAggsResult()) { + result.setSubAggregationResults(buildAggregationResults(rangeGroupByResultItem.getSubAggsResult())); + } + if (rangeGroupByResultItem.hasSubGroupBysResult()) { + result.setSubGroupByResults(buildGroupByResults(rangeGroupByResultItem.getSubGroupBysResult())); + } + return result; + } + + private static GroupByHistogramItem buildGroupByHistogramItem( + Search.GroupByHistogramItem groupByItem) throws IOException { + GroupByHistogramItem result = new GroupByHistogramItem(); + result.setKey(SearchVariantType.forceConvertToDestColumnValue(groupByItem.getKey().toByteArray())); + result.setValue(groupByItem.getValue()); + + if (groupByItem.hasSubAggsResult()) { + result.setSubAggregationResults(buildAggregationResults(groupByItem.getSubAggsResult())); + } + if (groupByItem.hasSubGroupBysResult()) { + result.setSubGroupByResults(buildGroupByResults(groupByItem.getSubGroupBysResult())); + } + return result; + } + + private static GroupByGeoDistanceResultItem buildGroupByGeoDistanceResultItem( + Search.GroupByGeoDistanceResultItem geoDistanceResultItem) throws IOException { + GroupByGeoDistanceResultItem result = new GroupByGeoDistanceResultItem(); + result.setRowCount(geoDistanceResultItem.getRowCount()); + result.setFrom(geoDistanceResultItem.getFrom()); + result.setTo(geoDistanceResultItem.getTo()); + if (geoDistanceResultItem.hasSubAggsResult()) { + result.setSubAggregationResults(buildAggregationResults(geoDistanceResultItem.getSubAggsResult())); + } + if (geoDistanceResultItem.hasSubGroupBysResult()) { + result.setSubGroupByResults(buildGroupByResults(geoDistanceResultItem.getSubGroupBysResult())); + } + return result; + } + + private static GroupByFilterResultItem buildGroupByFilterResultItem( + Search.GroupByFilterResultItem filtersGroupByResultItem) throws IOException { + GroupByFilterResultItem result = new GroupByFilterResultItem(); + result.setRowCount(filtersGroupByResultItem.getRowCount()); + if (filtersGroupByResultItem.hasSubAggsResult()) { + result.setSubAggregationResults(buildAggregationResults(filtersGroupByResultItem.getSubAggsResult())); + } + if (filtersGroupByResultItem.hasSubGroupBysResult()) { + result.setSubGroupByResults(buildGroupByResults(filtersGroupByResultItem.getSubGroupBysResult())); + } + return result; + } + + private static GroupByFilterResult buildGroupByFilterResult(String groupByName, ByteString groupByBody) + throws IOException { + Search.GroupByFilterResult groupByResult = Search.GroupByFilterResult.parseFrom(groupByBody); + GroupByFilterResult result = new GroupByFilterResult(); + result.setGroupByName(groupByName); + + List items = new ArrayList(); + for (Search.GroupByFilterResultItem item : groupByResult.getGroupByFilterResultItemsList()) { + items.add(buildGroupByFilterResultItem(item)); + } + result.setGroupByFilterResultItems(items); + return result; + } + + private static GroupByRangeResult buildGroupByRangeResult(String groupByName, ByteString groupByBody) + throws IOException { + Search.GroupByRangeResult groupByResult = Search.GroupByRangeResult.parseFrom(groupByBody); + GroupByRangeResult result = new GroupByRangeResult(); + result.setGroupByName(groupByName); + + List items = new ArrayList(); + for (Search.GroupByRangeResultItem item : groupByResult.getGroupByRangeResultItemsList()) { + items.add(buildGroupByRangeResultItem(item)); + } + result.setGroupByRangeResultItems(items); + return result; + } + + private static GroupByHistogramResult buildGroupByHistogramResult(String groupByName, ByteString groupByBody) + throws IOException { + Search.GroupByHistogramResult groupByResult = Search.GroupByHistogramResult.parseFrom(groupByBody); + GroupByHistogramResult result = new GroupByHistogramResult(); + result.setGroupByName(groupByName); + + List items = new ArrayList(); + for (Search.GroupByHistogramItem item : groupByResult.getGroupByHistograItemsList()) { + items.add(buildGroupByHistogramItem(item)); + } + result.setGroupByHistogramItems(items); + return result; + } + + private static GroupByGeoDistanceResult buildGroupByGeoDistanceResult(String groupByName, ByteString groupByBody) + throws IOException { + Search.GroupByGeoDistanceResult groupByResult = Search.GroupByGeoDistanceResult.parseFrom(groupByBody); + GroupByGeoDistanceResult result = new GroupByGeoDistanceResult(); + result.setGroupByName(groupByName); + + List items = new ArrayList(); + for (Search.GroupByGeoDistanceResultItem item : groupByResult.getGroupByGeoDistanceResultItemsList()) { + items.add(buildGroupByGeoDistanceResultItem(item)); + } + result.setGroupByGeoDistanceResultItems(items); + return result; + } + + private static GroupByResult buildGroupByResult(Search.GroupByResult groupByResult) + throws IOException { + switch (groupByResult.getType()) { + case GROUP_BY_FIELD: + return buildGroupByFieldResult(groupByResult.getName(), groupByResult.getGroupByResult()); + case GROUP_BY_RANGE: + return buildGroupByRangeResult(groupByResult.getName(), groupByResult.getGroupByResult()); + case GROUP_BY_GEO_DISTANCE: + return buildGroupByGeoDistanceResult(groupByResult.getName(), groupByResult.getGroupByResult()); + case GROUP_BY_FILTER: + return buildGroupByFilterResult(groupByResult.getName(), groupByResult.getGroupByResult()); + case GROUP_BY_HISTOGRAM: + return buildGroupByHistogramResult(groupByResult.getName(), groupByResult.getGroupByResult()); + default: + throw new ClientException("unsupported GroupByType: " + groupByResult.getType()); + } + } + + private static GroupByResults buildGroupByResults(Search.GroupBysResult groupBysResult) + throws IOException { + GroupByResults groupByResults = new GroupByResults(); + Map map = new HashMap(); + + for (Search.GroupByResult groupByResult : groupBysResult.getGroupByResultsList()) { + map.put(groupByResult.getName(), buildGroupByResult(groupByResult)); + } + + groupByResults.setGroupByResultMap(map); + return groupByResults; + } + + static GroupByResults buildGroupByResultsFromByteString(ByteString groupBy) + throws IOException { + Search.GroupBysResult aggregationsResult = Search.GroupBysResult.parseFrom(groupBy); + return buildGroupByResults(aggregationsResult); + } + +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchProtocolBuilder.java b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchProtocolBuilder.java index e252569..9766b25 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchProtocolBuilder.java +++ b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchProtocolBuilder.java @@ -1,20 +1,36 @@ package com.alicloud.openservices.tablestore.core.protocol; -import com.alicloud.openservices.tablestore.ClientException; -import com.alicloud.openservices.tablestore.model.ColumnValue; -import com.alicloud.openservices.tablestore.model.PrimaryKey; -import com.alicloud.openservices.tablestore.model.search.*; -import com.google.protobuf.ByteString; - import java.io.IOException; import java.util.ArrayList; import java.util.List; +import com.alicloud.openservices.tablestore.ClientException; +import com.alicloud.openservices.tablestore.core.protocol.Search.ColumnReturnType; +import com.alicloud.openservices.tablestore.model.PrimaryKey; +import com.alicloud.openservices.tablestore.model.search.Collapse; +import com.alicloud.openservices.tablestore.model.search.CreateSearchIndexRequest; +import com.alicloud.openservices.tablestore.model.search.DeleteSearchIndexRequest; +import com.alicloud.openservices.tablestore.model.search.DescribeSearchIndexRequest; +import com.alicloud.openservices.tablestore.model.search.FieldSchema; +import com.alicloud.openservices.tablestore.model.search.FieldType; +import com.alicloud.openservices.tablestore.model.search.IndexOptions; +import com.alicloud.openservices.tablestore.model.search.IndexSchema; +import com.alicloud.openservices.tablestore.model.search.IndexSetting; +import com.alicloud.openservices.tablestore.model.search.ListSearchIndexRequest; +import com.alicloud.openservices.tablestore.model.search.ParallelScanRequest; +import com.alicloud.openservices.tablestore.model.search.QueryFlowWeight; +import com.alicloud.openservices.tablestore.model.search.ScanQuery; +import com.alicloud.openservices.tablestore.model.search.SearchQuery; +import com.alicloud.openservices.tablestore.model.search.SearchRequest; +import com.alicloud.openservices.tablestore.model.search.SearchRequest.ColumnsToGet; +import com.alicloud.openservices.tablestore.model.search.UpdateSearchIndexRequest; +import com.google.protobuf.ByteString; + public class SearchProtocolBuilder { - static final int DEFAULT_NUMBER_OF_SHARDS = 1; + private static final int DEFAULT_NUMBER_OF_SHARDS = 1; - public static Search.FieldType buildFieldType(FieldType fieldType) { + private static Search.FieldType buildFieldType(FieldType fieldType) { switch (fieldType) { case LONG: return Search.FieldType.LONG; @@ -35,7 +51,7 @@ public static Search.FieldType buildFieldType(FieldType fieldType) { } } - public static Search.IndexOptions buildIndexOptions(IndexOptions indexOptions) { + private static Search.IndexOptions buildIndexOptions(IndexOptions indexOptions) { switch (indexOptions) { case DOCS: return Search.IndexOptions.DOCS; @@ -50,7 +66,7 @@ public static Search.IndexOptions buildIndexOptions(IndexOptions indexOptions) { } } - public static Search.FieldSchema buildFieldSchema(FieldSchema fieldSchema) { + static Search.FieldSchema buildFieldSchema(FieldSchema fieldSchema) { Search.FieldSchema.Builder builder = Search.FieldSchema.newBuilder(); builder.setFieldName(fieldSchema.getFieldName()); builder.setFieldType(buildFieldType(fieldSchema.getFieldType())); @@ -59,7 +75,7 @@ public static Search.FieldSchema buildFieldSchema(FieldSchema fieldSchema) { builder.setIndex(fieldSchema.isIndex()); } if (fieldSchema.isEnableSortAndAgg() != null) { - builder.setDocValues(fieldSchema.isEnableSortAndAgg()); + builder.setSortAndAgg(fieldSchema.isEnableSortAndAgg()); } if (fieldSchema.isStore() != null) { builder.setStore(fieldSchema.isStore()); @@ -79,16 +95,36 @@ public static Search.FieldSchema buildFieldSchema(FieldSchema fieldSchema) { } if (fieldSchema.getAnalyzer() != null) { builder.setAnalyzer(fieldSchema.getAnalyzer().toString()); + + if (fieldSchema.getAnalyzerParameter() != null) { + switch (fieldSchema.getAnalyzer()) { + case SingleWord: + case Split: + case Fuzzy: + builder.setAnalyzerParameter(fieldSchema.getAnalyzerParameter().serialize()); + break; + default: + break; + } + } } if (fieldSchema.getSubFieldSchemas() != null) { for (FieldSchema subSchema : fieldSchema.getSubFieldSchemas()) { builder.addFieldSchemas(buildFieldSchema(subSchema)); } } + if (fieldSchema.isVirtualField() != null) { + builder.setIsVirtualField(fieldSchema.isVirtualField()); + } + if (fieldSchema.getSourceFieldNames() != null) { + for (String sourceField : fieldSchema.getSourceFieldNames()) { + builder.addSourceFieldNames(sourceField); + } + } return builder.build(); } - public static Search.IndexSetting buildIndexSetting(IndexSetting indexSetting) { + private static Search.IndexSetting buildIndexSetting(IndexSetting indexSetting) { Search.IndexSetting.Builder builder = Search.IndexSetting.newBuilder(); builder.setNumberOfShards(DEFAULT_NUMBER_OF_SHARDS); if (indexSetting.getRoutingFields() != null) { @@ -97,7 +133,7 @@ public static Search.IndexSetting buildIndexSetting(IndexSetting indexSetting) { return builder.build(); } - public static Search.IndexSchema buildIndexSchema(IndexSchema indexSchema) { + private static Search.IndexSchema buildIndexSchema(IndexSchema indexSchema) { Search.IndexSchema.Builder builder = Search.IndexSchema.newBuilder(); if (indexSchema.getIndexSetting() != null) { builder.setIndexSetting(buildIndexSetting(indexSchema.getIndexSetting())); @@ -118,6 +154,48 @@ public static Search.CreateSearchIndexRequest buildCreateSearchIndexRequest(Crea builder.setTableName(request.getTableName()); builder.setIndexName(request.getIndexName()); builder.setSchema(buildIndexSchema(request.getIndexSchema())); + if (request.getSourceIndexName() != null) { + builder.setSourceIndexName(request.getSourceIndexName()); + } + if (request.getTimeToLive() != null) { + builder.setTimeToLive(request.getTimeToLive()); + } + return builder.build(); + } + + static Search.QueryFlowWeight buildQueryFlowWeight(QueryFlowWeight queryFlowWeight) { + Search.QueryFlowWeight.Builder builder = Search.QueryFlowWeight.newBuilder(); + if (queryFlowWeight.getIndexName() == null) { + throw new ClientException("[query_flow_weight.index_name] must not be null"); + } + if (queryFlowWeight.getWeight() == null) { + throw new ClientException("[query_flow_weight.weight] must not be null"); + } + + builder.setIndexName(queryFlowWeight.getIndexName()); + builder.setWeight(queryFlowWeight.getWeight()); + return builder.build(); + } + + public static Search.UpdateSearchIndexRequest buildUpdateSearchIndexRequest(UpdateSearchIndexRequest request) { + Search.UpdateSearchIndexRequest.Builder builder = Search.UpdateSearchIndexRequest.newBuilder(); + builder.setTableName(request.getTableName()); + builder.setIndexName(request.getIndexName()); + + if (request.getSwitchIndexName() != null) { + builder.setSwitchIndexName(request.getSwitchIndexName()); + } else if (request.getQueryFlowWeight() != null && request.getQueryFlowWeight().size() > 0) { + List queryFlowWeight = request.getQueryFlowWeight(); + if (queryFlowWeight.size() != 2) { + throw new ClientException("[query_flow_weight] size must be 2"); + } + for (QueryFlowWeight fw : queryFlowWeight) { + builder.addQueryFlowWeight(buildQueryFlowWeight(fw)); + } + } + if (request.getTimeToLive() != null) { + builder.setTimeToLive(request.getTimeToLive()); + } return builder.build(); } @@ -134,18 +212,21 @@ public static Search.ListSearchIndexRequest buildListSearchIndexRequest(ListSear return builder.build(); } - public static Search.DescribeSearchIndexRequest buildDescribeSearchIndexRequest(DescribeSearchIndexRequest request) { + public static Search.DescribeSearchIndexRequest buildDescribeSearchIndexRequest( + DescribeSearchIndexRequest request) { Search.DescribeSearchIndexRequest.Builder builder = Search.DescribeSearchIndexRequest.newBuilder(); builder.setTableName(request.getTableName()); builder.setIndexName(request.getIndexName()); return builder.build(); } - public static Search.ColumnsToGet buildColumnsToGet(SearchRequest.ColumnsToGet columnsToGet) { + private static Search.ColumnsToGet buildColumnsToGet(ColumnsToGet columnsToGet) { Search.ColumnsToGet.Builder builder = Search.ColumnsToGet.newBuilder(); if (columnsToGet.isReturnAll()) { builder.setReturnType(Search.ColumnReturnType.RETURN_ALL); - } else if (columnsToGet.getColumns().size() > 0) { + } else if (columnsToGet.isReturnAllFromIndex()) { + builder.setReturnType(ColumnReturnType.RETURN_ALL_FROM_INDEX); + } else if (columnsToGet.getColumns() != null && columnsToGet.getColumns().size() > 0) { builder.setReturnType(Search.ColumnReturnType.RETURN_SPECIFIED); builder.addAllColumnNames(columnsToGet.getColumns()); } else { @@ -154,13 +235,17 @@ public static Search.ColumnsToGet buildColumnsToGet(SearchRequest.ColumnsToGet c return builder.build(); } - public static Search.Collapse buildCollapse(Collapse collapse) { + private static Search.Collapse buildCollapse(Collapse collapse) { Search.Collapse.Builder builder = Search.Collapse.newBuilder(); builder.setFieldName(collapse.getFieldName()); return builder.build(); } - public static Search.SearchQuery buildSearchQuery(SearchQuery searchQuery) { + public static byte[] buildSearchQueryToBytes(SearchQuery searchQuery) { + return buildSearchQuery(searchQuery).toByteArray(); + } + + static Search.SearchQuery buildSearchQuery(SearchQuery searchQuery) { Search.SearchQuery.Builder builder = Search.SearchQuery.newBuilder(); if (searchQuery.getOffset() != null) { builder.setOffset(searchQuery.getOffset()); @@ -181,17 +266,60 @@ public static Search.SearchQuery buildSearchQuery(SearchQuery searchQuery) { if (searchQuery.getToken() != null) { builder.setToken(ByteString.copyFrom(searchQuery.getToken())); } + if (searchQuery.getAggregationList() != null) { + builder.setAggs(SearchAggregationBuilder.buildAggregations(searchQuery.getAggregationList())); + } + if (searchQuery.getGroupByList() != null) { + builder.setGroupBys(SearchGroupByBuilder.buildGroupBys(searchQuery.getGroupByList())); + } return builder.build(); } + public static byte[] buildScanQueryToBytes(ScanQuery scanQuery) { + return buildScanQuery(scanQuery).toByteArray(); + } + + public static Search.ScanQuery buildScanQuery(ScanQuery scanQuery) { + Search.ScanQuery.Builder builder = Search.ScanQuery.newBuilder(); + if (null != scanQuery.getLimit()) { + builder.setLimit(scanQuery.getLimit()); + } + if (null != scanQuery.getQuery()) { + builder.setQuery(SearchQueryBuilder.buildQuery(scanQuery.getQuery())); + } + if (null != scanQuery.getToken()) { + builder.setToken(ByteString.copyFrom(scanQuery.getToken())); + } + if (null != scanQuery.getMaxParallel()) { + builder.setMaxParallel(scanQuery.getMaxParallel()); + } + if (null != scanQuery.getCurrentParallelId()) { + builder.setCurrentParallelId(scanQuery.getCurrentParallelId()); + } + if (null != scanQuery.getAliveTime()) { + builder.setAliveTime(scanQuery.getAliveTime()); + } + return builder.build(); + } + + public static byte[] buildSearchRequestToBytes(SearchRequest request) { + return buildSearchRequest(request).toByteArray(); + } + public static Search.SearchRequest buildSearchRequest(SearchRequest request) { Search.SearchRequest.Builder builder = Search.SearchRequest.newBuilder(); - builder.setTableName(request.getTableName()); - builder.setIndexName(request.getIndexName()); + if (null != request.getTableName()) { + builder.setTableName(request.getTableName()); + } + if (null != request.getIndexName()) { + builder.setIndexName(request.getIndexName()); + } if (request.getColumnsToGet() != null) { builder.setColumnsToGet(buildColumnsToGet(request.getColumnsToGet())); } - builder.setSearchQuery(buildSearchQuery(request.getSearchQuery()).toByteString()); + if (request.getSearchQuery() != null) { + builder.setSearchQuery(buildSearchQuery(request.getSearchQuery()).toByteString()); + } if (request.getRoutingValues() != null) { List routingValues = new ArrayList(); for (PrimaryKey pk : request.getRoutingValues()) { @@ -203,6 +331,36 @@ public static Search.SearchRequest buildSearchRequest(SearchRequest request) { } builder.addAllRoutingValues(routingValues); } + if (request.getTimeoutInMillisecond() > 0) { + builder.setTimeoutMs(request.getTimeoutInMillisecond()); + } + return builder.build(); + } + + public static byte[] buildParallelScanRequestToBytes(ParallelScanRequest request) { + return buildParallelScanRequest(request).toByteArray(); + } + + public static Search.ParallelScanRequest buildParallelScanRequest(ParallelScanRequest parallelScanRequest) { + Search.ParallelScanRequest.Builder builder = Search.ParallelScanRequest.newBuilder(); + if (null != parallelScanRequest.getTableName()) { + builder.setTableName(parallelScanRequest.getTableName()); + } + if (null != parallelScanRequest.getIndexName()) { + builder.setIndexName(parallelScanRequest.getIndexName()); + } + if (null != parallelScanRequest.getColumnsToGet()) { + builder.setColumnsToGet(buildColumnsToGet(parallelScanRequest.getColumnsToGet())); + } + if (null != parallelScanRequest.getSessionId()) { + builder.setSessionId(ByteString.copyFrom(parallelScanRequest.getSessionId())); + } + if (null != parallelScanRequest.getScanQuery()) { + builder.setScanQuery(buildScanQuery(parallelScanRequest.getScanQuery())); + } + if (parallelScanRequest.getTimeoutInMillisecond() > 0) { + builder.setTimeoutMs(parallelScanRequest.getTimeoutInMillisecond()); + } return builder.build(); } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchProtocolParser.java b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchProtocolParser.java index 05e2292..01a9b51 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchProtocolParser.java +++ b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchProtocolParser.java @@ -1,21 +1,41 @@ package com.alicloud.openservices.tablestore.core.protocol; import com.alicloud.openservices.tablestore.ClientException; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; import com.alicloud.openservices.tablestore.model.CapacityUnit; import com.alicloud.openservices.tablestore.model.PrimaryKey; import com.alicloud.openservices.tablestore.model.ReservedThroughput; -import com.alicloud.openservices.tablestore.model.search.*; +import com.alicloud.openservices.tablestore.model.search.Collapse; +import com.alicloud.openservices.tablestore.model.search.FieldSchema; +import com.alicloud.openservices.tablestore.model.search.FieldType; +import com.alicloud.openservices.tablestore.model.search.IndexOptions; +import com.alicloud.openservices.tablestore.model.search.IndexSchema; +import com.alicloud.openservices.tablestore.model.search.IndexSetting; +import com.alicloud.openservices.tablestore.model.search.MeteringInfo; +import com.alicloud.openservices.tablestore.model.search.ParallelScanRequest; +import com.alicloud.openservices.tablestore.model.search.QueryFlowWeight; +import com.alicloud.openservices.tablestore.model.search.ScanQuery; +import com.alicloud.openservices.tablestore.model.search.SearchQuery; +import com.alicloud.openservices.tablestore.model.search.SearchRequest; +import com.alicloud.openservices.tablestore.model.search.SearchRequest.ColumnsToGet; +import com.alicloud.openservices.tablestore.model.search.SyncStat; +import com.alicloud.openservices.tablestore.model.search.analysis.FuzzyAnalyzerParameter; +import com.alicloud.openservices.tablestore.model.search.analysis.SingleWordAnalyzerParameter; +import com.alicloud.openservices.tablestore.model.search.analysis.SplitAnalyzerParameter; import com.alicloud.openservices.tablestore.model.search.sort.FieldSort; import com.alicloud.openservices.tablestore.model.search.sort.PrimaryKeySort; import com.alicloud.openservices.tablestore.model.search.sort.Sort; import com.alicloud.openservices.tablestore.model.search.sort.SortOrder; +import com.google.protobuf.ByteString; +import com.google.protobuf.InvalidProtocolBufferException; +import java.io.IOException; import java.util.ArrayList; import java.util.List; public class SearchProtocolParser { - public static FieldType toFieldType(Search.FieldType fieldType) { + private static FieldType toFieldType(Search.FieldType fieldType) { switch (fieldType) { case LONG: return FieldType.LONG; @@ -36,7 +56,7 @@ public static FieldType toFieldType(Search.FieldType fieldType) { } } - public static IndexOptions toIndexOptions(Search.IndexOptions indexOptions) { + private static IndexOptions toIndexOptions(Search.IndexOptions indexOptions) { switch (indexOptions) { case DOCS: return IndexOptions.DOCS; @@ -51,28 +71,50 @@ public static IndexOptions toIndexOptions(Search.IndexOptions indexOptions) { } } - public static FieldSchema toFieldSchema(Search.FieldSchema fieldSchema) { + private static SingleWordAnalyzerParameter toAnalyzerParameter(Search.SingleWordAnalyzerParameter analyzerParameter) { + SingleWordAnalyzerParameter result = new SingleWordAnalyzerParameter(); + if (analyzerParameter.hasCaseSensitive()) { + result.setCaseSensitive(analyzerParameter.getCaseSensitive()); + } + if (analyzerParameter.hasDelimitWord()) { + result.setDelimitWord(analyzerParameter.getDelimitWord()); + } + return result; + } + + private static SplitAnalyzerParameter toAnalyzerParameter(Search.SplitAnalyzerParameter analyzerParameter) { + SplitAnalyzerParameter result = new SplitAnalyzerParameter(); + if (analyzerParameter.hasDelimiter()) { + result.setDelimiter(analyzerParameter.getDelimiter()); + } + return result; + } + + private static FuzzyAnalyzerParameter toAnalyzerParameter(Search.FuzzyAnalyzerParameter analyzerParameter) { + FuzzyAnalyzerParameter result = new FuzzyAnalyzerParameter(); + if (analyzerParameter.hasMinChars()) { + result.setMinChars(analyzerParameter.getMinChars()); + } + if (analyzerParameter.hasMaxChars()) { + result.setMaxChars(analyzerParameter.getMaxChars()); + } + return result; + } + + static FieldSchema toFieldSchema(Search.FieldSchema fieldSchema) { FieldSchema result = new FieldSchema(fieldSchema.getFieldName(), toFieldType(fieldSchema.getFieldType())); if (fieldSchema.hasIndex()) { result.setIndex(fieldSchema.getIndex()); - } else { - result.setIndex(false); } - if (fieldSchema.hasDocValues()) { - result.setEnableSortAndAgg(fieldSchema.getDocValues()); - } else { - result.setEnableSortAndAgg(false); + if (fieldSchema.hasSortAndAgg()) { + result.setEnableSortAndAgg(fieldSchema.getSortAndAgg()); } if (fieldSchema.hasStore()) { result.setStore(fieldSchema.getStore()); - } else { - result.setStore(false); } if (fieldSchema.hasIsArray()) { result.setIsArray(fieldSchema.getIsArray()); - } else { - result.setIsArray(false); } if (fieldSchema.hasIndexOptions()) { result.setIndexOptions(toIndexOptions(fieldSchema.getIndexOptions())); @@ -80,6 +122,31 @@ public static FieldSchema toFieldSchema(Search.FieldSchema fieldSchema) { if (fieldSchema.hasAnalyzer()) { result.setAnalyzer(FieldSchema.Analyzer.fromString(fieldSchema.getAnalyzer())); } + if (fieldSchema.hasAnalyzerParameter()) { + FieldSchema.Analyzer analyzer = FieldSchema.Analyzer.fromString(fieldSchema.getAnalyzer()); + try { + switch (analyzer) { + case SingleWord: + result.setAnalyzerParameter(toAnalyzerParameter( + Search.SingleWordAnalyzerParameter.parseFrom(fieldSchema.getAnalyzerParameter()) + )); + break; + case Split: + result.setAnalyzerParameter(toAnalyzerParameter( + Search.SplitAnalyzerParameter.parseFrom(fieldSchema.getAnalyzerParameter()) + )); + break; + case Fuzzy: + result.setAnalyzerParameter(toAnalyzerParameter( + Search.FuzzyAnalyzerParameter.parseFrom(fieldSchema.getAnalyzerParameter()) + )); + break; + } + } catch (InvalidProtocolBufferException e) { + throw new ClientException("failed to parse single_word analyzer parameter: " + e.getMessage()); + } + } + if (fieldSchema.getFieldSchemasList() != null) { List subSchemas = new ArrayList(); for (Search.FieldSchema subSchema : fieldSchema.getFieldSchemasList()) { @@ -87,10 +154,14 @@ public static FieldSchema toFieldSchema(Search.FieldSchema fieldSchema) { } result.setSubFieldSchemas(subSchemas); } + if (fieldSchema.hasIsVirtualField()) { + result.setVirtualField(fieldSchema.getIsVirtualField()); + } + result.setSourceFieldNames(fieldSchema.getSourceFieldNamesList()); return result; } - public static IndexSetting toIndexSetting(Search.IndexSetting indexSetting) { + private static IndexSetting toIndexSetting(Search.IndexSetting indexSetting) { IndexSetting result = new IndexSetting(); if (indexSetting.getRoutingFieldsCount() > 0) { result.setRoutingFields(indexSetting.getRoutingFieldsList()); @@ -98,7 +169,7 @@ public static IndexSetting toIndexSetting(Search.IndexSetting indexSetting) { return result; } - public static Sort toIndexSort(Search.Sort sort) { + private static Sort toIndexSort(Search.Sort sort) { if (sort.getSorterCount() == 0) { return null; } @@ -133,7 +204,7 @@ public static Sort toIndexSort(Search.Sort sort) { return new Sort(sorters); } - public static IndexSchema toIndexSchema(Search.IndexSchema indexSchema) { + static IndexSchema toIndexSchema(Search.IndexSchema indexSchema) { IndexSchema result = new IndexSchema(); result.setIndexSetting(toIndexSetting(indexSchema.getIndexSetting())); List fieldSchemas = new ArrayList(); @@ -147,7 +218,7 @@ public static IndexSchema toIndexSchema(Search.IndexSchema indexSchema) { return result; } - public static SyncStat toSyncStat(Search.SyncStat syncStat) { + static SyncStat toSyncStat(Search.SyncStat syncStat) { SyncStat result = new SyncStat(); if (!syncStat.hasSyncPhase()) { throw new ClientException("missing [SyncPhase] in SyncStat"); @@ -168,7 +239,7 @@ public static SyncStat toSyncStat(Search.SyncStat syncStat) { return result; } - public static MeteringInfo toMeteringInfo(Search.MeteringInfo meteringInfo) { + static MeteringInfo toMeteringInfo(Search.MeteringInfo meteringInfo) { MeteringInfo result = new MeteringInfo(); if (meteringInfo.hasReservedReadCu()) { result.setReservedThroughput(new ReservedThroughput( @@ -177,12 +248,177 @@ public static MeteringInfo toMeteringInfo(Search.MeteringInfo meteringInfo) { if (meteringInfo.hasStorageSize()) { result.setStorageSize(meteringInfo.getStorageSize()); } - if (meteringInfo.hasDocCount()) { - result.setDocCount(meteringInfo.getDocCount()); + if (meteringInfo.hasRowCount()) { + result.setRowCount(meteringInfo.getRowCount()); } if (meteringInfo.hasTimestamp()) { result.setTimestamp(meteringInfo.getTimestamp()); } return result; } + + static QueryFlowWeight toQueryFlowWeight(Search.QueryFlowWeight queryFlowWeight) { + if (!queryFlowWeight.hasIndexName()) { + throw new ClientException("[query_flow_weight] has no index name"); + } + if (!queryFlowWeight.hasWeight()) { + throw new ClientException("[query_flow_weight] has no weight"); + } + return new QueryFlowWeight(queryFlowWeight.getIndexName(), queryFlowWeight.getWeight()); + } + + public static SearchQuery toSearchQuery(ByteString byteString) throws IOException { + return toSearchQuery(byteString.toByteArray()); + } + + public static SearchQuery toSearchQuery(byte[] bytes) throws IOException { + SearchQuery searchQuery = new SearchQuery(); + Search.SearchQuery pb = Search.SearchQuery.parseFrom(bytes); + if (pb.hasOffset()) { + searchQuery.setOffset(pb.getOffset()); + } + if (pb.hasLimit()) { + searchQuery.setLimit(pb.getLimit()); + } + if (pb.hasQuery()) { + searchQuery.setQuery(SearchQueryParser.toQuery(pb.getQuery())); + } + if (pb.hasSort()) { + searchQuery.setSort(SearchSortParser.toSort(pb.getSort())); + } + if (pb.hasCollapse()) { + Search.Collapse collapse = pb.getCollapse(); + String fieldName = collapse.getFieldName(); + searchQuery.setCollapse(new Collapse(fieldName)); + } + if (pb.hasGetTotalCount()) { + searchQuery.setGetTotalCount(pb.getGetTotalCount()); + } + if (pb.hasToken()) { + searchQuery.setToken(pb.getToken().toByteArray()); + } + if (pb.hasAggs()) { + searchQuery.setAggregationList(SearchAggregationParser.toAggregations(pb.getAggs())); + } + if (pb.hasGroupBys()) { + searchQuery.setGroupByList(SearchGroupByParser.toGroupBys(pb.getGroupBys())); + } + return searchQuery; + } + + public static ColumnsToGet toColumnsToGet(Search.ColumnsToGet pb) { + ColumnsToGet columnsToGet = new ColumnsToGet(); + columnsToGet.setColumns(pb.getColumnNamesList()); + Preconditions.checkArgument(pb.hasReturnType(), "Search.ColumnsToGet must has 'ReturnType'"); + switch (pb.getReturnType()) { + case RETURN_ALL: + columnsToGet.setReturnAll(true); + break; + case RETURN_ALL_FROM_INDEX: + columnsToGet.setReturnAllFromIndex(true); + break; + case RETURN_SPECIFIED: + case RETURN_NONE: + default: + break; + } + return columnsToGet; + } + + public static List toRoutingValues(List byteStringList) throws IOException { + List primaryKeys = new ArrayList(); + for (ByteString byteString : byteStringList) { + PlainBufferCodedInputStream coded = new PlainBufferCodedInputStream(new PlainBufferInputStream(byteString.asReadOnlyByteBuffer())); + Preconditions.checkArgument(coded.readHeader() == PlainBufferConsts.HEADER, "check plain buff header failed"); + coded.readTag(); + List plainBufferCells = coded.readRowPK(); + PrimaryKey primaryKey = PlainBufferConversion.toPrimaryKey(plainBufferCells); + primaryKeys.add(primaryKey); + } + return primaryKeys; + } + + public static SearchRequest toSearchRequest(ByteString byteString) throws IOException { + return toSearchRequest(byteString.toByteArray()); + } + + public static SearchRequest toSearchRequest(byte[] bytes) throws IOException { + SearchRequest searchRequest = new SearchRequest(); + Search.SearchRequest pb = Search.SearchRequest.parseFrom(bytes); + if (pb.hasTableName()) { + searchRequest.setTableName(pb.getTableName()); + } + if (pb.hasIndexName()) { + searchRequest.setIndexName(pb.getIndexName()); + } + if (pb.hasColumnsToGet()) { + searchRequest.setColumnsToGet(toColumnsToGet(pb.getColumnsToGet())); + } + if (pb.hasSearchQuery()) { + searchRequest.setSearchQuery(toSearchQuery(pb.getSearchQuery())); + } + if (!pb.getRoutingValuesList().isEmpty()) { + searchRequest.setRoutingValues(toRoutingValues(pb.getRoutingValuesList())); + } + if (pb.hasTimeoutMs() && pb.getTimeoutMs() > 0) { + searchRequest.setTimeoutInMillisecond(pb.getTimeoutMs()); + } + return searchRequest; + } + + public static ScanQuery toScanQuery(ByteString byteString) throws IOException { + return toScanQuery(byteString.toByteArray()); + } + + public static ScanQuery toScanQuery(byte[] bytes) throws IOException { + ScanQuery scanQuery = new ScanQuery(); + Search.ScanQuery pb = Search.ScanQuery.parseFrom(bytes); + if (pb.hasLimit()) { + scanQuery.setLimit(pb.getLimit()); + } + if (pb.hasQuery()) { + scanQuery.setQuery(SearchQueryParser.toQuery(pb.getQuery())); + } + if (pb.hasToken()) { + scanQuery.setToken(pb.getToken().toByteArray()); + } + if (pb.hasMaxParallel()) { + scanQuery.setMaxParallel(pb.getMaxParallel()); + } + if (pb.hasCurrentParallelId()) { + scanQuery.setCurrentParallelId(pb.getCurrentParallelId()); + } + if (pb.hasAliveTime()) { + scanQuery.setAliveTime(pb.getAliveTime()); + } + return scanQuery; + } + + public static ParallelScanRequest toParallelScanRequest(ByteString byteString) throws IOException { + return toParallelScanRequest(byteString.toByteArray()); + } + + public static ParallelScanRequest toParallelScanRequest(byte[] bytes) throws IOException { + ParallelScanRequest request = new ParallelScanRequest(); + Search.ParallelScanRequest pb = Search.ParallelScanRequest.parseFrom(bytes); + if (pb.hasTableName()) { + request.setTableName(pb.getTableName()); + } + if (pb.hasIndexName()) { + request.setIndexName(pb.getIndexName()); + } + if (pb.hasColumnsToGet()) { + request.setColumnsToGet(toColumnsToGet(pb.getColumnsToGet())); + } + if (pb.hasSessionId()) { + request.setSessionId(pb.getSessionId().toByteArray()); + } + if (pb.hasScanQuery()) { + request.setScanQuery(toScanQuery(pb.getScanQuery().toByteString())); + } + if (pb.hasTimeoutMs() && pb.getTimeoutMs() > 0) { + request.setTimeoutInMillisecond(pb.getTimeoutMs()); + } + return request; + } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchQueryBuilder.java b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchQueryBuilder.java index 87a172a..729c920 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchQueryBuilder.java +++ b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchQueryBuilder.java @@ -4,9 +4,12 @@ import com.alicloud.openservices.tablestore.model.search.query.*; import com.google.protobuf.ByteString; +/** + * {@link Query} serialization tool class. For deserialization, please refer to {@link SearchQueryParser} + */ public class SearchQueryBuilder { - public static Search.QueryType buildQueryType(QueryType type) { + private static Search.QueryType buildQueryType(QueryType type) { switch (type) { case QueryType_MatchQuery: return Search.QueryType.MATCH_QUERY; @@ -38,6 +41,8 @@ public static Search.QueryType buildQueryType(QueryType type) { return Search.QueryType.GEO_DISTANCE_QUERY; case QueryType_GeoPolygonQuery: return Search.QueryType.GEO_POLYGON_QUERY; + case QueryType_ExistsQuery: + return Search.QueryType.EXISTS_QUERY; default: throw new IllegalArgumentException("unknown queryType: " + type.name()); } @@ -50,6 +55,10 @@ public static Search.Query buildQuery(Query query) { return builder.build(); } + public static byte[] buildQueryToBytes(Query query) { + return buildQuery(query).toByteArray(); + } + public static Search.MatchAllQuery buildMatchAllQuery() { Search.MatchAllQuery.Builder builder = Search.MatchAllQuery.newBuilder(); return builder.build(); @@ -59,6 +68,7 @@ public static Search.MatchQuery buildMatchQuery(MatchQuery query) { Search.MatchQuery.Builder builder = Search.MatchQuery.newBuilder(); builder.setFieldName(query.getFieldName()); builder.setText(query.getText()); + builder.setWeight(query.getWeight()); if (query.getMinimumShouldMatch() != null) { builder.setMinimumShouldMatch(query.getMinimumShouldMatch()); } @@ -81,6 +91,7 @@ public static Search.MatchPhraseQuery buildMatchPhraseQuery(MatchPhraseQuery que Search.MatchPhraseQuery.Builder builder = Search.MatchPhraseQuery.newBuilder(); builder.setFieldName(query.getFieldName()); builder.setText(query.getText()); + builder.setWeight(query.getWeight()); return builder.build(); } @@ -88,6 +99,7 @@ public static Search.TermQuery buildTermQuery(TermQuery query) { Search.TermQuery.Builder builder = Search.TermQuery.newBuilder(); builder.setFieldName(query.getFieldName()); builder.setTerm(ByteString.copyFrom(SearchVariantType.toVariant(query.getTerm()))); + builder.setWeight(query.getWeight()); return builder.build(); } @@ -100,6 +112,7 @@ public static Search.TermsQuery buildTermsQuery(TermsQuery query) { for (ColumnValue term : query.getTerms()) { builder.addTerms(ByteString.copyFrom(SearchVariantType.toVariant(term))); } + builder.setWeight(query.getWeight()); return builder.build(); } @@ -121,6 +134,7 @@ public static Search.PrefixQuery buildPrefixQuery(PrefixQuery query) { Search.PrefixQuery.Builder builder = Search.PrefixQuery.newBuilder(); builder.setFieldName(query.getFieldName()); builder.setPrefix(query.getPrefix()); + builder.setWeight(query.getWeight()); return builder.build(); } @@ -128,6 +142,7 @@ public static Search.WildcardQuery buildWildcardQuery(WildcardQuery query) { Search.WildcardQuery.Builder builder = Search.WildcardQuery.newBuilder(); builder.setFieldName(query.getFieldName()); builder.setValue(query.getValue()); + builder.setWeight(query.getWeight()); return builder.build(); } @@ -165,7 +180,7 @@ public static Search.ConstScoreQuery buildConstScoreQuery(ConstScoreQuery query) return builder.build(); } - public static Search.FieldValueFactor buildFieldValueFactor(FieldValueFactor fieldValueFactor) { + private static Search.FieldValueFactor buildFieldValueFactor(FieldValueFactor fieldValueFactor) { Search.FieldValueFactor.Builder builder = Search.FieldValueFactor.newBuilder(); builder.setFieldName(fieldValueFactor.getFieldName()); return builder.build(); @@ -178,7 +193,7 @@ public static Search.FunctionScoreQuery buildFunctionScoreQuery(FunctionScoreQue return builder.build(); } - public static Search.ScoreMode buildScoreMode(ScoreMode scoreMode) { + private static Search.ScoreMode buildScoreMode(ScoreMode scoreMode) { switch (scoreMode) { case Max: return Search.ScoreMode.SCORE_MODE_MAX; @@ -199,6 +214,10 @@ public static Search.NestedQuery buildNestedQuery(NestedQuery query) { Search.NestedQuery.Builder builder = Search.NestedQuery.newBuilder(); builder.setQuery(SearchQueryBuilder.buildQuery(query.getQuery())); builder.setPath(query.getPath()); + builder.setWeight(query.getWeight()); + if (query.getScoreMode() == null) { + throw new IllegalArgumentException("nestedQuery must set score mode."); + } builder.setScoreMode(buildScoreMode(query.getScoreMode())); return builder.build(); } @@ -225,4 +244,10 @@ public static Search.GeoPolygonQuery buildGeoPolygonQuery(GeoPolygonQuery query) builder.addAllPoints(query.getPoints()); return builder.build(); } + + public static Search.ExistsQuery buildExistsQuery(ExistsQuery query) { + Search.ExistsQuery.Builder builder = Search.ExistsQuery.newBuilder(); + builder.setFieldName(query.getFieldName()); + return builder.build(); + } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchQueryParser.java b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchQueryParser.java new file mode 100644 index 0000000..f297939 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchQueryParser.java @@ -0,0 +1,347 @@ +package com.alicloud.openservices.tablestore.core.protocol; + +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.alicloud.openservices.tablestore.core.utils.ValueUtil; +import com.alicloud.openservices.tablestore.model.ColumnValue; +import com.alicloud.openservices.tablestore.model.search.query.BoolQuery; +import com.alicloud.openservices.tablestore.model.search.query.ConstScoreQuery; +import com.alicloud.openservices.tablestore.model.search.query.ExistsQuery; +import com.alicloud.openservices.tablestore.model.search.query.FieldValueFactor; +import com.alicloud.openservices.tablestore.model.search.query.FunctionScoreQuery; +import com.alicloud.openservices.tablestore.model.search.query.GeoBoundingBoxQuery; +import com.alicloud.openservices.tablestore.model.search.query.GeoDistanceQuery; +import com.alicloud.openservices.tablestore.model.search.query.GeoPolygonQuery; +import com.alicloud.openservices.tablestore.model.search.query.MatchAllQuery; +import com.alicloud.openservices.tablestore.model.search.query.MatchPhraseQuery; +import com.alicloud.openservices.tablestore.model.search.query.MatchQuery; +import com.alicloud.openservices.tablestore.model.search.query.NestedQuery; +import com.alicloud.openservices.tablestore.model.search.query.PrefixQuery; +import com.alicloud.openservices.tablestore.model.search.query.Query; +import com.alicloud.openservices.tablestore.model.search.query.QueryOperator; +import com.alicloud.openservices.tablestore.model.search.query.RangeQuery; +import com.alicloud.openservices.tablestore.model.search.query.ScoreMode; +import com.alicloud.openservices.tablestore.model.search.query.TermQuery; +import com.alicloud.openservices.tablestore.model.search.query.TermsQuery; +import com.alicloud.openservices.tablestore.model.search.query.WildcardQuery; +import com.google.protobuf.ByteString; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + + +/** + * {@link Query} deserialization tool class. For serialization, please refer to {@link SearchQueryBuilder} + */ +public class SearchQueryParser { + + public static Query toQuery(byte[] bytes) throws IOException { + Search.Query query = Search.Query.parseFrom(bytes); + return toQuery(query); + } + + static Query toQuery(Search.Query query) throws IOException { + Preconditions.checkArgument(query.hasType(), "Search.Query must has type"); + Preconditions.checkArgument(query.hasQuery(), "Search.Query must has query"); + ByteString queryByteString = query.getQuery(); + switch (query.getType()) { + case MATCH_QUERY: + return toMatchQuery(queryByteString); + case MATCH_PHRASE_QUERY: + return toMatchPhraseQuery(queryByteString); + case TERM_QUERY: + return toTermQuery(queryByteString); + case TERMS_QUERY: + return toTermsQuery(queryByteString); + case RANGE_QUERY: + return toRangeQuery(queryByteString); + case PREFIX_QUERY: + return toPrefixQuery(queryByteString); + case BOOL_QUERY: + return toBoolQuery(queryByteString); + case CONST_SCORE_QUERY: + return toConstScoreQuery(queryByteString); + case FUNCTION_SCORE_QUERY: + return toFunctionScoreQuery(queryByteString); + case NESTED_QUERY: + return toNestedQuery(queryByteString); + case WILDCARD_QUERY: + return toWildcardQuery(queryByteString); + case MATCH_ALL_QUERY: + return toMatchAllQuery(); + case GEO_BOUNDING_BOX_QUERY: + return toGeoBoundingBoxQuery(queryByteString); + case GEO_DISTANCE_QUERY: + return toGeoDistanceQuery(queryByteString); + case GEO_POLYGON_QUERY: + return toGeoPolygonQuery(queryByteString); + case EXISTS_QUERY: + return toExistsQuery(queryByteString); + default: + throw new IllegalArgumentException("unknown queryType: " + query.getType().name()); + } + } + + private static List toQueryList(List pbQueryList) throws IOException { + List queryList = new ArrayList(); + for (Search.Query pb : pbQueryList) { + queryList.add(toQuery(pb)); + } + return queryList; + } + + private static MatchAllQuery toMatchAllQuery() { + return new MatchAllQuery(); + } + + private static MatchQuery toMatchQuery(ByteString queryByteString) throws IOException { + Search.MatchQuery pb = Search.MatchQuery.parseFrom(queryByteString); + MatchQuery query = new MatchQuery(); + if (pb.hasFieldName()) { + query.setFieldName(pb.getFieldName()); + } + if (pb.hasWeight()) { + query.setWeight(pb.getWeight()); + } + if (pb.hasText()) { + query.setText(pb.getText()); + } + if (pb.hasMinimumShouldMatch()) { + query.setMinimumShouldMatch(pb.getMinimumShouldMatch()); + } + if (pb.hasOperator()) { + Search.QueryOperator operator = pb.getOperator(); + switch (operator) { + case OR: + query.setOperator(QueryOperator.OR); + break; + case AND: + query.setOperator(QueryOperator.AND); + break; + default: + throw new IllegalArgumentException("unsupported operator: " + operator.name()); + } + } + return query; + } + + private static MatchPhraseQuery toMatchPhraseQuery(ByteString queryByteString) throws IOException { + Search.MatchPhraseQuery pb = Search.MatchPhraseQuery.parseFrom(queryByteString); + MatchPhraseQuery query = new MatchPhraseQuery(); + if (pb.hasFieldName()) { + query.setFieldName(pb.getFieldName()); + } + if (pb.hasWeight()) { + query.setWeight(pb.getWeight()); + } + if (pb.hasText()) { + query.setText(pb.getText()); + } + return query; + } + + private static TermQuery toTermQuery(ByteString queryByteString) throws IOException { + Search.TermQuery pb = Search.TermQuery.parseFrom(queryByteString); + TermQuery query = new TermQuery(); + if (pb.hasFieldName()) { + query.setFieldName(pb.getFieldName()); + } + if (pb.hasWeight()) { + query.setWeight(pb.getWeight()); + } + if (pb.hasTerm()) { + ColumnValue columnValue = ValueUtil.toColumnValue(SearchVariantType.getValue(pb.getTerm().toByteArray())); + query.setTerm(columnValue); + } + return query; + } + + private static TermsQuery toTermsQuery(ByteString queryByteString) throws IOException { + Search.TermsQuery pb = Search.TermsQuery.parseFrom(queryByteString); + TermsQuery query = new TermsQuery(); + if (pb.hasFieldName()) { + query.setFieldName(pb.getFieldName()); + } + if (pb.hasWeight()) { + query.setWeight(pb.getWeight()); + } + List terms = new ArrayList(); + for (ByteString byteString : pb.getTermsList()) { + ColumnValue columnValue = ValueUtil.toColumnValue(SearchVariantType.getValue(byteString.toByteArray())); + terms.add(columnValue); + } + query.setTerms(terms); + return query; + } + + private static RangeQuery toRangeQuery(ByteString queryByteString) throws IOException { + Search.RangeQuery pb = Search.RangeQuery.parseFrom(queryByteString); + RangeQuery query = new RangeQuery(); + if (pb.hasFieldName()) { + query.setFieldName(pb.getFieldName()); + } + if (pb.hasRangeTo()) { + ColumnValue columnValue = ValueUtil.toColumnValue(SearchVariantType.getValue(pb.getRangeTo().toByteArray())); + query.setTo(columnValue); + } + if (pb.hasRangeFrom()) { + ColumnValue columnValue = ValueUtil.toColumnValue(SearchVariantType.getValue(pb.getRangeFrom().toByteArray())); + query.setFrom(columnValue); + } + if (pb.hasIncludeLower()) { + query.setIncludeLower(pb.getIncludeLower()); + } + if (pb.hasIncludeUpper()) { + query.setIncludeUpper(pb.getIncludeUpper()); + } + return query; + } + + private static PrefixQuery toPrefixQuery(ByteString queryByteString) throws IOException { + Search.PrefixQuery pb = Search.PrefixQuery.parseFrom(queryByteString); + PrefixQuery query = new PrefixQuery(); + if (pb.hasFieldName()) { + query.setFieldName(pb.getFieldName()); + } + if (pb.hasWeight()) { + query.setWeight(pb.getWeight()); + } + if (pb.hasPrefix()) { + query.setPrefix(pb.getPrefix()); + } + return query; + } + + private static WildcardQuery toWildcardQuery(ByteString queryByteString) throws IOException { + Search.WildcardQuery pb = Search.WildcardQuery.parseFrom(queryByteString); + WildcardQuery query = new WildcardQuery(); + if (pb.hasFieldName()) { + query.setFieldName(pb.getFieldName()); + } + if (pb.hasWeight()) { + query.setWeight(pb.getWeight()); + } + if (pb.hasValue()) { + query.setValue(pb.getValue()); + } + return query; + } + + private static BoolQuery toBoolQuery(ByteString queryByteString) throws IOException { + Search.BoolQuery pb = Search.BoolQuery.parseFrom(queryByteString); + BoolQuery query = new BoolQuery(); + if (pb.hasMinimumShouldMatch()) { + query.setMinimumShouldMatch(pb.getMinimumShouldMatch()); + } + query.setMustQueries(toQueryList(pb.getMustQueriesList())); + query.setMustNotQueries(toQueryList(pb.getMustNotQueriesList())); + query.setShouldQueries(toQueryList(pb.getShouldQueriesList())); + query.setFilterQueries(toQueryList(pb.getFilterQueriesList())); + return query; + } + + private static ConstScoreQuery toConstScoreQuery(ByteString queryByteString) throws IOException { + Search.ConstScoreQuery pb = Search.ConstScoreQuery.parseFrom(queryByteString); + ConstScoreQuery query = new ConstScoreQuery(); + if (pb.hasFilter()) { + query.setFilter(toQuery(pb.getFilter())); + } + return query; + } + + private static FieldValueFactor toFieldValueFactor(Search.FieldValueFactor pb) { + Preconditions.checkArgument(pb.hasFieldName(), "FieldValueFactor must has fieldName"); + return new FieldValueFactor(pb.getFieldName()); + } + + private static FunctionScoreQuery toFunctionScoreQuery(ByteString queryByteString) throws IOException { + Search.FunctionScoreQuery pb = Search.FunctionScoreQuery.parseFrom(queryByteString); + Preconditions.checkArgument(pb.hasFieldValueFactor(), "FunctionScoreQuery must has FieldValueFactor"); + Preconditions.checkArgument(pb.hasQuery(), "FunctionScoreQuery must has Query"); + return new FunctionScoreQuery(toQuery(pb.getQuery()), toFieldValueFactor(pb.getFieldValueFactor())); + } + + private static ScoreMode toScoreMode(Search.ScoreMode scoreMode) { + switch (scoreMode) { + case SCORE_MODE_MAX: + return ScoreMode.Max; + case SCORE_MODE_MIN: + return ScoreMode.Min; + case SCORE_MODE_AVG: + return ScoreMode.Avg; + case SCORE_MODE_TOTAL: + return ScoreMode.Total; + case SCORE_MODE_NONE: + return ScoreMode.None; + default: + throw new IllegalArgumentException("unknown scoreMode: " + scoreMode.name()); + } + } + + private static NestedQuery toNestedQuery(ByteString queryByteString) throws IOException { + Search.NestedQuery pb = Search.NestedQuery.parseFrom(queryByteString); + NestedQuery query = new NestedQuery(); + if (pb.hasPath()) { + query.setPath(pb.getPath()); + } + if (pb.hasWeight()) { + query.setWeight(pb.getWeight()); + } + if (pb.hasQuery()) { + query.setQuery(toQuery(pb.getQuery())); + } + if (pb.hasScoreMode()) { + query.setScoreMode(toScoreMode(pb.getScoreMode())); + } + return query; + } + + private static GeoBoundingBoxQuery toGeoBoundingBoxQuery(ByteString queryByteString) throws IOException { + Search.GeoBoundingBoxQuery pb = Search.GeoBoundingBoxQuery.parseFrom(queryByteString); + GeoBoundingBoxQuery query = new GeoBoundingBoxQuery(); + if (pb.hasFieldName()) { + query.setFieldName(pb.getFieldName()); + } + if (pb.hasBottomRight()) { + query.setBottomRight(pb.getBottomRight()); + } + if (pb.hasTopLeft()) { + query.setTopLeft(pb.getTopLeft()); + } + return query; + } + + private static GeoDistanceQuery toGeoDistanceQuery(ByteString queryByteString) throws IOException { + Search.GeoDistanceQuery pb = Search.GeoDistanceQuery.parseFrom(queryByteString); + GeoDistanceQuery query = new GeoDistanceQuery(); + if (pb.hasFieldName()) { + query.setFieldName(pb.getFieldName()); + } + if (pb.hasCenterPoint()) { + query.setCenterPoint(pb.getCenterPoint()); + } + if (pb.hasDistance()) { + query.setDistanceInMeter(pb.getDistance()); + } + return query; + } + + private static GeoPolygonQuery toGeoPolygonQuery(ByteString queryByteString) throws IOException { + Search.GeoPolygonQuery pb = Search.GeoPolygonQuery.parseFrom(queryByteString); + GeoPolygonQuery query = new GeoPolygonQuery(); + if (pb.hasFieldName()) { + query.setFieldName(pb.getFieldName()); + } + query.setPoints(pb.getPointsList()); + return query; + } + + private static ExistsQuery toExistsQuery(ByteString queryByteString) throws IOException { + Search.ExistsQuery pb = Search.ExistsQuery.parseFrom(queryByteString); + ExistsQuery query = new ExistsQuery(); + if (pb.hasFieldName()) { + query.setFieldName(pb.getFieldName()); + } + return query; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchSortBuilder.java b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchSortBuilder.java index 64a3b4e..c973654 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchSortBuilder.java +++ b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchSortBuilder.java @@ -1,10 +1,25 @@ package com.alicloud.openservices.tablestore.core.protocol; -import com.alicloud.openservices.tablestore.model.search.sort.*; +import java.util.List; -public class SearchSortBuilder { +import com.alicloud.openservices.tablestore.model.search.sort.FieldSort; +import com.alicloud.openservices.tablestore.model.search.sort.GeoDistanceSort; +import com.alicloud.openservices.tablestore.model.search.sort.GeoDistanceType; +import com.alicloud.openservices.tablestore.model.search.sort.GroupBySorter; +import com.alicloud.openservices.tablestore.model.search.sort.GroupKeySort; +import com.alicloud.openservices.tablestore.model.search.sort.NestedFilter; +import com.alicloud.openservices.tablestore.model.search.sort.PrimaryKeySort; +import com.alicloud.openservices.tablestore.model.search.sort.RowCountSort; +import com.alicloud.openservices.tablestore.model.search.sort.ScoreSort; +import com.alicloud.openservices.tablestore.model.search.sort.Sort; +import com.alicloud.openservices.tablestore.model.search.sort.SortMode; +import com.alicloud.openservices.tablestore.model.search.sort.SortOrder; +import com.alicloud.openservices.tablestore.model.search.sort.SubAggSort; +import com.google.protobuf.ByteString; - public static Search.SortOrder buildSortOrder(SortOrder sortOrder) { +class SearchSortBuilder { + + private static Search.SortOrder buildSortOrder(SortOrder sortOrder) { switch (sortOrder) { case ASC: return Search.SortOrder.SORT_ORDER_ASC; @@ -15,7 +30,7 @@ public static Search.SortOrder buildSortOrder(SortOrder sortOrder) { } } - public static Search.SortMode buildSortMode(SortMode sortMode) { + private static Search.SortMode buildSortMode(SortMode sortMode) { switch (sortMode) { case MIN: return Search.SortMode.SORT_MODE_MIN; @@ -28,14 +43,14 @@ public static Search.SortMode buildSortMode(SortMode sortMode) { } } - public static Search.NestedFilter buildNestedFilter(NestedFilter nestedFilter) { + private static Search.NestedFilter buildNestedFilter(NestedFilter nestedFilter) { Search.NestedFilter.Builder builder = Search.NestedFilter.newBuilder(); builder.setPath(nestedFilter.getPath()); builder.setFilter(SearchQueryBuilder.buildQuery(nestedFilter.getQuery())); return builder.build(); } - public static Search.FieldSort buildFieldSort(FieldSort fieldSort) { + private static Search.FieldSort buildFieldSort(FieldSort fieldSort) { Search.FieldSort.Builder builder = Search.FieldSort.newBuilder(); builder.setFieldName(fieldSort.getFieldName()); if (fieldSort.getOrder() != null) { @@ -47,16 +62,19 @@ public static Search.FieldSort buildFieldSort(FieldSort fieldSort) { if (fieldSort.getNestedFilter() != null) { builder.setNestedFilter(buildNestedFilter(fieldSort.getNestedFilter())); } + if (fieldSort.getMissing() != null) { + builder.setMissing(ByteString.copyFrom(SearchVariantType.toVariant(fieldSort.getMissing()))); + } return builder.build(); } - public static Search.ScoreSort buildScoreSort(ScoreSort scoreSort) { + private static Search.ScoreSort buildScoreSort(ScoreSort scoreSort) { Search.ScoreSort.Builder builder = Search.ScoreSort.newBuilder(); builder.setOrder(buildSortOrder(scoreSort.getOrder())); return builder.build(); } - public static Search.GeoDistanceType buildGeoDistanceType(GeoDistanceType geoDistanceType) { + private static Search.GeoDistanceType buildGeoDistanceType(GeoDistanceType geoDistanceType) { switch (geoDistanceType) { case ARC: return Search.GeoDistanceType.GEO_DISTANCE_ARC; @@ -67,7 +85,7 @@ public static Search.GeoDistanceType buildGeoDistanceType(GeoDistanceType geoDis } } - public static Search.GeoDistanceSort buildGeoDistanceSort(GeoDistanceSort geoDistanceSort) { + private static Search.GeoDistanceSort buildGeoDistanceSort(GeoDistanceSort geoDistanceSort) { Search.GeoDistanceSort.Builder builder = Search.GeoDistanceSort.newBuilder(); builder.setFieldName(geoDistanceSort.getFieldName()); if (geoDistanceSort.getPoints() != null) { @@ -88,29 +106,29 @@ public static Search.GeoDistanceSort buildGeoDistanceSort(GeoDistanceSort geoDis return builder.build(); } - public static Search.PrimaryKeySort buildPrimaryKeySort(PrimaryKeySort primaryKeySort) { + private static Search.PrimaryKeySort buildPrimaryKeySort(PrimaryKeySort primaryKeySort) { Search.PrimaryKeySort.Builder builder = Search.PrimaryKeySort.newBuilder(); builder.setOrder(buildSortOrder(primaryKeySort.getOrder())); return builder.build(); } - public static Search.Sorter buildSorter(Sort.Sorter sorter) { + private static Search.Sorter buildSorter(Sort.Sorter sorter) { Search.Sorter.Builder builder = Search.Sorter.newBuilder(); if (sorter instanceof FieldSort) { - builder.setFieldSort(buildFieldSort((FieldSort) sorter)); + builder.setFieldSort(buildFieldSort((FieldSort)sorter)); } else if (sorter instanceof ScoreSort) { - builder.setScoreSort(buildScoreSort((ScoreSort) sorter)); + builder.setScoreSort(buildScoreSort((ScoreSort)sorter)); } else if (sorter instanceof GeoDistanceSort) { - builder.setGeoDistanceSort(buildGeoDistanceSort((GeoDistanceSort) sorter)); + builder.setGeoDistanceSort(buildGeoDistanceSort((GeoDistanceSort)sorter)); } else if (sorter instanceof PrimaryKeySort) { - builder.setPkSort(buildPrimaryKeySort((PrimaryKeySort) sorter)); + builder.setPkSort(buildPrimaryKeySort((PrimaryKeySort)sorter)); } else { throw new IllegalArgumentException("Unknown sorter type: " + sorter.getClass()); } return builder.build(); } - public static Search.Sort buildSort(Sort sort) { + static Search.Sort buildSort(Sort sort) { Search.Sort.Builder builder = Search.Sort.newBuilder(); for (Sort.Sorter sorter : sort.getSorters()) { builder.addSorter(buildSorter(sorter)); @@ -118,4 +136,45 @@ public static Search.Sort buildSort(Sort sort) { return builder.build(); } + static Search.GroupBySort buildGroupBySort(List groupBySorters) { + Search.GroupBySort.Builder builder = Search.GroupBySort.newBuilder(); + for (GroupBySorter groupBySorter : groupBySorters) { + builder.addSorters(buildGroupBySorter(groupBySorter)); + } + return builder.build(); + } + + private static Search.GroupBySorter buildGroupBySorter(GroupBySorter groupBySorter) { + Search.GroupBySorter.Builder builder = Search.GroupBySorter.newBuilder(); + if (groupBySorter.getGroupKeySort() != null) { + builder.setGroupKeySort(buildGroupKeySort(groupBySorter.getGroupKeySort())); + } + if (groupBySorter.getRowCountSort() != null) { + builder.setRowCountSort(buildRowCountSort(groupBySorter.getRowCountSort())); + } + if (groupBySorter.getSubAggSort() != null) { + builder.setSubAggSort(buildSubAggSort(groupBySorter.getSubAggSort())); + } + return builder.build(); + } + + private static Search.GroupKeySort buildGroupKeySort(GroupKeySort groupKeySort) { + Search.GroupKeySort.Builder builder = Search.GroupKeySort.newBuilder(); + builder.setOrder(buildSortOrder(groupKeySort.getOrder())); + return builder.build(); + } + + private static Search.RowCountSort buildRowCountSort(RowCountSort rowCountSort) { + Search.RowCountSort.Builder builder = Search.RowCountSort.newBuilder(); + builder.setOrder(buildSortOrder(rowCountSort.getOrder())); + return builder.build(); + } + + private static Search.SubAggSort buildSubAggSort(SubAggSort subAggSort) { + Search.SubAggSort.Builder builder = Search.SubAggSort.newBuilder(); + builder.setOrder(buildSortOrder(subAggSort.getOrder())); + builder.setSubAggName(subAggSort.getSubAggName()); + return builder.build(); + } + } diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchSortParser.java b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchSortParser.java new file mode 100644 index 0000000..5777ecb --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchSortParser.java @@ -0,0 +1,190 @@ +package com.alicloud.openservices.tablestore.core.protocol; + +import com.alicloud.openservices.tablestore.model.search.query.Query; +import com.alicloud.openservices.tablestore.model.search.sort.FieldSort; +import com.alicloud.openservices.tablestore.model.search.sort.GeoDistanceSort; +import com.alicloud.openservices.tablestore.model.search.sort.GeoDistanceType; +import com.alicloud.openservices.tablestore.model.search.sort.GroupBySorter; +import com.alicloud.openservices.tablestore.model.search.sort.GroupKeySort; +import com.alicloud.openservices.tablestore.model.search.sort.NestedFilter; +import com.alicloud.openservices.tablestore.model.search.sort.PrimaryKeySort; +import com.alicloud.openservices.tablestore.model.search.sort.RowCountSort; +import com.alicloud.openservices.tablestore.model.search.sort.ScoreSort; +import com.alicloud.openservices.tablestore.model.search.sort.Sort; +import com.alicloud.openservices.tablestore.model.search.sort.Sort.Sorter; +import com.alicloud.openservices.tablestore.model.search.sort.SortMode; +import com.alicloud.openservices.tablestore.model.search.sort.SortOrder; +import com.alicloud.openservices.tablestore.model.search.sort.SubAggSort; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +class SearchSortParser { + + private static SortOrder toSortOrder(Search.SortOrder sortOrder) { + switch (sortOrder) { + case SORT_ORDER_ASC: + return SortOrder.ASC; + case SORT_ORDER_DESC: + return SortOrder.DESC; + default: + throw new IllegalArgumentException("Unknown sortOrder:" + sortOrder.name()); + } + } + + private static SortMode toSortMode(Search.SortMode sortMode) { + switch (sortMode) { + case SORT_MODE_MIN: + return SortMode.MIN; + case SORT_MODE_MAX: + return SortMode.MAX; + case SORT_MODE_AVG: + return SortMode.AVG; + default: + throw new IllegalArgumentException("Unknown sortMode:" + sortMode.name()); + } + } + + private static NestedFilter toNestedFilter(Search.NestedFilter pb) throws IOException { + String path = pb.getPath(); + Query query = SearchQueryParser.toQuery(pb.getFilter()); + return new NestedFilter(path, query); + } + + private static FieldSort toFieldSort(Search.FieldSort pb) throws IOException { + FieldSort sort = new FieldSort(pb.getFieldName()); + if (pb.hasOrder()) { + sort.setOrder(toSortOrder(pb.getOrder())); + } + if (pb.hasMode()) { + sort.setMode(toSortMode(pb.getMode())); + } + if (pb.hasNestedFilter()) { + sort.setNestedFilter(toNestedFilter(pb.getNestedFilter())); + } + if (pb.hasMissing()) { + sort.setMissing(SearchVariantType.forceConvertToDestColumnValue(pb.getMissing().toByteArray())); + } + return sort; + } + + private static ScoreSort toScoreSort(Search.ScoreSort pb) { + ScoreSort sort = new ScoreSort(); + if (pb.hasOrder()) { + sort.setOrder(toSortOrder(pb.getOrder())); + } + return sort; + } + + private static GeoDistanceType toGeoDistanceType(Search.GeoDistanceType pb) { + switch (pb) { + case GEO_DISTANCE_ARC: + return GeoDistanceType.ARC; + case GEO_DISTANCE_PLANE: + return GeoDistanceType.PLANE; + default: + throw new IllegalArgumentException("unknown geoDistanceType: " + pb.name()); + } + } + + private static GeoDistanceSort toGeoDistanceSort(Search.GeoDistanceSort pb) throws IOException { + String fieldName = pb.getFieldName(); + List pointsList = pb.getPointsList(); + GeoDistanceSort sort = new GeoDistanceSort(fieldName, pointsList); + if (pb.hasOrder()) { + sort.setOrder(toSortOrder(pb.getOrder())); + } + if (pb.hasMode()) { + sort.setMode(toSortMode(pb.getMode())); + } + if (pb.hasDistanceType()) { + sort.setDistanceType(toGeoDistanceType(pb.getDistanceType())); + } + if (pb.hasNestedFilter()) { + sort.setNestedFilter(toNestedFilter(pb.getNestedFilter())); + } + return sort; + } + + private static PrimaryKeySort toPrimaryKeySort(Search.PrimaryKeySort pb) { + PrimaryKeySort sort = new PrimaryKeySort(); + if (pb.hasOrder()) { + sort.setOrder(toSortOrder(pb.getOrder())); + } + return sort; + } + + private static Sort.Sorter toSorter(Search.Sorter pb) throws IOException { + if (pb.hasFieldSort()) { + return toFieldSort(pb.getFieldSort()); + } + if (pb.hasPkSort()) { + return toPrimaryKeySort(pb.getPkSort()); + } + if (pb.hasScoreSort()) { + return toScoreSort(pb.getScoreSort()); + } + if (pb.hasGeoDistanceSort()) { + return toGeoDistanceSort(pb.getGeoDistanceSort()); + } + throw new IllegalArgumentException("can not parse a sorter from Search.Sorter"); + } + + static Sort toSort(Search.Sort pb) throws IOException { + List sorters = new ArrayList(); + for (Search.Sorter sorter : pb.getSorterList()) { + sorters.add(toSorter(sorter)); + } + return new Sort(sorters); + } + + static List toGroupBySort(Search.GroupBySort groupBySort) { + List sorters = new ArrayList(); + for (Search.GroupBySorter pb : groupBySort.getSortersList()) { + sorters.add(toGroupBySorter(pb)); + } + return sorters; + } + + private static GroupBySorter toGroupBySorter(Search.GroupBySorter pb) { + GroupBySorter sorter = new GroupBySorter(); + if (pb.hasGroupKeySort()) { + sorter.setGroupKeySort(toGroupKeySort(pb.getGroupKeySort())); + } + if (pb.hasRowCountSort()) { + sorter.setRowCountSort(toRowCountSort(pb.getRowCountSort())); + } + if (pb.hasSubAggSort()) { + sorter.setSubAggSort(toSubAggSort(pb.getSubAggSort())); + } + return sorter; + } + + private static GroupKeySort toGroupKeySort(Search.GroupKeySort pb) { + GroupKeySort sort = new GroupKeySort(); + if (pb.hasOrder()) { + sort.setOrder(toSortOrder(pb.getOrder())); + } + return sort; + } + + private static RowCountSort toRowCountSort(Search.RowCountSort pb) { + RowCountSort sort = new RowCountSort(); + if (pb.hasOrder()) { + sort.setOrder(toSortOrder(pb.getOrder())); + } + return sort; + } + + private static SubAggSort toSubAggSort(Search.SubAggSort pb) { + SubAggSort sort = new SubAggSort(); + if (pb.hasOrder()) { + sort.setOrder(toSortOrder(pb.getOrder())); + } + if (pb.hasSubAggName()) { + sort.setSubAggName(pb.getSubAggName()); + } + return sort; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchVariantType.java b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchVariantType.java index daf7d55..cbcc584 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchVariantType.java +++ b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/SearchVariantType.java @@ -1,8 +1,10 @@ package com.alicloud.openservices.tablestore.core.protocol; import com.alicloud.openservices.tablestore.core.Constants; +import com.alicloud.openservices.tablestore.model.ColumnType; import com.alicloud.openservices.tablestore.model.ColumnValue; +import java.io.IOException; import java.io.UnsupportedEncodingException; import java.nio.ByteBuffer; import java.nio.ByteOrder; @@ -101,4 +103,25 @@ public static byte[] toVariant(ColumnValue value) { throw new IllegalArgumentException("unsupported type:" + value.getType().name()); } } + + public static ColumnValue forceConvertToDestColumnValue(byte[] data) throws IOException { + + if (data.length == 0) { + throw new IOException("data is null"); + } + ColumnValue columnValue = null; + if (data[0] == VT_INTEGER) { + columnValue = new ColumnValue(asLong(data), ColumnType.INTEGER); + } else if (data[0] == VT_DOUBLE) { + columnValue = new ColumnValue(asDouble(data), ColumnType.DOUBLE); + } else if (data[0] == VT_STRING) { + columnValue = new ColumnValue(asString(data), ColumnType.STRING); + } else if (data[0] == VT_BOOLEAN) { + columnValue = new ColumnValue(asBoolean(data), ColumnType.BOOLEAN); + } else { + throw new IOException("Bug: unsupported data type"); + } + + return columnValue; + } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/TunnelProtocolBuilder.java b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/TunnelProtocolBuilder.java index 3acc35d..c28fbcf 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/TunnelProtocolBuilder.java +++ b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/TunnelProtocolBuilder.java @@ -1,24 +1,15 @@ package com.alicloud.openservices.tablestore.core.protocol; +import com.alicloud.openservices.tablestore.model.tunnel.*; +import com.alicloud.openservices.tablestore.model.tunnel.internal.*; +import com.alicloud.openservices.tablestore.tunnel.worker.TunnelClientConfig; + import java.util.ArrayList; import java.util.List; -import com.alicloud.openservices.tablestore.model.tunnel.ChannelStatus; -import com.alicloud.openservices.tablestore.model.tunnel.CreateTunnelRequest; -import com.alicloud.openservices.tablestore.model.tunnel.DeleteTunnelRequest; -import com.alicloud.openservices.tablestore.model.tunnel.DescribeTunnelRequest; -import com.alicloud.openservices.tablestore.model.tunnel.ListTunnelRequest; -import com.alicloud.openservices.tablestore.model.tunnel.TunnelType; -import com.alicloud.openservices.tablestore.model.tunnel.internal.Channel; -import com.alicloud.openservices.tablestore.model.tunnel.internal.CheckpointRequest; -import com.alicloud.openservices.tablestore.tunnel.worker.TunnelClientConfig; -import com.alicloud.openservices.tablestore.model.tunnel.internal.ConnectTunnelRequest; -import com.alicloud.openservices.tablestore.model.tunnel.internal.GetCheckpointRequest; -import com.alicloud.openservices.tablestore.model.tunnel.internal.HeartbeatRequest; -import com.alicloud.openservices.tablestore.model.tunnel.internal.ReadRecordsRequest; -import com.alicloud.openservices.tablestore.model.tunnel.internal.ShutdownTunnelRequest; - public class TunnelProtocolBuilder { + public static final int MILLIS_TO_NANO = 1000000; + public static TunnelServiceApi.TunnelType buildTunnelType(TunnelType tunnelType) { switch (tunnelType) { case BaseData: @@ -32,17 +23,44 @@ public static TunnelServiceApi.TunnelType buildTunnelType(TunnelType tunnelType) } } - public static TunnelServiceApi.Tunnel buildTunnel(String tableName, String tunnelName, TunnelType tunnelType) { + public static TunnelServiceApi.StreamTunnelConfig buildStreamTunnelConfig(StreamTunnelConfig config) { + TunnelServiceApi.StreamTunnelConfig.Builder builder = TunnelServiceApi.StreamTunnelConfig.newBuilder(); + if (config.getStartOffset() != 0) { + // MillSecond to NanoSecond + builder.setStartOffset(config.getStartOffset() * MILLIS_TO_NANO); + } else { + switch (config.getFlag()) { + case EARLIEST: + builder.setFlag(TunnelServiceApi.StartOffsetFlag.EARLIEST); + break; + case LATEST: + builder.setFlag(TunnelServiceApi.StartOffsetFlag.LATEST); + break; + default: + break; + } + } + if (config.getEndOffset() != 0) { + // MillSecond to NanoSecond + builder.setEndOffset(config.getEndOffset() * MILLIS_TO_NANO); + } + return builder.build(); + } + + public static TunnelServiceApi.Tunnel buildTunnel(String tableName, String tunnelName, TunnelType tunnelType, StreamTunnelConfig streamConfig) { TunnelServiceApi.Tunnel.Builder builder = TunnelServiceApi.Tunnel.newBuilder(); builder.setTableName(tableName); builder.setTunnelName(tunnelName); builder.setTunnelType(buildTunnelType(tunnelType)); + if (streamConfig != null) { + builder.setStreamTunnelConfig(buildStreamTunnelConfig(streamConfig)); + } return builder.build(); } public static TunnelServiceApi.CreateTunnelRequest buildCreateTunnelRequest(CreateTunnelRequest request) { TunnelServiceApi.CreateTunnelRequest.Builder builder = TunnelServiceApi.CreateTunnelRequest.newBuilder(); - builder.setTunnel(buildTunnel(request.getTableName(), request.getTunnelName(), request.getTunnelType())); + builder.setTunnel(buildTunnel(request.getTableName(), request.getTunnelName(), request.getTunnelType(), request.getStreamTunnelConfig())); return builder.build(); } @@ -127,11 +145,11 @@ public static TunnelServiceApi.ShutdownRequest buildShutdownTunnelRequest(Shutdo } public static TunnelServiceApi.GetCheckpointRequest buildGetCheckpointRequest(GetCheckpointRequest request) { - TunnelServiceApi.GetCheckpointRequest.Builder builder = TunnelServiceApi.GetCheckpointRequest.newBuilder(); - builder.setTunnelId(request.getTunnelId()); - builder.setClientId(request.getClientId()); - builder.setChannelId(request.getChannelId()); - return builder.build(); + TunnelServiceApi.GetCheckpointRequest.Builder builder = TunnelServiceApi.GetCheckpointRequest.newBuilder(); + builder.setTunnelId(request.getTunnelId()); + builder.setClientId(request.getClientId()); + builder.setChannelId(request.getChannelId()); + return builder.build(); } public static TunnelServiceApi.ReadRecordsRequest buildReadRecordsRequest(ReadRecordsRequest request) { @@ -144,12 +162,12 @@ public static TunnelServiceApi.ReadRecordsRequest buildReadRecordsRequest(ReadRe } public static TunnelServiceApi.CheckpointRequest buildCheckpointRequest(CheckpointRequest request) { - TunnelServiceApi.CheckpointRequest.Builder builder = TunnelServiceApi.CheckpointRequest.newBuilder(); - builder.setTunnelId(request.getTunnelId()); - builder.setClientId(request.getClientId()); - builder.setChannelId(request.getChannelId()); - builder.setCheckpoint(request.getCheckpoint()); - builder.setSequenceNumber(request.getSequenceNumber()); - return builder.build(); + TunnelServiceApi.CheckpointRequest.Builder builder = TunnelServiceApi.CheckpointRequest.newBuilder(); + builder.setTunnelId(request.getTunnelId()); + builder.setClientId(request.getClientId()); + builder.setChannelId(request.getChannelId()); + builder.setCheckpoint(request.getCheckpoint()); + builder.setSequenceNumber(request.getSequenceNumber()); + return builder.build(); } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/TunnelServiceApi.java b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/TunnelServiceApi.java index addccdb..450290a 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/TunnelServiceApi.java +++ b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/TunnelServiceApi.java @@ -227,6 +227,75 @@ private ActionType(int index, int value) { // @@protoc_insertion_point(enum_scope:com.alicloud.openservices.tablestore.core.protocol.ActionType) } + public enum StartOffsetFlag + implements com.google.protobuf.ProtocolMessageEnum { + LATEST(0, 0), + EARLIEST(1, 1), + ; + + public static final int LATEST_VALUE = 0; + public static final int EARLIEST_VALUE = 1; + + + public final int getNumber() { return value; } + + public static StartOffsetFlag valueOf(int value) { + switch (value) { + case 0: return LATEST; + case 1: return EARLIEST; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public StartOffsetFlag findValueByNumber(int number) { + return StartOffsetFlag.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.getDescriptor().getEnumTypes().get(3); + } + + private static final StartOffsetFlag[] VALUES = { + LATEST, EARLIEST, + }; + + public static StartOffsetFlag valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private StartOffsetFlag(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:com.alicloud.openservices.tablestore.core.protocol.StartOffsetFlag) + } + public interface ErrorOrBuilder extends com.google.protobuf.MessageOrBuilder { @@ -812,6 +881,11 @@ public interface TunnelOrBuilder // required .com.alicloud.openservices.tablestore.core.protocol.TunnelType tunnel_type = 4; boolean hasTunnelType(); com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TunnelType getTunnelType(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.StreamTunnelConfig StreamTunnelConfig = 5; + boolean hasStreamTunnelConfig(); + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig getStreamTunnelConfig(); + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfigOrBuilder getStreamTunnelConfigOrBuilder(); } public static final class Tunnel extends com.google.protobuf.GeneratedMessage @@ -916,10 +990,24 @@ public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Tunne return tunnelType_; } + // optional .com.alicloud.openservices.tablestore.core.protocol.StreamTunnelConfig StreamTunnelConfig = 5; + public static final int STREAMTUNNELCONFIG_FIELD_NUMBER = 5; + private com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig streamTunnelConfig_; + public boolean hasStreamTunnelConfig() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig getStreamTunnelConfig() { + return streamTunnelConfig_; + } + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfigOrBuilder getStreamTunnelConfigOrBuilder() { + return streamTunnelConfig_; + } + private void initFields() { tableName_ = ""; tunnelName_ = ""; tunnelType_ = com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TunnelType.BaseData; + streamTunnelConfig_ = com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -954,6 +1042,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeEnum(4, tunnelType_.getNumber()); } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeMessage(5, streamTunnelConfig_); + } getUnknownFields().writeTo(output); } @@ -975,6 +1066,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeEnumSize(4, tunnelType_.getNumber()); } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, streamTunnelConfig_); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -1091,6 +1186,7 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getStreamTunnelConfigFieldBuilder(); } } private static Builder create() { @@ -1105,6 +1201,12 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000002); tunnelType_ = com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TunnelType.BaseData; bitField0_ = (bitField0_ & ~0x00000004); + if (streamTunnelConfigBuilder_ == null) { + streamTunnelConfig_ = com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig.getDefaultInstance(); + } else { + streamTunnelConfigBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -1155,6 +1257,14 @@ public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Tunne to_bitField0_ |= 0x00000004; } result.tunnelType_ = tunnelType_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + if (streamTunnelConfigBuilder_ == null) { + result.streamTunnelConfig_ = streamTunnelConfig_; + } else { + result.streamTunnelConfig_ = streamTunnelConfigBuilder_.build(); + } result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -1180,6 +1290,9 @@ public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Tunn if (other.hasTunnelType()) { setTunnelType(other.getTunnelType()); } + if (other.hasStreamTunnelConfig()) { + mergeStreamTunnelConfig(other.getStreamTunnelConfig()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -1244,6 +1357,15 @@ public Builder mergeFrom( } break; } + case 42: { + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig.newBuilder(); + if (hasStreamTunnelConfig()) { + subBuilder.mergeFrom(getStreamTunnelConfig()); + } + input.readMessage(subBuilder, extensionRegistry); + setStreamTunnelConfig(subBuilder.buildPartial()); + break; + } } } } @@ -1346,6 +1468,96 @@ public Builder clearTunnelType() { return this; } + // optional .com.alicloud.openservices.tablestore.core.protocol.StreamTunnelConfig StreamTunnelConfig = 5; + private com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig streamTunnelConfig_ = com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig.Builder, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfigOrBuilder> streamTunnelConfigBuilder_; + public boolean hasStreamTunnelConfig() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig getStreamTunnelConfig() { + if (streamTunnelConfigBuilder_ == null) { + return streamTunnelConfig_; + } else { + return streamTunnelConfigBuilder_.getMessage(); + } + } + public Builder setStreamTunnelConfig(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig value) { + if (streamTunnelConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + streamTunnelConfig_ = value; + onChanged(); + } else { + streamTunnelConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder setStreamTunnelConfig( + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig.Builder builderForValue) { + if (streamTunnelConfigBuilder_ == null) { + streamTunnelConfig_ = builderForValue.build(); + onChanged(); + } else { + streamTunnelConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder mergeStreamTunnelConfig(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig value) { + if (streamTunnelConfigBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008) && + streamTunnelConfig_ != com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig.getDefaultInstance()) { + streamTunnelConfig_ = + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig.newBuilder(streamTunnelConfig_).mergeFrom(value).buildPartial(); + } else { + streamTunnelConfig_ = value; + } + onChanged(); + } else { + streamTunnelConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + return this; + } + public Builder clearStreamTunnelConfig() { + if (streamTunnelConfigBuilder_ == null) { + streamTunnelConfig_ = com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig.getDefaultInstance(); + onChanged(); + } else { + streamTunnelConfigBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig.Builder getStreamTunnelConfigBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getStreamTunnelConfigFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfigOrBuilder getStreamTunnelConfigOrBuilder() { + if (streamTunnelConfigBuilder_ != null) { + return streamTunnelConfigBuilder_.getMessageOrBuilder(); + } else { + return streamTunnelConfig_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig.Builder, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfigOrBuilder> + getStreamTunnelConfigFieldBuilder() { + if (streamTunnelConfigBuilder_ == null) { + streamTunnelConfigBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig.Builder, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfigOrBuilder>( + streamTunnelConfig_, + getParentForChildren(), + isClean()); + streamTunnelConfig_ = null; + } + return streamTunnelConfigBuilder_; + } + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.Tunnel) } @@ -3448,6 +3660,15 @@ public interface TunnelInfoOrBuilder // optional bool public = 9; boolean hasPublic(); boolean getPublic(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.StreamTunnelConfig stream_tunnel_config = 10; + boolean hasStreamTunnelConfig(); + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig getStreamTunnelConfig(); + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfigOrBuilder getStreamTunnelConfigOrBuilder(); + + // optional int64 create_time = 11; + boolean hasCreateTime(); + long getCreateTime(); } public static final class TunnelInfo extends com.google.protobuf.GeneratedMessage @@ -3722,6 +3943,29 @@ public boolean getPublic() { return public_; } + // optional .com.alicloud.openservices.tablestore.core.protocol.StreamTunnelConfig stream_tunnel_config = 10; + public static final int STREAM_TUNNEL_CONFIG_FIELD_NUMBER = 10; + private com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig streamTunnelConfig_; + public boolean hasStreamTunnelConfig() { + return ((bitField0_ & 0x00000200) == 0x00000200); + } + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig getStreamTunnelConfig() { + return streamTunnelConfig_; + } + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfigOrBuilder getStreamTunnelConfigOrBuilder() { + return streamTunnelConfig_; + } + + // optional int64 create_time = 11; + public static final int CREATE_TIME_FIELD_NUMBER = 11; + private long createTime_; + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000400) == 0x00000400); + } + public long getCreateTime() { + return createTime_; + } + private void initFields() { tunnelId_ = ""; tunnelType_ = ""; @@ -3732,6 +3976,8 @@ private void initFields() { expired_ = false; tunnelName_ = ""; public_ = false; + streamTunnelConfig_ = com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig.getDefaultInstance(); + createTime_ = 0L; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -3796,6 +4042,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (((bitField0_ & 0x00000100) == 0x00000100)) { output.writeBool(9, public_); } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + output.writeMessage(10, streamTunnelConfig_); + } + if (((bitField0_ & 0x00000400) == 0x00000400)) { + output.writeInt64(11, createTime_); + } getUnknownFields().writeTo(output); } @@ -3841,6 +4093,14 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeBoolSize(9, public_); } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, streamTunnelConfig_); + } + if (((bitField0_ & 0x00000400) == 0x00000400)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(11, createTime_); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -3957,6 +4217,7 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getStreamTunnelConfigFieldBuilder(); } } private static Builder create() { @@ -3983,6 +4244,14 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000080); public_ = false; bitField0_ = (bitField0_ & ~0x00000100); + if (streamTunnelConfigBuilder_ == null) { + streamTunnelConfig_ = com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig.getDefaultInstance(); + } else { + streamTunnelConfigBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000200); + createTime_ = 0L; + bitField0_ = (bitField0_ & ~0x00000400); return this; } @@ -4057,6 +4326,18 @@ public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Tunne to_bitField0_ |= 0x00000100; } result.public_ = public_; + if (((from_bitField0_ & 0x00000200) == 0x00000200)) { + to_bitField0_ |= 0x00000200; + } + if (streamTunnelConfigBuilder_ == null) { + result.streamTunnelConfig_ = streamTunnelConfig_; + } else { + result.streamTunnelConfig_ = streamTunnelConfigBuilder_.build(); + } + if (((from_bitField0_ & 0x00000400) == 0x00000400)) { + to_bitField0_ |= 0x00000400; + } + result.createTime_ = createTime_; result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -4100,6 +4381,12 @@ public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Tunn if (other.hasPublic()) { setPublic(other.getPublic()); } + if (other.hasStreamTunnelConfig()) { + mergeStreamTunnelConfig(other.getStreamTunnelConfig()); + } + if (other.hasCreateTime()) { + setCreateTime(other.getCreateTime()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -4200,6 +4487,20 @@ public Builder mergeFrom( public_ = input.readBool(); break; } + case 82: { + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig.newBuilder(); + if (hasStreamTunnelConfig()) { + subBuilder.mergeFrom(getStreamTunnelConfig()); + } + input.readMessage(subBuilder, extensionRegistry); + setStreamTunnelConfig(subBuilder.buildPartial()); + break; + } + case 88: { + bitField0_ |= 0x00000400; + createTime_ = input.readInt64(); + break; + } } } } @@ -4500,6 +4801,117 @@ public Builder clearPublic() { return this; } + // optional .com.alicloud.openservices.tablestore.core.protocol.StreamTunnelConfig stream_tunnel_config = 10; + private com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig streamTunnelConfig_ = com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig.Builder, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfigOrBuilder> streamTunnelConfigBuilder_; + public boolean hasStreamTunnelConfig() { + return ((bitField0_ & 0x00000200) == 0x00000200); + } + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig getStreamTunnelConfig() { + if (streamTunnelConfigBuilder_ == null) { + return streamTunnelConfig_; + } else { + return streamTunnelConfigBuilder_.getMessage(); + } + } + public Builder setStreamTunnelConfig(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig value) { + if (streamTunnelConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + streamTunnelConfig_ = value; + onChanged(); + } else { + streamTunnelConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + return this; + } + public Builder setStreamTunnelConfig( + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig.Builder builderForValue) { + if (streamTunnelConfigBuilder_ == null) { + streamTunnelConfig_ = builderForValue.build(); + onChanged(); + } else { + streamTunnelConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + return this; + } + public Builder mergeStreamTunnelConfig(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig value) { + if (streamTunnelConfigBuilder_ == null) { + if (((bitField0_ & 0x00000200) == 0x00000200) && + streamTunnelConfig_ != com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig.getDefaultInstance()) { + streamTunnelConfig_ = + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig.newBuilder(streamTunnelConfig_).mergeFrom(value).buildPartial(); + } else { + streamTunnelConfig_ = value; + } + onChanged(); + } else { + streamTunnelConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000200; + return this; + } + public Builder clearStreamTunnelConfig() { + if (streamTunnelConfigBuilder_ == null) { + streamTunnelConfig_ = com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig.getDefaultInstance(); + onChanged(); + } else { + streamTunnelConfigBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000200); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig.Builder getStreamTunnelConfigBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return getStreamTunnelConfigFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfigOrBuilder getStreamTunnelConfigOrBuilder() { + if (streamTunnelConfigBuilder_ != null) { + return streamTunnelConfigBuilder_.getMessageOrBuilder(); + } else { + return streamTunnelConfig_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig.Builder, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfigOrBuilder> + getStreamTunnelConfigFieldBuilder() { + if (streamTunnelConfigBuilder_ == null) { + streamTunnelConfigBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig.Builder, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfigOrBuilder>( + streamTunnelConfig_, + getParentForChildren(), + isClean()); + streamTunnelConfig_ = null; + } + return streamTunnelConfigBuilder_; + } + + // optional int64 create_time = 11; + private long createTime_ ; + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000400) == 0x00000400); + } + public long getCreateTime() { + return createTime_; + } + public Builder setCreateTime(long value) { + bitField0_ |= 0x00000400; + createTime_ = value; + onChanged(); + return this; + } + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000400); + createTime_ = 0L; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.TunnelInfo) } @@ -12007,7 +12419,7 @@ public Builder mergeFrom( // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.ShutdownResponse) } - public interface LockChannelRequestOrBuilder + public interface GetCheckpointRequestOrBuilder extends com.google.protobuf.MessageOrBuilder { // required string tunnel_id = 1; @@ -12021,41 +12433,33 @@ public interface LockChannelRequestOrBuilder // required string channel_id = 3; boolean hasChannelId(); String getChannelId(); - - // required string lock_id = 4; - boolean hasLockId(); - String getLockId(); - - // required int64 timeout = 5; - boolean hasTimeout(); - long getTimeout(); } - public static final class LockChannelRequest extends + public static final class GetCheckpointRequest extends com.google.protobuf.GeneratedMessage - implements LockChannelRequestOrBuilder { - // Use LockChannelRequest.newBuilder() to construct. - private LockChannelRequest(Builder builder) { + implements GetCheckpointRequestOrBuilder { + // Use GetCheckpointRequest.newBuilder() to construct. + private GetCheckpointRequest(Builder builder) { super(builder); } - private LockChannelRequest(boolean noInit) {} + private GetCheckpointRequest(boolean noInit) {} - private static final LockChannelRequest defaultInstance; - public static LockChannelRequest getDefaultInstance() { + private static final GetCheckpointRequest defaultInstance; + public static GetCheckpointRequest getDefaultInstance() { return defaultInstance; } - public LockChannelRequest getDefaultInstanceForType() { + public GetCheckpointRequest getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_LockChannelRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetCheckpointRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_LockChannelRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetCheckpointRequest_fieldAccessorTable; } private int bitField0_; @@ -12155,54 +12559,10 @@ private com.google.protobuf.ByteString getChannelIdBytes() { } } - // required string lock_id = 4; - public static final int LOCK_ID_FIELD_NUMBER = 4; - private java.lang.Object lockId_; - public boolean hasLockId() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public String getLockId() { - java.lang.Object ref = lockId_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - lockId_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getLockIdBytes() { - java.lang.Object ref = lockId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - lockId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // required int64 timeout = 5; - public static final int TIMEOUT_FIELD_NUMBER = 5; - private long timeout_; - public boolean hasTimeout() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - public long getTimeout() { - return timeout_; - } - private void initFields() { tunnelId_ = ""; clientId_ = ""; channelId_ = ""; - lockId_ = ""; - timeout_ = 0L; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -12221,14 +12581,6 @@ public final boolean isInitialized() { memoizedIsInitialized = 0; return false; } - if (!hasLockId()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasTimeout()) { - memoizedIsInitialized = 0; - return false; - } memoizedIsInitialized = 1; return true; } @@ -12245,12 +12597,6 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBytes(3, getChannelIdBytes()); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeBytes(4, getLockIdBytes()); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeInt64(5, timeout_); - } getUnknownFields().writeTo(output); } @@ -12272,14 +12618,6 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeBytesSize(3, getChannelIdBytes()); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(4, getLockIdBytes()); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(5, timeout_); - } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -12292,41 +12630,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelRequest parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelRequest parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelRequest parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -12335,7 +12673,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceAp return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelRequest parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -12346,12 +12684,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceAp return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -12361,7 +12699,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceAp public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelRequest prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -12374,18 +12712,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelRequestOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_LockChannelRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetCheckpointRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_LockChannelRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetCheckpointRequest_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelRequest.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -12410,10 +12748,6 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000002); channelId_ = ""; bitField0_ = (bitField0_ & ~0x00000004); - lockId_ = ""; - bitField0_ = (bitField0_ & ~0x00000008); - timeout_ = 0L; - bitField0_ = (bitField0_ & ~0x00000010); return this; } @@ -12423,24 +12757,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelRequest.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelRequest getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelRequest.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelRequest build() { - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelRequest result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest build() { + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelRequest buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelRequest result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -12448,8 +12782,8 @@ private com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Lock return result; } - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelRequest buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelRequest result = new com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelRequest(this); + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest result = new com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { @@ -12464,30 +12798,22 @@ public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockC to_bitField0_ |= 0x00000004; } result.channelId_ = channelId_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - result.lockId_ = lockId_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000010; - } - result.timeout_ = timeout_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelRequest) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelRequest)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelRequest other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelRequest.getDefaultInstance()) return this; + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest.getDefaultInstance()) return this; if (other.hasTunnelId()) { setTunnelId(other.getTunnelId()); } @@ -12497,12 +12823,6 @@ public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Tunn if (other.hasChannelId()) { setChannelId(other.getChannelId()); } - if (other.hasLockId()) { - setLockId(other.getLockId()); - } - if (other.hasTimeout()) { - setTimeout(other.getTimeout()); - } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -12520,14 +12840,6 @@ public final boolean isInitialized() { return false; } - if (!hasLockId()) { - - return false; - } - if (!hasTimeout()) { - - return false; - } return true; } @@ -12569,16 +12881,6 @@ public Builder mergeFrom( channelId_ = input.readBytes(); break; } - case 34: { - bitField0_ |= 0x00000008; - lockId_ = input.readBytes(); - break; - } - case 40: { - bitField0_ |= 0x00000010; - timeout_ = input.readInt64(); - break; - } } } } @@ -12693,112 +12995,116 @@ void setChannelId(com.google.protobuf.ByteString value) { onChanged(); } - // required string lock_id = 4; - private java.lang.Object lockId_ = ""; - public boolean hasLockId() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public String getLockId() { - java.lang.Object ref = lockId_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - lockId_ = s; - return s; - } else { - return (String) ref; - } - } - public Builder setLockId(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - lockId_ = value; - onChanged(); - return this; - } - public Builder clearLockId() { - bitField0_ = (bitField0_ & ~0x00000008); - lockId_ = getDefaultInstance().getLockId(); - onChanged(); - return this; - } - void setLockId(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000008; - lockId_ = value; - onChanged(); - } - - // required int64 timeout = 5; - private long timeout_ ; - public boolean hasTimeout() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - public long getTimeout() { - return timeout_; - } - public Builder setTimeout(long value) { - bitField0_ |= 0x00000010; - timeout_ = value; - onChanged(); - return this; - } - public Builder clearTimeout() { - bitField0_ = (bitField0_ & ~0x00000010); - timeout_ = 0L; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.LockChannelRequest) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GetCheckpointRequest) } static { - defaultInstance = new LockChannelRequest(true); + defaultInstance = new GetCheckpointRequest(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.LockChannelRequest) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GetCheckpointRequest) } - public interface LockChannelResponseOrBuilder + public interface GetCheckpointResponseOrBuilder extends com.google.protobuf.MessageOrBuilder { + + // required string checkpoint = 1; + boolean hasCheckpoint(); + String getCheckpoint(); + + // required int64 sequence_number = 2; + boolean hasSequenceNumber(); + long getSequenceNumber(); } - public static final class LockChannelResponse extends + public static final class GetCheckpointResponse extends com.google.protobuf.GeneratedMessage - implements LockChannelResponseOrBuilder { - // Use LockChannelResponse.newBuilder() to construct. - private LockChannelResponse(Builder builder) { + implements GetCheckpointResponseOrBuilder { + // Use GetCheckpointResponse.newBuilder() to construct. + private GetCheckpointResponse(Builder builder) { super(builder); } - private LockChannelResponse(boolean noInit) {} + private GetCheckpointResponse(boolean noInit) {} - private static final LockChannelResponse defaultInstance; - public static LockChannelResponse getDefaultInstance() { + private static final GetCheckpointResponse defaultInstance; + public static GetCheckpointResponse getDefaultInstance() { return defaultInstance; } - public LockChannelResponse getDefaultInstanceForType() { + public GetCheckpointResponse getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_LockChannelResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetCheckpointResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_LockChannelResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetCheckpointResponse_fieldAccessorTable; + } + + private int bitField0_; + // required string checkpoint = 1; + public static final int CHECKPOINT_FIELD_NUMBER = 1; + private java.lang.Object checkpoint_; + public boolean hasCheckpoint() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getCheckpoint() { + java.lang.Object ref = checkpoint_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + checkpoint_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getCheckpointBytes() { + java.lang.Object ref = checkpoint_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + checkpoint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // required int64 sequence_number = 2; + public static final int SEQUENCE_NUMBER_FIELD_NUMBER = 2; + private long sequenceNumber_; + public boolean hasSequenceNumber() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public long getSequenceNumber() { + return sequenceNumber_; } private void initFields() { + checkpoint_ = ""; + sequenceNumber_ = 0L; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; + if (!hasCheckpoint()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasSequenceNumber()) { + memoizedIsInitialized = 0; + return false; + } memoizedIsInitialized = 1; return true; } @@ -12806,6 +13112,12 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getCheckpointBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeInt64(2, sequenceNumber_); + } getUnknownFields().writeTo(output); } @@ -12815,6 +13127,14 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getCheckpointBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, sequenceNumber_); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -12827,41 +13147,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelResponse parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelResponse parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelResponse parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -12870,7 +13190,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceAp return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelResponse parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -12881,12 +13201,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceAp return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -12896,7 +13216,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceAp public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelResponse prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -12909,18 +13229,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelResponseOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_LockChannelResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetCheckpointResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_LockChannelResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetCheckpointResponse_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelResponse.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -12939,6 +13259,10 @@ private static Builder create() { public Builder clear() { super.clear(); + checkpoint_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + sequenceNumber_ = 0L; + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -12948,24 +13272,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelResponse.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelResponse getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelResponse.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelResponse build() { - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelResponse result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse build() { + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelResponse buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelResponse result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -12973,28 +13297,53 @@ private com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Lock return result; } - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelResponse buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelResponse result = new com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelResponse(this); + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse result = new com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.checkpoint_ = checkpoint_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.sequenceNumber_ = sequenceNumber_; + result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelResponse) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelResponse)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelResponse other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelResponse.getDefaultInstance()) return this; + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse.getDefaultInstance()) return this; + if (other.hasCheckpoint()) { + setCheckpoint(other.getCheckpoint()); + } + if (other.hasSequenceNumber()) { + setSequenceNumber(other.getSequenceNumber()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { + if (!hasCheckpoint()) { + + return false; + } + if (!hasSequenceNumber()) { + + return false; + } return true; } @@ -13021,23 +13370,91 @@ public Builder mergeFrom( } break; } - } - } + case 10: { + bitField0_ |= 0x00000001; + checkpoint_ = input.readBytes(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + sequenceNumber_ = input.readInt64(); + break; + } + } + } + } + + private int bitField0_; + + // required string checkpoint = 1; + private java.lang.Object checkpoint_ = ""; + public boolean hasCheckpoint() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getCheckpoint() { + java.lang.Object ref = checkpoint_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + checkpoint_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setCheckpoint(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + checkpoint_ = value; + onChanged(); + return this; + } + public Builder clearCheckpoint() { + bitField0_ = (bitField0_ & ~0x00000001); + checkpoint_ = getDefaultInstance().getCheckpoint(); + onChanged(); + return this; + } + void setCheckpoint(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + checkpoint_ = value; + onChanged(); } + // required int64 sequence_number = 2; + private long sequenceNumber_ ; + public boolean hasSequenceNumber() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public long getSequenceNumber() { + return sequenceNumber_; + } + public Builder setSequenceNumber(long value) { + bitField0_ |= 0x00000002; + sequenceNumber_ = value; + onChanged(); + return this; + } + public Builder clearSequenceNumber() { + bitField0_ = (bitField0_ & ~0x00000002); + sequenceNumber_ = 0L; + onChanged(); + return this; + } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.LockChannelResponse) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GetCheckpointResponse) } static { - defaultInstance = new LockChannelResponse(true); + defaultInstance = new GetCheckpointResponse(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.LockChannelResponse) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GetCheckpointResponse) } - public interface UnlockChannelRequestOrBuilder + public interface CheckpointRequestOrBuilder extends com.google.protobuf.MessageOrBuilder { // required string tunnel_id = 1; @@ -13052,36 +13469,40 @@ public interface UnlockChannelRequestOrBuilder boolean hasChannelId(); String getChannelId(); - // required string lock_id = 4; - boolean hasLockId(); - String getLockId(); + // required string checkpoint = 4; + boolean hasCheckpoint(); + String getCheckpoint(); + + // required int64 sequence_number = 5; + boolean hasSequenceNumber(); + long getSequenceNumber(); } - public static final class UnlockChannelRequest extends + public static final class CheckpointRequest extends com.google.protobuf.GeneratedMessage - implements UnlockChannelRequestOrBuilder { - // Use UnlockChannelRequest.newBuilder() to construct. - private UnlockChannelRequest(Builder builder) { + implements CheckpointRequestOrBuilder { + // Use CheckpointRequest.newBuilder() to construct. + private CheckpointRequest(Builder builder) { super(builder); } - private UnlockChannelRequest(boolean noInit) {} + private CheckpointRequest(boolean noInit) {} - private static final UnlockChannelRequest defaultInstance; - public static UnlockChannelRequest getDefaultInstance() { + private static final CheckpointRequest defaultInstance; + public static CheckpointRequest getDefaultInstance() { return defaultInstance; } - public UnlockChannelRequest getDefaultInstanceForType() { + public CheckpointRequest getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UnlockChannelRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CheckpointRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UnlockChannelRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CheckpointRequest_fieldAccessorTable; } private int bitField0_; @@ -13181,14 +13602,14 @@ private com.google.protobuf.ByteString getChannelIdBytes() { } } - // required string lock_id = 4; - public static final int LOCK_ID_FIELD_NUMBER = 4; - private java.lang.Object lockId_; - public boolean hasLockId() { + // required string checkpoint = 4; + public static final int CHECKPOINT_FIELD_NUMBER = 4; + private java.lang.Object checkpoint_; + public boolean hasCheckpoint() { return ((bitField0_ & 0x00000008) == 0x00000008); } - public String getLockId() { - java.lang.Object ref = lockId_; + public String getCheckpoint() { + java.lang.Object ref = checkpoint_; if (ref instanceof String) { return (String) ref; } else { @@ -13196,28 +13617,39 @@ public String getLockId() { (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); if (com.google.protobuf.Internal.isValidUtf8(bs)) { - lockId_ = s; + checkpoint_ = s; } return s; } } - private com.google.protobuf.ByteString getLockIdBytes() { - java.lang.Object ref = lockId_; + private com.google.protobuf.ByteString getCheckpointBytes() { + java.lang.Object ref = checkpoint_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((String) ref); - lockId_ = b; + checkpoint_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + // required int64 sequence_number = 5; + public static final int SEQUENCE_NUMBER_FIELD_NUMBER = 5; + private long sequenceNumber_; + public boolean hasSequenceNumber() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public long getSequenceNumber() { + return sequenceNumber_; + } + private void initFields() { tunnelId_ = ""; clientId_ = ""; channelId_ = ""; - lockId_ = ""; + checkpoint_ = ""; + sequenceNumber_ = 0L; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -13236,7 +13668,11 @@ public final boolean isInitialized() { memoizedIsInitialized = 0; return false; } - if (!hasLockId()) { + if (!hasCheckpoint()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasSequenceNumber()) { memoizedIsInitialized = 0; return false; } @@ -13257,7 +13693,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) output.writeBytes(3, getChannelIdBytes()); } if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeBytes(4, getLockIdBytes()); + output.writeBytes(4, getCheckpointBytes()); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeInt64(5, sequenceNumber_); } getUnknownFields().writeTo(output); } @@ -13282,7 +13721,11 @@ public int getSerializedSize() { } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(4, getLockIdBytes()); + .computeBytesSize(4, getCheckpointBytes()); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(5, sequenceNumber_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -13296,41 +13739,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelRequest parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelRequest parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelRequest parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -13339,7 +13782,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceAp return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelRequest parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -13350,12 +13793,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceAp return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -13365,7 +13808,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceAp public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelRequest prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -13378,18 +13821,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelRequestOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UnlockChannelRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CheckpointRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UnlockChannelRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CheckpointRequest_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelRequest.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -13414,8 +13857,10 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000002); channelId_ = ""; bitField0_ = (bitField0_ & ~0x00000004); - lockId_ = ""; + checkpoint_ = ""; bitField0_ = (bitField0_ & ~0x00000008); + sequenceNumber_ = 0L; + bitField0_ = (bitField0_ & ~0x00000010); return this; } @@ -13425,24 +13870,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelRequest.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelRequest getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelRequest.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelRequest build() { - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelRequest result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest build() { + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelRequest buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelRequest result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -13450,8 +13895,8 @@ private com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Unlo return result; } - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelRequest buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelRequest result = new com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelRequest(this); + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest result = new com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { @@ -13469,23 +13914,27 @@ public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Unloc if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; } - result.lockId_ = lockId_; + result.checkpoint_ = checkpoint_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + result.sequenceNumber_ = sequenceNumber_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelRequest) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelRequest)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelRequest other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelRequest.getDefaultInstance()) return this; + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest.getDefaultInstance()) return this; if (other.hasTunnelId()) { setTunnelId(other.getTunnelId()); } @@ -13495,8 +13944,11 @@ public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Tunn if (other.hasChannelId()) { setChannelId(other.getChannelId()); } - if (other.hasLockId()) { - setLockId(other.getLockId()); + if (other.hasCheckpoint()) { + setCheckpoint(other.getCheckpoint()); + } + if (other.hasSequenceNumber()) { + setSequenceNumber(other.getSequenceNumber()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -13515,7 +13967,11 @@ public final boolean isInitialized() { return false; } - if (!hasLockId()) { + if (!hasCheckpoint()) { + + return false; + } + if (!hasSequenceNumber()) { return false; } @@ -13562,7 +14018,12 @@ public Builder mergeFrom( } case 34: { bitField0_ |= 0x00000008; - lockId_ = input.readBytes(); + checkpoint_ = input.readBytes(); + break; + } + case 40: { + bitField0_ |= 0x00000010; + sequenceNumber_ = input.readInt64(); break; } } @@ -13679,82 +14140,103 @@ void setChannelId(com.google.protobuf.ByteString value) { onChanged(); } - // required string lock_id = 4; - private java.lang.Object lockId_ = ""; - public boolean hasLockId() { + // required string checkpoint = 4; + private java.lang.Object checkpoint_ = ""; + public boolean hasCheckpoint() { return ((bitField0_ & 0x00000008) == 0x00000008); } - public String getLockId() { - java.lang.Object ref = lockId_; + public String getCheckpoint() { + java.lang.Object ref = checkpoint_; if (!(ref instanceof String)) { String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - lockId_ = s; + checkpoint_ = s; return s; } else { return (String) ref; } } - public Builder setLockId(String value) { + public Builder setCheckpoint(String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000008; - lockId_ = value; + checkpoint_ = value; onChanged(); return this; } - public Builder clearLockId() { + public Builder clearCheckpoint() { bitField0_ = (bitField0_ & ~0x00000008); - lockId_ = getDefaultInstance().getLockId(); + checkpoint_ = getDefaultInstance().getCheckpoint(); onChanged(); return this; } - void setLockId(com.google.protobuf.ByteString value) { + void setCheckpoint(com.google.protobuf.ByteString value) { bitField0_ |= 0x00000008; - lockId_ = value; + checkpoint_ = value; + onChanged(); + } + + // required int64 sequence_number = 5; + private long sequenceNumber_ ; + public boolean hasSequenceNumber() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public long getSequenceNumber() { + return sequenceNumber_; + } + public Builder setSequenceNumber(long value) { + bitField0_ |= 0x00000010; + sequenceNumber_ = value; + onChanged(); + return this; + } + public Builder clearSequenceNumber() { + bitField0_ = (bitField0_ & ~0x00000010); + sequenceNumber_ = 0L; onChanged(); + return this; } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.UnlockChannelRequest) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.CheckpointRequest) } static { - defaultInstance = new UnlockChannelRequest(true); + defaultInstance = new CheckpointRequest(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.UnlockChannelRequest) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.CheckpointRequest) } - public interface UnlockChannelResponseOrBuilder + public interface CheckpointResponseOrBuilder extends com.google.protobuf.MessageOrBuilder { } - public static final class UnlockChannelResponse extends + public static final class CheckpointResponse extends com.google.protobuf.GeneratedMessage - implements UnlockChannelResponseOrBuilder { - // Use UnlockChannelResponse.newBuilder() to construct. - private UnlockChannelResponse(Builder builder) { + implements CheckpointResponseOrBuilder { + // Use CheckpointResponse.newBuilder() to construct. + private CheckpointResponse(Builder builder) { super(builder); } - private UnlockChannelResponse(boolean noInit) {} + private CheckpointResponse(boolean noInit) {} - private static final UnlockChannelResponse defaultInstance; - public static UnlockChannelResponse getDefaultInstance() { + private static final CheckpointResponse defaultInstance; + public static CheckpointResponse getDefaultInstance() { return defaultInstance; } - public UnlockChannelResponse getDefaultInstanceForType() { + public CheckpointResponse getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UnlockChannelResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CheckpointResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UnlockChannelResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CheckpointResponse_fieldAccessorTable; } private void initFields() { @@ -13792,41 +14274,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelResponse parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelResponse parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelResponse parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -13835,7 +14317,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceAp return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelResponse parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -13846,12 +14328,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceAp return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -13861,7 +14343,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceAp public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelResponse prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -13874,18 +14356,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelResponseOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UnlockChannelResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CheckpointResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_UnlockChannelResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CheckpointResponse_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelResponse.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -13913,24 +14395,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelResponse.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelResponse getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelResponse.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelResponse build() { - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelResponse result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse build() { + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelResponse buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelResponse result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -13938,23 +14420,23 @@ private com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Unlo return result; } - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelResponse buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelResponse result = new com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelResponse(this); + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse result = new com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse(this); onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelResponse) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelResponse)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelResponse other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelResponse.getDefaultInstance()) return this; + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse.getDefaultInstance()) return this; this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -13991,18 +14473,18 @@ public Builder mergeFrom( } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.UnlockChannelResponse) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.CheckpointResponse) } static { - defaultInstance = new UnlockChannelResponse(true); + defaultInstance = new CheckpointResponse(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.UnlockChannelResponse) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.CheckpointResponse) } - public interface GetCheckpointRequestOrBuilder + public interface ReadRecordsRequestOrBuilder extends com.google.protobuf.MessageOrBuilder { // required string tunnel_id = 1; @@ -14016,33 +14498,37 @@ public interface GetCheckpointRequestOrBuilder // required string channel_id = 3; boolean hasChannelId(); String getChannelId(); + + // required string token = 4; + boolean hasToken(); + String getToken(); } - public static final class GetCheckpointRequest extends + public static final class ReadRecordsRequest extends com.google.protobuf.GeneratedMessage - implements GetCheckpointRequestOrBuilder { - // Use GetCheckpointRequest.newBuilder() to construct. - private GetCheckpointRequest(Builder builder) { + implements ReadRecordsRequestOrBuilder { + // Use ReadRecordsRequest.newBuilder() to construct. + private ReadRecordsRequest(Builder builder) { super(builder); } - private GetCheckpointRequest(boolean noInit) {} + private ReadRecordsRequest(boolean noInit) {} - private static final GetCheckpointRequest defaultInstance; - public static GetCheckpointRequest getDefaultInstance() { + private static final ReadRecordsRequest defaultInstance; + public static ReadRecordsRequest getDefaultInstance() { return defaultInstance; } - public GetCheckpointRequest getDefaultInstanceForType() { + public ReadRecordsRequest getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetCheckpointRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ReadRecordsRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetCheckpointRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ReadRecordsRequest_fieldAccessorTable; } private int bitField0_; @@ -14142,10 +14628,43 @@ private com.google.protobuf.ByteString getChannelIdBytes() { } } + // required string token = 4; + public static final int TOKEN_FIELD_NUMBER = 4; + private java.lang.Object token_; + public boolean hasToken() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public String getToken() { + java.lang.Object ref = token_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + token_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTokenBytes() { + java.lang.Object ref = token_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + token_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private void initFields() { tunnelId_ = ""; clientId_ = ""; channelId_ = ""; + token_ = ""; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -14164,6 +14683,10 @@ public final boolean isInitialized() { memoizedIsInitialized = 0; return false; } + if (!hasToken()) { + memoizedIsInitialized = 0; + return false; + } memoizedIsInitialized = 1; return true; } @@ -14180,6 +14703,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBytes(3, getChannelIdBytes()); } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeBytes(4, getTokenBytes()); + } getUnknownFields().writeTo(output); } @@ -14201,6 +14727,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeBytesSize(3, getChannelIdBytes()); } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(4, getTokenBytes()); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -14213,41 +14743,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -14256,7 +14786,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceAp return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -14267,12 +14797,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceAp return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -14282,7 +14812,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceAp public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -14295,18 +14825,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequestOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetCheckpointRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ReadRecordsRequest_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetCheckpointRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ReadRecordsRequest_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -14331,6 +14861,8 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000002); channelId_ = ""; bitField0_ = (bitField0_ & ~0x00000004); + token_ = ""; + bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -14340,24 +14872,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest build() { - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest build() { + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -14365,8 +14897,8 @@ private com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetC return result; } - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest result = new com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest(this); + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest result = new com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { @@ -14381,22 +14913,26 @@ public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCh to_bitField0_ |= 0x00000004; } result.channelId_ = channelId_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.token_ = token_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest.getDefaultInstance()) return this; + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest.getDefaultInstance()) return this; if (other.hasTunnelId()) { setTunnelId(other.getTunnelId()); } @@ -14406,6 +14942,9 @@ public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Tunn if (other.hasChannelId()) { setChannelId(other.getChannelId()); } + if (other.hasToken()) { + setToken(other.getToken()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -14423,6 +14962,10 @@ public final boolean isInitialized() { return false; } + if (!hasToken()) { + + return false; + } return true; } @@ -14464,6 +15007,11 @@ public Builder mergeFrom( channelId_ = input.readBytes(); break; } + case 34: { + bitField0_ |= 0x00000008; + token_ = input.readBytes(); + break; + } } } } @@ -14578,113 +15126,127 @@ void setChannelId(com.google.protobuf.ByteString value) { onChanged(); } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GetCheckpointRequest) + // required string token = 4; + private java.lang.Object token_ = ""; + public boolean hasToken() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public String getToken() { + java.lang.Object ref = token_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + token_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setToken(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + token_ = value; + onChanged(); + return this; + } + public Builder clearToken() { + bitField0_ = (bitField0_ & ~0x00000008); + token_ = getDefaultInstance().getToken(); + onChanged(); + return this; + } + void setToken(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000008; + token_ = value; + onChanged(); + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.ReadRecordsRequest) } static { - defaultInstance = new GetCheckpointRequest(true); + defaultInstance = new ReadRecordsRequest(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GetCheckpointRequest) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.ReadRecordsRequest) } - public interface GetCheckpointResponseOrBuilder + public interface RecordOrBuilder extends com.google.protobuf.MessageOrBuilder { - // required string checkpoint = 1; - boolean hasCheckpoint(); - String getCheckpoint(); + // required .com.alicloud.openservices.tablestore.core.protocol.ActionType action_type = 1; + boolean hasActionType(); + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ActionType getActionType(); - // required int64 sequence_number = 2; - boolean hasSequenceNumber(); - long getSequenceNumber(); + // required bytes record = 2; + boolean hasRecord(); + com.google.protobuf.ByteString getRecord(); } - public static final class GetCheckpointResponse extends + public static final class Record extends com.google.protobuf.GeneratedMessage - implements GetCheckpointResponseOrBuilder { - // Use GetCheckpointResponse.newBuilder() to construct. - private GetCheckpointResponse(Builder builder) { + implements RecordOrBuilder { + // Use Record.newBuilder() to construct. + private Record(Builder builder) { super(builder); } - private GetCheckpointResponse(boolean noInit) {} + private Record(boolean noInit) {} - private static final GetCheckpointResponse defaultInstance; - public static GetCheckpointResponse getDefaultInstance() { + private static final Record defaultInstance; + public static Record getDefaultInstance() { return defaultInstance; } - public GetCheckpointResponse getDefaultInstanceForType() { + public Record getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetCheckpointResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_Record_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetCheckpointResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_Record_fieldAccessorTable; } private int bitField0_; - // required string checkpoint = 1; - public static final int CHECKPOINT_FIELD_NUMBER = 1; - private java.lang.Object checkpoint_; - public boolean hasCheckpoint() { + // required .com.alicloud.openservices.tablestore.core.protocol.ActionType action_type = 1; + public static final int ACTION_TYPE_FIELD_NUMBER = 1; + private com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ActionType actionType_; + public boolean hasActionType() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getCheckpoint() { - java.lang.Object ref = checkpoint_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - checkpoint_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getCheckpointBytes() { - java.lang.Object ref = checkpoint_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - checkpoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ActionType getActionType() { + return actionType_; } - // required int64 sequence_number = 2; - public static final int SEQUENCE_NUMBER_FIELD_NUMBER = 2; - private long sequenceNumber_; - public boolean hasSequenceNumber() { + // required bytes record = 2; + public static final int RECORD_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString record_; + public boolean hasRecord() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public long getSequenceNumber() { - return sequenceNumber_; + public com.google.protobuf.ByteString getRecord() { + return record_; } private void initFields() { - checkpoint_ = ""; - sequenceNumber_ = 0L; + actionType_ = com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ActionType.PUT_ROW; + record_ = com.google.protobuf.ByteString.EMPTY; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - if (!hasCheckpoint()) { + if (!hasActionType()) { memoizedIsInitialized = 0; return false; } - if (!hasSequenceNumber()) { + if (!hasRecord()) { memoizedIsInitialized = 0; return false; } @@ -14696,10 +15258,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getCheckpointBytes()); + output.writeEnum(1, actionType_.getNumber()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeInt64(2, sequenceNumber_); + output.writeBytes(2, record_); } getUnknownFields().writeTo(output); } @@ -14712,11 +15274,11 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getCheckpointBytes()); + .computeEnumSize(1, actionType_.getNumber()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeInt64Size(2, sequenceNumber_); + .computeBytesSize(2, record_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -14730,41 +15292,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -14773,7 +15335,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceAp return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -14784,12 +15346,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceAp return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -14799,7 +15361,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceAp public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -14812,18 +15374,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponseOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.RecordOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetCheckpointResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_Record_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_GetCheckpointResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_Record_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -14842,9 +15404,9 @@ private static Builder create() { public Builder clear() { super.clear(); - checkpoint_ = ""; + actionType_ = com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ActionType.PUT_ROW; bitField0_ = (bitField0_ & ~0x00000001); - sequenceNumber_ = 0L; + record_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -14855,24 +15417,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse build() { - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record build() { + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -14880,50 +15442,50 @@ private com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetC return result; } - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse result = new com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse(this); + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record result = new com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.checkpoint_ = checkpoint_; + result.actionType_ = actionType_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - result.sequenceNumber_ = sequenceNumber_; + result.record_ = record_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse.getDefaultInstance()) return this; - if (other.hasCheckpoint()) { - setCheckpoint(other.getCheckpoint()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record.getDefaultInstance()) return this; + if (other.hasActionType()) { + setActionType(other.getActionType()); } - if (other.hasSequenceNumber()) { - setSequenceNumber(other.getSequenceNumber()); + if (other.hasRecord()) { + setRecord(other.getRecord()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { - if (!hasCheckpoint()) { + if (!hasActionType()) { return false; } - if (!hasSequenceNumber()) { + if (!hasRecord()) { return false; } @@ -14953,14 +15515,20 @@ public Builder mergeFrom( } break; } - case 10: { - bitField0_ |= 0x00000001; - checkpoint_ = input.readBytes(); + case 8: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ActionType value = com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ActionType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + actionType_ = value; + } break; } - case 16: { + case 18: { bitField0_ |= 0x00000002; - sequenceNumber_ = input.readInt64(); + record_ = input.readBytes(); break; } } @@ -14969,230 +15537,140 @@ public Builder mergeFrom( private int bitField0_; - // required string checkpoint = 1; - private java.lang.Object checkpoint_ = ""; - public boolean hasCheckpoint() { + // required .com.alicloud.openservices.tablestore.core.protocol.ActionType action_type = 1; + private com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ActionType actionType_ = com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ActionType.PUT_ROW; + public boolean hasActionType() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getCheckpoint() { - java.lang.Object ref = checkpoint_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - checkpoint_ = s; - return s; - } else { - return (String) ref; - } + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ActionType getActionType() { + return actionType_; } - public Builder setCheckpoint(String value) { + public Builder setActionType(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ActionType value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - checkpoint_ = value; + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + actionType_ = value; onChanged(); return this; } - public Builder clearCheckpoint() { + public Builder clearActionType() { bitField0_ = (bitField0_ & ~0x00000001); - checkpoint_ = getDefaultInstance().getCheckpoint(); + actionType_ = com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ActionType.PUT_ROW; onChanged(); return this; } - void setCheckpoint(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; - checkpoint_ = value; - onChanged(); - } - // required int64 sequence_number = 2; - private long sequenceNumber_ ; - public boolean hasSequenceNumber() { + // required bytes record = 2; + private com.google.protobuf.ByteString record_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasRecord() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public long getSequenceNumber() { - return sequenceNumber_; + public com.google.protobuf.ByteString getRecord() { + return record_; } - public Builder setSequenceNumber(long value) { - bitField0_ |= 0x00000002; - sequenceNumber_ = value; + public Builder setRecord(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + record_ = value; onChanged(); return this; } - public Builder clearSequenceNumber() { + public Builder clearRecord() { bitField0_ = (bitField0_ & ~0x00000002); - sequenceNumber_ = 0L; + record_ = getDefaultInstance().getRecord(); onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.GetCheckpointResponse) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.Record) } static { - defaultInstance = new GetCheckpointResponse(true); + defaultInstance = new Record(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.GetCheckpointResponse) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.Record) } - public interface CheckpointRequestOrBuilder + public interface ReadRecordsResponseOrBuilder extends com.google.protobuf.MessageOrBuilder { - // required string tunnel_id = 1; - boolean hasTunnelId(); - String getTunnelId(); - - // required string client_id = 2; - boolean hasClientId(); - String getClientId(); - - // required string channel_id = 3; - boolean hasChannelId(); - String getChannelId(); - - // required string checkpoint = 4; - boolean hasCheckpoint(); - String getCheckpoint(); + // repeated .com.alicloud.openservices.tablestore.core.protocol.Record records = 1; + java.util.List + getRecordsList(); + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record getRecords(int index); + int getRecordsCount(); + java.util.List + getRecordsOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.RecordOrBuilder getRecordsOrBuilder( + int index); - // required int64 sequence_number = 5; - boolean hasSequenceNumber(); - long getSequenceNumber(); + // required string next_token = 2; + boolean hasNextToken(); + String getNextToken(); } - public static final class CheckpointRequest extends + public static final class ReadRecordsResponse extends com.google.protobuf.GeneratedMessage - implements CheckpointRequestOrBuilder { - // Use CheckpointRequest.newBuilder() to construct. - private CheckpointRequest(Builder builder) { + implements ReadRecordsResponseOrBuilder { + // Use ReadRecordsResponse.newBuilder() to construct. + private ReadRecordsResponse(Builder builder) { super(builder); } - private CheckpointRequest(boolean noInit) {} + private ReadRecordsResponse(boolean noInit) {} - private static final CheckpointRequest defaultInstance; - public static CheckpointRequest getDefaultInstance() { + private static final ReadRecordsResponse defaultInstance; + public static ReadRecordsResponse getDefaultInstance() { return defaultInstance; } - public CheckpointRequest getDefaultInstanceForType() { + public ReadRecordsResponse getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CheckpointRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ReadRecordsResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CheckpointRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ReadRecordsResponse_fieldAccessorTable; } private int bitField0_; - // required string tunnel_id = 1; - public static final int TUNNEL_ID_FIELD_NUMBER = 1; - private java.lang.Object tunnelId_; - public boolean hasTunnelId() { - return ((bitField0_ & 0x00000001) == 0x00000001); + // repeated .com.alicloud.openservices.tablestore.core.protocol.Record records = 1; + public static final int RECORDS_FIELD_NUMBER = 1; + private java.util.List records_; + public java.util.List getRecordsList() { + return records_; } - public String getTunnelId() { - java.lang.Object ref = tunnelId_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - tunnelId_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getTunnelIdBytes() { - java.lang.Object ref = tunnelId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - tunnelId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // required string client_id = 2; - public static final int CLIENT_ID_FIELD_NUMBER = 2; - private java.lang.Object clientId_; - public boolean hasClientId() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public String getClientId() { - java.lang.Object ref = clientId_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - clientId_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getClientIdBytes() { - java.lang.Object ref = clientId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - clientId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public java.util.List + getRecordsOrBuilderList() { + return records_; } - - // required string channel_id = 3; - public static final int CHANNEL_ID_FIELD_NUMBER = 3; - private java.lang.Object channelId_; - public boolean hasChannelId() { - return ((bitField0_ & 0x00000004) == 0x00000004); + public int getRecordsCount() { + return records_.size(); } - public String getChannelId() { - java.lang.Object ref = channelId_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - channelId_ = s; - } - return s; - } + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record getRecords(int index) { + return records_.get(index); } - private com.google.protobuf.ByteString getChannelIdBytes() { - java.lang.Object ref = channelId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - channelId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.RecordOrBuilder getRecordsOrBuilder( + int index) { + return records_.get(index); } - // required string checkpoint = 4; - public static final int CHECKPOINT_FIELD_NUMBER = 4; - private java.lang.Object checkpoint_; - public boolean hasCheckpoint() { - return ((bitField0_ & 0x00000008) == 0x00000008); + // required string next_token = 2; + public static final int NEXT_TOKEN_FIELD_NUMBER = 2; + private java.lang.Object nextToken_; + public boolean hasNextToken() { + return ((bitField0_ & 0x00000001) == 0x00000001); } - public String getCheckpoint() { - java.lang.Object ref = checkpoint_; + public String getNextToken() { + java.lang.Object ref = nextToken_; if (ref instanceof String) { return (String) ref; } else { @@ -15200,64 +15678,41 @@ public String getCheckpoint() { (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); if (com.google.protobuf.Internal.isValidUtf8(bs)) { - checkpoint_ = s; + nextToken_ = s; } return s; } } - private com.google.protobuf.ByteString getCheckpointBytes() { - java.lang.Object ref = checkpoint_; + private com.google.protobuf.ByteString getNextTokenBytes() { + java.lang.Object ref = nextToken_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((String) ref); - checkpoint_ = b; + nextToken_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - // required int64 sequence_number = 5; - public static final int SEQUENCE_NUMBER_FIELD_NUMBER = 5; - private long sequenceNumber_; - public boolean hasSequenceNumber() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - public long getSequenceNumber() { - return sequenceNumber_; - } - private void initFields() { - tunnelId_ = ""; - clientId_ = ""; - channelId_ = ""; - checkpoint_ = ""; - sequenceNumber_ = 0L; + records_ = java.util.Collections.emptyList(); + nextToken_ = ""; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - if (!hasTunnelId()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasClientId()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasChannelId()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasCheckpoint()) { + if (!hasNextToken()) { memoizedIsInitialized = 0; return false; } - if (!hasSequenceNumber()) { - memoizedIsInitialized = 0; - return false; + for (int i = 0; i < getRecordsCount(); i++) { + if (!getRecords(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } } memoizedIsInitialized = 1; return true; @@ -15266,20 +15721,11 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getTunnelIdBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getClientIdBytes()); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeBytes(3, getChannelIdBytes()); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeBytes(4, getCheckpointBytes()); + for (int i = 0; i < records_.size(); i++) { + output.writeMessage(1, records_.get(i)); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeInt64(5, sequenceNumber_); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(2, getNextTokenBytes()); } getUnknownFields().writeTo(output); } @@ -15290,25 +15736,13 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getTunnelIdBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getClientIdBytes()); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(3, getChannelIdBytes()); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { + for (int i = 0; i < records_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(4, getCheckpointBytes()); + .computeMessageSize(1, records_.get(i)); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeInt64Size(5, sequenceNumber_); + .computeBytesSize(2, getNextTokenBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -15322,41 +15756,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -15365,7 +15799,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceAp return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -15376,12 +15810,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceAp return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -15391,7 +15825,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceAp public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -15404,18 +15838,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequestOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CheckpointRequest_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ReadRecordsResponse_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CheckpointRequest_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ReadRecordsResponse_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -15426,6 +15860,7 @@ private Builder(BuilderParent parent) { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getRecordsFieldBuilder(); } } private static Builder create() { @@ -15434,16 +15869,14 @@ private static Builder create() { public Builder clear() { super.clear(); - tunnelId_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - clientId_ = ""; + if (recordsBuilder_ == null) { + records_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + recordsBuilder_.clear(); + } + nextToken_ = ""; bitField0_ = (bitField0_ & ~0x00000002); - channelId_ = ""; - bitField0_ = (bitField0_ & ~0x00000004); - checkpoint_ = ""; - bitField0_ = (bitField0_ & ~0x00000008); - sequenceNumber_ = 0L; - bitField0_ = (bitField0_ & ~0x00000010); return this; } @@ -15453,24 +15886,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest build() { - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse build() { + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -15478,85 +15911,82 @@ private com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Chec return result; } - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest result = new com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest(this); + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse result = new com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.tunnelId_ = tunnelId_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.clientId_ = clientId_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.channelId_ = channelId_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; + if (recordsBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + records_ = java.util.Collections.unmodifiableList(records_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.records_ = records_; + } else { + result.records_ = recordsBuilder_.build(); } - result.checkpoint_ = checkpoint_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000010; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000001; } - result.sequenceNumber_ = sequenceNumber_; + result.nextToken_ = nextToken_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest.getDefaultInstance()) return this; - if (other.hasTunnelId()) { - setTunnelId(other.getTunnelId()); - } - if (other.hasClientId()) { - setClientId(other.getClientId()); - } - if (other.hasChannelId()) { - setChannelId(other.getChannelId()); - } - if (other.hasCheckpoint()) { - setCheckpoint(other.getCheckpoint()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse.getDefaultInstance()) return this; + if (recordsBuilder_ == null) { + if (!other.records_.isEmpty()) { + if (records_.isEmpty()) { + records_ = other.records_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRecordsIsMutable(); + records_.addAll(other.records_); + } + onChanged(); + } + } else { + if (!other.records_.isEmpty()) { + if (recordsBuilder_.isEmpty()) { + recordsBuilder_.dispose(); + recordsBuilder_ = null; + records_ = other.records_; + bitField0_ = (bitField0_ & ~0x00000001); + recordsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getRecordsFieldBuilder() : null; + } else { + recordsBuilder_.addAllMessages(other.records_); + } + } } - if (other.hasSequenceNumber()) { - setSequenceNumber(other.getSequenceNumber()); + if (other.hasNextToken()) { + setNextToken(other.getNextToken()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { - if (!hasTunnelId()) { - - return false; - } - if (!hasClientId()) { - - return false; - } - if (!hasChannelId()) { - - return false; - } - if (!hasCheckpoint()) { + if (!hasNextToken()) { return false; } - if (!hasSequenceNumber()) { - - return false; + for (int i = 0; i < getRecordsCount(); i++) { + if (!getRecords(i).isInitialized()) { + + return false; + } } return true; } @@ -15585,28 +16015,14 @@ public Builder mergeFrom( break; } case 10: { - bitField0_ |= 0x00000001; - tunnelId_ = input.readBytes(); + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addRecords(subBuilder.buildPartial()); break; } case 18: { bitField0_ |= 0x00000002; - clientId_ = input.readBytes(); - break; - } - case 26: { - bitField0_ |= 0x00000004; - channelId_ = input.readBytes(); - break; - } - case 34: { - bitField0_ |= 0x00000008; - checkpoint_ = input.readBytes(); - break; - } - case 40: { - bitField0_ |= 0x00000010; - sequenceNumber_ = input.readInt64(); + nextToken_ = input.readBytes(); break; } } @@ -15615,220 +16031,316 @@ public Builder mergeFrom( private int bitField0_; - // required string tunnel_id = 1; - private java.lang.Object tunnelId_ = ""; - public boolean hasTunnelId() { - return ((bitField0_ & 0x00000001) == 0x00000001); + // repeated .com.alicloud.openservices.tablestore.core.protocol.Record records = 1; + private java.util.List records_ = + java.util.Collections.emptyList(); + private void ensureRecordsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + records_ = new java.util.ArrayList(records_); + bitField0_ |= 0x00000001; + } } - public String getTunnelId() { - java.lang.Object ref = tunnelId_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - tunnelId_ = s; - return s; + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record.Builder, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.RecordOrBuilder> recordsBuilder_; + + public java.util.List getRecordsList() { + if (recordsBuilder_ == null) { + return java.util.Collections.unmodifiableList(records_); } else { - return (String) ref; + return recordsBuilder_.getMessageList(); } } - public Builder setTunnelId(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - tunnelId_ = value; - onChanged(); - return this; - } - public Builder clearTunnelId() { - bitField0_ = (bitField0_ & ~0x00000001); - tunnelId_ = getDefaultInstance().getTunnelId(); - onChanged(); - return this; - } - void setTunnelId(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; - tunnelId_ = value; - onChanged(); - } - - // required string client_id = 2; - private java.lang.Object clientId_ = ""; - public boolean hasClientId() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public String getClientId() { - java.lang.Object ref = clientId_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - clientId_ = s; - return s; + public int getRecordsCount() { + if (recordsBuilder_ == null) { + return records_.size(); } else { - return (String) ref; + return recordsBuilder_.getCount(); } } - public Builder setClientId(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - clientId_ = value; - onChanged(); - return this; + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record getRecords(int index) { + if (recordsBuilder_ == null) { + return records_.get(index); + } else { + return recordsBuilder_.getMessage(index); + } } - public Builder clearClientId() { - bitField0_ = (bitField0_ & ~0x00000002); - clientId_ = getDefaultInstance().getClientId(); - onChanged(); + public Builder setRecords( + int index, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record value) { + if (recordsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRecordsIsMutable(); + records_.set(index, value); + onChanged(); + } else { + recordsBuilder_.setMessage(index, value); + } return this; } - void setClientId(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000002; - clientId_ = value; - onChanged(); - } - - // required string channel_id = 3; - private java.lang.Object channelId_ = ""; - public boolean hasChannelId() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public String getChannelId() { - java.lang.Object ref = channelId_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - channelId_ = s; - return s; + public Builder setRecords( + int index, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record.Builder builderForValue) { + if (recordsBuilder_ == null) { + ensureRecordsIsMutable(); + records_.set(index, builderForValue.build()); + onChanged(); } else { - return (String) ref; + recordsBuilder_.setMessage(index, builderForValue.build()); } - } - public Builder setChannelId(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - channelId_ = value; - onChanged(); return this; } - public Builder clearChannelId() { - bitField0_ = (bitField0_ & ~0x00000004); - channelId_ = getDefaultInstance().getChannelId(); - onChanged(); + public Builder addRecords(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record value) { + if (recordsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRecordsIsMutable(); + records_.add(value); + onChanged(); + } else { + recordsBuilder_.addMessage(value); + } return this; } - void setChannelId(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000004; - channelId_ = value; - onChanged(); + public Builder addRecords( + int index, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record value) { + if (recordsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRecordsIsMutable(); + records_.add(index, value); + onChanged(); + } else { + recordsBuilder_.addMessage(index, value); + } + return this; + } + public Builder addRecords( + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record.Builder builderForValue) { + if (recordsBuilder_ == null) { + ensureRecordsIsMutable(); + records_.add(builderForValue.build()); + onChanged(); + } else { + recordsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + public Builder addRecords( + int index, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record.Builder builderForValue) { + if (recordsBuilder_ == null) { + ensureRecordsIsMutable(); + records_.add(index, builderForValue.build()); + onChanged(); + } else { + recordsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAllRecords( + java.lang.Iterable values) { + if (recordsBuilder_ == null) { + ensureRecordsIsMutable(); + super.addAll(values, records_); + onChanged(); + } else { + recordsBuilder_.addAllMessages(values); + } + return this; + } + public Builder clearRecords() { + if (recordsBuilder_ == null) { + records_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + recordsBuilder_.clear(); + } + return this; + } + public Builder removeRecords(int index) { + if (recordsBuilder_ == null) { + ensureRecordsIsMutable(); + records_.remove(index); + onChanged(); + } else { + recordsBuilder_.remove(index); + } + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record.Builder getRecordsBuilder( + int index) { + return getRecordsFieldBuilder().getBuilder(index); + } + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.RecordOrBuilder getRecordsOrBuilder( + int index) { + if (recordsBuilder_ == null) { + return records_.get(index); } else { + return recordsBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getRecordsOrBuilderList() { + if (recordsBuilder_ != null) { + return recordsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(records_); + } + } + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record.Builder addRecordsBuilder() { + return getRecordsFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record.getDefaultInstance()); + } + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record.Builder addRecordsBuilder( + int index) { + return getRecordsFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record.getDefaultInstance()); + } + public java.util.List + getRecordsBuilderList() { + return getRecordsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record.Builder, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.RecordOrBuilder> + getRecordsFieldBuilder() { + if (recordsBuilder_ == null) { + recordsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record.Builder, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.RecordOrBuilder>( + records_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + records_ = null; + } + return recordsBuilder_; } - // required string checkpoint = 4; - private java.lang.Object checkpoint_ = ""; - public boolean hasCheckpoint() { - return ((bitField0_ & 0x00000008) == 0x00000008); + // required string next_token = 2; + private java.lang.Object nextToken_ = ""; + public boolean hasNextToken() { + return ((bitField0_ & 0x00000002) == 0x00000002); } - public String getCheckpoint() { - java.lang.Object ref = checkpoint_; + public String getNextToken() { + java.lang.Object ref = nextToken_; if (!(ref instanceof String)) { String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - checkpoint_ = s; + nextToken_ = s; return s; } else { return (String) ref; } } - public Builder setCheckpoint(String value) { + public Builder setNextToken(String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000008; - checkpoint_ = value; - onChanged(); - return this; - } - public Builder clearCheckpoint() { - bitField0_ = (bitField0_ & ~0x00000008); - checkpoint_ = getDefaultInstance().getCheckpoint(); + bitField0_ |= 0x00000002; + nextToken_ = value; onChanged(); return this; } - void setCheckpoint(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000008; - checkpoint_ = value; - onChanged(); - } - - // required int64 sequence_number = 5; - private long sequenceNumber_ ; - public boolean hasSequenceNumber() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - public long getSequenceNumber() { - return sequenceNumber_; - } - public Builder setSequenceNumber(long value) { - bitField0_ |= 0x00000010; - sequenceNumber_ = value; + public Builder clearNextToken() { + bitField0_ = (bitField0_ & ~0x00000002); + nextToken_ = getDefaultInstance().getNextToken(); onChanged(); return this; } - public Builder clearSequenceNumber() { - bitField0_ = (bitField0_ & ~0x00000010); - sequenceNumber_ = 0L; + void setNextToken(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000002; + nextToken_ = value; onChanged(); - return this; } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.CheckpointRequest) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.ReadRecordsResponse) } static { - defaultInstance = new CheckpointRequest(true); + defaultInstance = new ReadRecordsResponse(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.CheckpointRequest) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.ReadRecordsResponse) } - public interface CheckpointResponseOrBuilder + public interface TokenOrBuilder extends com.google.protobuf.MessageOrBuilder { + + // required int64 version = 1; + boolean hasVersion(); + long getVersion(); + + // required bytes content = 2; + boolean hasContent(); + com.google.protobuf.ByteString getContent(); } - public static final class CheckpointResponse extends + public static final class Token extends com.google.protobuf.GeneratedMessage - implements CheckpointResponseOrBuilder { - // Use CheckpointResponse.newBuilder() to construct. - private CheckpointResponse(Builder builder) { + implements TokenOrBuilder { + // Use Token.newBuilder() to construct. + private Token(Builder builder) { super(builder); } - private CheckpointResponse(boolean noInit) {} + private Token(boolean noInit) {} - private static final CheckpointResponse defaultInstance; - public static CheckpointResponse getDefaultInstance() { + private static final Token defaultInstance; + public static Token getDefaultInstance() { return defaultInstance; } - public CheckpointResponse getDefaultInstanceForType() { + public Token getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CheckpointResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_Token_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CheckpointResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_Token_fieldAccessorTable; + } + + private int bitField0_; + // required int64 version = 1; + public static final int VERSION_FIELD_NUMBER = 1; + private long version_; + public boolean hasVersion() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public long getVersion() { + return version_; + } + + // required bytes content = 2; + public static final int CONTENT_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString content_; + public boolean hasContent() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getContent() { + return content_; } private void initFields() { + version_ = 0L; + content_ = com.google.protobuf.ByteString.EMPTY; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; + if (!hasVersion()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasContent()) { + memoizedIsInitialized = 0; + return false; + } memoizedIsInitialized = 1; return true; } @@ -15836,6 +16348,12 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeInt64(1, version_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, content_); + } getUnknownFields().writeTo(output); } @@ -15845,6 +16363,14 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, version_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, content_); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -15857,41 +16383,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -15900,7 +16426,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceAp return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -15911,12 +16437,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceAp return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -15926,7 +16452,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceAp public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -15939,18 +16465,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponseOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CheckpointResponse_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_Token_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_CheckpointResponse_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_Token_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -15969,6 +16495,10 @@ private static Builder create() { public Builder clear() { super.clear(); + version_ = 0L; + bitField0_ = (bitField0_ & ~0x00000001); + content_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -15978,24 +16508,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse build() { - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token build() { + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -16003,28 +16533,53 @@ private com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Chec return result; } - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse result = new com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse(this); + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token result = new com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.version_ = version_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.content_ = content_; + result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse.getDefaultInstance()) return this; + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token.getDefaultInstance()) return this; + if (other.hasVersion()) { + setVersion(other.getVersion()); + } + if (other.hasContent()) { + setContent(other.getContent()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { + if (!hasVersion()) { + + return false; + } + if (!hasContent()) { + + return false; + } return true; } @@ -16051,1879 +16606,184 @@ public Builder mergeFrom( } break; } + case 8: { + bitField0_ |= 0x00000001; + version_ = input.readInt64(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + content_ = input.readBytes(); + break; + } } } } + private int bitField0_; - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.CheckpointResponse) - } - - static { - defaultInstance = new CheckpointResponse(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.CheckpointResponse) - } - - public interface ReadRecordsRequestOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required string tunnel_id = 1; - boolean hasTunnelId(); - String getTunnelId(); - - // required string client_id = 2; - boolean hasClientId(); - String getClientId(); - - // required string channel_id = 3; - boolean hasChannelId(); - String getChannelId(); - - // required string token = 4; - boolean hasToken(); - String getToken(); - } - public static final class ReadRecordsRequest extends - com.google.protobuf.GeneratedMessage - implements ReadRecordsRequestOrBuilder { - // Use ReadRecordsRequest.newBuilder() to construct. - private ReadRecordsRequest(Builder builder) { - super(builder); - } - private ReadRecordsRequest(boolean noInit) {} - - private static final ReadRecordsRequest defaultInstance; - public static ReadRecordsRequest getDefaultInstance() { - return defaultInstance; - } - - public ReadRecordsRequest getDefaultInstanceForType() { - return defaultInstance; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ReadRecordsRequest_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ReadRecordsRequest_fieldAccessorTable; - } - - private int bitField0_; - // required string tunnel_id = 1; - public static final int TUNNEL_ID_FIELD_NUMBER = 1; - private java.lang.Object tunnelId_; - public boolean hasTunnelId() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getTunnelId() { - java.lang.Object ref = tunnelId_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - tunnelId_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getTunnelIdBytes() { - java.lang.Object ref = tunnelId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - tunnelId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // required string client_id = 2; - public static final int CLIENT_ID_FIELD_NUMBER = 2; - private java.lang.Object clientId_; - public boolean hasClientId() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public String getClientId() { - java.lang.Object ref = clientId_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - clientId_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getClientIdBytes() { - java.lang.Object ref = clientId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - clientId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // required string channel_id = 3; - public static final int CHANNEL_ID_FIELD_NUMBER = 3; - private java.lang.Object channelId_; - public boolean hasChannelId() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public String getChannelId() { - java.lang.Object ref = channelId_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - channelId_ = s; - } - return s; + // required int64 version = 1; + private long version_ ; + public boolean hasVersion() { + return ((bitField0_ & 0x00000001) == 0x00000001); } - } - private com.google.protobuf.ByteString getChannelIdBytes() { - java.lang.Object ref = channelId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - channelId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + public long getVersion() { + return version_; } - } - - // required string token = 4; - public static final int TOKEN_FIELD_NUMBER = 4; - private java.lang.Object token_; - public boolean hasToken() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public String getToken() { - java.lang.Object ref = token_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - token_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getTokenBytes() { - java.lang.Object ref = token_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - token_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private void initFields() { - tunnelId_ = ""; - clientId_ = ""; - channelId_ = ""; - token_ = ""; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasTunnelId()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasClientId()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasChannelId()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasToken()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getTunnelIdBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getClientIdBytes()); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeBytes(3, getChannelIdBytes()); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeBytes(4, getTokenBytes()); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getTunnelIdBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getClientIdBytes()); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(3, getChannelIdBytes()); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(4, getTokenBytes()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ReadRecordsRequest_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ReadRecordsRequest_fieldAccessorTable; - } - - // Construct using com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - tunnelId_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - clientId_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); - channelId_ = ""; - bitField0_ = (bitField0_ & ~0x00000004); - token_ = ""; - bitField0_ = (bitField0_ & ~0x00000008); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest.getDescriptor(); - } - - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest.getDefaultInstance(); - } - - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest build() { - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - private com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest result = new com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.tunnelId_ = tunnelId_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.clientId_ = clientId_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.channelId_ = channelId_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - result.token_ = token_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest.getDefaultInstance()) return this; - if (other.hasTunnelId()) { - setTunnelId(other.getTunnelId()); - } - if (other.hasClientId()) { - setClientId(other.getClientId()); - } - if (other.hasChannelId()) { - setChannelId(other.getChannelId()); - } - if (other.hasToken()) { - setToken(other.getToken()); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - if (!hasTunnelId()) { - - return false; - } - if (!hasClientId()) { - - return false; - } - if (!hasChannelId()) { - - return false; - } - if (!hasToken()) { - - return false; - } - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 10: { - bitField0_ |= 0x00000001; - tunnelId_ = input.readBytes(); - break; - } - case 18: { - bitField0_ |= 0x00000002; - clientId_ = input.readBytes(); - break; - } - case 26: { - bitField0_ |= 0x00000004; - channelId_ = input.readBytes(); - break; - } - case 34: { - bitField0_ |= 0x00000008; - token_ = input.readBytes(); - break; - } - } - } - } - - private int bitField0_; - - // required string tunnel_id = 1; - private java.lang.Object tunnelId_ = ""; - public boolean hasTunnelId() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getTunnelId() { - java.lang.Object ref = tunnelId_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - tunnelId_ = s; - return s; - } else { - return (String) ref; - } - } - public Builder setTunnelId(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - tunnelId_ = value; - onChanged(); - return this; - } - public Builder clearTunnelId() { - bitField0_ = (bitField0_ & ~0x00000001); - tunnelId_ = getDefaultInstance().getTunnelId(); - onChanged(); - return this; - } - void setTunnelId(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; - tunnelId_ = value; - onChanged(); - } - - // required string client_id = 2; - private java.lang.Object clientId_ = ""; - public boolean hasClientId() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public String getClientId() { - java.lang.Object ref = clientId_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - clientId_ = s; - return s; - } else { - return (String) ref; - } - } - public Builder setClientId(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - clientId_ = value; - onChanged(); - return this; - } - public Builder clearClientId() { - bitField0_ = (bitField0_ & ~0x00000002); - clientId_ = getDefaultInstance().getClientId(); - onChanged(); - return this; - } - void setClientId(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000002; - clientId_ = value; - onChanged(); - } - - // required string channel_id = 3; - private java.lang.Object channelId_ = ""; - public boolean hasChannelId() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public String getChannelId() { - java.lang.Object ref = channelId_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - channelId_ = s; - return s; - } else { - return (String) ref; - } - } - public Builder setChannelId(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - channelId_ = value; - onChanged(); - return this; - } - public Builder clearChannelId() { - bitField0_ = (bitField0_ & ~0x00000004); - channelId_ = getDefaultInstance().getChannelId(); - onChanged(); - return this; - } - void setChannelId(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000004; - channelId_ = value; - onChanged(); - } - - // required string token = 4; - private java.lang.Object token_ = ""; - public boolean hasToken() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public String getToken() { - java.lang.Object ref = token_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - token_ = s; - return s; - } else { - return (String) ref; - } - } - public Builder setToken(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - token_ = value; - onChanged(); - return this; - } - public Builder clearToken() { - bitField0_ = (bitField0_ & ~0x00000008); - token_ = getDefaultInstance().getToken(); - onChanged(); - return this; - } - void setToken(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000008; - token_ = value; - onChanged(); - } - - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.ReadRecordsRequest) - } - - static { - defaultInstance = new ReadRecordsRequest(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.ReadRecordsRequest) - } - - public interface RecordOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required .com.alicloud.openservices.tablestore.core.protocol.ActionType action_type = 1; - boolean hasActionType(); - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ActionType getActionType(); - - // required bytes record = 2; - boolean hasRecord(); - com.google.protobuf.ByteString getRecord(); - } - public static final class Record extends - com.google.protobuf.GeneratedMessage - implements RecordOrBuilder { - // Use Record.newBuilder() to construct. - private Record(Builder builder) { - super(builder); - } - private Record(boolean noInit) {} - - private static final Record defaultInstance; - public static Record getDefaultInstance() { - return defaultInstance; - } - - public Record getDefaultInstanceForType() { - return defaultInstance; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_Record_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_Record_fieldAccessorTable; - } - - private int bitField0_; - // required .com.alicloud.openservices.tablestore.core.protocol.ActionType action_type = 1; - public static final int ACTION_TYPE_FIELD_NUMBER = 1; - private com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ActionType actionType_; - public boolean hasActionType() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ActionType getActionType() { - return actionType_; - } - - // required bytes record = 2; - public static final int RECORD_FIELD_NUMBER = 2; - private com.google.protobuf.ByteString record_; - public boolean hasRecord() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public com.google.protobuf.ByteString getRecord() { - return record_; - } - - private void initFields() { - actionType_ = com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ActionType.PUT_ROW; - record_ = com.google.protobuf.ByteString.EMPTY; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasActionType()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasRecord()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeEnum(1, actionType_.getNumber()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, record_); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, actionType_.getNumber()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, record_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record parseFrom(java.io.InputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.RecordOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_Record_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_Record_fieldAccessorTable; - } - - // Construct using com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - actionType_ = com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ActionType.PUT_ROW; - bitField0_ = (bitField0_ & ~0x00000001); - record_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record.getDescriptor(); - } - - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record.getDefaultInstance(); - } - - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record build() { - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - private com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record result = new com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.actionType_ = actionType_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.record_ = record_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record.getDefaultInstance()) return this; - if (other.hasActionType()) { - setActionType(other.getActionType()); - } - if (other.hasRecord()) { - setRecord(other.getRecord()); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - if (!hasActionType()) { - - return false; - } - if (!hasRecord()) { - - return false; - } - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 8: { - int rawValue = input.readEnum(); - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ActionType value = com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ActionType.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(1, rawValue); - } else { - bitField0_ |= 0x00000001; - actionType_ = value; - } - break; - } - case 18: { - bitField0_ |= 0x00000002; - record_ = input.readBytes(); - break; - } - } - } - } - - private int bitField0_; - - // required .com.alicloud.openservices.tablestore.core.protocol.ActionType action_type = 1; - private com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ActionType actionType_ = com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ActionType.PUT_ROW; - public boolean hasActionType() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ActionType getActionType() { - return actionType_; - } - public Builder setActionType(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ActionType value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - actionType_ = value; - onChanged(); - return this; - } - public Builder clearActionType() { - bitField0_ = (bitField0_ & ~0x00000001); - actionType_ = com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ActionType.PUT_ROW; - onChanged(); - return this; - } - - // required bytes record = 2; - private com.google.protobuf.ByteString record_ = com.google.protobuf.ByteString.EMPTY; - public boolean hasRecord() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public com.google.protobuf.ByteString getRecord() { - return record_; - } - public Builder setRecord(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - record_ = value; - onChanged(); - return this; - } - public Builder clearRecord() { - bitField0_ = (bitField0_ & ~0x00000002); - record_ = getDefaultInstance().getRecord(); - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.Record) - } - - static { - defaultInstance = new Record(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.Record) - } - - public interface ReadRecordsResponseOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // repeated .com.alicloud.openservices.tablestore.core.protocol.Record records = 1; - java.util.List - getRecordsList(); - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record getRecords(int index); - int getRecordsCount(); - java.util.List - getRecordsOrBuilderList(); - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.RecordOrBuilder getRecordsOrBuilder( - int index); - - // required string next_token = 2; - boolean hasNextToken(); - String getNextToken(); - } - public static final class ReadRecordsResponse extends - com.google.protobuf.GeneratedMessage - implements ReadRecordsResponseOrBuilder { - // Use ReadRecordsResponse.newBuilder() to construct. - private ReadRecordsResponse(Builder builder) { - super(builder); - } - private ReadRecordsResponse(boolean noInit) {} - - private static final ReadRecordsResponse defaultInstance; - public static ReadRecordsResponse getDefaultInstance() { - return defaultInstance; - } - - public ReadRecordsResponse getDefaultInstanceForType() { - return defaultInstance; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ReadRecordsResponse_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ReadRecordsResponse_fieldAccessorTable; - } - - private int bitField0_; - // repeated .com.alicloud.openservices.tablestore.core.protocol.Record records = 1; - public static final int RECORDS_FIELD_NUMBER = 1; - private java.util.List records_; - public java.util.List getRecordsList() { - return records_; - } - public java.util.List - getRecordsOrBuilderList() { - return records_; - } - public int getRecordsCount() { - return records_.size(); - } - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record getRecords(int index) { - return records_.get(index); - } - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.RecordOrBuilder getRecordsOrBuilder( - int index) { - return records_.get(index); - } - - // required string next_token = 2; - public static final int NEXT_TOKEN_FIELD_NUMBER = 2; - private java.lang.Object nextToken_; - public boolean hasNextToken() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getNextToken() { - java.lang.Object ref = nextToken_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - nextToken_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getNextTokenBytes() { - java.lang.Object ref = nextToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - nextToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private void initFields() { - records_ = java.util.Collections.emptyList(); - nextToken_ = ""; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasNextToken()) { - memoizedIsInitialized = 0; - return false; - } - for (int i = 0; i < getRecordsCount(); i++) { - if (!getRecords(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - for (int i = 0; i < records_.size(); i++) { - output.writeMessage(1, records_.get(i)); - } - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(2, getNextTokenBytes()); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < records_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, records_.get(i)); - } - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getNextTokenBytes()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data).buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return newBuilder().mergeFrom(data, extensionRegistry) - .buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - Builder builder = newBuilder(); - if (builder.mergeDelimitedFrom(input, extensionRegistry)) { - return builder.buildParsed(); - } else { - return null; - } - } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return newBuilder().mergeFrom(input).buildParsed(); - } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return newBuilder().mergeFrom(input, extensionRegistry) - .buildParsed(); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ReadRecordsResponse_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_ReadRecordsResponse_fieldAccessorTable; - } - - // Construct using com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getRecordsFieldBuilder(); - } - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - if (recordsBuilder_ == null) { - records_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - recordsBuilder_.clear(); - } - nextToken_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse.getDescriptor(); - } - - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse.getDefaultInstance(); - } - - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse build() { - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - private com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse buildParsed() - throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException( - result).asInvalidProtocolBufferException(); - } - return result; - } - - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse result = new com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (recordsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - records_ = java.util.Collections.unmodifiableList(records_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.records_ = records_; - } else { - result.records_ = recordsBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000001; - } - result.nextToken_ = nextToken_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse.getDefaultInstance()) return this; - if (recordsBuilder_ == null) { - if (!other.records_.isEmpty()) { - if (records_.isEmpty()) { - records_ = other.records_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureRecordsIsMutable(); - records_.addAll(other.records_); - } - onChanged(); - } - } else { - if (!other.records_.isEmpty()) { - if (recordsBuilder_.isEmpty()) { - recordsBuilder_.dispose(); - recordsBuilder_ = null; - records_ = other.records_; - bitField0_ = (bitField0_ & ~0x00000001); - recordsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getRecordsFieldBuilder() : null; - } else { - recordsBuilder_.addAllMessages(other.records_); - } - } - } - if (other.hasNextToken()) { - setNextToken(other.getNextToken()); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - if (!hasNextToken()) { - - return false; - } - for (int i = 0; i < getRecordsCount(); i++) { - if (!getRecords(i).isInitialized()) { - - return false; - } - } - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder( - this.getUnknownFields()); - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - this.setUnknownFields(unknownFields.build()); - onChanged(); - return this; - } - break; - } - case 10: { - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record.newBuilder(); - input.readMessage(subBuilder, extensionRegistry); - addRecords(subBuilder.buildPartial()); - break; - } - case 18: { - bitField0_ |= 0x00000002; - nextToken_ = input.readBytes(); - break; - } - } - } - } - - private int bitField0_; - - // repeated .com.alicloud.openservices.tablestore.core.protocol.Record records = 1; - private java.util.List records_ = - java.util.Collections.emptyList(); - private void ensureRecordsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - records_ = new java.util.ArrayList(records_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record.Builder, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.RecordOrBuilder> recordsBuilder_; - - public java.util.List getRecordsList() { - if (recordsBuilder_ == null) { - return java.util.Collections.unmodifiableList(records_); - } else { - return recordsBuilder_.getMessageList(); - } - } - public int getRecordsCount() { - if (recordsBuilder_ == null) { - return records_.size(); - } else { - return recordsBuilder_.getCount(); - } - } - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record getRecords(int index) { - if (recordsBuilder_ == null) { - return records_.get(index); - } else { - return recordsBuilder_.getMessage(index); - } - } - public Builder setRecords( - int index, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record value) { - if (recordsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRecordsIsMutable(); - records_.set(index, value); - onChanged(); - } else { - recordsBuilder_.setMessage(index, value); - } - return this; - } - public Builder setRecords( - int index, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record.Builder builderForValue) { - if (recordsBuilder_ == null) { - ensureRecordsIsMutable(); - records_.set(index, builderForValue.build()); - onChanged(); - } else { - recordsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - public Builder addRecords(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record value) { - if (recordsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRecordsIsMutable(); - records_.add(value); - onChanged(); - } else { - recordsBuilder_.addMessage(value); - } - return this; - } - public Builder addRecords( - int index, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record value) { - if (recordsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRecordsIsMutable(); - records_.add(index, value); - onChanged(); - } else { - recordsBuilder_.addMessage(index, value); - } - return this; - } - public Builder addRecords( - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record.Builder builderForValue) { - if (recordsBuilder_ == null) { - ensureRecordsIsMutable(); - records_.add(builderForValue.build()); - onChanged(); - } else { - recordsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - public Builder addRecords( - int index, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record.Builder builderForValue) { - if (recordsBuilder_ == null) { - ensureRecordsIsMutable(); - records_.add(index, builderForValue.build()); - onChanged(); - } else { - recordsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - public Builder addAllRecords( - java.lang.Iterable values) { - if (recordsBuilder_ == null) { - ensureRecordsIsMutable(); - super.addAll(values, records_); - onChanged(); - } else { - recordsBuilder_.addAllMessages(values); - } - return this; - } - public Builder clearRecords() { - if (recordsBuilder_ == null) { - records_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - recordsBuilder_.clear(); - } - return this; - } - public Builder removeRecords(int index) { - if (recordsBuilder_ == null) { - ensureRecordsIsMutable(); - records_.remove(index); - onChanged(); - } else { - recordsBuilder_.remove(index); - } + public Builder setVersion(long value) { + bitField0_ |= 0x00000001; + version_ = value; + onChanged(); + return this; + } + public Builder clearVersion() { + bitField0_ = (bitField0_ & ~0x00000001); + version_ = 0L; + onChanged(); return this; } - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record.Builder getRecordsBuilder( - int index) { - return getRecordsFieldBuilder().getBuilder(index); - } - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.RecordOrBuilder getRecordsOrBuilder( - int index) { - if (recordsBuilder_ == null) { - return records_.get(index); } else { - return recordsBuilder_.getMessageOrBuilder(index); - } - } - public java.util.List - getRecordsOrBuilderList() { - if (recordsBuilder_ != null) { - return recordsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(records_); - } - } - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record.Builder addRecordsBuilder() { - return getRecordsFieldBuilder().addBuilder( - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record.getDefaultInstance()); - } - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record.Builder addRecordsBuilder( - int index) { - return getRecordsFieldBuilder().addBuilder( - index, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record.getDefaultInstance()); - } - public java.util.List - getRecordsBuilderList() { - return getRecordsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record.Builder, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.RecordOrBuilder> - getRecordsFieldBuilder() { - if (recordsBuilder_ == null) { - recordsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record.Builder, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.RecordOrBuilder>( - records_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); - records_ = null; - } - return recordsBuilder_; - } - // required string next_token = 2; - private java.lang.Object nextToken_ = ""; - public boolean hasNextToken() { + // required bytes content = 2; + private com.google.protobuf.ByteString content_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasContent() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public String getNextToken() { - java.lang.Object ref = nextToken_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - nextToken_ = s; - return s; - } else { - return (String) ref; - } + public com.google.protobuf.ByteString getContent() { + return content_; } - public Builder setNextToken(String value) { + public Builder setContent(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; - nextToken_ = value; + content_ = value; onChanged(); return this; } - public Builder clearNextToken() { + public Builder clearContent() { bitField0_ = (bitField0_ & ~0x00000002); - nextToken_ = getDefaultInstance().getNextToken(); + content_ = getDefaultInstance().getContent(); onChanged(); return this; } - void setNextToken(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000002; - nextToken_ = value; - onChanged(); - } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.ReadRecordsResponse) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.Token) } static { - defaultInstance = new ReadRecordsResponse(true); + defaultInstance = new Token(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.ReadRecordsResponse) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.Token) } - public interface TokenOrBuilder + public interface TokenContentOrBuilder extends com.google.protobuf.MessageOrBuilder { - // required int64 version = 1; - boolean hasVersion(); - long getVersion(); + // optional bytes primary_key = 1; + boolean hasPrimaryKey(); + com.google.protobuf.ByteString getPrimaryKey(); - // required bytes content = 2; - boolean hasContent(); - com.google.protobuf.ByteString getContent(); + // optional string iterator = 2; + boolean hasIterator(); + String getIterator(); + + // optional int64 timestamp = 3; + boolean hasTimestamp(); + long getTimestamp(); } - public static final class Token extends + public static final class TokenContent extends com.google.protobuf.GeneratedMessage - implements TokenOrBuilder { - // Use Token.newBuilder() to construct. - private Token(Builder builder) { + implements TokenContentOrBuilder { + // Use TokenContent.newBuilder() to construct. + private TokenContent(Builder builder) { super(builder); } - private Token(boolean noInit) {} + private TokenContent(boolean noInit) {} - private static final Token defaultInstance; - public static Token getDefaultInstance() { + private static final TokenContent defaultInstance; + public static TokenContent getDefaultInstance() { return defaultInstance; } - public Token getDefaultInstanceForType() { + public TokenContent getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_Token_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TokenContent_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_Token_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TokenContent_fieldAccessorTable; } private int bitField0_; - // required int64 version = 1; - public static final int VERSION_FIELD_NUMBER = 1; - private long version_; - public boolean hasVersion() { + // optional bytes primary_key = 1; + public static final int PRIMARY_KEY_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString primaryKey_; + public boolean hasPrimaryKey() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public long getVersion() { - return version_; + public com.google.protobuf.ByteString getPrimaryKey() { + return primaryKey_; } - // required bytes content = 2; - public static final int CONTENT_FIELD_NUMBER = 2; - private com.google.protobuf.ByteString content_; - public boolean hasContent() { + // optional string iterator = 2; + public static final int ITERATOR_FIELD_NUMBER = 2; + private java.lang.Object iterator_; + public boolean hasIterator() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public com.google.protobuf.ByteString getContent() { - return content_; + public String getIterator() { + java.lang.Object ref = iterator_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + iterator_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getIteratorBytes() { + java.lang.Object ref = iterator_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + iterator_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional int64 timestamp = 3; + public static final int TIMESTAMP_FIELD_NUMBER = 3; + private long timestamp_; + public boolean hasTimestamp() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public long getTimestamp() { + return timestamp_; } private void initFields() { - version_ = 0L; - content_ = com.google.protobuf.ByteString.EMPTY; + primaryKey_ = com.google.protobuf.ByteString.EMPTY; + iterator_ = ""; + timestamp_ = 0L; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - if (!hasVersion()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasContent()) { - memoizedIsInitialized = 0; - return false; - } memoizedIsInitialized = 1; return true; } @@ -17932,10 +16792,13 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeInt64(1, version_); + output.writeBytes(1, primaryKey_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, content_); + output.writeBytes(2, getIteratorBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeInt64(3, timestamp_); } getUnknownFields().writeTo(output); } @@ -17948,11 +16811,15 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, version_); + .computeBytesSize(1, primaryKey_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, content_); + .computeBytesSize(2, getIteratorBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, timestamp_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -17966,41 +16833,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -18009,7 +16876,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceAp return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -18020,12 +16887,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceAp return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -18035,7 +16902,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceAp public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -18048,18 +16915,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_Token_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TokenContent_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_Token_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TokenContent_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -18078,10 +16945,12 @@ private static Builder create() { public Builder clear() { super.clear(); - version_ = 0L; + primaryKey_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); - content_ = com.google.protobuf.ByteString.EMPTY; + iterator_ = ""; bitField0_ = (bitField0_ & ~0x00000002); + timestamp_ = 0L; + bitField0_ = (bitField0_ & ~0x00000004); return this; } @@ -18091,24 +16960,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token build() { - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent build() { + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -18116,53 +16985,52 @@ private com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Toke return result; } - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token result = new com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token(this); + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent result = new com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.version_ = version_; + result.primaryKey_ = primaryKey_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - result.content_ = content_; + result.iterator_ = iterator_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.timestamp_ = timestamp_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token.getDefaultInstance()) return this; - if (other.hasVersion()) { - setVersion(other.getVersion()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent.getDefaultInstance()) return this; + if (other.hasPrimaryKey()) { + setPrimaryKey(other.getPrimaryKey()); } - if (other.hasContent()) { - setContent(other.getContent()); + if (other.hasIterator()) { + setIterator(other.getIterator()); + } + if (other.hasTimestamp()) { + setTimestamp(other.getTimestamp()); } this.mergeUnknownFields(other.getUnknownFields()); return this; - } - - public final boolean isInitialized() { - if (!hasVersion()) { - - return false; - } - if (!hasContent()) { - - return false; - } + } + + public final boolean isInitialized() { return true; } @@ -18189,14 +17057,19 @@ public Builder mergeFrom( } break; } - case 8: { + case 10: { bitField0_ |= 0x00000001; - version_ = input.readInt64(); + primaryKey_ = input.readBytes(); break; } case 18: { bitField0_ |= 0x00000002; - content_ = input.readBytes(); + iterator_ = input.readBytes(); + break; + } + case 24: { + bitField0_ |= 0x00000004; + timestamp_ = input.readInt64(); break; } } @@ -18205,63 +17078,99 @@ public Builder mergeFrom( private int bitField0_; - // required int64 version = 1; - private long version_ ; - public boolean hasVersion() { + // optional bytes primary_key = 1; + private com.google.protobuf.ByteString primaryKey_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasPrimaryKey() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public long getVersion() { - return version_; + public com.google.protobuf.ByteString getPrimaryKey() { + return primaryKey_; } - public Builder setVersion(long value) { - bitField0_ |= 0x00000001; - version_ = value; + public Builder setPrimaryKey(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + primaryKey_ = value; onChanged(); return this; } - public Builder clearVersion() { + public Builder clearPrimaryKey() { bitField0_ = (bitField0_ & ~0x00000001); - version_ = 0L; + primaryKey_ = getDefaultInstance().getPrimaryKey(); onChanged(); return this; } - // required bytes content = 2; - private com.google.protobuf.ByteString content_ = com.google.protobuf.ByteString.EMPTY; - public boolean hasContent() { + // optional string iterator = 2; + private java.lang.Object iterator_ = ""; + public boolean hasIterator() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public com.google.protobuf.ByteString getContent() { - return content_; + public String getIterator() { + java.lang.Object ref = iterator_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + iterator_ = s; + return s; + } else { + return (String) ref; + } } - public Builder setContent(com.google.protobuf.ByteString value) { + public Builder setIterator(String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; - content_ = value; + iterator_ = value; onChanged(); return this; } - public Builder clearContent() { + public Builder clearIterator() { bitField0_ = (bitField0_ & ~0x00000002); - content_ = getDefaultInstance().getContent(); + iterator_ = getDefaultInstance().getIterator(); + onChanged(); + return this; + } + void setIterator(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000002; + iterator_ = value; + onChanged(); + } + + // optional int64 timestamp = 3; + private long timestamp_ ; + public boolean hasTimestamp() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public long getTimestamp() { + return timestamp_; + } + public Builder setTimestamp(long value) { + bitField0_ |= 0x00000004; + timestamp_ = value; + onChanged(); + return this; + } + public Builder clearTimestamp() { + bitField0_ = (bitField0_ & ~0x00000004); + timestamp_ = 0L; onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.Token) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.TokenContent) } static { - defaultInstance = new Token(true); + defaultInstance = new TokenContent(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.Token) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.TokenContent) } - public interface TokenContentOrBuilder + public interface TokenContentV2OrBuilder extends com.google.protobuf.MessageOrBuilder { // optional bytes primary_key = 1; @@ -18275,33 +17184,37 @@ public interface TokenContentOrBuilder // optional int64 timestamp = 3; boolean hasTimestamp(); long getTimestamp(); + + // optional int64 total_count = 4; + boolean hasTotalCount(); + long getTotalCount(); } - public static final class TokenContent extends + public static final class TokenContentV2 extends com.google.protobuf.GeneratedMessage - implements TokenContentOrBuilder { - // Use TokenContent.newBuilder() to construct. - private TokenContent(Builder builder) { + implements TokenContentV2OrBuilder { + // Use TokenContentV2.newBuilder() to construct. + private TokenContentV2(Builder builder) { super(builder); } - private TokenContent(boolean noInit) {} + private TokenContentV2(boolean noInit) {} - private static final TokenContent defaultInstance; - public static TokenContent getDefaultInstance() { + private static final TokenContentV2 defaultInstance; + public static TokenContentV2 getDefaultInstance() { return defaultInstance; } - public TokenContent getDefaultInstanceForType() { + public TokenContentV2 getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TokenContent_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TokenContentV2_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TokenContent_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TokenContentV2_fieldAccessorTable; } private int bitField0_; @@ -18357,10 +17270,21 @@ public long getTimestamp() { return timestamp_; } + // optional int64 total_count = 4; + public static final int TOTAL_COUNT_FIELD_NUMBER = 4; + private long totalCount_; + public boolean hasTotalCount() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public long getTotalCount() { + return totalCount_; + } + private void initFields() { primaryKey_ = com.google.protobuf.ByteString.EMPTY; iterator_ = ""; timestamp_ = 0L; + totalCount_ = 0L; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -18383,6 +17307,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeInt64(3, timestamp_); } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeInt64(4, totalCount_); + } getUnknownFields().writeTo(output); } @@ -18404,6 +17331,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeInt64Size(3, timestamp_); } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(4, totalCount_); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -18416,41 +17347,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2 parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2 parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2 parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2 parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -18459,7 +17390,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceAp return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -18470,12 +17401,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceAp return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2 parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -18485,7 +17416,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceAp public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2 prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -18498,18 +17429,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentOrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2OrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TokenContent_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TokenContentV2_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TokenContent_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TokenContentV2_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -18534,6 +17465,8 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000002); timestamp_ = 0L; bitField0_ = (bitField0_ & ~0x00000004); + totalCount_ = 0L; + bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -18543,24 +17476,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2 getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent build() { - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2 build() { + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2 result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2 buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2 result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -18568,8 +17501,8 @@ private com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Toke return result; } - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent result = new com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent(this); + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2 buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2 result = new com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { @@ -18584,22 +17517,26 @@ public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token to_bitField0_ |= 0x00000004; } result.timestamp_ = timestamp_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.totalCount_ = totalCount_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent.getDefaultInstance()) return this; + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2 other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2.getDefaultInstance()) return this; if (other.hasPrimaryKey()) { setPrimaryKey(other.getPrimaryKey()); } @@ -18609,6 +17546,9 @@ public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.Tunn if (other.hasTimestamp()) { setTimestamp(other.getTimestamp()); } + if (other.hasTotalCount()) { + setTotalCount(other.getTotalCount()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -18655,6 +17595,11 @@ public Builder mergeFrom( timestamp_ = input.readInt64(); break; } + case 32: { + bitField0_ |= 0x00000008; + totalCount_ = input.readInt64(); + break; + } } } } @@ -18742,132 +17687,116 @@ public Builder clearTimestamp() { return this; } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.TokenContent) + // optional int64 total_count = 4; + private long totalCount_ ; + public boolean hasTotalCount() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public long getTotalCount() { + return totalCount_; + } + public Builder setTotalCount(long value) { + bitField0_ |= 0x00000008; + totalCount_ = value; + onChanged(); + return this; + } + public Builder clearTotalCount() { + bitField0_ = (bitField0_ & ~0x00000008); + totalCount_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.TokenContentV2) } static { - defaultInstance = new TokenContent(true); + defaultInstance = new TokenContentV2(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.TokenContent) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.TokenContentV2) } - public interface TokenContentV2OrBuilder + public interface StreamTunnelConfigOrBuilder extends com.google.protobuf.MessageOrBuilder { - // optional bytes primary_key = 1; - boolean hasPrimaryKey(); - com.google.protobuf.ByteString getPrimaryKey(); - - // optional string iterator = 2; - boolean hasIterator(); - String getIterator(); + // optional .com.alicloud.openservices.tablestore.core.protocol.StartOffsetFlag flag = 1; + boolean hasFlag(); + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StartOffsetFlag getFlag(); - // optional int64 timestamp = 3; - boolean hasTimestamp(); - long getTimestamp(); + // optional uint64 startOffset = 2; + boolean hasStartOffset(); + long getStartOffset(); - // optional int64 total_count = 4; - boolean hasTotalCount(); - long getTotalCount(); + // optional uint64 endOffset = 3; + boolean hasEndOffset(); + long getEndOffset(); } - public static final class TokenContentV2 extends + public static final class StreamTunnelConfig extends com.google.protobuf.GeneratedMessage - implements TokenContentV2OrBuilder { - // Use TokenContentV2.newBuilder() to construct. - private TokenContentV2(Builder builder) { + implements StreamTunnelConfigOrBuilder { + // Use StreamTunnelConfig.newBuilder() to construct. + private StreamTunnelConfig(Builder builder) { super(builder); } - private TokenContentV2(boolean noInit) {} + private StreamTunnelConfig(boolean noInit) {} - private static final TokenContentV2 defaultInstance; - public static TokenContentV2 getDefaultInstance() { + private static final StreamTunnelConfig defaultInstance; + public static StreamTunnelConfig getDefaultInstance() { return defaultInstance; } - public TokenContentV2 getDefaultInstanceForType() { + public StreamTunnelConfig getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TokenContentV2_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_StreamTunnelConfig_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TokenContentV2_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_StreamTunnelConfig_fieldAccessorTable; } private int bitField0_; - // optional bytes primary_key = 1; - public static final int PRIMARY_KEY_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString primaryKey_; - public boolean hasPrimaryKey() { + // optional .com.alicloud.openservices.tablestore.core.protocol.StartOffsetFlag flag = 1; + public static final int FLAG_FIELD_NUMBER = 1; + private com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StartOffsetFlag flag_; + public boolean hasFlag() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public com.google.protobuf.ByteString getPrimaryKey() { - return primaryKey_; + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StartOffsetFlag getFlag() { + return flag_; } - // optional string iterator = 2; - public static final int ITERATOR_FIELD_NUMBER = 2; - private java.lang.Object iterator_; - public boolean hasIterator() { + // optional uint64 startOffset = 2; + public static final int STARTOFFSET_FIELD_NUMBER = 2; + private long startOffset_; + public boolean hasStartOffset() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public String getIterator() { - java.lang.Object ref = iterator_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - iterator_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getIteratorBytes() { - java.lang.Object ref = iterator_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - iterator_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public long getStartOffset() { + return startOffset_; } - // optional int64 timestamp = 3; - public static final int TIMESTAMP_FIELD_NUMBER = 3; - private long timestamp_; - public boolean hasTimestamp() { + // optional uint64 endOffset = 3; + public static final int ENDOFFSET_FIELD_NUMBER = 3; + private long endOffset_; + public boolean hasEndOffset() { return ((bitField0_ & 0x00000004) == 0x00000004); } - public long getTimestamp() { - return timestamp_; - } - - // optional int64 total_count = 4; - public static final int TOTAL_COUNT_FIELD_NUMBER = 4; - private long totalCount_; - public boolean hasTotalCount() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public long getTotalCount() { - return totalCount_; + public long getEndOffset() { + return endOffset_; } private void initFields() { - primaryKey_ = com.google.protobuf.ByteString.EMPTY; - iterator_ = ""; - timestamp_ = 0L; - totalCount_ = 0L; + flag_ = com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StartOffsetFlag.LATEST; + startOffset_ = 0L; + endOffset_ = 0L; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -18882,16 +17811,13 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, primaryKey_); + output.writeEnum(1, flag_.getNumber()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getIteratorBytes()); + output.writeUInt64(2, startOffset_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeInt64(3, timestamp_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeInt64(4, totalCount_); + output.writeUInt64(3, endOffset_); } getUnknownFields().writeTo(output); } @@ -18904,19 +17830,15 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, primaryKey_); + .computeEnumSize(1, flag_.getNumber()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getIteratorBytes()); + .computeUInt64Size(2, startOffset_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream - .computeInt64Size(3, timestamp_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(4, totalCount_); + .computeUInt64Size(3, endOffset_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -18930,41 +17852,41 @@ protected java.lang.Object writeReplace() return super.writeReplace(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2 parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2 parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2 parseFrom(byte[] data) + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2 parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2 parseFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2 parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2 parseDelimitedFrom(java.io.InputStream input) + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { @@ -18973,7 +17895,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceAp return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2 parseDelimitedFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -18984,12 +17906,12 @@ public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceAp return null; } } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2 parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } - public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2 parseFrom( + public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -18999,7 +17921,7 @@ public static com.alicloud.openservices.tablestore.core.protocol.TunnelServiceAp public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2 prototype) { + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -19012,18 +17934,18 @@ protected Builder newBuilderForType( } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder - implements com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2OrBuilder { + implements com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfigOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TokenContentV2_descriptor; + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_StreamTunnelConfig_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_TokenContentV2_fieldAccessorTable; + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.internal_static_com_alicloud_openservices_tablestore_core_protocol_StreamTunnelConfig_fieldAccessorTable; } - // Construct using com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2.newBuilder() + // Construct using com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -19042,14 +17964,12 @@ private static Builder create() { public Builder clear() { super.clear(); - primaryKey_ = com.google.protobuf.ByteString.EMPTY; + flag_ = com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StartOffsetFlag.LATEST; bitField0_ = (bitField0_ & ~0x00000001); - iterator_ = ""; + startOffset_ = 0L; bitField0_ = (bitField0_ & ~0x00000002); - timestamp_ = 0L; + endOffset_ = 0L; bitField0_ = (bitField0_ & ~0x00000004); - totalCount_ = 0L; - bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -19059,24 +17979,24 @@ public Builder clone() { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2.getDescriptor(); + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig.getDescriptor(); } - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2 getDefaultInstanceForType() { - return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2.getDefaultInstance(); + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig.getDefaultInstance(); } - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2 build() { - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2 result = buildPartial(); + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig build() { + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - private com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2 buildParsed() + private com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2 result = buildPartial(); + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); @@ -19084,53 +18004,46 @@ private com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Toke return result; } - public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2 buildPartial() { - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2 result = new com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2(this); + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig result = new com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.primaryKey_ = primaryKey_; + result.flag_ = flag_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - result.iterator_ = iterator_; + result.startOffset_ = startOffset_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } - result.timestamp_ = timestamp_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - result.totalCount_ = totalCount_; + result.endOffset_ = endOffset_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2) { - return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2)other); + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2 other) { - if (other == com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2.getDefaultInstance()) return this; - if (other.hasPrimaryKey()) { - setPrimaryKey(other.getPrimaryKey()); + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig.getDefaultInstance()) return this; + if (other.hasFlag()) { + setFlag(other.getFlag()); } - if (other.hasIterator()) { - setIterator(other.getIterator()); - } - if (other.hasTimestamp()) { - setTimestamp(other.getTimestamp()); + if (other.hasStartOffset()) { + setStartOffset(other.getStartOffset()); } - if (other.hasTotalCount()) { - setTotalCount(other.getTotalCount()); + if (other.hasEndOffset()) { + setEndOffset(other.getEndOffset()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -19163,24 +18076,25 @@ public Builder mergeFrom( } break; } - case 10: { - bitField0_ |= 0x00000001; - primaryKey_ = input.readBytes(); + case 8: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StartOffsetFlag value = com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StartOffsetFlag.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + flag_ = value; + } break; } - case 18: { + case 16: { bitField0_ |= 0x00000002; - iterator_ = input.readBytes(); + startOffset_ = input.readUInt64(); break; } case 24: { bitField0_ |= 0x00000004; - timestamp_ = input.readInt64(); - break; - } - case 32: { - bitField0_ |= 0x00000008; - totalCount_ = input.readInt64(); + endOffset_ = input.readUInt64(); break; } } @@ -19189,117 +18103,81 @@ public Builder mergeFrom( private int bitField0_; - // optional bytes primary_key = 1; - private com.google.protobuf.ByteString primaryKey_ = com.google.protobuf.ByteString.EMPTY; - public boolean hasPrimaryKey() { + // optional .com.alicloud.openservices.tablestore.core.protocol.StartOffsetFlag flag = 1; + private com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StartOffsetFlag flag_ = com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StartOffsetFlag.LATEST; + public boolean hasFlag() { return ((bitField0_ & 0x00000001) == 0x00000001); } - public com.google.protobuf.ByteString getPrimaryKey() { - return primaryKey_; + public com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StartOffsetFlag getFlag() { + return flag_; } - public Builder setPrimaryKey(com.google.protobuf.ByteString value) { + public Builder setFlag(com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StartOffsetFlag value) { if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - primaryKey_ = value; + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + flag_ = value; onChanged(); return this; } - public Builder clearPrimaryKey() { + public Builder clearFlag() { bitField0_ = (bitField0_ & ~0x00000001); - primaryKey_ = getDefaultInstance().getPrimaryKey(); + flag_ = com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StartOffsetFlag.LATEST; onChanged(); return this; } - // optional string iterator = 2; - private java.lang.Object iterator_ = ""; - public boolean hasIterator() { + // optional uint64 startOffset = 2; + private long startOffset_ ; + public boolean hasStartOffset() { return ((bitField0_ & 0x00000002) == 0x00000002); } - public String getIterator() { - java.lang.Object ref = iterator_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - iterator_ = s; - return s; - } else { - return (String) ref; - } + public long getStartOffset() { + return startOffset_; } - public Builder setIterator(String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - iterator_ = value; + public Builder setStartOffset(long value) { + bitField0_ |= 0x00000002; + startOffset_ = value; onChanged(); return this; } - public Builder clearIterator() { + public Builder clearStartOffset() { bitField0_ = (bitField0_ & ~0x00000002); - iterator_ = getDefaultInstance().getIterator(); + startOffset_ = 0L; onChanged(); return this; } - void setIterator(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000002; - iterator_ = value; - onChanged(); - } - // optional int64 timestamp = 3; - private long timestamp_ ; - public boolean hasTimestamp() { + // optional uint64 endOffset = 3; + private long endOffset_ ; + public boolean hasEndOffset() { return ((bitField0_ & 0x00000004) == 0x00000004); } - public long getTimestamp() { - return timestamp_; + public long getEndOffset() { + return endOffset_; } - public Builder setTimestamp(long value) { + public Builder setEndOffset(long value) { bitField0_ |= 0x00000004; - timestamp_ = value; + endOffset_ = value; onChanged(); return this; } - public Builder clearTimestamp() { + public Builder clearEndOffset() { bitField0_ = (bitField0_ & ~0x00000004); - timestamp_ = 0L; - onChanged(); - return this; - } - - // optional int64 total_count = 4; - private long totalCount_ ; - public boolean hasTotalCount() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public long getTotalCount() { - return totalCount_; - } - public Builder setTotalCount(long value) { - bitField0_ |= 0x00000008; - totalCount_ = value; - onChanged(); - return this; - } - public Builder clearTotalCount() { - bitField0_ = (bitField0_ & ~0x00000008); - totalCount_ = 0L; + endOffset_ = 0L; onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.TokenContentV2) + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.StreamTunnelConfig) } static { - defaultInstance = new TokenContentV2(true); + defaultInstance = new StreamTunnelConfig(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.TokenContentV2) + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.StreamTunnelConfig) } private static com.google.protobuf.Descriptors.Descriptor @@ -19412,26 +18290,6 @@ public Builder clearTotalCount() { private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alicloud_openservices_tablestore_core_protocol_ShutdownResponse_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_com_alicloud_openservices_tablestore_core_protocol_LockChannelRequest_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_com_alicloud_openservices_tablestore_core_protocol_LockChannelRequest_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_com_alicloud_openservices_tablestore_core_protocol_LockChannelResponse_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_com_alicloud_openservices_tablestore_core_protocol_LockChannelResponse_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_com_alicloud_openservices_tablestore_core_protocol_UnlockChannelRequest_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_com_alicloud_openservices_tablestore_core_protocol_UnlockChannelRequest_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_com_alicloud_openservices_tablestore_core_protocol_UnlockChannelResponse_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_com_alicloud_openservices_tablestore_core_protocol_UnlockChannelResponse_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor internal_static_com_alicloud_openservices_tablestore_core_protocol_GetCheckpointRequest_descriptor; private static @@ -19482,6 +18340,11 @@ public Builder clearTotalCount() { private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_com_alicloud_openservices_tablestore_core_protocol_TokenContentV2_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_StreamTunnelConfig_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_StreamTunnelConfig_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -19494,87 +18357,91 @@ public Builder clearTotalCount() { "\n\030tunnel_service_api.proto\0222com.alicloud" + ".openservices.tablestore.core.protocol\"9" + "\n\005Error\022\014\n\004code\030\001 \002(\t\022\017\n\007message\030\002 \001(\t\022\021" + - "\n\ttunnel_id\030\003 \001(\t\"\206\001\n\006Tunnel\022\022\n\ntable_na" + + "\n\ttunnel_id\030\003 \001(\t\"\352\001\n\006Tunnel\022\022\n\ntable_na" + "me\030\001 \002(\t\022\023\n\013tunnel_name\030\003 \002(\t\022S\n\013tunnel_" + "type\030\004 \002(\0162>.com.alicloud.openservices.t" + - "ablestore.core.protocol.TunnelType\"a\n\023Cr" + - "eateTunnelRequest\022J\n\006tunnel\030\001 \002(\0132:.com." + - "alicloud.openservices.tablestore.core.pr" + - "otocol.Tunnel\")\n\024CreateTunnelResponse\022\021\n", - "\ttunnel_id\030\001 \002(\t\"Q\n\023DeleteTunnelRequest\022" + - "\022\n\ntable_name\030\001 \002(\t\022\023\n\013tunnel_name\030\002 \002(\t" + - "\022\021\n\ttunnel_id\030\003 \001(\t\"\026\n\024DeleteTunnelRespo" + - "nse\"\'\n\021ListTunnelRequest\022\022\n\ntable_name\030\001" + - " \001(\t\"\267\001\n\nTunnelInfo\022\021\n\ttunnel_id\030\001 \002(\t\022\023" + - "\n\013tunnel_type\030\002 \002(\t\022\022\n\ntable_name\030\003 \002(\t\022" + - "\025\n\rinstance_name\030\004 \002(\t\022\021\n\tstream_id\030\005 \002(" + - "\t\022\r\n\005stage\030\006 \002(\t\022\017\n\007expired\030\007 \001(\010\022\023\n\013tun" + - "nel_name\030\010 \001(\t\022\016\n\006public\030\t \001(\010\"e\n\022ListTu" + - "nnelResponse\022O\n\007tunnels\030\001 \003(\0132>.com.alic", + "ablestore.core.protocol.TunnelType\022b\n\022St" + + "reamTunnelConfig\030\005 \001(\0132F.com.alicloud.op" + + "enservices.tablestore.core.protocol.Stre" + + "amTunnelConfig\"a\n\023CreateTunnelRequest\022J\n", + "\006tunnel\030\001 \002(\0132:.com.alicloud.openservice" + + "s.tablestore.core.protocol.Tunnel\")\n\024Cre" + + "ateTunnelResponse\022\021\n\ttunnel_id\030\001 \002(\t\"Q\n\023" + + "DeleteTunnelRequest\022\022\n\ntable_name\030\001 \002(\t\022" + + "\023\n\013tunnel_name\030\002 \002(\t\022\021\n\ttunnel_id\030\003 \001(\t\"" + + "\026\n\024DeleteTunnelResponse\"\'\n\021ListTunnelReq" + + "uest\022\022\n\ntable_name\030\001 \001(\t\"\262\002\n\nTunnelInfo\022" + + "\021\n\ttunnel_id\030\001 \002(\t\022\023\n\013tunnel_type\030\002 \002(\t\022" + + "\022\n\ntable_name\030\003 \002(\t\022\025\n\rinstance_name\030\004 \002" + + "(\t\022\021\n\tstream_id\030\005 \002(\t\022\r\n\005stage\030\006 \002(\t\022\017\n\007", + "expired\030\007 \001(\010\022\023\n\013tunnel_name\030\010 \001(\t\022\016\n\006pu" + + "blic\030\t \001(\010\022d\n\024stream_tunnel_config\030\n \001(\013" + + "2F.com.alicloud.openservices.tablestore." + + "core.protocol.StreamTunnelConfig\022\023\n\013crea" + + "te_time\030\013 \001(\003\"e\n\022ListTunnelResponse\022O\n\007t" + + "unnels\030\001 \003(\0132>.com.alicloud.openservices" + + ".tablestore.core.protocol.TunnelInfo\"S\n\025" + + "DescribeTunnelRequest\022\022\n\ntable_name\030\001 \002(" + + "\t\022\023\n\013tunnel_name\030\002 \002(\t\022\021\n\ttunnel_id\030\003 \001(" + + "\t\"\216\001\n\013ChannelInfo\022\022\n\nchannel_id\030\001 \002(\t\022\024\n", + "\014channel_type\030\002 \001(\t\022\026\n\016channel_status\030\003 " + + "\001(\t\022\021\n\tclient_id\030\004 \001(\t\022\023\n\013channel_rpo\030\005 " + + "\001(\003\022\025\n\rchannel_count\030\006 \001(\003\"\317\001\n\026DescribeT" + + "unnelResponse\022N\n\006tunnel\030\001 \002(\0132>.com.alic" + "loud.openservices.tablestore.core.protoc" + - "ol.TunnelInfo\"S\n\025DescribeTunnelRequest\022\022" + - "\n\ntable_name\030\001 \002(\t\022\023\n\013tunnel_name\030\002 \002(\t\022" + - "\021\n\ttunnel_id\030\003 \001(\t\"\216\001\n\013ChannelInfo\022\022\n\nch" + - "annel_id\030\001 \002(\t\022\024\n\014channel_type\030\002 \001(\t\022\026\n\016" + - "channel_status\030\003 \001(\t\022\021\n\tclient_id\030\004 \001(\t\022" + - "\023\n\013channel_rpo\030\005 \001(\003\022\025\n\rchannel_count\030\006 " + - "\001(\003\"\317\001\n\026DescribeTunnelResponse\022N\n\006tunnel" + - "\030\001 \002(\0132>.com.alicloud.openservices.table" + - "store.core.protocol.TunnelInfo\022Q\n\010channe", - "ls\030\002 \003(\0132?.com.alicloud.openservices.tab" + - "lestore.core.protocol.ChannelInfo\022\022\n\ntun" + - "nel_rpo\030\003 \001(\003\"\"\n\rGetRpoRequest\022\021\n\ttunnel" + - "_id\030\001 \001(\t\"=\n\016GetRpoResponse\022\021\n\trpo_infos" + - "\030\001 \001(\014\022\030\n\020tunnel_rpo_infos\030\002 \001(\014\"3\n\014Clie" + - "ntConfig\022\017\n\007timeout\030\001 \001(\003\022\022\n\nclient_tag\030" + - "\002 \001(\t\"|\n\016ConnectRequest\022\021\n\ttunnel_id\030\001 \002" + - "(\t\022W\n\rclient_config\030\002 \001(\0132@.com.alicloud" + - ".openservices.tablestore.core.protocol.C" + - "lientConfig\"$\n\017ConnectResponse\022\021\n\tclient", - "_id\030\001 \002(\t\"\221\001\n\007Channel\022\022\n\nchannel_id\030\001 \002(" + - "\t\022\017\n\007version\030\002 \002(\003\022Q\n\006status\030\003 \002(\0162A.com" + - ".alicloud.openservices.tablestore.core.p" + - "rotocol.ChannelStatus\022\016\n\006detail\030\004 \001(\014\"\207\001" + - "\n\020HeartbeatRequest\022\021\n\ttunnel_id\030\001 \002(\t\022\021\n" + - "\tclient_id\030\002 \002(\t\022M\n\010channels\030\003 \003(\0132;.com" + - ".alicloud.openservices.tablestore.core.p" + - "rotocol.Channel\"b\n\021HeartbeatResponse\022M\n\010" + - "channels\030\001 \003(\0132;.com.alicloud.openservic" + - "es.tablestore.core.protocol.Channel\"7\n\017S", - "hutdownRequest\022\021\n\ttunnel_id\030\001 \002(\t\022\021\n\tcli" + - "ent_id\030\002 \002(\t\"\022\n\020ShutdownResponse\"p\n\022Lock" + - "ChannelRequest\022\021\n\ttunnel_id\030\001 \002(\t\022\021\n\tcli" + - "ent_id\030\002 \002(\t\022\022\n\nchannel_id\030\003 \002(\t\022\017\n\007lock" + - "_id\030\004 \002(\t\022\017\n\007timeout\030\005 \002(\003\"\025\n\023LockChanne" + - "lResponse\"a\n\024UnlockChannelRequest\022\021\n\ttun" + - "nel_id\030\001 \002(\t\022\021\n\tclient_id\030\002 \002(\t\022\022\n\nchann" + - "el_id\030\003 \002(\t\022\017\n\007lock_id\030\004 \002(\t\"\027\n\025UnlockCh" + - "annelResponse\"P\n\024GetCheckpointRequest\022\021\n" + - "\ttunnel_id\030\001 \002(\t\022\021\n\tclient_id\030\002 \002(\t\022\022\n\nc", - "hannel_id\030\003 \002(\t\"D\n\025GetCheckpointResponse" + - "\022\022\n\ncheckpoint\030\001 \002(\t\022\027\n\017sequence_number\030" + - "\002 \002(\003\"z\n\021CheckpointRequest\022\021\n\ttunnel_id\030" + - "\001 \002(\t\022\021\n\tclient_id\030\002 \002(\t\022\022\n\nchannel_id\030\003" + - " \002(\t\022\022\n\ncheckpoint\030\004 \002(\t\022\027\n\017sequence_num" + - "ber\030\005 \002(\003\"\024\n\022CheckpointResponse\"]\n\022ReadR" + - "ecordsRequest\022\021\n\ttunnel_id\030\001 \002(\t\022\021\n\tclie" + - "nt_id\030\002 \002(\t\022\022\n\nchannel_id\030\003 \002(\t\022\r\n\005token" + - "\030\004 \002(\t\"m\n\006Record\022S\n\013action_type\030\001 \002(\0162>." + - "com.alicloud.openservices.tablestore.cor", - "e.protocol.ActionType\022\016\n\006record\030\002 \002(\014\"v\n" + - "\023ReadRecordsResponse\022K\n\007records\030\001 \003(\0132:." + + "ol.TunnelInfo\022Q\n\010channels\030\002 \003(\0132?.com.al" + + "icloud.openservices.tablestore.core.prot" + + "ocol.ChannelInfo\022\022\n\ntunnel_rpo\030\003 \001(\003\"\"\n\r" + + "GetRpoRequest\022\021\n\ttunnel_id\030\001 \001(\t\"=\n\016GetR" + + "poResponse\022\021\n\trpo_infos\030\001 \001(\014\022\030\n\020tunnel_", + "rpo_infos\030\002 \001(\014\"3\n\014ClientConfig\022\017\n\007timeo" + + "ut\030\001 \001(\003\022\022\n\nclient_tag\030\002 \001(\t\"|\n\016ConnectR" + + "equest\022\021\n\ttunnel_id\030\001 \002(\t\022W\n\rclient_conf" + + "ig\030\002 \001(\0132@.com.alicloud.openservices.tab" + + "lestore.core.protocol.ClientConfig\"$\n\017Co" + + "nnectResponse\022\021\n\tclient_id\030\001 \002(\t\"\221\001\n\007Cha" + + "nnel\022\022\n\nchannel_id\030\001 \002(\t\022\017\n\007version\030\002 \002(" + + "\003\022Q\n\006status\030\003 \002(\0162A.com.alicloud.openser" + + "vices.tablestore.core.protocol.ChannelSt" + + "atus\022\016\n\006detail\030\004 \001(\014\"\207\001\n\020HeartbeatReques", + "t\022\021\n\ttunnel_id\030\001 \002(\t\022\021\n\tclient_id\030\002 \002(\t\022" + + "M\n\010channels\030\003 \003(\0132;.com.alicloud.openser" + + "vices.tablestore.core.protocol.Channel\"b" + + "\n\021HeartbeatResponse\022M\n\010channels\030\001 \003(\0132;." + "com.alicloud.openservices.tablestore.cor" + - "e.protocol.Record\022\022\n\nnext_token\030\002 \002(\t\")\n" + - "\005Token\022\017\n\007version\030\001 \002(\003\022\017\n\007content\030\002 \002(\014" + - "\"H\n\014TokenContent\022\023\n\013primary_key\030\001 \001(\014\022\020\n" + - "\010iterator\030\002 \001(\t\022\021\n\ttimestamp\030\003 \001(\003\"_\n\016To" + - "kenContentV2\022\023\n\013primary_key\030\001 \001(\014\022\020\n\010ite" + - "rator\030\002 \001(\t\022\021\n\ttimestamp\030\003 \001(\003\022\023\n\013total_" + - "count\030\004 \001(\003*9\n\nTunnelType\022\014\n\010BaseData\020\001\022", - "\n\n\006Stream\020\002\022\021\n\rBaseAndStream\020\003*A\n\rChanne" + - "lStatus\022\010\n\004OPEN\020\001\022\013\n\007CLOSING\020\002\022\t\n\005CLOSE\020" + - "\003\022\016\n\nTERMINATED\020\004*9\n\nActionType\022\013\n\007PUT_R" + - "OW\020\001\022\016\n\nUPDATE_ROW\020\002\022\016\n\nDELETE_ROW\020\003" + "e.protocol.Channel\"7\n\017ShutdownRequest\022\021\n" + + "\ttunnel_id\030\001 \002(\t\022\021\n\tclient_id\030\002 \002(\t\"\022\n\020S" + + "hutdownResponse\"P\n\024GetCheckpointRequest\022" + + "\021\n\ttunnel_id\030\001 \002(\t\022\021\n\tclient_id\030\002 \002(\t\022\022\n" + + "\nchannel_id\030\003 \002(\t\"D\n\025GetCheckpointRespon", + "se\022\022\n\ncheckpoint\030\001 \002(\t\022\027\n\017sequence_numbe" + + "r\030\002 \002(\003\"z\n\021CheckpointRequest\022\021\n\ttunnel_i" + + "d\030\001 \002(\t\022\021\n\tclient_id\030\002 \002(\t\022\022\n\nchannel_id" + + "\030\003 \002(\t\022\022\n\ncheckpoint\030\004 \002(\t\022\027\n\017sequence_n" + + "umber\030\005 \002(\003\"\024\n\022CheckpointResponse\"]\n\022Rea" + + "dRecordsRequest\022\021\n\ttunnel_id\030\001 \002(\t\022\021\n\tcl" + + "ient_id\030\002 \002(\t\022\022\n\nchannel_id\030\003 \002(\t\022\r\n\005tok" + + "en\030\004 \002(\t\"m\n\006Record\022S\n\013action_type\030\001 \002(\0162" + + ">.com.alicloud.openservices.tablestore.c" + + "ore.protocol.ActionType\022\016\n\006record\030\002 \002(\014\"", + "v\n\023ReadRecordsResponse\022K\n\007records\030\001 \003(\0132" + + ":.com.alicloud.openservices.tablestore.c" + + "ore.protocol.Record\022\022\n\nnext_token\030\002 \002(\t\"" + + ")\n\005Token\022\017\n\007version\030\001 \002(\003\022\017\n\007content\030\002 \002" + + "(\014\"H\n\014TokenContent\022\023\n\013primary_key\030\001 \001(\014\022" + + "\020\n\010iterator\030\002 \001(\t\022\021\n\ttimestamp\030\003 \001(\003\"_\n\016" + + "TokenContentV2\022\023\n\013primary_key\030\001 \001(\014\022\020\n\010i" + + "terator\030\002 \001(\t\022\021\n\ttimestamp\030\003 \001(\003\022\023\n\013tota" + + "l_count\030\004 \001(\003\"\217\001\n\022StreamTunnelConfig\022Q\n\004" + + "flag\030\001 \001(\0162C.com.alicloud.openservices.t", + "ablestore.core.protocol.StartOffsetFlag\022" + + "\023\n\013startOffset\030\002 \001(\004\022\021\n\tendOffset\030\003 \001(\004*" + + "9\n\nTunnelType\022\014\n\010BaseData\020\001\022\n\n\006Stream\020\002\022" + + "\021\n\rBaseAndStream\020\003*A\n\rChannelStatus\022\010\n\004O" + + "PEN\020\001\022\013\n\007CLOSING\020\002\022\t\n\005CLOSE\020\003\022\016\n\nTERMINA" + + "TED\020\004*9\n\nActionType\022\013\n\007PUT_ROW\020\001\022\016\n\nUPDA" + + "TE_ROW\020\002\022\016\n\nDELETE_ROW\020\003*+\n\017StartOffsetF" + + "lag\022\n\n\006LATEST\020\000\022\014\n\010EARLIEST\020\001" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -19594,7 +18461,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( internal_static_com_alicloud_openservices_tablestore_core_protocol_Tunnel_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_Tunnel_descriptor, - new java.lang.String[] { "TableName", "TunnelName", "TunnelType", }, + new java.lang.String[] { "TableName", "TunnelName", "TunnelType", "StreamTunnelConfig", }, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Tunnel.class, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Tunnel.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_CreateTunnelRequest_descriptor = @@ -19642,7 +18509,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( internal_static_com_alicloud_openservices_tablestore_core_protocol_TunnelInfo_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_TunnelInfo_descriptor, - new java.lang.String[] { "TunnelId", "TunnelType", "TableName", "InstanceName", "StreamId", "Stage", "Expired", "TunnelName", "Public", }, + new java.lang.String[] { "TunnelId", "TunnelType", "TableName", "InstanceName", "StreamId", "Stage", "Expired", "TunnelName", "Public", "StreamTunnelConfig", "CreateTime", }, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TunnelInfo.class, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TunnelInfo.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_ListTunnelResponse_descriptor = @@ -19757,40 +18624,8 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( new java.lang.String[] { }, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ShutdownResponse.class, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ShutdownResponse.Builder.class); - internal_static_com_alicloud_openservices_tablestore_core_protocol_LockChannelRequest_descriptor = - getDescriptor().getMessageTypes().get(22); - internal_static_com_alicloud_openservices_tablestore_core_protocol_LockChannelRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_com_alicloud_openservices_tablestore_core_protocol_LockChannelRequest_descriptor, - new java.lang.String[] { "TunnelId", "ClientId", "ChannelId", "LockId", "Timeout", }, - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelRequest.class, - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelRequest.Builder.class); - internal_static_com_alicloud_openservices_tablestore_core_protocol_LockChannelResponse_descriptor = - getDescriptor().getMessageTypes().get(23); - internal_static_com_alicloud_openservices_tablestore_core_protocol_LockChannelResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_com_alicloud_openservices_tablestore_core_protocol_LockChannelResponse_descriptor, - new java.lang.String[] { }, - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelResponse.class, - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.LockChannelResponse.Builder.class); - internal_static_com_alicloud_openservices_tablestore_core_protocol_UnlockChannelRequest_descriptor = - getDescriptor().getMessageTypes().get(24); - internal_static_com_alicloud_openservices_tablestore_core_protocol_UnlockChannelRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_com_alicloud_openservices_tablestore_core_protocol_UnlockChannelRequest_descriptor, - new java.lang.String[] { "TunnelId", "ClientId", "ChannelId", "LockId", }, - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelRequest.class, - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelRequest.Builder.class); - internal_static_com_alicloud_openservices_tablestore_core_protocol_UnlockChannelResponse_descriptor = - getDescriptor().getMessageTypes().get(25); - internal_static_com_alicloud_openservices_tablestore_core_protocol_UnlockChannelResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_com_alicloud_openservices_tablestore_core_protocol_UnlockChannelResponse_descriptor, - new java.lang.String[] { }, - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelResponse.class, - com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.UnlockChannelResponse.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_GetCheckpointRequest_descriptor = - getDescriptor().getMessageTypes().get(26); + getDescriptor().getMessageTypes().get(22); internal_static_com_alicloud_openservices_tablestore_core_protocol_GetCheckpointRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_GetCheckpointRequest_descriptor, @@ -19798,7 +18633,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest.class, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointRequest.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_GetCheckpointResponse_descriptor = - getDescriptor().getMessageTypes().get(27); + getDescriptor().getMessageTypes().get(23); internal_static_com_alicloud_openservices_tablestore_core_protocol_GetCheckpointResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_GetCheckpointResponse_descriptor, @@ -19806,7 +18641,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse.class, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.GetCheckpointResponse.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_CheckpointRequest_descriptor = - getDescriptor().getMessageTypes().get(28); + getDescriptor().getMessageTypes().get(24); internal_static_com_alicloud_openservices_tablestore_core_protocol_CheckpointRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_CheckpointRequest_descriptor, @@ -19814,7 +18649,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest.class, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointRequest.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_CheckpointResponse_descriptor = - getDescriptor().getMessageTypes().get(29); + getDescriptor().getMessageTypes().get(25); internal_static_com_alicloud_openservices_tablestore_core_protocol_CheckpointResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_CheckpointResponse_descriptor, @@ -19822,7 +18657,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse.class, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.CheckpointResponse.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_ReadRecordsRequest_descriptor = - getDescriptor().getMessageTypes().get(30); + getDescriptor().getMessageTypes().get(26); internal_static_com_alicloud_openservices_tablestore_core_protocol_ReadRecordsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_ReadRecordsRequest_descriptor, @@ -19830,7 +18665,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest.class, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsRequest.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_Record_descriptor = - getDescriptor().getMessageTypes().get(31); + getDescriptor().getMessageTypes().get(27); internal_static_com_alicloud_openservices_tablestore_core_protocol_Record_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_Record_descriptor, @@ -19838,7 +18673,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record.class, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Record.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_ReadRecordsResponse_descriptor = - getDescriptor().getMessageTypes().get(32); + getDescriptor().getMessageTypes().get(28); internal_static_com_alicloud_openservices_tablestore_core_protocol_ReadRecordsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_ReadRecordsResponse_descriptor, @@ -19846,7 +18681,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse.class, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.ReadRecordsResponse.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_Token_descriptor = - getDescriptor().getMessageTypes().get(33); + getDescriptor().getMessageTypes().get(29); internal_static_com_alicloud_openservices_tablestore_core_protocol_Token_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_Token_descriptor, @@ -19854,7 +18689,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token.class, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.Token.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_TokenContent_descriptor = - getDescriptor().getMessageTypes().get(34); + getDescriptor().getMessageTypes().get(30); internal_static_com_alicloud_openservices_tablestore_core_protocol_TokenContent_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_TokenContent_descriptor, @@ -19862,13 +18697,21 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent.class, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContent.Builder.class); internal_static_com_alicloud_openservices_tablestore_core_protocol_TokenContentV2_descriptor = - getDescriptor().getMessageTypes().get(35); + getDescriptor().getMessageTypes().get(31); internal_static_com_alicloud_openservices_tablestore_core_protocol_TokenContentV2_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_com_alicloud_openservices_tablestore_core_protocol_TokenContentV2_descriptor, new java.lang.String[] { "PrimaryKey", "Iterator", "Timestamp", "TotalCount", }, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2.class, com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.TokenContentV2.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_StreamTunnelConfig_descriptor = + getDescriptor().getMessageTypes().get(32); + internal_static_com_alicloud_openservices_tablestore_core_protocol_StreamTunnelConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_StreamTunnelConfig_descriptor, + new java.lang.String[] { "Flag", "StartOffset", "EndOffset", }, + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig.class, + com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi.StreamTunnelConfig.Builder.class); return null; } }; diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/ots_filter.proto b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/ots_filter.proto index d8a8727..ccf4bf7 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/ots_filter.proto +++ b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/ots_filter.proto @@ -2,6 +2,20 @@ syntax = "proto2"; package com.alicloud.openservices.tablestore.core.protocol; +enum VariantType { + VT_INTEGER = 0; + VT_DOUBLE = 1; + //VT_BOOLEAN = 2; + VT_STRING = 3; + VT_NULL = 6; + VT_BLOB = 7; +} + +message ValueTransferRule { + required string regex = 1; + optional VariantType cast_type = 2; +} + enum FilterType { FT_SINGLE_COLUMN_VALUE = 1; FT_COMPOSITE_COLUMN_VALUE = 2; @@ -15,6 +29,8 @@ enum ComparatorType { CT_GREATER_EQUAL = 4; CT_LESS_THAN = 5; CT_LESS_EQUAL = 6; + CT_EXIST = 7; + CT_NOT_EXIST = 8; } message SingleColumnValueFilter { @@ -23,6 +39,7 @@ message SingleColumnValueFilter { required bytes column_value = 3; required bool filter_if_missing = 4; required bool latest_version_only = 5; + optional ValueTransferRule value_trans_rule = 6; } enum LogicalOperator { diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/ots_internal_api.proto b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/ots_internal_api.proto index 7da7096..250f960 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/ots_internal_api.proto +++ b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/ots_internal_api.proto @@ -28,7 +28,12 @@ enum PrimaryKeyOption { message PrimaryKeySchema { required string name = 1; required PrimaryKeyType type = 2; - optional PrimaryKeyOption option = 3; + optional PrimaryKeyOption option = 3; +} + +message PartitionRange { + required bytes begin = 1; // encoded as SQLVariant + required bytes end = 2; // encoded as SQLVariant } message DefinedColumnSchema { @@ -40,6 +45,7 @@ message TableOptions { optional int32 time_to_live = 1; optional int32 max_versions = 2; optional int64 deviation_cell_version_in_sec = 5; + optional bool allow_update = 6; } enum IndexUpdateMode { @@ -82,6 +88,11 @@ message CapacityUnit { optional int32 write = 2; } +message CapacityDataSize { + optional int64 read_size = 1; + optional int64 write_size = 2; +} + message ReservedThroughputDetails { required CapacityUnit capacity_unit = 1; required int64 last_increase_time = 2; @@ -94,6 +105,7 @@ message ReservedThroughput { message ConsumedCapacity { required CapacityUnit capacity_unit = 1; + optional CapacityDataSize capacity_data_size = 2; } message StreamSpecification { @@ -108,12 +120,34 @@ message StreamDetails { optional int64 last_enable_time = 4; } +enum SSEKeyType { + SSE_KMS_SERVICE = 1; + SSE_BYOK = 2; +} + +message SSESpecification { + required bool enable = 1; + optional SSEKeyType key_type = 2; + optional bytes key_id = 3; // only useful when key_type is SSE_BYOK + optional bytes role_arn = 4; // only useful when key_type is SSE_BYOK +} + +message SSEDetails { + required bool enable = 1; + optional SSEKeyType key_type = 2; + optional bytes key_id = 3; + optional bytes role_arn = 4; // only useful when key_type is SSE_BYOK +} + message CreateTableRequest { required TableMeta table_meta = 1; - required ReservedThroughput reserved_throughput = 2; + required ReservedThroughput reserved_throughput = 2; optional TableOptions table_options = 3; + repeated PartitionRange partitions = 4; optional StreamSpecification stream_spec = 5; + optional SSESpecification sse_spec = 6; repeated IndexMeta index_metas = 7; + optional bool enable_local_txn = 8; } message CreateTableResponse { @@ -136,6 +170,22 @@ message DropIndexRequest { message DropIndexResponse { } +message AddDefinedColumnRequest { + required string table_name = 1; + repeated DefinedColumnSchema columns = 2; +} + +message AddDefinedColumnResponse { +} + +message DeleteDefinedColumnRequest { + required string table_name = 1; + repeated string columns = 2; +} + +message DeleteDefinedColumnResponse { +} + message UpdateTableRequest { required string table_name = 1; optional ReservedThroughput reserved_throughput = 2; @@ -158,7 +208,9 @@ message DescribeTableResponse { required TableOptions table_options = 3; optional StreamDetails stream_details = 5; repeated bytes shard_splits = 6; + optional SSEDetails sse_details = 7; repeated IndexMeta index_metas = 8; + optional int64 creation_time = 9; } message ListTableRequest { } @@ -200,12 +252,12 @@ enum ReturnType { message ReturnContent { optional ReturnType return_type = 1; repeated string return_column_names = 2; -} +} message GetRowRequest { required string table_name = 1; - required bytes primary_key = 2; - repeated string columns_to_get = 3; + required bytes primary_key = 2; + repeated string columns_to_get = 3; optional TimeRange time_range = 4; optional int32 max_versions = 5; optional bytes filter = 7; @@ -217,7 +269,7 @@ message GetRowRequest { message GetRowResponse { required ConsumedCapacity consumed = 1; - required bytes row = 2; + required bytes row = 2; optional bytes next_token = 3; } message UpdateRowRequest { @@ -234,7 +286,7 @@ message UpdateRowResponse { } message PutRowRequest { required string table_name = 1; - required bytes row = 2; + required bytes row = 2; required Condition condition = 3; optional ReturnContent return_content = 4; optional string transaction_id = 5; @@ -246,7 +298,7 @@ message PutRowResponse { } message DeleteRowRequest { required string table_name = 1; - required bytes primary_key = 2; + required bytes primary_key = 2; required Condition condition = 3; optional ReturnContent return_content = 4; optional string transaction_id = 5; @@ -258,9 +310,9 @@ message DeleteRowResponse { } message TableInBatchGetRowRequest { required string table_name = 1; - repeated bytes primary_key = 2; + repeated bytes primary_key = 2; repeated bytes token = 3; - repeated string columns_to_get = 4; + repeated string columns_to_get = 4; optional TimeRange time_range = 5; optional int32 max_versions = 6; optional bytes filter = 8; @@ -276,7 +328,7 @@ message RowInBatchGetRowResponse { required bool is_ok = 1; optional Error error = 2; optional ConsumedCapacity consumed = 3; - optional bytes row = 4; + optional bytes row = 4; optional bytes next_token = 5; } @@ -297,9 +349,9 @@ enum OperationType { message RowInBatchWriteRowRequest { required OperationType type = 1; - required bytes row_change = 2; + required bytes row_change = 2; required Condition condition = 3; - optional ReturnContent return_content = 4; + optional ReturnContent return_content = 4; } message TableInBatchWriteRowRequest { @@ -310,13 +362,14 @@ message TableInBatchWriteRowRequest { message BatchWriteRowRequest { repeated TableInBatchWriteRowRequest tables = 1; optional string transaction_id = 2; + optional bool is_atomic = 3; } message RowInBatchWriteRowResponse { required bool is_ok = 1; optional Error error = 2; optional ConsumedCapacity consumed = 3; - optional bytes row = 4; + optional bytes row = 4; } message TableInBatchWriteRowResponse { @@ -335,12 +388,12 @@ enum Direction { message GetRangeRequest { required string table_name = 1; required Direction direction = 2; - repeated string columns_to_get = 3; + repeated string columns_to_get = 3; optional TimeRange time_range = 4; optional int32 max_versions = 5; optional int32 limit = 6; - required bytes inclusive_start_primary_key = 7; - required bytes exclusive_end_primary_key = 8; + required bytes inclusive_start_primary_key = 7; + required bytes exclusive_end_primary_key = 8; optional bytes filter = 10; optional string start_column = 11; optional string end_column = 12; @@ -350,14 +403,14 @@ message GetRangeRequest { message GetRangeResponse { required ConsumedCapacity consumed = 1; - required bytes rows = 2; + required bytes rows = 2; optional bytes next_start_primary_key = 3; optional bytes next_token = 4; } message StartLocalTransactionRequest { required string table_name = 1; - required bytes key = 2; + required bytes key = 2; } message StartLocalTransactionResponse { @@ -423,10 +476,13 @@ message DescribeStreamResponse { message GetShardIteratorRequest { required string stream_id = 1; required string shard_id = 2; + optional int64 timestamp = 3; + optional string token = 4; } message GetShardIteratorResponse { required string shard_iterator = 1; + optional string next_token = 2; } message GetStreamRecordRequest { @@ -453,6 +509,7 @@ message ComputeSplitPointsBySizeRequest { required string table_name = 1; required int64 split_size = 2; // in 100MB optional int64 split_size_unit_in_byte = 3; + optional int32 split_point_limit = 4; } message ComputeSplitPointsBySizeResponse { @@ -465,7 +522,7 @@ message ComputeSplitPointsBySizeResponse { * A split is a consecutive range of primary keys, * whose data size is about split_size specified in the request. * The size could be hard to be precise. - * + * * A split point is an array of primary-key column w.r.t. table schema, * which is never longer than that of table schema. * Tailing -inf will be omitted to reduce transmission payloads. @@ -484,5 +541,93 @@ message ComputeSplitPointsBySizeResponse { } repeated SplitLocation locations = 4; } -/* -------------------------------------- */ +enum DataBlockType { + DBT_PLAIN_BUFFER = 0; + DBT_SIMPLE_ROW_MATRIX = 1; +} + +message BulkExportRequest { + required string table_name = 1; + repeated string columns_to_get = 2; + required bytes inclusive_start_primary_key = 3; + required bytes exclusive_end_primary_key = 4; + optional bytes filter = 5; + optional DataBlockType data_block_type_hint = 6 [default = DBT_SIMPLE_ROW_MATRIX]; +} + +message BulkExportResponse { + required ConsumedCapacity consumed = 1; + required bytes rows = 2; + optional bytes next_start_primary_key = 3; + optional DataBlockType data_block_type = 4; +} + +message BulkImportRequest { + required string table_name = 1; + repeated RowInBulkImportRequest rows = 2; +} + +message RowInBulkImportRequest { + required OperationType type = 1; + required bytes row_change = 2; +} + +message BulkImportResponse { + required string table_name = 1; + repeated RowInBulkImportResponse rows = 2; +} + +message RowInBulkImportResponse { + required bool is_ok = 1; + optional Error error = 2; + optional ConsumedCapacity consumed = 3; +} + +/* computeSplits */ +message ComputeSplitsRequest { + optional string table_name = 1; + optional SearchIndexSplitsOptions search_index_splits_options = 2; +} + +message SearchIndexSplitsOptions{ + optional string index_name = 1; +} + +message ComputeSplitsResponse { + optional bytes session_id = 1; + optional int32 splits_size = 2; +} + +/* SQLQuery */ +enum SQLPayloadVersion { + SQL_PLAIN_BUFFER = 1; + SQL_FLAT_BUFFERS = 2; +} + +enum SQLStatementType { + SQL_SELECT = 1; + SQL_CREATE_TABLE = 2; + SQL_SHOW_TABLE = 3; + SQL_DESCRIBE_TABLE = 4; + SQL_DROP_TABLE = 5; + SQL_ALTER_TABLE = 6; +} + +message SQLQueryRequest { + required string query = 1; + optional SQLPayloadVersion version = 2; +} + +message TableConsumedCapacity { + optional string table_name = 1; + optional ConsumedCapacity consumed = 2; + optional ReservedThroughput reserved_throughput = 3; +} + +message SQLQueryResponse { + repeated TableConsumedCapacity consumes = 1; + optional bytes rows = 2; + optional SQLPayloadVersion version = 3; + optional SQLStatementType type = 4; +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/search.proto b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/search.proto index 378dfba..8353ca9 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/search.proto +++ b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/search.proto @@ -2,6 +2,502 @@ syntax = "proto2"; package com.alicloud.openservices.tablestore.core.protocol; +/////////////////////////////////////////////////// old agg proto +enum AggType { //for compatibility + AVG_AGG = 1; + CARDINALITY_AGG = 2; + MAX_AGG = 3; + MIN_AGG = 4; + SUM_AGG = 5; + TERMS_AGG = 6; + FILTER_AGG = 7; + NESTED_AGG = 8; + GEO_BOUNDS_AGG = 9; + GEO_DISTANCE_AGG = 10; + STATS_AGG = 11; + EXTENDED_STATS_AGG = 12; + PERCENTILES_AGG = 13; + PERCENTILE_RANKS_AGG = 14; + VALUE_COUNT_AGG = 15; +} + +message AvgAgg { + optional string field_name = 1; + optional bytes missing = 2; +} + +message CardinalityAgg { + optional string field_name = 1; +} + +message MaxAgg { + optional string field_name = 1; + optional bytes missing = 2; +} + +message MinAgg { + optional string field_name = 1; + optional bytes missing = 2; +} + +message SumAgg { + optional string field_name = 1; + optional bytes missing = 2; +} + +message TermsAgg { + optional string field_name = 1; + optional int32 size = 2; + optional Agg agg = 3; +} + +message FilterAgg { + optional Query filter = 1; + optional Agg agg = 2; +} + +message NestedPath { + optional string path = 1; +} + +message NestedAgg { + optional NestedPath nested_path = 1; + optional Agg agg = 2; +} + +message GeoBoundsAgg { + optional string field_name = 1; + optional bool wrap_longitude = 2; +} + +message GeoDistanceAggRange { + optional string key = 1; + optional double range_from = 2; + optional double range_to = 3; +} + +message GeoDistanceAgg { + optional string field_name = 1; + optional string origin = 2; + repeated GeoDistanceAggRange ranges = 3; +} + +message StatsAgg { + optional string field_name = 1; + optional bytes missing = 2; // variant +} + +message ExtendedStatsAgg { + optional string field_name = 1; + optional bytes missing = 2; // variant +} + +message PercentilesAgg { + optional string field_name = 1; + repeated double percents = 2; + optional bytes missing = 3; +} + +message PercentileRanksAgg { + optional string field_name = 1; + repeated double values = 2; + optional bytes missing = 3; +} + +message ValueCountAgg { + optional string field_name = 1; +} + +message AggClause { + optional string agg_name = 1; + optional AggType agg_type = 2; + optional bytes agg_body = 3; // encode by protobuf +} + +message Agg { + repeated AggClause agg_clause = 1; +} + +//result +message AvgAggResult { + optional double value = 1; +} + +message MaxAggResult { + optional double value = 1; +} + +message MinAggResult { + optional double value = 1; +} + +message SumAggResult { + optional double value = 1; +} + +message CardinalityAggResult { + optional int64 value = 1; +} + +message Bucket { + optional string key = 1; + optional int64 doc_count = 2; + optional AggResult agg_result = 3; +} + +message TermsAggResult { + optional int64 doc_count_error_upper_bound = 1; + optional int64 sum_of_other_doc_count = 2; + repeated Bucket bucket = 3; +} + +message FilterAggResult { + optional int64 doc_count = 1; + optional AggResult agg_result = 2; +} + +message NestedAggResult { + optional int64 doc_count = 1; + optional AggResult agg_result = 2; +} + +message GeoPoint { + optional double lat = 1; + optional double lon = 2; +} + +message GeoBoundsAggResult { + optional GeoPoint top_left = 1; + optional GeoPoint bottom_right = 2; +} + +message RangeBucket { + optional string key = 1; + optional double range_from = 2; + optional double range_to = 3; + optional int64 doc_count = 4; +} + +message GeoDistanceAggResult { + repeated RangeBucket bucket = 1; +} + +message StatsAggResult { + optional int64 count = 1; + optional double min = 2; + optional double max = 3; + optional double avg = 4; + optional double sum = 5; +} + +message ExtendedStatsAggResult { + optional int64 count = 1; + optional double min = 2; + optional double max = 3; + optional double avg = 4; + optional double sum = 5; + optional double sum_of_squares = 6; + optional double variance = 7; + optional double std_deviation = 8; + optional double std_deviation_bounds_upper = 9; + optional double std_deviation_bounds_lower = 10; +} + +message Percentile { + optional double percent = 1; + optional double value = 2; +} + +message PercentilesAggResult { + repeated Percentile percentiles = 1; +} + +message PercentileRanksAggResult { + repeated Percentile percentiles = 1; +} + +message ValueCountAggResult { + optional int64 count = 1; +} + +message SubAggResult { + optional string name = 1; + optional AggType type = 2; + optional bytes agg_result = 3; // encode XXAggResult +} + +message AggResult { + repeated SubAggResult sub_agg_results = 1; +} + +/////////////////////////////////////////////////// new agg proto +enum AggregationType { + AGG_AVG = 1; + AGG_DISTINCT_COUNT = 6; + AGG_MAX = 2; + AGG_MIN = 3; + AGG_SUM = 4; + AGG_COUNT = 5; + AGG_TOP_ROWS = 7; + AGG_PERCENTILES = 8; +} + +enum GroupByType { + GROUP_BY_FIELD = 1; + GROUP_BY_RANGE = 2; + GROUP_BY_FILTER = 3; + GROUP_BY_GEO_DISTANCE = 4; + GROUP_BY_HISTOGRAM = 5; +} + +// agg & group by +message Aggregation { + optional string name = 1; + optional AggregationType type = 2; + optional bytes body = 3; +} +message Aggregations { + repeated Aggregation aggs = 1; +} + +message GroupBy { + optional string name = 1; + optional GroupByType type = 2; + optional bytes body = 3; +} +message GroupBys { + repeated GroupBy group_bys = 1; +} + +// single agg +message AvgAggregation { + optional string field_name = 1; + optional bytes missing = 2; //encoded as SQLVariant, check in SearchProxy +} + +message MaxAggregation { + optional string field_name = 1; + optional bytes missing = 2; +} + +message MinAggregation { + optional string field_name = 1; + optional bytes missing = 2; +} + +message SumAggregation { + optional string field_name = 1; + optional bytes missing = 2; +} + +message CountAggregation { + optional string field_name = 1; +} + +message DistinctCountAggregation { + optional string field_name = 1; + optional bytes missing = 2; +} + +message TopRowsAggregation { + optional int32 limit = 1; + optional Sort sort = 2; +} + +message PercentilesAggregation { + optional string field_name = 1; + repeated double percentiles = 2; + optional bytes missing = 3; +} + +// group agg +message FieldRange { + optional bytes min = 1; + optional bytes max = 2; +} + +message GroupByHistogram { + optional string field_name = 1; + optional bytes interval = 2; + optional bytes missing = 3; + optional int64 min_doc_count = 4; + optional GroupBySort sort = 5; + optional FieldRange field_range = 6; + optional Aggregations sub_aggs = 7; + optional GroupBys sub_group_bys = 8; +} + +message GroupKeySort { + optional SortOrder order = 1; +} + +message RowCountSort { + optional SortOrder order = 1; +} + +message SubAggSort { + optional string sub_agg_name = 1; + optional SortOrder order = 2; +} + +message GroupBySorter { + optional GroupKeySort group_key_sort = 1; + optional RowCountSort row_count_sort = 2; + optional SubAggSort sub_agg_sort = 3; +} + +message GroupBySort { + repeated GroupBySorter sorters = 1; +} + +message GroupByField { + optional string field_name = 1; + optional int32 size = 2; + optional GroupBySort sort = 3; + optional Aggregations sub_aggs = 4; + optional GroupBys sub_group_bys = 5; + optional int64 min_doc_count = 6; +} + +message Range { + optional double from = 1; + optional double to = 2; +} + +message GroupByRange { + optional string field_name = 1; + repeated Range ranges = 2; + optional Aggregations sub_aggs = 3; + optional GroupBys sub_group_bys = 4; +} + +message GroupByFilter { + repeated Query filters = 1; + optional Aggregations sub_aggs = 2; + optional GroupBys sub_group_bys = 3; +} + +message GroupByGeoDistance { + optional string field_name = 1; + optional GeoPoint origin = 2; + repeated Range ranges = 3; + optional Aggregations sub_aggs = 4; + optional GroupBys sub_group_bys = 5; +} + +//single agg result +message AvgAggregationResult { + optional double value = 1; +} + +message TopRowsAggregationResult { + repeated bytes rows = 1; +} + +message PercentilesAggregationItem { + optional double key = 1; + optional bytes value = 2; +} + +message PercentilesAggregationResult { + repeated PercentilesAggregationItem percentiles_aggregation_items = 1; +} + +message DistinctCountAggregationResult { + optional int64 value = 1; +} + +message MaxAggregationResult { + optional double value = 1; +} + +message MinAggregationResult { + optional double value = 1; +} + +message SumAggregationResult { + optional double value = 1; +} + +message CountAggregationResult { + optional int64 value = 1; +} + +message AggregationResult { + optional string name = 1; + optional AggregationType type = 2; + optional bytes agg_result = 3; // encoded by XxxAggregationResult +} + +message AggregationsResult { + repeated AggregationResult agg_results = 1; +} + +//group by result +message GroupByFieldResultItem { + optional string key = 1; + optional int64 row_count = 2; + optional AggregationsResult sub_aggs_result = 3; + optional GroupBysResult sub_group_bys_result = 4; +} +message GroupByFieldResult { + repeated GroupByFieldResultItem group_by_field_result_items = 1; +} + +message GroupByRangeResultItem { + optional double from = 1; + optional double to = 2; + optional int64 row_count = 3; + optional AggregationsResult sub_aggs_result = 4; + optional GroupBysResult sub_group_bys_result = 5; +} +message GroupByRangeResult { + repeated GroupByRangeResultItem group_by_range_result_items = 1; +} + +message GroupByGeoDistanceResultItem { + optional double from = 1; + optional double to = 2; + optional int64 row_count = 3; + optional AggregationsResult sub_aggs_result = 4; + optional GroupBysResult sub_group_bys_result = 5; +} +message GroupByGeoDistanceResult { + repeated GroupByGeoDistanceResultItem group_by_geo_distance_result_items = 1; +} + +message GroupByFilterResultItem { + optional int64 row_count = 1; + optional AggregationsResult sub_aggs_result = 2; + optional GroupBysResult sub_group_bys_result = 3; +} +message GroupByFilterResult { + repeated GroupByFilterResultItem group_by_filter_result_items = 1; +} + +message GroupByResult { + optional string name = 1; + optional GroupByType type = 2; + optional bytes group_by_result = 3; //encoded by XxxGroupByResult +} + +message GroupBysResult { + repeated GroupByResult group_by_results = 1; //sibling pipeline / parallel group bys +} + +message GroupByHistogramItem { + optional bytes key = 1; + optional int64 value = 2; + optional AggregationsResult sub_aggs_result = 3; + optional GroupBysResult sub_group_bys_result = 4; +} + +message GroupByHistogramResult { + repeated GroupByHistogramItem group_by_histogra_items = 1; +} +///////////////////////////////////////////////////////////////////////////////////// end off new agg + + enum QueryType { MATCH_QUERY = 1; MATCH_PHRASE_QUERY = 2; @@ -18,6 +514,7 @@ enum QueryType { GEO_DISTANCE_QUERY = 13; GEO_POLYGON_QUERY = 14; TERMS_QUERY = 15; + EXISTS_QUERY = 16; } enum QueryOperator { @@ -30,11 +527,13 @@ message MatchQuery { optional string text = 2; optional int32 minimum_should_match = 3; optional QueryOperator operator = 4; + optional float weight = 5; } message MatchPhraseQuery { optional string field_name = 1; optional string text = 2; + optional float weight = 3; } message MatchAllQuery { @@ -43,16 +542,18 @@ message MatchAllQuery { message TermQuery { optional string field_name = 1; optional bytes term = 2; + optional float weight = 3; } message TermsQuery { optional string field_name = 1; repeated bytes terms = 2; + optional float weight = 3; } message RangeQuery { optional string field_name = 1; - optional bytes range_from = 2; // variant value + optional bytes range_from = 2; // variant value optional bytes range_to = 3; // variant value optional bool include_lower = 4; optional bool include_upper = 5; @@ -61,11 +562,13 @@ message RangeQuery { message PrefixQuery { optional string field_name = 1; optional string prefix = 2; + optional float weight = 3; } message WildcardQuery { optional string field_name = 1; optional string value = 2; + optional float weight = 3; } message BoolQuery { @@ -101,6 +604,7 @@ message NestedQuery { optional string path = 1; optional Query query = 2; optional ScoreMode score_mode = 3; + optional float weight = 4; } message GeoBoundingBoxQuery { @@ -120,6 +624,10 @@ message GeoPolygonQuery { repeated string points = 2; } +message ExistsQuery { + optional string field_name = 1; +} + message Query { optional QueryType type = 1; optional bytes query = 2; @@ -158,6 +666,7 @@ message FieldSort { optional SortOrder order = 2; optional SortMode mode = 3; optional NestedFilter nested_filter = 4; + optional bytes missing = 5; //encoded as SQLVariant } enum GeoDistanceType { @@ -193,12 +702,16 @@ message SearchQuery { optional Sort sort = 6; optional bool getTotalCount = 8; optional bytes token = 9; + optional Aggregations aggs = 10; + optional GroupBys group_bys = 11; + } enum ColumnReturnType { RETURN_ALL = 1; RETURN_SPECIFIED = 2; RETURN_NONE = 3; + RETURN_ALL_FROM_INDEX = 4; } message ColumnsToGet { @@ -212,16 +725,16 @@ message SearchRequest { optional ColumnsToGet columns_to_get = 3; optional bytes search_query = 4; repeated bytes routing_values = 5; + optional int32 timeout_ms = 6; } -/** - * Response֣ - **/ message SearchResponse { optional int64 total_hits = 1; repeated bytes rows = 2; optional bool is_all_succeeded = 3; optional bytes next_token = 6; + optional bytes aggs = 7; + optional bytes group_bys = 8; } /* Create Search Index */ @@ -243,16 +756,33 @@ enum FieldType { GEO_POINT = 7; } +message SingleWordAnalyzerParameter { + optional bool case_sensitive = 1; + optional bool delimit_word = 2; +} + +message SplitAnalyzerParameter { + optional string delimiter = 1; +} + +message FuzzyAnalyzerParameter { + optional int32 min_chars = 1; + optional int32 max_chars = 2; +} + message FieldSchema { optional string field_name = 1; optional FieldType field_type = 2; optional IndexOptions index_options = 3; optional string analyzer = 4; optional bool index = 5; - optional bool doc_values = 6; + optional bool sort_and_agg = 6; optional bool store = 7; repeated FieldSchema field_schemas = 8; // only for nested type optional bool is_array = 9; + optional bytes analyzer_parameter = 10; + optional bool is_virtual_field = 11; + repeated string source_field_names = 12; } message IndexSchema { @@ -271,11 +801,30 @@ message CreateSearchIndexRequest { required string table_name = 1; required string index_name = 2; optional IndexSchema schema = 3; + optional string source_index_name = 4; + optional int32 time_to_live = 5; // unit is seconds } message CreateSearchIndexResponse { } +/* Update Search Index */ +message QueryFlowWeight { + optional string index_name = 1; + optional int32 weight = 2; +} + +message UpdateSearchIndexRequest { + optional string table_name = 1; + optional string index_name = 2; + optional string switch_index_name = 3; + repeated QueryFlowWeight query_flow_weight = 4; + optional int32 time_to_live = 5; // unit is seconds +} + +message UpdateSearchIndexResponse { +} + /* List Search Index */ message IndexInfo { @@ -310,12 +859,12 @@ enum SyncPhase { message SyncStat { optional SyncPhase sync_phase = 1; - optional int64 current_sync_timestamp = 2; // ͬȣοTunnelService + optional int64 current_sync_timestamp = 2; } message MeteringInfo { optional int64 storage_size = 1; - optional int64 doc_count = 2; + optional int64 row_count = 2; optional int64 reserved_read_cu = 3; optional int64 timestamp = 4; } @@ -329,5 +878,35 @@ message DescribeSearchIndexResponse { optional IndexSchema schema = 1; optional SyncStat sync_stat = 2; optional MeteringInfo metering_info = 3; + + optional string brother_index_name = 4; + repeated QueryFlowWeight query_flow_weight = 5; + optional int64 create_time = 6; + optional int32 time_to_live = 7; // unit is seconds +} + + +/* ParallelScan API, same to Search API */ +message ScanQuery { + optional Query query = 1; + optional int32 limit = 2; + optional int32 alive_time = 3; //unit is second + optional bytes token = 4; + optional int32 current_parallel_id = 5; + optional int32 max_parallel = 6; +} + +message ParallelScanRequest { + optional string table_name = 1; + optional string index_name = 2; + optional ColumnsToGet columns_to_get = 3; + optional bytes session_id = 4; + optional ScanQuery scan_query = 5; + optional int32 timeout_ms = 6; +} + +message ParallelScanResponse { + repeated bytes rows = 1; + optional bytes next_token = 2; } diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/sql/flatbuffers/BytesValue.java b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/sql/flatbuffers/BytesValue.java new file mode 100644 index 0000000..e4d36f4 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/sql/flatbuffers/BytesValue.java @@ -0,0 +1,38 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package com.alicloud.openservices.tablestore.core.protocol.sql.flatbuffers; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class BytesValue extends Table { + public static BytesValue getRootAsBytesValue(ByteBuffer _bb) { return getRootAsBytesValue(_bb, new BytesValue()); } + public static BytesValue getRootAsBytesValue(ByteBuffer _bb, BytesValue obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; vtable_start = bb_pos - bb.getInt(bb_pos); vtable_size = bb.getShort(vtable_start); } + public BytesValue __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public byte value(int j) { int o = __offset(4); return o != 0 ? bb.get(__vector(o) + j * 1) : 0; } + public int valueLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } + public ByteBuffer valueAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } + public ByteBuffer valueInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } + + public static int createBytesValue(FlatBufferBuilder builder, + int valueOffset) { + builder.startObject(1); + BytesValue.addValue(builder, valueOffset); + return BytesValue.endBytesValue(builder); + } + + public static void startBytesValue(FlatBufferBuilder builder) { builder.startObject(1); } + public static void addValue(FlatBufferBuilder builder, int valueOffset) { builder.addOffset(0, valueOffset, 0); } + public static int createValueVector(FlatBufferBuilder builder, byte[] data) { builder.startVector(1, data.length, 1); for (int i = data.length - 1; i >= 0; i--) builder.addByte(data[i]); return builder.endVector(); } + public static void startValueVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); } + public static int endBytesValue(FlatBufferBuilder builder) { + int o = builder.endObject(); + return o; + } +} + diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/sql/flatbuffers/ColumnValues.java b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/sql/flatbuffers/ColumnValues.java new file mode 100644 index 0000000..b743a24 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/sql/flatbuffers/ColumnValues.java @@ -0,0 +1,85 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package com.alicloud.openservices.tablestore.core.protocol.sql.flatbuffers; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class ColumnValues extends Table { + public static ColumnValues getRootAsColumnValues(ByteBuffer _bb) { return getRootAsColumnValues(_bb, new ColumnValues()); } + public static ColumnValues getRootAsColumnValues(ByteBuffer _bb, ColumnValues obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; vtable_start = bb_pos - bb.getInt(bb_pos); vtable_size = bb.getShort(vtable_start); } + public ColumnValues __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public boolean isNullvalues(int j) { int o = __offset(4); return o != 0 ? 0!=bb.get(__vector(o) + j * 1) : false; } + public int isNullvaluesLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } + public ByteBuffer isNullvaluesAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } + public ByteBuffer isNullvaluesInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } + public long longValues(int j) { int o = __offset(6); return o != 0 ? bb.getLong(__vector(o) + j * 8) : 0; } + public int longValuesLength() { int o = __offset(6); return o != 0 ? __vector_len(o) : 0; } + public ByteBuffer longValuesAsByteBuffer() { return __vector_as_bytebuffer(6, 8); } + public ByteBuffer longValuesInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 8); } + public boolean boolValues(int j) { int o = __offset(8); return o != 0 ? 0!=bb.get(__vector(o) + j * 1) : false; } + public int boolValuesLength() { int o = __offset(8); return o != 0 ? __vector_len(o) : 0; } + public ByteBuffer boolValuesAsByteBuffer() { return __vector_as_bytebuffer(8, 1); } + public ByteBuffer boolValuesInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 8, 1); } + public double doubleValues(int j) { int o = __offset(10); return o != 0 ? bb.getDouble(__vector(o) + j * 8) : 0; } + public int doubleValuesLength() { int o = __offset(10); return o != 0 ? __vector_len(o) : 0; } + public ByteBuffer doubleValuesAsByteBuffer() { return __vector_as_bytebuffer(10, 8); } + public ByteBuffer doubleValuesInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 10, 8); } + public String stringValues(int j) { int o = __offset(12); return o != 0 ? __string(__vector(o) + j * 4) : null; } + public int stringValuesLength() { int o = __offset(12); return o != 0 ? __vector_len(o) : 0; } + public BytesValue binaryValues(int j) { return binaryValues(new BytesValue(), j); } + public BytesValue binaryValues(BytesValue obj, int j) { int o = __offset(14); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } + public int binaryValuesLength() { int o = __offset(14); return o != 0 ? __vector_len(o) : 0; } + public RLEStringValues rleStringValues() { return rleStringValues(new RLEStringValues()); } + public RLEStringValues rleStringValues(RLEStringValues obj) { int o = __offset(16); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + + public static int createColumnValues(FlatBufferBuilder builder, + int is_nullvaluesOffset, + int long_valuesOffset, + int bool_valuesOffset, + int double_valuesOffset, + int string_valuesOffset, + int binary_valuesOffset, + int rle_string_valuesOffset) { + builder.startObject(7); + ColumnValues.addRleStringValues(builder, rle_string_valuesOffset); + ColumnValues.addBinaryValues(builder, binary_valuesOffset); + ColumnValues.addStringValues(builder, string_valuesOffset); + ColumnValues.addDoubleValues(builder, double_valuesOffset); + ColumnValues.addBoolValues(builder, bool_valuesOffset); + ColumnValues.addLongValues(builder, long_valuesOffset); + ColumnValues.addIsNullvalues(builder, is_nullvaluesOffset); + return ColumnValues.endColumnValues(builder); + } + + public static void startColumnValues(FlatBufferBuilder builder) { builder.startObject(7); } + public static void addIsNullvalues(FlatBufferBuilder builder, int isNullvaluesOffset) { builder.addOffset(0, isNullvaluesOffset, 0); } + public static int createIsNullvaluesVector(FlatBufferBuilder builder, boolean[] data) { builder.startVector(1, data.length, 1); for (int i = data.length - 1; i >= 0; i--) builder.addBoolean(data[i]); return builder.endVector(); } + public static void startIsNullvaluesVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); } + public static void addLongValues(FlatBufferBuilder builder, int longValuesOffset) { builder.addOffset(1, longValuesOffset, 0); } + public static int createLongValuesVector(FlatBufferBuilder builder, long[] data) { builder.startVector(8, data.length, 8); for (int i = data.length - 1; i >= 0; i--) builder.addLong(data[i]); return builder.endVector(); } + public static void startLongValuesVector(FlatBufferBuilder builder, int numElems) { builder.startVector(8, numElems, 8); } + public static void addBoolValues(FlatBufferBuilder builder, int boolValuesOffset) { builder.addOffset(2, boolValuesOffset, 0); } + public static int createBoolValuesVector(FlatBufferBuilder builder, boolean[] data) { builder.startVector(1, data.length, 1); for (int i = data.length - 1; i >= 0; i--) builder.addBoolean(data[i]); return builder.endVector(); } + public static void startBoolValuesVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); } + public static void addDoubleValues(FlatBufferBuilder builder, int doubleValuesOffset) { builder.addOffset(3, doubleValuesOffset, 0); } + public static int createDoubleValuesVector(FlatBufferBuilder builder, double[] data) { builder.startVector(8, data.length, 8); for (int i = data.length - 1; i >= 0; i--) builder.addDouble(data[i]); return builder.endVector(); } + public static void startDoubleValuesVector(FlatBufferBuilder builder, int numElems) { builder.startVector(8, numElems, 8); } + public static void addStringValues(FlatBufferBuilder builder, int stringValuesOffset) { builder.addOffset(4, stringValuesOffset, 0); } + public static int createStringValuesVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startStringValuesVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static void addBinaryValues(FlatBufferBuilder builder, int binaryValuesOffset) { builder.addOffset(5, binaryValuesOffset, 0); } + public static int createBinaryValuesVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startBinaryValuesVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static void addRleStringValues(FlatBufferBuilder builder, int rleStringValuesOffset) { builder.addOffset(6, rleStringValuesOffset, 0); } + public static int endColumnValues(FlatBufferBuilder builder) { + int o = builder.endObject(); + return o; + } +} + diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/sql/flatbuffers/DataType.java b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/sql/flatbuffers/DataType.java new file mode 100644 index 0000000..4e1d8a3 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/sql/flatbuffers/DataType.java @@ -0,0 +1,19 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package com.alicloud.openservices.tablestore.core.protocol.sql.flatbuffers; + +public final class DataType { + private DataType() { } + public static final byte NONE = 0; + public static final byte LONG = 1; + public static final byte BOOLEAN = 2; + public static final byte DOUBLE = 3; + public static final byte STRING = 4; + public static final byte BINARY = 5; + public static final byte STRING_RLE = 6; + + public static final String[] names = { "NONE", "LONG", "BOOLEAN", "DOUBLE", "STRING", "BINARY", "STRING_RLE", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/sql/flatbuffers/RLEStringValues.java b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/sql/flatbuffers/RLEStringValues.java new file mode 100644 index 0000000..f171b3e --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/sql/flatbuffers/RLEStringValues.java @@ -0,0 +1,45 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package com.alicloud.openservices.tablestore.core.protocol.sql.flatbuffers; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class RLEStringValues extends Table { + public static RLEStringValues getRootAsRLEStringValues(ByteBuffer _bb) { return getRootAsRLEStringValues(_bb, new RLEStringValues()); } + public static RLEStringValues getRootAsRLEStringValues(ByteBuffer _bb, RLEStringValues obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; vtable_start = bb_pos - bb.getInt(bb_pos); vtable_size = bb.getShort(vtable_start); } + public RLEStringValues __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public String array(int j) { int o = __offset(4); return o != 0 ? __string(__vector(o) + j * 4) : null; } + public int arrayLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } + public int indexMapping(int j) { int o = __offset(6); return o != 0 ? bb.getInt(__vector(o) + j * 4) : 0; } + public int indexMappingLength() { int o = __offset(6); return o != 0 ? __vector_len(o) : 0; } + public ByteBuffer indexMappingAsByteBuffer() { return __vector_as_bytebuffer(6, 4); } + public ByteBuffer indexMappingInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 4); } + + public static int createRLEStringValues(FlatBufferBuilder builder, + int arrayOffset, + int index_mappingOffset) { + builder.startObject(2); + RLEStringValues.addIndexMapping(builder, index_mappingOffset); + RLEStringValues.addArray(builder, arrayOffset); + return RLEStringValues.endRLEStringValues(builder); + } + + public static void startRLEStringValues(FlatBufferBuilder builder) { builder.startObject(2); } + public static void addArray(FlatBufferBuilder builder, int arrayOffset) { builder.addOffset(0, arrayOffset, 0); } + public static int createArrayVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startArrayVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static void addIndexMapping(FlatBufferBuilder builder, int indexMappingOffset) { builder.addOffset(1, indexMappingOffset, 0); } + public static int createIndexMappingVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addInt(data[i]); return builder.endVector(); } + public static void startIndexMappingVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static int endRLEStringValues(FlatBufferBuilder builder) { + int o = builder.endObject(); + return o; + } +} + diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/sql/flatbuffers/SQLResponseColumn.java b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/sql/flatbuffers/SQLResponseColumn.java new file mode 100644 index 0000000..aba64ab --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/sql/flatbuffers/SQLResponseColumn.java @@ -0,0 +1,44 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package com.alicloud.openservices.tablestore.core.protocol.sql.flatbuffers; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class SQLResponseColumn extends Table { + public static SQLResponseColumn getRootAsSQLResponseColumn(ByteBuffer _bb) { return getRootAsSQLResponseColumn(_bb, new SQLResponseColumn()); } + public static SQLResponseColumn getRootAsSQLResponseColumn(ByteBuffer _bb, SQLResponseColumn obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; vtable_start = bb_pos - bb.getInt(bb_pos); vtable_size = bb.getShort(vtable_start); } + public SQLResponseColumn __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public String columnName() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer columnNameAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } + public ByteBuffer columnNameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } + public byte columnType() { int o = __offset(6); return o != 0 ? bb.get(o + bb_pos) : 0; } + public ColumnValues columnValue() { return columnValue(new ColumnValues()); } + public ColumnValues columnValue(ColumnValues obj) { int o = __offset(8); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + + public static int createSQLResponseColumn(FlatBufferBuilder builder, + int column_nameOffset, + byte column_type, + int column_valueOffset) { + builder.startObject(3); + SQLResponseColumn.addColumnValue(builder, column_valueOffset); + SQLResponseColumn.addColumnName(builder, column_nameOffset); + SQLResponseColumn.addColumnType(builder, column_type); + return SQLResponseColumn.endSQLResponseColumn(builder); + } + + public static void startSQLResponseColumn(FlatBufferBuilder builder) { builder.startObject(3); } + public static void addColumnName(FlatBufferBuilder builder, int columnNameOffset) { builder.addOffset(0, columnNameOffset, 0); } + public static void addColumnType(FlatBufferBuilder builder, byte columnType) { builder.addByte(1, columnType, 0); } + public static void addColumnValue(FlatBufferBuilder builder, int columnValueOffset) { builder.addOffset(2, columnValueOffset, 0); } + public static int endSQLResponseColumn(FlatBufferBuilder builder) { + int o = builder.endObject(); + return o; + } +} + diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/sql/flatbuffers/SQLResponseColumns.java b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/sql/flatbuffers/SQLResponseColumns.java new file mode 100644 index 0000000..ad2051b --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/sql/flatbuffers/SQLResponseColumns.java @@ -0,0 +1,43 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package com.alicloud.openservices.tablestore.core.protocol.sql.flatbuffers; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class SQLResponseColumns extends Table { + public static SQLResponseColumns getRootAsSQLResponseColumns(ByteBuffer _bb) { return getRootAsSQLResponseColumns(_bb, new SQLResponseColumns()); } + public static SQLResponseColumns getRootAsSQLResponseColumns(ByteBuffer _bb, SQLResponseColumns obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; vtable_start = bb_pos - bb.getInt(bb_pos); vtable_size = bb.getShort(vtable_start); } + public SQLResponseColumns __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public SQLResponseColumn columns(int j) { return columns(new SQLResponseColumn(), j); } + public SQLResponseColumn columns(SQLResponseColumn obj, int j) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } + public int columnsLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } + public long rowCount() { int o = __offset(6); return o != 0 ? bb.getLong(o + bb_pos) : 0L; } + + public static int createSQLResponseColumns(FlatBufferBuilder builder, + int columnsOffset, + long row_count) { + builder.startObject(2); + SQLResponseColumns.addRowCount(builder, row_count); + SQLResponseColumns.addColumns(builder, columnsOffset); + return SQLResponseColumns.endSQLResponseColumns(builder); + } + + public static void startSQLResponseColumns(FlatBufferBuilder builder) { builder.startObject(2); } + public static void addColumns(FlatBufferBuilder builder, int columnsOffset) { builder.addOffset(0, columnsOffset, 0); } + public static int createColumnsVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startColumnsVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static void addRowCount(FlatBufferBuilder builder, long rowCount) { builder.addLong(1, rowCount, 0L); } + public static int endSQLResponseColumns(FlatBufferBuilder builder) { + int o = builder.endObject(); + return o; + } + public static void finishSQLResponseColumnsBuffer(FlatBufferBuilder builder, int offset) { builder.finish(offset); } + public static void finishSizePrefixedSQLResponseColumnsBuffer(FlatBufferBuilder builder, int offset) { builder.finishSizePrefixed(offset); } +} + diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/sql/sql.fbs b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/sql/sql.fbs new file mode 100644 index 0000000..3371630 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/sql/sql.fbs @@ -0,0 +1,38 @@ +namespace com.alicloud.openservices.tablestore.core.protocol.sql.flatbuffers; + +enum DataType:byte {NONE = 0, LONG = 1, BOOLEAN = 2, DOUBLE = 3, STRING = 4, BINARY = 5, STRING_RLE = 6} + +table BytesValue { +value: [byte]; +} + +// rle(run-length encoding) format, [a, a, a, b, c, d, a, a] would encode as +// array: [a, b, c, d, a] +// index_mapping: [0, 0, 0, 1, 2, 3, 4, 4] +table RLEStringValues { +array: [string]; +index_mapping: [int32]; +} + +table ColumnValues { +is_nullvalues: [bool]; +long_values: [long]; +bool_values: [bool]; +double_values: [double]; +string_values: [string]; +binary_values: [BytesValue]; +rle_string_values: RLEStringValues; +} + +table SQLResponseColumn { +column_name: string; +column_type: DataType; +column_value: ColumnValues; +} + +table SQLResponseColumns{ +columns: [SQLResponseColumn]; +row_count: int64; +} + +root_type SQLResponseColumns; \ No newline at end of file diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/timeseries/Timeseries.java b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/timeseries/Timeseries.java new file mode 100644 index 0000000..245e29f --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/timeseries/Timeseries.java @@ -0,0 +1,19165 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: com/alicloud/openservices/tablestore/core/protocol/timeseries/timeseries.proto + +package com.alicloud.openservices.tablestore.core.protocol.timeseries; + +public final class Timeseries { + private Timeseries() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + public enum MetaQueryConditionType + implements com.google.protobuf.ProtocolMessageEnum { + COMPOSITE_CONDITION(0, 1), + MEASUREMENT_CONDITION(1, 2), + SOURCE_CONDITION(2, 3), + TAG_CONDITION(3, 4), + UPDATE_TIME_CONDITION(4, 5), + ATTRIBUTE_CONDITION(5, 6), + ; + + public static final int COMPOSITE_CONDITION_VALUE = 1; + public static final int MEASUREMENT_CONDITION_VALUE = 2; + public static final int SOURCE_CONDITION_VALUE = 3; + public static final int TAG_CONDITION_VALUE = 4; + public static final int UPDATE_TIME_CONDITION_VALUE = 5; + public static final int ATTRIBUTE_CONDITION_VALUE = 6; + + + public final int getNumber() { return value; } + + public static MetaQueryConditionType valueOf(int value) { + switch (value) { + case 1: return COMPOSITE_CONDITION; + case 2: return MEASUREMENT_CONDITION; + case 3: return SOURCE_CONDITION; + case 4: return TAG_CONDITION; + case 5: return UPDATE_TIME_CONDITION; + case 6: return ATTRIBUTE_CONDITION; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public MetaQueryConditionType findValueByNumber(int number) { + return MetaQueryConditionType.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.getDescriptor().getEnumTypes().get(0); + } + + private static final MetaQueryConditionType[] VALUES = { + COMPOSITE_CONDITION, MEASUREMENT_CONDITION, SOURCE_CONDITION, TAG_CONDITION, UPDATE_TIME_CONDITION, ATTRIBUTE_CONDITION, + }; + + public static MetaQueryConditionType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private MetaQueryConditionType(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaQueryConditionType) + } + + public enum MetaQueryCompositeOperator + implements com.google.protobuf.ProtocolMessageEnum { + OP_AND(0, 1), + OP_OR(1, 2), + OP_NOT(2, 3), + ; + + public static final int OP_AND_VALUE = 1; + public static final int OP_OR_VALUE = 2; + public static final int OP_NOT_VALUE = 3; + + + public final int getNumber() { return value; } + + public static MetaQueryCompositeOperator valueOf(int value) { + switch (value) { + case 1: return OP_AND; + case 2: return OP_OR; + case 3: return OP_NOT; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public MetaQueryCompositeOperator findValueByNumber(int number) { + return MetaQueryCompositeOperator.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.getDescriptor().getEnumTypes().get(1); + } + + private static final MetaQueryCompositeOperator[] VALUES = { + OP_AND, OP_OR, OP_NOT, + }; + + public static MetaQueryCompositeOperator valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private MetaQueryCompositeOperator(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaQueryCompositeOperator) + } + + public enum MetaQuerySingleOperator + implements com.google.protobuf.ProtocolMessageEnum { + OP_EQUAL(0, 1), + OP_GREATER_THAN(1, 2), + OP_GREATER_EQUAL(2, 3), + OP_LESS_THAN(3, 4), + OP_LESS_EQUAL(4, 5), + OP_PREFIX(5, 6), + ; + + public static final int OP_EQUAL_VALUE = 1; + public static final int OP_GREATER_THAN_VALUE = 2; + public static final int OP_GREATER_EQUAL_VALUE = 3; + public static final int OP_LESS_THAN_VALUE = 4; + public static final int OP_LESS_EQUAL_VALUE = 5; + public static final int OP_PREFIX_VALUE = 6; + + + public final int getNumber() { return value; } + + public static MetaQuerySingleOperator valueOf(int value) { + switch (value) { + case 1: return OP_EQUAL; + case 2: return OP_GREATER_THAN; + case 3: return OP_GREATER_EQUAL; + case 4: return OP_LESS_THAN; + case 5: return OP_LESS_EQUAL; + case 6: return OP_PREFIX; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public MetaQuerySingleOperator findValueByNumber(int number) { + return MetaQuerySingleOperator.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.getDescriptor().getEnumTypes().get(2); + } + + private static final MetaQuerySingleOperator[] VALUES = { + OP_EQUAL, OP_GREATER_THAN, OP_GREATER_EQUAL, OP_LESS_THAN, OP_LESS_EQUAL, OP_PREFIX, + }; + + public static MetaQuerySingleOperator valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private MetaQuerySingleOperator(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaQuerySingleOperator) + } + + public enum RowsSerializeType + implements com.google.protobuf.ProtocolMessageEnum { + RST_FLAT_BUFFER(0, 0), + ; + + public static final int RST_FLAT_BUFFER_VALUE = 0; + + + public final int getNumber() { return value; } + + public static RowsSerializeType valueOf(int value) { + switch (value) { + case 0: return RST_FLAT_BUFFER; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public RowsSerializeType findValueByNumber(int number) { + return RowsSerializeType.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.getDescriptor().getEnumTypes().get(3); + } + + private static final RowsSerializeType[] VALUES = { + RST_FLAT_BUFFER, + }; + + public static RowsSerializeType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private RowsSerializeType(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.RowsSerializeType) + } + + public enum MetaUpdateMode + implements com.google.protobuf.ProtocolMessageEnum { + MUM_NORMAL(0, 0), + MUM_IGNORE(1, 1), + ; + + public static final int MUM_NORMAL_VALUE = 0; + public static final int MUM_IGNORE_VALUE = 1; + + + public final int getNumber() { return value; } + + public static MetaUpdateMode valueOf(int value) { + switch (value) { + case 0: return MUM_NORMAL; + case 1: return MUM_IGNORE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public MetaUpdateMode findValueByNumber(int number) { + return MetaUpdateMode.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.getDescriptor().getEnumTypes().get(4); + } + + private static final MetaUpdateMode[] VALUES = { + MUM_NORMAL, MUM_IGNORE, + }; + + public static MetaUpdateMode valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private MetaUpdateMode(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaUpdateMode) + } + + public interface TimeseriesTableOptionsOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional int32 time_to_live = 1; + boolean hasTimeToLive(); + int getTimeToLive(); + } + public static final class TimeseriesTableOptions extends + com.google.protobuf.GeneratedMessage + implements TimeseriesTableOptionsOrBuilder { + // Use TimeseriesTableOptions.newBuilder() to construct. + private TimeseriesTableOptions(Builder builder) { + super(builder); + } + private TimeseriesTableOptions(boolean noInit) {} + + private static final TimeseriesTableOptions defaultInstance; + public static TimeseriesTableOptions getDefaultInstance() { + return defaultInstance; + } + + public TimeseriesTableOptions getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesTableOptions_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesTableOptions_fieldAccessorTable; + } + + private int bitField0_; + // optional int32 time_to_live = 1; + public static final int TIME_TO_LIVE_FIELD_NUMBER = 1; + private int timeToLive_; + public boolean hasTimeToLive() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public int getTimeToLive() { + return timeToLive_; + } + + private void initFields() { + timeToLive_ = 0; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeInt32(1, timeToLive_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, timeToLive_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesTableOptions_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesTableOptions_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + timeToLive_ = 0; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions build() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions result = new com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.timeToLive_ = timeToLive_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions.getDefaultInstance()) return this; + if (other.hasTimeToLive()) { + setTimeToLive(other.getTimeToLive()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + timeToLive_ = input.readInt32(); + break; + } + } + } + } + + private int bitField0_; + + // optional int32 time_to_live = 1; + private int timeToLive_ ; + public boolean hasTimeToLive() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public int getTimeToLive() { + return timeToLive_; + } + public Builder setTimeToLive(int value) { + bitField0_ |= 0x00000001; + timeToLive_ = value; + onChanged(); + return this; + } + public Builder clearTimeToLive() { + bitField0_ = (bitField0_ & ~0x00000001); + timeToLive_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesTableOptions) + } + + static { + defaultInstance = new TimeseriesTableOptions(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesTableOptions) + } + + public interface TimeseriesTableMetaOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string table_name = 1; + boolean hasTableName(); + String getTableName(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesTableOptions table_options = 2; + boolean hasTableOptions(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions getTableOptions(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptionsOrBuilder getTableOptionsOrBuilder(); + + // optional string status = 3; + boolean hasStatus(); + String getStatus(); + } + public static final class TimeseriesTableMeta extends + com.google.protobuf.GeneratedMessage + implements TimeseriesTableMetaOrBuilder { + // Use TimeseriesTableMeta.newBuilder() to construct. + private TimeseriesTableMeta(Builder builder) { + super(builder); + } + private TimeseriesTableMeta(boolean noInit) {} + + private static final TimeseriesTableMeta defaultInstance; + public static TimeseriesTableMeta getDefaultInstance() { + return defaultInstance; + } + + public TimeseriesTableMeta getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesTableMeta_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesTableMeta_fieldAccessorTable; + } + + private int bitField0_; + // required string table_name = 1; + public static final int TABLE_NAME_FIELD_NUMBER = 1; + private java.lang.Object tableName_; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + tableName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesTableOptions table_options = 2; + public static final int TABLE_OPTIONS_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions tableOptions_; + public boolean hasTableOptions() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions getTableOptions() { + return tableOptions_; + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptionsOrBuilder getTableOptionsOrBuilder() { + return tableOptions_; + } + + // optional string status = 3; + public static final int STATUS_FIELD_NUMBER = 3; + private java.lang.Object status_; + public boolean hasStatus() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public String getStatus() { + java.lang.Object ref = status_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + status_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getStatusBytes() { + java.lang.Object ref = status_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + status_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + tableName_ = ""; + tableOptions_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions.getDefaultInstance(); + status_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasTableName()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeMessage(2, tableOptions_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeBytes(3, getStatusBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, tableOptions_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, getStatusBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMetaOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesTableMeta_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesTableMeta_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getTableOptionsFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + tableName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + if (tableOptionsBuilder_ == null) { + tableOptions_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions.getDefaultInstance(); + } else { + tableOptionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + status_ = ""; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta build() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta result = new com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.tableName_ = tableName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + if (tableOptionsBuilder_ == null) { + result.tableOptions_ = tableOptions_; + } else { + result.tableOptions_ = tableOptionsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.status_ = status_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta.getDefaultInstance()) return this; + if (other.hasTableName()) { + setTableName(other.getTableName()); + } + if (other.hasTableOptions()) { + mergeTableOptions(other.getTableOptions()); + } + if (other.hasStatus()) { + setStatus(other.getStatus()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasTableName()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + tableName_ = input.readBytes(); + break; + } + case 18: { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions.newBuilder(); + if (hasTableOptions()) { + subBuilder.mergeFrom(getTableOptions()); + } + input.readMessage(subBuilder, extensionRegistry); + setTableOptions(subBuilder.buildPartial()); + break; + } + case 26: { + bitField0_ |= 0x00000004; + status_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // required string table_name = 1; + private java.lang.Object tableName_ = ""; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + tableName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setTableName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + return this; + } + public Builder clearTableName() { + bitField0_ = (bitField0_ & ~0x00000001); + tableName_ = getDefaultInstance().getTableName(); + onChanged(); + return this; + } + void setTableName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesTableOptions table_options = 2; + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions tableOptions_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptionsOrBuilder> tableOptionsBuilder_; + public boolean hasTableOptions() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions getTableOptions() { + if (tableOptionsBuilder_ == null) { + return tableOptions_; + } else { + return tableOptionsBuilder_.getMessage(); + } + } + public Builder setTableOptions(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions value) { + if (tableOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tableOptions_ = value; + onChanged(); + } else { + tableOptionsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder setTableOptions( + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions.Builder builderForValue) { + if (tableOptionsBuilder_ == null) { + tableOptions_ = builderForValue.build(); + onChanged(); + } else { + tableOptionsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder mergeTableOptions(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions value) { + if (tableOptionsBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002) && + tableOptions_ != com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions.getDefaultInstance()) { + tableOptions_ = + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions.newBuilder(tableOptions_).mergeFrom(value).buildPartial(); + } else { + tableOptions_ = value; + } + onChanged(); + } else { + tableOptionsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder clearTableOptions() { + if (tableOptionsBuilder_ == null) { + tableOptions_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions.getDefaultInstance(); + onChanged(); + } else { + tableOptionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions.Builder getTableOptionsBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getTableOptionsFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptionsOrBuilder getTableOptionsOrBuilder() { + if (tableOptionsBuilder_ != null) { + return tableOptionsBuilder_.getMessageOrBuilder(); + } else { + return tableOptions_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptionsOrBuilder> + getTableOptionsFieldBuilder() { + if (tableOptionsBuilder_ == null) { + tableOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptionsOrBuilder>( + tableOptions_, + getParentForChildren(), + isClean()); + tableOptions_ = null; + } + return tableOptionsBuilder_; + } + + // optional string status = 3; + private java.lang.Object status_ = ""; + public boolean hasStatus() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public String getStatus() { + java.lang.Object ref = status_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + status_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setStatus(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + status_ = value; + onChanged(); + return this; + } + public Builder clearStatus() { + bitField0_ = (bitField0_ & ~0x00000004); + status_ = getDefaultInstance().getStatus(); + onChanged(); + return this; + } + void setStatus(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000004; + status_ = value; + onChanged(); + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesTableMeta) + } + + static { + defaultInstance = new TimeseriesTableMeta(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesTableMeta) + } + + public interface CreateTimeseriesTableRequestOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required .com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesTableMeta table_meta = 1; + boolean hasTableMeta(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta getTableMeta(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMetaOrBuilder getTableMetaOrBuilder(); + } + public static final class CreateTimeseriesTableRequest extends + com.google.protobuf.GeneratedMessage + implements CreateTimeseriesTableRequestOrBuilder { + // Use CreateTimeseriesTableRequest.newBuilder() to construct. + private CreateTimeseriesTableRequest(Builder builder) { + super(builder); + } + private CreateTimeseriesTableRequest(boolean noInit) {} + + private static final CreateTimeseriesTableRequest defaultInstance; + public static CreateTimeseriesTableRequest getDefaultInstance() { + return defaultInstance; + } + + public CreateTimeseriesTableRequest getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_CreateTimeseriesTableRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_CreateTimeseriesTableRequest_fieldAccessorTable; + } + + private int bitField0_; + // required .com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesTableMeta table_meta = 1; + public static final int TABLE_META_FIELD_NUMBER = 1; + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta tableMeta_; + public boolean hasTableMeta() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta getTableMeta() { + return tableMeta_; + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMetaOrBuilder getTableMetaOrBuilder() { + return tableMeta_; + } + + private void initFields() { + tableMeta_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasTableMeta()) { + memoizedIsInitialized = 0; + return false; + } + if (!getTableMeta().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(1, tableMeta_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, tableMeta_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableRequest prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_CreateTimeseriesTableRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_CreateTimeseriesTableRequest_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getTableMetaFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (tableMetaBuilder_ == null) { + tableMeta_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta.getDefaultInstance(); + } else { + tableMetaBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableRequest.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableRequest.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableRequest build() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableRequest buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableRequest result = new com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + if (tableMetaBuilder_ == null) { + result.tableMeta_ = tableMeta_; + } else { + result.tableMeta_ = tableMetaBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableRequest.getDefaultInstance()) return this; + if (other.hasTableMeta()) { + mergeTableMeta(other.getTableMeta()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasTableMeta()) { + + return false; + } + if (!getTableMeta().isInitialized()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta.newBuilder(); + if (hasTableMeta()) { + subBuilder.mergeFrom(getTableMeta()); + } + input.readMessage(subBuilder, extensionRegistry); + setTableMeta(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // required .com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesTableMeta table_meta = 1; + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta tableMeta_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMetaOrBuilder> tableMetaBuilder_; + public boolean hasTableMeta() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta getTableMeta() { + if (tableMetaBuilder_ == null) { + return tableMeta_; + } else { + return tableMetaBuilder_.getMessage(); + } + } + public Builder setTableMeta(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta value) { + if (tableMetaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tableMeta_ = value; + onChanged(); + } else { + tableMetaBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder setTableMeta( + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta.Builder builderForValue) { + if (tableMetaBuilder_ == null) { + tableMeta_ = builderForValue.build(); + onChanged(); + } else { + tableMetaBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder mergeTableMeta(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta value) { + if (tableMetaBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001) && + tableMeta_ != com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta.getDefaultInstance()) { + tableMeta_ = + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta.newBuilder(tableMeta_).mergeFrom(value).buildPartial(); + } else { + tableMeta_ = value; + } + onChanged(); + } else { + tableMetaBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder clearTableMeta() { + if (tableMetaBuilder_ == null) { + tableMeta_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta.getDefaultInstance(); + onChanged(); + } else { + tableMetaBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta.Builder getTableMetaBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getTableMetaFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMetaOrBuilder getTableMetaOrBuilder() { + if (tableMetaBuilder_ != null) { + return tableMetaBuilder_.getMessageOrBuilder(); + } else { + return tableMeta_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMetaOrBuilder> + getTableMetaFieldBuilder() { + if (tableMetaBuilder_ == null) { + tableMetaBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMetaOrBuilder>( + tableMeta_, + getParentForChildren(), + isClean()); + tableMeta_ = null; + } + return tableMetaBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.CreateTimeseriesTableRequest) + } + + static { + defaultInstance = new CreateTimeseriesTableRequest(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.CreateTimeseriesTableRequest) + } + + public interface CreateTimeseriesTableResponseOrBuilder + extends com.google.protobuf.MessageOrBuilder { + } + public static final class CreateTimeseriesTableResponse extends + com.google.protobuf.GeneratedMessage + implements CreateTimeseriesTableResponseOrBuilder { + // Use CreateTimeseriesTableResponse.newBuilder() to construct. + private CreateTimeseriesTableResponse(Builder builder) { + super(builder); + } + private CreateTimeseriesTableResponse(boolean noInit) {} + + private static final CreateTimeseriesTableResponse defaultInstance; + public static CreateTimeseriesTableResponse getDefaultInstance() { + return defaultInstance; + } + + public CreateTimeseriesTableResponse getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_CreateTimeseriesTableResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_CreateTimeseriesTableResponse_fieldAccessorTable; + } + + private void initFields() { + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableResponse prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_CreateTimeseriesTableResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_CreateTimeseriesTableResponse_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableResponse.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableResponse.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableResponse build() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableResponse buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableResponse result = new com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableResponse(this); + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + } + } + } + + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.CreateTimeseriesTableResponse) + } + + static { + defaultInstance = new CreateTimeseriesTableResponse(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.CreateTimeseriesTableResponse) + } + + public interface ListTimeseriesTableRequestOrBuilder + extends com.google.protobuf.MessageOrBuilder { + } + public static final class ListTimeseriesTableRequest extends + com.google.protobuf.GeneratedMessage + implements ListTimeseriesTableRequestOrBuilder { + // Use ListTimeseriesTableRequest.newBuilder() to construct. + private ListTimeseriesTableRequest(Builder builder) { + super(builder); + } + private ListTimeseriesTableRequest(boolean noInit) {} + + private static final ListTimeseriesTableRequest defaultInstance; + public static ListTimeseriesTableRequest getDefaultInstance() { + return defaultInstance; + } + + public ListTimeseriesTableRequest getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_ListTimeseriesTableRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_ListTimeseriesTableRequest_fieldAccessorTable; + } + + private void initFields() { + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableRequest prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_ListTimeseriesTableRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_ListTimeseriesTableRequest_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableRequest.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableRequest.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableRequest build() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableRequest buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableRequest result = new com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableRequest(this); + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableRequest.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + } + } + } + + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.ListTimeseriesTableRequest) + } + + static { + defaultInstance = new ListTimeseriesTableRequest(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.ListTimeseriesTableRequest) + } + + public interface ListTimeseriesTableResponseOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // repeated .com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesTableMeta table_metas = 1; + java.util.List + getTableMetasList(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta getTableMetas(int index); + int getTableMetasCount(); + java.util.List + getTableMetasOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMetaOrBuilder getTableMetasOrBuilder( + int index); + } + public static final class ListTimeseriesTableResponse extends + com.google.protobuf.GeneratedMessage + implements ListTimeseriesTableResponseOrBuilder { + // Use ListTimeseriesTableResponse.newBuilder() to construct. + private ListTimeseriesTableResponse(Builder builder) { + super(builder); + } + private ListTimeseriesTableResponse(boolean noInit) {} + + private static final ListTimeseriesTableResponse defaultInstance; + public static ListTimeseriesTableResponse getDefaultInstance() { + return defaultInstance; + } + + public ListTimeseriesTableResponse getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_ListTimeseriesTableResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_ListTimeseriesTableResponse_fieldAccessorTable; + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesTableMeta table_metas = 1; + public static final int TABLE_METAS_FIELD_NUMBER = 1; + private java.util.List tableMetas_; + public java.util.List getTableMetasList() { + return tableMetas_; + } + public java.util.List + getTableMetasOrBuilderList() { + return tableMetas_; + } + public int getTableMetasCount() { + return tableMetas_.size(); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta getTableMetas(int index) { + return tableMetas_.get(index); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMetaOrBuilder getTableMetasOrBuilder( + int index) { + return tableMetas_.get(index); + } + + private void initFields() { + tableMetas_ = java.util.Collections.emptyList(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + for (int i = 0; i < getTableMetasCount(); i++) { + if (!getTableMetas(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < tableMetas_.size(); i++) { + output.writeMessage(1, tableMetas_.get(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < tableMetas_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, tableMetas_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableResponse prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_ListTimeseriesTableResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_ListTimeseriesTableResponse_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getTableMetasFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (tableMetasBuilder_ == null) { + tableMetas_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + tableMetasBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableResponse.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableResponse.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableResponse build() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableResponse buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableResponse result = new com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableResponse(this); + int from_bitField0_ = bitField0_; + if (tableMetasBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + tableMetas_ = java.util.Collections.unmodifiableList(tableMetas_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.tableMetas_ = tableMetas_; + } else { + result.tableMetas_ = tableMetasBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableResponse.getDefaultInstance()) return this; + if (tableMetasBuilder_ == null) { + if (!other.tableMetas_.isEmpty()) { + if (tableMetas_.isEmpty()) { + tableMetas_ = other.tableMetas_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTableMetasIsMutable(); + tableMetas_.addAll(other.tableMetas_); + } + onChanged(); + } + } else { + if (!other.tableMetas_.isEmpty()) { + if (tableMetasBuilder_.isEmpty()) { + tableMetasBuilder_.dispose(); + tableMetasBuilder_ = null; + tableMetas_ = other.tableMetas_; + bitField0_ = (bitField0_ & ~0x00000001); + tableMetasBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getTableMetasFieldBuilder() : null; + } else { + tableMetasBuilder_.addAllMessages(other.tableMetas_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + for (int i = 0; i < getTableMetasCount(); i++) { + if (!getTableMetas(i).isInitialized()) { + + return false; + } + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addTableMetas(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // repeated .com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesTableMeta table_metas = 1; + private java.util.List tableMetas_ = + java.util.Collections.emptyList(); + private void ensureTableMetasIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + tableMetas_ = new java.util.ArrayList(tableMetas_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMetaOrBuilder> tableMetasBuilder_; + + public java.util.List getTableMetasList() { + if (tableMetasBuilder_ == null) { + return java.util.Collections.unmodifiableList(tableMetas_); + } else { + return tableMetasBuilder_.getMessageList(); + } + } + public int getTableMetasCount() { + if (tableMetasBuilder_ == null) { + return tableMetas_.size(); + } else { + return tableMetasBuilder_.getCount(); + } + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta getTableMetas(int index) { + if (tableMetasBuilder_ == null) { + return tableMetas_.get(index); + } else { + return tableMetasBuilder_.getMessage(index); + } + } + public Builder setTableMetas( + int index, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta value) { + if (tableMetasBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTableMetasIsMutable(); + tableMetas_.set(index, value); + onChanged(); + } else { + tableMetasBuilder_.setMessage(index, value); + } + return this; + } + public Builder setTableMetas( + int index, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta.Builder builderForValue) { + if (tableMetasBuilder_ == null) { + ensureTableMetasIsMutable(); + tableMetas_.set(index, builderForValue.build()); + onChanged(); + } else { + tableMetasBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + public Builder addTableMetas(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta value) { + if (tableMetasBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTableMetasIsMutable(); + tableMetas_.add(value); + onChanged(); + } else { + tableMetasBuilder_.addMessage(value); + } + return this; + } + public Builder addTableMetas( + int index, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta value) { + if (tableMetasBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTableMetasIsMutable(); + tableMetas_.add(index, value); + onChanged(); + } else { + tableMetasBuilder_.addMessage(index, value); + } + return this; + } + public Builder addTableMetas( + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta.Builder builderForValue) { + if (tableMetasBuilder_ == null) { + ensureTableMetasIsMutable(); + tableMetas_.add(builderForValue.build()); + onChanged(); + } else { + tableMetasBuilder_.addMessage(builderForValue.build()); + } + return this; + } + public Builder addTableMetas( + int index, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta.Builder builderForValue) { + if (tableMetasBuilder_ == null) { + ensureTableMetasIsMutable(); + tableMetas_.add(index, builderForValue.build()); + onChanged(); + } else { + tableMetasBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAllTableMetas( + java.lang.Iterable values) { + if (tableMetasBuilder_ == null) { + ensureTableMetasIsMutable(); + super.addAll(values, tableMetas_); + onChanged(); + } else { + tableMetasBuilder_.addAllMessages(values); + } + return this; + } + public Builder clearTableMetas() { + if (tableMetasBuilder_ == null) { + tableMetas_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + tableMetasBuilder_.clear(); + } + return this; + } + public Builder removeTableMetas(int index) { + if (tableMetasBuilder_ == null) { + ensureTableMetasIsMutable(); + tableMetas_.remove(index); + onChanged(); + } else { + tableMetasBuilder_.remove(index); + } + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta.Builder getTableMetasBuilder( + int index) { + return getTableMetasFieldBuilder().getBuilder(index); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMetaOrBuilder getTableMetasOrBuilder( + int index) { + if (tableMetasBuilder_ == null) { + return tableMetas_.get(index); } else { + return tableMetasBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getTableMetasOrBuilderList() { + if (tableMetasBuilder_ != null) { + return tableMetasBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(tableMetas_); + } + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta.Builder addTableMetasBuilder() { + return getTableMetasFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta.getDefaultInstance()); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta.Builder addTableMetasBuilder( + int index) { + return getTableMetasFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta.getDefaultInstance()); + } + public java.util.List + getTableMetasBuilderList() { + return getTableMetasFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMetaOrBuilder> + getTableMetasFieldBuilder() { + if (tableMetasBuilder_ == null) { + tableMetasBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMetaOrBuilder>( + tableMetas_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + tableMetas_ = null; + } + return tableMetasBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.ListTimeseriesTableResponse) + } + + static { + defaultInstance = new ListTimeseriesTableResponse(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.ListTimeseriesTableResponse) + } + + public interface DeleteTimeseriesTableRequestOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string table_name = 1; + boolean hasTableName(); + String getTableName(); + } + public static final class DeleteTimeseriesTableRequest extends + com.google.protobuf.GeneratedMessage + implements DeleteTimeseriesTableRequestOrBuilder { + // Use DeleteTimeseriesTableRequest.newBuilder() to construct. + private DeleteTimeseriesTableRequest(Builder builder) { + super(builder); + } + private DeleteTimeseriesTableRequest(boolean noInit) {} + + private static final DeleteTimeseriesTableRequest defaultInstance; + public static DeleteTimeseriesTableRequest getDefaultInstance() { + return defaultInstance; + } + + public DeleteTimeseriesTableRequest getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DeleteTimeseriesTableRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DeleteTimeseriesTableRequest_fieldAccessorTable; + } + + private int bitField0_; + // required string table_name = 1; + public static final int TABLE_NAME_FIELD_NUMBER = 1; + private java.lang.Object tableName_; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + tableName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + tableName_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasTableName()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getTableNameBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getTableNameBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableRequest prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DeleteTimeseriesTableRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DeleteTimeseriesTableRequest_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + tableName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableRequest.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableRequest.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableRequest build() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableRequest buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableRequest result = new com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.tableName_ = tableName_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableRequest.getDefaultInstance()) return this; + if (other.hasTableName()) { + setTableName(other.getTableName()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasTableName()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + tableName_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // required string table_name = 1; + private java.lang.Object tableName_ = ""; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + tableName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setTableName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + return this; + } + public Builder clearTableName() { + bitField0_ = (bitField0_ & ~0x00000001); + tableName_ = getDefaultInstance().getTableName(); + onChanged(); + return this; + } + void setTableName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.DeleteTimeseriesTableRequest) + } + + static { + defaultInstance = new DeleteTimeseriesTableRequest(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.DeleteTimeseriesTableRequest) + } + + public interface DeleteTimeseriesTableResponseOrBuilder + extends com.google.protobuf.MessageOrBuilder { + } + public static final class DeleteTimeseriesTableResponse extends + com.google.protobuf.GeneratedMessage + implements DeleteTimeseriesTableResponseOrBuilder { + // Use DeleteTimeseriesTableResponse.newBuilder() to construct. + private DeleteTimeseriesTableResponse(Builder builder) { + super(builder); + } + private DeleteTimeseriesTableResponse(boolean noInit) {} + + private static final DeleteTimeseriesTableResponse defaultInstance; + public static DeleteTimeseriesTableResponse getDefaultInstance() { + return defaultInstance; + } + + public DeleteTimeseriesTableResponse getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DeleteTimeseriesTableResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DeleteTimeseriesTableResponse_fieldAccessorTable; + } + + private void initFields() { + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableResponse prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DeleteTimeseriesTableResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DeleteTimeseriesTableResponse_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableResponse.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableResponse.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableResponse build() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableResponse buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableResponse result = new com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableResponse(this); + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + } + } + } + + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.DeleteTimeseriesTableResponse) + } + + static { + defaultInstance = new DeleteTimeseriesTableResponse(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.DeleteTimeseriesTableResponse) + } + + public interface UpdateTimeseriesTableRequestOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string table_name = 1; + boolean hasTableName(); + String getTableName(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesTableOptions table_options = 2; + boolean hasTableOptions(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions getTableOptions(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptionsOrBuilder getTableOptionsOrBuilder(); + } + public static final class UpdateTimeseriesTableRequest extends + com.google.protobuf.GeneratedMessage + implements UpdateTimeseriesTableRequestOrBuilder { + // Use UpdateTimeseriesTableRequest.newBuilder() to construct. + private UpdateTimeseriesTableRequest(Builder builder) { + super(builder); + } + private UpdateTimeseriesTableRequest(boolean noInit) {} + + private static final UpdateTimeseriesTableRequest defaultInstance; + public static UpdateTimeseriesTableRequest getDefaultInstance() { + return defaultInstance; + } + + public UpdateTimeseriesTableRequest getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_UpdateTimeseriesTableRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_UpdateTimeseriesTableRequest_fieldAccessorTable; + } + + private int bitField0_; + // required string table_name = 1; + public static final int TABLE_NAME_FIELD_NUMBER = 1; + private java.lang.Object tableName_; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + tableName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesTableOptions table_options = 2; + public static final int TABLE_OPTIONS_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions tableOptions_; + public boolean hasTableOptions() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions getTableOptions() { + return tableOptions_; + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptionsOrBuilder getTableOptionsOrBuilder() { + return tableOptions_; + } + + private void initFields() { + tableName_ = ""; + tableOptions_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasTableName()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeMessage(2, tableOptions_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, tableOptions_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableRequest prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_UpdateTimeseriesTableRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_UpdateTimeseriesTableRequest_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getTableOptionsFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + tableName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + if (tableOptionsBuilder_ == null) { + tableOptions_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions.getDefaultInstance(); + } else { + tableOptionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableRequest.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableRequest.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableRequest build() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableRequest buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableRequest result = new com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.tableName_ = tableName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + if (tableOptionsBuilder_ == null) { + result.tableOptions_ = tableOptions_; + } else { + result.tableOptions_ = tableOptionsBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableRequest.getDefaultInstance()) return this; + if (other.hasTableName()) { + setTableName(other.getTableName()); + } + if (other.hasTableOptions()) { + mergeTableOptions(other.getTableOptions()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasTableName()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + tableName_ = input.readBytes(); + break; + } + case 18: { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions.newBuilder(); + if (hasTableOptions()) { + subBuilder.mergeFrom(getTableOptions()); + } + input.readMessage(subBuilder, extensionRegistry); + setTableOptions(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // required string table_name = 1; + private java.lang.Object tableName_ = ""; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + tableName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setTableName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + return this; + } + public Builder clearTableName() { + bitField0_ = (bitField0_ & ~0x00000001); + tableName_ = getDefaultInstance().getTableName(); + onChanged(); + return this; + } + void setTableName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesTableOptions table_options = 2; + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions tableOptions_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptionsOrBuilder> tableOptionsBuilder_; + public boolean hasTableOptions() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions getTableOptions() { + if (tableOptionsBuilder_ == null) { + return tableOptions_; + } else { + return tableOptionsBuilder_.getMessage(); + } + } + public Builder setTableOptions(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions value) { + if (tableOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tableOptions_ = value; + onChanged(); + } else { + tableOptionsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder setTableOptions( + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions.Builder builderForValue) { + if (tableOptionsBuilder_ == null) { + tableOptions_ = builderForValue.build(); + onChanged(); + } else { + tableOptionsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder mergeTableOptions(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions value) { + if (tableOptionsBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002) && + tableOptions_ != com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions.getDefaultInstance()) { + tableOptions_ = + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions.newBuilder(tableOptions_).mergeFrom(value).buildPartial(); + } else { + tableOptions_ = value; + } + onChanged(); + } else { + tableOptionsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder clearTableOptions() { + if (tableOptionsBuilder_ == null) { + tableOptions_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions.getDefaultInstance(); + onChanged(); + } else { + tableOptionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions.Builder getTableOptionsBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getTableOptionsFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptionsOrBuilder getTableOptionsOrBuilder() { + if (tableOptionsBuilder_ != null) { + return tableOptionsBuilder_.getMessageOrBuilder(); + } else { + return tableOptions_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptionsOrBuilder> + getTableOptionsFieldBuilder() { + if (tableOptionsBuilder_ == null) { + tableOptionsBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptionsOrBuilder>( + tableOptions_, + getParentForChildren(), + isClean()); + tableOptions_ = null; + } + return tableOptionsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.UpdateTimeseriesTableRequest) + } + + static { + defaultInstance = new UpdateTimeseriesTableRequest(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.UpdateTimeseriesTableRequest) + } + + public interface UpdateTimeseriesTableResponseOrBuilder + extends com.google.protobuf.MessageOrBuilder { + } + public static final class UpdateTimeseriesTableResponse extends + com.google.protobuf.GeneratedMessage + implements UpdateTimeseriesTableResponseOrBuilder { + // Use UpdateTimeseriesTableResponse.newBuilder() to construct. + private UpdateTimeseriesTableResponse(Builder builder) { + super(builder); + } + private UpdateTimeseriesTableResponse(boolean noInit) {} + + private static final UpdateTimeseriesTableResponse defaultInstance; + public static UpdateTimeseriesTableResponse getDefaultInstance() { + return defaultInstance; + } + + public UpdateTimeseriesTableResponse getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_UpdateTimeseriesTableResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_UpdateTimeseriesTableResponse_fieldAccessorTable; + } + + private void initFields() { + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableResponse prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_UpdateTimeseriesTableResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_UpdateTimeseriesTableResponse_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableResponse.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableResponse.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableResponse build() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableResponse buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableResponse result = new com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableResponse(this); + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + } + } + } + + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.UpdateTimeseriesTableResponse) + } + + static { + defaultInstance = new UpdateTimeseriesTableResponse(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.UpdateTimeseriesTableResponse) + } + + public interface DescribeTimeseriesTableRequestOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string table_name = 1; + boolean hasTableName(); + String getTableName(); + } + public static final class DescribeTimeseriesTableRequest extends + com.google.protobuf.GeneratedMessage + implements DescribeTimeseriesTableRequestOrBuilder { + // Use DescribeTimeseriesTableRequest.newBuilder() to construct. + private DescribeTimeseriesTableRequest(Builder builder) { + super(builder); + } + private DescribeTimeseriesTableRequest(boolean noInit) {} + + private static final DescribeTimeseriesTableRequest defaultInstance; + public static DescribeTimeseriesTableRequest getDefaultInstance() { + return defaultInstance; + } + + public DescribeTimeseriesTableRequest getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DescribeTimeseriesTableRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DescribeTimeseriesTableRequest_fieldAccessorTable; + } + + private int bitField0_; + // required string table_name = 1; + public static final int TABLE_NAME_FIELD_NUMBER = 1; + private java.lang.Object tableName_; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + tableName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + tableName_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasTableName()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getTableNameBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getTableNameBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableRequest prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DescribeTimeseriesTableRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DescribeTimeseriesTableRequest_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + tableName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableRequest.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableRequest.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableRequest build() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableRequest buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableRequest result = new com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.tableName_ = tableName_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableRequest.getDefaultInstance()) return this; + if (other.hasTableName()) { + setTableName(other.getTableName()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasTableName()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + tableName_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // required string table_name = 1; + private java.lang.Object tableName_ = ""; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + tableName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setTableName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + return this; + } + public Builder clearTableName() { + bitField0_ = (bitField0_ & ~0x00000001); + tableName_ = getDefaultInstance().getTableName(); + onChanged(); + return this; + } + void setTableName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.DescribeTimeseriesTableRequest) + } + + static { + defaultInstance = new DescribeTimeseriesTableRequest(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.DescribeTimeseriesTableRequest) + } + + public interface DescribeTimeseriesTableResponseOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required .com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesTableMeta table_meta = 1; + boolean hasTableMeta(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta getTableMeta(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMetaOrBuilder getTableMetaOrBuilder(); + } + public static final class DescribeTimeseriesTableResponse extends + com.google.protobuf.GeneratedMessage + implements DescribeTimeseriesTableResponseOrBuilder { + // Use DescribeTimeseriesTableResponse.newBuilder() to construct. + private DescribeTimeseriesTableResponse(Builder builder) { + super(builder); + } + private DescribeTimeseriesTableResponse(boolean noInit) {} + + private static final DescribeTimeseriesTableResponse defaultInstance; + public static DescribeTimeseriesTableResponse getDefaultInstance() { + return defaultInstance; + } + + public DescribeTimeseriesTableResponse getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DescribeTimeseriesTableResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DescribeTimeseriesTableResponse_fieldAccessorTable; + } + + private int bitField0_; + // required .com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesTableMeta table_meta = 1; + public static final int TABLE_META_FIELD_NUMBER = 1; + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta tableMeta_; + public boolean hasTableMeta() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta getTableMeta() { + return tableMeta_; + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMetaOrBuilder getTableMetaOrBuilder() { + return tableMeta_; + } + + private void initFields() { + tableMeta_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasTableMeta()) { + memoizedIsInitialized = 0; + return false; + } + if (!getTableMeta().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(1, tableMeta_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, tableMeta_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableResponse prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DescribeTimeseriesTableResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DescribeTimeseriesTableResponse_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getTableMetaFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (tableMetaBuilder_ == null) { + tableMeta_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta.getDefaultInstance(); + } else { + tableMetaBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableResponse.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableResponse.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableResponse build() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableResponse buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableResponse result = new com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableResponse(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + if (tableMetaBuilder_ == null) { + result.tableMeta_ = tableMeta_; + } else { + result.tableMeta_ = tableMetaBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableResponse.getDefaultInstance()) return this; + if (other.hasTableMeta()) { + mergeTableMeta(other.getTableMeta()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasTableMeta()) { + + return false; + } + if (!getTableMeta().isInitialized()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta.newBuilder(); + if (hasTableMeta()) { + subBuilder.mergeFrom(getTableMeta()); + } + input.readMessage(subBuilder, extensionRegistry); + setTableMeta(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // required .com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesTableMeta table_meta = 1; + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta tableMeta_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMetaOrBuilder> tableMetaBuilder_; + public boolean hasTableMeta() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta getTableMeta() { + if (tableMetaBuilder_ == null) { + return tableMeta_; + } else { + return tableMetaBuilder_.getMessage(); + } + } + public Builder setTableMeta(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta value) { + if (tableMetaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tableMeta_ = value; + onChanged(); + } else { + tableMetaBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder setTableMeta( + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta.Builder builderForValue) { + if (tableMetaBuilder_ == null) { + tableMeta_ = builderForValue.build(); + onChanged(); + } else { + tableMetaBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder mergeTableMeta(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta value) { + if (tableMetaBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001) && + tableMeta_ != com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta.getDefaultInstance()) { + tableMeta_ = + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta.newBuilder(tableMeta_).mergeFrom(value).buildPartial(); + } else { + tableMeta_ = value; + } + onChanged(); + } else { + tableMetaBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder clearTableMeta() { + if (tableMetaBuilder_ == null) { + tableMeta_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta.getDefaultInstance(); + onChanged(); + } else { + tableMetaBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta.Builder getTableMetaBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getTableMetaFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMetaOrBuilder getTableMetaOrBuilder() { + if (tableMetaBuilder_ != null) { + return tableMetaBuilder_.getMessageOrBuilder(); + } else { + return tableMeta_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMetaOrBuilder> + getTableMetaFieldBuilder() { + if (tableMetaBuilder_ == null) { + tableMetaBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMetaOrBuilder>( + tableMeta_, + getParentForChildren(), + isClean()); + tableMeta_ = null; + } + return tableMetaBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.DescribeTimeseriesTableResponse) + } + + static { + defaultInstance = new DescribeTimeseriesTableResponse(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.DescribeTimeseriesTableResponse) + } + + public interface MetaQueryConditionOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required .com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaQueryConditionType type = 1; + boolean hasType(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryConditionType getType(); + + // required bytes proto_data = 2; + boolean hasProtoData(); + com.google.protobuf.ByteString getProtoData(); + } + public static final class MetaQueryCondition extends + com.google.protobuf.GeneratedMessage + implements MetaQueryConditionOrBuilder { + // Use MetaQueryCondition.newBuilder() to construct. + private MetaQueryCondition(Builder builder) { + super(builder); + } + private MetaQueryCondition(boolean noInit) {} + + private static final MetaQueryCondition defaultInstance; + public static MetaQueryCondition getDefaultInstance() { + return defaultInstance; + } + + public MetaQueryCondition getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryCondition_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryCondition_fieldAccessorTable; + } + + private int bitField0_; + // required .com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaQueryConditionType type = 1; + public static final int TYPE_FIELD_NUMBER = 1; + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryConditionType type_; + public boolean hasType() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryConditionType getType() { + return type_; + } + + // required bytes proto_data = 2; + public static final int PROTO_DATA_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString protoData_; + public boolean hasProtoData() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getProtoData() { + return protoData_; + } + + private void initFields() { + type_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryConditionType.COMPOSITE_CONDITION; + protoData_ = com.google.protobuf.ByteString.EMPTY; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasType()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasProtoData()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeEnum(1, type_.getNumber()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, protoData_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, type_.getNumber()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, protoData_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryConditionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryCondition_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryCondition_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + type_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryConditionType.COMPOSITE_CONDITION; + bitField0_ = (bitField0_ & ~0x00000001); + protoData_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition build() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition result = new com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.type_ = type_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.protoData_ = protoData_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition.getDefaultInstance()) return this; + if (other.hasType()) { + setType(other.getType()); + } + if (other.hasProtoData()) { + setProtoData(other.getProtoData()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasType()) { + + return false; + } + if (!hasProtoData()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryConditionType value = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryConditionType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + type_ = value; + } + break; + } + case 18: { + bitField0_ |= 0x00000002; + protoData_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // required .com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaQueryConditionType type = 1; + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryConditionType type_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryConditionType.COMPOSITE_CONDITION; + public boolean hasType() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryConditionType getType() { + return type_; + } + public Builder setType(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryConditionType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + type_ = value; + onChanged(); + return this; + } + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000001); + type_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryConditionType.COMPOSITE_CONDITION; + onChanged(); + return this; + } + + // required bytes proto_data = 2; + private com.google.protobuf.ByteString protoData_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasProtoData() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getProtoData() { + return protoData_; + } + public Builder setProtoData(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + protoData_ = value; + onChanged(); + return this; + } + public Builder clearProtoData() { + bitField0_ = (bitField0_ & ~0x00000002); + protoData_ = getDefaultInstance().getProtoData(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaQueryCondition) + } + + static { + defaultInstance = new MetaQueryCondition(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaQueryCondition) + } + + public interface MetaQueryCompositeConditionOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required .com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaQueryCompositeOperator op = 1; + boolean hasOp(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCompositeOperator getOp(); + + // repeated .com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaQueryCondition sub_conditions = 2; + java.util.List + getSubConditionsList(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition getSubConditions(int index); + int getSubConditionsCount(); + java.util.List + getSubConditionsOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryConditionOrBuilder getSubConditionsOrBuilder( + int index); + } + public static final class MetaQueryCompositeCondition extends + com.google.protobuf.GeneratedMessage + implements MetaQueryCompositeConditionOrBuilder { + // Use MetaQueryCompositeCondition.newBuilder() to construct. + private MetaQueryCompositeCondition(Builder builder) { + super(builder); + } + private MetaQueryCompositeCondition(boolean noInit) {} + + private static final MetaQueryCompositeCondition defaultInstance; + public static MetaQueryCompositeCondition getDefaultInstance() { + return defaultInstance; + } + + public MetaQueryCompositeCondition getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryCompositeCondition_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryCompositeCondition_fieldAccessorTable; + } + + private int bitField0_; + // required .com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaQueryCompositeOperator op = 1; + public static final int OP_FIELD_NUMBER = 1; + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCompositeOperator op_; + public boolean hasOp() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCompositeOperator getOp() { + return op_; + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaQueryCondition sub_conditions = 2; + public static final int SUB_CONDITIONS_FIELD_NUMBER = 2; + private java.util.List subConditions_; + public java.util.List getSubConditionsList() { + return subConditions_; + } + public java.util.List + getSubConditionsOrBuilderList() { + return subConditions_; + } + public int getSubConditionsCount() { + return subConditions_.size(); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition getSubConditions(int index) { + return subConditions_.get(index); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryConditionOrBuilder getSubConditionsOrBuilder( + int index) { + return subConditions_.get(index); + } + + private void initFields() { + op_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCompositeOperator.OP_AND; + subConditions_ = java.util.Collections.emptyList(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasOp()) { + memoizedIsInitialized = 0; + return false; + } + for (int i = 0; i < getSubConditionsCount(); i++) { + if (!getSubConditions(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeEnum(1, op_.getNumber()); + } + for (int i = 0; i < subConditions_.size(); i++) { + output.writeMessage(2, subConditions_.get(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, op_.getNumber()); + } + for (int i = 0; i < subConditions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, subConditions_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCompositeCondition parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCompositeCondition parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCompositeCondition parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCompositeCondition parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCompositeCondition parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCompositeCondition parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCompositeCondition parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCompositeCondition parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCompositeCondition parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCompositeCondition parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCompositeCondition prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCompositeConditionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryCompositeCondition_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryCompositeCondition_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCompositeCondition.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getSubConditionsFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + op_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCompositeOperator.OP_AND; + bitField0_ = (bitField0_ & ~0x00000001); + if (subConditionsBuilder_ == null) { + subConditions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + subConditionsBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCompositeCondition.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCompositeCondition getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCompositeCondition.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCompositeCondition build() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCompositeCondition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCompositeCondition buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCompositeCondition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCompositeCondition buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCompositeCondition result = new com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCompositeCondition(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.op_ = op_; + if (subConditionsBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { + subConditions_ = java.util.Collections.unmodifiableList(subConditions_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.subConditions_ = subConditions_; + } else { + result.subConditions_ = subConditionsBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCompositeCondition) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCompositeCondition)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCompositeCondition other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCompositeCondition.getDefaultInstance()) return this; + if (other.hasOp()) { + setOp(other.getOp()); + } + if (subConditionsBuilder_ == null) { + if (!other.subConditions_.isEmpty()) { + if (subConditions_.isEmpty()) { + subConditions_ = other.subConditions_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureSubConditionsIsMutable(); + subConditions_.addAll(other.subConditions_); + } + onChanged(); + } + } else { + if (!other.subConditions_.isEmpty()) { + if (subConditionsBuilder_.isEmpty()) { + subConditionsBuilder_.dispose(); + subConditionsBuilder_ = null; + subConditions_ = other.subConditions_; + bitField0_ = (bitField0_ & ~0x00000002); + subConditionsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getSubConditionsFieldBuilder() : null; + } else { + subConditionsBuilder_.addAllMessages(other.subConditions_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasOp()) { + + return false; + } + for (int i = 0; i < getSubConditionsCount(); i++) { + if (!getSubConditions(i).isInitialized()) { + + return false; + } + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCompositeOperator value = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCompositeOperator.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + op_ = value; + } + break; + } + case 18: { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addSubConditions(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // required .com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaQueryCompositeOperator op = 1; + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCompositeOperator op_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCompositeOperator.OP_AND; + public boolean hasOp() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCompositeOperator getOp() { + return op_; + } + public Builder setOp(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCompositeOperator value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + op_ = value; + onChanged(); + return this; + } + public Builder clearOp() { + bitField0_ = (bitField0_ & ~0x00000001); + op_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCompositeOperator.OP_AND; + onChanged(); + return this; + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaQueryCondition sub_conditions = 2; + private java.util.List subConditions_ = + java.util.Collections.emptyList(); + private void ensureSubConditionsIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + subConditions_ = new java.util.ArrayList(subConditions_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryConditionOrBuilder> subConditionsBuilder_; + + public java.util.List getSubConditionsList() { + if (subConditionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(subConditions_); + } else { + return subConditionsBuilder_.getMessageList(); + } + } + public int getSubConditionsCount() { + if (subConditionsBuilder_ == null) { + return subConditions_.size(); + } else { + return subConditionsBuilder_.getCount(); + } + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition getSubConditions(int index) { + if (subConditionsBuilder_ == null) { + return subConditions_.get(index); + } else { + return subConditionsBuilder_.getMessage(index); + } + } + public Builder setSubConditions( + int index, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition value) { + if (subConditionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubConditionsIsMutable(); + subConditions_.set(index, value); + onChanged(); + } else { + subConditionsBuilder_.setMessage(index, value); + } + return this; + } + public Builder setSubConditions( + int index, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition.Builder builderForValue) { + if (subConditionsBuilder_ == null) { + ensureSubConditionsIsMutable(); + subConditions_.set(index, builderForValue.build()); + onChanged(); + } else { + subConditionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + public Builder addSubConditions(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition value) { + if (subConditionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubConditionsIsMutable(); + subConditions_.add(value); + onChanged(); + } else { + subConditionsBuilder_.addMessage(value); + } + return this; + } + public Builder addSubConditions( + int index, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition value) { + if (subConditionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubConditionsIsMutable(); + subConditions_.add(index, value); + onChanged(); + } else { + subConditionsBuilder_.addMessage(index, value); + } + return this; + } + public Builder addSubConditions( + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition.Builder builderForValue) { + if (subConditionsBuilder_ == null) { + ensureSubConditionsIsMutable(); + subConditions_.add(builderForValue.build()); + onChanged(); + } else { + subConditionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + public Builder addSubConditions( + int index, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition.Builder builderForValue) { + if (subConditionsBuilder_ == null) { + ensureSubConditionsIsMutable(); + subConditions_.add(index, builderForValue.build()); + onChanged(); + } else { + subConditionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAllSubConditions( + java.lang.Iterable values) { + if (subConditionsBuilder_ == null) { + ensureSubConditionsIsMutable(); + super.addAll(values, subConditions_); + onChanged(); + } else { + subConditionsBuilder_.addAllMessages(values); + } + return this; + } + public Builder clearSubConditions() { + if (subConditionsBuilder_ == null) { + subConditions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + subConditionsBuilder_.clear(); + } + return this; + } + public Builder removeSubConditions(int index) { + if (subConditionsBuilder_ == null) { + ensureSubConditionsIsMutable(); + subConditions_.remove(index); + onChanged(); + } else { + subConditionsBuilder_.remove(index); + } + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition.Builder getSubConditionsBuilder( + int index) { + return getSubConditionsFieldBuilder().getBuilder(index); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryConditionOrBuilder getSubConditionsOrBuilder( + int index) { + if (subConditionsBuilder_ == null) { + return subConditions_.get(index); } else { + return subConditionsBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getSubConditionsOrBuilderList() { + if (subConditionsBuilder_ != null) { + return subConditionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(subConditions_); + } + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition.Builder addSubConditionsBuilder() { + return getSubConditionsFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition.getDefaultInstance()); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition.Builder addSubConditionsBuilder( + int index) { + return getSubConditionsFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition.getDefaultInstance()); + } + public java.util.List + getSubConditionsBuilderList() { + return getSubConditionsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryConditionOrBuilder> + getSubConditionsFieldBuilder() { + if (subConditionsBuilder_ == null) { + subConditionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryConditionOrBuilder>( + subConditions_, + ((bitField0_ & 0x00000002) == 0x00000002), + getParentForChildren(), + isClean()); + subConditions_ = null; + } + return subConditionsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaQueryCompositeCondition) + } + + static { + defaultInstance = new MetaQueryCompositeCondition(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaQueryCompositeCondition) + } + + public interface MetaQueryMeasurementConditionOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required .com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaQuerySingleOperator op = 1; + boolean hasOp(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator getOp(); + + // required string value = 2; + boolean hasValue(); + String getValue(); + } + public static final class MetaQueryMeasurementCondition extends + com.google.protobuf.GeneratedMessage + implements MetaQueryMeasurementConditionOrBuilder { + // Use MetaQueryMeasurementCondition.newBuilder() to construct. + private MetaQueryMeasurementCondition(Builder builder) { + super(builder); + } + private MetaQueryMeasurementCondition(boolean noInit) {} + + private static final MetaQueryMeasurementCondition defaultInstance; + public static MetaQueryMeasurementCondition getDefaultInstance() { + return defaultInstance; + } + + public MetaQueryMeasurementCondition getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryMeasurementCondition_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryMeasurementCondition_fieldAccessorTable; + } + + private int bitField0_; + // required .com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaQuerySingleOperator op = 1; + public static final int OP_FIELD_NUMBER = 1; + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator op_; + public boolean hasOp() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator getOp() { + return op_; + } + + // required string value = 2; + public static final int VALUE_FIELD_NUMBER = 2; + private java.lang.Object value_; + public boolean hasValue() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getValue() { + java.lang.Object ref = value_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + value_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + op_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator.OP_EQUAL; + value_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasOp()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasValue()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeEnum(1, op_.getNumber()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getValueBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, op_.getNumber()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getValueBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryMeasurementCondition parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryMeasurementCondition parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryMeasurementCondition parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryMeasurementCondition parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryMeasurementCondition parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryMeasurementCondition parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryMeasurementCondition parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryMeasurementCondition parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryMeasurementCondition parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryMeasurementCondition parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryMeasurementCondition prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryMeasurementConditionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryMeasurementCondition_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryMeasurementCondition_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryMeasurementCondition.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + op_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator.OP_EQUAL; + bitField0_ = (bitField0_ & ~0x00000001); + value_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryMeasurementCondition.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryMeasurementCondition getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryMeasurementCondition.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryMeasurementCondition build() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryMeasurementCondition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryMeasurementCondition buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryMeasurementCondition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryMeasurementCondition buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryMeasurementCondition result = new com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryMeasurementCondition(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.op_ = op_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.value_ = value_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryMeasurementCondition) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryMeasurementCondition)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryMeasurementCondition other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryMeasurementCondition.getDefaultInstance()) return this; + if (other.hasOp()) { + setOp(other.getOp()); + } + if (other.hasValue()) { + setValue(other.getValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasOp()) { + + return false; + } + if (!hasValue()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator value = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + op_ = value; + } + break; + } + case 18: { + bitField0_ |= 0x00000002; + value_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // required .com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaQuerySingleOperator op = 1; + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator op_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator.OP_EQUAL; + public boolean hasOp() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator getOp() { + return op_; + } + public Builder setOp(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + op_ = value; + onChanged(); + return this; + } + public Builder clearOp() { + bitField0_ = (bitField0_ & ~0x00000001); + op_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator.OP_EQUAL; + onChanged(); + return this; + } + + // required string value = 2; + private java.lang.Object value_ = ""; + public boolean hasValue() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + value_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setValue(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + value_ = value; + onChanged(); + return this; + } + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000002); + value_ = getDefaultInstance().getValue(); + onChanged(); + return this; + } + void setValue(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000002; + value_ = value; + onChanged(); + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaQueryMeasurementCondition) + } + + static { + defaultInstance = new MetaQueryMeasurementCondition(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaQueryMeasurementCondition) + } + + public interface MetaQuerySourceConditionOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required .com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaQuerySingleOperator op = 1; + boolean hasOp(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator getOp(); + + // required string value = 2; + boolean hasValue(); + String getValue(); + } + public static final class MetaQuerySourceCondition extends + com.google.protobuf.GeneratedMessage + implements MetaQuerySourceConditionOrBuilder { + // Use MetaQuerySourceCondition.newBuilder() to construct. + private MetaQuerySourceCondition(Builder builder) { + super(builder); + } + private MetaQuerySourceCondition(boolean noInit) {} + + private static final MetaQuerySourceCondition defaultInstance; + public static MetaQuerySourceCondition getDefaultInstance() { + return defaultInstance; + } + + public MetaQuerySourceCondition getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQuerySourceCondition_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQuerySourceCondition_fieldAccessorTable; + } + + private int bitField0_; + // required .com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaQuerySingleOperator op = 1; + public static final int OP_FIELD_NUMBER = 1; + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator op_; + public boolean hasOp() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator getOp() { + return op_; + } + + // required string value = 2; + public static final int VALUE_FIELD_NUMBER = 2; + private java.lang.Object value_; + public boolean hasValue() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getValue() { + java.lang.Object ref = value_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + value_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + op_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator.OP_EQUAL; + value_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasOp()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasValue()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeEnum(1, op_.getNumber()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getValueBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, op_.getNumber()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getValueBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySourceCondition parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySourceCondition parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySourceCondition parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySourceCondition parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySourceCondition parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySourceCondition parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySourceCondition parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySourceCondition parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySourceCondition parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySourceCondition parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySourceCondition prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySourceConditionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQuerySourceCondition_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQuerySourceCondition_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySourceCondition.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + op_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator.OP_EQUAL; + bitField0_ = (bitField0_ & ~0x00000001); + value_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySourceCondition.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySourceCondition getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySourceCondition.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySourceCondition build() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySourceCondition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySourceCondition buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySourceCondition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySourceCondition buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySourceCondition result = new com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySourceCondition(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.op_ = op_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.value_ = value_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySourceCondition) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySourceCondition)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySourceCondition other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySourceCondition.getDefaultInstance()) return this; + if (other.hasOp()) { + setOp(other.getOp()); + } + if (other.hasValue()) { + setValue(other.getValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasOp()) { + + return false; + } + if (!hasValue()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator value = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + op_ = value; + } + break; + } + case 18: { + bitField0_ |= 0x00000002; + value_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // required .com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaQuerySingleOperator op = 1; + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator op_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator.OP_EQUAL; + public boolean hasOp() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator getOp() { + return op_; + } + public Builder setOp(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + op_ = value; + onChanged(); + return this; + } + public Builder clearOp() { + bitField0_ = (bitField0_ & ~0x00000001); + op_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator.OP_EQUAL; + onChanged(); + return this; + } + + // required string value = 2; + private java.lang.Object value_ = ""; + public boolean hasValue() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + value_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setValue(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + value_ = value; + onChanged(); + return this; + } + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000002); + value_ = getDefaultInstance().getValue(); + onChanged(); + return this; + } + void setValue(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000002; + value_ = value; + onChanged(); + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaQuerySourceCondition) + } + + static { + defaultInstance = new MetaQuerySourceCondition(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaQuerySourceCondition) + } + + public interface MetaQueryTagConditionOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required .com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaQuerySingleOperator op = 1; + boolean hasOp(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator getOp(); + + // required string tag_name = 2; + boolean hasTagName(); + String getTagName(); + + // required string value = 3; + boolean hasValue(); + String getValue(); + } + public static final class MetaQueryTagCondition extends + com.google.protobuf.GeneratedMessage + implements MetaQueryTagConditionOrBuilder { + // Use MetaQueryTagCondition.newBuilder() to construct. + private MetaQueryTagCondition(Builder builder) { + super(builder); + } + private MetaQueryTagCondition(boolean noInit) {} + + private static final MetaQueryTagCondition defaultInstance; + public static MetaQueryTagCondition getDefaultInstance() { + return defaultInstance; + } + + public MetaQueryTagCondition getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryTagCondition_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryTagCondition_fieldAccessorTable; + } + + private int bitField0_; + // required .com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaQuerySingleOperator op = 1; + public static final int OP_FIELD_NUMBER = 1; + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator op_; + public boolean hasOp() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator getOp() { + return op_; + } + + // required string tag_name = 2; + public static final int TAG_NAME_FIELD_NUMBER = 2; + private java.lang.Object tagName_; + public boolean hasTagName() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getTagName() { + java.lang.Object ref = tagName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + tagName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTagNameBytes() { + java.lang.Object ref = tagName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + tagName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // required string value = 3; + public static final int VALUE_FIELD_NUMBER = 3; + private java.lang.Object value_; + public boolean hasValue() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public String getValue() { + java.lang.Object ref = value_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + value_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + op_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator.OP_EQUAL; + tagName_ = ""; + value_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasOp()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasTagName()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasValue()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeEnum(1, op_.getNumber()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getTagNameBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeBytes(3, getValueBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, op_.getNumber()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getTagNameBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, getValueBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryTagCondition parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryTagCondition parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryTagCondition parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryTagCondition parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryTagCondition parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryTagCondition parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryTagCondition parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryTagCondition parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryTagCondition parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryTagCondition parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryTagCondition prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryTagConditionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryTagCondition_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryTagCondition_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryTagCondition.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + op_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator.OP_EQUAL; + bitField0_ = (bitField0_ & ~0x00000001); + tagName_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + value_ = ""; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryTagCondition.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryTagCondition getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryTagCondition.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryTagCondition build() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryTagCondition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryTagCondition buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryTagCondition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryTagCondition buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryTagCondition result = new com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryTagCondition(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.op_ = op_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.tagName_ = tagName_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.value_ = value_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryTagCondition) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryTagCondition)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryTagCondition other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryTagCondition.getDefaultInstance()) return this; + if (other.hasOp()) { + setOp(other.getOp()); + } + if (other.hasTagName()) { + setTagName(other.getTagName()); + } + if (other.hasValue()) { + setValue(other.getValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasOp()) { + + return false; + } + if (!hasTagName()) { + + return false; + } + if (!hasValue()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator value = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + op_ = value; + } + break; + } + case 18: { + bitField0_ |= 0x00000002; + tagName_ = input.readBytes(); + break; + } + case 26: { + bitField0_ |= 0x00000004; + value_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // required .com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaQuerySingleOperator op = 1; + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator op_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator.OP_EQUAL; + public boolean hasOp() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator getOp() { + return op_; + } + public Builder setOp(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + op_ = value; + onChanged(); + return this; + } + public Builder clearOp() { + bitField0_ = (bitField0_ & ~0x00000001); + op_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator.OP_EQUAL; + onChanged(); + return this; + } + + // required string tag_name = 2; + private java.lang.Object tagName_ = ""; + public boolean hasTagName() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getTagName() { + java.lang.Object ref = tagName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + tagName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setTagName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + tagName_ = value; + onChanged(); + return this; + } + public Builder clearTagName() { + bitField0_ = (bitField0_ & ~0x00000002); + tagName_ = getDefaultInstance().getTagName(); + onChanged(); + return this; + } + void setTagName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000002; + tagName_ = value; + onChanged(); + } + + // required string value = 3; + private java.lang.Object value_ = ""; + public boolean hasValue() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + value_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setValue(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + value_ = value; + onChanged(); + return this; + } + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000004); + value_ = getDefaultInstance().getValue(); + onChanged(); + return this; + } + void setValue(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000004; + value_ = value; + onChanged(); + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaQueryTagCondition) + } + + static { + defaultInstance = new MetaQueryTagCondition(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaQueryTagCondition) + } + + public interface MetaQueryAttributeConditionOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required .com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaQuerySingleOperator op = 1; + boolean hasOp(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator getOp(); + + // required string attr_name = 2; + boolean hasAttrName(); + String getAttrName(); + + // required string value = 3; + boolean hasValue(); + String getValue(); + } + public static final class MetaQueryAttributeCondition extends + com.google.protobuf.GeneratedMessage + implements MetaQueryAttributeConditionOrBuilder { + // Use MetaQueryAttributeCondition.newBuilder() to construct. + private MetaQueryAttributeCondition(Builder builder) { + super(builder); + } + private MetaQueryAttributeCondition(boolean noInit) {} + + private static final MetaQueryAttributeCondition defaultInstance; + public static MetaQueryAttributeCondition getDefaultInstance() { + return defaultInstance; + } + + public MetaQueryAttributeCondition getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryAttributeCondition_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryAttributeCondition_fieldAccessorTable; + } + + private int bitField0_; + // required .com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaQuerySingleOperator op = 1; + public static final int OP_FIELD_NUMBER = 1; + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator op_; + public boolean hasOp() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator getOp() { + return op_; + } + + // required string attr_name = 2; + public static final int ATTR_NAME_FIELD_NUMBER = 2; + private java.lang.Object attrName_; + public boolean hasAttrName() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getAttrName() { + java.lang.Object ref = attrName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + attrName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getAttrNameBytes() { + java.lang.Object ref = attrName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + attrName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // required string value = 3; + public static final int VALUE_FIELD_NUMBER = 3; + private java.lang.Object value_; + public boolean hasValue() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public String getValue() { + java.lang.Object ref = value_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + value_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + op_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator.OP_EQUAL; + attrName_ = ""; + value_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasOp()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasAttrName()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasValue()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeEnum(1, op_.getNumber()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getAttrNameBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeBytes(3, getValueBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, op_.getNumber()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getAttrNameBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, getValueBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryAttributeCondition parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryAttributeCondition parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryAttributeCondition parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryAttributeCondition parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryAttributeCondition parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryAttributeCondition parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryAttributeCondition parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryAttributeCondition parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryAttributeCondition parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryAttributeCondition parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryAttributeCondition prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryAttributeConditionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryAttributeCondition_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryAttributeCondition_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryAttributeCondition.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + op_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator.OP_EQUAL; + bitField0_ = (bitField0_ & ~0x00000001); + attrName_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + value_ = ""; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryAttributeCondition.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryAttributeCondition getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryAttributeCondition.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryAttributeCondition build() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryAttributeCondition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryAttributeCondition buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryAttributeCondition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryAttributeCondition buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryAttributeCondition result = new com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryAttributeCondition(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.op_ = op_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.attrName_ = attrName_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.value_ = value_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryAttributeCondition) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryAttributeCondition)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryAttributeCondition other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryAttributeCondition.getDefaultInstance()) return this; + if (other.hasOp()) { + setOp(other.getOp()); + } + if (other.hasAttrName()) { + setAttrName(other.getAttrName()); + } + if (other.hasValue()) { + setValue(other.getValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasOp()) { + + return false; + } + if (!hasAttrName()) { + + return false; + } + if (!hasValue()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator value = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + op_ = value; + } + break; + } + case 18: { + bitField0_ |= 0x00000002; + attrName_ = input.readBytes(); + break; + } + case 26: { + bitField0_ |= 0x00000004; + value_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // required .com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaQuerySingleOperator op = 1; + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator op_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator.OP_EQUAL; + public boolean hasOp() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator getOp() { + return op_; + } + public Builder setOp(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + op_ = value; + onChanged(); + return this; + } + public Builder clearOp() { + bitField0_ = (bitField0_ & ~0x00000001); + op_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator.OP_EQUAL; + onChanged(); + return this; + } + + // required string attr_name = 2; + private java.lang.Object attrName_ = ""; + public boolean hasAttrName() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getAttrName() { + java.lang.Object ref = attrName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + attrName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setAttrName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + attrName_ = value; + onChanged(); + return this; + } + public Builder clearAttrName() { + bitField0_ = (bitField0_ & ~0x00000002); + attrName_ = getDefaultInstance().getAttrName(); + onChanged(); + return this; + } + void setAttrName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000002; + attrName_ = value; + onChanged(); + } + + // required string value = 3; + private java.lang.Object value_ = ""; + public boolean hasValue() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + value_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setValue(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + value_ = value; + onChanged(); + return this; + } + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000004); + value_ = getDefaultInstance().getValue(); + onChanged(); + return this; + } + void setValue(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000004; + value_ = value; + onChanged(); + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaQueryAttributeCondition) + } + + static { + defaultInstance = new MetaQueryAttributeCondition(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaQueryAttributeCondition) + } + + public interface MetaQueryUpdateTimeConditionOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required .com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaQuerySingleOperator op = 1; + boolean hasOp(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator getOp(); + + // required int64 value = 2; + boolean hasValue(); + long getValue(); + } + public static final class MetaQueryUpdateTimeCondition extends + com.google.protobuf.GeneratedMessage + implements MetaQueryUpdateTimeConditionOrBuilder { + // Use MetaQueryUpdateTimeCondition.newBuilder() to construct. + private MetaQueryUpdateTimeCondition(Builder builder) { + super(builder); + } + private MetaQueryUpdateTimeCondition(boolean noInit) {} + + private static final MetaQueryUpdateTimeCondition defaultInstance; + public static MetaQueryUpdateTimeCondition getDefaultInstance() { + return defaultInstance; + } + + public MetaQueryUpdateTimeCondition getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryUpdateTimeCondition_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryUpdateTimeCondition_fieldAccessorTable; + } + + private int bitField0_; + // required .com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaQuerySingleOperator op = 1; + public static final int OP_FIELD_NUMBER = 1; + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator op_; + public boolean hasOp() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator getOp() { + return op_; + } + + // required int64 value = 2; + public static final int VALUE_FIELD_NUMBER = 2; + private long value_; + public boolean hasValue() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public long getValue() { + return value_; + } + + private void initFields() { + op_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator.OP_EQUAL; + value_ = 0L; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasOp()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasValue()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeEnum(1, op_.getNumber()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeInt64(2, value_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, op_.getNumber()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, value_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryUpdateTimeCondition parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryUpdateTimeCondition parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryUpdateTimeCondition parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryUpdateTimeCondition parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryUpdateTimeCondition parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryUpdateTimeCondition parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryUpdateTimeCondition parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryUpdateTimeCondition parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryUpdateTimeCondition parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryUpdateTimeCondition parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryUpdateTimeCondition prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryUpdateTimeConditionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryUpdateTimeCondition_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryUpdateTimeCondition_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryUpdateTimeCondition.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + op_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator.OP_EQUAL; + bitField0_ = (bitField0_ & ~0x00000001); + value_ = 0L; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryUpdateTimeCondition.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryUpdateTimeCondition getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryUpdateTimeCondition.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryUpdateTimeCondition build() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryUpdateTimeCondition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryUpdateTimeCondition buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryUpdateTimeCondition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryUpdateTimeCondition buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryUpdateTimeCondition result = new com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryUpdateTimeCondition(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.op_ = op_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.value_ = value_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryUpdateTimeCondition) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryUpdateTimeCondition)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryUpdateTimeCondition other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryUpdateTimeCondition.getDefaultInstance()) return this; + if (other.hasOp()) { + setOp(other.getOp()); + } + if (other.hasValue()) { + setValue(other.getValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasOp()) { + + return false; + } + if (!hasValue()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator value = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + op_ = value; + } + break; + } + case 16: { + bitField0_ |= 0x00000002; + value_ = input.readInt64(); + break; + } + } + } + } + + private int bitField0_; + + // required .com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaQuerySingleOperator op = 1; + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator op_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator.OP_EQUAL; + public boolean hasOp() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator getOp() { + return op_; + } + public Builder setOp(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + op_ = value; + onChanged(); + return this; + } + public Builder clearOp() { + bitField0_ = (bitField0_ & ~0x00000001); + op_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySingleOperator.OP_EQUAL; + onChanged(); + return this; + } + + // required int64 value = 2; + private long value_ ; + public boolean hasValue() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public long getValue() { + return value_; + } + public Builder setValue(long value) { + bitField0_ |= 0x00000002; + value_ = value; + onChanged(); + return this; + } + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000002); + value_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaQueryUpdateTimeCondition) + } + + static { + defaultInstance = new MetaQueryUpdateTimeCondition(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaQueryUpdateTimeCondition) + } + + public interface TimeseriesKeyOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string measurement = 1; + boolean hasMeasurement(); + String getMeasurement(); + + // required string source = 2; + boolean hasSource(); + String getSource(); + + // required string tags = 3; + boolean hasTags(); + String getTags(); + } + public static final class TimeseriesKey extends + com.google.protobuf.GeneratedMessage + implements TimeseriesKeyOrBuilder { + // Use TimeseriesKey.newBuilder() to construct. + private TimeseriesKey(Builder builder) { + super(builder); + } + private TimeseriesKey(boolean noInit) {} + + private static final TimeseriesKey defaultInstance; + public static TimeseriesKey getDefaultInstance() { + return defaultInstance; + } + + public TimeseriesKey getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesKey_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesKey_fieldAccessorTable; + } + + private int bitField0_; + // required string measurement = 1; + public static final int MEASUREMENT_FIELD_NUMBER = 1; + private java.lang.Object measurement_; + public boolean hasMeasurement() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getMeasurement() { + java.lang.Object ref = measurement_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + measurement_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getMeasurementBytes() { + java.lang.Object ref = measurement_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + measurement_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // required string source = 2; + public static final int SOURCE_FIELD_NUMBER = 2; + private java.lang.Object source_; + public boolean hasSource() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getSource() { + java.lang.Object ref = source_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + source_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // required string tags = 3; + public static final int TAGS_FIELD_NUMBER = 3; + private java.lang.Object tags_; + public boolean hasTags() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public String getTags() { + java.lang.Object ref = tags_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + tags_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTagsBytes() { + java.lang.Object ref = tags_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + tags_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + measurement_ = ""; + source_ = ""; + tags_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasMeasurement()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasSource()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasTags()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getMeasurementBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getSourceBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeBytes(3, getTagsBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getMeasurementBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getSourceBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, getTagsBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKeyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesKey_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesKey_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + measurement_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + source_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + tags_ = ""; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey build() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey result = new com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.measurement_ = measurement_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.source_ = source_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.tags_ = tags_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey.getDefaultInstance()) return this; + if (other.hasMeasurement()) { + setMeasurement(other.getMeasurement()); + } + if (other.hasSource()) { + setSource(other.getSource()); + } + if (other.hasTags()) { + setTags(other.getTags()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasMeasurement()) { + + return false; + } + if (!hasSource()) { + + return false; + } + if (!hasTags()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + measurement_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + source_ = input.readBytes(); + break; + } + case 26: { + bitField0_ |= 0x00000004; + tags_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // required string measurement = 1; + private java.lang.Object measurement_ = ""; + public boolean hasMeasurement() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getMeasurement() { + java.lang.Object ref = measurement_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + measurement_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setMeasurement(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + measurement_ = value; + onChanged(); + return this; + } + public Builder clearMeasurement() { + bitField0_ = (bitField0_ & ~0x00000001); + measurement_ = getDefaultInstance().getMeasurement(); + onChanged(); + return this; + } + void setMeasurement(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + measurement_ = value; + onChanged(); + } + + // required string source = 2; + private java.lang.Object source_ = ""; + public boolean hasSource() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getSource() { + java.lang.Object ref = source_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + source_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setSource(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + source_ = value; + onChanged(); + return this; + } + public Builder clearSource() { + bitField0_ = (bitField0_ & ~0x00000002); + source_ = getDefaultInstance().getSource(); + onChanged(); + return this; + } + void setSource(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000002; + source_ = value; + onChanged(); + } + + // required string tags = 3; + private java.lang.Object tags_ = ""; + public boolean hasTags() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public String getTags() { + java.lang.Object ref = tags_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + tags_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setTags(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + tags_ = value; + onChanged(); + return this; + } + public Builder clearTags() { + bitField0_ = (bitField0_ & ~0x00000004); + tags_ = getDefaultInstance().getTags(); + onChanged(); + return this; + } + void setTags(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000004; + tags_ = value; + onChanged(); + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesKey) + } + + static { + defaultInstance = new TimeseriesKey(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesKey) + } + + public interface TimeseriesMetaOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required .com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesKey time_series_key = 1; + boolean hasTimeSeriesKey(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey getTimeSeriesKey(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKeyOrBuilder getTimeSeriesKeyOrBuilder(); + + // optional string attributes = 2; + boolean hasAttributes(); + String getAttributes(); + + // optional int64 update_time = 3; + boolean hasUpdateTime(); + long getUpdateTime(); + } + public static final class TimeseriesMeta extends + com.google.protobuf.GeneratedMessage + implements TimeseriesMetaOrBuilder { + // Use TimeseriesMeta.newBuilder() to construct. + private TimeseriesMeta(Builder builder) { + super(builder); + } + private TimeseriesMeta(boolean noInit) {} + + private static final TimeseriesMeta defaultInstance; + public static TimeseriesMeta getDefaultInstance() { + return defaultInstance; + } + + public TimeseriesMeta getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesMeta_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesMeta_fieldAccessorTable; + } + + private int bitField0_; + // required .com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesKey time_series_key = 1; + public static final int TIME_SERIES_KEY_FIELD_NUMBER = 1; + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey timeSeriesKey_; + public boolean hasTimeSeriesKey() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey getTimeSeriesKey() { + return timeSeriesKey_; + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKeyOrBuilder getTimeSeriesKeyOrBuilder() { + return timeSeriesKey_; + } + + // optional string attributes = 2; + public static final int ATTRIBUTES_FIELD_NUMBER = 2; + private java.lang.Object attributes_; + public boolean hasAttributes() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getAttributes() { + java.lang.Object ref = attributes_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + attributes_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getAttributesBytes() { + java.lang.Object ref = attributes_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + attributes_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional int64 update_time = 3; + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private long updateTime_; + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public long getUpdateTime() { + return updateTime_; + } + + private void initFields() { + timeSeriesKey_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey.getDefaultInstance(); + attributes_ = ""; + updateTime_ = 0L; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasTimeSeriesKey()) { + memoizedIsInitialized = 0; + return false; + } + if (!getTimeSeriesKey().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(1, timeSeriesKey_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getAttributesBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeInt64(3, updateTime_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, timeSeriesKey_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getAttributesBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, updateTime_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMetaOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesMeta_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesMeta_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getTimeSeriesKeyFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (timeSeriesKeyBuilder_ == null) { + timeSeriesKey_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey.getDefaultInstance(); + } else { + timeSeriesKeyBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + attributes_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + updateTime_ = 0L; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta build() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta result = new com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + if (timeSeriesKeyBuilder_ == null) { + result.timeSeriesKey_ = timeSeriesKey_; + } else { + result.timeSeriesKey_ = timeSeriesKeyBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.attributes_ = attributes_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.updateTime_ = updateTime_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta.getDefaultInstance()) return this; + if (other.hasTimeSeriesKey()) { + mergeTimeSeriesKey(other.getTimeSeriesKey()); + } + if (other.hasAttributes()) { + setAttributes(other.getAttributes()); + } + if (other.hasUpdateTime()) { + setUpdateTime(other.getUpdateTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasTimeSeriesKey()) { + + return false; + } + if (!getTimeSeriesKey().isInitialized()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey.newBuilder(); + if (hasTimeSeriesKey()) { + subBuilder.mergeFrom(getTimeSeriesKey()); + } + input.readMessage(subBuilder, extensionRegistry); + setTimeSeriesKey(subBuilder.buildPartial()); + break; + } + case 18: { + bitField0_ |= 0x00000002; + attributes_ = input.readBytes(); + break; + } + case 24: { + bitField0_ |= 0x00000004; + updateTime_ = input.readInt64(); + break; + } + } + } + } + + private int bitField0_; + + // required .com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesKey time_series_key = 1; + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey timeSeriesKey_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKeyOrBuilder> timeSeriesKeyBuilder_; + public boolean hasTimeSeriesKey() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey getTimeSeriesKey() { + if (timeSeriesKeyBuilder_ == null) { + return timeSeriesKey_; + } else { + return timeSeriesKeyBuilder_.getMessage(); + } + } + public Builder setTimeSeriesKey(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey value) { + if (timeSeriesKeyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timeSeriesKey_ = value; + onChanged(); + } else { + timeSeriesKeyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder setTimeSeriesKey( + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey.Builder builderForValue) { + if (timeSeriesKeyBuilder_ == null) { + timeSeriesKey_ = builderForValue.build(); + onChanged(); + } else { + timeSeriesKeyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder mergeTimeSeriesKey(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey value) { + if (timeSeriesKeyBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001) && + timeSeriesKey_ != com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey.getDefaultInstance()) { + timeSeriesKey_ = + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey.newBuilder(timeSeriesKey_).mergeFrom(value).buildPartial(); + } else { + timeSeriesKey_ = value; + } + onChanged(); + } else { + timeSeriesKeyBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + return this; + } + public Builder clearTimeSeriesKey() { + if (timeSeriesKeyBuilder_ == null) { + timeSeriesKey_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey.getDefaultInstance(); + onChanged(); + } else { + timeSeriesKeyBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey.Builder getTimeSeriesKeyBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getTimeSeriesKeyFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKeyOrBuilder getTimeSeriesKeyOrBuilder() { + if (timeSeriesKeyBuilder_ != null) { + return timeSeriesKeyBuilder_.getMessageOrBuilder(); + } else { + return timeSeriesKey_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKeyOrBuilder> + getTimeSeriesKeyFieldBuilder() { + if (timeSeriesKeyBuilder_ == null) { + timeSeriesKeyBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKeyOrBuilder>( + timeSeriesKey_, + getParentForChildren(), + isClean()); + timeSeriesKey_ = null; + } + return timeSeriesKeyBuilder_; + } + + // optional string attributes = 2; + private java.lang.Object attributes_ = ""; + public boolean hasAttributes() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getAttributes() { + java.lang.Object ref = attributes_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + attributes_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setAttributes(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + attributes_ = value; + onChanged(); + return this; + } + public Builder clearAttributes() { + bitField0_ = (bitField0_ & ~0x00000002); + attributes_ = getDefaultInstance().getAttributes(); + onChanged(); + return this; + } + void setAttributes(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000002; + attributes_ = value; + onChanged(); + } + + // optional int64 update_time = 3; + private long updateTime_ ; + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public long getUpdateTime() { + return updateTime_; + } + public Builder setUpdateTime(long value) { + bitField0_ |= 0x00000004; + updateTime_ = value; + onChanged(); + return this; + } + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + updateTime_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesMeta) + } + + static { + defaultInstance = new TimeseriesMeta(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesMeta) + } + + public interface QueryTimeseriesMetaRequestOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string table_name = 1; + boolean hasTableName(); + String getTableName(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaQueryCondition condition = 2; + boolean hasCondition(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition getCondition(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryConditionOrBuilder getConditionOrBuilder(); + + // optional bool get_total_hit = 3; + boolean hasGetTotalHit(); + boolean getGetTotalHit(); + + // optional bytes token = 4; + boolean hasToken(); + com.google.protobuf.ByteString getToken(); + + // optional int32 limit = 5; + boolean hasLimit(); + int getLimit(); + } + public static final class QueryTimeseriesMetaRequest extends + com.google.protobuf.GeneratedMessage + implements QueryTimeseriesMetaRequestOrBuilder { + // Use QueryTimeseriesMetaRequest.newBuilder() to construct. + private QueryTimeseriesMetaRequest(Builder builder) { + super(builder); + } + private QueryTimeseriesMetaRequest(boolean noInit) {} + + private static final QueryTimeseriesMetaRequest defaultInstance; + public static QueryTimeseriesMetaRequest getDefaultInstance() { + return defaultInstance; + } + + public QueryTimeseriesMetaRequest getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_QueryTimeseriesMetaRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_QueryTimeseriesMetaRequest_fieldAccessorTable; + } + + private int bitField0_; + // required string table_name = 1; + public static final int TABLE_NAME_FIELD_NUMBER = 1; + private java.lang.Object tableName_; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + tableName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaQueryCondition condition = 2; + public static final int CONDITION_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition condition_; + public boolean hasCondition() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition getCondition() { + return condition_; + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryConditionOrBuilder getConditionOrBuilder() { + return condition_; + } + + // optional bool get_total_hit = 3; + public static final int GET_TOTAL_HIT_FIELD_NUMBER = 3; + private boolean getTotalHit_; + public boolean hasGetTotalHit() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public boolean getGetTotalHit() { + return getTotalHit_; + } + + // optional bytes token = 4; + public static final int TOKEN_FIELD_NUMBER = 4; + private com.google.protobuf.ByteString token_; + public boolean hasToken() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.google.protobuf.ByteString getToken() { + return token_; + } + + // optional int32 limit = 5; + public static final int LIMIT_FIELD_NUMBER = 5; + private int limit_; + public boolean hasLimit() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public int getLimit() { + return limit_; + } + + private void initFields() { + tableName_ = ""; + condition_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition.getDefaultInstance(); + getTotalHit_ = false; + token_ = com.google.protobuf.ByteString.EMPTY; + limit_ = 0; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasTableName()) { + memoizedIsInitialized = 0; + return false; + } + if (hasCondition()) { + if (!getCondition().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeMessage(2, condition_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeBool(3, getTotalHit_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeBytes(4, token_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeInt32(5, limit_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, condition_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, getTotalHit_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(4, token_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(5, limit_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaRequest prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_QueryTimeseriesMetaRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_QueryTimeseriesMetaRequest_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getConditionFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + tableName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + if (conditionBuilder_ == null) { + condition_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition.getDefaultInstance(); + } else { + conditionBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + getTotalHit_ = false; + bitField0_ = (bitField0_ & ~0x00000004); + token_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + limit_ = 0; + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaRequest.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaRequest.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaRequest build() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaRequest buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaRequest result = new com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.tableName_ = tableName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + if (conditionBuilder_ == null) { + result.condition_ = condition_; + } else { + result.condition_ = conditionBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.getTotalHit_ = getTotalHit_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.token_ = token_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + result.limit_ = limit_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaRequest.getDefaultInstance()) return this; + if (other.hasTableName()) { + setTableName(other.getTableName()); + } + if (other.hasCondition()) { + mergeCondition(other.getCondition()); + } + if (other.hasGetTotalHit()) { + setGetTotalHit(other.getGetTotalHit()); + } + if (other.hasToken()) { + setToken(other.getToken()); + } + if (other.hasLimit()) { + setLimit(other.getLimit()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasTableName()) { + + return false; + } + if (hasCondition()) { + if (!getCondition().isInitialized()) { + + return false; + } + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + tableName_ = input.readBytes(); + break; + } + case 18: { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition.newBuilder(); + if (hasCondition()) { + subBuilder.mergeFrom(getCondition()); + } + input.readMessage(subBuilder, extensionRegistry); + setCondition(subBuilder.buildPartial()); + break; + } + case 24: { + bitField0_ |= 0x00000004; + getTotalHit_ = input.readBool(); + break; + } + case 34: { + bitField0_ |= 0x00000008; + token_ = input.readBytes(); + break; + } + case 40: { + bitField0_ |= 0x00000010; + limit_ = input.readInt32(); + break; + } + } + } + } + + private int bitField0_; + + // required string table_name = 1; + private java.lang.Object tableName_ = ""; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + tableName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setTableName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + return this; + } + public Builder clearTableName() { + bitField0_ = (bitField0_ & ~0x00000001); + tableName_ = getDefaultInstance().getTableName(); + onChanged(); + return this; + } + void setTableName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaQueryCondition condition = 2; + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition condition_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryConditionOrBuilder> conditionBuilder_; + public boolean hasCondition() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition getCondition() { + if (conditionBuilder_ == null) { + return condition_; + } else { + return conditionBuilder_.getMessage(); + } + } + public Builder setCondition(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition value) { + if (conditionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + condition_ = value; + onChanged(); + } else { + conditionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder setCondition( + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition.Builder builderForValue) { + if (conditionBuilder_ == null) { + condition_ = builderForValue.build(); + onChanged(); + } else { + conditionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder mergeCondition(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition value) { + if (conditionBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002) && + condition_ != com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition.getDefaultInstance()) { + condition_ = + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition.newBuilder(condition_).mergeFrom(value).buildPartial(); + } else { + condition_ = value; + } + onChanged(); + } else { + conditionBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder clearCondition() { + if (conditionBuilder_ == null) { + condition_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition.getDefaultInstance(); + onChanged(); + } else { + conditionBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition.Builder getConditionBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getConditionFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryConditionOrBuilder getConditionOrBuilder() { + if (conditionBuilder_ != null) { + return conditionBuilder_.getMessageOrBuilder(); + } else { + return condition_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryConditionOrBuilder> + getConditionFieldBuilder() { + if (conditionBuilder_ == null) { + conditionBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryConditionOrBuilder>( + condition_, + getParentForChildren(), + isClean()); + condition_ = null; + } + return conditionBuilder_; + } + + // optional bool get_total_hit = 3; + private boolean getTotalHit_ ; + public boolean hasGetTotalHit() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public boolean getGetTotalHit() { + return getTotalHit_; + } + public Builder setGetTotalHit(boolean value) { + bitField0_ |= 0x00000004; + getTotalHit_ = value; + onChanged(); + return this; + } + public Builder clearGetTotalHit() { + bitField0_ = (bitField0_ & ~0x00000004); + getTotalHit_ = false; + onChanged(); + return this; + } + + // optional bytes token = 4; + private com.google.protobuf.ByteString token_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasToken() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public com.google.protobuf.ByteString getToken() { + return token_; + } + public Builder setToken(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + token_ = value; + onChanged(); + return this; + } + public Builder clearToken() { + bitField0_ = (bitField0_ & ~0x00000008); + token_ = getDefaultInstance().getToken(); + onChanged(); + return this; + } + + // optional int32 limit = 5; + private int limit_ ; + public boolean hasLimit() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public int getLimit() { + return limit_; + } + public Builder setLimit(int value) { + bitField0_ |= 0x00000010; + limit_ = value; + onChanged(); + return this; + } + public Builder clearLimit() { + bitField0_ = (bitField0_ & ~0x00000010); + limit_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.QueryTimeseriesMetaRequest) + } + + static { + defaultInstance = new QueryTimeseriesMetaRequest(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.QueryTimeseriesMetaRequest) + } + + public interface QueryTimeseriesMetaResponseOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // repeated .com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesMeta timeseries_metas = 1; + java.util.List + getTimeseriesMetasList(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta getTimeseriesMetas(int index); + int getTimeseriesMetasCount(); + java.util.List + getTimeseriesMetasOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMetaOrBuilder getTimeseriesMetasOrBuilder( + int index); + + // optional int64 total_hit = 2; + boolean hasTotalHit(); + long getTotalHit(); + + // optional bytes next_token = 3; + boolean hasNextToken(); + com.google.protobuf.ByteString getNextToken(); + } + public static final class QueryTimeseriesMetaResponse extends + com.google.protobuf.GeneratedMessage + implements QueryTimeseriesMetaResponseOrBuilder { + // Use QueryTimeseriesMetaResponse.newBuilder() to construct. + private QueryTimeseriesMetaResponse(Builder builder) { + super(builder); + } + private QueryTimeseriesMetaResponse(boolean noInit) {} + + private static final QueryTimeseriesMetaResponse defaultInstance; + public static QueryTimeseriesMetaResponse getDefaultInstance() { + return defaultInstance; + } + + public QueryTimeseriesMetaResponse getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_QueryTimeseriesMetaResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_QueryTimeseriesMetaResponse_fieldAccessorTable; + } + + private int bitField0_; + // repeated .com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesMeta timeseries_metas = 1; + public static final int TIMESERIES_METAS_FIELD_NUMBER = 1; + private java.util.List timeseriesMetas_; + public java.util.List getTimeseriesMetasList() { + return timeseriesMetas_; + } + public java.util.List + getTimeseriesMetasOrBuilderList() { + return timeseriesMetas_; + } + public int getTimeseriesMetasCount() { + return timeseriesMetas_.size(); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta getTimeseriesMetas(int index) { + return timeseriesMetas_.get(index); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMetaOrBuilder getTimeseriesMetasOrBuilder( + int index) { + return timeseriesMetas_.get(index); + } + + // optional int64 total_hit = 2; + public static final int TOTAL_HIT_FIELD_NUMBER = 2; + private long totalHit_; + public boolean hasTotalHit() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public long getTotalHit() { + return totalHit_; + } + + // optional bytes next_token = 3; + public static final int NEXT_TOKEN_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString nextToken_; + public boolean hasNextToken() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getNextToken() { + return nextToken_; + } + + private void initFields() { + timeseriesMetas_ = java.util.Collections.emptyList(); + totalHit_ = 0L; + nextToken_ = com.google.protobuf.ByteString.EMPTY; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + for (int i = 0; i < getTimeseriesMetasCount(); i++) { + if (!getTimeseriesMetas(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < timeseriesMetas_.size(); i++) { + output.writeMessage(1, timeseriesMetas_.get(i)); + } + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeInt64(2, totalHit_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(3, nextToken_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < timeseriesMetas_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, timeseriesMetas_.get(i)); + } + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, totalHit_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, nextToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaResponse prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_QueryTimeseriesMetaResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_QueryTimeseriesMetaResponse_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getTimeseriesMetasFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (timeseriesMetasBuilder_ == null) { + timeseriesMetas_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + timeseriesMetasBuilder_.clear(); + } + totalHit_ = 0L; + bitField0_ = (bitField0_ & ~0x00000002); + nextToken_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaResponse.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaResponse.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaResponse build() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaResponse buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaResponse result = new com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaResponse(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (timeseriesMetasBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + timeseriesMetas_ = java.util.Collections.unmodifiableList(timeseriesMetas_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.timeseriesMetas_ = timeseriesMetas_; + } else { + result.timeseriesMetas_ = timeseriesMetasBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000001; + } + result.totalHit_ = totalHit_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000002; + } + result.nextToken_ = nextToken_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaResponse.getDefaultInstance()) return this; + if (timeseriesMetasBuilder_ == null) { + if (!other.timeseriesMetas_.isEmpty()) { + if (timeseriesMetas_.isEmpty()) { + timeseriesMetas_ = other.timeseriesMetas_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTimeseriesMetasIsMutable(); + timeseriesMetas_.addAll(other.timeseriesMetas_); + } + onChanged(); + } + } else { + if (!other.timeseriesMetas_.isEmpty()) { + if (timeseriesMetasBuilder_.isEmpty()) { + timeseriesMetasBuilder_.dispose(); + timeseriesMetasBuilder_ = null; + timeseriesMetas_ = other.timeseriesMetas_; + bitField0_ = (bitField0_ & ~0x00000001); + timeseriesMetasBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getTimeseriesMetasFieldBuilder() : null; + } else { + timeseriesMetasBuilder_.addAllMessages(other.timeseriesMetas_); + } + } + } + if (other.hasTotalHit()) { + setTotalHit(other.getTotalHit()); + } + if (other.hasNextToken()) { + setNextToken(other.getNextToken()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + for (int i = 0; i < getTimeseriesMetasCount(); i++) { + if (!getTimeseriesMetas(i).isInitialized()) { + + return false; + } + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addTimeseriesMetas(subBuilder.buildPartial()); + break; + } + case 16: { + bitField0_ |= 0x00000002; + totalHit_ = input.readInt64(); + break; + } + case 26: { + bitField0_ |= 0x00000004; + nextToken_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // repeated .com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesMeta timeseries_metas = 1; + private java.util.List timeseriesMetas_ = + java.util.Collections.emptyList(); + private void ensureTimeseriesMetasIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + timeseriesMetas_ = new java.util.ArrayList(timeseriesMetas_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMetaOrBuilder> timeseriesMetasBuilder_; + + public java.util.List getTimeseriesMetasList() { + if (timeseriesMetasBuilder_ == null) { + return java.util.Collections.unmodifiableList(timeseriesMetas_); + } else { + return timeseriesMetasBuilder_.getMessageList(); + } + } + public int getTimeseriesMetasCount() { + if (timeseriesMetasBuilder_ == null) { + return timeseriesMetas_.size(); + } else { + return timeseriesMetasBuilder_.getCount(); + } + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta getTimeseriesMetas(int index) { + if (timeseriesMetasBuilder_ == null) { + return timeseriesMetas_.get(index); + } else { + return timeseriesMetasBuilder_.getMessage(index); + } + } + public Builder setTimeseriesMetas( + int index, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta value) { + if (timeseriesMetasBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTimeseriesMetasIsMutable(); + timeseriesMetas_.set(index, value); + onChanged(); + } else { + timeseriesMetasBuilder_.setMessage(index, value); + } + return this; + } + public Builder setTimeseriesMetas( + int index, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta.Builder builderForValue) { + if (timeseriesMetasBuilder_ == null) { + ensureTimeseriesMetasIsMutable(); + timeseriesMetas_.set(index, builderForValue.build()); + onChanged(); + } else { + timeseriesMetasBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + public Builder addTimeseriesMetas(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta value) { + if (timeseriesMetasBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTimeseriesMetasIsMutable(); + timeseriesMetas_.add(value); + onChanged(); + } else { + timeseriesMetasBuilder_.addMessage(value); + } + return this; + } + public Builder addTimeseriesMetas( + int index, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta value) { + if (timeseriesMetasBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTimeseriesMetasIsMutable(); + timeseriesMetas_.add(index, value); + onChanged(); + } else { + timeseriesMetasBuilder_.addMessage(index, value); + } + return this; + } + public Builder addTimeseriesMetas( + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta.Builder builderForValue) { + if (timeseriesMetasBuilder_ == null) { + ensureTimeseriesMetasIsMutable(); + timeseriesMetas_.add(builderForValue.build()); + onChanged(); + } else { + timeseriesMetasBuilder_.addMessage(builderForValue.build()); + } + return this; + } + public Builder addTimeseriesMetas( + int index, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta.Builder builderForValue) { + if (timeseriesMetasBuilder_ == null) { + ensureTimeseriesMetasIsMutable(); + timeseriesMetas_.add(index, builderForValue.build()); + onChanged(); + } else { + timeseriesMetasBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAllTimeseriesMetas( + java.lang.Iterable values) { + if (timeseriesMetasBuilder_ == null) { + ensureTimeseriesMetasIsMutable(); + super.addAll(values, timeseriesMetas_); + onChanged(); + } else { + timeseriesMetasBuilder_.addAllMessages(values); + } + return this; + } + public Builder clearTimeseriesMetas() { + if (timeseriesMetasBuilder_ == null) { + timeseriesMetas_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + timeseriesMetasBuilder_.clear(); + } + return this; + } + public Builder removeTimeseriesMetas(int index) { + if (timeseriesMetasBuilder_ == null) { + ensureTimeseriesMetasIsMutable(); + timeseriesMetas_.remove(index); + onChanged(); + } else { + timeseriesMetasBuilder_.remove(index); + } + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta.Builder getTimeseriesMetasBuilder( + int index) { + return getTimeseriesMetasFieldBuilder().getBuilder(index); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMetaOrBuilder getTimeseriesMetasOrBuilder( + int index) { + if (timeseriesMetasBuilder_ == null) { + return timeseriesMetas_.get(index); } else { + return timeseriesMetasBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getTimeseriesMetasOrBuilderList() { + if (timeseriesMetasBuilder_ != null) { + return timeseriesMetasBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(timeseriesMetas_); + } + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta.Builder addTimeseriesMetasBuilder() { + return getTimeseriesMetasFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta.getDefaultInstance()); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta.Builder addTimeseriesMetasBuilder( + int index) { + return getTimeseriesMetasFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta.getDefaultInstance()); + } + public java.util.List + getTimeseriesMetasBuilderList() { + return getTimeseriesMetasFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMetaOrBuilder> + getTimeseriesMetasFieldBuilder() { + if (timeseriesMetasBuilder_ == null) { + timeseriesMetasBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMetaOrBuilder>( + timeseriesMetas_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + timeseriesMetas_ = null; + } + return timeseriesMetasBuilder_; + } + + // optional int64 total_hit = 2; + private long totalHit_ ; + public boolean hasTotalHit() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public long getTotalHit() { + return totalHit_; + } + public Builder setTotalHit(long value) { + bitField0_ |= 0x00000002; + totalHit_ = value; + onChanged(); + return this; + } + public Builder clearTotalHit() { + bitField0_ = (bitField0_ & ~0x00000002); + totalHit_ = 0L; + onChanged(); + return this; + } + + // optional bytes next_token = 3; + private com.google.protobuf.ByteString nextToken_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasNextToken() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.google.protobuf.ByteString getNextToken() { + return nextToken_; + } + public Builder setNextToken(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + nextToken_ = value; + onChanged(); + return this; + } + public Builder clearNextToken() { + bitField0_ = (bitField0_ & ~0x00000004); + nextToken_ = getDefaultInstance().getNextToken(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.QueryTimeseriesMetaResponse) + } + + static { + defaultInstance = new QueryTimeseriesMetaResponse(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.QueryTimeseriesMetaResponse) + } + + public interface TimeseriesRowsOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required .com.alicloud.openservices.tablestore.core.protocol.timeseries.RowsSerializeType type = 1; + boolean hasType(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.RowsSerializeType getType(); + + // required bytes rows_data = 2; + boolean hasRowsData(); + com.google.protobuf.ByteString getRowsData(); + + // optional int32 flatbuffer_crc32c = 3; + boolean hasFlatbufferCrc32C(); + int getFlatbufferCrc32C(); + } + public static final class TimeseriesRows extends + com.google.protobuf.GeneratedMessage + implements TimeseriesRowsOrBuilder { + // Use TimeseriesRows.newBuilder() to construct. + private TimeseriesRows(Builder builder) { + super(builder); + } + private TimeseriesRows(boolean noInit) {} + + private static final TimeseriesRows defaultInstance; + public static TimeseriesRows getDefaultInstance() { + return defaultInstance; + } + + public TimeseriesRows getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesRows_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesRows_fieldAccessorTable; + } + + private int bitField0_; + // required .com.alicloud.openservices.tablestore.core.protocol.timeseries.RowsSerializeType type = 1; + public static final int TYPE_FIELD_NUMBER = 1; + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.RowsSerializeType type_; + public boolean hasType() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.RowsSerializeType getType() { + return type_; + } + + // required bytes rows_data = 2; + public static final int ROWS_DATA_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString rowsData_; + public boolean hasRowsData() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getRowsData() { + return rowsData_; + } + + // optional int32 flatbuffer_crc32c = 3; + public static final int FLATBUFFER_CRC32C_FIELD_NUMBER = 3; + private int flatbufferCrc32C_; + public boolean hasFlatbufferCrc32C() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public int getFlatbufferCrc32C() { + return flatbufferCrc32C_; + } + + private void initFields() { + type_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.RowsSerializeType.RST_FLAT_BUFFER; + rowsData_ = com.google.protobuf.ByteString.EMPTY; + flatbufferCrc32C_ = 0; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasType()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasRowsData()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeEnum(1, type_.getNumber()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, rowsData_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeInt32(3, flatbufferCrc32C_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, type_.getNumber()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, rowsData_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, flatbufferCrc32C_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRowsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesRows_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesRows_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + type_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.RowsSerializeType.RST_FLAT_BUFFER; + bitField0_ = (bitField0_ & ~0x00000001); + rowsData_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + flatbufferCrc32C_ = 0; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows build() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows result = new com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.type_ = type_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.rowsData_ = rowsData_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.flatbufferCrc32C_ = flatbufferCrc32C_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows.getDefaultInstance()) return this; + if (other.hasType()) { + setType(other.getType()); + } + if (other.hasRowsData()) { + setRowsData(other.getRowsData()); + } + if (other.hasFlatbufferCrc32C()) { + setFlatbufferCrc32C(other.getFlatbufferCrc32C()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasType()) { + + return false; + } + if (!hasRowsData()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.RowsSerializeType value = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.RowsSerializeType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + type_ = value; + } + break; + } + case 18: { + bitField0_ |= 0x00000002; + rowsData_ = input.readBytes(); + break; + } + case 24: { + bitField0_ |= 0x00000004; + flatbufferCrc32C_ = input.readInt32(); + break; + } + } + } + } + + private int bitField0_; + + // required .com.alicloud.openservices.tablestore.core.protocol.timeseries.RowsSerializeType type = 1; + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.RowsSerializeType type_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.RowsSerializeType.RST_FLAT_BUFFER; + public boolean hasType() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.RowsSerializeType getType() { + return type_; + } + public Builder setType(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.RowsSerializeType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + type_ = value; + onChanged(); + return this; + } + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000001); + type_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.RowsSerializeType.RST_FLAT_BUFFER; + onChanged(); + return this; + } + + // required bytes rows_data = 2; + private com.google.protobuf.ByteString rowsData_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasRowsData() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getRowsData() { + return rowsData_; + } + public Builder setRowsData(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + rowsData_ = value; + onChanged(); + return this; + } + public Builder clearRowsData() { + bitField0_ = (bitField0_ & ~0x00000002); + rowsData_ = getDefaultInstance().getRowsData(); + onChanged(); + return this; + } + + // optional int32 flatbuffer_crc32c = 3; + private int flatbufferCrc32C_ ; + public boolean hasFlatbufferCrc32C() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public int getFlatbufferCrc32C() { + return flatbufferCrc32C_; + } + public Builder setFlatbufferCrc32C(int value) { + bitField0_ |= 0x00000004; + flatbufferCrc32C_ = value; + onChanged(); + return this; + } + public Builder clearFlatbufferCrc32C() { + bitField0_ = (bitField0_ & ~0x00000004); + flatbufferCrc32C_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesRows) + } + + static { + defaultInstance = new TimeseriesRows(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesRows) + } + + public interface PutTimeseriesDataRequestOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string table_name = 1; + boolean hasTableName(); + String getTableName(); + + // required .com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesRows rows_data = 2; + boolean hasRowsData(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows getRowsData(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRowsOrBuilder getRowsDataOrBuilder(); + + // optional .com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaUpdateMode meta_update_mode = 3; + boolean hasMetaUpdateMode(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateMode getMetaUpdateMode(); + } + public static final class PutTimeseriesDataRequest extends + com.google.protobuf.GeneratedMessage + implements PutTimeseriesDataRequestOrBuilder { + // Use PutTimeseriesDataRequest.newBuilder() to construct. + private PutTimeseriesDataRequest(Builder builder) { + super(builder); + } + private PutTimeseriesDataRequest(boolean noInit) {} + + private static final PutTimeseriesDataRequest defaultInstance; + public static PutTimeseriesDataRequest getDefaultInstance() { + return defaultInstance; + } + + public PutTimeseriesDataRequest getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_PutTimeseriesDataRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_PutTimeseriesDataRequest_fieldAccessorTable; + } + + private int bitField0_; + // required string table_name = 1; + public static final int TABLE_NAME_FIELD_NUMBER = 1; + private java.lang.Object tableName_; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + tableName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // required .com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesRows rows_data = 2; + public static final int ROWS_DATA_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows rowsData_; + public boolean hasRowsData() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows getRowsData() { + return rowsData_; + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRowsOrBuilder getRowsDataOrBuilder() { + return rowsData_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaUpdateMode meta_update_mode = 3; + public static final int META_UPDATE_MODE_FIELD_NUMBER = 3; + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateMode metaUpdateMode_; + public boolean hasMetaUpdateMode() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateMode getMetaUpdateMode() { + return metaUpdateMode_; + } + + private void initFields() { + tableName_ = ""; + rowsData_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows.getDefaultInstance(); + metaUpdateMode_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateMode.MUM_NORMAL; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasTableName()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasRowsData()) { + memoizedIsInitialized = 0; + return false; + } + if (!getRowsData().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeMessage(2, rowsData_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeEnum(3, metaUpdateMode_.getNumber()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, rowsData_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, metaUpdateMode_.getNumber()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataRequest prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_PutTimeseriesDataRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_PutTimeseriesDataRequest_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getRowsDataFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + tableName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + if (rowsDataBuilder_ == null) { + rowsData_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows.getDefaultInstance(); + } else { + rowsDataBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + metaUpdateMode_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateMode.MUM_NORMAL; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataRequest.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataRequest.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataRequest build() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataRequest buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataRequest result = new com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.tableName_ = tableName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + if (rowsDataBuilder_ == null) { + result.rowsData_ = rowsData_; + } else { + result.rowsData_ = rowsDataBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.metaUpdateMode_ = metaUpdateMode_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataRequest.getDefaultInstance()) return this; + if (other.hasTableName()) { + setTableName(other.getTableName()); + } + if (other.hasRowsData()) { + mergeRowsData(other.getRowsData()); + } + if (other.hasMetaUpdateMode()) { + setMetaUpdateMode(other.getMetaUpdateMode()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasTableName()) { + + return false; + } + if (!hasRowsData()) { + + return false; + } + if (!getRowsData().isInitialized()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + tableName_ = input.readBytes(); + break; + } + case 18: { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows.newBuilder(); + if (hasRowsData()) { + subBuilder.mergeFrom(getRowsData()); + } + input.readMessage(subBuilder, extensionRegistry); + setRowsData(subBuilder.buildPartial()); + break; + } + case 24: { + int rawValue = input.readEnum(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateMode value = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateMode.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(3, rawValue); + } else { + bitField0_ |= 0x00000004; + metaUpdateMode_ = value; + } + break; + } + } + } + } + + private int bitField0_; + + // required string table_name = 1; + private java.lang.Object tableName_ = ""; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + tableName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setTableName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + return this; + } + public Builder clearTableName() { + bitField0_ = (bitField0_ & ~0x00000001); + tableName_ = getDefaultInstance().getTableName(); + onChanged(); + return this; + } + void setTableName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + } + + // required .com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesRows rows_data = 2; + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows rowsData_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRowsOrBuilder> rowsDataBuilder_; + public boolean hasRowsData() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows getRowsData() { + if (rowsDataBuilder_ == null) { + return rowsData_; + } else { + return rowsDataBuilder_.getMessage(); + } + } + public Builder setRowsData(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows value) { + if (rowsDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rowsData_ = value; + onChanged(); + } else { + rowsDataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder setRowsData( + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows.Builder builderForValue) { + if (rowsDataBuilder_ == null) { + rowsData_ = builderForValue.build(); + onChanged(); + } else { + rowsDataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder mergeRowsData(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows value) { + if (rowsDataBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002) && + rowsData_ != com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows.getDefaultInstance()) { + rowsData_ = + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows.newBuilder(rowsData_).mergeFrom(value).buildPartial(); + } else { + rowsData_ = value; + } + onChanged(); + } else { + rowsDataBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder clearRowsData() { + if (rowsDataBuilder_ == null) { + rowsData_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows.getDefaultInstance(); + onChanged(); + } else { + rowsDataBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows.Builder getRowsDataBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getRowsDataFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRowsOrBuilder getRowsDataOrBuilder() { + if (rowsDataBuilder_ != null) { + return rowsDataBuilder_.getMessageOrBuilder(); + } else { + return rowsData_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRowsOrBuilder> + getRowsDataFieldBuilder() { + if (rowsDataBuilder_ == null) { + rowsDataBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRowsOrBuilder>( + rowsData_, + getParentForChildren(), + isClean()); + rowsData_ = null; + } + return rowsDataBuilder_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaUpdateMode meta_update_mode = 3; + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateMode metaUpdateMode_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateMode.MUM_NORMAL; + public boolean hasMetaUpdateMode() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateMode getMetaUpdateMode() { + return metaUpdateMode_; + } + public Builder setMetaUpdateMode(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateMode value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + metaUpdateMode_ = value; + onChanged(); + return this; + } + public Builder clearMetaUpdateMode() { + bitField0_ = (bitField0_ & ~0x00000004); + metaUpdateMode_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateMode.MUM_NORMAL; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.PutTimeseriesDataRequest) + } + + static { + defaultInstance = new PutTimeseriesDataRequest(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.PutTimeseriesDataRequest) + } + + public interface FailedRowInfoOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required int32 row_index = 1; + boolean hasRowIndex(); + int getRowIndex(); + + // optional string error_code = 2; + boolean hasErrorCode(); + String getErrorCode(); + + // optional string error_message = 3; + boolean hasErrorMessage(); + String getErrorMessage(); + } + public static final class FailedRowInfo extends + com.google.protobuf.GeneratedMessage + implements FailedRowInfoOrBuilder { + // Use FailedRowInfo.newBuilder() to construct. + private FailedRowInfo(Builder builder) { + super(builder); + } + private FailedRowInfo(boolean noInit) {} + + private static final FailedRowInfo defaultInstance; + public static FailedRowInfo getDefaultInstance() { + return defaultInstance; + } + + public FailedRowInfo getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_FailedRowInfo_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_FailedRowInfo_fieldAccessorTable; + } + + private int bitField0_; + // required int32 row_index = 1; + public static final int ROW_INDEX_FIELD_NUMBER = 1; + private int rowIndex_; + public boolean hasRowIndex() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public int getRowIndex() { + return rowIndex_; + } + + // optional string error_code = 2; + public static final int ERROR_CODE_FIELD_NUMBER = 2; + private java.lang.Object errorCode_; + public boolean hasErrorCode() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getErrorCode() { + java.lang.Object ref = errorCode_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + errorCode_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getErrorCodeBytes() { + java.lang.Object ref = errorCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + errorCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional string error_message = 3; + public static final int ERROR_MESSAGE_FIELD_NUMBER = 3; + private java.lang.Object errorMessage_; + public boolean hasErrorMessage() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public String getErrorMessage() { + java.lang.Object ref = errorMessage_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + errorMessage_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getErrorMessageBytes() { + java.lang.Object ref = errorMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + errorMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + rowIndex_ = 0; + errorCode_ = ""; + errorMessage_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasRowIndex()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeInt32(1, rowIndex_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getErrorCodeBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeBytes(3, getErrorMessageBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, rowIndex_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getErrorCodeBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, getErrorMessageBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_FailedRowInfo_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_FailedRowInfo_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + rowIndex_ = 0; + bitField0_ = (bitField0_ & ~0x00000001); + errorCode_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + errorMessage_ = ""; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo build() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo result = new com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.rowIndex_ = rowIndex_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.errorCode_ = errorCode_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.errorMessage_ = errorMessage_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo.getDefaultInstance()) return this; + if (other.hasRowIndex()) { + setRowIndex(other.getRowIndex()); + } + if (other.hasErrorCode()) { + setErrorCode(other.getErrorCode()); + } + if (other.hasErrorMessage()) { + setErrorMessage(other.getErrorMessage()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasRowIndex()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + rowIndex_ = input.readInt32(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + errorCode_ = input.readBytes(); + break; + } + case 26: { + bitField0_ |= 0x00000004; + errorMessage_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // required int32 row_index = 1; + private int rowIndex_ ; + public boolean hasRowIndex() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public int getRowIndex() { + return rowIndex_; + } + public Builder setRowIndex(int value) { + bitField0_ |= 0x00000001; + rowIndex_ = value; + onChanged(); + return this; + } + public Builder clearRowIndex() { + bitField0_ = (bitField0_ & ~0x00000001); + rowIndex_ = 0; + onChanged(); + return this; + } + + // optional string error_code = 2; + private java.lang.Object errorCode_ = ""; + public boolean hasErrorCode() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public String getErrorCode() { + java.lang.Object ref = errorCode_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + errorCode_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setErrorCode(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + errorCode_ = value; + onChanged(); + return this; + } + public Builder clearErrorCode() { + bitField0_ = (bitField0_ & ~0x00000002); + errorCode_ = getDefaultInstance().getErrorCode(); + onChanged(); + return this; + } + void setErrorCode(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000002; + errorCode_ = value; + onChanged(); + } + + // optional string error_message = 3; + private java.lang.Object errorMessage_ = ""; + public boolean hasErrorMessage() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public String getErrorMessage() { + java.lang.Object ref = errorMessage_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + errorMessage_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setErrorMessage(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + errorMessage_ = value; + onChanged(); + return this; + } + public Builder clearErrorMessage() { + bitField0_ = (bitField0_ & ~0x00000004); + errorMessage_ = getDefaultInstance().getErrorMessage(); + onChanged(); + return this; + } + void setErrorMessage(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000004; + errorMessage_ = value; + onChanged(); + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.FailedRowInfo) + } + + static { + defaultInstance = new FailedRowInfo(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.FailedRowInfo) + } + + public interface MetaUpdateStatusOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // repeated uint32 row_ids = 1; + java.util.List getRowIdsList(); + int getRowIdsCount(); + int getRowIds(int index); + + // repeated uint32 meta_update_times = 2; + java.util.List getMetaUpdateTimesList(); + int getMetaUpdateTimesCount(); + int getMetaUpdateTimes(int index); + } + public static final class MetaUpdateStatus extends + com.google.protobuf.GeneratedMessage + implements MetaUpdateStatusOrBuilder { + // Use MetaUpdateStatus.newBuilder() to construct. + private MetaUpdateStatus(Builder builder) { + super(builder); + } + private MetaUpdateStatus(boolean noInit) {} + + private static final MetaUpdateStatus defaultInstance; + public static MetaUpdateStatus getDefaultInstance() { + return defaultInstance; + } + + public MetaUpdateStatus getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaUpdateStatus_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaUpdateStatus_fieldAccessorTable; + } + + // repeated uint32 row_ids = 1; + public static final int ROW_IDS_FIELD_NUMBER = 1; + private java.util.List rowIds_; + public java.util.List + getRowIdsList() { + return rowIds_; + } + public int getRowIdsCount() { + return rowIds_.size(); + } + public int getRowIds(int index) { + return rowIds_.get(index); + } + + // repeated uint32 meta_update_times = 2; + public static final int META_UPDATE_TIMES_FIELD_NUMBER = 2; + private java.util.List metaUpdateTimes_; + public java.util.List + getMetaUpdateTimesList() { + return metaUpdateTimes_; + } + public int getMetaUpdateTimesCount() { + return metaUpdateTimes_.size(); + } + public int getMetaUpdateTimes(int index) { + return metaUpdateTimes_.get(index); + } + + private void initFields() { + rowIds_ = java.util.Collections.emptyList();; + metaUpdateTimes_ = java.util.Collections.emptyList();; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < rowIds_.size(); i++) { + output.writeUInt32(1, rowIds_.get(i)); + } + for (int i = 0; i < metaUpdateTimes_.size(); i++) { + output.writeUInt32(2, metaUpdateTimes_.get(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < rowIds_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeUInt32SizeNoTag(rowIds_.get(i)); + } + size += dataSize; + size += 1 * getRowIdsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < metaUpdateTimes_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeUInt32SizeNoTag(metaUpdateTimes_.get(i)); + } + size += dataSize; + size += 1 * getMetaUpdateTimesList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatusOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaUpdateStatus_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaUpdateStatus_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + rowIds_ = java.util.Collections.emptyList();; + bitField0_ = (bitField0_ & ~0x00000001); + metaUpdateTimes_ = java.util.Collections.emptyList();; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus build() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus result = new com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + rowIds_ = java.util.Collections.unmodifiableList(rowIds_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.rowIds_ = rowIds_; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + metaUpdateTimes_ = java.util.Collections.unmodifiableList(metaUpdateTimes_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.metaUpdateTimes_ = metaUpdateTimes_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus.getDefaultInstance()) return this; + if (!other.rowIds_.isEmpty()) { + if (rowIds_.isEmpty()) { + rowIds_ = other.rowIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRowIdsIsMutable(); + rowIds_.addAll(other.rowIds_); + } + onChanged(); + } + if (!other.metaUpdateTimes_.isEmpty()) { + if (metaUpdateTimes_.isEmpty()) { + metaUpdateTimes_ = other.metaUpdateTimes_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureMetaUpdateTimesIsMutable(); + metaUpdateTimes_.addAll(other.metaUpdateTimes_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 8: { + ensureRowIdsIsMutable(); + rowIds_.add(input.readUInt32()); + break; + } + case 10: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + addRowIds(input.readUInt32()); + } + input.popLimit(limit); + break; + } + case 16: { + ensureMetaUpdateTimesIsMutable(); + metaUpdateTimes_.add(input.readUInt32()); + break; + } + case 18: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + addMetaUpdateTimes(input.readUInt32()); + } + input.popLimit(limit); + break; + } + } + } + } + + private int bitField0_; + + // repeated uint32 row_ids = 1; + private java.util.List rowIds_ = java.util.Collections.emptyList();; + private void ensureRowIdsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + rowIds_ = new java.util.ArrayList(rowIds_); + bitField0_ |= 0x00000001; + } + } + public java.util.List + getRowIdsList() { + return java.util.Collections.unmodifiableList(rowIds_); + } + public int getRowIdsCount() { + return rowIds_.size(); + } + public int getRowIds(int index) { + return rowIds_.get(index); + } + public Builder setRowIds( + int index, int value) { + ensureRowIdsIsMutable(); + rowIds_.set(index, value); + onChanged(); + return this; + } + public Builder addRowIds(int value) { + ensureRowIdsIsMutable(); + rowIds_.add(value); + onChanged(); + return this; + } + public Builder addAllRowIds( + java.lang.Iterable values) { + ensureRowIdsIsMutable(); + super.addAll(values, rowIds_); + onChanged(); + return this; + } + public Builder clearRowIds() { + rowIds_ = java.util.Collections.emptyList();; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + // repeated uint32 meta_update_times = 2; + private java.util.List metaUpdateTimes_ = java.util.Collections.emptyList();; + private void ensureMetaUpdateTimesIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + metaUpdateTimes_ = new java.util.ArrayList(metaUpdateTimes_); + bitField0_ |= 0x00000002; + } + } + public java.util.List + getMetaUpdateTimesList() { + return java.util.Collections.unmodifiableList(metaUpdateTimes_); + } + public int getMetaUpdateTimesCount() { + return metaUpdateTimes_.size(); + } + public int getMetaUpdateTimes(int index) { + return metaUpdateTimes_.get(index); + } + public Builder setMetaUpdateTimes( + int index, int value) { + ensureMetaUpdateTimesIsMutable(); + metaUpdateTimes_.set(index, value); + onChanged(); + return this; + } + public Builder addMetaUpdateTimes(int value) { + ensureMetaUpdateTimesIsMutable(); + metaUpdateTimes_.add(value); + onChanged(); + return this; + } + public Builder addAllMetaUpdateTimes( + java.lang.Iterable values) { + ensureMetaUpdateTimesIsMutable(); + super.addAll(values, metaUpdateTimes_); + onChanged(); + return this; + } + public Builder clearMetaUpdateTimes() { + metaUpdateTimes_ = java.util.Collections.emptyList();; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaUpdateStatus) + } + + static { + defaultInstance = new MetaUpdateStatus(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaUpdateStatus) + } + + public interface PutTimeseriesDataResponseOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // repeated .com.alicloud.openservices.tablestore.core.protocol.timeseries.FailedRowInfo failed_rows = 1; + java.util.List + getFailedRowsList(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo getFailedRows(int index); + int getFailedRowsCount(); + java.util.List + getFailedRowsOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfoOrBuilder getFailedRowsOrBuilder( + int index); + + // optional .com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaUpdateStatus meta_update_status = 2; + boolean hasMetaUpdateStatus(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus getMetaUpdateStatus(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatusOrBuilder getMetaUpdateStatusOrBuilder(); + } + public static final class PutTimeseriesDataResponse extends + com.google.protobuf.GeneratedMessage + implements PutTimeseriesDataResponseOrBuilder { + // Use PutTimeseriesDataResponse.newBuilder() to construct. + private PutTimeseriesDataResponse(Builder builder) { + super(builder); + } + private PutTimeseriesDataResponse(boolean noInit) {} + + private static final PutTimeseriesDataResponse defaultInstance; + public static PutTimeseriesDataResponse getDefaultInstance() { + return defaultInstance; + } + + public PutTimeseriesDataResponse getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_PutTimeseriesDataResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_PutTimeseriesDataResponse_fieldAccessorTable; + } + + private int bitField0_; + // repeated .com.alicloud.openservices.tablestore.core.protocol.timeseries.FailedRowInfo failed_rows = 1; + public static final int FAILED_ROWS_FIELD_NUMBER = 1; + private java.util.List failedRows_; + public java.util.List getFailedRowsList() { + return failedRows_; + } + public java.util.List + getFailedRowsOrBuilderList() { + return failedRows_; + } + public int getFailedRowsCount() { + return failedRows_.size(); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo getFailedRows(int index) { + return failedRows_.get(index); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfoOrBuilder getFailedRowsOrBuilder( + int index) { + return failedRows_.get(index); + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaUpdateStatus meta_update_status = 2; + public static final int META_UPDATE_STATUS_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus metaUpdateStatus_; + public boolean hasMetaUpdateStatus() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus getMetaUpdateStatus() { + return metaUpdateStatus_; + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatusOrBuilder getMetaUpdateStatusOrBuilder() { + return metaUpdateStatus_; + } + + private void initFields() { + failedRows_ = java.util.Collections.emptyList(); + metaUpdateStatus_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + for (int i = 0; i < getFailedRowsCount(); i++) { + if (!getFailedRows(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < failedRows_.size(); i++) { + output.writeMessage(1, failedRows_.get(i)); + } + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(2, metaUpdateStatus_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < failedRows_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, failedRows_.get(i)); + } + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, metaUpdateStatus_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataResponse prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_PutTimeseriesDataResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_PutTimeseriesDataResponse_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getFailedRowsFieldBuilder(); + getMetaUpdateStatusFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (failedRowsBuilder_ == null) { + failedRows_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + failedRowsBuilder_.clear(); + } + if (metaUpdateStatusBuilder_ == null) { + metaUpdateStatus_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus.getDefaultInstance(); + } else { + metaUpdateStatusBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataResponse.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataResponse.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataResponse build() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataResponse buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataResponse result = new com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataResponse(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (failedRowsBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + failedRows_ = java.util.Collections.unmodifiableList(failedRows_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.failedRows_ = failedRows_; + } else { + result.failedRows_ = failedRowsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000001; + } + if (metaUpdateStatusBuilder_ == null) { + result.metaUpdateStatus_ = metaUpdateStatus_; + } else { + result.metaUpdateStatus_ = metaUpdateStatusBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataResponse.getDefaultInstance()) return this; + if (failedRowsBuilder_ == null) { + if (!other.failedRows_.isEmpty()) { + if (failedRows_.isEmpty()) { + failedRows_ = other.failedRows_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFailedRowsIsMutable(); + failedRows_.addAll(other.failedRows_); + } + onChanged(); + } + } else { + if (!other.failedRows_.isEmpty()) { + if (failedRowsBuilder_.isEmpty()) { + failedRowsBuilder_.dispose(); + failedRowsBuilder_ = null; + failedRows_ = other.failedRows_; + bitField0_ = (bitField0_ & ~0x00000001); + failedRowsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getFailedRowsFieldBuilder() : null; + } else { + failedRowsBuilder_.addAllMessages(other.failedRows_); + } + } + } + if (other.hasMetaUpdateStatus()) { + mergeMetaUpdateStatus(other.getMetaUpdateStatus()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + for (int i = 0; i < getFailedRowsCount(); i++) { + if (!getFailedRows(i).isInitialized()) { + + return false; + } + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addFailedRows(subBuilder.buildPartial()); + break; + } + case 18: { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus.newBuilder(); + if (hasMetaUpdateStatus()) { + subBuilder.mergeFrom(getMetaUpdateStatus()); + } + input.readMessage(subBuilder, extensionRegistry); + setMetaUpdateStatus(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // repeated .com.alicloud.openservices.tablestore.core.protocol.timeseries.FailedRowInfo failed_rows = 1; + private java.util.List failedRows_ = + java.util.Collections.emptyList(); + private void ensureFailedRowsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + failedRows_ = new java.util.ArrayList(failedRows_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfoOrBuilder> failedRowsBuilder_; + + public java.util.List getFailedRowsList() { + if (failedRowsBuilder_ == null) { + return java.util.Collections.unmodifiableList(failedRows_); + } else { + return failedRowsBuilder_.getMessageList(); + } + } + public int getFailedRowsCount() { + if (failedRowsBuilder_ == null) { + return failedRows_.size(); + } else { + return failedRowsBuilder_.getCount(); + } + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo getFailedRows(int index) { + if (failedRowsBuilder_ == null) { + return failedRows_.get(index); + } else { + return failedRowsBuilder_.getMessage(index); + } + } + public Builder setFailedRows( + int index, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo value) { + if (failedRowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFailedRowsIsMutable(); + failedRows_.set(index, value); + onChanged(); + } else { + failedRowsBuilder_.setMessage(index, value); + } + return this; + } + public Builder setFailedRows( + int index, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo.Builder builderForValue) { + if (failedRowsBuilder_ == null) { + ensureFailedRowsIsMutable(); + failedRows_.set(index, builderForValue.build()); + onChanged(); + } else { + failedRowsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + public Builder addFailedRows(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo value) { + if (failedRowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFailedRowsIsMutable(); + failedRows_.add(value); + onChanged(); + } else { + failedRowsBuilder_.addMessage(value); + } + return this; + } + public Builder addFailedRows( + int index, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo value) { + if (failedRowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFailedRowsIsMutable(); + failedRows_.add(index, value); + onChanged(); + } else { + failedRowsBuilder_.addMessage(index, value); + } + return this; + } + public Builder addFailedRows( + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo.Builder builderForValue) { + if (failedRowsBuilder_ == null) { + ensureFailedRowsIsMutable(); + failedRows_.add(builderForValue.build()); + onChanged(); + } else { + failedRowsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + public Builder addFailedRows( + int index, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo.Builder builderForValue) { + if (failedRowsBuilder_ == null) { + ensureFailedRowsIsMutable(); + failedRows_.add(index, builderForValue.build()); + onChanged(); + } else { + failedRowsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAllFailedRows( + java.lang.Iterable values) { + if (failedRowsBuilder_ == null) { + ensureFailedRowsIsMutable(); + super.addAll(values, failedRows_); + onChanged(); + } else { + failedRowsBuilder_.addAllMessages(values); + } + return this; + } + public Builder clearFailedRows() { + if (failedRowsBuilder_ == null) { + failedRows_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + failedRowsBuilder_.clear(); + } + return this; + } + public Builder removeFailedRows(int index) { + if (failedRowsBuilder_ == null) { + ensureFailedRowsIsMutable(); + failedRows_.remove(index); + onChanged(); + } else { + failedRowsBuilder_.remove(index); + } + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo.Builder getFailedRowsBuilder( + int index) { + return getFailedRowsFieldBuilder().getBuilder(index); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfoOrBuilder getFailedRowsOrBuilder( + int index) { + if (failedRowsBuilder_ == null) { + return failedRows_.get(index); } else { + return failedRowsBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getFailedRowsOrBuilderList() { + if (failedRowsBuilder_ != null) { + return failedRowsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(failedRows_); + } + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo.Builder addFailedRowsBuilder() { + return getFailedRowsFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo.getDefaultInstance()); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo.Builder addFailedRowsBuilder( + int index) { + return getFailedRowsFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo.getDefaultInstance()); + } + public java.util.List + getFailedRowsBuilderList() { + return getFailedRowsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfoOrBuilder> + getFailedRowsFieldBuilder() { + if (failedRowsBuilder_ == null) { + failedRowsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfoOrBuilder>( + failedRows_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + failedRows_ = null; + } + return failedRowsBuilder_; + } + + // optional .com.alicloud.openservices.tablestore.core.protocol.timeseries.MetaUpdateStatus meta_update_status = 2; + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus metaUpdateStatus_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatusOrBuilder> metaUpdateStatusBuilder_; + public boolean hasMetaUpdateStatus() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus getMetaUpdateStatus() { + if (metaUpdateStatusBuilder_ == null) { + return metaUpdateStatus_; + } else { + return metaUpdateStatusBuilder_.getMessage(); + } + } + public Builder setMetaUpdateStatus(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus value) { + if (metaUpdateStatusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metaUpdateStatus_ = value; + onChanged(); + } else { + metaUpdateStatusBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder setMetaUpdateStatus( + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus.Builder builderForValue) { + if (metaUpdateStatusBuilder_ == null) { + metaUpdateStatus_ = builderForValue.build(); + onChanged(); + } else { + metaUpdateStatusBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder mergeMetaUpdateStatus(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus value) { + if (metaUpdateStatusBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002) && + metaUpdateStatus_ != com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus.getDefaultInstance()) { + metaUpdateStatus_ = + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus.newBuilder(metaUpdateStatus_).mergeFrom(value).buildPartial(); + } else { + metaUpdateStatus_ = value; + } + onChanged(); + } else { + metaUpdateStatusBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder clearMetaUpdateStatus() { + if (metaUpdateStatusBuilder_ == null) { + metaUpdateStatus_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus.getDefaultInstance(); + onChanged(); + } else { + metaUpdateStatusBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus.Builder getMetaUpdateStatusBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getMetaUpdateStatusFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatusOrBuilder getMetaUpdateStatusOrBuilder() { + if (metaUpdateStatusBuilder_ != null) { + return metaUpdateStatusBuilder_.getMessageOrBuilder(); + } else { + return metaUpdateStatus_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatusOrBuilder> + getMetaUpdateStatusFieldBuilder() { + if (metaUpdateStatusBuilder_ == null) { + metaUpdateStatusBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatusOrBuilder>( + metaUpdateStatus_, + getParentForChildren(), + isClean()); + metaUpdateStatus_ = null; + } + return metaUpdateStatusBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.PutTimeseriesDataResponse) + } + + static { + defaultInstance = new PutTimeseriesDataResponse(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.PutTimeseriesDataResponse) + } + + public interface TimeseriesFieldsToGetOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // optional string name = 1; + boolean hasName(); + String getName(); + + // optional int32 type = 2; + boolean hasType(); + int getType(); + } + public static final class TimeseriesFieldsToGet extends + com.google.protobuf.GeneratedMessage + implements TimeseriesFieldsToGetOrBuilder { + // Use TimeseriesFieldsToGet.newBuilder() to construct. + private TimeseriesFieldsToGet(Builder builder) { + super(builder); + } + private TimeseriesFieldsToGet(boolean noInit) {} + + private static final TimeseriesFieldsToGet defaultInstance; + public static TimeseriesFieldsToGet getDefaultInstance() { + return defaultInstance; + } + + public TimeseriesFieldsToGet getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesFieldsToGet_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesFieldsToGet_fieldAccessorTable; + } + + private int bitField0_; + // optional string name = 1; + public static final int NAME_FIELD_NUMBER = 1; + private java.lang.Object name_; + public boolean hasName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getName() { + java.lang.Object ref = name_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + name_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional int32 type = 2; + public static final int TYPE_FIELD_NUMBER = 2; + private int type_; + public boolean hasType() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public int getType() { + return type_; + } + + private void initFields() { + name_ = ""; + type_ = 0; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeInt32(2, type_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, type_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGet parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGet parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGet parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGet parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGet parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGet parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGet parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGet parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGet parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGet parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGet prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesFieldsToGet_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesFieldsToGet_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGet.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + name_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + type_ = 0; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGet.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGet getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGet.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGet build() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGet result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGet buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGet result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGet buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGet result = new com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGet(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.name_ = name_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.type_ = type_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGet) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGet)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGet other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGet.getDefaultInstance()) return this; + if (other.hasName()) { + setName(other.getName()); + } + if (other.hasType()) { + setType(other.getType()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + name_ = input.readBytes(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + type_ = input.readInt32(); + break; + } + } + } + } + + private int bitField0_; + + // optional string name = 1; + private java.lang.Object name_ = ""; + public boolean hasName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + name_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + name_ = value; + onChanged(); + return this; + } + public Builder clearName() { + bitField0_ = (bitField0_ & ~0x00000001); + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + void setName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + name_ = value; + onChanged(); + } + + // optional int32 type = 2; + private int type_ ; + public boolean hasType() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public int getType() { + return type_; + } + public Builder setType(int value) { + bitField0_ |= 0x00000002; + type_ = value; + onChanged(); + return this; + } + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000002); + type_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesFieldsToGet) + } + + static { + defaultInstance = new TimeseriesFieldsToGet(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesFieldsToGet) + } + + public interface GetTimeseriesDataRequestOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string table_name = 1; + boolean hasTableName(); + String getTableName(); + + // required .com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesKey time_series_key = 2; + boolean hasTimeSeriesKey(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey getTimeSeriesKey(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKeyOrBuilder getTimeSeriesKeyOrBuilder(); + + // optional int64 begin_time = 3; + boolean hasBeginTime(); + long getBeginTime(); + + // optional int64 end_time = 4; + boolean hasEndTime(); + long getEndTime(); + + // optional int64 specific_time = 5; + boolean hasSpecificTime(); + long getSpecificTime(); + + // optional bytes token = 6; + boolean hasToken(); + com.google.protobuf.ByteString getToken(); + + // optional int32 limit = 7; + boolean hasLimit(); + int getLimit(); + + // optional bool backward = 8; + boolean hasBackward(); + boolean getBackward(); + + // repeated .com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesFieldsToGet fields_to_get = 9; + java.util.List + getFieldsToGetList(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGet getFieldsToGet(int index); + int getFieldsToGetCount(); + java.util.List + getFieldsToGetOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGetOrBuilder getFieldsToGetOrBuilder( + int index); + } + public static final class GetTimeseriesDataRequest extends + com.google.protobuf.GeneratedMessage + implements GetTimeseriesDataRequestOrBuilder { + // Use GetTimeseriesDataRequest.newBuilder() to construct. + private GetTimeseriesDataRequest(Builder builder) { + super(builder); + } + private GetTimeseriesDataRequest(boolean noInit) {} + + private static final GetTimeseriesDataRequest defaultInstance; + public static GetTimeseriesDataRequest getDefaultInstance() { + return defaultInstance; + } + + public GetTimeseriesDataRequest getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_GetTimeseriesDataRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_GetTimeseriesDataRequest_fieldAccessorTable; + } + + private int bitField0_; + // required string table_name = 1; + public static final int TABLE_NAME_FIELD_NUMBER = 1; + private java.lang.Object tableName_; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + tableName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // required .com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesKey time_series_key = 2; + public static final int TIME_SERIES_KEY_FIELD_NUMBER = 2; + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey timeSeriesKey_; + public boolean hasTimeSeriesKey() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey getTimeSeriesKey() { + return timeSeriesKey_; + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKeyOrBuilder getTimeSeriesKeyOrBuilder() { + return timeSeriesKey_; + } + + // optional int64 begin_time = 3; + public static final int BEGIN_TIME_FIELD_NUMBER = 3; + private long beginTime_; + public boolean hasBeginTime() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public long getBeginTime() { + return beginTime_; + } + + // optional int64 end_time = 4; + public static final int END_TIME_FIELD_NUMBER = 4; + private long endTime_; + public boolean hasEndTime() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public long getEndTime() { + return endTime_; + } + + // optional int64 specific_time = 5; + public static final int SPECIFIC_TIME_FIELD_NUMBER = 5; + private long specificTime_; + public boolean hasSpecificTime() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public long getSpecificTime() { + return specificTime_; + } + + // optional bytes token = 6; + public static final int TOKEN_FIELD_NUMBER = 6; + private com.google.protobuf.ByteString token_; + public boolean hasToken() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + public com.google.protobuf.ByteString getToken() { + return token_; + } + + // optional int32 limit = 7; + public static final int LIMIT_FIELD_NUMBER = 7; + private int limit_; + public boolean hasLimit() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + public int getLimit() { + return limit_; + } + + // optional bool backward = 8; + public static final int BACKWARD_FIELD_NUMBER = 8; + private boolean backward_; + public boolean hasBackward() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + public boolean getBackward() { + return backward_; + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesFieldsToGet fields_to_get = 9; + public static final int FIELDS_TO_GET_FIELD_NUMBER = 9; + private java.util.List fieldsToGet_; + public java.util.List getFieldsToGetList() { + return fieldsToGet_; + } + public java.util.List + getFieldsToGetOrBuilderList() { + return fieldsToGet_; + } + public int getFieldsToGetCount() { + return fieldsToGet_.size(); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGet getFieldsToGet(int index) { + return fieldsToGet_.get(index); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGetOrBuilder getFieldsToGetOrBuilder( + int index) { + return fieldsToGet_.get(index); + } + + private void initFields() { + tableName_ = ""; + timeSeriesKey_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey.getDefaultInstance(); + beginTime_ = 0L; + endTime_ = 0L; + specificTime_ = 0L; + token_ = com.google.protobuf.ByteString.EMPTY; + limit_ = 0; + backward_ = false; + fieldsToGet_ = java.util.Collections.emptyList(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasTableName()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasTimeSeriesKey()) { + memoizedIsInitialized = 0; + return false; + } + if (!getTimeSeriesKey().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeMessage(2, timeSeriesKey_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeInt64(3, beginTime_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeInt64(4, endTime_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeInt64(5, specificTime_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeBytes(6, token_); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + output.writeInt32(7, limit_); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + output.writeBool(8, backward_); + } + for (int i = 0; i < fieldsToGet_.size(); i++) { + output.writeMessage(9, fieldsToGet_.get(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, timeSeriesKey_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, beginTime_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(4, endTime_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(5, specificTime_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(6, token_); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(7, limit_); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(8, backward_); + } + for (int i = 0; i < fieldsToGet_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, fieldsToGet_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataRequest prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_GetTimeseriesDataRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_GetTimeseriesDataRequest_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getTimeSeriesKeyFieldBuilder(); + getFieldsToGetFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + tableName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + if (timeSeriesKeyBuilder_ == null) { + timeSeriesKey_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey.getDefaultInstance(); + } else { + timeSeriesKeyBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + beginTime_ = 0L; + bitField0_ = (bitField0_ & ~0x00000004); + endTime_ = 0L; + bitField0_ = (bitField0_ & ~0x00000008); + specificTime_ = 0L; + bitField0_ = (bitField0_ & ~0x00000010); + token_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000020); + limit_ = 0; + bitField0_ = (bitField0_ & ~0x00000040); + backward_ = false; + bitField0_ = (bitField0_ & ~0x00000080); + if (fieldsToGetBuilder_ == null) { + fieldsToGet_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000100); + } else { + fieldsToGetBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataRequest.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataRequest.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataRequest build() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataRequest buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataRequest result = new com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.tableName_ = tableName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + if (timeSeriesKeyBuilder_ == null) { + result.timeSeriesKey_ = timeSeriesKey_; + } else { + result.timeSeriesKey_ = timeSeriesKeyBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.beginTime_ = beginTime_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.endTime_ = endTime_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + result.specificTime_ = specificTime_; + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000020; + } + result.token_ = token_; + if (((from_bitField0_ & 0x00000040) == 0x00000040)) { + to_bitField0_ |= 0x00000040; + } + result.limit_ = limit_; + if (((from_bitField0_ & 0x00000080) == 0x00000080)) { + to_bitField0_ |= 0x00000080; + } + result.backward_ = backward_; + if (fieldsToGetBuilder_ == null) { + if (((bitField0_ & 0x00000100) == 0x00000100)) { + fieldsToGet_ = java.util.Collections.unmodifiableList(fieldsToGet_); + bitField0_ = (bitField0_ & ~0x00000100); + } + result.fieldsToGet_ = fieldsToGet_; + } else { + result.fieldsToGet_ = fieldsToGetBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataRequest.getDefaultInstance()) return this; + if (other.hasTableName()) { + setTableName(other.getTableName()); + } + if (other.hasTimeSeriesKey()) { + mergeTimeSeriesKey(other.getTimeSeriesKey()); + } + if (other.hasBeginTime()) { + setBeginTime(other.getBeginTime()); + } + if (other.hasEndTime()) { + setEndTime(other.getEndTime()); + } + if (other.hasSpecificTime()) { + setSpecificTime(other.getSpecificTime()); + } + if (other.hasToken()) { + setToken(other.getToken()); + } + if (other.hasLimit()) { + setLimit(other.getLimit()); + } + if (other.hasBackward()) { + setBackward(other.getBackward()); + } + if (fieldsToGetBuilder_ == null) { + if (!other.fieldsToGet_.isEmpty()) { + if (fieldsToGet_.isEmpty()) { + fieldsToGet_ = other.fieldsToGet_; + bitField0_ = (bitField0_ & ~0x00000100); + } else { + ensureFieldsToGetIsMutable(); + fieldsToGet_.addAll(other.fieldsToGet_); + } + onChanged(); + } + } else { + if (!other.fieldsToGet_.isEmpty()) { + if (fieldsToGetBuilder_.isEmpty()) { + fieldsToGetBuilder_.dispose(); + fieldsToGetBuilder_ = null; + fieldsToGet_ = other.fieldsToGet_; + bitField0_ = (bitField0_ & ~0x00000100); + fieldsToGetBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getFieldsToGetFieldBuilder() : null; + } else { + fieldsToGetBuilder_.addAllMessages(other.fieldsToGet_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasTableName()) { + + return false; + } + if (!hasTimeSeriesKey()) { + + return false; + } + if (!getTimeSeriesKey().isInitialized()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + tableName_ = input.readBytes(); + break; + } + case 18: { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey.newBuilder(); + if (hasTimeSeriesKey()) { + subBuilder.mergeFrom(getTimeSeriesKey()); + } + input.readMessage(subBuilder, extensionRegistry); + setTimeSeriesKey(subBuilder.buildPartial()); + break; + } + case 24: { + bitField0_ |= 0x00000004; + beginTime_ = input.readInt64(); + break; + } + case 32: { + bitField0_ |= 0x00000008; + endTime_ = input.readInt64(); + break; + } + case 40: { + bitField0_ |= 0x00000010; + specificTime_ = input.readInt64(); + break; + } + case 50: { + bitField0_ |= 0x00000020; + token_ = input.readBytes(); + break; + } + case 56: { + bitField0_ |= 0x00000040; + limit_ = input.readInt32(); + break; + } + case 64: { + bitField0_ |= 0x00000080; + backward_ = input.readBool(); + break; + } + case 74: { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGet.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGet.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addFieldsToGet(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // required string table_name = 1; + private java.lang.Object tableName_ = ""; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + tableName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setTableName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + return this; + } + public Builder clearTableName() { + bitField0_ = (bitField0_ & ~0x00000001); + tableName_ = getDefaultInstance().getTableName(); + onChanged(); + return this; + } + void setTableName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + } + + // required .com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesKey time_series_key = 2; + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey timeSeriesKey_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKeyOrBuilder> timeSeriesKeyBuilder_; + public boolean hasTimeSeriesKey() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey getTimeSeriesKey() { + if (timeSeriesKeyBuilder_ == null) { + return timeSeriesKey_; + } else { + return timeSeriesKeyBuilder_.getMessage(); + } + } + public Builder setTimeSeriesKey(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey value) { + if (timeSeriesKeyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timeSeriesKey_ = value; + onChanged(); + } else { + timeSeriesKeyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder setTimeSeriesKey( + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey.Builder builderForValue) { + if (timeSeriesKeyBuilder_ == null) { + timeSeriesKey_ = builderForValue.build(); + onChanged(); + } else { + timeSeriesKeyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder mergeTimeSeriesKey(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey value) { + if (timeSeriesKeyBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002) && + timeSeriesKey_ != com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey.getDefaultInstance()) { + timeSeriesKey_ = + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey.newBuilder(timeSeriesKey_).mergeFrom(value).buildPartial(); + } else { + timeSeriesKey_ = value; + } + onChanged(); + } else { + timeSeriesKeyBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + return this; + } + public Builder clearTimeSeriesKey() { + if (timeSeriesKeyBuilder_ == null) { + timeSeriesKey_ = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey.getDefaultInstance(); + onChanged(); + } else { + timeSeriesKeyBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey.Builder getTimeSeriesKeyBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getTimeSeriesKeyFieldBuilder().getBuilder(); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKeyOrBuilder getTimeSeriesKeyOrBuilder() { + if (timeSeriesKeyBuilder_ != null) { + return timeSeriesKeyBuilder_.getMessageOrBuilder(); + } else { + return timeSeriesKey_; + } + } + private com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKeyOrBuilder> + getTimeSeriesKeyFieldBuilder() { + if (timeSeriesKeyBuilder_ == null) { + timeSeriesKeyBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKeyOrBuilder>( + timeSeriesKey_, + getParentForChildren(), + isClean()); + timeSeriesKey_ = null; + } + return timeSeriesKeyBuilder_; + } + + // optional int64 begin_time = 3; + private long beginTime_ ; + public boolean hasBeginTime() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + public long getBeginTime() { + return beginTime_; + } + public Builder setBeginTime(long value) { + bitField0_ |= 0x00000004; + beginTime_ = value; + onChanged(); + return this; + } + public Builder clearBeginTime() { + bitField0_ = (bitField0_ & ~0x00000004); + beginTime_ = 0L; + onChanged(); + return this; + } + + // optional int64 end_time = 4; + private long endTime_ ; + public boolean hasEndTime() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + public long getEndTime() { + return endTime_; + } + public Builder setEndTime(long value) { + bitField0_ |= 0x00000008; + endTime_ = value; + onChanged(); + return this; + } + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000008); + endTime_ = 0L; + onChanged(); + return this; + } + + // optional int64 specific_time = 5; + private long specificTime_ ; + public boolean hasSpecificTime() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + public long getSpecificTime() { + return specificTime_; + } + public Builder setSpecificTime(long value) { + bitField0_ |= 0x00000010; + specificTime_ = value; + onChanged(); + return this; + } + public Builder clearSpecificTime() { + bitField0_ = (bitField0_ & ~0x00000010); + specificTime_ = 0L; + onChanged(); + return this; + } + + // optional bytes token = 6; + private com.google.protobuf.ByteString token_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasToken() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + public com.google.protobuf.ByteString getToken() { + return token_; + } + public Builder setToken(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + token_ = value; + onChanged(); + return this; + } + public Builder clearToken() { + bitField0_ = (bitField0_ & ~0x00000020); + token_ = getDefaultInstance().getToken(); + onChanged(); + return this; + } + + // optional int32 limit = 7; + private int limit_ ; + public boolean hasLimit() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + public int getLimit() { + return limit_; + } + public Builder setLimit(int value) { + bitField0_ |= 0x00000040; + limit_ = value; + onChanged(); + return this; + } + public Builder clearLimit() { + bitField0_ = (bitField0_ & ~0x00000040); + limit_ = 0; + onChanged(); + return this; + } + + // optional bool backward = 8; + private boolean backward_ ; + public boolean hasBackward() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + public boolean getBackward() { + return backward_; + } + public Builder setBackward(boolean value) { + bitField0_ |= 0x00000080; + backward_ = value; + onChanged(); + return this; + } + public Builder clearBackward() { + bitField0_ = (bitField0_ & ~0x00000080); + backward_ = false; + onChanged(); + return this; + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesFieldsToGet fields_to_get = 9; + private java.util.List fieldsToGet_ = + java.util.Collections.emptyList(); + private void ensureFieldsToGetIsMutable() { + if (!((bitField0_ & 0x00000100) == 0x00000100)) { + fieldsToGet_ = new java.util.ArrayList(fieldsToGet_); + bitField0_ |= 0x00000100; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGet, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGet.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGetOrBuilder> fieldsToGetBuilder_; + + public java.util.List getFieldsToGetList() { + if (fieldsToGetBuilder_ == null) { + return java.util.Collections.unmodifiableList(fieldsToGet_); + } else { + return fieldsToGetBuilder_.getMessageList(); + } + } + public int getFieldsToGetCount() { + if (fieldsToGetBuilder_ == null) { + return fieldsToGet_.size(); + } else { + return fieldsToGetBuilder_.getCount(); + } + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGet getFieldsToGet(int index) { + if (fieldsToGetBuilder_ == null) { + return fieldsToGet_.get(index); + } else { + return fieldsToGetBuilder_.getMessage(index); + } + } + public Builder setFieldsToGet( + int index, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGet value) { + if (fieldsToGetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldsToGetIsMutable(); + fieldsToGet_.set(index, value); + onChanged(); + } else { + fieldsToGetBuilder_.setMessage(index, value); + } + return this; + } + public Builder setFieldsToGet( + int index, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGet.Builder builderForValue) { + if (fieldsToGetBuilder_ == null) { + ensureFieldsToGetIsMutable(); + fieldsToGet_.set(index, builderForValue.build()); + onChanged(); + } else { + fieldsToGetBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + public Builder addFieldsToGet(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGet value) { + if (fieldsToGetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldsToGetIsMutable(); + fieldsToGet_.add(value); + onChanged(); + } else { + fieldsToGetBuilder_.addMessage(value); + } + return this; + } + public Builder addFieldsToGet( + int index, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGet value) { + if (fieldsToGetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldsToGetIsMutable(); + fieldsToGet_.add(index, value); + onChanged(); + } else { + fieldsToGetBuilder_.addMessage(index, value); + } + return this; + } + public Builder addFieldsToGet( + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGet.Builder builderForValue) { + if (fieldsToGetBuilder_ == null) { + ensureFieldsToGetIsMutable(); + fieldsToGet_.add(builderForValue.build()); + onChanged(); + } else { + fieldsToGetBuilder_.addMessage(builderForValue.build()); + } + return this; + } + public Builder addFieldsToGet( + int index, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGet.Builder builderForValue) { + if (fieldsToGetBuilder_ == null) { + ensureFieldsToGetIsMutable(); + fieldsToGet_.add(index, builderForValue.build()); + onChanged(); + } else { + fieldsToGetBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAllFieldsToGet( + java.lang.Iterable values) { + if (fieldsToGetBuilder_ == null) { + ensureFieldsToGetIsMutable(); + super.addAll(values, fieldsToGet_); + onChanged(); + } else { + fieldsToGetBuilder_.addAllMessages(values); + } + return this; + } + public Builder clearFieldsToGet() { + if (fieldsToGetBuilder_ == null) { + fieldsToGet_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + } else { + fieldsToGetBuilder_.clear(); + } + return this; + } + public Builder removeFieldsToGet(int index) { + if (fieldsToGetBuilder_ == null) { + ensureFieldsToGetIsMutable(); + fieldsToGet_.remove(index); + onChanged(); + } else { + fieldsToGetBuilder_.remove(index); + } + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGet.Builder getFieldsToGetBuilder( + int index) { + return getFieldsToGetFieldBuilder().getBuilder(index); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGetOrBuilder getFieldsToGetOrBuilder( + int index) { + if (fieldsToGetBuilder_ == null) { + return fieldsToGet_.get(index); } else { + return fieldsToGetBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getFieldsToGetOrBuilderList() { + if (fieldsToGetBuilder_ != null) { + return fieldsToGetBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(fieldsToGet_); + } + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGet.Builder addFieldsToGetBuilder() { + return getFieldsToGetFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGet.getDefaultInstance()); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGet.Builder addFieldsToGetBuilder( + int index) { + return getFieldsToGetFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGet.getDefaultInstance()); + } + public java.util.List + getFieldsToGetBuilderList() { + return getFieldsToGetFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGet, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGet.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGetOrBuilder> + getFieldsToGetFieldBuilder() { + if (fieldsToGetBuilder_ == null) { + fieldsToGetBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGet, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGet.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGetOrBuilder>( + fieldsToGet_, + ((bitField0_ & 0x00000100) == 0x00000100), + getParentForChildren(), + isClean()); + fieldsToGet_ = null; + } + return fieldsToGetBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.GetTimeseriesDataRequest) + } + + static { + defaultInstance = new GetTimeseriesDataRequest(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.GetTimeseriesDataRequest) + } + + public interface GetTimeseriesDataResponseOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required bytes rows_data = 1; + boolean hasRowsData(); + com.google.protobuf.ByteString getRowsData(); + + // optional bytes next_token = 2; + boolean hasNextToken(); + com.google.protobuf.ByteString getNextToken(); + } + public static final class GetTimeseriesDataResponse extends + com.google.protobuf.GeneratedMessage + implements GetTimeseriesDataResponseOrBuilder { + // Use GetTimeseriesDataResponse.newBuilder() to construct. + private GetTimeseriesDataResponse(Builder builder) { + super(builder); + } + private GetTimeseriesDataResponse(boolean noInit) {} + + private static final GetTimeseriesDataResponse defaultInstance; + public static GetTimeseriesDataResponse getDefaultInstance() { + return defaultInstance; + } + + public GetTimeseriesDataResponse getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_GetTimeseriesDataResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_GetTimeseriesDataResponse_fieldAccessorTable; + } + + private int bitField0_; + // required bytes rows_data = 1; + public static final int ROWS_DATA_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString rowsData_; + public boolean hasRowsData() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.google.protobuf.ByteString getRowsData() { + return rowsData_; + } + + // optional bytes next_token = 2; + public static final int NEXT_TOKEN_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString nextToken_; + public boolean hasNextToken() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getNextToken() { + return nextToken_; + } + + private void initFields() { + rowsData_ = com.google.protobuf.ByteString.EMPTY; + nextToken_ = com.google.protobuf.ByteString.EMPTY; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasRowsData()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, rowsData_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, nextToken_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, rowsData_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, nextToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataResponse prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_GetTimeseriesDataResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_GetTimeseriesDataResponse_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + rowsData_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + nextToken_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataResponse.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataResponse.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataResponse build() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataResponse buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataResponse result = new com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataResponse(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.rowsData_ = rowsData_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.nextToken_ = nextToken_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataResponse.getDefaultInstance()) return this; + if (other.hasRowsData()) { + setRowsData(other.getRowsData()); + } + if (other.hasNextToken()) { + setNextToken(other.getNextToken()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasRowsData()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + rowsData_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + nextToken_ = input.readBytes(); + break; + } + } + } + } + + private int bitField0_; + + // required bytes rows_data = 1; + private com.google.protobuf.ByteString rowsData_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasRowsData() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public com.google.protobuf.ByteString getRowsData() { + return rowsData_; + } + public Builder setRowsData(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + rowsData_ = value; + onChanged(); + return this; + } + public Builder clearRowsData() { + bitField0_ = (bitField0_ & ~0x00000001); + rowsData_ = getDefaultInstance().getRowsData(); + onChanged(); + return this; + } + + // optional bytes next_token = 2; + private com.google.protobuf.ByteString nextToken_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasNextToken() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + public com.google.protobuf.ByteString getNextToken() { + return nextToken_; + } + public Builder setNextToken(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + nextToken_ = value; + onChanged(); + return this; + } + public Builder clearNextToken() { + bitField0_ = (bitField0_ & ~0x00000002); + nextToken_ = getDefaultInstance().getNextToken(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.GetTimeseriesDataResponse) + } + + static { + defaultInstance = new GetTimeseriesDataResponse(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.GetTimeseriesDataResponse) + } + + public interface UpdateTimeseriesMetaRequestOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string table_name = 1; + boolean hasTableName(); + String getTableName(); + + // repeated .com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesMeta timeseries_meta = 2; + java.util.List + getTimeseriesMetaList(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta getTimeseriesMeta(int index); + int getTimeseriesMetaCount(); + java.util.List + getTimeseriesMetaOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMetaOrBuilder getTimeseriesMetaOrBuilder( + int index); + } + public static final class UpdateTimeseriesMetaRequest extends + com.google.protobuf.GeneratedMessage + implements UpdateTimeseriesMetaRequestOrBuilder { + // Use UpdateTimeseriesMetaRequest.newBuilder() to construct. + private UpdateTimeseriesMetaRequest(Builder builder) { + super(builder); + } + private UpdateTimeseriesMetaRequest(boolean noInit) {} + + private static final UpdateTimeseriesMetaRequest defaultInstance; + public static UpdateTimeseriesMetaRequest getDefaultInstance() { + return defaultInstance; + } + + public UpdateTimeseriesMetaRequest getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_UpdateTimeseriesMetaRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_UpdateTimeseriesMetaRequest_fieldAccessorTable; + } + + private int bitField0_; + // required string table_name = 1; + public static final int TABLE_NAME_FIELD_NUMBER = 1; + private java.lang.Object tableName_; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + tableName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesMeta timeseries_meta = 2; + public static final int TIMESERIES_META_FIELD_NUMBER = 2; + private java.util.List timeseriesMeta_; + public java.util.List getTimeseriesMetaList() { + return timeseriesMeta_; + } + public java.util.List + getTimeseriesMetaOrBuilderList() { + return timeseriesMeta_; + } + public int getTimeseriesMetaCount() { + return timeseriesMeta_.size(); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta getTimeseriesMeta(int index) { + return timeseriesMeta_.get(index); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMetaOrBuilder getTimeseriesMetaOrBuilder( + int index) { + return timeseriesMeta_.get(index); + } + + private void initFields() { + tableName_ = ""; + timeseriesMeta_ = java.util.Collections.emptyList(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasTableName()) { + memoizedIsInitialized = 0; + return false; + } + for (int i = 0; i < getTimeseriesMetaCount(); i++) { + if (!getTimeseriesMeta(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getTableNameBytes()); + } + for (int i = 0; i < timeseriesMeta_.size(); i++) { + output.writeMessage(2, timeseriesMeta_.get(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getTableNameBytes()); + } + for (int i = 0; i < timeseriesMeta_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, timeseriesMeta_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaRequest prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_UpdateTimeseriesMetaRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_UpdateTimeseriesMetaRequest_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getTimeseriesMetaFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + tableName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + if (timeseriesMetaBuilder_ == null) { + timeseriesMeta_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + timeseriesMetaBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaRequest.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaRequest.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaRequest build() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaRequest buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaRequest result = new com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.tableName_ = tableName_; + if (timeseriesMetaBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { + timeseriesMeta_ = java.util.Collections.unmodifiableList(timeseriesMeta_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.timeseriesMeta_ = timeseriesMeta_; + } else { + result.timeseriesMeta_ = timeseriesMetaBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaRequest.getDefaultInstance()) return this; + if (other.hasTableName()) { + setTableName(other.getTableName()); + } + if (timeseriesMetaBuilder_ == null) { + if (!other.timeseriesMeta_.isEmpty()) { + if (timeseriesMeta_.isEmpty()) { + timeseriesMeta_ = other.timeseriesMeta_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureTimeseriesMetaIsMutable(); + timeseriesMeta_.addAll(other.timeseriesMeta_); + } + onChanged(); + } + } else { + if (!other.timeseriesMeta_.isEmpty()) { + if (timeseriesMetaBuilder_.isEmpty()) { + timeseriesMetaBuilder_.dispose(); + timeseriesMetaBuilder_ = null; + timeseriesMeta_ = other.timeseriesMeta_; + bitField0_ = (bitField0_ & ~0x00000002); + timeseriesMetaBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getTimeseriesMetaFieldBuilder() : null; + } else { + timeseriesMetaBuilder_.addAllMessages(other.timeseriesMeta_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasTableName()) { + + return false; + } + for (int i = 0; i < getTimeseriesMetaCount(); i++) { + if (!getTimeseriesMeta(i).isInitialized()) { + + return false; + } + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + tableName_ = input.readBytes(); + break; + } + case 18: { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addTimeseriesMeta(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // required string table_name = 1; + private java.lang.Object tableName_ = ""; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + tableName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setTableName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + return this; + } + public Builder clearTableName() { + bitField0_ = (bitField0_ & ~0x00000001); + tableName_ = getDefaultInstance().getTableName(); + onChanged(); + return this; + } + void setTableName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesMeta timeseries_meta = 2; + private java.util.List timeseriesMeta_ = + java.util.Collections.emptyList(); + private void ensureTimeseriesMetaIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + timeseriesMeta_ = new java.util.ArrayList(timeseriesMeta_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMetaOrBuilder> timeseriesMetaBuilder_; + + public java.util.List getTimeseriesMetaList() { + if (timeseriesMetaBuilder_ == null) { + return java.util.Collections.unmodifiableList(timeseriesMeta_); + } else { + return timeseriesMetaBuilder_.getMessageList(); + } + } + public int getTimeseriesMetaCount() { + if (timeseriesMetaBuilder_ == null) { + return timeseriesMeta_.size(); + } else { + return timeseriesMetaBuilder_.getCount(); + } + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta getTimeseriesMeta(int index) { + if (timeseriesMetaBuilder_ == null) { + return timeseriesMeta_.get(index); + } else { + return timeseriesMetaBuilder_.getMessage(index); + } + } + public Builder setTimeseriesMeta( + int index, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta value) { + if (timeseriesMetaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTimeseriesMetaIsMutable(); + timeseriesMeta_.set(index, value); + onChanged(); + } else { + timeseriesMetaBuilder_.setMessage(index, value); + } + return this; + } + public Builder setTimeseriesMeta( + int index, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta.Builder builderForValue) { + if (timeseriesMetaBuilder_ == null) { + ensureTimeseriesMetaIsMutable(); + timeseriesMeta_.set(index, builderForValue.build()); + onChanged(); + } else { + timeseriesMetaBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + public Builder addTimeseriesMeta(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta value) { + if (timeseriesMetaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTimeseriesMetaIsMutable(); + timeseriesMeta_.add(value); + onChanged(); + } else { + timeseriesMetaBuilder_.addMessage(value); + } + return this; + } + public Builder addTimeseriesMeta( + int index, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta value) { + if (timeseriesMetaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTimeseriesMetaIsMutable(); + timeseriesMeta_.add(index, value); + onChanged(); + } else { + timeseriesMetaBuilder_.addMessage(index, value); + } + return this; + } + public Builder addTimeseriesMeta( + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta.Builder builderForValue) { + if (timeseriesMetaBuilder_ == null) { + ensureTimeseriesMetaIsMutable(); + timeseriesMeta_.add(builderForValue.build()); + onChanged(); + } else { + timeseriesMetaBuilder_.addMessage(builderForValue.build()); + } + return this; + } + public Builder addTimeseriesMeta( + int index, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta.Builder builderForValue) { + if (timeseriesMetaBuilder_ == null) { + ensureTimeseriesMetaIsMutable(); + timeseriesMeta_.add(index, builderForValue.build()); + onChanged(); + } else { + timeseriesMetaBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAllTimeseriesMeta( + java.lang.Iterable values) { + if (timeseriesMetaBuilder_ == null) { + ensureTimeseriesMetaIsMutable(); + super.addAll(values, timeseriesMeta_); + onChanged(); + } else { + timeseriesMetaBuilder_.addAllMessages(values); + } + return this; + } + public Builder clearTimeseriesMeta() { + if (timeseriesMetaBuilder_ == null) { + timeseriesMeta_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + timeseriesMetaBuilder_.clear(); + } + return this; + } + public Builder removeTimeseriesMeta(int index) { + if (timeseriesMetaBuilder_ == null) { + ensureTimeseriesMetaIsMutable(); + timeseriesMeta_.remove(index); + onChanged(); + } else { + timeseriesMetaBuilder_.remove(index); + } + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta.Builder getTimeseriesMetaBuilder( + int index) { + return getTimeseriesMetaFieldBuilder().getBuilder(index); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMetaOrBuilder getTimeseriesMetaOrBuilder( + int index) { + if (timeseriesMetaBuilder_ == null) { + return timeseriesMeta_.get(index); } else { + return timeseriesMetaBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getTimeseriesMetaOrBuilderList() { + if (timeseriesMetaBuilder_ != null) { + return timeseriesMetaBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(timeseriesMeta_); + } + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta.Builder addTimeseriesMetaBuilder() { + return getTimeseriesMetaFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta.getDefaultInstance()); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta.Builder addTimeseriesMetaBuilder( + int index) { + return getTimeseriesMetaFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta.getDefaultInstance()); + } + public java.util.List + getTimeseriesMetaBuilderList() { + return getTimeseriesMetaFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMetaOrBuilder> + getTimeseriesMetaFieldBuilder() { + if (timeseriesMetaBuilder_ == null) { + timeseriesMetaBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMetaOrBuilder>( + timeseriesMeta_, + ((bitField0_ & 0x00000002) == 0x00000002), + getParentForChildren(), + isClean()); + timeseriesMeta_ = null; + } + return timeseriesMetaBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.UpdateTimeseriesMetaRequest) + } + + static { + defaultInstance = new UpdateTimeseriesMetaRequest(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.UpdateTimeseriesMetaRequest) + } + + public interface UpdateTimeseriesMetaResponseOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // repeated .com.alicloud.openservices.tablestore.core.protocol.timeseries.FailedRowInfo failed_rows = 1; + java.util.List + getFailedRowsList(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo getFailedRows(int index); + int getFailedRowsCount(); + java.util.List + getFailedRowsOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfoOrBuilder getFailedRowsOrBuilder( + int index); + } + public static final class UpdateTimeseriesMetaResponse extends + com.google.protobuf.GeneratedMessage + implements UpdateTimeseriesMetaResponseOrBuilder { + // Use UpdateTimeseriesMetaResponse.newBuilder() to construct. + private UpdateTimeseriesMetaResponse(Builder builder) { + super(builder); + } + private UpdateTimeseriesMetaResponse(boolean noInit) {} + + private static final UpdateTimeseriesMetaResponse defaultInstance; + public static UpdateTimeseriesMetaResponse getDefaultInstance() { + return defaultInstance; + } + + public UpdateTimeseriesMetaResponse getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_UpdateTimeseriesMetaResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_UpdateTimeseriesMetaResponse_fieldAccessorTable; + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.timeseries.FailedRowInfo failed_rows = 1; + public static final int FAILED_ROWS_FIELD_NUMBER = 1; + private java.util.List failedRows_; + public java.util.List getFailedRowsList() { + return failedRows_; + } + public java.util.List + getFailedRowsOrBuilderList() { + return failedRows_; + } + public int getFailedRowsCount() { + return failedRows_.size(); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo getFailedRows(int index) { + return failedRows_.get(index); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfoOrBuilder getFailedRowsOrBuilder( + int index) { + return failedRows_.get(index); + } + + private void initFields() { + failedRows_ = java.util.Collections.emptyList(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + for (int i = 0; i < getFailedRowsCount(); i++) { + if (!getFailedRows(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < failedRows_.size(); i++) { + output.writeMessage(1, failedRows_.get(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < failedRows_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, failedRows_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaResponse prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_UpdateTimeseriesMetaResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_UpdateTimeseriesMetaResponse_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getFailedRowsFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (failedRowsBuilder_ == null) { + failedRows_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + failedRowsBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaResponse.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaResponse.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaResponse build() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaResponse buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaResponse result = new com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaResponse(this); + int from_bitField0_ = bitField0_; + if (failedRowsBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + failedRows_ = java.util.Collections.unmodifiableList(failedRows_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.failedRows_ = failedRows_; + } else { + result.failedRows_ = failedRowsBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaResponse.getDefaultInstance()) return this; + if (failedRowsBuilder_ == null) { + if (!other.failedRows_.isEmpty()) { + if (failedRows_.isEmpty()) { + failedRows_ = other.failedRows_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFailedRowsIsMutable(); + failedRows_.addAll(other.failedRows_); + } + onChanged(); + } + } else { + if (!other.failedRows_.isEmpty()) { + if (failedRowsBuilder_.isEmpty()) { + failedRowsBuilder_.dispose(); + failedRowsBuilder_ = null; + failedRows_ = other.failedRows_; + bitField0_ = (bitField0_ & ~0x00000001); + failedRowsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getFailedRowsFieldBuilder() : null; + } else { + failedRowsBuilder_.addAllMessages(other.failedRows_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + for (int i = 0; i < getFailedRowsCount(); i++) { + if (!getFailedRows(i).isInitialized()) { + + return false; + } + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addFailedRows(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // repeated .com.alicloud.openservices.tablestore.core.protocol.timeseries.FailedRowInfo failed_rows = 1; + private java.util.List failedRows_ = + java.util.Collections.emptyList(); + private void ensureFailedRowsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + failedRows_ = new java.util.ArrayList(failedRows_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfoOrBuilder> failedRowsBuilder_; + + public java.util.List getFailedRowsList() { + if (failedRowsBuilder_ == null) { + return java.util.Collections.unmodifiableList(failedRows_); + } else { + return failedRowsBuilder_.getMessageList(); + } + } + public int getFailedRowsCount() { + if (failedRowsBuilder_ == null) { + return failedRows_.size(); + } else { + return failedRowsBuilder_.getCount(); + } + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo getFailedRows(int index) { + if (failedRowsBuilder_ == null) { + return failedRows_.get(index); + } else { + return failedRowsBuilder_.getMessage(index); + } + } + public Builder setFailedRows( + int index, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo value) { + if (failedRowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFailedRowsIsMutable(); + failedRows_.set(index, value); + onChanged(); + } else { + failedRowsBuilder_.setMessage(index, value); + } + return this; + } + public Builder setFailedRows( + int index, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo.Builder builderForValue) { + if (failedRowsBuilder_ == null) { + ensureFailedRowsIsMutable(); + failedRows_.set(index, builderForValue.build()); + onChanged(); + } else { + failedRowsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + public Builder addFailedRows(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo value) { + if (failedRowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFailedRowsIsMutable(); + failedRows_.add(value); + onChanged(); + } else { + failedRowsBuilder_.addMessage(value); + } + return this; + } + public Builder addFailedRows( + int index, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo value) { + if (failedRowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFailedRowsIsMutable(); + failedRows_.add(index, value); + onChanged(); + } else { + failedRowsBuilder_.addMessage(index, value); + } + return this; + } + public Builder addFailedRows( + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo.Builder builderForValue) { + if (failedRowsBuilder_ == null) { + ensureFailedRowsIsMutable(); + failedRows_.add(builderForValue.build()); + onChanged(); + } else { + failedRowsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + public Builder addFailedRows( + int index, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo.Builder builderForValue) { + if (failedRowsBuilder_ == null) { + ensureFailedRowsIsMutable(); + failedRows_.add(index, builderForValue.build()); + onChanged(); + } else { + failedRowsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAllFailedRows( + java.lang.Iterable values) { + if (failedRowsBuilder_ == null) { + ensureFailedRowsIsMutable(); + super.addAll(values, failedRows_); + onChanged(); + } else { + failedRowsBuilder_.addAllMessages(values); + } + return this; + } + public Builder clearFailedRows() { + if (failedRowsBuilder_ == null) { + failedRows_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + failedRowsBuilder_.clear(); + } + return this; + } + public Builder removeFailedRows(int index) { + if (failedRowsBuilder_ == null) { + ensureFailedRowsIsMutable(); + failedRows_.remove(index); + onChanged(); + } else { + failedRowsBuilder_.remove(index); + } + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo.Builder getFailedRowsBuilder( + int index) { + return getFailedRowsFieldBuilder().getBuilder(index); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfoOrBuilder getFailedRowsOrBuilder( + int index) { + if (failedRowsBuilder_ == null) { + return failedRows_.get(index); } else { + return failedRowsBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getFailedRowsOrBuilderList() { + if (failedRowsBuilder_ != null) { + return failedRowsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(failedRows_); + } + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo.Builder addFailedRowsBuilder() { + return getFailedRowsFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo.getDefaultInstance()); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo.Builder addFailedRowsBuilder( + int index) { + return getFailedRowsFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo.getDefaultInstance()); + } + public java.util.List + getFailedRowsBuilderList() { + return getFailedRowsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfoOrBuilder> + getFailedRowsFieldBuilder() { + if (failedRowsBuilder_ == null) { + failedRowsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfoOrBuilder>( + failedRows_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + failedRows_ = null; + } + return failedRowsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.UpdateTimeseriesMetaResponse) + } + + static { + defaultInstance = new UpdateTimeseriesMetaResponse(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.UpdateTimeseriesMetaResponse) + } + + public interface DeleteTimeseriesMetaRequestOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string table_name = 1; + boolean hasTableName(); + String getTableName(); + + // repeated .com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesKey timeseries_key = 2; + java.util.List + getTimeseriesKeyList(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey getTimeseriesKey(int index); + int getTimeseriesKeyCount(); + java.util.List + getTimeseriesKeyOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKeyOrBuilder getTimeseriesKeyOrBuilder( + int index); + } + public static final class DeleteTimeseriesMetaRequest extends + com.google.protobuf.GeneratedMessage + implements DeleteTimeseriesMetaRequestOrBuilder { + // Use DeleteTimeseriesMetaRequest.newBuilder() to construct. + private DeleteTimeseriesMetaRequest(Builder builder) { + super(builder); + } + private DeleteTimeseriesMetaRequest(boolean noInit) {} + + private static final DeleteTimeseriesMetaRequest defaultInstance; + public static DeleteTimeseriesMetaRequest getDefaultInstance() { + return defaultInstance; + } + + public DeleteTimeseriesMetaRequest getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DeleteTimeseriesMetaRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DeleteTimeseriesMetaRequest_fieldAccessorTable; + } + + private int bitField0_; + // required string table_name = 1; + public static final int TABLE_NAME_FIELD_NUMBER = 1; + private java.lang.Object tableName_; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + if (com.google.protobuf.Internal.isValidUtf8(bs)) { + tableName_ = s; + } + return s; + } + } + private com.google.protobuf.ByteString getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesKey timeseries_key = 2; + public static final int TIMESERIES_KEY_FIELD_NUMBER = 2; + private java.util.List timeseriesKey_; + public java.util.List getTimeseriesKeyList() { + return timeseriesKey_; + } + public java.util.List + getTimeseriesKeyOrBuilderList() { + return timeseriesKey_; + } + public int getTimeseriesKeyCount() { + return timeseriesKey_.size(); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey getTimeseriesKey(int index) { + return timeseriesKey_.get(index); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKeyOrBuilder getTimeseriesKeyOrBuilder( + int index) { + return timeseriesKey_.get(index); + } + + private void initFields() { + tableName_ = ""; + timeseriesKey_ = java.util.Collections.emptyList(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasTableName()) { + memoizedIsInitialized = 0; + return false; + } + for (int i = 0; i < getTimeseriesKeyCount(); i++) { + if (!getTimeseriesKey(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getTableNameBytes()); + } + for (int i = 0; i < timeseriesKey_.size(); i++) { + output.writeMessage(2, timeseriesKey_.get(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getTableNameBytes()); + } + for (int i = 0; i < timeseriesKey_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, timeseriesKey_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaRequest prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DeleteTimeseriesMetaRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DeleteTimeseriesMetaRequest_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getTimeseriesKeyFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + tableName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + if (timeseriesKeyBuilder_ == null) { + timeseriesKey_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + timeseriesKeyBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaRequest.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaRequest getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaRequest.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaRequest build() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaRequest buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaRequest buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaRequest result = new com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.tableName_ = tableName_; + if (timeseriesKeyBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { + timeseriesKey_ = java.util.Collections.unmodifiableList(timeseriesKey_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.timeseriesKey_ = timeseriesKey_; + } else { + result.timeseriesKey_ = timeseriesKeyBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaRequest) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaRequest other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaRequest.getDefaultInstance()) return this; + if (other.hasTableName()) { + setTableName(other.getTableName()); + } + if (timeseriesKeyBuilder_ == null) { + if (!other.timeseriesKey_.isEmpty()) { + if (timeseriesKey_.isEmpty()) { + timeseriesKey_ = other.timeseriesKey_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureTimeseriesKeyIsMutable(); + timeseriesKey_.addAll(other.timeseriesKey_); + } + onChanged(); + } + } else { + if (!other.timeseriesKey_.isEmpty()) { + if (timeseriesKeyBuilder_.isEmpty()) { + timeseriesKeyBuilder_.dispose(); + timeseriesKeyBuilder_ = null; + timeseriesKey_ = other.timeseriesKey_; + bitField0_ = (bitField0_ & ~0x00000002); + timeseriesKeyBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getTimeseriesKeyFieldBuilder() : null; + } else { + timeseriesKeyBuilder_.addAllMessages(other.timeseriesKey_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasTableName()) { + + return false; + } + for (int i = 0; i < getTimeseriesKeyCount(); i++) { + if (!getTimeseriesKey(i).isInitialized()) { + + return false; + } + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + tableName_ = input.readBytes(); + break; + } + case 18: { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addTimeseriesKey(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // required string table_name = 1; + private java.lang.Object tableName_ = ""; + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + public String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof String)) { + String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); + tableName_ = s; + return s; + } else { + return (String) ref; + } + } + public Builder setTableName(String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + return this; + } + public Builder clearTableName() { + bitField0_ = (bitField0_ & ~0x00000001); + tableName_ = getDefaultInstance().getTableName(); + onChanged(); + return this; + } + void setTableName(com.google.protobuf.ByteString value) { + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesKey timeseries_key = 2; + private java.util.List timeseriesKey_ = + java.util.Collections.emptyList(); + private void ensureTimeseriesKeyIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + timeseriesKey_ = new java.util.ArrayList(timeseriesKey_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKeyOrBuilder> timeseriesKeyBuilder_; + + public java.util.List getTimeseriesKeyList() { + if (timeseriesKeyBuilder_ == null) { + return java.util.Collections.unmodifiableList(timeseriesKey_); + } else { + return timeseriesKeyBuilder_.getMessageList(); + } + } + public int getTimeseriesKeyCount() { + if (timeseriesKeyBuilder_ == null) { + return timeseriesKey_.size(); + } else { + return timeseriesKeyBuilder_.getCount(); + } + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey getTimeseriesKey(int index) { + if (timeseriesKeyBuilder_ == null) { + return timeseriesKey_.get(index); + } else { + return timeseriesKeyBuilder_.getMessage(index); + } + } + public Builder setTimeseriesKey( + int index, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey value) { + if (timeseriesKeyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTimeseriesKeyIsMutable(); + timeseriesKey_.set(index, value); + onChanged(); + } else { + timeseriesKeyBuilder_.setMessage(index, value); + } + return this; + } + public Builder setTimeseriesKey( + int index, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey.Builder builderForValue) { + if (timeseriesKeyBuilder_ == null) { + ensureTimeseriesKeyIsMutable(); + timeseriesKey_.set(index, builderForValue.build()); + onChanged(); + } else { + timeseriesKeyBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + public Builder addTimeseriesKey(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey value) { + if (timeseriesKeyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTimeseriesKeyIsMutable(); + timeseriesKey_.add(value); + onChanged(); + } else { + timeseriesKeyBuilder_.addMessage(value); + } + return this; + } + public Builder addTimeseriesKey( + int index, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey value) { + if (timeseriesKeyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTimeseriesKeyIsMutable(); + timeseriesKey_.add(index, value); + onChanged(); + } else { + timeseriesKeyBuilder_.addMessage(index, value); + } + return this; + } + public Builder addTimeseriesKey( + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey.Builder builderForValue) { + if (timeseriesKeyBuilder_ == null) { + ensureTimeseriesKeyIsMutable(); + timeseriesKey_.add(builderForValue.build()); + onChanged(); + } else { + timeseriesKeyBuilder_.addMessage(builderForValue.build()); + } + return this; + } + public Builder addTimeseriesKey( + int index, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey.Builder builderForValue) { + if (timeseriesKeyBuilder_ == null) { + ensureTimeseriesKeyIsMutable(); + timeseriesKey_.add(index, builderForValue.build()); + onChanged(); + } else { + timeseriesKeyBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAllTimeseriesKey( + java.lang.Iterable values) { + if (timeseriesKeyBuilder_ == null) { + ensureTimeseriesKeyIsMutable(); + super.addAll(values, timeseriesKey_); + onChanged(); + } else { + timeseriesKeyBuilder_.addAllMessages(values); + } + return this; + } + public Builder clearTimeseriesKey() { + if (timeseriesKeyBuilder_ == null) { + timeseriesKey_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + timeseriesKeyBuilder_.clear(); + } + return this; + } + public Builder removeTimeseriesKey(int index) { + if (timeseriesKeyBuilder_ == null) { + ensureTimeseriesKeyIsMutable(); + timeseriesKey_.remove(index); + onChanged(); + } else { + timeseriesKeyBuilder_.remove(index); + } + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey.Builder getTimeseriesKeyBuilder( + int index) { + return getTimeseriesKeyFieldBuilder().getBuilder(index); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKeyOrBuilder getTimeseriesKeyOrBuilder( + int index) { + if (timeseriesKeyBuilder_ == null) { + return timeseriesKey_.get(index); } else { + return timeseriesKeyBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getTimeseriesKeyOrBuilderList() { + if (timeseriesKeyBuilder_ != null) { + return timeseriesKeyBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(timeseriesKey_); + } + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey.Builder addTimeseriesKeyBuilder() { + return getTimeseriesKeyFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey.getDefaultInstance()); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey.Builder addTimeseriesKeyBuilder( + int index) { + return getTimeseriesKeyFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey.getDefaultInstance()); + } + public java.util.List + getTimeseriesKeyBuilderList() { + return getTimeseriesKeyFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKeyOrBuilder> + getTimeseriesKeyFieldBuilder() { + if (timeseriesKeyBuilder_ == null) { + timeseriesKeyBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKeyOrBuilder>( + timeseriesKey_, + ((bitField0_ & 0x00000002) == 0x00000002), + getParentForChildren(), + isClean()); + timeseriesKey_ = null; + } + return timeseriesKeyBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.DeleteTimeseriesMetaRequest) + } + + static { + defaultInstance = new DeleteTimeseriesMetaRequest(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.DeleteTimeseriesMetaRequest) + } + + public interface DeleteTimeseriesMetaResponseOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // repeated .com.alicloud.openservices.tablestore.core.protocol.timeseries.FailedRowInfo failed_rows = 1; + java.util.List + getFailedRowsList(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo getFailedRows(int index); + int getFailedRowsCount(); + java.util.List + getFailedRowsOrBuilderList(); + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfoOrBuilder getFailedRowsOrBuilder( + int index); + } + public static final class DeleteTimeseriesMetaResponse extends + com.google.protobuf.GeneratedMessage + implements DeleteTimeseriesMetaResponseOrBuilder { + // Use DeleteTimeseriesMetaResponse.newBuilder() to construct. + private DeleteTimeseriesMetaResponse(Builder builder) { + super(builder); + } + private DeleteTimeseriesMetaResponse(boolean noInit) {} + + private static final DeleteTimeseriesMetaResponse defaultInstance; + public static DeleteTimeseriesMetaResponse getDefaultInstance() { + return defaultInstance; + } + + public DeleteTimeseriesMetaResponse getDefaultInstanceForType() { + return defaultInstance; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DeleteTimeseriesMetaResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DeleteTimeseriesMetaResponse_fieldAccessorTable; + } + + // repeated .com.alicloud.openservices.tablestore.core.protocol.timeseries.FailedRowInfo failed_rows = 1; + public static final int FAILED_ROWS_FIELD_NUMBER = 1; + private java.util.List failedRows_; + public java.util.List getFailedRowsList() { + return failedRows_; + } + public java.util.List + getFailedRowsOrBuilderList() { + return failedRows_; + } + public int getFailedRowsCount() { + return failedRows_.size(); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo getFailedRows(int index) { + return failedRows_.get(index); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfoOrBuilder getFailedRowsOrBuilder( + int index) { + return failedRows_.get(index); + } + + private void initFields() { + failedRows_ = java.util.Collections.emptyList(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + for (int i = 0; i < getFailedRowsCount(); i++) { + if (!getFailedRows(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < failedRows_.size(); i++) { + output.writeMessage(1, failedRows_.get(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < failedRows_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, failedRows_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return newBuilder().mergeFrom(data, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + Builder builder = newBuilder(); + if (builder.mergeDelimitedFrom(input, extensionRegistry)) { + return builder.buildParsed(); + } else { + return null; + } + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return newBuilder().mergeFrom(input).buildParsed(); + } + public static com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return newBuilder().mergeFrom(input, extensionRegistry) + .buildParsed(); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaResponse prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DeleteTimeseriesMetaResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DeleteTimeseriesMetaResponse_fieldAccessorTable; + } + + // Construct using com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getFailedRowsFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (failedRowsBuilder_ == null) { + failedRows_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + failedRowsBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaResponse.getDescriptor(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaResponse getDefaultInstanceForType() { + return com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaResponse.getDefaultInstance(); + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaResponse build() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + private com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaResponse buildParsed() + throws com.google.protobuf.InvalidProtocolBufferException { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException( + result).asInvalidProtocolBufferException(); + } + return result; + } + + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaResponse buildPartial() { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaResponse result = new com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaResponse(this); + int from_bitField0_ = bitField0_; + if (failedRowsBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + failedRows_ = java.util.Collections.unmodifiableList(failedRows_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.failedRows_ = failedRows_; + } else { + result.failedRows_ = failedRowsBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaResponse) { + return mergeFrom((com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaResponse other) { + if (other == com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaResponse.getDefaultInstance()) return this; + if (failedRowsBuilder_ == null) { + if (!other.failedRows_.isEmpty()) { + if (failedRows_.isEmpty()) { + failedRows_ = other.failedRows_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFailedRowsIsMutable(); + failedRows_.addAll(other.failedRows_); + } + onChanged(); + } + } else { + if (!other.failedRows_.isEmpty()) { + if (failedRowsBuilder_.isEmpty()) { + failedRowsBuilder_.dispose(); + failedRowsBuilder_ = null; + failedRows_ = other.failedRows_; + bitField0_ = (bitField0_ & ~0x00000001); + failedRowsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getFailedRowsFieldBuilder() : null; + } else { + failedRowsBuilder_.addAllMessages(other.failedRows_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + for (int i = 0; i < getFailedRowsCount(); i++) { + if (!getFailedRows(i).isInitialized()) { + + return false; + } + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder( + this.getUnknownFields()); + while (true) { + int tag = input.readTag(); + switch (tag) { + case 0: + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + this.setUnknownFields(unknownFields.build()); + onChanged(); + return this; + } + break; + } + case 10: { + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo.Builder subBuilder = com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo.newBuilder(); + input.readMessage(subBuilder, extensionRegistry); + addFailedRows(subBuilder.buildPartial()); + break; + } + } + } + } + + private int bitField0_; + + // repeated .com.alicloud.openservices.tablestore.core.protocol.timeseries.FailedRowInfo failed_rows = 1; + private java.util.List failedRows_ = + java.util.Collections.emptyList(); + private void ensureFailedRowsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + failedRows_ = new java.util.ArrayList(failedRows_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfoOrBuilder> failedRowsBuilder_; + + public java.util.List getFailedRowsList() { + if (failedRowsBuilder_ == null) { + return java.util.Collections.unmodifiableList(failedRows_); + } else { + return failedRowsBuilder_.getMessageList(); + } + } + public int getFailedRowsCount() { + if (failedRowsBuilder_ == null) { + return failedRows_.size(); + } else { + return failedRowsBuilder_.getCount(); + } + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo getFailedRows(int index) { + if (failedRowsBuilder_ == null) { + return failedRows_.get(index); + } else { + return failedRowsBuilder_.getMessage(index); + } + } + public Builder setFailedRows( + int index, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo value) { + if (failedRowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFailedRowsIsMutable(); + failedRows_.set(index, value); + onChanged(); + } else { + failedRowsBuilder_.setMessage(index, value); + } + return this; + } + public Builder setFailedRows( + int index, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo.Builder builderForValue) { + if (failedRowsBuilder_ == null) { + ensureFailedRowsIsMutable(); + failedRows_.set(index, builderForValue.build()); + onChanged(); + } else { + failedRowsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + public Builder addFailedRows(com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo value) { + if (failedRowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFailedRowsIsMutable(); + failedRows_.add(value); + onChanged(); + } else { + failedRowsBuilder_.addMessage(value); + } + return this; + } + public Builder addFailedRows( + int index, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo value) { + if (failedRowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFailedRowsIsMutable(); + failedRows_.add(index, value); + onChanged(); + } else { + failedRowsBuilder_.addMessage(index, value); + } + return this; + } + public Builder addFailedRows( + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo.Builder builderForValue) { + if (failedRowsBuilder_ == null) { + ensureFailedRowsIsMutable(); + failedRows_.add(builderForValue.build()); + onChanged(); + } else { + failedRowsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + public Builder addFailedRows( + int index, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo.Builder builderForValue) { + if (failedRowsBuilder_ == null) { + ensureFailedRowsIsMutable(); + failedRows_.add(index, builderForValue.build()); + onChanged(); + } else { + failedRowsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + public Builder addAllFailedRows( + java.lang.Iterable values) { + if (failedRowsBuilder_ == null) { + ensureFailedRowsIsMutable(); + super.addAll(values, failedRows_); + onChanged(); + } else { + failedRowsBuilder_.addAllMessages(values); + } + return this; + } + public Builder clearFailedRows() { + if (failedRowsBuilder_ == null) { + failedRows_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + failedRowsBuilder_.clear(); + } + return this; + } + public Builder removeFailedRows(int index) { + if (failedRowsBuilder_ == null) { + ensureFailedRowsIsMutable(); + failedRows_.remove(index); + onChanged(); + } else { + failedRowsBuilder_.remove(index); + } + return this; + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo.Builder getFailedRowsBuilder( + int index) { + return getFailedRowsFieldBuilder().getBuilder(index); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfoOrBuilder getFailedRowsOrBuilder( + int index) { + if (failedRowsBuilder_ == null) { + return failedRows_.get(index); } else { + return failedRowsBuilder_.getMessageOrBuilder(index); + } + } + public java.util.List + getFailedRowsOrBuilderList() { + if (failedRowsBuilder_ != null) { + return failedRowsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(failedRows_); + } + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo.Builder addFailedRowsBuilder() { + return getFailedRowsFieldBuilder().addBuilder( + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo.getDefaultInstance()); + } + public com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo.Builder addFailedRowsBuilder( + int index) { + return getFailedRowsFieldBuilder().addBuilder( + index, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo.getDefaultInstance()); + } + public java.util.List + getFailedRowsBuilderList() { + return getFailedRowsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfoOrBuilder> + getFailedRowsFieldBuilder() { + if (failedRowsBuilder_ == null) { + failedRowsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo.Builder, com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfoOrBuilder>( + failedRows_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + failedRows_ = null; + } + return failedRowsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.DeleteTimeseriesMetaResponse) + } + + static { + defaultInstance = new DeleteTimeseriesMetaResponse(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.alicloud.openservices.tablestore.core.protocol.timeseries.DeleteTimeseriesMetaResponse) + } + + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesTableOptions_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesTableOptions_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesTableMeta_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesTableMeta_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_CreateTimeseriesTableRequest_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_CreateTimeseriesTableRequest_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_CreateTimeseriesTableResponse_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_CreateTimeseriesTableResponse_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_ListTimeseriesTableRequest_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_ListTimeseriesTableRequest_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_ListTimeseriesTableResponse_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_ListTimeseriesTableResponse_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DeleteTimeseriesTableRequest_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DeleteTimeseriesTableRequest_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DeleteTimeseriesTableResponse_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DeleteTimeseriesTableResponse_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_UpdateTimeseriesTableRequest_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_UpdateTimeseriesTableRequest_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_UpdateTimeseriesTableResponse_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_UpdateTimeseriesTableResponse_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DescribeTimeseriesTableRequest_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DescribeTimeseriesTableRequest_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DescribeTimeseriesTableResponse_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DescribeTimeseriesTableResponse_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryCondition_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryCondition_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryCompositeCondition_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryCompositeCondition_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryMeasurementCondition_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryMeasurementCondition_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQuerySourceCondition_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQuerySourceCondition_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryTagCondition_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryTagCondition_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryAttributeCondition_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryAttributeCondition_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryUpdateTimeCondition_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryUpdateTimeCondition_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesKey_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesKey_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesMeta_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesMeta_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_QueryTimeseriesMetaRequest_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_QueryTimeseriesMetaRequest_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_QueryTimeseriesMetaResponse_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_QueryTimeseriesMetaResponse_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesRows_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesRows_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_PutTimeseriesDataRequest_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_PutTimeseriesDataRequest_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_FailedRowInfo_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_FailedRowInfo_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaUpdateStatus_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaUpdateStatus_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_PutTimeseriesDataResponse_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_PutTimeseriesDataResponse_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesFieldsToGet_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesFieldsToGet_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_GetTimeseriesDataRequest_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_GetTimeseriesDataRequest_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_GetTimeseriesDataResponse_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_GetTimeseriesDataResponse_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_UpdateTimeseriesMetaRequest_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_UpdateTimeseriesMetaRequest_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_UpdateTimeseriesMetaResponse_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_UpdateTimeseriesMetaResponse_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DeleteTimeseriesMetaRequest_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DeleteTimeseriesMetaRequest_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DeleteTimeseriesMetaResponse_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DeleteTimeseriesMetaResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\nNcom/alicloud/openservices/tablestore/c" + + "ore/protocol/timeseries/timeseries.proto" + + "\022=com.alicloud.openservices.tablestore.c" + + "ore.protocol.timeseries\".\n\026TimeseriesTab" + + "leOptions\022\024\n\014time_to_live\030\001 \001(\005\"\247\001\n\023Time" + + "seriesTableMeta\022\022\n\ntable_name\030\001 \002(\t\022l\n\rt" + + "able_options\030\002 \001(\0132U.com.alicloud.opense" + + "rvices.tablestore.core.protocol.timeseri" + + "es.TimeseriesTableOptions\022\016\n\006status\030\003 \001(" + + "\t\"\206\001\n\034CreateTimeseriesTableRequest\022f\n\nta", + "ble_meta\030\001 \002(\0132R.com.alicloud.openservic" + + "es.tablestore.core.protocol.timeseries.T" + + "imeseriesTableMeta\"\037\n\035CreateTimeseriesTa" + + "bleResponse\"\034\n\032ListTimeseriesTableReques" + + "t\"\206\001\n\033ListTimeseriesTableResponse\022g\n\013tab" + + "le_metas\030\001 \003(\0132R.com.alicloud.openservic" + + "es.tablestore.core.protocol.timeseries.T" + + "imeseriesTableMeta\"2\n\034DeleteTimeseriesTa" + + "bleRequest\022\022\n\ntable_name\030\001 \002(\t\"\037\n\035Delete" + + "TimeseriesTableResponse\"\240\001\n\034UpdateTimese", + "riesTableRequest\022\022\n\ntable_name\030\001 \002(\t\022l\n\r" + + "table_options\030\002 \001(\0132U.com.alicloud.opens" + + "ervices.tablestore.core.protocol.timeser" + + "ies.TimeseriesTableOptions\"\037\n\035UpdateTime" + + "seriesTableResponse\"4\n\036DescribeTimeserie" + + "sTableRequest\022\022\n\ntable_name\030\001 \002(\t\"\211\001\n\037De" + + "scribeTimeseriesTableResponse\022f\n\ntable_m" + + "eta\030\001 \002(\0132R.com.alicloud.openservices.ta" + + "blestore.core.protocol.timeseries.Timese" + + "riesTableMeta\"\215\001\n\022MetaQueryCondition\022c\n\004", + "type\030\001 \002(\0162U.com.alicloud.openservices.t" + + "ablestore.core.protocol.timeseries.MetaQ" + + "ueryConditionType\022\022\n\nproto_data\030\002 \002(\014\"\357\001" + + "\n\033MetaQueryCompositeCondition\022e\n\002op\030\001 \002(" + + "\0162Y.com.alicloud.openservices.tablestore" + + ".core.protocol.timeseries.MetaQueryCompo" + + "siteOperator\022i\n\016sub_conditions\030\002 \003(\0132Q.c" + + "om.alicloud.openservices.tablestore.core" + + ".protocol.timeseries.MetaQueryCondition\"" + + "\222\001\n\035MetaQueryMeasurementCondition\022b\n\002op\030", + "\001 \002(\0162V.com.alicloud.openservices.tables" + + "tore.core.protocol.timeseries.MetaQueryS" + + "ingleOperator\022\r\n\005value\030\002 \002(\t\"\215\001\n\030MetaQue" + + "rySourceCondition\022b\n\002op\030\001 \002(\0162V.com.alic" + + "loud.openservices.tablestore.core.protoc" + + "ol.timeseries.MetaQuerySingleOperator\022\r\n" + + "\005value\030\002 \002(\t\"\234\001\n\025MetaQueryTagCondition\022b" + + "\n\002op\030\001 \002(\0162V.com.alicloud.openservices.t" + + "ablestore.core.protocol.timeseries.MetaQ" + + "uerySingleOperator\022\020\n\010tag_name\030\002 \002(\t\022\r\n\005", + "value\030\003 \002(\t\"\243\001\n\033MetaQueryAttributeCondit" + + "ion\022b\n\002op\030\001 \002(\0162V.com.alicloud.openservi" + + "ces.tablestore.core.protocol.timeseries." + + "MetaQuerySingleOperator\022\021\n\tattr_name\030\002 \002" + + "(\t\022\r\n\005value\030\003 \002(\t\"\221\001\n\034MetaQueryUpdateTim" + + "eCondition\022b\n\002op\030\001 \002(\0162V.com.alicloud.op" + + "enservices.tablestore.core.protocol.time" + + "series.MetaQuerySingleOperator\022\r\n\005value\030" + + "\002 \002(\003\"B\n\rTimeseriesKey\022\023\n\013measurement\030\001 " + + "\002(\t\022\016\n\006source\030\002 \002(\t\022\014\n\004tags\030\003 \002(\t\"\240\001\n\016Ti", + "meseriesMeta\022e\n\017time_series_key\030\001 \002(\0132L." + + "com.alicloud.openservices.tablestore.cor" + + "e.protocol.timeseries.TimeseriesKey\022\022\n\na" + + "ttributes\030\002 \001(\t\022\023\n\013update_time\030\003 \001(\003\"\313\001\n" + + "\032QueryTimeseriesMetaRequest\022\022\n\ntable_nam" + + "e\030\001 \002(\t\022d\n\tcondition\030\002 \001(\0132Q.com.aliclou" + + "d.openservices.tablestore.core.protocol." + + "timeseries.MetaQueryCondition\022\025\n\rget_tot" + + "al_hit\030\003 \001(\010\022\r\n\005token\030\004 \001(\014\022\r\n\005limit\030\005 \001" + + "(\005\"\255\001\n\033QueryTimeseriesMetaResponse\022g\n\020ti", + "meseries_metas\030\001 \003(\0132M.com.alicloud.open" + + "services.tablestore.core.protocol.timese" + + "ries.TimeseriesMeta\022\021\n\ttotal_hit\030\002 \001(\003\022\022" + + "\n\nnext_token\030\003 \001(\014\"\236\001\n\016TimeseriesRows\022^\n" + + "\004type\030\001 \002(\0162P.com.alicloud.openservices." + + "tablestore.core.protocol.timeseries.Rows" + + "SerializeType\022\021\n\trows_data\030\002 \002(\014\022\031\n\021flat" + + "buffer_crc32c\030\003 \001(\005\"\371\001\n\030PutTimeseriesDat" + + "aRequest\022\022\n\ntable_name\030\001 \002(\t\022`\n\trows_dat" + + "a\030\002 \002(\0132M.com.alicloud.openservices.tabl", + "estore.core.protocol.timeseries.Timeseri" + + "esRows\022g\n\020meta_update_mode\030\003 \001(\0162M.com.a" + + "licloud.openservices.tablestore.core.pro" + + "tocol.timeseries.MetaUpdateMode\"M\n\rFaile" + + "dRowInfo\022\021\n\trow_index\030\001 \002(\005\022\022\n\nerror_cod" + + "e\030\002 \001(\t\022\025\n\rerror_message\030\003 \001(\t\">\n\020MetaUp" + + "dateStatus\022\017\n\007row_ids\030\001 \003(\r\022\031\n\021meta_upda" + + "te_times\030\002 \003(\r\"\353\001\n\031PutTimeseriesDataResp" + + "onse\022a\n\013failed_rows\030\001 \003(\0132L.com.alicloud" + + ".openservices.tablestore.core.protocol.t", + "imeseries.FailedRowInfo\022k\n\022meta_update_s" + + "tatus\030\002 \001(\0132O.com.alicloud.openservices." + + "tablestore.core.protocol.timeseries.Meta" + + "UpdateStatus\"3\n\025TimeseriesFieldsToGet\022\014\n" + + "\004name\030\001 \001(\t\022\014\n\004type\030\002 \001(\005\"\357\002\n\030GetTimeser" + + "iesDataRequest\022\022\n\ntable_name\030\001 \002(\t\022e\n\017ti" + + "me_series_key\030\002 \002(\0132L.com.alicloud.opens" + + "ervices.tablestore.core.protocol.timeser" + + "ies.TimeseriesKey\022\022\n\nbegin_time\030\003 \001(\003\022\020\n" + + "\010end_time\030\004 \001(\003\022\025\n\rspecific_time\030\005 \001(\003\022\r", + "\n\005token\030\006 \001(\014\022\r\n\005limit\030\007 \001(\005\022\020\n\010backward" + + "\030\010 \001(\010\022k\n\rfields_to_get\030\t \003(\0132T.com.alic" + + "loud.openservices.tablestore.core.protoc" + + "ol.timeseries.TimeseriesFieldsToGet\"B\n\031G" + + "etTimeseriesDataResponse\022\021\n\trows_data\030\001 " + + "\002(\014\022\022\n\nnext_token\030\002 \001(\014\"\231\001\n\033UpdateTimese" + + "riesMetaRequest\022\022\n\ntable_name\030\001 \002(\t\022f\n\017t" + + "imeseries_meta\030\002 \003(\0132M.com.alicloud.open" + + "services.tablestore.core.protocol.timese" + + "ries.TimeseriesMeta\"\201\001\n\034UpdateTimeseries", + "MetaResponse\022a\n\013failed_rows\030\001 \003(\0132L.com." + + "alicloud.openservices.tablestore.core.pr" + + "otocol.timeseries.FailedRowInfo\"\227\001\n\033Dele" + + "teTimeseriesMetaRequest\022\022\n\ntable_name\030\001 " + + "\002(\t\022d\n\016timeseries_key\030\002 \003(\0132L.com.aliclo" + + "ud.openservices.tablestore.core.protocol" + + ".timeseries.TimeseriesKey\"\201\001\n\034DeleteTime" + + "seriesMetaResponse\022a\n\013failed_rows\030\001 \003(\0132" + + "L.com.alicloud.openservices.tablestore.c" + + "ore.protocol.timeseries.FailedRowInfo*\251\001", + "\n\026MetaQueryConditionType\022\027\n\023COMPOSITE_CO" + + "NDITION\020\001\022\031\n\025MEASUREMENT_CONDITION\020\002\022\024\n\020" + + "SOURCE_CONDITION\020\003\022\021\n\rTAG_CONDITION\020\004\022\031\n" + + "\025UPDATE_TIME_CONDITION\020\005\022\027\n\023ATTRIBUTE_CO" + + "NDITION\020\006*?\n\032MetaQueryCompositeOperator\022" + + "\n\n\006OP_AND\020\001\022\t\n\005OP_OR\020\002\022\n\n\006OP_NOT\020\003*\206\001\n\027M" + + "etaQuerySingleOperator\022\014\n\010OP_EQUAL\020\001\022\023\n\017" + + "OP_GREATER_THAN\020\002\022\024\n\020OP_GREATER_EQUAL\020\003\022" + + "\020\n\014OP_LESS_THAN\020\004\022\021\n\rOP_LESS_EQUAL\020\005\022\r\n\t" + + "OP_PREFIX\020\006*(\n\021RowsSerializeType\022\023\n\017RST_", + "FLAT_BUFFER\020\000*0\n\016MetaUpdateMode\022\016\n\nMUM_N" + + "ORMAL\020\000\022\016\n\nMUM_IGNORE\020\001" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesTableOptions_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesTableOptions_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesTableOptions_descriptor, + new java.lang.String[] { "TimeToLive", }, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions.class, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableOptions.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesTableMeta_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesTableMeta_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesTableMeta_descriptor, + new java.lang.String[] { "TableName", "TableOptions", "Status", }, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta.class, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesTableMeta.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_CreateTimeseriesTableRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_CreateTimeseriesTableRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_CreateTimeseriesTableRequest_descriptor, + new java.lang.String[] { "TableMeta", }, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableRequest.class, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableRequest.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_CreateTimeseriesTableResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_CreateTimeseriesTableResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_CreateTimeseriesTableResponse_descriptor, + new java.lang.String[] { }, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableResponse.class, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.CreateTimeseriesTableResponse.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_ListTimeseriesTableRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_ListTimeseriesTableRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_ListTimeseriesTableRequest_descriptor, + new java.lang.String[] { }, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableRequest.class, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableRequest.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_ListTimeseriesTableResponse_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_ListTimeseriesTableResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_ListTimeseriesTableResponse_descriptor, + new java.lang.String[] { "TableMetas", }, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableResponse.class, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.ListTimeseriesTableResponse.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DeleteTimeseriesTableRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DeleteTimeseriesTableRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DeleteTimeseriesTableRequest_descriptor, + new java.lang.String[] { "TableName", }, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableRequest.class, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableRequest.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DeleteTimeseriesTableResponse_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DeleteTimeseriesTableResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DeleteTimeseriesTableResponse_descriptor, + new java.lang.String[] { }, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableResponse.class, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesTableResponse.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_UpdateTimeseriesTableRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_UpdateTimeseriesTableRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_UpdateTimeseriesTableRequest_descriptor, + new java.lang.String[] { "TableName", "TableOptions", }, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableRequest.class, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableRequest.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_UpdateTimeseriesTableResponse_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_UpdateTimeseriesTableResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_UpdateTimeseriesTableResponse_descriptor, + new java.lang.String[] { }, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableResponse.class, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesTableResponse.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DescribeTimeseriesTableRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DescribeTimeseriesTableRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DescribeTimeseriesTableRequest_descriptor, + new java.lang.String[] { "TableName", }, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableRequest.class, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableRequest.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DescribeTimeseriesTableResponse_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DescribeTimeseriesTableResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DescribeTimeseriesTableResponse_descriptor, + new java.lang.String[] { "TableMeta", }, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableResponse.class, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DescribeTimeseriesTableResponse.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryCondition_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryCondition_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryCondition_descriptor, + new java.lang.String[] { "Type", "ProtoData", }, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition.class, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCondition.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryCompositeCondition_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryCompositeCondition_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryCompositeCondition_descriptor, + new java.lang.String[] { "Op", "SubConditions", }, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCompositeCondition.class, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryCompositeCondition.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryMeasurementCondition_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryMeasurementCondition_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryMeasurementCondition_descriptor, + new java.lang.String[] { "Op", "Value", }, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryMeasurementCondition.class, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryMeasurementCondition.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQuerySourceCondition_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQuerySourceCondition_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQuerySourceCondition_descriptor, + new java.lang.String[] { "Op", "Value", }, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySourceCondition.class, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQuerySourceCondition.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryTagCondition_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryTagCondition_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryTagCondition_descriptor, + new java.lang.String[] { "Op", "TagName", "Value", }, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryTagCondition.class, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryTagCondition.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryAttributeCondition_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryAttributeCondition_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryAttributeCondition_descriptor, + new java.lang.String[] { "Op", "AttrName", "Value", }, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryAttributeCondition.class, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryAttributeCondition.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryUpdateTimeCondition_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryUpdateTimeCondition_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaQueryUpdateTimeCondition_descriptor, + new java.lang.String[] { "Op", "Value", }, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryUpdateTimeCondition.class, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaQueryUpdateTimeCondition.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesKey_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesKey_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesKey_descriptor, + new java.lang.String[] { "Measurement", "Source", "Tags", }, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey.class, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesKey.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesMeta_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesMeta_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesMeta_descriptor, + new java.lang.String[] { "TimeSeriesKey", "Attributes", "UpdateTime", }, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta.class, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesMeta.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_QueryTimeseriesMetaRequest_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_QueryTimeseriesMetaRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_QueryTimeseriesMetaRequest_descriptor, + new java.lang.String[] { "TableName", "Condition", "GetTotalHit", "Token", "Limit", }, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaRequest.class, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaRequest.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_QueryTimeseriesMetaResponse_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_QueryTimeseriesMetaResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_QueryTimeseriesMetaResponse_descriptor, + new java.lang.String[] { "TimeseriesMetas", "TotalHit", "NextToken", }, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaResponse.class, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.QueryTimeseriesMetaResponse.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesRows_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesRows_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesRows_descriptor, + new java.lang.String[] { "Type", "RowsData", "FlatbufferCrc32C", }, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows.class, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesRows.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_PutTimeseriesDataRequest_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_PutTimeseriesDataRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_PutTimeseriesDataRequest_descriptor, + new java.lang.String[] { "TableName", "RowsData", "MetaUpdateMode", }, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataRequest.class, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataRequest.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_FailedRowInfo_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_FailedRowInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_FailedRowInfo_descriptor, + new java.lang.String[] { "RowIndex", "ErrorCode", "ErrorMessage", }, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo.class, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.FailedRowInfo.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaUpdateStatus_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaUpdateStatus_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_MetaUpdateStatus_descriptor, + new java.lang.String[] { "RowIds", "MetaUpdateTimes", }, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus.class, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.MetaUpdateStatus.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_PutTimeseriesDataResponse_descriptor = + getDescriptor().getMessageTypes().get(27); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_PutTimeseriesDataResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_PutTimeseriesDataResponse_descriptor, + new java.lang.String[] { "FailedRows", "MetaUpdateStatus", }, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataResponse.class, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.PutTimeseriesDataResponse.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesFieldsToGet_descriptor = + getDescriptor().getMessageTypes().get(28); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesFieldsToGet_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_TimeseriesFieldsToGet_descriptor, + new java.lang.String[] { "Name", "Type", }, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGet.class, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.TimeseriesFieldsToGet.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_GetTimeseriesDataRequest_descriptor = + getDescriptor().getMessageTypes().get(29); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_GetTimeseriesDataRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_GetTimeseriesDataRequest_descriptor, + new java.lang.String[] { "TableName", "TimeSeriesKey", "BeginTime", "EndTime", "SpecificTime", "Token", "Limit", "Backward", "FieldsToGet", }, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataRequest.class, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataRequest.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_GetTimeseriesDataResponse_descriptor = + getDescriptor().getMessageTypes().get(30); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_GetTimeseriesDataResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_GetTimeseriesDataResponse_descriptor, + new java.lang.String[] { "RowsData", "NextToken", }, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataResponse.class, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.GetTimeseriesDataResponse.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_UpdateTimeseriesMetaRequest_descriptor = + getDescriptor().getMessageTypes().get(31); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_UpdateTimeseriesMetaRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_UpdateTimeseriesMetaRequest_descriptor, + new java.lang.String[] { "TableName", "TimeseriesMeta", }, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaRequest.class, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaRequest.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_UpdateTimeseriesMetaResponse_descriptor = + getDescriptor().getMessageTypes().get(32); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_UpdateTimeseriesMetaResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_UpdateTimeseriesMetaResponse_descriptor, + new java.lang.String[] { "FailedRows", }, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaResponse.class, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.UpdateTimeseriesMetaResponse.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DeleteTimeseriesMetaRequest_descriptor = + getDescriptor().getMessageTypes().get(33); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DeleteTimeseriesMetaRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DeleteTimeseriesMetaRequest_descriptor, + new java.lang.String[] { "TableName", "TimeseriesKey", }, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaRequest.class, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaRequest.Builder.class); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DeleteTimeseriesMetaResponse_descriptor = + getDescriptor().getMessageTypes().get(34); + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DeleteTimeseriesMetaResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_alicloud_openservices_tablestore_core_protocol_timeseries_DeleteTimeseriesMetaResponse_descriptor, + new java.lang.String[] { "FailedRows", }, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaResponse.class, + com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries.DeleteTimeseriesMetaResponse.Builder.class); + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/timeseries/TimeseriesProtocolBuilder.java b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/timeseries/TimeseriesProtocolBuilder.java new file mode 100644 index 0000000..6caa229 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/timeseries/TimeseriesProtocolBuilder.java @@ -0,0 +1,401 @@ +package com.alicloud.openservices.tablestore.core.protocol.timeseries; + +import com.alicloud.openservices.tablestore.core.protocol.timeseries.flatbuffer.*; +import com.alicloud.openservices.tablestore.core.utils.Pair; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.alicloud.openservices.tablestore.core.utils.PureJavaCrc32C; +import com.alicloud.openservices.tablestore.model.ColumnValue; +import com.alicloud.openservices.tablestore.model.*; +import com.alicloud.openservices.tablestore.model.timeseries.*; +import com.google.common.cache.Cache; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.protobuf.ByteString; + +import java.nio.ByteBuffer; +import java.util.List; +import java.util.Map; +import java.util.SortedMap; +import java.util.zip.Checksum; + +public class TimeseriesProtocolBuilder { + + public static void checkTagKey(String s) { + if (s.isEmpty()) { + throw new IllegalArgumentException("empty tag key"); + } + for (int i = 0; i < s.length(); i++) { + if (s.charAt(i) >= '!' && s.charAt(i) <= '~' && s.charAt(i) != '"' && s.charAt(i) != '=') { + // valid + } else { + throw new IllegalArgumentException("invalid tag key: " + s); + } + } + } + + public static void checkTagValue(String s) { + if (s.isEmpty()) { + throw new IllegalArgumentException("empty tag value"); + } + for (int i = 0; i < s.length(); i++) { + if (s.charAt(i) != '"' && s.charAt(i) != '=') { + // valid + } else { + throw new IllegalArgumentException("invalid tag value: " + s); + } + } + } + + public static String buildTagsString(SortedMap tags) { + int capacity = 2; + for (Map.Entry entry : tags.entrySet()) { + capacity += entry.getKey().length() + entry.getValue().length() + 3; + } + StringBuilder sb = new StringBuilder(capacity); + sb.append('['); + boolean first = true; + for (Map.Entry entry : tags.entrySet()) { + checkTagKey(entry.getKey()); + checkTagValue(entry.getValue()); + if (!first) { + sb.append(','); + } + sb.append('"'); + sb.append(entry.getKey()); + sb.append('='); + sb.append(entry.getValue()); + sb.append('"'); + first = false; + } + sb.append(']'); + return sb.toString(); + } + + public static int buildRowToRowGroupOffset(TimeseriesRow row, FlatBufferBuilder fbb, String timeseriesTableName, Cache timeseriesMetaCache) { + int fieldCount = row.getFields().size(); + byte[] fieldValueTypes = new byte[fieldCount]; + int[] fieldNameOffs = new int[fieldCount]; + int idx = 0; + int longValueCount = 0; + int boolValueCount = 0; + int doubleValueCount = 0; + int stringValueCount = 0; + int binaryValueCount = 0; + for (Map.Entry entry : row.getFields().entrySet()) { + fieldNameOffs[idx] = fbb.createString(entry.getKey()); + switch (entry.getValue().getType()) { + case INTEGER: { + fieldValueTypes[idx] = DataType.LONG; + longValueCount++; + break; + } + case BOOLEAN: { + fieldValueTypes[idx] = DataType.BOOLEAN; + boolValueCount++; + break; + } + case DOUBLE: { + fieldValueTypes[idx] = DataType.DOUBLE; + doubleValueCount++; + break; + } + case STRING: { + fieldValueTypes[idx] = DataType.STRING; + stringValueCount++; + break; + } + case BINARY: { + fieldValueTypes[idx] = DataType.BINARY; + binaryValueCount++; + break; + } + default: + throw new IllegalStateException(); + } + idx++; + } + long[] longValues = new long[longValueCount]; + boolean[] boolValues = new boolean[boolValueCount]; + double[] doubleValues = new double[doubleValueCount]; + int[] strValueOffs = new int[stringValueCount]; + int[] binaryValueOffs = new int[binaryValueCount]; + longValueCount = 0; + boolValueCount = 0; + doubleValueCount = 0; + stringValueCount = 0; + binaryValueCount = 0; + for (Map.Entry entry : row.getFields().entrySet()) { + switch (entry.getValue().getType()) { + case INTEGER: { + longValues[longValueCount++] = entry.getValue().asLong(); + break; + } + case BOOLEAN: { + boolValues[boolValueCount++] = entry.getValue().asBoolean(); + break; + } + case DOUBLE: { + doubleValues[doubleValueCount++] = entry.getValue().asDouble(); + break; + } + case STRING: { + strValueOffs[stringValueCount++] = fbb.createString(entry.getValue().asString()); + break; + } + case BINARY: { + binaryValueOffs[binaryValueCount++] = BytesValue.createBytesValue(fbb, + BytesValue.createValueVector(fbb, entry.getValue().asBinary())); + break; + } + default: + throw new IllegalStateException(); + } + } + int fieldValueOff = FieldValues.createFieldValues(fbb, + longValueCount == 0 ? 0 : FieldValues.createLongValuesVector(fbb, longValues), + boolValueCount == 0 ? 0 : FieldValues.createBoolValuesVector(fbb, boolValues), + doubleValueCount == 0 ? 0 : FieldValues.createDoubleValuesVector(fbb, doubleValues), + stringValueCount == 0 ? 0 : FieldValues.createStringValuesVector(fbb, strValueOffs), + binaryValueCount == 0 ? 0 : FieldValues.createBinaryValuesVector(fbb, binaryValueOffs)); + int[] rowInGroupOffs = new int[1]; + Long updateTimeInSec = timeseriesMetaCache.getIfPresent(row.getTimeseriesKey().buildMetaCacheKey(timeseriesTableName)); + long updateTime = updateTimeInSec == null ? 0 : updateTimeInSec; + rowInGroupOffs[0] = FlatBufferRowInGroup.createFlatBufferRowInGroup(fbb, + row.getTimeseriesKey().getDataSource() == null ? fbb.createString("") : fbb.createString(row.getTimeseriesKey().getDataSource()), + fbb.createString(row.getTimeseriesKey().buildTagsString()), + row.getTimeInUs(), fieldValueOff, updateTime); + return FlatBufferRowGroup.createFlatBufferRowGroup(fbb, fbb.createString(row.getTimeseriesKey().getMeasurementName()), + FlatBufferRowGroup.createFieldNamesVector(fbb, fieldNameOffs), + FlatBufferRowGroup.createFieldTypesVector(fbb, fieldValueTypes), + FlatBufferRowGroup.createRowsVector(fbb, rowInGroupOffs)); + } + + private static Timeseries.TimeseriesTableOptions buildTimeseriesTableOptions(TimeseriesTableOptions timeseriesTableOptions) { + + Timeseries.TimeseriesTableOptions.Builder builder = Timeseries.TimeseriesTableOptions.newBuilder(); + + if (timeseriesTableOptions.hasSetTimeToLive()) { + builder.setTimeToLive(timeseriesTableOptions.getTimeToLive()); + } + + return builder.build(); + } + + public static Timeseries.TimeseriesTableMeta buildTimeseriesTableMeta(TimeseriesTableMeta timeseriesTableMeta) { + Timeseries.TimeseriesTableMeta.Builder builder = Timeseries.TimeseriesTableMeta.newBuilder(); + + // required string table_name = 1; + builder.setTableName(timeseriesTableMeta.getTimeseriesTableName()); + + // optional TimeseriesTableOptions table_options = 2; + builder.setTableOptions(buildTimeseriesTableOptions(timeseriesTableMeta.getTimeseriesTableOptions())); + + return builder.build(); + } + + public static ByteBuffer buildFlatbufferRows(List rows, String timeseriesTableName, Cache timeseriesMetaCache) { + FlatBufferBuilder fbb = new FlatBufferBuilder(); + int[] rowGroupOffs = new int[rows.size()]; + for (int i = 0; i < rows.size(); i++) { + TimeseriesRow row = rows.get(i); + rowGroupOffs[i] = buildRowToRowGroupOffset(row, fbb, timeseriesTableName, timeseriesMetaCache); + } + int rowsOffset = FlatBufferRows.createFlatBufferRows(fbb, FlatBufferRows.createRowGroupsVector(fbb, rowGroupOffs)); + fbb.finish(rowsOffset); + return fbb.dataBuffer(); + } + + public static Timeseries.CreateTimeseriesTableRequest buildCreateTimeseriesTableRequest(CreateTimeseriesTableRequest createTimeseriesTableRequest) { + + Timeseries.CreateTimeseriesTableRequest.Builder builder = Timeseries.CreateTimeseriesTableRequest.newBuilder(); + + // required TimeseriesTableMeta table_meta = 1; + builder.setTableMeta(buildTimeseriesTableMeta(createTimeseriesTableRequest.getTimeseriesTableMeta())); + + return builder.build(); + } + + public static Timeseries.PutTimeseriesDataRequest buildPutTimeseriesDataRequest(PutTimeseriesDataRequest request, Cache timeseriesMetaCache) { + Timeseries.PutTimeseriesDataRequest.Builder builder = Timeseries.PutTimeseriesDataRequest.newBuilder(); + builder.setTableName(request.getTimeseriesTableName()); + + Timeseries.TimeseriesRows.Builder rowsBuilder = Timeseries.TimeseriesRows.newBuilder(); + rowsBuilder.setType(Timeseries.RowsSerializeType.RST_FLAT_BUFFER); + ByteBuffer flatbufferRowsData = buildFlatbufferRows(request.getRows(), request.getTimeseriesTableName(), timeseriesMetaCache); + + Checksum crc32c = new PureJavaCrc32C(); + crc32c.update(flatbufferRowsData.array(), flatbufferRowsData.position() + flatbufferRowsData.arrayOffset(), + flatbufferRowsData.remaining()); + int crc = (int) crc32c.getValue(); + byte[] data = new byte[flatbufferRowsData.remaining()]; + for (int i = 0; i < flatbufferRowsData.remaining(); i++) { + data[i] = flatbufferRowsData.array()[i + flatbufferRowsData.position() + flatbufferRowsData.arrayOffset()]; + } + rowsBuilder.setRowsData(ByteString.copyFrom(flatbufferRowsData)); + rowsBuilder.setFlatbufferCrc32C(crc); + builder.setRowsData(rowsBuilder); + return builder.build(); + } + + public static Timeseries.TimeseriesKey buildTimeseriesKey(TimeseriesKey timeseriesKey) { + Timeseries.TimeseriesKey.Builder tsKeyBuilder = Timeseries.TimeseriesKey.newBuilder(); + tsKeyBuilder.setMeasurement(timeseriesKey.getMeasurementName()); + tsKeyBuilder.setSource(timeseriesKey.getDataSource()); + tsKeyBuilder.setTags(buildTagsString(timeseriesKey.getTags())); + return tsKeyBuilder.build(); + } + + public static Timeseries.GetTimeseriesDataRequest buildGetTimeseriesDataRequest(GetTimeseriesDataRequest request) { + Preconditions.checkNotNull(request.getTimeseriesTableName()); + Preconditions.checkNotNull(request.getTimeseriesKey()); + Preconditions.checkNotNull(request.getTimeseriesKey().getMeasurementName()); + Preconditions.checkNotNull(request.getTimeseriesKey().getDataSource()); + Preconditions.checkArgument(request.getEndTimeInUs() > 0, "time range not set"); + Preconditions.checkArgument(request.getBeginTimeInUs() < request.getEndTimeInUs(), + "end time should be large than begin time"); + Timeseries.GetTimeseriesDataRequest.Builder builder = Timeseries.GetTimeseriesDataRequest.newBuilder(); + builder.setTableName(request.getTimeseriesTableName()); + builder.setTimeSeriesKey(buildTimeseriesKey(request.getTimeseriesKey())); + builder.setBeginTime(request.getBeginTimeInUs()); + builder.setEndTime(request.getEndTimeInUs()); + if (request.isBackward()) { + builder.setBackward(true); + } + if (!request.getFieldsToGet().isEmpty()) { + for (Pair field : request.getFieldsToGet()) { + Timeseries.TimeseriesFieldsToGet.Builder fieldsToGet = Timeseries.TimeseriesFieldsToGet.newBuilder(); + Preconditions.checkStringNotNullAndEmpty(field.getFirst(), "field name is empty"); + Preconditions.checkNotNull(field.getSecond()); + fieldsToGet.setName(field.getFirst()); + switch (field.getSecond()) { + case INTEGER: { + fieldsToGet.setType(DataType.LONG); + break; + } + case DOUBLE: { + fieldsToGet.setType(DataType.DOUBLE); + break; + } + case STRING: { + fieldsToGet.setType(DataType.STRING); + break; + } + case BINARY: { + fieldsToGet.setType(DataType.BINARY); + break; + } + case BOOLEAN: { + fieldsToGet.setType(DataType.BOOLEAN); + break; + } + default: { + throw new IllegalStateException(); + } + } + builder.addFieldsToGet(fieldsToGet); + } + } + if (request.getNextToken() != null && request.getNextToken().length != 0) { + builder.setToken(ByteString.copyFrom(request.getNextToken())); + } + if (request.getLimit() > 0) { + builder.setLimit(request.getLimit()); + } + return builder.build(); + } + + public static Timeseries.MetaQueryCondition buildMetaQueryCondition(MetaQueryCondition condition) { + Timeseries.MetaQueryCondition.Builder builder = Timeseries.MetaQueryCondition.newBuilder(); + builder.setType(condition.getType()); + builder.setProtoData(condition.serialize()); + return builder.build(); + } + + public static Timeseries.QueryTimeseriesMetaRequest buildQueryTimeseriesMetaRequest(QueryTimeseriesMetaRequest request) { + Preconditions.checkNotNull(request.getTimeseriesTableName()); + Timeseries.QueryTimeseriesMetaRequest.Builder builder = Timeseries.QueryTimeseriesMetaRequest.newBuilder(); + builder.setTableName(request.getTimeseriesTableName()); + if (request.getCondition() != null) { + builder.setCondition(buildMetaQueryCondition(request.getCondition())); + } + builder.setGetTotalHit(request.isGetTotalHits()); + if (request.getNextToken() != null && request.getNextToken().length != 0) { + builder.setToken(ByteString.copyFrom(request.getNextToken())); + } + if (request.getLimit() > 0) { + builder.setLimit(request.getLimit()); + } + return builder.build(); + } + + public static Timeseries.ListTimeseriesTableRequest buildListTimeseriesTableRequest(ListTimeseriesTableRequest request) { + Timeseries.ListTimeseriesTableRequest.Builder builder = Timeseries.ListTimeseriesTableRequest.newBuilder(); + return builder.build(); + } + + public static Timeseries.DeleteTimeseriesTableRequest buildDeleteTimeseriesTableRequest(DeleteTimeseriesTableRequest deleteTimeseriesTableRequest) { + Timeseries.DeleteTimeseriesTableRequest.Builder builder = Timeseries.DeleteTimeseriesTableRequest.newBuilder(); + + // required String table_name = 1; + builder.setTableName(deleteTimeseriesTableRequest.getTimeseriesTableName()); + + return builder.build(); + } + + public static Timeseries.DescribeTimeseriesTableRequest buildDescribeTimeseriesTableRequest(DescribeTimeseriesTableRequest describeTimeseriesTableRequest) { + Timeseries.DescribeTimeseriesTableRequest.Builder builder = Timeseries.DescribeTimeseriesTableRequest.newBuilder(); + + // required String table_name = 1; + builder.setTableName(describeTimeseriesTableRequest.getTimeseriesTableName()); + + return builder.build(); + } + + public static Timeseries.UpdateTimeseriesTableRequest buildUpdateTimeseriesTableRequest(UpdateTimeseriesTableRequest updateTimeseriesTableRequest) { + Timeseries.UpdateTimeseriesTableRequest.Builder builder = Timeseries.UpdateTimeseriesTableRequest.newBuilder(); + + // required String table_name = 1; + builder.setTableName(updateTimeseriesTableRequest.getTimeseriesTableName()); + + // optional TimeseriesTableOptions table_options = 2; + if (updateTimeseriesTableRequest.getTimeseriesTableOptions().hasSetTimeToLive()) { + builder.setTableOptions(buildTimeseriesTableOptions(updateTimeseriesTableRequest.getTimeseriesTableOptions())); + } + + return builder.build(); + } + + public static Timeseries.UpdateTimeseriesMetaRequest buildUpdateTimeseriesMetaRequest(UpdateTimeseriesMetaRequest updateTimeseriesMetaRequest) { + Timeseries.UpdateTimeseriesMetaRequest.Builder builder = Timeseries.UpdateTimeseriesMetaRequest.newBuilder(); + + builder.setTableName(updateTimeseriesMetaRequest.getTimeseriesTableName()); + if (updateTimeseriesMetaRequest.getMetas().isEmpty()) { + throw new IllegalArgumentException("empty timeseries meta"); + } + for (TimeseriesMeta meta : updateTimeseriesMetaRequest.getMetas()) { + if (meta.getUpdateTimeInUs() > 0) { + throw new IllegalArgumentException("update time can not be set"); + } + Timeseries.TimeseriesMeta.Builder pbMeta = Timeseries.TimeseriesMeta.newBuilder(); + pbMeta.setTimeSeriesKey(buildTimeseriesKey(meta.getTimeseriesKey())); + if (!meta.getAttributes().isEmpty()) { + pbMeta.setAttributes(buildTagsString(meta.getAttributes())); + } + builder.addTimeseriesMeta(pbMeta); + } + return builder.build(); + } + + public static Timeseries.DeleteTimeseriesMetaRequest buildDeleteTimeseriesMetaRequest(DeleteTimeseriesMetaRequest deleteTimeseriesMetaRequest) { + Timeseries.DeleteTimeseriesMetaRequest.Builder builder = Timeseries.DeleteTimeseriesMetaRequest.newBuilder(); + + builder.setTableName(deleteTimeseriesMetaRequest.getTimeseriesTableName()); + if (deleteTimeseriesMetaRequest.getTimeseriesKeys().isEmpty()) { + throw new IllegalArgumentException("empty timeseries key"); + } + for (TimeseriesKey key : deleteTimeseriesMetaRequest.getTimeseriesKeys()) { + builder.addTimeseriesKey(buildTimeseriesKey(key)); + } + return builder.build(); + } + +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/timeseries/TimeseriesResponseFactory.java b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/timeseries/TimeseriesResponseFactory.java new file mode 100644 index 0000000..08b79c1 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/timeseries/TimeseriesResponseFactory.java @@ -0,0 +1,263 @@ +package com.alicloud.openservices.tablestore.core.protocol.timeseries; + +import com.alicloud.openservices.tablestore.ClientException; +import com.alicloud.openservices.tablestore.core.ResponseContentWithMeta; +import com.alicloud.openservices.tablestore.core.protocol.PlainBufferCell; +import com.alicloud.openservices.tablestore.core.protocol.PlainBufferCodedInputStream; +import com.alicloud.openservices.tablestore.core.protocol.PlainBufferInputStream; +import com.alicloud.openservices.tablestore.core.protocol.PlainBufferRow; +import com.alicloud.openservices.tablestore.model.Error; +import com.alicloud.openservices.tablestore.model.TimeseriesTableMeta; +import com.alicloud.openservices.tablestore.model.TimeseriesTableOptions; +import com.alicloud.openservices.tablestore.model.timeseries.*; +import com.google.common.cache.Cache; + +import java.io.IOException; +import java.util.*; + +public class TimeseriesResponseFactory { + + public static CreateTimeseriesTableResponse createCreateTimeseriesTableResponse( + ResponseContentWithMeta response, Timeseries.CreateTimeseriesTableResponse pbResponse) { + return new CreateTimeseriesTableResponse(response.getMeta()); + } + + public static PutTimeseriesDataResponse createPutTimeseriesDataResponse( + ResponseContentWithMeta meta, Timeseries.PutTimeseriesDataResponse pbResponse, PutTimeseriesDataRequest request, Cache timeseriesMetaCache) { + PutTimeseriesDataResponse response = new PutTimeseriesDataResponse(meta.getMeta()); + if (pbResponse.getFailedRowsCount() > 0) { + List failedRowResultList = + new ArrayList(); + for (int i = 0; i < pbResponse.getFailedRowsCount(); i++) { + Timeseries.FailedRowInfo failedRowInfo = pbResponse.getFailedRows(i); + failedRowResultList.add(new PutTimeseriesDataResponse.FailedRowResult( + failedRowInfo.getRowIndex(), + new Error(failedRowInfo.getErrorCode(), failedRowInfo.getErrorMessage()))); + } + response.setFailedRows(failedRowResultList); + } + if (pbResponse.hasMetaUpdateStatus()) { + List rowIds = pbResponse.getMetaUpdateStatus().getRowIdsList(); + for (int i = 0; i < rowIds.size(); i++) { + if (i >= pbResponse.getMetaUpdateStatus().getMetaUpdateTimesCount()) { + break; + } + int idx = rowIds.get(i); + if (idx < request.getRows().size()) { + long updateTimeInSec = ((long) (pbResponse.getMetaUpdateStatus().getMetaUpdateTimes(i))) & 0xffffffffL; + if (updateTimeInSec > 0) { + String cacheKey = request.getRows().get(idx).getTimeseriesKey().buildMetaCacheKey(request.getTimeseriesTableName()); + Long timeInCache = timeseriesMetaCache.getIfPresent(cacheKey); + if (timeInCache == null || timeInCache < updateTimeInSec) { + timeseriesMetaCache.put(cacheKey, updateTimeInSec); + } + } + } + } + } + return response; + } + + public static SortedMap parseTagsOrAttrs(String tagsStr) { + SortedMap tags = new TreeMap(); + if (tagsStr.isEmpty()) { + return tags; + } + if (tagsStr.length() < 2 || tagsStr.charAt(0) != '[' || tagsStr.charAt(tagsStr.length() - 1) != ']') { + throw new ClientException("invalid tags or attributes string: " + tagsStr); + } + int keyStart = -1; + int valueStart = -1; + for (int i = 1; i < tagsStr.length()-1; i++) { + if (tagsStr.charAt(i) != '"') { + throw new ClientException("invalid tags or attributes string: " + tagsStr); + } + keyStart = ++i; + while ((i < tagsStr.length() - 1) && (tagsStr.charAt(i) != '=') && (tagsStr.charAt(i) != '"')) { + i++; + } + if (tagsStr.charAt(i) != '=') { + throw new ClientException("invalid tags or attributes string: " + tagsStr); + } + valueStart = ++i; + while ((i < tagsStr.length() - 1) &&(tagsStr.charAt(i) != '"')) { + i++; + } + if (tagsStr.charAt(i) != '"') { + throw new ClientException("invalid tags or attributes string: " + tagsStr); + } + tags.put(tagsStr.substring(keyStart, valueStart - 1), tagsStr.substring(valueStart, i)); + i += 1; + if ((i < tagsStr.length() - 1) && (tagsStr.charAt(i) != ',')) { + throw new ClientException("invalid tags or attributes string: " + tagsStr); + } + } + return tags; + } + + public static String convertColumnName(String colName) { + for (int i = 0; i < colName.length(); i++) { + if (colName.charAt(i) == ':') { + return colName.substring(0, i); + } + } + throw new ClientException("unexpect column name: " + colName); + } + + public static TimeseriesRow parseRowFromPlainbuffer(PlainBufferRow plainBufferRow) { + String measurement = plainBufferRow.getPrimaryKey().get(1).getCellValue().asString(); + String source = plainBufferRow.getPrimaryKey().get(2).getCellValue().asString(); + String tagsStr = plainBufferRow.getPrimaryKey().get(3).getCellValue().asString(); + long time = plainBufferRow.getPrimaryKey().get(4).getCellValue().asLong(); + TimeseriesRow row = new TimeseriesRow(new TimeseriesKey(measurement, source, parseTagsOrAttrs(tagsStr)), time); + for (PlainBufferCell cell : plainBufferRow.getCells()) { + row.addField(convertColumnName(cell.getCellName()), cell.getCellValue()); + } + return row; + } + + public static TimeseriesRow parseRowFromPlainbuffer(PlainBufferRow plainBufferRow, TimeseriesKey key) { + long time = plainBufferRow.getPrimaryKey().get(4).getCellValue().asLong(); + TimeseriesRow row = new TimeseriesRow(key, time); + for (PlainBufferCell cell : plainBufferRow.getCells()) { + row.addField(convertColumnName(cell.getCellName()), cell.getCellValue()); + } + return row; + } + + public static GetTimeseriesDataResponse createGetTimeseriesDataResponse( + ResponseContentWithMeta meta, Timeseries.GetTimeseriesDataResponse pbResponse) { + GetTimeseriesDataResponse response = new GetTimeseriesDataResponse(meta.getMeta()); + if (pbResponse.hasRowsData() && !pbResponse.getRowsData().isEmpty()) { + try { + PlainBufferCodedInputStream inputStream = new PlainBufferCodedInputStream( + new PlainBufferInputStream(pbResponse.getRowsData().asReadOnlyByteBuffer())); + List pbRows = inputStream.readRowsWithHeader(); + List rows = new ArrayList(pbRows.size()); + for (int i = 0; i < pbRows.size(); i++) { + if (i > 0) { + // reuse timeseries key + rows.add(parseRowFromPlainbuffer(pbRows.get(i), rows.get(0).getTimeseriesKey())); + } else { + rows.add(parseRowFromPlainbuffer(pbRows.get(i))); + } + } + response.setRows(rows); + } catch (IOException e) { + throw new ClientException("Failed to parse get timeseries data response.", e); + } + } else { + response.setRows(new ArrayList()); + } + if (pbResponse.hasNextToken()) { + response.setNextToken(pbResponse.getNextToken().toByteArray()); + } + return response; + } + + public static TimeseriesMeta parseTimeseriesMeta(Timeseries.TimeseriesMeta pbMeta) { + TimeseriesKey timeseriesKey = new TimeseriesKey(pbMeta.getTimeSeriesKey().getMeasurement(), + pbMeta.getTimeSeriesKey().getSource(), parseTagsOrAttrs(pbMeta.getTimeSeriesKey().getTags())); + TimeseriesMeta meta = new TimeseriesMeta(timeseriesKey); + if (pbMeta.hasAttributes()) { + meta.setAttributes(parseTagsOrAttrs(pbMeta.getAttributes())); + } + if (pbMeta.hasUpdateTime()) { + meta.setUpdateTimeInUs(pbMeta.getUpdateTime()); + } + return meta; + } + + public static QueryTimeseriesMetaResponse createQueryTimeseriesMetaResponse( + ResponseContentWithMeta meta, Timeseries.QueryTimeseriesMetaResponse pbResponse) { + QueryTimeseriesMetaResponse response = new QueryTimeseriesMetaResponse(meta.getMeta()); + List timeseriesMetas = new ArrayList(pbResponse.getTimeseriesMetasCount()); + for (int i = 0; i < pbResponse.getTimeseriesMetasCount(); i++) { + timeseriesMetas.add(parseTimeseriesMeta(pbResponse.getTimeseriesMetas(i))); + } + response.setTimeseriesMetas(timeseriesMetas); + if (pbResponse.hasTotalHit()) { + response.setTotalHits(pbResponse.getTotalHit()); + } + if (pbResponse.hasNextToken()) { + response.setNextToken(pbResponse.getNextToken().toByteArray()); + } + return response; + } + + public static DeleteTimeseriesTableResponse createDeleteTimeseriesTableResponse( + ResponseContentWithMeta response, Timeseries.DeleteTimeseriesTableResponse pbResponse) { + return new DeleteTimeseriesTableResponse(response.getMeta()); + } + + public static UpdateTimeseriesTableResponse createUpdateTimeseriesTableResponse( + ResponseContentWithMeta response, Timeseries.UpdateTimeseriesTableResponse pbResponse) { + return new UpdateTimeseriesTableResponse(response.getMeta()); + } + + public static ListTimeseriesTableResponse createListTimeseriesTableResponse( + ResponseContentWithMeta response, Timeseries.ListTimeseriesTableResponse pbResponse) { + ListTimeseriesTableResponse result = new ListTimeseriesTableResponse(response.getMeta()); + List timeseriesTableMetas = new LinkedList(); + + for(Timeseries.TimeseriesTableMeta meta: pbResponse.getTableMetasList()) { + TimeseriesTableOptions option = new TimeseriesTableOptions(meta.getTableOptions().getTimeToLive()); + timeseriesTableMetas.add(new TimeseriesTableMeta(meta.getTableName(), option, meta.getStatus())); + } + result.setTimeseriesTableMetas(timeseriesTableMetas); + + return result; + } + + public static DescribeTimeseriesTableResponse createDescribeTimeseriesTableResponse( + ResponseContentWithMeta response, Timeseries.DescribeTimeseriesTableResponse pbResponse) { + DescribeTimeseriesTableResponse result = new DescribeTimeseriesTableResponse(response.getMeta()); + Timeseries.TimeseriesTableMeta meta = pbResponse.getTableMeta(); + + TimeseriesTableMeta _meta = new TimeseriesTableMeta(meta.getTableName()); + + TimeseriesTableOptions timeseriesTableOptions = new TimeseriesTableOptions(); + timeseriesTableOptions.setTimeToLive(meta.getTableOptions().getTimeToLive()); + _meta.setTimeseriesTableOptions(timeseriesTableOptions); + + _meta.setStatus((meta.getStatus())); + + result.setTimeseriesTableMeta(_meta); + + return result; + } + + public static UpdateTimeseriesMetaResponse createUpdateTimeseriesMetaResponse( + ResponseContentWithMeta response, Timeseries.UpdateTimeseriesMetaResponse pbResponse) { + UpdateTimeseriesMetaResponse result = new UpdateTimeseriesMetaResponse(response.getMeta()); + if (pbResponse.getFailedRowsCount() > 0) { + List failedRowResultList = + new ArrayList(); + for (int i = 0; i < pbResponse.getFailedRowsCount(); i++) { + Timeseries.FailedRowInfo failedRowInfo = pbResponse.getFailedRows(i); + failedRowResultList.add(new UpdateTimeseriesMetaResponse.FailedRowResult( + failedRowInfo.getRowIndex(), + new Error(failedRowInfo.getErrorCode(), failedRowInfo.getErrorMessage()))); + } + result.setFailedRows(failedRowResultList); + } + return result; + } + + public static DeleteTimeseriesMetaResponse createDeleteTimeseriesMetaResponse( + ResponseContentWithMeta response, Timeseries.DeleteTimeseriesMetaResponse pbResponse) { + DeleteTimeseriesMetaResponse result = new DeleteTimeseriesMetaResponse(response.getMeta()); + if (pbResponse.getFailedRowsCount() > 0) { + List failedRowResultList = + new ArrayList(); + for (int i = 0; i < pbResponse.getFailedRowsCount(); i++) { + Timeseries.FailedRowInfo failedRowInfo = pbResponse.getFailedRows(i); + failedRowResultList.add(new DeleteTimeseriesMetaResponse.FailedRowResult( + failedRowInfo.getRowIndex(), + new Error(failedRowInfo.getErrorCode(), failedRowInfo.getErrorMessage()))); + } + result.setFailedRows(failedRowResultList); + } + return result; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/timeseries/flatbuffer/BytesValue.java b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/timeseries/flatbuffer/BytesValue.java new file mode 100644 index 0000000..f7b507a --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/timeseries/flatbuffer/BytesValue.java @@ -0,0 +1,38 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package com.alicloud.openservices.tablestore.core.protocol.timeseries.flatbuffer; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class BytesValue extends Table { + public static BytesValue getRootAsBytesValue(ByteBuffer _bb) { return getRootAsBytesValue(_bb, new BytesValue()); } + public static BytesValue getRootAsBytesValue(ByteBuffer _bb, BytesValue obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; vtable_start = bb_pos - bb.getInt(bb_pos); vtable_size = bb.getShort(vtable_start); } + public BytesValue __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public byte value(int j) { int o = __offset(4); return o != 0 ? bb.get(__vector(o) + j * 1) : 0; } + public int valueLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } + public ByteBuffer valueAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } + public ByteBuffer valueInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } + + public static int createBytesValue(FlatBufferBuilder builder, + int valueOffset) { + builder.startObject(1); + BytesValue.addValue(builder, valueOffset); + return BytesValue.endBytesValue(builder); + } + + public static void startBytesValue(FlatBufferBuilder builder) { builder.startObject(1); } + public static void addValue(FlatBufferBuilder builder, int valueOffset) { builder.addOffset(0, valueOffset, 0); } + public static int createValueVector(FlatBufferBuilder builder, byte[] data) { builder.startVector(1, data.length, 1); for (int i = data.length - 1; i >= 0; i--) builder.addByte(data[i]); return builder.endVector(); } + public static void startValueVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); } + public static int endBytesValue(FlatBufferBuilder builder) { + int o = builder.endObject(); + return o; + } +} + diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/timeseries/flatbuffer/DataType.java b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/timeseries/flatbuffer/DataType.java new file mode 100644 index 0000000..4c4a4da --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/timeseries/flatbuffer/DataType.java @@ -0,0 +1,18 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package com.alicloud.openservices.tablestore.core.protocol.timeseries.flatbuffer; + +public final class DataType { + private DataType() { } + public static final byte NONE = 0; + public static final byte LONG = 1; + public static final byte BOOLEAN = 2; + public static final byte DOUBLE = 3; + public static final byte STRING = 4; + public static final byte BINARY = 5; + + public static final String[] names = { "NONE", "LONG", "BOOLEAN", "DOUBLE", "STRING", "BINARY", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/timeseries/flatbuffer/FieldValues.java b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/timeseries/flatbuffer/FieldValues.java new file mode 100644 index 0000000..4ce615c --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/timeseries/flatbuffer/FieldValues.java @@ -0,0 +1,71 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package com.alicloud.openservices.tablestore.core.protocol.timeseries.flatbuffer; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class FieldValues extends Table { + public static FieldValues getRootAsFieldValues(ByteBuffer _bb) { return getRootAsFieldValues(_bb, new FieldValues()); } + public static FieldValues getRootAsFieldValues(ByteBuffer _bb, FieldValues obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; vtable_start = bb_pos - bb.getInt(bb_pos); vtable_size = bb.getShort(vtable_start); } + public FieldValues __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public long longValues(int j) { int o = __offset(4); return o != 0 ? bb.getLong(__vector(o) + j * 8) : 0; } + public int longValuesLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } + public ByteBuffer longValuesAsByteBuffer() { return __vector_as_bytebuffer(4, 8); } + public ByteBuffer longValuesInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 8); } + public boolean boolValues(int j) { int o = __offset(6); return o != 0 ? 0!=bb.get(__vector(o) + j * 1) : false; } + public int boolValuesLength() { int o = __offset(6); return o != 0 ? __vector_len(o) : 0; } + public ByteBuffer boolValuesAsByteBuffer() { return __vector_as_bytebuffer(6, 1); } + public ByteBuffer boolValuesInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); } + public double doubleValues(int j) { int o = __offset(8); return o != 0 ? bb.getDouble(__vector(o) + j * 8) : 0; } + public int doubleValuesLength() { int o = __offset(8); return o != 0 ? __vector_len(o) : 0; } + public ByteBuffer doubleValuesAsByteBuffer() { return __vector_as_bytebuffer(8, 8); } + public ByteBuffer doubleValuesInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 8, 8); } + public String stringValues(int j) { int o = __offset(10); return o != 0 ? __string(__vector(o) + j * 4) : null; } + public int stringValuesLength() { int o = __offset(10); return o != 0 ? __vector_len(o) : 0; } + public BytesValue binaryValues(int j) { return binaryValues(new BytesValue(), j); } + public BytesValue binaryValues(BytesValue obj, int j) { int o = __offset(12); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } + public int binaryValuesLength() { int o = __offset(12); return o != 0 ? __vector_len(o) : 0; } + + public static int createFieldValues(FlatBufferBuilder builder, + int long_valuesOffset, + int bool_valuesOffset, + int double_valuesOffset, + int string_valuesOffset, + int binary_valuesOffset) { + builder.startObject(5); + FieldValues.addBinaryValues(builder, binary_valuesOffset); + FieldValues.addStringValues(builder, string_valuesOffset); + FieldValues.addDoubleValues(builder, double_valuesOffset); + FieldValues.addBoolValues(builder, bool_valuesOffset); + FieldValues.addLongValues(builder, long_valuesOffset); + return FieldValues.endFieldValues(builder); + } + + public static void startFieldValues(FlatBufferBuilder builder) { builder.startObject(5); } + public static void addLongValues(FlatBufferBuilder builder, int longValuesOffset) { builder.addOffset(0, longValuesOffset, 0); } + public static int createLongValuesVector(FlatBufferBuilder builder, long[] data) { builder.startVector(8, data.length, 8); for (int i = data.length - 1; i >= 0; i--) builder.addLong(data[i]); return builder.endVector(); } + public static void startLongValuesVector(FlatBufferBuilder builder, int numElems) { builder.startVector(8, numElems, 8); } + public static void addBoolValues(FlatBufferBuilder builder, int boolValuesOffset) { builder.addOffset(1, boolValuesOffset, 0); } + public static int createBoolValuesVector(FlatBufferBuilder builder, boolean[] data) { builder.startVector(1, data.length, 1); for (int i = data.length - 1; i >= 0; i--) builder.addBoolean(data[i]); return builder.endVector(); } + public static void startBoolValuesVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); } + public static void addDoubleValues(FlatBufferBuilder builder, int doubleValuesOffset) { builder.addOffset(2, doubleValuesOffset, 0); } + public static int createDoubleValuesVector(FlatBufferBuilder builder, double[] data) { builder.startVector(8, data.length, 8); for (int i = data.length - 1; i >= 0; i--) builder.addDouble(data[i]); return builder.endVector(); } + public static void startDoubleValuesVector(FlatBufferBuilder builder, int numElems) { builder.startVector(8, numElems, 8); } + public static void addStringValues(FlatBufferBuilder builder, int stringValuesOffset) { builder.addOffset(3, stringValuesOffset, 0); } + public static int createStringValuesVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startStringValuesVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static void addBinaryValues(FlatBufferBuilder builder, int binaryValuesOffset) { builder.addOffset(4, binaryValuesOffset, 0); } + public static int createBinaryValuesVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startBinaryValuesVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static int endFieldValues(FlatBufferBuilder builder) { + int o = builder.endObject(); + return o; + } +} + diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/timeseries/flatbuffer/FlatBufferRowGroup.java b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/timeseries/flatbuffer/FlatBufferRowGroup.java new file mode 100644 index 0000000..f95fc60 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/timeseries/flatbuffer/FlatBufferRowGroup.java @@ -0,0 +1,59 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package com.alicloud.openservices.tablestore.core.protocol.timeseries.flatbuffer; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class FlatBufferRowGroup extends Table { + public static FlatBufferRowGroup getRootAsFlatBufferRowGroup(ByteBuffer _bb) { return getRootAsFlatBufferRowGroup(_bb, new FlatBufferRowGroup()); } + public static FlatBufferRowGroup getRootAsFlatBufferRowGroup(ByteBuffer _bb, FlatBufferRowGroup obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; vtable_start = bb_pos - bb.getInt(bb_pos); vtable_size = bb.getShort(vtable_start); } + public FlatBufferRowGroup __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public String measurementName() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer measurementNameAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } + public ByteBuffer measurementNameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } + public String fieldNames(int j) { int o = __offset(6); return o != 0 ? __string(__vector(o) + j * 4) : null; } + public int fieldNamesLength() { int o = __offset(6); return o != 0 ? __vector_len(o) : 0; } + public byte fieldTypes(int j) { int o = __offset(8); return o != 0 ? bb.get(__vector(o) + j * 1) : 0; } + public int fieldTypesLength() { int o = __offset(8); return o != 0 ? __vector_len(o) : 0; } + public ByteBuffer fieldTypesAsByteBuffer() { return __vector_as_bytebuffer(8, 1); } + public ByteBuffer fieldTypesInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 8, 1); } + public FlatBufferRowInGroup rows(int j) { return rows(new FlatBufferRowInGroup(), j); } + public FlatBufferRowInGroup rows(FlatBufferRowInGroup obj, int j) { int o = __offset(10); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } + public int rowsLength() { int o = __offset(10); return o != 0 ? __vector_len(o) : 0; } + + public static int createFlatBufferRowGroup(FlatBufferBuilder builder, + int measurement_nameOffset, + int field_namesOffset, + int field_typesOffset, + int rowsOffset) { + builder.startObject(4); + FlatBufferRowGroup.addRows(builder, rowsOffset); + FlatBufferRowGroup.addFieldTypes(builder, field_typesOffset); + FlatBufferRowGroup.addFieldNames(builder, field_namesOffset); + FlatBufferRowGroup.addMeasurementName(builder, measurement_nameOffset); + return FlatBufferRowGroup.endFlatBufferRowGroup(builder); + } + + public static void startFlatBufferRowGroup(FlatBufferBuilder builder) { builder.startObject(4); } + public static void addMeasurementName(FlatBufferBuilder builder, int measurementNameOffset) { builder.addOffset(0, measurementNameOffset, 0); } + public static void addFieldNames(FlatBufferBuilder builder, int fieldNamesOffset) { builder.addOffset(1, fieldNamesOffset, 0); } + public static int createFieldNamesVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startFieldNamesVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static void addFieldTypes(FlatBufferBuilder builder, int fieldTypesOffset) { builder.addOffset(2, fieldTypesOffset, 0); } + public static int createFieldTypesVector(FlatBufferBuilder builder, byte[] data) { builder.startVector(1, data.length, 1); for (int i = data.length - 1; i >= 0; i--) builder.addByte(data[i]); return builder.endVector(); } + public static void startFieldTypesVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); } + public static void addRows(FlatBufferBuilder builder, int rowsOffset) { builder.addOffset(3, rowsOffset, 0); } + public static int createRowsVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startRowsVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static int endFlatBufferRowGroup(FlatBufferBuilder builder) { + int o = builder.endObject(); + return o; + } +} + diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/timeseries/flatbuffer/FlatBufferRowInGroup.java b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/timeseries/flatbuffer/FlatBufferRowInGroup.java new file mode 100644 index 0000000..ccc1b53 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/timeseries/flatbuffer/FlatBufferRowInGroup.java @@ -0,0 +1,54 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package com.alicloud.openservices.tablestore.core.protocol.timeseries.flatbuffer; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class FlatBufferRowInGroup extends Table { + public static FlatBufferRowInGroup getRootAsFlatBufferRowInGroup(ByteBuffer _bb) { return getRootAsFlatBufferRowInGroup(_bb, new FlatBufferRowInGroup()); } + public static FlatBufferRowInGroup getRootAsFlatBufferRowInGroup(ByteBuffer _bb, FlatBufferRowInGroup obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; vtable_start = bb_pos - bb.getInt(bb_pos); vtable_size = bb.getShort(vtable_start); } + public FlatBufferRowInGroup __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public String dataSource() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer dataSourceAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } + public ByteBuffer dataSourceInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } + public String tags() { int o = __offset(6); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer tagsAsByteBuffer() { return __vector_as_bytebuffer(6, 1); } + public ByteBuffer tagsInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); } + public long time() { int o = __offset(8); return o != 0 ? bb.getLong(o + bb_pos) : 0L; } + public FieldValues fieldValues() { return fieldValues(new FieldValues()); } + public FieldValues fieldValues(FieldValues obj) { int o = __offset(10); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + public long metaCacheUpdateTime() { int o = __offset(12); return o != 0 ? (long)bb.getInt(o + bb_pos) & 0xFFFFFFFFL : 0L; } + + public static int createFlatBufferRowInGroup(FlatBufferBuilder builder, + int data_sourceOffset, + int tagsOffset, + long time, + int field_valuesOffset, + long meta_cache_update_time) { + builder.startObject(5); + FlatBufferRowInGroup.addTime(builder, time); + FlatBufferRowInGroup.addMetaCacheUpdateTime(builder, meta_cache_update_time); + FlatBufferRowInGroup.addFieldValues(builder, field_valuesOffset); + FlatBufferRowInGroup.addTags(builder, tagsOffset); + FlatBufferRowInGroup.addDataSource(builder, data_sourceOffset); + return FlatBufferRowInGroup.endFlatBufferRowInGroup(builder); + } + + public static void startFlatBufferRowInGroup(FlatBufferBuilder builder) { builder.startObject(5); } + public static void addDataSource(FlatBufferBuilder builder, int dataSourceOffset) { builder.addOffset(0, dataSourceOffset, 0); } + public static void addTags(FlatBufferBuilder builder, int tagsOffset) { builder.addOffset(1, tagsOffset, 0); } + public static void addTime(FlatBufferBuilder builder, long time) { builder.addLong(2, time, 0L); } + public static void addFieldValues(FlatBufferBuilder builder, int fieldValuesOffset) { builder.addOffset(3, fieldValuesOffset, 0); } + public static void addMetaCacheUpdateTime(FlatBufferBuilder builder, long metaCacheUpdateTime) { builder.addInt(4, (int)metaCacheUpdateTime, (int)0L); } + public static int endFlatBufferRowInGroup(FlatBufferBuilder builder) { + int o = builder.endObject(); + return o; + } +} + diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/timeseries/flatbuffer/FlatBufferRows.java b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/timeseries/flatbuffer/FlatBufferRows.java new file mode 100644 index 0000000..b7f224a --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/timeseries/flatbuffer/FlatBufferRows.java @@ -0,0 +1,39 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package com.alicloud.openservices.tablestore.core.protocol.timeseries.flatbuffer; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class FlatBufferRows extends Table { + public static FlatBufferRows getRootAsFlatBufferRows(ByteBuffer _bb) { return getRootAsFlatBufferRows(_bb, new FlatBufferRows()); } + public static FlatBufferRows getRootAsFlatBufferRows(ByteBuffer _bb, FlatBufferRows obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; vtable_start = bb_pos - bb.getInt(bb_pos); vtable_size = bb.getShort(vtable_start); } + public FlatBufferRows __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public FlatBufferRowGroup rowGroups(int j) { return rowGroups(new FlatBufferRowGroup(), j); } + public FlatBufferRowGroup rowGroups(FlatBufferRowGroup obj, int j) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } + public int rowGroupsLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } + + public static int createFlatBufferRows(FlatBufferBuilder builder, + int row_groupsOffset) { + builder.startObject(1); + FlatBufferRows.addRowGroups(builder, row_groupsOffset); + return FlatBufferRows.endFlatBufferRows(builder); + } + + public static void startFlatBufferRows(FlatBufferBuilder builder) { builder.startObject(1); } + public static void addRowGroups(FlatBufferBuilder builder, int rowGroupsOffset) { builder.addOffset(0, rowGroupsOffset, 0); } + public static int createRowGroupsVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startRowGroupsVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static int endFlatBufferRows(FlatBufferBuilder builder) { + int o = builder.endObject(); + return o; + } + public static void finishFlatBufferRowsBuffer(FlatBufferBuilder builder, int offset) { builder.finish(offset); } + public static void finishSizePrefixedFlatBufferRowsBuffer(FlatBufferBuilder builder, int offset) { builder.finishSizePrefixed(offset); } +} + diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/timeseries/timeseries.fbs b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/timeseries/timeseries.fbs new file mode 100644 index 0000000..635cb65 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/timeseries/timeseries.fbs @@ -0,0 +1,36 @@ +namespace com.alicloud.openservices.tablestore.core.protocol.timeseries.flatbuffer; + +enum DataType:byte {NONE = 0, LONG = 1, BOOLEAN = 2, DOUBLE = 3, STRING = 4, BINARY = 5} + +table BytesValue { + value: [byte]; +} + +table FieldValues { + long_values: [long]; + bool_values: [bool]; + double_values: [double]; + string_values: [string]; + binary_values: [BytesValue]; +} + +table FlatBufferRowInGroup { + data_source: string; + tags: string; + time: int64; + field_values: FieldValues; + meta_cache_update_time: uint32; +} + +table FlatBufferRowGroup { + measurement_name: string; + field_names: [string]; + field_types: [DataType]; + rows: [FlatBufferRowInGroup]; +} + +table FlatBufferRows { + row_groups: [FlatBufferRowGroup]; +} + +root_type FlatBufferRows; diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/timeseries/timeseries.proto b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/timeseries/timeseries.proto new file mode 100644 index 0000000..6c3e55d --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/timeseries/timeseries.proto @@ -0,0 +1,214 @@ +syntax = "proto2"; + +package com.alicloud.openservices.tablestore.core.protocol.timeseries; + +message TimeseriesTableOptions { + optional int32 time_to_live = 1; +} + +message TimeseriesTableMeta { + required string table_name = 1; + optional TimeseriesTableOptions table_options = 2; + optional string status = 3; +} + +message CreateTimeseriesTableRequest { + required TimeseriesTableMeta table_meta = 1; +} + +message CreateTimeseriesTableResponse { +} + +message ListTimeseriesTableRequest { +} + +message ListTimeseriesTableResponse { + repeated TimeseriesTableMeta table_metas = 1; +} + +message DeleteTimeseriesTableRequest { + required string table_name = 1; +} + +message DeleteTimeseriesTableResponse { +} + +message UpdateTimeseriesTableRequest { + required string table_name = 1; + optional TimeseriesTableOptions table_options = 2; +} + +message UpdateTimeseriesTableResponse { +} + +message DescribeTimeseriesTableRequest { + required string table_name = 1; +} + +message DescribeTimeseriesTableResponse { + required TimeseriesTableMeta table_meta = 1; +} + +enum MetaQueryConditionType { + COMPOSITE_CONDITION = 1; + MEASUREMENT_CONDITION = 2; + SOURCE_CONDITION = 3; + TAG_CONDITION = 4; + UPDATE_TIME_CONDITION = 5; + ATTRIBUTE_CONDITION = 6; +} + +message MetaQueryCondition { + required MetaQueryConditionType type = 1; + required bytes proto_data = 2; +} + +enum MetaQueryCompositeOperator { + OP_AND = 1; + OP_OR = 2; + OP_NOT = 3; +} + +message MetaQueryCompositeCondition { + required MetaQueryCompositeOperator op = 1; + repeated MetaQueryCondition sub_conditions = 2; +} + +enum MetaQuerySingleOperator { + OP_EQUAL = 1; + OP_GREATER_THAN = 2; + OP_GREATER_EQUAL = 3; + OP_LESS_THAN = 4; + OP_LESS_EQUAL = 5; + OP_PREFIX = 6; +} + +message MetaQueryMeasurementCondition { + required MetaQuerySingleOperator op = 1; + required string value = 2; +} + +message MetaQuerySourceCondition { + required MetaQuerySingleOperator op = 1; + required string value = 2; +} + +message MetaQueryTagCondition { + required MetaQuerySingleOperator op = 1; + required string tag_name = 2; + required string value = 3; +} + +message MetaQueryAttributeCondition { + required MetaQuerySingleOperator op = 1; + required string attr_name = 2; + required string value = 3; +} + +message MetaQueryUpdateTimeCondition { + required MetaQuerySingleOperator op = 1; + required int64 value = 2; +} + +message TimeseriesKey { + required string measurement = 1; + required string source = 2; + required string tags = 3; +} + +message TimeseriesMeta { + required TimeseriesKey time_series_key = 1; + optional string attributes = 2; + optional int64 update_time = 3; +} + +message QueryTimeseriesMetaRequest { + required string table_name = 1; + optional MetaQueryCondition condition = 2; + optional bool get_total_hit = 3; + optional bytes token = 4; + optional int32 limit = 5; +} + +message QueryTimeseriesMetaResponse { + repeated TimeseriesMeta timeseries_metas = 1; + optional int64 total_hit = 2; + optional bytes next_token = 3; +} + +enum RowsSerializeType { + RST_FLAT_BUFFER = 0; +} + +message TimeseriesRows { + required RowsSerializeType type = 1; + required bytes rows_data = 2; + optional int32 flatbuffer_crc32c = 3; +} + +enum MetaUpdateMode { + MUM_NORMAL = 0; + MUM_IGNORE = 1; +} + +message PutTimeseriesDataRequest { + required string table_name = 1; + required TimeseriesRows rows_data = 2; + optional MetaUpdateMode meta_update_mode = 3; +} + +message FailedRowInfo { + required int32 row_index = 1; + optional string error_code = 2; + optional string error_message = 3; +} + +message MetaUpdateStatus { + repeated uint32 row_ids = 1; + repeated uint32 meta_update_times = 2; +} + +message PutTimeseriesDataResponse { + repeated FailedRowInfo failed_rows = 1; + optional MetaUpdateStatus meta_update_status = 2; +} + +message TimeseriesFieldsToGet { + optional string name = 1; + optional int32 type = 2; +} + +message GetTimeseriesDataRequest { + required string table_name = 1; + required TimeseriesKey time_series_key = 2; + optional int64 begin_time = 3; + optional int64 end_time = 4; + optional int64 specific_time = 5; + optional bytes token = 6; + optional int32 limit = 7; + optional bool backward = 8; + repeated TimeseriesFieldsToGet fields_to_get = 9; +} + +message GetTimeseriesDataResponse { + required bytes rows_data = 1; + optional bytes next_token = 2; +} + +message UpdateTimeseriesMetaRequest { + required string table_name = 1; + repeated TimeseriesMeta timeseries_meta = 2; +} + +message UpdateTimeseriesMetaResponse { + repeated FailedRowInfo failed_rows = 1; +} + +message DeleteTimeseriesMetaRequest { + required string table_name = 1; + repeated TimeseriesKey timeseries_key = 2; +} + +message DeleteTimeseriesMetaResponse { + repeated FailedRowInfo failed_rows = 1; +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/tunnel_service_api.proto b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/tunnel_service_api.proto index 6ee8a16..16c1a9a 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/core/protocol/tunnel_service_api.proto +++ b/src/main/java/com/alicloud/openservices/tablestore/core/protocol/tunnel_service_api.proto @@ -18,6 +18,7 @@ message Tunnel { required string table_name = 1; required string tunnel_name = 3; required TunnelType tunnel_type = 4; + optional StreamTunnelConfig StreamTunnelConfig = 5; } message CreateTunnelRequest { @@ -51,6 +52,8 @@ message TunnelInfo { optional bool expired = 7; optional string tunnel_name = 8; optional bool public = 9; + optional StreamTunnelConfig stream_tunnel_config = 10; + optional int64 create_time = 11; } message ListTunnelResponse { @@ -195,3 +198,15 @@ message TokenContentV2 { optional int64 timestamp = 3; optional int64 total_count = 4; } + +enum StartOffsetFlag { + LATEST = 0; + EARLIEST = 1; +} + +message StreamTunnelConfig { + optional StartOffsetFlag flag = 1; + optional uint64 startOffset = 2; + optional uint64 endOffset = 3; +} + diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/utils/HttpUtil.java b/src/main/java/com/alicloud/openservices/tablestore/core/utils/HttpUtil.java index 3213daf..97ce28f 100755 --- a/src/main/java/com/alicloud/openservices/tablestore/core/utils/HttpUtil.java +++ b/src/main/java/com/alicloud/openservices/tablestore/core/utils/HttpUtil.java @@ -7,10 +7,14 @@ package com.alicloud.openservices.tablestore.core.utils; +import com.alicloud.openservices.tablestore.core.Constants; + import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import java.util.Map; import java.util.Map.Entry; +import java.util.regex.Matcher; +import java.util.regex.Pattern; public class HttpUtil { @@ -65,5 +69,22 @@ public static String paramToQueryString(Map params, String chars return paramString.toString(); } - + + /** + * Validate character contained in Endpoint to avoid SSRF attack. + * @param endpoint for check + * @return true if check passed, else false + */ + public static boolean validateEndpointArgs(String endpoint) { + return StringUtils.matchRegexPattern(Constants.ENDPOINT_REGEX, endpoint); + } + + /** + * Validate character contained in regular http params to avoid SSRF attack. + * @param param for check + * @return true if check passed, else false + */ + public static boolean checkSSRF(String param) { + return StringUtils.matchRegexPattern(Constants.SSRF_CHECK_REGEX, param); + } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/utils/NumberUtils.java b/src/main/java/com/alicloud/openservices/tablestore/core/utils/NumberUtils.java new file mode 100644 index 0000000..5c0f96f --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/utils/NumberUtils.java @@ -0,0 +1,11 @@ +package com.alicloud.openservices.tablestore.core.utils; + +public class NumberUtils { + + public static int longToInt(long value) { + if ((int) value != value) { + throw new ArithmeticException("integer overflow"); + } + return (int) value; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/utils/PureJavaCrc32C.java b/src/main/java/com/alicloud/openservices/tablestore/core/utils/PureJavaCrc32C.java new file mode 100644 index 0000000..5dae211 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/utils/PureJavaCrc32C.java @@ -0,0 +1,630 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + * + * Some portions of this file Copyright (c) 2004-2006 Intel Corportation + * and licensed under the BSD license. + */ +package com.alicloud.openservices.tablestore.core.utils; + +import java.util.zip.Checksum; + +/** + * This class was taken from Hadoop: org.apache.hadoop.util.PureJavaCrc32C. + */ +public class PureJavaCrc32C implements Checksum { + + /** the current CRC value, bit-flipped */ + private int crc; + + /** Create a new PureJavaCrc32 object. */ + public PureJavaCrc32C() { + reset(); + } + + @Override + public long getValue() { + long ret = crc; + return (~ret) & 0xffffffffL; + } + + @Override + public void reset() { + crc = 0xffffffff; + } + + @Override + public void update(byte[] b, int off, int len) { + int localCrc = crc; + + while(len > 7) { + final int c0 =(b[off+0] ^ localCrc) & 0xff; + final int c1 =(b[off+1] ^ (localCrc >>>= 8)) & 0xff; + final int c2 =(b[off+2] ^ (localCrc >>>= 8)) & 0xff; + final int c3 =(b[off+3] ^ (localCrc >>>= 8)) & 0xff; + localCrc = (T[T8_7_start + c0] ^ T[T8_6_start + c1]) + ^ (T[T8_5_start + c2] ^ T[T8_4_start + c3]); + + final int c4 = b[off+4] & 0xff; + final int c5 = b[off+5] & 0xff; + final int c6 = b[off+6] & 0xff; + final int c7 = b[off+7] & 0xff; + + localCrc ^= (T[T8_3_start + c4] ^ T[T8_2_start + c5]) + ^ (T[T8_1_start + c6] ^ T[T8_0_start + c7]); + + off += 8; + len -= 8; + } + + /* loop unroll - duff's device style */ + switch(len) { + case 7: localCrc = (localCrc >>> 8) ^ T[T8_0_start + ((localCrc ^ b[off++]) & 0xff)]; + case 6: localCrc = (localCrc >>> 8) ^ T[T8_0_start + ((localCrc ^ b[off++]) & 0xff)]; + case 5: localCrc = (localCrc >>> 8) ^ T[T8_0_start + ((localCrc ^ b[off++]) & 0xff)]; + case 4: localCrc = (localCrc >>> 8) ^ T[T8_0_start + ((localCrc ^ b[off++]) & 0xff)]; + case 3: localCrc = (localCrc >>> 8) ^ T[T8_0_start + ((localCrc ^ b[off++]) & 0xff)]; + case 2: localCrc = (localCrc >>> 8) ^ T[T8_0_start + ((localCrc ^ b[off++]) & 0xff)]; + case 1: localCrc = (localCrc >>> 8) ^ T[T8_0_start + ((localCrc ^ b[off++]) & 0xff)]; + default: + /* nothing */ + } + + // Publish crc out to object + crc = localCrc; + } + + @Override + final public void update(int b) { + crc = (crc >>> 8) ^ T[T8_0_start + ((crc ^ b) & 0xff)]; + } + + // CRC polynomial tables generated by: + // java -cp build/test/classes/:build/classes/ \ + // org.apache.hadoop.util.TestPureJavaCrc32\$Table 82F63B78 + + private static final int T8_0_start = 0*256; + private static final int T8_1_start = 1*256; + private static final int T8_2_start = 2*256; + private static final int T8_3_start = 3*256; + private static final int T8_4_start = 4*256; + private static final int T8_5_start = 5*256; + private static final int T8_6_start = 6*256; + private static final int T8_7_start = 7*256; + + private static final int[] T = new int[] { + /* T8_0 */ + 0x00000000, 0xF26B8303, 0xE13B70F7, 0x1350F3F4, + 0xC79A971F, 0x35F1141C, 0x26A1E7E8, 0xD4CA64EB, + 0x8AD958CF, 0x78B2DBCC, 0x6BE22838, 0x9989AB3B, + 0x4D43CFD0, 0xBF284CD3, 0xAC78BF27, 0x5E133C24, + 0x105EC76F, 0xE235446C, 0xF165B798, 0x030E349B, + 0xD7C45070, 0x25AFD373, 0x36FF2087, 0xC494A384, + 0x9A879FA0, 0x68EC1CA3, 0x7BBCEF57, 0x89D76C54, + 0x5D1D08BF, 0xAF768BBC, 0xBC267848, 0x4E4DFB4B, + 0x20BD8EDE, 0xD2D60DDD, 0xC186FE29, 0x33ED7D2A, + 0xE72719C1, 0x154C9AC2, 0x061C6936, 0xF477EA35, + 0xAA64D611, 0x580F5512, 0x4B5FA6E6, 0xB93425E5, + 0x6DFE410E, 0x9F95C20D, 0x8CC531F9, 0x7EAEB2FA, + 0x30E349B1, 0xC288CAB2, 0xD1D83946, 0x23B3BA45, + 0xF779DEAE, 0x05125DAD, 0x1642AE59, 0xE4292D5A, + 0xBA3A117E, 0x4851927D, 0x5B016189, 0xA96AE28A, + 0x7DA08661, 0x8FCB0562, 0x9C9BF696, 0x6EF07595, + 0x417B1DBC, 0xB3109EBF, 0xA0406D4B, 0x522BEE48, + 0x86E18AA3, 0x748A09A0, 0x67DAFA54, 0x95B17957, + 0xCBA24573, 0x39C9C670, 0x2A993584, 0xD8F2B687, + 0x0C38D26C, 0xFE53516F, 0xED03A29B, 0x1F682198, + 0x5125DAD3, 0xA34E59D0, 0xB01EAA24, 0x42752927, + 0x96BF4DCC, 0x64D4CECF, 0x77843D3B, 0x85EFBE38, + 0xDBFC821C, 0x2997011F, 0x3AC7F2EB, 0xC8AC71E8, + 0x1C661503, 0xEE0D9600, 0xFD5D65F4, 0x0F36E6F7, + 0x61C69362, 0x93AD1061, 0x80FDE395, 0x72966096, + 0xA65C047D, 0x5437877E, 0x4767748A, 0xB50CF789, + 0xEB1FCBAD, 0x197448AE, 0x0A24BB5A, 0xF84F3859, + 0x2C855CB2, 0xDEEEDFB1, 0xCDBE2C45, 0x3FD5AF46, + 0x7198540D, 0x83F3D70E, 0x90A324FA, 0x62C8A7F9, + 0xB602C312, 0x44694011, 0x5739B3E5, 0xA55230E6, + 0xFB410CC2, 0x092A8FC1, 0x1A7A7C35, 0xE811FF36, + 0x3CDB9BDD, 0xCEB018DE, 0xDDE0EB2A, 0x2F8B6829, + 0x82F63B78, 0x709DB87B, 0x63CD4B8F, 0x91A6C88C, + 0x456CAC67, 0xB7072F64, 0xA457DC90, 0x563C5F93, + 0x082F63B7, 0xFA44E0B4, 0xE9141340, 0x1B7F9043, + 0xCFB5F4A8, 0x3DDE77AB, 0x2E8E845F, 0xDCE5075C, + 0x92A8FC17, 0x60C37F14, 0x73938CE0, 0x81F80FE3, + 0x55326B08, 0xA759E80B, 0xB4091BFF, 0x466298FC, + 0x1871A4D8, 0xEA1A27DB, 0xF94AD42F, 0x0B21572C, + 0xDFEB33C7, 0x2D80B0C4, 0x3ED04330, 0xCCBBC033, + 0xA24BB5A6, 0x502036A5, 0x4370C551, 0xB11B4652, + 0x65D122B9, 0x97BAA1BA, 0x84EA524E, 0x7681D14D, + 0x2892ED69, 0xDAF96E6A, 0xC9A99D9E, 0x3BC21E9D, + 0xEF087A76, 0x1D63F975, 0x0E330A81, 0xFC588982, + 0xB21572C9, 0x407EF1CA, 0x532E023E, 0xA145813D, + 0x758FE5D6, 0x87E466D5, 0x94B49521, 0x66DF1622, + 0x38CC2A06, 0xCAA7A905, 0xD9F75AF1, 0x2B9CD9F2, + 0xFF56BD19, 0x0D3D3E1A, 0x1E6DCDEE, 0xEC064EED, + 0xC38D26C4, 0x31E6A5C7, 0x22B65633, 0xD0DDD530, + 0x0417B1DB, 0xF67C32D8, 0xE52CC12C, 0x1747422F, + 0x49547E0B, 0xBB3FFD08, 0xA86F0EFC, 0x5A048DFF, + 0x8ECEE914, 0x7CA56A17, 0x6FF599E3, 0x9D9E1AE0, + 0xD3D3E1AB, 0x21B862A8, 0x32E8915C, 0xC083125F, + 0x144976B4, 0xE622F5B7, 0xF5720643, 0x07198540, + 0x590AB964, 0xAB613A67, 0xB831C993, 0x4A5A4A90, + 0x9E902E7B, 0x6CFBAD78, 0x7FAB5E8C, 0x8DC0DD8F, + 0xE330A81A, 0x115B2B19, 0x020BD8ED, 0xF0605BEE, + 0x24AA3F05, 0xD6C1BC06, 0xC5914FF2, 0x37FACCF1, + 0x69E9F0D5, 0x9B8273D6, 0x88D28022, 0x7AB90321, + 0xAE7367CA, 0x5C18E4C9, 0x4F48173D, 0xBD23943E, + 0xF36E6F75, 0x0105EC76, 0x12551F82, 0xE03E9C81, + 0x34F4F86A, 0xC69F7B69, 0xD5CF889D, 0x27A40B9E, + 0x79B737BA, 0x8BDCB4B9, 0x988C474D, 0x6AE7C44E, + 0xBE2DA0A5, 0x4C4623A6, 0x5F16D052, 0xAD7D5351, + /* T8_1 */ + 0x00000000, 0x13A29877, 0x274530EE, 0x34E7A899, + 0x4E8A61DC, 0x5D28F9AB, 0x69CF5132, 0x7A6DC945, + 0x9D14C3B8, 0x8EB65BCF, 0xBA51F356, 0xA9F36B21, + 0xD39EA264, 0xC03C3A13, 0xF4DB928A, 0xE7790AFD, + 0x3FC5F181, 0x2C6769F6, 0x1880C16F, 0x0B225918, + 0x714F905D, 0x62ED082A, 0x560AA0B3, 0x45A838C4, + 0xA2D13239, 0xB173AA4E, 0x859402D7, 0x96369AA0, + 0xEC5B53E5, 0xFFF9CB92, 0xCB1E630B, 0xD8BCFB7C, + 0x7F8BE302, 0x6C297B75, 0x58CED3EC, 0x4B6C4B9B, + 0x310182DE, 0x22A31AA9, 0x1644B230, 0x05E62A47, + 0xE29F20BA, 0xF13DB8CD, 0xC5DA1054, 0xD6788823, + 0xAC154166, 0xBFB7D911, 0x8B507188, 0x98F2E9FF, + 0x404E1283, 0x53EC8AF4, 0x670B226D, 0x74A9BA1A, + 0x0EC4735F, 0x1D66EB28, 0x298143B1, 0x3A23DBC6, + 0xDD5AD13B, 0xCEF8494C, 0xFA1FE1D5, 0xE9BD79A2, + 0x93D0B0E7, 0x80722890, 0xB4958009, 0xA737187E, + 0xFF17C604, 0xECB55E73, 0xD852F6EA, 0xCBF06E9D, + 0xB19DA7D8, 0xA23F3FAF, 0x96D89736, 0x857A0F41, + 0x620305BC, 0x71A19DCB, 0x45463552, 0x56E4AD25, + 0x2C896460, 0x3F2BFC17, 0x0BCC548E, 0x186ECCF9, + 0xC0D23785, 0xD370AFF2, 0xE797076B, 0xF4359F1C, + 0x8E585659, 0x9DFACE2E, 0xA91D66B7, 0xBABFFEC0, + 0x5DC6F43D, 0x4E646C4A, 0x7A83C4D3, 0x69215CA4, + 0x134C95E1, 0x00EE0D96, 0x3409A50F, 0x27AB3D78, + 0x809C2506, 0x933EBD71, 0xA7D915E8, 0xB47B8D9F, + 0xCE1644DA, 0xDDB4DCAD, 0xE9537434, 0xFAF1EC43, + 0x1D88E6BE, 0x0E2A7EC9, 0x3ACDD650, 0x296F4E27, + 0x53028762, 0x40A01F15, 0x7447B78C, 0x67E52FFB, + 0xBF59D487, 0xACFB4CF0, 0x981CE469, 0x8BBE7C1E, + 0xF1D3B55B, 0xE2712D2C, 0xD69685B5, 0xC5341DC2, + 0x224D173F, 0x31EF8F48, 0x050827D1, 0x16AABFA6, + 0x6CC776E3, 0x7F65EE94, 0x4B82460D, 0x5820DE7A, + 0xFBC3FAF9, 0xE861628E, 0xDC86CA17, 0xCF245260, + 0xB5499B25, 0xA6EB0352, 0x920CABCB, 0x81AE33BC, + 0x66D73941, 0x7575A136, 0x419209AF, 0x523091D8, + 0x285D589D, 0x3BFFC0EA, 0x0F186873, 0x1CBAF004, + 0xC4060B78, 0xD7A4930F, 0xE3433B96, 0xF0E1A3E1, + 0x8A8C6AA4, 0x992EF2D3, 0xADC95A4A, 0xBE6BC23D, + 0x5912C8C0, 0x4AB050B7, 0x7E57F82E, 0x6DF56059, + 0x1798A91C, 0x043A316B, 0x30DD99F2, 0x237F0185, + 0x844819FB, 0x97EA818C, 0xA30D2915, 0xB0AFB162, + 0xCAC27827, 0xD960E050, 0xED8748C9, 0xFE25D0BE, + 0x195CDA43, 0x0AFE4234, 0x3E19EAAD, 0x2DBB72DA, + 0x57D6BB9F, 0x447423E8, 0x70938B71, 0x63311306, + 0xBB8DE87A, 0xA82F700D, 0x9CC8D894, 0x8F6A40E3, + 0xF50789A6, 0xE6A511D1, 0xD242B948, 0xC1E0213F, + 0x26992BC2, 0x353BB3B5, 0x01DC1B2C, 0x127E835B, + 0x68134A1E, 0x7BB1D269, 0x4F567AF0, 0x5CF4E287, + 0x04D43CFD, 0x1776A48A, 0x23910C13, 0x30339464, + 0x4A5E5D21, 0x59FCC556, 0x6D1B6DCF, 0x7EB9F5B8, + 0x99C0FF45, 0x8A626732, 0xBE85CFAB, 0xAD2757DC, + 0xD74A9E99, 0xC4E806EE, 0xF00FAE77, 0xE3AD3600, + 0x3B11CD7C, 0x28B3550B, 0x1C54FD92, 0x0FF665E5, + 0x759BACA0, 0x663934D7, 0x52DE9C4E, 0x417C0439, + 0xA6050EC4, 0xB5A796B3, 0x81403E2A, 0x92E2A65D, + 0xE88F6F18, 0xFB2DF76F, 0xCFCA5FF6, 0xDC68C781, + 0x7B5FDFFF, 0x68FD4788, 0x5C1AEF11, 0x4FB87766, + 0x35D5BE23, 0x26772654, 0x12908ECD, 0x013216BA, + 0xE64B1C47, 0xF5E98430, 0xC10E2CA9, 0xD2ACB4DE, + 0xA8C17D9B, 0xBB63E5EC, 0x8F844D75, 0x9C26D502, + 0x449A2E7E, 0x5738B609, 0x63DF1E90, 0x707D86E7, + 0x0A104FA2, 0x19B2D7D5, 0x2D557F4C, 0x3EF7E73B, + 0xD98EEDC6, 0xCA2C75B1, 0xFECBDD28, 0xED69455F, + 0x97048C1A, 0x84A6146D, 0xB041BCF4, 0xA3E32483, + /* T8_2 */ + 0x00000000, 0xA541927E, 0x4F6F520D, 0xEA2EC073, + 0x9EDEA41A, 0x3B9F3664, 0xD1B1F617, 0x74F06469, + 0x38513EC5, 0x9D10ACBB, 0x773E6CC8, 0xD27FFEB6, + 0xA68F9ADF, 0x03CE08A1, 0xE9E0C8D2, 0x4CA15AAC, + 0x70A27D8A, 0xD5E3EFF4, 0x3FCD2F87, 0x9A8CBDF9, + 0xEE7CD990, 0x4B3D4BEE, 0xA1138B9D, 0x045219E3, + 0x48F3434F, 0xEDB2D131, 0x079C1142, 0xA2DD833C, + 0xD62DE755, 0x736C752B, 0x9942B558, 0x3C032726, + 0xE144FB14, 0x4405696A, 0xAE2BA919, 0x0B6A3B67, + 0x7F9A5F0E, 0xDADBCD70, 0x30F50D03, 0x95B49F7D, + 0xD915C5D1, 0x7C5457AF, 0x967A97DC, 0x333B05A2, + 0x47CB61CB, 0xE28AF3B5, 0x08A433C6, 0xADE5A1B8, + 0x91E6869E, 0x34A714E0, 0xDE89D493, 0x7BC846ED, + 0x0F382284, 0xAA79B0FA, 0x40577089, 0xE516E2F7, + 0xA9B7B85B, 0x0CF62A25, 0xE6D8EA56, 0x43997828, + 0x37691C41, 0x92288E3F, 0x78064E4C, 0xDD47DC32, + 0xC76580D9, 0x622412A7, 0x880AD2D4, 0x2D4B40AA, + 0x59BB24C3, 0xFCFAB6BD, 0x16D476CE, 0xB395E4B0, + 0xFF34BE1C, 0x5A752C62, 0xB05BEC11, 0x151A7E6F, + 0x61EA1A06, 0xC4AB8878, 0x2E85480B, 0x8BC4DA75, + 0xB7C7FD53, 0x12866F2D, 0xF8A8AF5E, 0x5DE93D20, + 0x29195949, 0x8C58CB37, 0x66760B44, 0xC337993A, + 0x8F96C396, 0x2AD751E8, 0xC0F9919B, 0x65B803E5, + 0x1148678C, 0xB409F5F2, 0x5E273581, 0xFB66A7FF, + 0x26217BCD, 0x8360E9B3, 0x694E29C0, 0xCC0FBBBE, + 0xB8FFDFD7, 0x1DBE4DA9, 0xF7908DDA, 0x52D11FA4, + 0x1E704508, 0xBB31D776, 0x511F1705, 0xF45E857B, + 0x80AEE112, 0x25EF736C, 0xCFC1B31F, 0x6A802161, + 0x56830647, 0xF3C29439, 0x19EC544A, 0xBCADC634, + 0xC85DA25D, 0x6D1C3023, 0x8732F050, 0x2273622E, + 0x6ED23882, 0xCB93AAFC, 0x21BD6A8F, 0x84FCF8F1, + 0xF00C9C98, 0x554D0EE6, 0xBF63CE95, 0x1A225CEB, + 0x8B277743, 0x2E66E53D, 0xC448254E, 0x6109B730, + 0x15F9D359, 0xB0B84127, 0x5A968154, 0xFFD7132A, + 0xB3764986, 0x1637DBF8, 0xFC191B8B, 0x595889F5, + 0x2DA8ED9C, 0x88E97FE2, 0x62C7BF91, 0xC7862DEF, + 0xFB850AC9, 0x5EC498B7, 0xB4EA58C4, 0x11ABCABA, + 0x655BAED3, 0xC01A3CAD, 0x2A34FCDE, 0x8F756EA0, + 0xC3D4340C, 0x6695A672, 0x8CBB6601, 0x29FAF47F, + 0x5D0A9016, 0xF84B0268, 0x1265C21B, 0xB7245065, + 0x6A638C57, 0xCF221E29, 0x250CDE5A, 0x804D4C24, + 0xF4BD284D, 0x51FCBA33, 0xBBD27A40, 0x1E93E83E, + 0x5232B292, 0xF77320EC, 0x1D5DE09F, 0xB81C72E1, + 0xCCEC1688, 0x69AD84F6, 0x83834485, 0x26C2D6FB, + 0x1AC1F1DD, 0xBF8063A3, 0x55AEA3D0, 0xF0EF31AE, + 0x841F55C7, 0x215EC7B9, 0xCB7007CA, 0x6E3195B4, + 0x2290CF18, 0x87D15D66, 0x6DFF9D15, 0xC8BE0F6B, + 0xBC4E6B02, 0x190FF97C, 0xF321390F, 0x5660AB71, + 0x4C42F79A, 0xE90365E4, 0x032DA597, 0xA66C37E9, + 0xD29C5380, 0x77DDC1FE, 0x9DF3018D, 0x38B293F3, + 0x7413C95F, 0xD1525B21, 0x3B7C9B52, 0x9E3D092C, + 0xEACD6D45, 0x4F8CFF3B, 0xA5A23F48, 0x00E3AD36, + 0x3CE08A10, 0x99A1186E, 0x738FD81D, 0xD6CE4A63, + 0xA23E2E0A, 0x077FBC74, 0xED517C07, 0x4810EE79, + 0x04B1B4D5, 0xA1F026AB, 0x4BDEE6D8, 0xEE9F74A6, + 0x9A6F10CF, 0x3F2E82B1, 0xD50042C2, 0x7041D0BC, + 0xAD060C8E, 0x08479EF0, 0xE2695E83, 0x4728CCFD, + 0x33D8A894, 0x96993AEA, 0x7CB7FA99, 0xD9F668E7, + 0x9557324B, 0x3016A035, 0xDA386046, 0x7F79F238, + 0x0B899651, 0xAEC8042F, 0x44E6C45C, 0xE1A75622, + 0xDDA47104, 0x78E5E37A, 0x92CB2309, 0x378AB177, + 0x437AD51E, 0xE63B4760, 0x0C158713, 0xA954156D, + 0xE5F54FC1, 0x40B4DDBF, 0xAA9A1DCC, 0x0FDB8FB2, + 0x7B2BEBDB, 0xDE6A79A5, 0x3444B9D6, 0x91052BA8, + /* T8_3 */ + 0x00000000, 0xDD45AAB8, 0xBF672381, 0x62228939, + 0x7B2231F3, 0xA6679B4B, 0xC4451272, 0x1900B8CA, + 0xF64463E6, 0x2B01C95E, 0x49234067, 0x9466EADF, + 0x8D665215, 0x5023F8AD, 0x32017194, 0xEF44DB2C, + 0xE964B13D, 0x34211B85, 0x560392BC, 0x8B463804, + 0x924680CE, 0x4F032A76, 0x2D21A34F, 0xF06409F7, + 0x1F20D2DB, 0xC2657863, 0xA047F15A, 0x7D025BE2, + 0x6402E328, 0xB9474990, 0xDB65C0A9, 0x06206A11, + 0xD725148B, 0x0A60BE33, 0x6842370A, 0xB5079DB2, + 0xAC072578, 0x71428FC0, 0x136006F9, 0xCE25AC41, + 0x2161776D, 0xFC24DDD5, 0x9E0654EC, 0x4343FE54, + 0x5A43469E, 0x8706EC26, 0xE524651F, 0x3861CFA7, + 0x3E41A5B6, 0xE3040F0E, 0x81268637, 0x5C632C8F, + 0x45639445, 0x98263EFD, 0xFA04B7C4, 0x27411D7C, + 0xC805C650, 0x15406CE8, 0x7762E5D1, 0xAA274F69, + 0xB327F7A3, 0x6E625D1B, 0x0C40D422, 0xD1057E9A, + 0xABA65FE7, 0x76E3F55F, 0x14C17C66, 0xC984D6DE, + 0xD0846E14, 0x0DC1C4AC, 0x6FE34D95, 0xB2A6E72D, + 0x5DE23C01, 0x80A796B9, 0xE2851F80, 0x3FC0B538, + 0x26C00DF2, 0xFB85A74A, 0x99A72E73, 0x44E284CB, + 0x42C2EEDA, 0x9F874462, 0xFDA5CD5B, 0x20E067E3, + 0x39E0DF29, 0xE4A57591, 0x8687FCA8, 0x5BC25610, + 0xB4868D3C, 0x69C32784, 0x0BE1AEBD, 0xD6A40405, + 0xCFA4BCCF, 0x12E11677, 0x70C39F4E, 0xAD8635F6, + 0x7C834B6C, 0xA1C6E1D4, 0xC3E468ED, 0x1EA1C255, + 0x07A17A9F, 0xDAE4D027, 0xB8C6591E, 0x6583F3A6, + 0x8AC7288A, 0x57828232, 0x35A00B0B, 0xE8E5A1B3, + 0xF1E51979, 0x2CA0B3C1, 0x4E823AF8, 0x93C79040, + 0x95E7FA51, 0x48A250E9, 0x2A80D9D0, 0xF7C57368, + 0xEEC5CBA2, 0x3380611A, 0x51A2E823, 0x8CE7429B, + 0x63A399B7, 0xBEE6330F, 0xDCC4BA36, 0x0181108E, + 0x1881A844, 0xC5C402FC, 0xA7E68BC5, 0x7AA3217D, + 0x52A0C93F, 0x8FE56387, 0xEDC7EABE, 0x30824006, + 0x2982F8CC, 0xF4C75274, 0x96E5DB4D, 0x4BA071F5, + 0xA4E4AAD9, 0x79A10061, 0x1B838958, 0xC6C623E0, + 0xDFC69B2A, 0x02833192, 0x60A1B8AB, 0xBDE41213, + 0xBBC47802, 0x6681D2BA, 0x04A35B83, 0xD9E6F13B, + 0xC0E649F1, 0x1DA3E349, 0x7F816A70, 0xA2C4C0C8, + 0x4D801BE4, 0x90C5B15C, 0xF2E73865, 0x2FA292DD, + 0x36A22A17, 0xEBE780AF, 0x89C50996, 0x5480A32E, + 0x8585DDB4, 0x58C0770C, 0x3AE2FE35, 0xE7A7548D, + 0xFEA7EC47, 0x23E246FF, 0x41C0CFC6, 0x9C85657E, + 0x73C1BE52, 0xAE8414EA, 0xCCA69DD3, 0x11E3376B, + 0x08E38FA1, 0xD5A62519, 0xB784AC20, 0x6AC10698, + 0x6CE16C89, 0xB1A4C631, 0xD3864F08, 0x0EC3E5B0, + 0x17C35D7A, 0xCA86F7C2, 0xA8A47EFB, 0x75E1D443, + 0x9AA50F6F, 0x47E0A5D7, 0x25C22CEE, 0xF8878656, + 0xE1873E9C, 0x3CC29424, 0x5EE01D1D, 0x83A5B7A5, + 0xF90696D8, 0x24433C60, 0x4661B559, 0x9B241FE1, + 0x8224A72B, 0x5F610D93, 0x3D4384AA, 0xE0062E12, + 0x0F42F53E, 0xD2075F86, 0xB025D6BF, 0x6D607C07, + 0x7460C4CD, 0xA9256E75, 0xCB07E74C, 0x16424DF4, + 0x106227E5, 0xCD278D5D, 0xAF050464, 0x7240AEDC, + 0x6B401616, 0xB605BCAE, 0xD4273597, 0x09629F2F, + 0xE6264403, 0x3B63EEBB, 0x59416782, 0x8404CD3A, + 0x9D0475F0, 0x4041DF48, 0x22635671, 0xFF26FCC9, + 0x2E238253, 0xF36628EB, 0x9144A1D2, 0x4C010B6A, + 0x5501B3A0, 0x88441918, 0xEA669021, 0x37233A99, + 0xD867E1B5, 0x05224B0D, 0x6700C234, 0xBA45688C, + 0xA345D046, 0x7E007AFE, 0x1C22F3C7, 0xC167597F, + 0xC747336E, 0x1A0299D6, 0x782010EF, 0xA565BA57, + 0xBC65029D, 0x6120A825, 0x0302211C, 0xDE478BA4, + 0x31035088, 0xEC46FA30, 0x8E647309, 0x5321D9B1, + 0x4A21617B, 0x9764CBC3, 0xF54642FA, 0x2803E842, + /* T8_4 */ + 0x00000000, 0x38116FAC, 0x7022DF58, 0x4833B0F4, + 0xE045BEB0, 0xD854D11C, 0x906761E8, 0xA8760E44, + 0xC5670B91, 0xFD76643D, 0xB545D4C9, 0x8D54BB65, + 0x2522B521, 0x1D33DA8D, 0x55006A79, 0x6D1105D5, + 0x8F2261D3, 0xB7330E7F, 0xFF00BE8B, 0xC711D127, + 0x6F67DF63, 0x5776B0CF, 0x1F45003B, 0x27546F97, + 0x4A456A42, 0x725405EE, 0x3A67B51A, 0x0276DAB6, + 0xAA00D4F2, 0x9211BB5E, 0xDA220BAA, 0xE2336406, + 0x1BA8B557, 0x23B9DAFB, 0x6B8A6A0F, 0x539B05A3, + 0xFBED0BE7, 0xC3FC644B, 0x8BCFD4BF, 0xB3DEBB13, + 0xDECFBEC6, 0xE6DED16A, 0xAEED619E, 0x96FC0E32, + 0x3E8A0076, 0x069B6FDA, 0x4EA8DF2E, 0x76B9B082, + 0x948AD484, 0xAC9BBB28, 0xE4A80BDC, 0xDCB96470, + 0x74CF6A34, 0x4CDE0598, 0x04EDB56C, 0x3CFCDAC0, + 0x51EDDF15, 0x69FCB0B9, 0x21CF004D, 0x19DE6FE1, + 0xB1A861A5, 0x89B90E09, 0xC18ABEFD, 0xF99BD151, + 0x37516AAE, 0x0F400502, 0x4773B5F6, 0x7F62DA5A, + 0xD714D41E, 0xEF05BBB2, 0xA7360B46, 0x9F2764EA, + 0xF236613F, 0xCA270E93, 0x8214BE67, 0xBA05D1CB, + 0x1273DF8F, 0x2A62B023, 0x625100D7, 0x5A406F7B, + 0xB8730B7D, 0x806264D1, 0xC851D425, 0xF040BB89, + 0x5836B5CD, 0x6027DA61, 0x28146A95, 0x10050539, + 0x7D1400EC, 0x45056F40, 0x0D36DFB4, 0x3527B018, + 0x9D51BE5C, 0xA540D1F0, 0xED736104, 0xD5620EA8, + 0x2CF9DFF9, 0x14E8B055, 0x5CDB00A1, 0x64CA6F0D, + 0xCCBC6149, 0xF4AD0EE5, 0xBC9EBE11, 0x848FD1BD, + 0xE99ED468, 0xD18FBBC4, 0x99BC0B30, 0xA1AD649C, + 0x09DB6AD8, 0x31CA0574, 0x79F9B580, 0x41E8DA2C, + 0xA3DBBE2A, 0x9BCAD186, 0xD3F96172, 0xEBE80EDE, + 0x439E009A, 0x7B8F6F36, 0x33BCDFC2, 0x0BADB06E, + 0x66BCB5BB, 0x5EADDA17, 0x169E6AE3, 0x2E8F054F, + 0x86F90B0B, 0xBEE864A7, 0xF6DBD453, 0xCECABBFF, + 0x6EA2D55C, 0x56B3BAF0, 0x1E800A04, 0x269165A8, + 0x8EE76BEC, 0xB6F60440, 0xFEC5B4B4, 0xC6D4DB18, + 0xABC5DECD, 0x93D4B161, 0xDBE70195, 0xE3F66E39, + 0x4B80607D, 0x73910FD1, 0x3BA2BF25, 0x03B3D089, + 0xE180B48F, 0xD991DB23, 0x91A26BD7, 0xA9B3047B, + 0x01C50A3F, 0x39D46593, 0x71E7D567, 0x49F6BACB, + 0x24E7BF1E, 0x1CF6D0B2, 0x54C56046, 0x6CD40FEA, + 0xC4A201AE, 0xFCB36E02, 0xB480DEF6, 0x8C91B15A, + 0x750A600B, 0x4D1B0FA7, 0x0528BF53, 0x3D39D0FF, + 0x954FDEBB, 0xAD5EB117, 0xE56D01E3, 0xDD7C6E4F, + 0xB06D6B9A, 0x887C0436, 0xC04FB4C2, 0xF85EDB6E, + 0x5028D52A, 0x6839BA86, 0x200A0A72, 0x181B65DE, + 0xFA2801D8, 0xC2396E74, 0x8A0ADE80, 0xB21BB12C, + 0x1A6DBF68, 0x227CD0C4, 0x6A4F6030, 0x525E0F9C, + 0x3F4F0A49, 0x075E65E5, 0x4F6DD511, 0x777CBABD, + 0xDF0AB4F9, 0xE71BDB55, 0xAF286BA1, 0x9739040D, + 0x59F3BFF2, 0x61E2D05E, 0x29D160AA, 0x11C00F06, + 0xB9B60142, 0x81A76EEE, 0xC994DE1A, 0xF185B1B6, + 0x9C94B463, 0xA485DBCF, 0xECB66B3B, 0xD4A70497, + 0x7CD10AD3, 0x44C0657F, 0x0CF3D58B, 0x34E2BA27, + 0xD6D1DE21, 0xEEC0B18D, 0xA6F30179, 0x9EE26ED5, + 0x36946091, 0x0E850F3D, 0x46B6BFC9, 0x7EA7D065, + 0x13B6D5B0, 0x2BA7BA1C, 0x63940AE8, 0x5B856544, + 0xF3F36B00, 0xCBE204AC, 0x83D1B458, 0xBBC0DBF4, + 0x425B0AA5, 0x7A4A6509, 0x3279D5FD, 0x0A68BA51, + 0xA21EB415, 0x9A0FDBB9, 0xD23C6B4D, 0xEA2D04E1, + 0x873C0134, 0xBF2D6E98, 0xF71EDE6C, 0xCF0FB1C0, + 0x6779BF84, 0x5F68D028, 0x175B60DC, 0x2F4A0F70, + 0xCD796B76, 0xF56804DA, 0xBD5BB42E, 0x854ADB82, + 0x2D3CD5C6, 0x152DBA6A, 0x5D1E0A9E, 0x650F6532, + 0x081E60E7, 0x300F0F4B, 0x783CBFBF, 0x402DD013, + 0xE85BDE57, 0xD04AB1FB, 0x9879010F, 0xA0686EA3, + /* T8_5 */ + 0x00000000, 0xEF306B19, 0xDB8CA0C3, 0x34BCCBDA, + 0xB2F53777, 0x5DC55C6E, 0x697997B4, 0x8649FCAD, + 0x6006181F, 0x8F367306, 0xBB8AB8DC, 0x54BAD3C5, + 0xD2F32F68, 0x3DC34471, 0x097F8FAB, 0xE64FE4B2, + 0xC00C303E, 0x2F3C5B27, 0x1B8090FD, 0xF4B0FBE4, + 0x72F90749, 0x9DC96C50, 0xA975A78A, 0x4645CC93, + 0xA00A2821, 0x4F3A4338, 0x7B8688E2, 0x94B6E3FB, + 0x12FF1F56, 0xFDCF744F, 0xC973BF95, 0x2643D48C, + 0x85F4168D, 0x6AC47D94, 0x5E78B64E, 0xB148DD57, + 0x370121FA, 0xD8314AE3, 0xEC8D8139, 0x03BDEA20, + 0xE5F20E92, 0x0AC2658B, 0x3E7EAE51, 0xD14EC548, + 0x570739E5, 0xB83752FC, 0x8C8B9926, 0x63BBF23F, + 0x45F826B3, 0xAAC84DAA, 0x9E748670, 0x7144ED69, + 0xF70D11C4, 0x183D7ADD, 0x2C81B107, 0xC3B1DA1E, + 0x25FE3EAC, 0xCACE55B5, 0xFE729E6F, 0x1142F576, + 0x970B09DB, 0x783B62C2, 0x4C87A918, 0xA3B7C201, + 0x0E045BEB, 0xE13430F2, 0xD588FB28, 0x3AB89031, + 0xBCF16C9C, 0x53C10785, 0x677DCC5F, 0x884DA746, + 0x6E0243F4, 0x813228ED, 0xB58EE337, 0x5ABE882E, + 0xDCF77483, 0x33C71F9A, 0x077BD440, 0xE84BBF59, + 0xCE086BD5, 0x213800CC, 0x1584CB16, 0xFAB4A00F, + 0x7CFD5CA2, 0x93CD37BB, 0xA771FC61, 0x48419778, + 0xAE0E73CA, 0x413E18D3, 0x7582D309, 0x9AB2B810, + 0x1CFB44BD, 0xF3CB2FA4, 0xC777E47E, 0x28478F67, + 0x8BF04D66, 0x64C0267F, 0x507CEDA5, 0xBF4C86BC, + 0x39057A11, 0xD6351108, 0xE289DAD2, 0x0DB9B1CB, + 0xEBF65579, 0x04C63E60, 0x307AF5BA, 0xDF4A9EA3, + 0x5903620E, 0xB6330917, 0x828FC2CD, 0x6DBFA9D4, + 0x4BFC7D58, 0xA4CC1641, 0x9070DD9B, 0x7F40B682, + 0xF9094A2F, 0x16392136, 0x2285EAEC, 0xCDB581F5, + 0x2BFA6547, 0xC4CA0E5E, 0xF076C584, 0x1F46AE9D, + 0x990F5230, 0x763F3929, 0x4283F2F3, 0xADB399EA, + 0x1C08B7D6, 0xF338DCCF, 0xC7841715, 0x28B47C0C, + 0xAEFD80A1, 0x41CDEBB8, 0x75712062, 0x9A414B7B, + 0x7C0EAFC9, 0x933EC4D0, 0xA7820F0A, 0x48B26413, + 0xCEFB98BE, 0x21CBF3A7, 0x1577387D, 0xFA475364, + 0xDC0487E8, 0x3334ECF1, 0x0788272B, 0xE8B84C32, + 0x6EF1B09F, 0x81C1DB86, 0xB57D105C, 0x5A4D7B45, + 0xBC029FF7, 0x5332F4EE, 0x678E3F34, 0x88BE542D, + 0x0EF7A880, 0xE1C7C399, 0xD57B0843, 0x3A4B635A, + 0x99FCA15B, 0x76CCCA42, 0x42700198, 0xAD406A81, + 0x2B09962C, 0xC439FD35, 0xF08536EF, 0x1FB55DF6, + 0xF9FAB944, 0x16CAD25D, 0x22761987, 0xCD46729E, + 0x4B0F8E33, 0xA43FE52A, 0x90832EF0, 0x7FB345E9, + 0x59F09165, 0xB6C0FA7C, 0x827C31A6, 0x6D4C5ABF, + 0xEB05A612, 0x0435CD0B, 0x308906D1, 0xDFB96DC8, + 0x39F6897A, 0xD6C6E263, 0xE27A29B9, 0x0D4A42A0, + 0x8B03BE0D, 0x6433D514, 0x508F1ECE, 0xBFBF75D7, + 0x120CEC3D, 0xFD3C8724, 0xC9804CFE, 0x26B027E7, + 0xA0F9DB4A, 0x4FC9B053, 0x7B757B89, 0x94451090, + 0x720AF422, 0x9D3A9F3B, 0xA98654E1, 0x46B63FF8, + 0xC0FFC355, 0x2FCFA84C, 0x1B736396, 0xF443088F, + 0xD200DC03, 0x3D30B71A, 0x098C7CC0, 0xE6BC17D9, + 0x60F5EB74, 0x8FC5806D, 0xBB794BB7, 0x544920AE, + 0xB206C41C, 0x5D36AF05, 0x698A64DF, 0x86BA0FC6, + 0x00F3F36B, 0xEFC39872, 0xDB7F53A8, 0x344F38B1, + 0x97F8FAB0, 0x78C891A9, 0x4C745A73, 0xA344316A, + 0x250DCDC7, 0xCA3DA6DE, 0xFE816D04, 0x11B1061D, + 0xF7FEE2AF, 0x18CE89B6, 0x2C72426C, 0xC3422975, + 0x450BD5D8, 0xAA3BBEC1, 0x9E87751B, 0x71B71E02, + 0x57F4CA8E, 0xB8C4A197, 0x8C786A4D, 0x63480154, + 0xE501FDF9, 0x0A3196E0, 0x3E8D5D3A, 0xD1BD3623, + 0x37F2D291, 0xD8C2B988, 0xEC7E7252, 0x034E194B, + 0x8507E5E6, 0x6A378EFF, 0x5E8B4525, 0xB1BB2E3C, + /* T8_6 */ + 0x00000000, 0x68032CC8, 0xD0065990, 0xB8057558, + 0xA5E0C5D1, 0xCDE3E919, 0x75E69C41, 0x1DE5B089, + 0x4E2DFD53, 0x262ED19B, 0x9E2BA4C3, 0xF628880B, + 0xEBCD3882, 0x83CE144A, 0x3BCB6112, 0x53C84DDA, + 0x9C5BFAA6, 0xF458D66E, 0x4C5DA336, 0x245E8FFE, + 0x39BB3F77, 0x51B813BF, 0xE9BD66E7, 0x81BE4A2F, + 0xD27607F5, 0xBA752B3D, 0x02705E65, 0x6A7372AD, + 0x7796C224, 0x1F95EEEC, 0xA7909BB4, 0xCF93B77C, + 0x3D5B83BD, 0x5558AF75, 0xED5DDA2D, 0x855EF6E5, + 0x98BB466C, 0xF0B86AA4, 0x48BD1FFC, 0x20BE3334, + 0x73767EEE, 0x1B755226, 0xA370277E, 0xCB730BB6, + 0xD696BB3F, 0xBE9597F7, 0x0690E2AF, 0x6E93CE67, + 0xA100791B, 0xC90355D3, 0x7106208B, 0x19050C43, + 0x04E0BCCA, 0x6CE39002, 0xD4E6E55A, 0xBCE5C992, + 0xEF2D8448, 0x872EA880, 0x3F2BDDD8, 0x5728F110, + 0x4ACD4199, 0x22CE6D51, 0x9ACB1809, 0xF2C834C1, + 0x7AB7077A, 0x12B42BB2, 0xAAB15EEA, 0xC2B27222, + 0xDF57C2AB, 0xB754EE63, 0x0F519B3B, 0x6752B7F3, + 0x349AFA29, 0x5C99D6E1, 0xE49CA3B9, 0x8C9F8F71, + 0x917A3FF8, 0xF9791330, 0x417C6668, 0x297F4AA0, + 0xE6ECFDDC, 0x8EEFD114, 0x36EAA44C, 0x5EE98884, + 0x430C380D, 0x2B0F14C5, 0x930A619D, 0xFB094D55, + 0xA8C1008F, 0xC0C22C47, 0x78C7591F, 0x10C475D7, + 0x0D21C55E, 0x6522E996, 0xDD279CCE, 0xB524B006, + 0x47EC84C7, 0x2FEFA80F, 0x97EADD57, 0xFFE9F19F, + 0xE20C4116, 0x8A0F6DDE, 0x320A1886, 0x5A09344E, + 0x09C17994, 0x61C2555C, 0xD9C72004, 0xB1C40CCC, + 0xAC21BC45, 0xC422908D, 0x7C27E5D5, 0x1424C91D, + 0xDBB77E61, 0xB3B452A9, 0x0BB127F1, 0x63B20B39, + 0x7E57BBB0, 0x16549778, 0xAE51E220, 0xC652CEE8, + 0x959A8332, 0xFD99AFFA, 0x459CDAA2, 0x2D9FF66A, + 0x307A46E3, 0x58796A2B, 0xE07C1F73, 0x887F33BB, + 0xF56E0EF4, 0x9D6D223C, 0x25685764, 0x4D6B7BAC, + 0x508ECB25, 0x388DE7ED, 0x808892B5, 0xE88BBE7D, + 0xBB43F3A7, 0xD340DF6F, 0x6B45AA37, 0x034686FF, + 0x1EA33676, 0x76A01ABE, 0xCEA56FE6, 0xA6A6432E, + 0x6935F452, 0x0136D89A, 0xB933ADC2, 0xD130810A, + 0xCCD53183, 0xA4D61D4B, 0x1CD36813, 0x74D044DB, + 0x27180901, 0x4F1B25C9, 0xF71E5091, 0x9F1D7C59, + 0x82F8CCD0, 0xEAFBE018, 0x52FE9540, 0x3AFDB988, + 0xC8358D49, 0xA036A181, 0x1833D4D9, 0x7030F811, + 0x6DD54898, 0x05D66450, 0xBDD31108, 0xD5D03DC0, + 0x8618701A, 0xEE1B5CD2, 0x561E298A, 0x3E1D0542, + 0x23F8B5CB, 0x4BFB9903, 0xF3FEEC5B, 0x9BFDC093, + 0x546E77EF, 0x3C6D5B27, 0x84682E7F, 0xEC6B02B7, + 0xF18EB23E, 0x998D9EF6, 0x2188EBAE, 0x498BC766, + 0x1A438ABC, 0x7240A674, 0xCA45D32C, 0xA246FFE4, + 0xBFA34F6D, 0xD7A063A5, 0x6FA516FD, 0x07A63A35, + 0x8FD9098E, 0xE7DA2546, 0x5FDF501E, 0x37DC7CD6, + 0x2A39CC5F, 0x423AE097, 0xFA3F95CF, 0x923CB907, + 0xC1F4F4DD, 0xA9F7D815, 0x11F2AD4D, 0x79F18185, + 0x6414310C, 0x0C171DC4, 0xB412689C, 0xDC114454, + 0x1382F328, 0x7B81DFE0, 0xC384AAB8, 0xAB878670, + 0xB66236F9, 0xDE611A31, 0x66646F69, 0x0E6743A1, + 0x5DAF0E7B, 0x35AC22B3, 0x8DA957EB, 0xE5AA7B23, + 0xF84FCBAA, 0x904CE762, 0x2849923A, 0x404ABEF2, + 0xB2828A33, 0xDA81A6FB, 0x6284D3A3, 0x0A87FF6B, + 0x17624FE2, 0x7F61632A, 0xC7641672, 0xAF673ABA, + 0xFCAF7760, 0x94AC5BA8, 0x2CA92EF0, 0x44AA0238, + 0x594FB2B1, 0x314C9E79, 0x8949EB21, 0xE14AC7E9, + 0x2ED97095, 0x46DA5C5D, 0xFEDF2905, 0x96DC05CD, + 0x8B39B544, 0xE33A998C, 0x5B3FECD4, 0x333CC01C, + 0x60F48DC6, 0x08F7A10E, 0xB0F2D456, 0xD8F1F89E, + 0xC5144817, 0xAD1764DF, 0x15121187, 0x7D113D4F, + /* T8_7 */ + 0x00000000, 0x493C7D27, 0x9278FA4E, 0xDB448769, + 0x211D826D, 0x6821FF4A, 0xB3657823, 0xFA590504, + 0x423B04DA, 0x0B0779FD, 0xD043FE94, 0x997F83B3, + 0x632686B7, 0x2A1AFB90, 0xF15E7CF9, 0xB86201DE, + 0x847609B4, 0xCD4A7493, 0x160EF3FA, 0x5F328EDD, + 0xA56B8BD9, 0xEC57F6FE, 0x37137197, 0x7E2F0CB0, + 0xC64D0D6E, 0x8F717049, 0x5435F720, 0x1D098A07, + 0xE7508F03, 0xAE6CF224, 0x7528754D, 0x3C14086A, + 0x0D006599, 0x443C18BE, 0x9F789FD7, 0xD644E2F0, + 0x2C1DE7F4, 0x65219AD3, 0xBE651DBA, 0xF759609D, + 0x4F3B6143, 0x06071C64, 0xDD439B0D, 0x947FE62A, + 0x6E26E32E, 0x271A9E09, 0xFC5E1960, 0xB5626447, + 0x89766C2D, 0xC04A110A, 0x1B0E9663, 0x5232EB44, + 0xA86BEE40, 0xE1579367, 0x3A13140E, 0x732F6929, + 0xCB4D68F7, 0x827115D0, 0x593592B9, 0x1009EF9E, + 0xEA50EA9A, 0xA36C97BD, 0x782810D4, 0x31146DF3, + 0x1A00CB32, 0x533CB615, 0x8878317C, 0xC1444C5B, + 0x3B1D495F, 0x72213478, 0xA965B311, 0xE059CE36, + 0x583BCFE8, 0x1107B2CF, 0xCA4335A6, 0x837F4881, + 0x79264D85, 0x301A30A2, 0xEB5EB7CB, 0xA262CAEC, + 0x9E76C286, 0xD74ABFA1, 0x0C0E38C8, 0x453245EF, + 0xBF6B40EB, 0xF6573DCC, 0x2D13BAA5, 0x642FC782, + 0xDC4DC65C, 0x9571BB7B, 0x4E353C12, 0x07094135, + 0xFD504431, 0xB46C3916, 0x6F28BE7F, 0x2614C358, + 0x1700AEAB, 0x5E3CD38C, 0x857854E5, 0xCC4429C2, + 0x361D2CC6, 0x7F2151E1, 0xA465D688, 0xED59ABAF, + 0x553BAA71, 0x1C07D756, 0xC743503F, 0x8E7F2D18, + 0x7426281C, 0x3D1A553B, 0xE65ED252, 0xAF62AF75, + 0x9376A71F, 0xDA4ADA38, 0x010E5D51, 0x48322076, + 0xB26B2572, 0xFB575855, 0x2013DF3C, 0x692FA21B, + 0xD14DA3C5, 0x9871DEE2, 0x4335598B, 0x0A0924AC, + 0xF05021A8, 0xB96C5C8F, 0x6228DBE6, 0x2B14A6C1, + 0x34019664, 0x7D3DEB43, 0xA6796C2A, 0xEF45110D, + 0x151C1409, 0x5C20692E, 0x8764EE47, 0xCE589360, + 0x763A92BE, 0x3F06EF99, 0xE44268F0, 0xAD7E15D7, + 0x572710D3, 0x1E1B6DF4, 0xC55FEA9D, 0x8C6397BA, + 0xB0779FD0, 0xF94BE2F7, 0x220F659E, 0x6B3318B9, + 0x916A1DBD, 0xD856609A, 0x0312E7F3, 0x4A2E9AD4, + 0xF24C9B0A, 0xBB70E62D, 0x60346144, 0x29081C63, + 0xD3511967, 0x9A6D6440, 0x4129E329, 0x08159E0E, + 0x3901F3FD, 0x703D8EDA, 0xAB7909B3, 0xE2457494, + 0x181C7190, 0x51200CB7, 0x8A648BDE, 0xC358F6F9, + 0x7B3AF727, 0x32068A00, 0xE9420D69, 0xA07E704E, + 0x5A27754A, 0x131B086D, 0xC85F8F04, 0x8163F223, + 0xBD77FA49, 0xF44B876E, 0x2F0F0007, 0x66337D20, + 0x9C6A7824, 0xD5560503, 0x0E12826A, 0x472EFF4D, + 0xFF4CFE93, 0xB67083B4, 0x6D3404DD, 0x240879FA, + 0xDE517CFE, 0x976D01D9, 0x4C2986B0, 0x0515FB97, + 0x2E015D56, 0x673D2071, 0xBC79A718, 0xF545DA3F, + 0x0F1CDF3B, 0x4620A21C, 0x9D642575, 0xD4585852, + 0x6C3A598C, 0x250624AB, 0xFE42A3C2, 0xB77EDEE5, + 0x4D27DBE1, 0x041BA6C6, 0xDF5F21AF, 0x96635C88, + 0xAA7754E2, 0xE34B29C5, 0x380FAEAC, 0x7133D38B, + 0x8B6AD68F, 0xC256ABA8, 0x19122CC1, 0x502E51E6, + 0xE84C5038, 0xA1702D1F, 0x7A34AA76, 0x3308D751, + 0xC951D255, 0x806DAF72, 0x5B29281B, 0x1215553C, + 0x230138CF, 0x6A3D45E8, 0xB179C281, 0xF845BFA6, + 0x021CBAA2, 0x4B20C785, 0x906440EC, 0xD9583DCB, + 0x613A3C15, 0x28064132, 0xF342C65B, 0xBA7EBB7C, + 0x4027BE78, 0x091BC35F, 0xD25F4436, 0x9B633911, + 0xA777317B, 0xEE4B4C5C, 0x350FCB35, 0x7C33B612, + 0x866AB316, 0xCF56CE31, 0x14124958, 0x5D2E347F, + 0xE54C35A1, 0xAC704886, 0x7734CFEF, 0x3E08B2C8, + 0xC451B7CC, 0x8D6DCAEB, 0x56294D82, 0x1F1530A5 + }; +} \ No newline at end of file diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/utils/StringUtils.java b/src/main/java/com/alicloud/openservices/tablestore/core/utils/StringUtils.java index dc28f41..f8bb157 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/core/utils/StringUtils.java +++ b/src/main/java/com/alicloud/openservices/tablestore/core/utils/StringUtils.java @@ -25,6 +25,7 @@ import java.text.Collator; import java.util.Collection; import java.util.Locale; +import java.util.regex.Pattern; /** * Utilities for converting objects to strings. @@ -292,4 +293,15 @@ public static void appendCompactedString(final StringBuilder destination, final public static boolean beginsWithIgnoreCase(final String data, final String seq) { return data.regionMatches(true, 0, seq, 0, seq.length()); } + + /** + * Check if 'value' match the regex pattern. + * + * @param regex the pattern + * @param value the value to check + * @return true if matched, else false. + */ + public static boolean matchRegexPattern(String regex, String value) { + return Pattern.compile(regex).matcher(value).matches(); + } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/core/utils/ValueUtil.java b/src/main/java/com/alicloud/openservices/tablestore/core/utils/ValueUtil.java new file mode 100644 index 0000000..66b484d --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/core/utils/ValueUtil.java @@ -0,0 +1,47 @@ +package com.alicloud.openservices.tablestore.core.utils; + +import com.alicloud.openservices.tablestore.model.ColumnValue; + +public class ValueUtil { + + public static ColumnValue toColumnValue(Object value) { + if (value instanceof Long) { + return ColumnValue.fromLong((Long)value); + } else if (value instanceof Integer) { + return ColumnValue.fromLong(((Integer)value).longValue()); + } else if (value instanceof Double) { + return ColumnValue.fromDouble((Double)value); + } else if (value instanceof String) { + return ColumnValue.fromString((String)value); + } else if (value instanceof Boolean) { + return ColumnValue.fromBoolean((Boolean)value); + } else if (value instanceof byte[]) { + return ColumnValue.fromBinary((byte[])value); + } else { + throw new IllegalArgumentException("unsupported type: " + value.getClass()); + } + } + + public static Object toObject(ColumnValue value) { + switch (value.getType()) { + case INTEGER: { + return value.asLong(); + } + case STRING: { + return value.asString(); + } + case BOOLEAN: { + return value.asBoolean(); + } + case DOUBLE: { + return value.asDouble(); + } + case BINARY: { + return value.asBinary(); + } + default: { + throw new RuntimeException("unexpected"); + } + } + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/ecosystem/CatalogManager.java b/src/main/java/com/alicloud/openservices/tablestore/ecosystem/CatalogManager.java new file mode 100644 index 0000000..3716426 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/ecosystem/CatalogManager.java @@ -0,0 +1,38 @@ +package com.alicloud.openservices.tablestore.ecosystem; + +import com.alicloud.openservices.tablestore.SyncClient; +import com.alicloud.openservices.tablestore.TableStoreException; +import com.alicloud.openservices.tablestore.core.ErrorCode; + +import java.util.concurrent.ConcurrentHashMap; + +public class CatalogManager implements ICatalogManager +{ + ConcurrentHashMap map; + private SyncClient client; + + public CatalogManager(SyncClient client) { + this.client = client; + map = new ConcurrentHashMap(); + // todo start a backend thread to refresh the table catalog + } + + @Override + public TableCatalog getTableCatalog(String tableName) { + TableCatalog catalog = map.get(tableName); + if (catalog == null) { + catalog = new TableCatalog(tableName); + try { + catalog.buildCatalog(client); + } catch (TableStoreException e) { + if (e.getErrorCode().equals(ErrorCode.OBJECT_NOT_EXIST)) { + return null; + } else { + throw e; + } + } + map.putIfAbsent(tableName, catalog); + } + return catalog; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/ecosystem/ComputeParameters.java b/src/main/java/com/alicloud/openservices/tablestore/ecosystem/ComputeParameters.java new file mode 100644 index 0000000..02ea98b --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/ecosystem/ComputeParameters.java @@ -0,0 +1,66 @@ +package com.alicloud.openservices.tablestore.ecosystem; + +public class ComputeParameters { + public ComputeParameters(int maxSplitsCount, long splitSizeInMBs, ComputeMode computeMode) { + this.maxSplitsCount = maxSplitsCount; + this.splitSizeInMBs = splitSizeInMBs; + this.computeMode = computeMode; + } + + public ComputeParameters(String searchIndexName, int maxSplitsCount) { + this.computeMode = ComputeMode.Search; + this.searchIndexName = searchIndexName; + this.maxSplitsCount = maxSplitsCount; + } + + /** + * compute mode + */ + public enum ComputeMode { + /** + * auto choose secondary index and search index + */ + Auto, + + /** + * scan kv + */ + KV, + + /** + * Scan search + */ + Search + } + + private int maxSplitsCount; + private long splitSizeInMBs; + private ComputeMode computeMode; + private String searchIndexName; + + public ComputeParameters() { + computeMode = ComputeMode.KV; + maxSplitsCount = 1000; + splitSizeInMBs = 10; + } + + public int getMaxSplitsCount() { + return maxSplitsCount; + } + + public long getSplitSizeInMBs() { + return splitSizeInMBs; + } + + public ComputeMode getComputeMode() { + return computeMode; + } + + public String getSearchIndexName() { + return searchIndexName; + } + + public void setComputeMode(ComputeMode computeMode) { + this.computeMode = computeMode; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/ecosystem/DefaultTablestoreSplitManager.java b/src/main/java/com/alicloud/openservices/tablestore/ecosystem/DefaultTablestoreSplitManager.java new file mode 100644 index 0000000..f39aa8a --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/ecosystem/DefaultTablestoreSplitManager.java @@ -0,0 +1,293 @@ +package com.alicloud.openservices.tablestore.ecosystem; + +import com.alicloud.openservices.tablestore.SyncClient; +import com.alicloud.openservices.tablestore.model.*; +import com.alicloud.openservices.tablestore.model.search.*; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.security.InvalidParameterException; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.atomic.AtomicBoolean; + +/** + * generate splits by filter + */ +public class DefaultTablestoreSplitManager implements ITablestoreSplitManager { + private static final Logger LOG = LoggerFactory.getLogger(DefaultTablestoreSplitManager.class); + + private ICatalogManager manager; + + public DefaultTablestoreSplitManager(SyncClient client) { + manager = new CatalogManager(client); + } + + + private final static AtomicBoolean enableSplitCache = new AtomicBoolean(true); + // key: instance_table_splitPointLimit_splitSizeInMBs + private static final Map splitsCache = + new ConcurrentHashMap(); + + public static void setEnableSplitCache(boolean enableSplitCache) { + DefaultTablestoreSplitManager.enableSplitCache.set(enableSplitCache); + } + + @Override + public List generateTablestoreSplits( + SyncClient client, + Filter filter, + String tableName, + ComputeParameters parameter, + List requiredColumns) { + TableCatalog catalog; + catalog = manager.getTableCatalog(tableName); + if (catalog == null) { + throw new InvalidParameterException("table does not exist"); + } + List tableSplits = new ArrayList(); + LeftMatchResult calculateResult = new LeftMatchResult(tableName, catalog.getTableMeta()); + if (parameter.getComputeMode() == ComputeParameters.ComputeMode.Auto) { + calculateResult = calculateComputeMode(client, catalog, filter, parameter, requiredColumns); + } + + if (parameter.getComputeMode() == ComputeParameters.ComputeMode.KV) { + List rawSplits = getTableSplits(client, calculateResult.getTableName(), parameter); + for (Split rawSplit : rawSplits) { + TablestoreSplit split = new TablestoreSplit(TablestoreSplit.SplitType.KeyValue, filter, requiredColumns); + split.setKvSplit(rawSplit); + split.setKvTableMeta(calculateResult.getTableMeta()); + split.setTableName(tableName); + split.setSplitName(calculateResult.getTableName()); + if (split.checkIfMatchTheFilter(filter)) { + tableSplits.add(split); + } + } + } else if (parameter.getComputeMode() == ComputeParameters.ComputeMode.Search) { + // generate one split and later use parallel scan + if (parameter.getSearchIndexName() != null) { + DescribeSearchIndexRequest request = new DescribeSearchIndexRequest(); + request.setTableName(tableName); + request.setIndexName(parameter.getSearchIndexName()); + DescribeSearchIndexResponse response = client.describeSearchIndex(request); + IndexSchema schema = response.getSchema(); + List geoFieldList = new ArrayList(); + for (FieldSchema fieldSchema : schema.getFieldSchemas()) { + if (fieldSchema.getFieldType() == FieldType.GEO_POINT) { + geoFieldList.add(fieldSchema.getFieldName()); + } + } + + ComputeSplitsRequest computeSplitsRequest = new ComputeSplitsRequest(); + computeSplitsRequest.setTableName(tableName); + computeSplitsRequest.setSplitsOptions(new SearchIndexSplitsOptions(parameter.getSearchIndexName())); + ComputeSplitsResponse computeSplitsResponse = client.computeSplits(computeSplitsRequest); + byte[] sessionId = computeSplitsResponse.getSessionId(); + int splitsSize = computeSplitsResponse.getSplitsSize(); + if (parameter.getMaxSplitsCount() > 0 && parameter.getMaxSplitsCount() < splitsSize) { + splitsSize = parameter.getMaxSplitsCount(); + } + + for (int i = 0; i < splitsSize; i++) { + TablestoreSplit split = new TablestoreSplit(TablestoreSplit.SplitType.SearchIndex, filter, requiredColumns, sessionId, i, splitsSize, geoFieldList); + SearchInfo info = new SearchInfo(parameter.getSearchIndexName(), catalog.getSearchSchema().get(0)); + split.setSearchInfo(info); + split.setTableName(tableName); + split.setSplitName(parameter.getSearchIndexName()); + tableSplits.add(split); + } + } else { + TablestoreSplit split = new TablestoreSplit(TablestoreSplit.SplitType.SearchIndex, filter, requiredColumns); + SearchInfo info = new SearchInfo(catalog.getSearchNames().get(0), catalog.getSearchSchema().get(0)); + split.setSearchInfo(info); + split.setTableName(tableName); + split.setSplitName(catalog.getSearchNames().get(0)); + tableSplits.add(split); + } + } + return tableSplits; + } + + private String formatSplitsCacheKey(String instanceName, String tableName, ComputeParameters parameter) { + StringBuilder sb = new StringBuilder(); + sb.append(instanceName).append("_"); + sb.append(tableName).append("_"); + sb.append(parameter.getMaxSplitsCount()).append("_"); + sb.append(parameter.getSplitSizeInMBs()); + return sb.toString(); + } + + public List getTableSplits(SyncClient client, String tableName, ComputeParameters parameter) { + String key = formatSplitsCacheKey(client.getInstanceName(), tableName, parameter); + if (enableSplitCache.get() && splitsCache.containsKey(key)) { + LOG.info("Load splits from cache, key: {}", key); + return splitsCache.get(key).getSplits(); + } else { + ComputeSplitsBySizeRequest request = new ComputeSplitsBySizeRequest(); + request.setTableName(tableName); + request.setSplitPointLimit(parameter.getMaxSplitsCount()); + request.setSplitSizeInByte(parameter.getSplitSizeInMBs(), 1024 * 1024); + ComputeSplitsBySizeResponse response = client.computeSplitsBySize(request); + LOG.info("ComputeSplitsBySize, request param: [{}, {}], resp split size: {}", + parameter.getMaxSplitsCount(), parameter.getSplitSizeInMBs(), response.getSplits().size()); + if (enableSplitCache.get()) { + splitsCache.put(key, response); + } + return response.getSplits(); + } + } + + public LeftMatchResult calculateComputeMode(SyncClient client, TableCatalog catalog, Filter filter, ComputeParameters parameter, List requiredColumns) { + LeftMatchResult mainTableResult = calculateKvLeftMatchResult(filter, catalog.getTableMeta()); + LeftMatchResult bestTableResult = mainTableResult; + for (TableMeta meta : catalog.getIndexMetaList()) { + LeftMatchResult indexResult = calculateKvLeftMatchResult(filter, meta); + // todo make sure index have all the columns + if (indexResult.getCount() > bestTableResult.getCount()) { + bestTableResult = indexResult; + } + + if (bestTableResult.getCount() == meta.getPrimaryKeyList().size()) { + break; + } + } + + if (catalog.getSearchSchema().size() > 0 && bestTableResult.getCount() == 0 && isSearchIndexMatchTheFilter(catalog.getSearchSchema(), requiredColumns)) { + // todo : improve searchindex selection after searchindex support parallel scan + parameter.setComputeMode(ComputeParameters.ComputeMode.Search); + return new LeftMatchResult(catalog.getSearchNames().get(0), null); + } else { + parameter.setComputeMode(ComputeParameters.ComputeMode.KV); + return bestTableResult; + } + } + + private Boolean isSearchIndexMatchTheFilter(List indexSchemas, List requiredColumns) { + boolean indexMatched = true; + for (IndexSchema schema : indexSchemas) { + for (String requireColumn : requiredColumns) { + if (!isSearchIndexMatchTheFilter(requireColumn, schema)) { + indexMatched = false; + break; + } + } + } + return indexMatched; + } + + private boolean isSearchIndexMatchTheFilter(String columnName, IndexSchema schema) { + for (FieldSchema field : schema.getFieldSchemas()) { + if (field.getFieldName().equals(columnName) && field.isStore() && field.isIndex()) { + return true; + } + } + return false; + } + + private LeftMatchResult calculateKvLeftMatchResult(Filter filter, TableMeta meta) { + LeftMatchResult result; + if (filter.isNested()) { + List resultCollection = new ArrayList(); + for (Filter subFilter : filter.getSubFilters()) { + if (subFilter.isNested()) { + LeftMatchResult tempResult = calculateKvLeftMatchResult(subFilter, meta); + resultCollection.add(tempResult); + } else { + LeftMatchResult tempResult = buildMatchResult(subFilter, meta); + resultCollection.add(tempResult); + } + } + result = buildMatchResult(resultCollection, filter.getLogicOperator()); + } else { + return buildMatchResult(filter, meta); + } + + return result; + } + + private static LeftMatchResult buildMatchResult(Filter filter, TableMeta meta) { + int index = 0; + for (PrimaryKeySchema pk : meta.getPrimaryKeyList()) { + if (filter.getCompareOperator() == Filter.CompareOperator.EMPTY_FILTER) { + return new LeftMatchResult(meta.getTableName(), meta); + } + if (filter.getColumnName().equals(pk.getName()) && isTypeMatched(pk.getType(), filter.getColumnValue().getType())) { + List temp = new ArrayList(); + temp.add(pk.getName()); + boolean canAppend = false; + if (filter.getCompareOperator() == Filter.CompareOperator.EQUAL) { + canAppend = true; + } + LeftMatchResult tempResult = new LeftMatchResult(meta.getTableName(), temp, canAppend, index, meta); + return tempResult; + } + index++; + } + return new LeftMatchResult(meta.getTableName(), meta); + } + + private static boolean isTypeMatched(PrimaryKeyType pkType, ColumnType columnType) { + return (pkType == PrimaryKeyType.STRING && columnType == ColumnType.STRING + || pkType == PrimaryKeyType.INTEGER && columnType == ColumnType.INTEGER + || pkType == PrimaryKeyType.BINARY && columnType == ColumnType.BINARY); + } + + private LeftMatchResult seekMatchResult(List collection, int starPos) { + int maxLength = 0; + LeftMatchResult longestResult = null; + for (LeftMatchResult result : collection) { + if (result.getBeginPkIndex() == starPos) { + if (result.getCount() > maxLength) { + maxLength = result.getCount(); + longestResult = result; + } else if (result.getCount() == maxLength && result.getCount() > 0 && result.getCanAppendNewKey()) { + maxLength = result.getCount(); + longestResult = result; + } + } + } + return longestResult; + } + + /** + * for "and" operator we check each sub filter and join them + * for "or" operator we check each sub filter and choose the min LeftMatchResult + */ + private LeftMatchResult buildMatchResult(List collection, Filter.LogicOperator lo) { + //todo: we may support more LogicOperator + if (lo == Filter.LogicOperator.OR) { + LeftMatchResult current = collection.get(0); + for (LeftMatchResult result : collection) { + if (result.getCount() < current.getCount()) { + current = result; + } + } + return current; + } else if (lo == Filter.LogicOperator.AND) { + LeftMatchResult last = collection.get(0); + int starPos = 0; + LeftMatchResult current = seekMatchResult(collection, starPos); + while (current != null) { + if (starPos == 0) { + last = new LeftMatchResult(); + current.copyTo(last); + } else { + last.append(current.getLeftMatchKeyList()); + last.setCanAppendNewKey(current.getCanAppendNewKey()); + } + + starPos = starPos + current.getCount(); + if (current.getCanAppendNewKey()) { + current = seekMatchResult(collection, starPos); + } else { + break; + } + } + return last; + } + + return collection.get(0); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/ecosystem/Filter.java b/src/main/java/com/alicloud/openservices/tablestore/ecosystem/Filter.java new file mode 100644 index 0000000..9945c8a --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/ecosystem/Filter.java @@ -0,0 +1,214 @@ +package com.alicloud.openservices.tablestore.ecosystem; + +import com.alicloud.openservices.tablestore.model.ColumnValue; + +import java.util.List; + +public class Filter { + + /** + * Compare operator + */ + public enum CompareOperator { + /** + * Empty filter + */ + EMPTY_FILTER, + + /** + * Equal + */ + EQUAL, + + /** + * >= + */ + GREATER_EQUAL, + + /** + * > + */ + GREATER_THAN, + + /** + * <= + */ + LESS_EQUAL, + + /** + * < + */ + LESS_THAN, + + /** + * != + */ + NOT_EQUAL, + + /** + * A* + */ + START_WITH, + + IN, + + IS_NULL, + + // IS_NOT_NULL; + } + + /** + * LogicOperator + */ + public enum LogicOperator { + /** + * NOT + */ + NOT, + + /** + * AND + */ + AND, + + /** + * OR + */ + OR; + } + + private LogicOperator logicOperator; + private CompareOperator compareOperator; + private List filters; + private String columnName; + private ColumnValue columnValue; + private List columnValuesForInOperator; + + public boolean isNested() { + return filters != null && filters.size() > 0; + } + + public String getColumnName() { + return columnName; + } + + public ColumnValue getColumnValue() { + return columnValue; + } + + public List getSubFilters() { + return filters; + } + + public LogicOperator getLogicOperator() { + return logicOperator; + } + + public CompareOperator getCompareOperator() { + return compareOperator; + } + + public Filter(LogicOperator lo, List subFilters) { + this.logicOperator = lo; + this.filters = subFilters; + } + + //constructor for "IS_NULL" "IS_NOT_NULL" + public Filter(CompareOperator compareOperator, String columnName) { + this.compareOperator = compareOperator; + this.columnName = columnName; + } + + public Filter(CompareOperator co, String columnName, ColumnValue columnValue) { + this.compareOperator = co; + this.columnName = columnName; + this.columnValue = columnValue; + } + + //constructor for "IN" + public Filter(CompareOperator co, String columnName, List columnValuesForInOperator) { + this.compareOperator = co; + this.columnName = columnName; + this.columnValuesForInOperator = columnValuesForInOperator; + } + + public Filter(CompareOperator co) { + this.compareOperator = co; + } + + public static Filter emptyFilter() { + return new Filter(CompareOperator.EMPTY_FILTER); + } + + public void setLogicOperator(LogicOperator logicOperator) { + this.logicOperator = logicOperator; + } + + public void setCompareOperator(CompareOperator compareOperator) { + this.compareOperator = compareOperator; + } + + public void setFilters(List filters) { + this.filters = filters; + } + + public void setColumnName(String columnName) { + this.columnName = columnName; + } + + public void setColumnValue(ColumnValue columnValue) { + this.columnValue = columnValue; + } + + public List getFilters() { + return filters; + } + + public List getColumnValuesForInOperator() { + return columnValuesForInOperator; + } + + public void setColumnValuesForInOperator(List columnValuesForInOperator) { + this.columnValuesForInOperator = columnValuesForInOperator; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + + Filter filter = (Filter) o; + + if (logicOperator != filter.logicOperator) { + return false; + } + if (compareOperator != filter.compareOperator) { + return false; + } + if (filters != null ? !filters.equals(filter.filters) : filter.filters != null) { + return false; + } + if (columnName != null ? !columnName.equals(filter.columnName) : filter.columnName != null) { + return false; + } + if (columnValue != null ? !columnValue.equals(filter.columnValue) : filter.columnValue != null) { + return false; + } + return columnValuesForInOperator != null ? columnValuesForInOperator.equals(filter.columnValuesForInOperator) : filter.columnValuesForInOperator == null; + } + + @Override + public int hashCode() { + int result = logicOperator != null ? logicOperator.hashCode() : 0; + result = 31 * result + (compareOperator != null ? compareOperator.hashCode() : 0); + result = 31 * result + (filters != null ? filters.hashCode() : 0); + result = 31 * result + (columnName != null ? columnName.hashCode() : 0); + result = 31 * result + (columnValue != null ? columnValue.hashCode() : 0); + result = 31 * result + (columnValuesForInOperator != null ? columnValuesForInOperator.hashCode() : 0); + return result; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/ecosystem/FilterPushdownConfig.java b/src/main/java/com/alicloud/openservices/tablestore/ecosystem/FilterPushdownConfig.java new file mode 100644 index 0000000..d606e19 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/ecosystem/FilterPushdownConfig.java @@ -0,0 +1,21 @@ +package com.alicloud.openservices.tablestore.ecosystem; + +import java.io.*; + +public class FilterPushdownConfig implements Serializable { + + public boolean pushRangeLong; + public boolean pushRangeString; + + public FilterPushdownConfig() { + pushRangeLong = true; + pushRangeString = true; + } + + public FilterPushdownConfig(boolean pushRangeLong, boolean pushRangeString) { + this.pushRangeLong = pushRangeLong; + this.pushRangeString = pushRangeString; + } + + +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/ecosystem/GeoQueryHelper.java b/src/main/java/com/alicloud/openservices/tablestore/ecosystem/GeoQueryHelper.java new file mode 100644 index 0000000..10f5f88 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/ecosystem/GeoQueryHelper.java @@ -0,0 +1,120 @@ +package com.alicloud.openservices.tablestore.ecosystem; + +import com.google.gson.Gson; + +import java.util.List; + +// Merge the contents of GeoDistanceQuery, GeoBoundingBoxQuery and GeoPolygonQuery +public class GeoQueryHelper { + private static final Gson GSON = new Gson(); + /** + * 字段名 + */ + private String fieldName; + + // GeoDistanceQuery + /** + * 中心点 + */ + private String centerPoint; + /** + * 与中心点的距离(单位:米) + */ + private double distanceInMeter; + + // GeoBoundingBoxQuery + /** + * 矩形的左上角的经纬度 + *

示例:"46.24123424, 23.2342424"

+ */ + private String topLeft; + /** + * 矩形的右下角经纬度 + *

示例:"46.24123424, 23.2342424"

+ */ + private String bottomRight; + + // GeoPolygonQuery + /** + * 经纬度字符串的List + */ + private List points; + + private GeoType geoType; + + public static GeoQueryHelper buildGeoQueryHelper(Filter filter) { + if (filter.getCompareOperator() != Filter.CompareOperator.EQUAL) { + throw new IllegalArgumentException("geo column only support = json string,example: geoColumn = {centerPoint:6,9, distanceInMeter: 10000}"); + } + String json = filter.getColumnValue().toString(); + GeoQueryHelper geoQuery = GSON.fromJson(json, GeoQueryHelper.class); + if (geoQuery.getCenterPoint() != null && geoQuery.getDistanceInMeter() >= 0) { + geoQuery.setGeoType(GeoType.DISTANCE); + } else if (geoQuery.getTopLeft() != null && geoQuery.getBottomRight() != null) { + geoQuery.setGeoType(GeoType.BOUNDING_BOX); + } else if (geoQuery.getPoints() != null && !geoQuery.getPoints().isEmpty()) { + geoQuery.setGeoType(GeoType.POLYGON); + } else { + throw new IllegalArgumentException("geo query must be distance, boundingbox or polygon format"); + } + return geoQuery; + } + + public GeoType getGeoType() { + return geoType; + } + + public void setGeoType(GeoType geoType) { + this.geoType = geoType; + } + + public String getFieldName() { + return fieldName; + } + + public void setFieldName(String fieldName) { + this.fieldName = fieldName; + } + + public String getCenterPoint() { + return centerPoint; + } + + public void setCenterPoint(String centerPoint) { + this.centerPoint = centerPoint; + } + + public double getDistanceInMeter() { + return distanceInMeter; + } + + public void setDistanceInMeter(double distanceInMeter) { + this.distanceInMeter = distanceInMeter; + } + + public String getTopLeft() { + return topLeft; + } + + public void setTopLeft(String topLeft) { + this.topLeft = topLeft; + } + + public String getBottomRight() { + return bottomRight; + } + + public void setBottomRight(String bottomRight) { + this.bottomRight = bottomRight; + } + + public List getPoints() { + return points; + } + + public void setPoints(List points) { + this.points = points; + } + + +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/ecosystem/GeoType.java b/src/main/java/com/alicloud/openservices/tablestore/ecosystem/GeoType.java new file mode 100644 index 0000000..39ed26b --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/ecosystem/GeoType.java @@ -0,0 +1,16 @@ +package com.alicloud.openservices.tablestore.ecosystem; + +public enum GeoType { + /** + * 中心点,半径类型 + */ + DISTANCE, + /** + * 矩形类型 + */ + BOUNDING_BOX, + /** + * 多边形类型 + */ + POLYGON +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/ecosystem/ICatalog.java b/src/main/java/com/alicloud/openservices/tablestore/ecosystem/ICatalog.java new file mode 100644 index 0000000..42b300e --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/ecosystem/ICatalog.java @@ -0,0 +1,4 @@ +package com.alicloud.openservices.tablestore.ecosystem; + +public interface ICatalog { +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/ecosystem/ICatalogManager.java b/src/main/java/com/alicloud/openservices/tablestore/ecosystem/ICatalogManager.java new file mode 100644 index 0000000..4e20c3a --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/ecosystem/ICatalogManager.java @@ -0,0 +1,10 @@ +package com.alicloud.openservices.tablestore.ecosystem; + +public interface ICatalogManager { + /** + * @param tableName + * should be thread safe + * @return the table catalog with index meta info + */ + TableCatalog getTableCatalog(String tableName); +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/ecosystem/ITablestoreSplit.java b/src/main/java/com/alicloud/openservices/tablestore/ecosystem/ITablestoreSplit.java new file mode 100644 index 0000000..9babb8e --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/ecosystem/ITablestoreSplit.java @@ -0,0 +1,23 @@ +package com.alicloud.openservices.tablestore.ecosystem; + +import com.alicloud.openservices.tablestore.SyncClient; +import com.alicloud.openservices.tablestore.SyncClientInterface; +import com.alicloud.openservices.tablestore.model.Row; + +import java.util.Iterator; + +public interface ITablestoreSplit { + + /** + * @param client + */ + void initial(SyncClient client); + + /** + * @param client + * @return + */ + Iterator getRowIterator(SyncClientInterface client); + + Iterator getRowIterator(SyncClientInterface client, FilterPushdownConfig filterPushdownConfig); +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/ecosystem/ITablestoreSplitManager.java b/src/main/java/com/alicloud/openservices/tablestore/ecosystem/ITablestoreSplitManager.java new file mode 100644 index 0000000..548d102 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/ecosystem/ITablestoreSplitManager.java @@ -0,0 +1,25 @@ +package com.alicloud.openservices.tablestore.ecosystem; + +import com.alicloud.openservices.tablestore.SyncClient; + +import java.util.List; + +/** + * interface for TablstoreSplitManager + */ +public interface ITablestoreSplitManager { + /** + * @param client + * @param filter + * @param tableName + * @param parameter + * @param requiredColumns + * @return + */ + List generateTablestoreSplits( + SyncClient client, + Filter filter, + String tableName, + ComputeParameters parameter, + List requiredColumns); +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/ecosystem/LeftMatchResult.java b/src/main/java/com/alicloud/openservices/tablestore/ecosystem/LeftMatchResult.java new file mode 100644 index 0000000..ad09f11 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/ecosystem/LeftMatchResult.java @@ -0,0 +1,83 @@ +package com.alicloud.openservices.tablestore.ecosystem; + +import com.alicloud.openservices.tablestore.model.TableMeta; + +import java.util.ArrayList; +import java.util.List; + +/** + * LeftMatchResult for global index selection + */ +public class LeftMatchResult{ + private List leftMatchKeyList; + + public void setCanAppendNewKey(boolean canAppendNewKey) { + this.canAppendNewKey = canAppendNewKey; + } + + private boolean canAppendNewKey; + private int beginPkIndex; + private String tableName; + private TableMeta meta; + private boolean matchedAll; + + public List getLeftMatchKeyList() { + return leftMatchKeyList; + } + + public int getCount() { + return leftMatchKeyList.size(); + } + + public boolean canMatchedAll() { + return getCount() == meta.getPrimaryKeyList().size(); + } + + public void append(List keyList){ + leftMatchKeyList.addAll(keyList); + } + + public String getTableName() { + return tableName; + } + + public boolean getCanAppendNewKey() { + return canAppendNewKey; + } + + public TableMeta getTableMeta() { + return this.meta; + } + + public int getBeginPkIndex() { + return this.beginPkIndex; + } + + public LeftMatchResult(String tableName, List keyList, boolean canAppend, int beginIndex, TableMeta meta) { + this.tableName = tableName; + this.leftMatchKeyList = keyList; + this.canAppendNewKey = canAppend; + this.beginPkIndex = beginIndex; + this.meta = meta; + } + + public LeftMatchResult(String indexName, TableMeta meta) { + this.canAppendNewKey = true; + this.beginPkIndex = 0; + this.tableName = indexName; + this.meta = meta; + this.leftMatchKeyList = new ArrayList(); + } + public LeftMatchResult() { + this.leftMatchKeyList = new ArrayList(); + this.canAppendNewKey = false; + } + + public void copyTo(LeftMatchResult target) { + target.leftMatchKeyList.addAll(this.leftMatchKeyList); + target.tableName = this.tableName; + target.canAppendNewKey = this.canAppendNewKey; + target.beginPkIndex = this.beginPkIndex; + target.meta = this.meta; + } +} \ No newline at end of file diff --git a/src/main/java/com/alicloud/openservices/tablestore/ecosystem/SearchIndexFieldSchema.java b/src/main/java/com/alicloud/openservices/tablestore/ecosystem/SearchIndexFieldSchema.java new file mode 100644 index 0000000..8c5f182 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/ecosystem/SearchIndexFieldSchema.java @@ -0,0 +1,7 @@ +package com.alicloud.openservices.tablestore.ecosystem; + +import java.io.Serializable; + +public class SearchIndexFieldSchema implements Serializable { + +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/ecosystem/SearchIndexSchema.java b/src/main/java/com/alicloud/openservices/tablestore/ecosystem/SearchIndexSchema.java new file mode 100644 index 0000000..8d86ac6 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/ecosystem/SearchIndexSchema.java @@ -0,0 +1,13 @@ +package com.alicloud.openservices.tablestore.ecosystem; + +import java.io.Serializable; +import java.util.List; + +public class SearchIndexSchema implements Serializable { + + private List schema; + + public SearchIndexSchema(List schema) { + this.schema = schema; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/ecosystem/SearchInfo.java b/src/main/java/com/alicloud/openservices/tablestore/ecosystem/SearchInfo.java new file mode 100644 index 0000000..ff8c64c --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/ecosystem/SearchInfo.java @@ -0,0 +1,22 @@ +package com.alicloud.openservices.tablestore.ecosystem; + +import com.alicloud.openservices.tablestore.model.search.IndexSchema; + +public class SearchInfo +{ + public String getSearchIndexName() { + return searchIndexName; + } + + public IndexSchema getSearchSchema() { + return searchSchema; + } + + private String searchIndexName; + private IndexSchema searchSchema; + + public SearchInfo(String name, IndexSchema schema) { + this.searchIndexName = name; + this.searchSchema = schema; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/ecosystem/TableCatalog.java b/src/main/java/com/alicloud/openservices/tablestore/ecosystem/TableCatalog.java new file mode 100644 index 0000000..e6002df --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/ecosystem/TableCatalog.java @@ -0,0 +1,101 @@ +package com.alicloud.openservices.tablestore.ecosystem; + +import com.alicloud.openservices.tablestore.SyncClient; +import com.alicloud.openservices.tablestore.TableStoreException; +import com.alicloud.openservices.tablestore.model.*; +import com.alicloud.openservices.tablestore.model.search.*; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.ArrayList; +import java.util.List; + +public class TableCatalog implements ICatalog { + private static final Logger LOG = LoggerFactory.getLogger(TableCatalog.class); + + /** + * table type for catalog + */ + public enum TableType { + /** + * normal kv table + */ + Normal, + + /** + * search index + */ + SearchIndex + } + + private String name; + private TableMeta tableMeta; + private List indexMetaList = new ArrayList(); + private List searchSchema = new ArrayList(); + + private List searchNames = new ArrayList(); + + public TableCatalog(String tableName) { + name = tableName; + } + + public String getName() { + return name; + } + + public TableMeta getTableMeta() { + return this.tableMeta; + } + + public List getIndexMetaList() { + return this.indexMetaList; + } + + public List getSearchSchema() { + return this.searchSchema; + } + + public List getSearchNames() { + return this.searchNames; + } + + public void buildCatalog(SyncClient client) { + buildTableAndIndexMeta(client); + try { + buildSearchIndexMeta(client); + } catch (TableStoreException ex) { + LOG.error("hit Tablestore exception during fetch search meta : {}", ex.toString()); + // swallow search ex due to searchindex may not support in some region + } + } + + private void buildTableAndIndexMeta(SyncClient client) { + DescribeTableRequest describeTableRequest = new DescribeTableRequest( + name); + DescribeTableResponse result = client.describeTable(describeTableRequest); + this.tableMeta = result.getTableMeta(); + + // todo add convert indexmeta to tablemeta func to reduce describe table + for (IndexMeta meta : result.getIndexMeta()) { + DescribeTableRequest describeTableRequest2 = new DescribeTableRequest( + meta.getIndexName()); + DescribeTableResponse result2 = client.describeTable(describeTableRequest2); + this.indexMetaList.add(result2.getTableMeta()); + } + } + + private void buildSearchIndexMeta(SyncClient client) { + ListSearchIndexRequest request = new ListSearchIndexRequest(); + request.setTableName(name); + List indexInfos = client.listSearchIndex(request).getIndexInfos(); + + for (SearchIndexInfo indexInfo : indexInfos) { + DescribeSearchIndexRequest request2 = new DescribeSearchIndexRequest(); + request2.setTableName(indexInfo.getTableName()); + request2.setIndexName(indexInfo.getIndexName()); + DescribeSearchIndexResponse response = client.describeSearchIndex(request2); + searchSchema.add(response.getSchema()); + searchNames.add(indexInfo.getIndexName()); + } + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/ecosystem/TablestoreSplit.java b/src/main/java/com/alicloud/openservices/tablestore/ecosystem/TablestoreSplit.java new file mode 100644 index 0000000..ca62a78 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/ecosystem/TablestoreSplit.java @@ -0,0 +1,1182 @@ +package com.alicloud.openservices.tablestore.ecosystem; + +import com.alicloud.openservices.tablestore.SyncClient; +import com.alicloud.openservices.tablestore.SyncClientInterface; +import com.alicloud.openservices.tablestore.model.*; +import com.alicloud.openservices.tablestore.model.iterator.RowIterator; +import com.alicloud.openservices.tablestore.model.search.*; +import com.alicloud.openservices.tablestore.model.search.query.*; +import com.google.gson.Gson; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.util.*; + +public class TablestoreSplit implements ITablestoreSplit { + private static final Logger LOGGER = LoggerFactory.getLogger(TablestoreSplit.class); + + private int maxFirstColumnRangeSupport = 20; + private int maxFirstColumnEqualSupport = 10; + private static ICatalogManager manager; + private static Gson gson = new Gson(); + + public TablestoreSplit(SplitType type, Filter filter, List requiredColumns) { + this.type = type; + this.filter = filter; + this.requiredColumns = requiredColumns; + } + + public TablestoreSplit(SplitType type, Filter filter, List requiredColumns, byte[] sessionId, int splitId) { + this.type = type; + this.filter = filter; + this.requiredColumns = requiredColumns; + this.sessionId = sessionId; + this.splitId = splitId; + } + + public TablestoreSplit(SplitType type, Filter filter, List requiredColumns, byte[] sessionId, int splitId, int maxParallel, List geoColumnNames) { + this.type = type; + this.filter = filter; + this.requiredColumns = requiredColumns; + this.sessionId = sessionId; + this.splitId = splitId; + this.maxParallel = maxParallel; + this.geoColumnNames = geoColumnNames; + } + + public enum SplitType { + /** + * split for kv + */ + KeyValue, + + /** + * split for search + */ + SearchIndex + } + + private TableMeta meta; + private SearchInfo searchInfo; + + private String splitName; + private String tableName; + private SplitType type; + private Split kvSplit; + private Filter filter; + + // For SearchIndex parallel scan + private byte[] sessionId; + private int maxParallel; + private int splitId; + + public static List geoColumnNames; + + private List requiredColumns; + + public static boolean containGeo = false; + public static boolean containOr = false; + private static boolean pushAll = false; + + public void setSplitName(String name) { + this.splitName = name; + } + + public List getRequiredColumns() { + return this.requiredColumns; + } + + public void setTableName(String tableName) { + this.tableName = tableName; + } + + public void setKvSplit(Split split) { + kvSplit = split; + } + + public void setSearchInfo(SearchInfo info) { + this.searchInfo = info; + } + + public void setKvTableMeta(TableMeta meta) { + this.meta = meta; + } + + @Override + public Iterator getRowIterator(SyncClientInterface client) { + if (type == SplitType.KeyValue) { + return generateTableIterator(client); + } else { + FilterPushdownConfig filterPushdownConfig = new FilterPushdownConfig(); + return generateSearchIndexIterator(client, filterPushdownConfig); + } + } + + @Override + public Iterator getRowIterator(SyncClientInterface client, FilterPushdownConfig filterPushdownConfig) { + if (type == SplitType.KeyValue) { + return generateTableIterator(client); + } else { + return generateSearchIndexIterator(client, filterPushdownConfig); + } + } + + private Iterator generateTableIterator(SyncClientInterface client) { + List pkRanges = generatePkRange(filter, kvSplit.getLowerBound(), kvSplit.getUpperBound()); + LOGGER.info("kvSplit lower bound: {}, upper bound: {}, pkRanges: {}", + kvSplit.getLowerBound(), kvSplit.getUpperBound(), gson.toJson(pkRanges)); + if (checkIsBatchRead(pkRanges)) { + LOGGER.debug("Batch get row"); + BatchGetRowRequest request = buildBatchGet(pkRanges); + BatchGetRowResponse response = client.batchGetRow(request); + // to do check result + if (response.getFailedRows().isEmpty()) { + List rowCollction = new ArrayList(); + for (BatchGetRowResponse.RowResult result : response.getSucceedRows()) { + if (result.getRow() != null) { + rowCollction.add(result.getRow()); + } + } + return rowCollction.iterator(); + } + } else { + // todo : we can add several sub range if it's faster than the whole split + if (pkRanges.size() == 1) { + LOGGER.debug("Generate sub range to scan"); + PkRange range = pkRanges.get(0); + return generateIterator(client, range.begin, range.end); + } else if (pkRanges.size() > 1) { + return new TablestoreSplitIterator(client, pkRanges, this.meta.getTableName(), requiredColumns); + } + } + LOGGER.debug("Scan the whole split"); + return generateIterator(client, kvSplit.getLowerBound(), kvSplit.getUpperBound()); + } + + private boolean checkIsBatchRead(List pkRanges) { + if (pkRanges.size() >= 1 && pkRanges.size() <= 100) { + for (PkRange range : pkRanges) { + if (range.equal == null) { + return false; + } + } + return true; + } + return false; + } + + private BatchGetRowRequest buildBatchGet(List pkRanges) { + BatchGetRowRequest request = new BatchGetRowRequest(); + MultiRowQueryCriteria criteria1 = new MultiRowQueryCriteria(tableName); + criteria1.setMaxVersions(1); + for (PkRange range : pkRanges) { + criteria1.addRow(range.equal); + request.addMultiRowQueryCriteria(criteria1); + } + return request; + } + + + private List removePrimaryKey(List columnNames) { + if (!tableName.isEmpty()) { + this.meta = manager.getTableCatalog(tableName).getTableMeta(); + Map primaryKeyTypeMap = meta.getPrimaryKeyMap(); + List retColumns = new ArrayList(); + for (String columnName : columnNames) { + if (!primaryKeyTypeMap.containsKey(columnName)) { + retColumns.add(columnName); + } + } + return retColumns; + } else { + return columnNames; + } + } + + private Iterator generateSearchIndexIterator(SyncClientInterface client, FilterPushdownConfig filterPushdownConfig) { +// QueryBuilder query = buildSearchQueryFromFilter(filter); + Filter flatFilter = buildFlatTreeFilter(filter); + Query query = buildMergedSearchQueryFromFilter(flatFilter, filterPushdownConfig); + ParallelScanRequest parallelScanRequestByBuilder = ParallelScanRequest.newBuilder() + .tableName(tableName) + .indexName(searchInfo.getSearchIndexName()) + .scanQuery(ScanQuery.newBuilder() + .query(query) + .limit(2000) + .currentParallelId(splitId) + .maxParallel(maxParallel) + .build()) + .addColumnsToGet(removePrimaryKey(requiredColumns)) + .sessionId(sessionId) + .build(); + RowIterator iterator = client.createParallelScanIterator(parallelScanRequestByBuilder); + return iterator; + } + + private Iterator generateIterator(SyncClientInterface client, PrimaryKey begin, PrimaryKey end) { + RangeIteratorParameter rangeIteratorParameter = new RangeIteratorParameter(this.meta.getTableName()); + rangeIteratorParameter.setInclusiveStartPrimaryKey(begin); + rangeIteratorParameter.setExclusiveEndPrimaryKey(end); + rangeIteratorParameter.setMaxVersions(1); + if (requiredColumns != null && !requiredColumns.isEmpty()) { + for (String col : requiredColumns) { + rangeIteratorParameter.addColumnsToGet(col); + } + } else { + String defaultString = begin.getPrimaryKeyColumn(0).getName(); + rangeIteratorParameter.addColumnsToGet(defaultString); + } + Iterator iterator = client.createRangeIterator(rangeIteratorParameter); + return iterator; + } + + public static class Range { + public void setRightOpen(boolean rightOpen) { + isRightOpen = rightOpen; + } + + public boolean isRightOpen() { + return isRightOpen; + } + + boolean isRightOpen = false; + + public Range(Range range) { + if (range.equal != null) { + this.equal = range.equal; + } else { + this.begin = range.begin; + this.end = range.end; + } + if (range.next != null) { + this.next = range.next; + } + + this.isRightOpen = range.isRightOpen; + } + + public Range(PrimaryKeyColumn begin, PrimaryKeyColumn end) { + this.begin = begin; + this.end = end; + } + + public Range(PrimaryKeyColumn begin, PrimaryKeyColumn end, boolean isRightOpen) { + this.begin = begin; + this.end = end; + this.isRightOpen = isRightOpen; + } + + public Range(PrimaryKeyColumn equal) { + this.equal = equal; + } + + public PrimaryKeyColumn getBegin() { + return begin; + } + + public PrimaryKeyColumn getEnd() { + return end; + } + + public PrimaryKeyColumn getEqual() { + return equal; + } + + public Range getNext() { + return next; + } + + public void setBegin(PrimaryKeyColumn begin) { + this.begin = begin; + } + + public void setEnd(PrimaryKeyColumn end) { + this.end = end; + } + + public void setEqual(PrimaryKeyColumn equal) { + this.equal = equal; + } + + public void setNext(Range next) { + this.next = next; + } + + private PrimaryKeyColumn begin; + private PrimaryKeyColumn end; + + private PrimaryKeyColumn equal; + private Range next; + + public boolean isSingleValue() { + return this.equal != null; + } + } + + public static class PkRange { + public PrimaryKey getBegin() { + return begin; + } + + public PrimaryKey getEnd() { + return end; + } + + public PrimaryKey getEqual() { + return equal; + } + + private PrimaryKey begin; + private PrimaryKey end; + + private PrimaryKey equal; + + public PkRange(PrimaryKey begin, PrimaryKey end) { + this.begin = begin; + this.end = end; + } + + public PkRange(PrimaryKey equal) { + this.equal = equal; + } + + public boolean isSingleValue() { + return equal != null; + } + } + + private List generateColumnRange(Filter filter, PrimaryKey begin, PrimaryKey end, int starPos) { + String name = this.meta.getPrimaryKeyList().get(starPos).getName(); + + if (filter.isNested()) { + if (filter.getLogicOperator() == Filter.LogicOperator.AND || filter.getLogicOperator() == Filter.LogicOperator.OR) { + List mergedResult = new ArrayList(); + for (Filter subFilter : filter.getSubFilters()) { + List result = generateColumnRange(subFilter, begin, end, starPos); + if (mergedResult.isEmpty() && result != null && !result.isEmpty()) { + mergedResult = result; + continue; + } + + if (filter.getLogicOperator() == Filter.LogicOperator.AND) { + if (result != null && !result.isEmpty()) { + mergedResult = mergeSubRange(mergedResult, result, begin, end); + } + if (result == null) { + return new ArrayList(); + } + } else { + if (result != null && !result.isEmpty()) { + mergedResult = mergeTotalRange(mergedResult, result, begin, end); + } + } + } + return mergedResult; + } else { + PrimaryKeyColumn col1 = new PrimaryKeyColumn(name, begin.getPrimaryKeyColumn(starPos).getValue()); + PrimaryKeyColumn col2 = new PrimaryKeyColumn(name, end.getPrimaryKeyColumn(starPos).getValue()); + + Range range = new Range(col1, col2); + return Arrays.asList(range); + } + } else { + List result = new ArrayList(); + if (filter != null && filter.getColumnName() != null && filter.getColumnName().equals(name)) { + PrimaryKeyValue pkv = PrimaryKeyValue.fromColumn(filter.getColumnValue()); + if (filter.getCompareOperator() == Filter.CompareOperator.EQUAL) { + PrimaryKeyColumn pkc = new PrimaryKeyColumn(name, PrimaryKeyValue.fromColumn(filter.getColumnValue())); + Range range = new Range(pkc); + result.add(range); + } else if (filter.getCompareOperator() == Filter.CompareOperator.LESS_THAN || + filter.getCompareOperator() == Filter.CompareOperator.LESS_EQUAL) { + boolean isRightOpen = filter.getCompareOperator() == Filter.CompareOperator.LESS_THAN; + if (starPos == 0) { + if (pkv.compareTo(end.getPrimaryKeyColumn(starPos).getValue()) >= 0) { + PrimaryKeyColumn pkc1 = new PrimaryKeyColumn(name, begin.getPrimaryKeyColumn(starPos).getValue()); + PrimaryKeyColumn pkc2 = new PrimaryKeyColumn(name, end.getPrimaryKeyColumn(starPos).getValue()); + Range range = new Range(pkc1, pkc2, isRightOpen); + result.add(range); + } else if (pkv.compareTo(begin.getPrimaryKeyColumn(starPos).getValue()) >= 0) { + PrimaryKeyColumn pkc1 = new PrimaryKeyColumn(name, begin.getPrimaryKeyColumn(starPos).getValue()); + PrimaryKeyColumn pkc2 = new PrimaryKeyColumn(name, pkv); + Range range = new Range(pkc1, pkc2, isRightOpen); + result.add(range); + } else { + // + LOGGER.info("find empty split", begin.toString(), end.toString()); + } + } else { + PrimaryKeyColumn pkc1 = new PrimaryKeyColumn(name, PrimaryKeyValue.INF_MIN); + PrimaryKeyColumn pkc2 = new PrimaryKeyColumn(name, pkv); + Range range = new Range(pkc1, pkc2, isRightOpen); + result.add(range); + } + } else if (filter.getCompareOperator() == Filter.CompareOperator.GREATER_EQUAL || + filter.getCompareOperator() == Filter.CompareOperator.GREATER_THAN) { + if (starPos == 0) { + if (pkv.compareTo(begin.getPrimaryKeyColumn(starPos).getValue()) < 0) { + PrimaryKeyColumn pkc1 = new PrimaryKeyColumn(name, begin.getPrimaryKeyColumn(starPos).getValue()); + PrimaryKeyColumn pkc2 = new PrimaryKeyColumn(name, end.getPrimaryKeyColumn(starPos).getValue()); + Range range = new Range(pkc1, pkc2); + result.add(range); + } else if (pkv.compareTo(end.getPrimaryKeyColumn(starPos).getValue()) <= 0) { + PrimaryKeyColumn pkc1 = new PrimaryKeyColumn(name, pkv); + PrimaryKeyColumn pkc2 = new PrimaryKeyColumn(name, end.getPrimaryKeyColumn(starPos).getValue()); + Range range = new Range(pkc1, pkc2); + result.add(range); + } + } else { + PrimaryKeyColumn pkc1 = new PrimaryKeyColumn(name, pkv); + PrimaryKeyColumn pkc2 = new PrimaryKeyColumn(name, PrimaryKeyValue.INF_MAX); + Range range = new Range(pkc1, pkc2); + result.add(range); + } + } + } + return result; + } + } + + public List generatePkRange(Filter filter, PrimaryKey begin, PrimaryKey end) { + List pkList = new ArrayList(); + List first = generateColumnRange(filter, begin, end, 0); + LOGGER.info("First generate column ranges: {}", gson.toJson(first)); + boolean isRange = false; + if (first.size() > maxFirstColumnEqualSupport && first.size() <= maxFirstColumnRangeSupport) { + isRange = true; + } else if (first.size() > maxFirstColumnRangeSupport) { + PkRange pkRange = new PkRange(begin, end); + pkList.add(pkRange); + return pkList; + } else { + isRange = checkHasRange(first); + } + if (isRange) { + return buildPkRangeFromRange(first, begin, end); + } else { + if (this.meta.getPrimaryKeyList().size() == 1) { + return buildPkRangeFromRange(first, begin, end); + } + for (int i = 1; i < this.meta.getPrimaryKeyList().size(); i++) { + List subRange = generateColumnRange(filter, begin, end, i); + if (checkHasRange(subRange) || i == this.meta.getPrimaryKeyList().size() - 1 || subRange.isEmpty()) { + first = appendRange(first, subRange); + return buildPkRangeFromRange(first, begin, end); + } else { + first = appendRange(first, subRange); + } + } + } + return pkList; + } + + private List appendRange(List rangeList1, List rangeList2) { + List rangeList = new ArrayList(); + for (Range front : rangeList1) { + if (rangeList2.isEmpty()) { + Range temp = new Range(front); + rangeList.add(temp); + } else { + for (Range back : rangeList2) { + Range temp = new Range(front); + Range temp2 = temp; + while (temp2.next != null) { + temp2 = temp2.next; + } + temp2.next = back; + rangeList.add(temp); + } + } + } + + return rangeList; + } + + private List buildPkRangeFromRange(List rangeList, PrimaryKey begin, PrimaryKey end) { + List pkList = new ArrayList(); + int pkCount = this.meta.getPrimaryKeyList().size(); + for (Range range : rangeList) { + LOGGER.info("build rangeBegin: {}, rangeEnd: {}, rangeEqual: {}, PrimaryKeyEnd:{}", + range.begin, range.end, range.equal, end); + PrimaryKeyBuilder pkb = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + PrimaryKeyBuilder pkb2 = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + PrimaryKey equalPk = null; + boolean isAllEqual = false; + boolean isRange = false; + if (range.equal != null) { + pkb.addPrimaryKeyColumn(range.equal.getName(), range.equal.getValue()); + if (pkCount > 1) { + pkb2.addPrimaryKeyColumn(range.equal.getName(), range.equal.getValue()); + } else { + equalPk = pkb.build(); + isAllEqual = true; + } + } else { + isRange = true; + pkb.addPrimaryKeyColumn(range.begin.getName(), range.begin.getValue()); + pkb2.addPrimaryKeyColumn(range.end.getName(), range.end.getValue()); + if (pkCount == 1 && !range.isRightOpen()) { + equalPk = pkb2.build(); + } + } + + int index = 0; + Range currentColumn = range.next; + int equalCursor = 0; + for (PrimaryKeySchema pkSchema : this.meta.getPrimaryKeyList()) { + if (index > 0) { + if (isRange || currentColumn == null) { + pkb.addPrimaryKeyColumn(pkSchema.getName(), PrimaryKeyValue.INF_MIN); + if (range.getEqual() != null && !range.getEqual().getValue().equals(end.getPrimaryKeyColumn(equalCursor).getValue())) { + pkb2.addPrimaryKeyColumn(pkSchema.getName(), PrimaryKeyValue.INF_MAX); + } else if (range.getEqual() != null && range.getEqual().getValue().equals(end.getPrimaryKeyColumn(equalCursor).getValue())) { + pkb2.addPrimaryKeyColumn(pkSchema.getName(), PrimaryKeyValue.INF_MIN); + } else if (range.getEnd().getValue().equals(end.getPrimaryKeyColumn(equalCursor).getValue())) { + pkb2.addPrimaryKeyColumn(pkSchema.getName(), PrimaryKeyValue.INF_MIN); + } else { + if (range.isRightOpen) { + pkb2.addPrimaryKeyColumn(pkSchema.getName(), PrimaryKeyValue.INF_MIN); + } else { + pkb2.addPrimaryKeyColumn(pkSchema.getName(), PrimaryKeyValue.INF_MAX); + } + } + + isRange = true; + } else { + if (currentColumn.equal != null) { + pkb.addPrimaryKeyColumn(pkSchema.getName(), currentColumn.equal.getValue()); + if (index < pkCount - 1) { + pkb2.addPrimaryKeyColumn(pkSchema.getName(), currentColumn.equal.getValue()); + } else { + equalPk = pkb.build(); + isAllEqual = true; + } + } else { + pkb.addPrimaryKeyColumn(pkSchema.getName(), currentColumn.begin.getValue()); + pkb2.addPrimaryKeyColumn(pkSchema.getName(), currentColumn.end.getValue()); + isRange = true; + + if (index == pkCount - 1) { + PrimaryKey temp = pkb2.build(); + if (temp.compareTo(end) < 0 && currentColumn.end.getValue() != PrimaryKeyValue.INF_MAX && currentColumn.end.getValue() != PrimaryKeyValue.INF_MIN) { + if (!currentColumn.isRightOpen()) { + equalPk = pkb2.build(); + } + } + } + } + range = currentColumn; + currentColumn = currentColumn.next; + equalCursor++; + } + } + index++; + } + PkRange pkRange; + PrimaryKey beginPk = pkb.build(); + if (isRange) { + PrimaryKey endPk = pkb2.build(); + pkRange = new PkRange(beginPk, endPk); + } else { + pkRange = new PkRange(beginPk); + } + if (!isAllEqual) { + pkList.add(pkRange); + } + + if (equalPk != null) { + PkRange pkRange2 = new PkRange(equalPk); + pkList.add(pkRange2); + } + + } + // filter invalid PKRange. + return filterPkRanges(pkList, begin, end); + } + + public List filterPkRanges(List pkList, PrimaryKey begin, PrimaryKey end) { + List retRanges = new ArrayList(); + for (PkRange pkRange : pkList) { + if (pkRange.isSingleValue()) { + if (pkRange.getEqual().compareTo(begin) >= 0 && pkRange.getEqual().compareTo(end) < 0) { + retRanges.add(pkRange); + } else { + LOGGER.info("Filter invalid pkrange: {}, begin: {}, end: {}", + gson.toJson(pkRange), begin.jsonize(), end.jsonize()); + } + } else { + if (pkRange.getBegin().compareTo(pkRange.getEnd()) < 0 && + pkRange.getBegin().compareTo(begin) >= 0 && pkRange.getEnd().compareTo(end) <= 0) { + retRanges.add(pkRange); + } else { + LOGGER.info("Filter invalid pkrange: {}, begin: {}, end: {}", + gson.toJson(pkRange), begin.jsonize(), end.jsonize()); + } + } + } + return retRanges; + } + + private boolean checkHasRange(List rangeList) { + for (Range range : rangeList) { + if (!range.isSingleValue()) { + // means at least one sub split is range + return true; + } + } + return false; + } + + private List mergeSubRange(List range1, List range2, PrimaryKey begin, PrimaryKey end) { + for (Range subRange : range2) { + range1 = mergeSubRange(range1, subRange, begin, end); + } + return range1; + } + + private List mergeSubRange(List range1, Range subRange, PrimaryKey begin, PrimaryKey end) { + List retRange = new ArrayList(); + for (Range range : range1) { + LOGGER.info("rangeBegin: {}, rangeEnd: {}, rangeEqual: {}, subRangeBegin: {}, subRangeEnd: {}, subRangeEqual: {}", + range.begin, range.end, range.equal, subRange.begin, subRange.end, subRange.equal); + if (range.equal != null) { + return range1; + } else if (subRange.equal != null) { + List rangeList = new ArrayList(); + rangeList.add(subRange); + return rangeList; + } else { + PrimaryKeyColumn pkcBegin = range.begin; + PrimaryKeyColumn pkcEnd = range.end; + + if (subRange.begin.getName().equals(pkcBegin.getName())) { + if (pkcEnd.getValue().compareTo(subRange.begin.getValue()) < 0 || + pkcBegin.getValue().compareTo(subRange.end.getValue()) > 0) { + continue; + } + if (pkcBegin.getValue().compareTo(subRange.begin.getValue()) > 0 + && pkcBegin.getValue().compareTo(subRange.end.getValue()) < 0 + && pkcEnd.getValue().compareTo(subRange.end.getValue()) > 0) { + range.setEnd(subRange.end); + range.setRightOpen(subRange.isRightOpen); + } else if (pkcBegin.getValue().compareTo(subRange.begin.getValue()) < 0 + && pkcEnd.getValue().compareTo(subRange.begin.getValue()) > 0) { + if (pkcEnd.getValue().compareTo(subRange.end.getValue()) > 0) { + range.setEnd(subRange.end); + range.setRightOpen(subRange.isRightOpen); + range.setBegin(subRange.begin); + } + if (pkcEnd.getValue().compareTo(subRange.end.getValue()) <= 0) { + range.setBegin(subRange.begin); + } + } + + retRange.add(range); + /* else if (pkcBegin.getValue().compareTo(subRange.end.getValue()) == 0) { + + }*/ + } else { + return range1; + } + } + } + return retRange; + + } + + private List mergeTotalRange(List range1, List range2, PrimaryKey begin, PrimaryKey end) { + range1.addAll(range2); + return range1; + } + + @Override + public void initial(SyncClient client) { + if (manager == null) { + synchronized (TablestoreSplit.class) { + if (manager == null) { + manager = new CatalogManager(client); + } + } + } + TableCatalog catalog = manager.getTableCatalog(tableName); + if (type == SplitType.KeyValue) { + if (tableName.equals(splitName)) { + this.meta = catalog.getTableMeta(); + } else { + List metas = catalog.getIndexMetaList(); + for (TableMeta tempMeta : metas) { + if (tempMeta.getTableName().equals(splitName)) { + this.meta = tempMeta; + return; + } + } + throw new IllegalArgumentException("invalid split name"); + } + } else { + List metas = catalog.getSearchSchema(); + this.searchInfo = new SearchInfo(splitName, metas.get(0)); + return; + } + } + + /** + * @param filter true means this split may have some data left after the filter + * @return + */ + public boolean checkIfMatchTheFilter(Filter filter) { + if (filter.isNested()) { + if (filter.getLogicOperator() == Filter.LogicOperator.AND) { + for (Filter subFilter : filter.getSubFilters()) { + if (!checkIfMatchTheFilter(subFilter)) { + return false; + } + } + return true; + } else if (filter.getLogicOperator() == Filter.LogicOperator.OR) { + for (Filter subFilter : filter.getSubFilters()) { + if (checkIfMatchTheFilter(subFilter)) { + return true; + } + } + return false; + } else { + // + return true; + } + } else { + PrimaryKey pk = kvSplit.getLowerBound(); + if (filter.getCompareOperator() == Filter.CompareOperator.NOT_EQUAL) { + return true; + } else if (Filter.CompareOperator.EQUAL == filter.getCompareOperator()) { + if (!filter.getColumnName().equals(pk.getPrimaryKeyColumn(0).getName())) { + return true; + } + try { + return (kvSplit.getLowerBound().getPrimaryKeyColumn(0).getValue().isInfMin() || kvSplit.getLowerBound().getPrimaryKeyColumn(0).getValue().toColumnValue().compareTo(filter.getColumnValue()) <= 0) + && (kvSplit.getUpperBound().getPrimaryKeyColumn(0).getValue().isInfMax() || kvSplit.getUpperBound().getPrimaryKeyColumn(0).getValue().toColumnValue().compareTo(filter.getColumnValue()) > 0); + } catch (IOException e) { + e.printStackTrace(); + return true; + } + } else if (Filter.CompareOperator.EMPTY_FILTER == filter.getCompareOperator()) { + return true; + } + + if (filter.getColumnName().equals(pk.getPrimaryKeyColumn(0).getName())) { + if (filter.getCompareOperator() == Filter.CompareOperator.GREATER_THAN || + filter.getCompareOperator() == Filter.CompareOperator.GREATER_EQUAL) { + try { + + return (kvSplit.getUpperBound().getPrimaryKeyColumn(0).getValue().isInfMax() + || kvSplit.getUpperBound().getPrimaryKeyColumn(0).getValue().toColumnValue().compareTo(filter.getColumnValue()) > 0); + } catch (IOException e) { + return true; + } + + } else if (filter.getCompareOperator() == Filter.CompareOperator.LESS_THAN || + filter.getCompareOperator() == Filter.CompareOperator.LESS_EQUAL) { + try { + if (filter.getCompareOperator() == Filter.CompareOperator.LESS_THAN) { + return (kvSplit.getLowerBound().getPrimaryKeyColumn(0).getValue().isInfMin() + || kvSplit.getLowerBound().getPrimaryKeyColumn(0).getValue().toColumnValue().compareTo(filter.getColumnValue()) < 0); + } else { + return (kvSplit.getLowerBound().getPrimaryKeyColumn(0).getValue().isInfMin() + || kvSplit.getLowerBound().getPrimaryKeyColumn(0).getValue().toColumnValue().compareTo(filter.getColumnValue()) <= 0); + } + + } catch (IOException e) { + return true; + } + } + } + return true; + } + } + + public SplitType getType() { + return type; + } + + public Filter getFilter() { + return filter; + } + + + public String getSplitName() { + return splitName; + } + + public String getTableName() { + return tableName; + } + + public void setType(SplitType type) { + this.type = type; + } + + public Split getKvSplit() { + return kvSplit; + } + + public void setFilter(Filter filter) { + } + + public byte[] getSessionId() { + return sessionId; + } + + public int getSplitId() { + return splitId; + } + + public List getGeoColumnNames() { + return geoColumnNames; + } + + public int getMaxParallel() { + return maxParallel; + } + + @Override + public String toString() { + return "Name:" + tableName + ", splitname" + splitName + ",type:" + type; + } + + // Flat the tree filter + public Filter buildFlatTreeFilter(Filter filter) { + if (filter.isNested()) { + List origFilters = new ArrayList(); + for (Filter subFilter : filter.getSubFilters()) { + origFilters.add(buildFlatTreeFilter(subFilter)); + } + + List flatFilters = new ArrayList(); + for (Filter subFilter : origFilters) { + if (subFilter.isNested() && filter.getLogicOperator() != Filter.LogicOperator.NOT + && filter.getLogicOperator() == subFilter.getLogicOperator()) { + flatFilters.addAll(subFilter.getSubFilters()); + } else { + flatFilters.add(subFilter); + } + } + return new Filter(filter.getLogicOperator(), flatFilters); + } else { + return filter; + } + } + + // Merged the same tree level query conditions. + public List mergeQuerys(List origQuerys) { + List remainQuerys = new ArrayList(); + Map mergedRangeQuerys = new HashMap(origQuerys.size()); + for (Query query : origQuerys) { + if (query.getQueryType() == QueryType.QueryType_RangeQuery) { + RangeQuery rangeQuery = (RangeQuery) query; + RangeQuery mergedRangeQuery = mergedRangeQuerys.get(rangeQuery.getFieldName()); + if (mergedRangeQuery != null) { + if (rangeQuery.getFrom() != null) { + if (mergedRangeQuery.getFrom() == null) { + mergedRangeQuery.setFrom(rangeQuery.getFrom()); + mergedRangeQuery.setIncludeLower(rangeQuery.isIncludeLower()); + } else if (rangeQuery.getFrom().compareTo(mergedRangeQuery.getFrom()) > 0) { + mergedRangeQuery.setFrom(rangeQuery.getFrom()); + mergedRangeQuery.setIncludeLower(rangeQuery.isIncludeLower()); + } else if (rangeQuery.getFrom().compareTo(mergedRangeQuery.getFrom()) == 0) { + // a >= 5 AND a > 5 => a > 5 + if (!rangeQuery.isIncludeLower() || !mergedRangeQuery.isIncludeLower()) { + mergedRangeQuery.setIncludeLower(false); + } + } + } + + if (rangeQuery.getTo() != null) { + if (mergedRangeQuery.getTo() == null) { + mergedRangeQuery.setTo(rangeQuery.getTo()); + mergedRangeQuery.setIncludeUpper(rangeQuery.isIncludeUpper()); + } else if (rangeQuery.getTo().compareTo(mergedRangeQuery.getTo()) < 0) { + mergedRangeQuery.setTo(rangeQuery.getTo()); + mergedRangeQuery.setIncludeUpper(rangeQuery.isIncludeUpper()); + } else if (rangeQuery.getTo().compareTo(mergedRangeQuery.getTo()) == 0) { + // a <= 5 AND a < 5 => a <= 5 + if (!rangeQuery.isIncludeUpper() || !mergedRangeQuery.isIncludeUpper()) { + mergedRangeQuery.setIncludeUpper(false); + } + } + // unnecessary + if (mergedRangeQuery.getTo() == null || + (mergedRangeQuery.getTo() != null && rangeQuery.getTo().compareTo(mergedRangeQuery.getTo()) <= 0)) { + mergedRangeQuery.setTo(rangeQuery.getTo()); + } + } + + } else { + mergedRangeQuerys.put(rangeQuery.getFieldName(), rangeQuery); + } + } else { + remainQuerys.add(query); + } + } + + List retQuerys = new ArrayList(); + retQuerys.addAll(mergedRangeQuerys.values()); + retQuerys.addAll(remainQuerys); + return retQuerys; + } + + public static Filter getUnhandledOtsFilter(SyncClient client, Filter filter, String tableName, String indexName) { + FilterPushdownConfig filterPushdownConfig = new FilterPushdownConfig(); + return getUnhandledOtsFilterCore(client, filter, tableName, indexName, filterPushdownConfig); + } + + + public static Filter getUnhandledOtsFilter(SyncClient client, Filter filter, String tableName, String indexName, FilterPushdownConfig filterPushdownConfig) { + return getUnhandledOtsFilterCore(client, filter, tableName, indexName, filterPushdownConfig); + } + + + public static Filter getUnhandledOtsFilterCore(SyncClient client, Filter filter, String tableName, String indexName, FilterPushdownConfig filterPushdownConfig) { + boolean pushRangeLong = filterPushdownConfig.pushRangeLong; + boolean pushRangeString = filterPushdownConfig.pushRangeString; + + if (geoColumnNames == null) { + geoColumnNames = generateGeoColumnNames(client, tableName, indexName); + } + + if (filter.isNested()) { + List subFiltersOld = filter.getFilters(); + List subFilterNewList = new ArrayList(); + if (filter.getLogicOperator() == Filter.LogicOperator.OR) { + containOr = true; + if (!pushRangeLong && containsRangeLong || !pushRangeString && containsRangeString) { + LOGGER.warn("push.down.range.long push.down.range.string will be regarded as true when sql contains OR, so all filters will be pushed down"); + } + } + for (Filter subFilter : subFiltersOld) { + Filter subFilterNew = getUnhandledOtsFilterCore(client, subFilter, tableName, indexName, filterPushdownConfig); + if (subFilterNew != null) { + subFilterNewList.add(subFilterNew); + } + } + if (subFilterNewList.size() >= 2) { + filter.setFilters(subFilterNewList); + } else if (subFilterNewList.size() == 1) { + filter = subFilterNewList.get(0); + } else { + filter = null; + } + return filter; + } else { + ColumnValue filterColumnValue = filter.getColumnValue(); + if (geoColumnNames.contains(filter.getColumnName())) { + containGeo = true; + return null; + } else if (filter.getCompareOperator() == Filter.CompareOperator.GREATER_THAN || + filter.getCompareOperator() == Filter.CompareOperator.GREATER_EQUAL || + filter.getCompareOperator() == Filter.CompareOperator.LESS_THAN || + filter.getCompareOperator() == Filter.CompareOperator.LESS_EQUAL) { + if (filterColumnValue.getType() == ColumnType.INTEGER) { + containsRangeLong = true; + } + if (filterColumnValue.getType() == ColumnType.STRING) { + containsRangeString = true; + } + if (containOr) { + if (!pushRangeLong && containsRangeLong || !pushRangeString && containsRangeString) { + LOGGER.warn("push.down.range.long push.down.range.string will be regarded as true when sql contains OR, so all filters will be pushed down"); + } + return null; + } else { + if ((!pushRangeLong && filterColumnValue.getType() == ColumnType.INTEGER) || + (!pushRangeString && filterColumnValue.getType() == ColumnType.STRING)) { + return filter; + } else { + return null; + } + } + } else { + //other has been pushed down filter : start with isnull equal and so on + return null; + } + } + + } + + private static List generateGeoColumnNames(SyncClient client, String tableName, String indexName) { + ArrayList geoColumnNames = new ArrayList(); + DescribeSearchIndexRequest request = new DescribeSearchIndexRequest(); + request.setTableName(tableName); + request.setIndexName(indexName); + + DescribeSearchIndexResponse response = client.describeSearchIndex(request); + IndexSchema indexSchema = response.getSchema(); + + for (FieldSchema fieldSchema : indexSchema.getFieldSchemas()) { + if (fieldSchema.getFieldType() == FieldType.GEO_POINT) { + geoColumnNames.add(fieldSchema.getFieldName()); + } + } + + return geoColumnNames; + } + + public Query buildMergedSearchQueryFromFilter(Filter filter) throws Exception { + return buildMergedSearchQueryFromFilter(filter, new FilterPushdownConfig()); + } + + private static boolean containsRangeLong = false; + private static boolean containsRangeString = false; + + public Query buildMergedSearchQueryFromFilter(Filter filter, FilterPushdownConfig filterPushdownConfig) { + boolean pushRangeLong = filterPushdownConfig.pushRangeLong; + boolean pushRangeString = filterPushdownConfig.pushRangeString; + if (filter.isNested()) { + BoolQuery boolQuery = new BoolQuery(); + List mustQuerys = new ArrayList(); + List shouldQuerys = new ArrayList(); + List mustNotQuerys = new ArrayList(); + for (Filter subFilter : filter.getSubFilters()) { + Query subQuery = buildMergedSearchQueryFromFilter(subFilter, filterPushdownConfig); + if (filter.getLogicOperator() == Filter.LogicOperator.AND) { + mustQuerys.add(subQuery); + } else if (filter.getLogicOperator() == Filter.LogicOperator.OR) { + shouldQuerys.add(subQuery); + containOr = true; + if (!pushRangeLong && containsRangeLong || !pushRangeString && containsRangeString) { + LOGGER.warn("push.down.range.long push.down.range.string will be regarded as true when sql contains OR"); + } + } else if (filter.getLogicOperator() == Filter.LogicOperator.NOT) { + mustNotQuerys.add(subQuery); + } + } + + // Merged the mustQuerys + List mergedMustQuerys = mergeQuerys(mustQuerys); + boolQuery.setMustQueries(mergedMustQuerys); + boolQuery.setShouldQueries(shouldQuerys); + boolQuery.setMustNotQueries(mustNotQuerys); + return boolQuery; + } else { + ColumnValue filterColumnValue = filter.getColumnValue(); + if (geoColumnNames != null && geoColumnNames.contains(filter.getColumnName())) { + Query geoQuery = getGeoQuery(filter); + if (geoQuery != null) { + return geoQuery; + } + } else if (filter.getCompareOperator() == Filter.CompareOperator.EQUAL) { + return QueryBuilders.term(filter.getColumnName(), filterColumnValue.getValue()).build(); + } else if (filter.getCompareOperator() == Filter.CompareOperator.IN) { + return getInQuery(filter); + } else if (filter.getCompareOperator() == Filter.CompareOperator.IS_NULL) { + return getIsNullQuery(filter); + } else if (filter.getCompareOperator() == Filter.CompareOperator.NOT_EQUAL) { + return getNotEqualQuery(filter, filterColumnValue); + } else if (filter.getCompareOperator() == Filter.CompareOperator.START_WITH) { + return getStartWithQuery(filter, filterColumnValue); + } else if (filter.getCompareOperator() == Filter.CompareOperator.GREATER_THAN || + filter.getCompareOperator() == Filter.CompareOperator.GREATER_EQUAL || + filter.getCompareOperator() == Filter.CompareOperator.LESS_THAN || + filter.getCompareOperator() == Filter.CompareOperator.LESS_EQUAL) { + Query rangeQuery = getRangeQuery(filter, pushRangeLong, pushRangeString, filterColumnValue); + if (rangeQuery != null) { + return rangeQuery; + } + } + } + return new MatchAllQuery(); + } + + private Query getRangeQuery(Filter filter, boolean pushRangeLong, boolean pushRangeString, ColumnValue filterColumnValue) { + if (filterColumnValue.getType() == ColumnType.INTEGER) { + containsRangeLong = true; + } + if (filterColumnValue.getType() == ColumnType.STRING) { + containsRangeString = true; + } + + if (containOr) { + if (!pushRangeLong && containsRangeLong || !pushRangeString && containsRangeString) { + LOGGER.warn("push.down.range.long push.down.range.string will be regarded as true when sql contains or"); + } + RangeQuery.Builder builder = QueryBuilders.range(filter.getColumnName()); + if (filter.getCompareOperator() == Filter.CompareOperator.GREATER_THAN) { + return builder.greaterThan(filterColumnValue.getValue()).build(); + } else if (filter.getCompareOperator() == Filter.CompareOperator.GREATER_EQUAL) { + return builder.greaterThanOrEqual(filterColumnValue.getValue()).build(); + } else if (filter.getCompareOperator() == Filter.CompareOperator.LESS_THAN) { + return builder.lessThan(filterColumnValue.getValue()).build(); + } else if (filter.getCompareOperator() == Filter.CompareOperator.LESS_EQUAL) { + return builder.lessThanOrEqual(filterColumnValue.getValue()).build(); + } + } else { + if (!pushRangeLong && filterColumnValue.getType() == ColumnType.INTEGER) { + return new MatchAllQuery(); + } + if (!pushRangeString && filterColumnValue.getType() == ColumnType.STRING) { + return new MatchAllQuery(); + } + RangeQuery.Builder builder = QueryBuilders.range(filter.getColumnName()); + if (filter.getCompareOperator() == Filter.CompareOperator.GREATER_THAN) { + return builder.greaterThan(filterColumnValue.getValue()).build(); + } else if (filter.getCompareOperator() == Filter.CompareOperator.GREATER_EQUAL) { + return builder.greaterThanOrEqual(filterColumnValue.getValue()).build(); + } else if (filter.getCompareOperator() == Filter.CompareOperator.LESS_THAN) { + return builder.lessThan(filterColumnValue.getValue()).build(); + } else if (filter.getCompareOperator() == Filter.CompareOperator.LESS_EQUAL) { + return builder.lessThanOrEqual(filterColumnValue.getValue()).build(); + } + } + return null; + } + + private Query getStartWithQuery(Filter filter, ColumnValue filterColumnValue) { + return QueryBuilders.prefix(filter.getColumnName(), filterColumnValue.asString()).build(); + } + + private Query getNotEqualQuery(Filter filter, ColumnValue filterColumnValue) { + BoolQuery.Builder boolBuilder = QueryBuilders.bool(); + TermQuery.Builder termBuilder = QueryBuilders.term(filter.getColumnName(), filterColumnValue.getValue()); + return boolBuilder.mustNot(termBuilder).build(); + } + + private Query getIsNullQuery(Filter filter) { + BoolQuery.Builder boolBuilder = QueryBuilders.bool(); + ExistsQuery.Builder existsBuilder = QueryBuilders.exists(filter.getColumnName()); + return boolBuilder.mustNot(existsBuilder).build(); + } + + private Query getInQuery(Filter filter) { + TermsQuery.Builder terms = QueryBuilders.terms(filter.getColumnName()).terms(); + for (ColumnValue columnValue : filter.getColumnValuesForInOperator()) { + terms.addTerm(columnValue.getValue()); + } + return terms.build(); + } + + private Query getGeoQuery(Filter filter) { + GeoQueryHelper query; + try { + query = GeoQueryHelper.buildGeoQueryHelper(filter); + } catch (IllegalArgumentException e) { + e.printStackTrace(); + return null; + } + switch (query.getGeoType()) { + case DISTANCE: + return QueryBuilders.geoDistance(filter.getColumnName()).centerPoint(query.getCenterPoint()) + .distanceInMeter(query.getDistanceInMeter()).build(); + case BOUNDING_BOX: + return QueryBuilders.geoBoundingBox(filter.getColumnName()).topLeft(query.getTopLeft()) + .bottomRight(query.getBottomRight()).build(); + case POLYGON: + GeoPolygonQuery.Builder builder = QueryBuilders.geoPolygon(filter.getColumnName()); + for (String point : query.getPoints()) { + builder.addPoint(point); + } + return builder.build(); + default: + return null; + } + } +} + diff --git a/src/main/java/com/alicloud/openservices/tablestore/ecosystem/TablestoreSplitIterator.java b/src/main/java/com/alicloud/openservices/tablestore/ecosystem/TablestoreSplitIterator.java new file mode 100644 index 0000000..ff02266 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/ecosystem/TablestoreSplitIterator.java @@ -0,0 +1,121 @@ +package com.alicloud.openservices.tablestore.ecosystem; + +import com.alicloud.openservices.tablestore.ClientException; +import com.alicloud.openservices.tablestore.SyncClientInterface; +import com.alicloud.openservices.tablestore.model.*; +import com.alicloud.openservices.tablestore.model.iterator.RowIterator; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +public class TablestoreSplitIterator implements RowIterator { + + private ArrayList> rowIterators; + + private ArrayList getRows; + private Iterator current; + private int iteratorIndex; + private boolean needFetchSingleRow; + public TablestoreSplitIterator(SyncClientInterface client, List pkRanges, String tableName, List requiredColumns) { + rowIterators = new ArrayList>(); + for(TablestoreSplit.PkRange pkRange : pkRanges) { + if(pkRange.getEqual() == null) { + Iterator rows= generateIterator(client, pkRange.getBegin(),pkRange.getEnd(), tableName, requiredColumns); + rowIterators.add(rows); + } else { + needFetchSingleRow = true; + } + } + + if (needFetchSingleRow) { + BatchGetRowRequest request = buildBatchGet(pkRanges, tableName); + BatchGetRowResponse response = client.batchGetRow(request); + if (response.getFailedRows().isEmpty()) { + List rowCollction = new ArrayList(); + for (BatchGetRowResponse.RowResult result : response.getSucceedRows()) { + if (result.getRow() != null) { + rowCollction.add(result.getRow()); + } + } + if (rowCollction.size() > 0) { + rowIterators.add(rowCollction.iterator()); + } + } + } + + if (rowIterators.size() > 0) { + iteratorIndex = 0; + current = rowIterators.get(iteratorIndex); + } else { + iteratorIndex = 0; + current = null; + } + } + + private BatchGetRowRequest buildBatchGet(List pkRanges, String tableName) { + BatchGetRowRequest request = new BatchGetRowRequest(); + MultiRowQueryCriteria criteria1 = new MultiRowQueryCriteria(tableName); + criteria1.setMaxVersions(1); + for (TablestoreSplit.PkRange range : pkRanges) { + if (range.getEqual() != null) { + criteria1.addRow(range.getEqual()); + request.addMultiRowQueryCriteria(criteria1); + } + } + return request; + } + + private Iterator generateIterator(SyncClientInterface client, PrimaryKey begin, PrimaryKey end, String tableName, List requiredColumns) { + RangeIteratorParameter rangeIteratorParameter = new RangeIteratorParameter(tableName); + rangeIteratorParameter.setInclusiveStartPrimaryKey(begin); + rangeIteratorParameter.setExclusiveEndPrimaryKey(end); + rangeIteratorParameter.setMaxVersions(1); + if (requiredColumns != null && !requiredColumns.isEmpty()) { + for (String col : requiredColumns) { + rangeIteratorParameter.addColumnsToGet(col); + } + } else { + String defaultString = begin.getPrimaryKeyColumn(0).getName(); + rangeIteratorParameter.addColumnsToGet(defaultString); + } + if (requiredColumns != null && !requiredColumns.isEmpty()) { + return client.createBulkExportIterator(rangeIteratorParameter); + } else { + return client.createRangeIterator(rangeIteratorParameter); + } + } + + @Override + public long getTotalCount() { + return -1; + } + + @Override + public boolean hasNext() { + if (current != null && (current.hasNext() || iteratorIndex < rowIterators.size() - 1)) { + return true; + } else { + return false; + } + } + + @Override + public Row next() { + if (current == null) { + return null; + } + + if (!current.hasNext()) { + while (!current.hasNext() && iteratorIndex < rowIterators.size() -1) { + iteratorIndex++; + current = rowIterators.get(iteratorIndex); + } + } + return current.next(); + } + + @Override + public void remove() { + throw new ClientException("RowIterator do not support remove()."); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/ecosystem/expression/BinaryExpression.java b/src/main/java/com/alicloud/openservices/tablestore/ecosystem/expression/BinaryExpression.java new file mode 100644 index 0000000..a9947c0 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/ecosystem/expression/BinaryExpression.java @@ -0,0 +1,44 @@ +package com.alicloud.openservices.tablestore.ecosystem.expression; + +import java.util.List; + +public class BinaryExpression implements Expression { + public BinaryExpression(String opName, List subExprs) { + this.opName = opName; + + if (subExprs.size() != 2) { + throw new IllegalArgumentException("size not math:" + subExprs.size()); + } + + left = subExprs.get(0); + right = subExprs.get(1); + } + + @Override + public T accept(ExpressionVisitor visitor) { + return visitor.visit(this); + } + + @Override + public List getChildren() { + return null; + } + + private String opName; + + private Expression left; + + private Expression right; + + public String getOpName() { + return opName; + } + + public Expression getLeft() { + return left; + } + + public Expression getRight() { + return right; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/ecosystem/expression/Expression.java b/src/main/java/com/alicloud/openservices/tablestore/ecosystem/expression/Expression.java new file mode 100644 index 0000000..f0802e0 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/ecosystem/expression/Expression.java @@ -0,0 +1,10 @@ +package com.alicloud.openservices.tablestore.ecosystem.expression; + +import java.util.List; + +public interface Expression { + T accept(ExpressionVisitor visitor); + + List getChildren(); +} + diff --git a/src/main/java/com/alicloud/openservices/tablestore/ecosystem/expression/ExpressionVisitor.java b/src/main/java/com/alicloud/openservices/tablestore/ecosystem/expression/ExpressionVisitor.java new file mode 100644 index 0000000..7fe05de --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/ecosystem/expression/ExpressionVisitor.java @@ -0,0 +1,9 @@ +package com.alicloud.openservices.tablestore.ecosystem.expression; + +public interface ExpressionVisitor { + T visit (ReferenceExpression expr); + T visit (LiteralExpression expr); + T visit (BinaryExpression expr); + T visit (LogicExpression expr); + T visit(UnknownExpression expr); +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/ecosystem/expression/LiteralExpression.java b/src/main/java/com/alicloud/openservices/tablestore/ecosystem/expression/LiteralExpression.java new file mode 100644 index 0000000..f01985e --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/ecosystem/expression/LiteralExpression.java @@ -0,0 +1,31 @@ +package com.alicloud.openservices.tablestore.ecosystem.expression; + +import java.util.List; + +public class LiteralExpression implements Expression { + public LiteralExpression(String type, String value) { + this.type = type; + this.value = value;; + } + + @Override + public T accept(ExpressionVisitor visitor) { + return visitor.visit(this); + } + + @Override + public List getChildren() { + return null; + } + + private String type; + private String value; + + public String getValue() { + return value; + } + + public String getType() { + return type; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/ecosystem/expression/LogicExpression.java b/src/main/java/com/alicloud/openservices/tablestore/ecosystem/expression/LogicExpression.java new file mode 100644 index 0000000..738a38d --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/ecosystem/expression/LogicExpression.java @@ -0,0 +1,34 @@ +package com.alicloud.openservices.tablestore.ecosystem.expression; + +import java.util.List; + +public class LogicExpression implements Expression { + private String name; + private List subExprs; + + public LogicExpression(String name, List subExprs) { + this.name = name; + this.subExprs = subExprs; + } + + @Override + public T accept(ExpressionVisitor visitor) { + return visitor.visit(this); + } + + @Override + public List getChildren() { + return this.subExprs; + } + + public void addSubExpression(Expression expr) { + subExprs.add(expr); + } + + public String getName() { + return this.name; + } + + public static final String AND_OP_NAME = "AND"; + public static final String OR_OP_NAME = "OR"; +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/ecosystem/expression/ReferenceExpression.java b/src/main/java/com/alicloud/openservices/tablestore/ecosystem/expression/ReferenceExpression.java new file mode 100644 index 0000000..e7c1825 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/ecosystem/expression/ReferenceExpression.java @@ -0,0 +1,36 @@ +package com.alicloud.openservices.tablestore.ecosystem.expression; + +import com.alicloud.openservices.tablestore.model.PrimaryKeyValue; + +import java.util.List; + +public class ReferenceExpression implements Expression { + public ReferenceExpression(String refName, String sqlValueType) { + this.refName = refName; + this.sqlValueType = sqlValueType; + } + + @Override + public T accept(ExpressionVisitor visitor) { + return visitor.visit(this); + } + + @Override + public List getChildren() { + return null; + } + + private String refName; + + private PrimaryKeyValue pkv; + + private String sqlValueType; + + public String getRefName() { + return refName; + } + + public PrimaryKeyValue getPkv() { + return pkv; + } +} \ No newline at end of file diff --git a/src/main/java/com/alicloud/openservices/tablestore/ecosystem/expression/UnknownExpression.java b/src/main/java/com/alicloud/openservices/tablestore/ecosystem/expression/UnknownExpression.java new file mode 100644 index 0000000..22a6e96 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/ecosystem/expression/UnknownExpression.java @@ -0,0 +1,20 @@ +package com.alicloud.openservices.tablestore.ecosystem.expression; + +import java.util.List; + +public class UnknownExpression implements Expression { + @Override + public T accept(ExpressionVisitor visitor) { + return visitor.visit(this); + } + + @Override + public List getChildren() { + return null; + } + + private static UnknownExpression defaultUnknownExprInstance = new UnknownExpression(); + public static UnknownExpression defaultUnknownExpr() { + return defaultUnknownExprInstance; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/AddDefinedColumnRequest.java b/src/main/java/com/alicloud/openservices/tablestore/model/AddDefinedColumnRequest.java new file mode 100644 index 0000000..7fda8ac --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/AddDefinedColumnRequest.java @@ -0,0 +1,62 @@ +package com.alicloud.openservices.tablestore.model; + +import com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi; +import com.alicloud.openservices.tablestore.core.utils.OptionalValue; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +/** + * AddDefinedColumn包含为一张表添加预定义列所必需的一些参数,包括表的名字,要添加的预定义列的名字及类型 + */ +public class AddDefinedColumnRequest implements Request { + private String tableName; + private List definedColumns = new ArrayList(); + + /** + * 设置表的名称。 + * + * @param tableName 表的名称。 + */ + public void setTableName(String tableName) { + Preconditions.checkArgument(tableName != null && !tableName.isEmpty(), "The name of table should not be null or empty."); + + this.tableName = tableName; + } + + /** + * 获取表名称 + * @return 表的名称 + */ + public String getTableName() { + return tableName; + } + + /** + * 添加一个预定义列 + * @param name 预定义列的名称。 + * @param type 预定义列的数据类型。 + */ + public void addDefinedColumn(String name, DefinedColumnType type) { + Preconditions.checkArgument(name != null && !name.isEmpty(), "The name of defined column should not be null or empty."); + Preconditions.checkNotNull(type, "The type of defined column should not be null."); + + this.definedColumns.add(new DefinedColumnSchema(name, type)); + } + + /** + * 获取预定义列列表 + * @return 预定义列列表 + */ + public List getDefinedColumn() { + return Collections.unmodifiableList(definedColumns); + } + + @Override + public String getOperationName() { + return OperationNames.OP_ADD_DEFINED_COLUMN; + } +} + diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/AddDefinedColumnResponse.java b/src/main/java/com/alicloud/openservices/tablestore/model/AddDefinedColumnResponse.java new file mode 100644 index 0000000..661df97 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/AddDefinedColumnResponse.java @@ -0,0 +1,12 @@ +package com.alicloud.openservices.tablestore.model; + +/** + * AddDefinedColumn操作的返回结果。 + */ +public class AddDefinedColumnResponse extends Response { + + public AddDefinedColumnResponse(Response meta) { + super(meta); + } +} + diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/BatchWriteRowRequest.java b/src/main/java/com/alicloud/openservices/tablestore/model/BatchWriteRowRequest.java index a1e182b..d9bfe44 100755 --- a/src/main/java/com/alicloud/openservices/tablestore/model/BatchWriteRowRequest.java +++ b/src/main/java/com/alicloud/openservices/tablestore/model/BatchWriteRowRequest.java @@ -1,5 +1,6 @@ package com.alicloud.openservices.tablestore.model; +import com.alicloud.openservices.tablestore.core.utils.OptionalValue; import com.alicloud.openservices.tablestore.core.utils.Preconditions; import java.util.ArrayList; @@ -11,6 +12,8 @@ public class BatchWriteRowRequest extends TxnRequest { private Map> rowChangesGroupByTable; + private OptionalValue isAtomic = new OptionalValue("IsAtomic"); + public BatchWriteRowRequest() { rowChangesGroupByTable = new HashMap>(); } @@ -102,4 +105,35 @@ public int getRowsCount() { } return rowsCount; } + + /** + * 是否设置了批量原子写选项。 + * + * @return 是否设置了批量原子写选项 + */ + public boolean isAtomicSet() { + return isAtomic.isValueSet(); + } + + /** + * 设置是否为批量原子写。 + * 如果启用了批量原子写,需要保证写入到同一张表格中的分区键相同,否则会写入失败。 + * + * @param atomic 是否为批量原子写 + */ + public void setAtomic(boolean atomic) { + isAtomic.setValue(atomic); + } + + /** + * 检查是否为批量原子写。 + * + * @return 是否为批量原子写 + */ + public boolean isAtomic() { + if (!isAtomic.isValueSet()) { + throw new IllegalStateException("The value of isAtomic is not set."); + } + return isAtomic.getValue(); + } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/BulkExportRequest.java b/src/main/java/com/alicloud/openservices/tablestore/model/BulkExportRequest.java new file mode 100644 index 0000000..808b86b --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/BulkExportRequest.java @@ -0,0 +1,42 @@ +package com.alicloud.openservices.tablestore.model; + +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.alicloud.openservices.tablestore.model.tunnel.BulkExportQueryCriteria; + +public class BulkExportRequest implements Request { + + /** + * 范围查询的条件。 + */ + private BulkExportQueryCriteria bulkExportQueryCriteria; + + public BulkExportRequest() { + } + + public BulkExportRequest(BulkExportQueryCriteria bulkExportQueryCriteria) { + setBulkExportQueryCriteria(bulkExportQueryCriteria); + } + + public String getOperationName() { + return OperationNames.OP_BULK_EXPORT; + } + + /** + * 获取范围查询的条件。 + * @return 范围查询的条件。 + */ + public BulkExportQueryCriteria getBulkExportQueryCriteria() { + return bulkExportQueryCriteria; + } + + /** + * 设置范围查询的条件。 + * @param bulkExportQueryCriteria 范围查询的条件。 + */ + + public void setBulkExportQueryCriteria(BulkExportQueryCriteria bulkExportQueryCriteria) { + Preconditions.checkNotNull(bulkExportQueryCriteria, "The bulkExportQueryCriteria should not be null."); + + this.bulkExportQueryCriteria = bulkExportQueryCriteria; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/BulkExportResponse.java b/src/main/java/com/alicloud/openservices/tablestore/model/BulkExportResponse.java new file mode 100644 index 0000000..27b1888 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/BulkExportResponse.java @@ -0,0 +1,90 @@ +package com.alicloud.openservices.tablestore.model; + +import com.alicloud.openservices.tablestore.core.utils.Preconditions; + +import java.nio.ByteBuffer; + +public class BulkExportResponse extends Response { + private ConsumedCapacity consumedCapacity; + + private ByteBuffer rows; + + private PrimaryKey nextStartPrimaryKey; + + private byte[] nextToken; + + private DataBlockType dataBlockType = DataBlockType.DBT_PLAIN_BUFFER; + + private long bodyBytes; + + public BulkExportResponse(Response meta, ConsumedCapacity consumedCapacity) { + super(meta); + Preconditions.checkNotNull(consumedCapacity); + this.consumedCapacity = consumedCapacity; + } + + public void setRows(ByteBuffer rows) { + this.rows = rows; + } + + public void setNextStartPrimaryKey(PrimaryKey nextStartPrimaryKey) { + this.nextStartPrimaryKey = nextStartPrimaryKey; + } + + public void setDataBlockType(DataBlockType dataBlockType) { + this.dataBlockType = dataBlockType; + } + + public DataBlockType getDataBlockType() { + return dataBlockType; + } + + /** + * 获取此次操作消耗的CapacityUnit。 + * + * @return 此次操作消耗的CapacityUnit。 + */ + public ConsumedCapacity getConsumedCapacity() { + return consumedCapacity; + } + + /** + * 获取本次查询返回的所有行。 + * + * @return 所有行 + */ + public ByteBuffer getRows() { + return rows; + } + + /** + * 获取下一次查询的范围的起始边界。 + * 若为null,则代表本次查询已经返回所有数据,无需再次查询。 + * + * @return 若该范围内的数据还未读取完毕,则返回下一行的主键,否则返回null + */ + public PrimaryKey getNextStartPrimaryKey() { + return nextStartPrimaryKey; + } + + public byte[] getNextToken() { + return nextToken; + } + + public void setNextToken(byte[] nextToken) { + this.nextToken = nextToken; + } + + public boolean hasNextToken() { + return (nextToken != null) && (nextToken.length > 0); + } + + public long getBodyBytes() { + return bodyBytes; + } + + public void setBodyBytes(long bodyBytes) { + this.bodyBytes = bodyBytes; + } + +} \ No newline at end of file diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/BulkImportRequest.java b/src/main/java/com/alicloud/openservices/tablestore/model/BulkImportRequest.java new file mode 100644 index 0000000..f63a09c --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/BulkImportRequest.java @@ -0,0 +1,92 @@ +package com.alicloud.openservices.tablestore.model; + +import com.alicloud.openservices.tablestore.core.utils.Preconditions; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +public class BulkImportRequest implements Request { + private String tableName; + private List rowChanges = new ArrayList(); + + public BulkImportRequest(String tableName){ + Preconditions.checkArgument( + tableName != null && !tableName.isEmpty(), + "The name of table should not be null or empty."); + this.tableName = tableName; + } + + public void setTableName(String tableName) { + Preconditions.checkArgument( + tableName != null && !tableName.isEmpty(), + "The name of table should not be null or empty."); + this.tableName = tableName; + } + + public String getTableName(){ + return tableName; + } + + public String getOperationName() { + return OperationNames.OP_BULK_IMPORT; + } + + public void addRowChange(RowChange rowChange) { + Preconditions.checkNotNull(rowChange, "The rowPutChange should not be null."); + this.rowChanges.add(rowChange); + } + + public void addRowChanges(List rowChanges){ + Preconditions.checkNotNull(rowChanges, "The rowPutChanges should not be null."); + for (RowChange rowChange : rowChanges){ + Preconditions.checkNotNull(rowChange, String.format("The rowPutChange should not be null.")); + this.rowChanges.add(rowChange); + } + } + + public List getRowChange(){ + return rowChanges; + } + + public RowChange getRowChange(int index){ + return rowChanges.get(index); + } + + /** + * 通过一次BulkImportRequest的返回结果,生成一个新的BulkImportRequest + * + * @return 新的BulkImportRequest请求 + */ + public BulkImportRequest createRequestForRetry(List failedRows) { + Preconditions.checkArgument((failedRows != null) && !failedRows.isEmpty(), "failedRows can't be null or empty."); + BulkImportRequest request = new BulkImportRequest(tableName); + for (BulkImportResponse.RowResult rowResult : failedRows) { + RowChange rowChange = getRowChange(rowResult.getIndex()); + if (rowChange == null) { + throw new IllegalArgumentException("Can not find item in table '" + tableName + "' " + + "with index " + rowResult.getIndex()); + } + request.addRowChange(rowChange); + } + return request; + } + /** + * 判断该BulkImport请求中包含的总的行数是否为空。 + * + * @return 行数是否为空 + */ + public boolean isEmpty() { + return rowChanges.isEmpty(); + } + + /** + * 获取该BulkImport请求中包含的总的行数。 + * + * @return 总的行数 + */ + public int getRowsCount() { + return rowChanges.size(); + } + +} \ No newline at end of file diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/BulkImportResponse.java b/src/main/java/com/alicloud/openservices/tablestore/model/BulkImportResponse.java new file mode 100644 index 0000000..4651f63 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/BulkImportResponse.java @@ -0,0 +1,162 @@ +package com.alicloud.openservices.tablestore.model; + +import com.alicloud.openservices.tablestore.core.utils.Jsonizable; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class BulkImportResponse extends Response{ + + private String tableName; + + public void setTableName(String tableName){ + this.tableName = tableName; + } + /** + * BatchWriteRow批量操作中单行写的结果。 + * 若isSucceed为true,则代表该行写操作成功。 + * 若isSucceed为false,则代表该行写操作失败,可以通过getError获取失败的错误信息。 + */ + public static class RowResult { + private boolean isSucceed = false; + private Error error; + private ConsumedCapacity consumedCapacity; + private int index; + + /** + * internal use + */ + public RowResult(Error error, int index) { + this.isSucceed = false; + this.error = error; + this.index = index; + } + + /** + * internal use + */ + public RowResult(ConsumedCapacity consumedCapacity, int index) { + this.isSucceed = true; + this.consumedCapacity = consumedCapacity; + this.index = index; + } + + /** + * 判断该行查询是否执行成功。 + *

只有在成功的时候,{@link #consumedCapacity}才有效。

+ *

只有在执行不成功的时候,{@link #error}才有效。

+ * + * @return 若执行成功,则返回true,否则返回false + */ + public boolean isSucceed() { + return isSucceed; + } + + /** + * 若该行查询执行失败,则返回具体的错误信息。 + * + * @return 若执行失败,则返回错误信息,否则返回null + */ + public Error getError() { + return error; + } + + /** + * 若该行查询成功,则返回消耗的能力单元。 + * + * @return 若执行成功,则返回消耗的能力单元,否则返回null + */ + public ConsumedCapacity getConsumedCapacity() { + return consumedCapacity; + } + + /** + * 获取该行在{@link BatchGetRowRequest}的多行查询参数的索引位置。 + *

若该行查询失败,可以根据表名和索引通过{@link BatchGetRowRequest#getPrimaryKey(String, int)}中获取查询参数进行重试。

+ * + * @return 索引位置 + */ + public int getIndex() { + return index; + } + } + + private List rowResults = new ArrayList(); + /** + * internal use + * @param meta + */ + public BulkImportResponse(Response meta) { + super(meta); + } + + /** + * internal use + * @param rowResults + */ + public void addRowResult(BulkImportResponse.RowResult rowResults) { + this.rowResults.add(rowResults); + } + + /** + * 获取某个表上所有写操作的返回结果。 + * + * @return 写操作的返回结果,若该表不存在,则返回null。 + */ + public List getRowResults(){ + return rowResults; + } + + /** + * 获取所有PutRow操作执行失败的行。 + * + * @return 若存在执行失败的行,则返回所有行,否则返回空列表 + */ + public List getFailedRows() { + List result = new ArrayList(); + getResult(null, result); + return result; + } + + /** + * 获取所有操作执行成功的行。 + * + * @return 若存在执行成功的行,则返回所有行,否则返回空列表 + */ + public List getSucceedRows() { + List result = new ArrayList(); + getResult(result, null); + return result; + } + + /** + * 获取所有执行成功过的行以及所有执行失败的行。 + * + * @param succeedRows 所有执行成功的行 + * @param failedRows 所有执行失败的行 + */ + public void getResult(List succeedRows, List failedRows) { + for (BulkImportResponse.RowResult rs : rowResults) { + if (rs.isSucceed) { + if (succeedRows != null) { + succeedRows.add(rs); + } + } else { + if (failedRows != null) { + failedRows.add(rs); + } + } + } + } + + /** + * 是否所有行修改操作都执行成功。 + * + * @return 若所有行修改操作都执行成功,则返回true,否则返回false + */ + public boolean isAllSucceed() { + return getFailedRows().isEmpty(); + } +} \ No newline at end of file diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/CapacityDataSize.java b/src/main/java/com/alicloud/openservices/tablestore/model/CapacityDataSize.java new file mode 100644 index 0000000..723b192 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/CapacityDataSize.java @@ -0,0 +1,171 @@ +package com.alicloud.openservices.tablestore.model; + +import com.alicloud.openservices.tablestore.core.utils.Jsonizable; +import com.alicloud.openservices.tablestore.core.utils.OptionalValue; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; + +/** + * 表的读写吞吐量的单位,即能力单元。 + * 主要用于{@link ReservedThroughput}中配置表的预留读写吞吐量以及标识读写操作消耗的能力单元的量。 + */ +public class CapacityDataSize implements Jsonizable { + /** + * 读能力单元。 + */ + private OptionalValue readCapacityDataSize = new OptionalValue("ReadCapacityDataSize"); + + /** + * 写能力单元。 + */ + private OptionalValue writeCapacityDataSize = new OptionalValue("WriteCapacityDataSize"); + + /** + * 默认构造函数。 + *

读能力单元和写能力单元默认为未设置。

+ */ + public CapacityDataSize() { + } + + /** + * 构造CapacityUnit对象,并指定读能力单元的值和写能力单元的值。 + * + * @param readCapacityDataSize 读能力单元的值,必须大于等于0。 + * @param writeCapacityDataSize 写能力单元的值,必须大于等于0。 + * @throws IllegalArgumentException 若读或写能力单元值为负数。 + */ + public CapacityDataSize(long readCapacityDataSize, long writeCapacityDataSize) { + setReadCapacityDataSize(readCapacityDataSize); + setWriteCapacityDataSize(writeCapacityDataSize); + } + /** + * 获取读能力单元的值。 + * + * @return 读能力单元的值。 + * @throws java.lang.IllegalStateException 若没有配置该参数 + */ + public long getReadCapacityDataSize() { + if (!readCapacityDataSize.isValueSet()) { + throw new IllegalStateException("The value of read capacity unit is not set."); + } + return readCapacityDataSize.getValue(); + } + + /** + * 设置读能力单元的值,设置的值必须大于等于0。 + * + * @param readCapacityDataSize 读能力单元的值 + * @throws IllegalArgumentException 若读能力单元的值为负数。 + */ + public void setReadCapacityDataSize(long readCapacityDataSize) { + Preconditions.checkArgument(readCapacityDataSize >= 0, "The value of read capacity DataSize can't be negative."); + this.readCapacityDataSize.setValue(readCapacityDataSize); + } + + /** + * 查询是否设置了读能力单元。 + * + * @return 是否有设置读能力单元 + */ + public boolean hasSetReadCapacityDataSize() { + return readCapacityDataSize.isValueSet(); + } + + /** + * 清除设置的读CapacityDataSize。 + */ + public void clearReadCapacityDataSize() { + readCapacityDataSize.clear(); + } + + /** + * 获取写能力单元的值。 + * + * @return 写能力单元的值。 + * @throws java.lang.IllegalStateException 若没有配置该参数 + */ + public long getWriteCapacityDataSize() { + if (!writeCapacityDataSize.isValueSet()) { + throw new IllegalStateException("The value of write capacity unit is not set."); + } + return writeCapacityDataSize.getValue(); + } + + /** + * 设置写能力单元的值,设置的值必须大于等于0。 + * + * @param writeCapacityDataSize 写能力单元的值 + * @throws IllegalArgumentException 若写能力单元的值为负数。 + */ + public void setWriteCapacityDataSize(long writeCapacityDataSize) { + Preconditions.checkArgument(writeCapacityDataSize >= 0, "The value of write capacity unit can't be negative."); + this.writeCapacityDataSize.setValue(writeCapacityDataSize); + } + + /** + * 查询是否设置了写能力单元。 + * + * @return 是否有设置写能力单元 + */ + public boolean hasSetWriteCapacityDataSize() { + return writeCapacityDataSize.isValueSet(); + } + + /** + * 清除设置的写CapacityUnit。 + */ + public void clearWriteCapacityDataSize() { + writeCapacityDataSize.clear(); + } + + @Override + public int hashCode() { + return readCapacityDataSize.hashCode() ^ writeCapacityDataSize.hashCode(); + } + + @Override + public boolean equals(Object o) { + if (o == null || !(o instanceof CapacityDataSize)) { + return false; + } + + CapacityDataSize c1 = (CapacityDataSize) o; + return this.readCapacityDataSize.equals(c1.readCapacityDataSize) && this.writeCapacityDataSize.equals(c1.writeCapacityDataSize); + } + + @Override + public String toString() { + return "" + readCapacityDataSize + ", " + writeCapacityDataSize; + } + + @Override + public String jsonize() { + StringBuilder sb = new StringBuilder(); + jsonize(sb, "\n "); + return sb.toString(); + } + + @Override + public void jsonize(StringBuilder sb, String newline) { + boolean firstItem = true; + sb.append('{'); + if (readCapacityDataSize.isValueSet()) { + if (firstItem) { + firstItem = false; + } else { + sb.append(", "); + } + sb.append("\"Read_Size\": "); + sb.append(readCapacityDataSize.getValue()); + } + if (writeCapacityDataSize.isValueSet()) { + if (firstItem) { + firstItem = false; + } else { + sb.append(", "); + } + sb.append("\"Write_Size\": "); + sb.append(writeCapacityDataSize.getValue()); + } + sb.append('}'); + } +} \ No newline at end of file diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/ColumnValue.java b/src/main/java/com/alicloud/openservices/tablestore/model/ColumnValue.java index 679fde0..3468d20 100755 --- a/src/main/java/com/alicloud/openservices/tablestore/model/ColumnValue.java +++ b/src/main/java/com/alicloud/openservices/tablestore/model/ColumnValue.java @@ -1,371 +1,375 @@ -package com.alicloud.openservices.tablestore.model; - -import java.io.IOException; -import java.util.Arrays; - -import com.alicloud.openservices.tablestore.core.utils.Bytes; -import com.alicloud.openservices.tablestore.core.utils.Base64; -import com.alicloud.openservices.tablestore.core.utils.CalculateHelper; -import com.alicloud.openservices.tablestore.core.utils.Jsonizable; -import com.alicloud.openservices.tablestore.core.utils.Preconditions; -import com.alicloud.openservices.tablestore.core.protocol.PlainBufferCrc8; - -import static com.alicloud.openservices.tablestore.core.protocol.PlainBufferConsts.*; - -/** - * 表示属性列的值。 - */ -public class ColumnValue implements Comparable, Jsonizable, Measurable { - - /** - * 只供内部使用,请勿使用。 - */ - public static ColumnValue INTERNAL_NULL_VALUE = new ColumnValue(null, ColumnType.STRING); - - private Object value; - private ColumnType type; - private int dataSize = -1; - - public ColumnValue(Object value, ColumnType type) { - this.value = value; - this.type = type; - } - - private int calculateDataSize() { - int dataSize = 0; - switch (this.type) { - case INTEGER: - dataSize = 8; - break; - case STRING: - if (value == null) { - dataSize = 0; - } else { - dataSize = CalculateHelper.calcStringSizeInBytes(this.asString()); - } - break; - case BINARY: - dataSize = this.asBinary().length; - break; - case DOUBLE: - dataSize = 8; - break; - case BOOLEAN: - dataSize = 1; - break; - default: - throw new IllegalStateException("Bug: not support the type : " + type); - } - return dataSize; - } - - /** - * 获取主键列值的大小,各类型大小计算公式为: - * - {@link ColumnType#INTEGER}: 恒定大小为8个字节 - * - {@link ColumnType#DOUBLE}: 恒定大小为8个字节 - * - {@link ColumnType#BOOLEAN}: 恒定大小为1个字节 - * - {@link ColumnType#BINARY}: 大小为字节数 - * - {@link ColumnType#STRING}: 大小为按UTF-8编码后的字节数 - * - * @return 值的大小 - */ - @Override - public int getDataSize() { - if (dataSize == -1) { - dataSize = calculateDataSize(); - } - return this.dataSize; - } - - /** - * 获取属性列的类型。 - * - * @return 属性列的类型。 - */ - public ColumnType getType() { - return type; - } - - /** - * 构造一个类型为{@link ColumnType#STRING}的属性列。 - *

注意:值不能为null pointer。

- * - * @param value 字符串类型的值。 - * @return 生成的实例 - */ - public static ColumnValue fromString(String value) { - Preconditions.checkNotNull(value, "The value of column should not be null."); - return new ColumnValue(value, ColumnType.STRING); - } - - /** - * 构造一个类型为{@link ColumnType#INTEGER}的属性列。 - * - * @param value 长整型的值。 - * @return 生成的实例 - */ - public static ColumnValue fromLong(long value) { - return new ColumnValue(value, ColumnType.INTEGER); - } - - /** - * 构造一个类型为{@link ColumnType#BINARY}的属性列。 - *

注意:值不能为null pointer。

- * - * @param value 二进制字符串类型的值。 - * @return 生成的实例 - */ - public static ColumnValue fromBinary(byte[] value) { - Preconditions.checkNotNull(value, "The value of column should not be null."); - return new ColumnValue(value, ColumnType.BINARY); - } - - /** - * 构造一个类型为{@link ColumnType#DOUBLE}的属性列。 - * - * @param value double类型的值。 - * @return 生成的实例 - */ - public static ColumnValue fromDouble(double value) { - return new ColumnValue(value, ColumnType.DOUBLE); - } - - /** - * 构造一个类型为{@link ColumnType#BOOLEAN}的属性列。 - * - * @param value 布尔类型的值。 - * @return 生成的实例 - */ - public static ColumnValue fromBoolean(boolean value) { - return new ColumnValue(value, ColumnType.BOOLEAN); - } - - /** - * 获取属性列的字符串类型的值。 - *

当前仅当数据类型为{@link ColumnType#STRING}才能获取到值。

- * - * @return 字符串类型的值 - */ - public String asString() { - if (this.type != ColumnType.STRING) { - throw new IllegalStateException("The type of column is not STRING."); - } - - return (String) value; - } - - public byte[] asStringInBytes() { - return Bytes.toBytes(asString()); - } - - /** - * 获取属性列的长整型类型的值。 - *

当前仅当数据类型为{@link ColumnType#INTEGER}才能获取到值。

- * - * @return 长整型值 - */ - public long asLong() { - if (this.type != ColumnType.INTEGER) { - throw new IllegalStateException("The type of column is not INTEGER."); - } - - return (Long) value; - } - - /** - * 获取属性列的二进制字符串类型的值。 - *

当前仅当数据类型为{@link ColumnType#BINARY}才能获取到值。

- * - * @return 二进制字符串类型的值 - */ - public byte[] asBinary() { - if (this.type != ColumnType.BINARY) { - throw new IllegalStateException("The type of column is not BINARY."); - } - return (byte[]) value; - } - - /** - * 获取属性列的DOUBLE类型的值。 - *

当前仅当数据类型为{@link ColumnType#DOUBLE}才能获取到值。

- * - * @return Double类型的值 - */ - public double asDouble() { - if (this.type != ColumnType.DOUBLE) { - throw new IllegalStateException("The type of column is not DOUBLE."); - } - return (Double) value; - } - - /** - * 获取属性列的布尔类型的值。 - *

当前仅当数据类型为{@link ColumnType#BOOLEAN}才能获取到值。

- * - * @return 布尔类型的值 - */ - public boolean asBoolean() { - if (this.type != ColumnType.BOOLEAN) { - throw new IllegalStateException("The type of column is not BOOLEAN."); - } - return (Boolean) value; - } - - /** - * 采用crc8算法得到一个checksum,主要用于计算cell的checksum - * @param crc crc初始值 - * @return - */ - public byte getChecksum(byte crc) throws IOException { - switch (getType()) { - case STRING: { - byte[] rawData = asStringInBytes(); - crc = PlainBufferCrc8.crc8(crc, VT_STRING); - crc = PlainBufferCrc8.crc8(crc, rawData.length); - crc = PlainBufferCrc8.crc8(crc, rawData); - break; - } - case INTEGER: { - crc = PlainBufferCrc8.crc8(crc, VT_INTEGER); - crc = PlainBufferCrc8.crc8(crc, asLong()); - break; - } - case BINARY: { - byte[] rawData = asBinary(); - crc = PlainBufferCrc8.crc8(crc, VT_BLOB); - crc = PlainBufferCrc8.crc8(crc, rawData.length); - crc = PlainBufferCrc8.crc8(crc, rawData); - break; - } - case DOUBLE: { - crc = PlainBufferCrc8.crc8(crc, VT_DOUBLE); - crc = PlainBufferCrc8.crc8(crc, Double.doubleToRawLongBits(asDouble())); - break; - } - case BOOLEAN: { - crc = PlainBufferCrc8.crc8(crc, VT_BOOLEAN); - crc = PlainBufferCrc8.crc8(crc, asBoolean() ? (byte) 0x1 : (byte) 0x0); - break; - } - default: - throw new IOException("Bug: unsupported column type: " + getType()); - } - return crc; - } - - @Override - public boolean equals(Object o) { - if (o == null || !(o instanceof ColumnValue)) { - return false; - } - - ColumnValue val = (ColumnValue) o; - if (this.type == val.type) { - if (this.type == ColumnType.BINARY) { - return Bytes.equals((byte[]) value, (byte[]) val.value); - } else { - if (this.value == null) { - return val.value == null; - } else { - return this.value.equals(val.value); - } - } - } else { - return false; - } - } - - @Override - public int hashCode() { - if (this.type == ColumnType.BINARY) { - return Arrays.hashCode(asBinary()) * 31 + this.type.hashCode(); - } else { - return this.value.hashCode() * 31 + this.type.hashCode(); - } - } - - @Override - public String toString() { - if (this.value == null) { - return "null"; - } - if (this.type == ColumnType.BINARY) { - return Arrays.toString(asBinary()); - } else { - return this.value.toString(); - } - } - - /** - * 比较两个属性列的值的大小。 - *

注意:不同类型的属性列无法比较。

- * - * @param target - * @return 如果大于返回值大于0,等于返回0,小于返回值小于0 - */ - @Override - public int compareTo(ColumnValue target) { - if (this.type != target.type) { - throw new IllegalArgumentException("The type of column to compare must be the same."); - } - - switch (this.type) { - case STRING: - return ((String) value).compareTo(target.asString()); - case INTEGER: - return ((Long) value).compareTo(target.asLong()); - case BINARY: - byte[] b1 = (byte[]) this.value; - byte[] b2 = (byte[]) target.value; - int ret = Bytes.compareByteArrayInLexOrder(b1, 0, b1.length, b2, 0, b2.length); - return ret; - case DOUBLE: - return ((Double) value).compareTo(target.asDouble()); - case BOOLEAN: - return ((Boolean) value).compareTo(target.asBoolean()); - default: - throw new IllegalArgumentException("Unknown type: " + this.type); - } - } - - @Override - public String jsonize() { - StringBuilder sb = new StringBuilder(); - jsonize(sb, "\n "); - return sb.toString(); - } - - @Override - public void jsonize(StringBuilder sb, String newline) { - sb.append("{\"Type\": \""); - sb.append(type.toString()); - sb.append("\", \"Value\": "); - - switch(type) { - case INTEGER: - sb.append(asLong()); - break; - case BINARY: - sb.append("\""); - sb.append(Base64.toBase64String(asBinary())); - sb.append("\""); - break; - case DOUBLE: - sb.append(asDouble()); - break; - case BOOLEAN: - sb.append(asBoolean() ? "true" : "false"); - break; - case STRING: - sb.append("\""); - sb.append(asString()); - sb.append("\""); - break; - default: - throw new IllegalArgumentException("Unknown type: " + type); - } - - sb.append("}"); - } -} - +package com.alicloud.openservices.tablestore.model; + +import java.io.IOException; +import java.util.Arrays; + +import com.alicloud.openservices.tablestore.core.utils.Bytes; +import com.alicloud.openservices.tablestore.core.utils.Base64; +import com.alicloud.openservices.tablestore.core.utils.CalculateHelper; +import com.alicloud.openservices.tablestore.core.utils.Jsonizable; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.alicloud.openservices.tablestore.core.protocol.PlainBufferCrc8; + +import static com.alicloud.openservices.tablestore.core.protocol.PlainBufferConsts.*; + +/** + * 表示属性列的值。 + */ +public class ColumnValue implements Comparable, Jsonizable, Measurable { + + /** + * 只供内部使用,请勿使用。 + */ + public static ColumnValue INTERNAL_NULL_VALUE = new ColumnValue(null, ColumnType.STRING); + + private Object value; + private ColumnType type; + private int dataSize = -1; + + public Object getValue() { + return value; + } + + public ColumnValue(Object value, ColumnType type) { + this.value = value; + this.type = type; + } + + private int calculateDataSize() { + int dataSize = 0; + switch (this.type) { + case INTEGER: + dataSize = 8; + break; + case STRING: + if (value == null) { + dataSize = 0; + } else { + dataSize = CalculateHelper.calcStringSizeInBytes(this.asString()); + } + break; + case BINARY: + dataSize = this.asBinary().length; + break; + case DOUBLE: + dataSize = 8; + break; + case BOOLEAN: + dataSize = 1; + break; + default: + throw new IllegalStateException("Bug: not support the type : " + type); + } + return dataSize; + } + + /** + * 获取主键列值的大小,各类型大小计算公式为: + * - {@link ColumnType#INTEGER}: 恒定大小为8个字节 + * - {@link ColumnType#DOUBLE}: 恒定大小为8个字节 + * - {@link ColumnType#BOOLEAN}: 恒定大小为1个字节 + * - {@link ColumnType#BINARY}: 大小为字节数 + * - {@link ColumnType#STRING}: 大小为按UTF-8编码后的字节数 + * + * @return 值的大小 + */ + @Override + public int getDataSize() { + if (dataSize == -1) { + dataSize = calculateDataSize(); + } + return this.dataSize; + } + + /** + * 获取属性列的类型。 + * + * @return 属性列的类型。 + */ + public ColumnType getType() { + return type; + } + + /** + * 构造一个类型为{@link ColumnType#STRING}的属性列。 + *

注意:值不能为null pointer。

+ * + * @param value 字符串类型的值。 + * @return 生成的实例 + */ + public static ColumnValue fromString(String value) { + Preconditions.checkNotNull(value, "The value of column should not be null."); + return new ColumnValue(value, ColumnType.STRING); + } + + /** + * 构造一个类型为{@link ColumnType#INTEGER}的属性列。 + * + * @param value 长整型的值。 + * @return 生成的实例 + */ + public static ColumnValue fromLong(long value) { + return new ColumnValue(value, ColumnType.INTEGER); + } + + /** + * 构造一个类型为{@link ColumnType#BINARY}的属性列。 + *

注意:值不能为null pointer。

+ * + * @param value 二进制字符串类型的值。 + * @return 生成的实例 + */ + public static ColumnValue fromBinary(byte[] value) { + Preconditions.checkNotNull(value, "The value of column should not be null."); + return new ColumnValue(value, ColumnType.BINARY); + } + + /** + * 构造一个类型为{@link ColumnType#DOUBLE}的属性列。 + * + * @param value double类型的值。 + * @return 生成的实例 + */ + public static ColumnValue fromDouble(double value) { + return new ColumnValue(value, ColumnType.DOUBLE); + } + + /** + * 构造一个类型为{@link ColumnType#BOOLEAN}的属性列。 + * + * @param value 布尔类型的值。 + * @return 生成的实例 + */ + public static ColumnValue fromBoolean(boolean value) { + return new ColumnValue(value, ColumnType.BOOLEAN); + } + + /** + * 获取属性列的字符串类型的值。 + *

当前仅当数据类型为{@link ColumnType#STRING}才能获取到值。

+ * + * @return 字符串类型的值 + */ + public String asString() { + if (this.type != ColumnType.STRING) { + throw new IllegalStateException("The type of column is not STRING."); + } + + return (String) value; + } + + public byte[] asStringInBytes() { + return Bytes.toBytes(asString()); + } + + /** + * 获取属性列的长整型类型的值。 + *

当前仅当数据类型为{@link ColumnType#INTEGER}才能获取到值。

+ * + * @return 长整型值 + */ + public long asLong() { + if (this.type != ColumnType.INTEGER) { + throw new IllegalStateException("The type of column is not INTEGER."); + } + + return (Long) value; + } + + /** + * 获取属性列的二进制字符串类型的值。 + *

当前仅当数据类型为{@link ColumnType#BINARY}才能获取到值。

+ * + * @return 二进制字符串类型的值 + */ + public byte[] asBinary() { + if (this.type != ColumnType.BINARY) { + throw new IllegalStateException("The type of column is not BINARY."); + } + return (byte[]) value; + } + + /** + * 获取属性列的DOUBLE类型的值。 + *

当前仅当数据类型为{@link ColumnType#DOUBLE}才能获取到值。

+ * + * @return Double类型的值 + */ + public double asDouble() { + if (this.type != ColumnType.DOUBLE) { + throw new IllegalStateException("The type of column is not DOUBLE."); + } + return (Double) value; + } + + /** + * 获取属性列的布尔类型的值。 + *

当前仅当数据类型为{@link ColumnType#BOOLEAN}才能获取到值。

+ * + * @return 布尔类型的值 + */ + public boolean asBoolean() { + if (this.type != ColumnType.BOOLEAN) { + throw new IllegalStateException("The type of column is not BOOLEAN."); + } + return (Boolean) value; + } + + /** + * 采用crc8算法得到一个checksum,主要用于计算cell的checksum + * @param crc crc初始值 + * @return + */ + public byte getChecksum(byte crc) throws IOException { + switch (getType()) { + case STRING: { + byte[] rawData = asStringInBytes(); + crc = PlainBufferCrc8.crc8(crc, VT_STRING); + crc = PlainBufferCrc8.crc8(crc, rawData.length); + crc = PlainBufferCrc8.crc8(crc, rawData); + break; + } + case INTEGER: { + crc = PlainBufferCrc8.crc8(crc, VT_INTEGER); + crc = PlainBufferCrc8.crc8(crc, asLong()); + break; + } + case BINARY: { + byte[] rawData = asBinary(); + crc = PlainBufferCrc8.crc8(crc, VT_BLOB); + crc = PlainBufferCrc8.crc8(crc, rawData.length); + crc = PlainBufferCrc8.crc8(crc, rawData); + break; + } + case DOUBLE: { + crc = PlainBufferCrc8.crc8(crc, VT_DOUBLE); + crc = PlainBufferCrc8.crc8(crc, Double.doubleToRawLongBits(asDouble())); + break; + } + case BOOLEAN: { + crc = PlainBufferCrc8.crc8(crc, VT_BOOLEAN); + crc = PlainBufferCrc8.crc8(crc, asBoolean() ? (byte) 0x1 : (byte) 0x0); + break; + } + default: + throw new IOException("Bug: unsupported column type: " + getType()); + } + return crc; + } + + @Override + public boolean equals(Object o) { + if (o == null || !(o instanceof ColumnValue)) { + return false; + } + + ColumnValue val = (ColumnValue) o; + if (this.type == val.type) { + if (this.type == ColumnType.BINARY) { + return Bytes.equals((byte[]) value, (byte[]) val.value); + } else { + if (this.value == null) { + return val.value == null; + } else { + return this.value.equals(val.value); + } + } + } else { + return false; + } + } + + @Override + public int hashCode() { + if (this.type == ColumnType.BINARY) { + return Arrays.hashCode(asBinary()) * 31 + this.type.hashCode(); + } else { + return this.value.hashCode() * 31 + this.type.hashCode(); + } + } + + @Override + public String toString() { + if (this.value == null) { + return "null"; + } + if (this.type == ColumnType.BINARY) { + return Arrays.toString(asBinary()); + } else { + return this.value.toString(); + } + } + + /** + * 比较两个属性列的值的大小。 + *

注意:不同类型的属性列无法比较。

+ * + * @param target + * @return 如果大于返回值大于0,等于返回0,小于返回值小于0 + */ + @Override + public int compareTo(ColumnValue target) { + if (this.type != target.type) { + throw new IllegalArgumentException("The type of column to compare must be the same."); + } + + switch (this.type) { + case STRING: + return ((String) value).compareTo(target.asString()); + case INTEGER: + return ((Long) value).compareTo(target.asLong()); + case BINARY: + byte[] b1 = (byte[]) this.value; + byte[] b2 = (byte[]) target.value; + int ret = Bytes.compareByteArrayInLexOrder(b1, 0, b1.length, b2, 0, b2.length); + return ret; + case DOUBLE: + return ((Double) value).compareTo(target.asDouble()); + case BOOLEAN: + return ((Boolean) value).compareTo(target.asBoolean()); + default: + throw new IllegalArgumentException("Unknown type: " + this.type); + } + } + + @Override + public String jsonize() { + StringBuilder sb = new StringBuilder(); + jsonize(sb, "\n "); + return sb.toString(); + } + + @Override + public void jsonize(StringBuilder sb, String newline) { + sb.append("{\"Type\": \""); + sb.append(type.toString()); + sb.append("\", \"Value\": "); + + switch(type) { + case INTEGER: + sb.append(asLong()); + break; + case BINARY: + sb.append("\""); + sb.append(Base64.toBase64String(asBinary())); + sb.append("\""); + break; + case DOUBLE: + sb.append(asDouble()); + break; + case BOOLEAN: + sb.append(asBoolean() ? "true" : "false"); + break; + case STRING: + sb.append("\""); + sb.append(asString()); + sb.append("\""); + break; + default: + throw new IllegalArgumentException("Unknown type: " + type); + } + + sb.append("}"); + } +} + diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/ComputeSplitsBySizeRequest.java b/src/main/java/com/alicloud/openservices/tablestore/model/ComputeSplitsBySizeRequest.java index 6be17db..fc7611c 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/model/ComputeSplitsBySizeRequest.java +++ b/src/main/java/com/alicloud/openservices/tablestore/model/ComputeSplitsBySizeRequest.java @@ -1,5 +1,6 @@ package com.alicloud.openservices.tablestore.model; +import com.alicloud.openservices.tablestore.core.utils.OptionalValue; import com.alicloud.openservices.tablestore.core.utils.Preconditions; public class ComputeSplitsBySizeRequest implements Request { @@ -8,6 +9,7 @@ public class ComputeSplitsBySizeRequest implements Request { private long splitUnitCount = 0l; private long splitUnitSizeInByte = 100 * 1024 * 1024; // default 100M split unit + private OptionalValue splitPointLimit = new OptionalValue("SplitPointLimit"); public ComputeSplitsBySizeRequest() { this(null, 0l); @@ -86,4 +88,36 @@ public void setSplitSizeInByte(long splitUnitCount, long splitUnitSizeInByte) { this.splitUnitCount = splitUnitCount; this.splitUnitSizeInByte = splitUnitSizeInByte; } + + /** + * 设置splitPointLimit + * + * @param splitPointLimit + */ + public void setSplitPointLimit(int splitPointLimit) { + Preconditions.checkArgument(splitPointLimit > 0, "The value of SplitPointLimit must be greater than 0."); + this.splitPointLimit.setValue(splitPointLimit); + } + + /** + * 获取设置过的splitPointLimit。 + * + * @return splitPointLimit + * @throws java.lang.IllegalStateException 若没有配置该参数 + */ + public int getSplitPointLimit() { + if (!this.splitPointLimit.isValueSet()) { + throw new IllegalStateException("The value of SplitPointLimit is not set."); + } + return this.splitPointLimit.getValue(); + } + + /** + * 查询是否设置了splitPointLimit。 + * + * @return 若设置过splitPointLimit,则返回true,否则返回false。 + */ + public boolean hasSetSplitPointLimit() { + return splitPointLimit.isValueSet(); + } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/ComputeSplitsRequest.java b/src/main/java/com/alicloud/openservices/tablestore/model/ComputeSplitsRequest.java new file mode 100644 index 0000000..7c0c350 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/ComputeSplitsRequest.java @@ -0,0 +1,88 @@ +package com.alicloud.openservices.tablestore.model; + + +/** + *

Get the partition information of the data.

+ *

Note: Later versions will incorporate {@link ComputeSplitsBySizeRequest} into this request.

+ */ +public class ComputeSplitsRequest implements Request { + + /** + * the name of your table. + */ + private String tableName; + + /** + *

{@link SplitsOptions} Interface.

+ *

With {@link SearchIndexSplitsOptions}, {@link ComputeSplitsResponse} can return the maximum parallel for scan data of this index.

+ */ + private SplitsOptions splitsOptions; + + public ComputeSplitsRequest() { + } + + public ComputeSplitsRequest(String tableName, SplitsOptions splitsOptions) { + this.tableName = tableName; + this.splitsOptions = splitsOptions; + } + + @Override + public String getOperationName() { + return OperationNames.OP_COMPUTE_SPLITS; + } + + public String getTableName() { + return tableName; + } + + public ComputeSplitsRequest setTableName(String tableName) { + this.tableName = tableName; + return this; + } + + public SearchIndexSplitsOptions getSearchIndexSplitsOptions() { + if (splitsOptions instanceof SearchIndexSplitsOptions) { + return (SearchIndexSplitsOptions)splitsOptions; + } + return null; + } + + public SplitsOptions getSplitsOptions() { + return splitsOptions; + } + + public ComputeSplitsRequest setSplitsOptions(SplitsOptions splitsOptions) { + this.splitsOptions = splitsOptions; + return this; + } + + private ComputeSplitsRequest(Builder builder) { + setTableName(builder.tableName); + setSplitsOptions(builder.splitsOptions); + } + + public static Builder newBuilder() { + return new Builder(); + } + + public static final class Builder { + private String tableName; + private SplitsOptions splitsOptions; + + private Builder() {} + + public Builder tableName(String tableName) { + this.tableName = tableName; + return this; + } + + public Builder splitsOptions(SplitsOptions searchIndexSplitsOptions) { + this.splitsOptions = searchIndexSplitsOptions; + return this; + } + + public ComputeSplitsRequest build() { + return new ComputeSplitsRequest(this); + } + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/ComputeSplitsResponse.java b/src/main/java/com/alicloud/openservices/tablestore/model/ComputeSplitsResponse.java new file mode 100644 index 0000000..39ba376 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/ComputeSplitsResponse.java @@ -0,0 +1,45 @@ +package com.alicloud.openservices.tablestore.model; + +import com.alicloud.openservices.tablestore.model.search.ScanQuery; + +/** + * Get the partition information of the data. + */ +public class ComputeSplitsResponse extends Response{ + + /** + * {@link ScanQuery} establishes a link to the server with this sessionId. + */ + private byte[] sessionId; + + + /** + *

number of data partition. How to use:

+ *

when {@link ScanQuery} obtaining data, call {@link ScanQuery#setMaxParallel(Integer)} to set the maxParallel.

+ */ + private Integer splitsSize; + + + + public ComputeSplitsResponse(Response meta) { + super(meta); + } + + public Integer getSplitsSize() { + return splitsSize; + } + + public ComputeSplitsResponse setSplitsSize(Integer splitsSize) { + this.splitsSize = splitsSize; + return this; + } + + public byte[] getSessionId() { + return sessionId; + } + + public ComputeSplitsResponse setSessionId(byte[] sessionId) { + this.sessionId = sessionId; + return this; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/ConsumedCapacity.java b/src/main/java/com/alicloud/openservices/tablestore/model/ConsumedCapacity.java index 146e5c3..036cc1c 100755 --- a/src/main/java/com/alicloud/openservices/tablestore/model/ConsumedCapacity.java +++ b/src/main/java/com/alicloud/openservices/tablestore/model/ConsumedCapacity.java @@ -4,19 +4,42 @@ import com.alicloud.openservices.tablestore.core.utils.Preconditions; /** - * 读写操作消耗的能力单元。 + * 读写操作消耗的能力单元和数据大小。 *

读操作会消耗读能力单元,例如GetRow、GetRange和BatchGetRow等。

*

写操作会消耗写能力单元,例如PutRow、UpdateRow、DeleteRow和BatchWriteRow等。

*/ public class ConsumedCapacity implements Jsonizable { - private CapacityUnit capacityUnit; + private CapacityUnit capacityUnit = null; + private CapacityDataSize capacityDataSize = null; public ConsumedCapacity(CapacityUnit capacityUnit) { Preconditions.checkNotNull(capacityUnit); this.capacityUnit = capacityUnit; } + public ConsumedCapacity(CapacityDataSize capacityDataSize) { + Preconditions.checkNotNull(capacityDataSize); + this.capacityDataSize = capacityDataSize; + } + + public ConsumedCapacity(CapacityUnit capacityUnit, CapacityDataSize capacityDataSize) { + Preconditions.checkNotNull(capacityUnit); + this.capacityUnit = capacityUnit; + + Preconditions.checkNotNull(capacityDataSize); + this.capacityDataSize = capacityDataSize; + } + + public void setCapacityUnit(CapacityUnit capacityUnit){ + Preconditions.checkNotNull(capacityUnit); + this.capacityUnit = capacityUnit; + } + + public void setCapacityDataSize(CapacityDataSize capacityDataSize){ + Preconditions.checkNotNull(capacityDataSize); + this.capacityDataSize = capacityDataSize; + } /** * 返回消耗的能力单元的值。 * @@ -26,6 +49,15 @@ public CapacityUnit getCapacityUnit() { return capacityUnit; } + /** + * 返回消耗的数据大小的值。 + * + * @return 能力单元 + */ + public CapacityDataSize getCapacityDataSize() { + return capacityDataSize; + } + @Override public String jsonize() { return capacityUnit.jsonize(); diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/CreateIndexRequest.java b/src/main/java/com/alicloud/openservices/tablestore/model/CreateIndexRequest.java index 017f28d..383db4b 100755 --- a/src/main/java/com/alicloud/openservices/tablestore/model/CreateIndexRequest.java +++ b/src/main/java/com/alicloud/openservices/tablestore/model/CreateIndexRequest.java @@ -39,6 +39,7 @@ public class CreateIndexRequest implements Request { public CreateIndexRequest(String mainTableName, IndexMeta indexMeta, boolean includeBaseData) { setMainTableName(mainTableName); setIndexMeta(indexMeta); + setIncludeBaseData(includeBaseData); } diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/CreateTableRequest.java b/src/main/java/com/alicloud/openservices/tablestore/model/CreateTableRequest.java index d374d95..2f09ddb 100755 --- a/src/main/java/com/alicloud/openservices/tablestore/model/CreateTableRequest.java +++ b/src/main/java/com/alicloud/openservices/tablestore/model/CreateTableRequest.java @@ -39,6 +39,16 @@ public class CreateTableRequest implements Request { */ private OptionalValue streamSpecification = new OptionalValue("StreamSpecification"); + /** + * 表的服务器端加密配置。 + */ + private OptionalValue sseSpecification = new OptionalValue("SSESpecification"); + + /** + * 是否启用本地事务 + */ + private OptionalValue enableLocalTxn = new OptionalValue("EnableLocalTxn"); + /** * 初始化CreateTableRequest实例。 *

表的预留吞吐量和表的配置都会采用默认值,若有需求需要定制更改,可以调用相应的设置函数。 @@ -105,6 +115,8 @@ public TableMeta getTableMeta() { */ public void setTableMeta(TableMeta tableMeta) { Preconditions.checkNotNull(tableMeta, "TableMeta should not be null."); + Preconditions.checkArgument(tableMeta.getPrimaryKeyList().size() != 0, + "TableMeta should set at least one primary key."); this.tableMeta = tableMeta; } @@ -170,6 +182,25 @@ public void setStreamSpecification(StreamSpecification streamSpecification) { this.streamSpecification.setValue(streamSpecification); } + /** + * 获取服务器端加密的配置参数 + * + * @return 服务器端加密的配置参数。若返回null,则代表未设置该配置。 + */ + public SSESpecification getSseSpecification() { + return sseSpecification.getValue(); + } + + /** + * 设置服务器端加密的配置参数 + * + * @param sseSpecification + */ + public void setSseSpecification(SSESpecification sseSpecification) { + Preconditions.checkArgument(sseSpecification != null, "The server-side-encryption specification should not be null"); + this.sseSpecification.setValue(sseSpecification); + } + /** * 添加索引表 * @@ -198,4 +229,34 @@ public void addIndex(IndexMeta indexMeta) { public List getIndexMetaList() { return Collections.unmodifiableList(indexMeta); } + + /** + * 是否显式设置了本地事务开关 + * + * @return 本地事务开关是否被设置。 + */ + public boolean hasLocalTxnSet() { + return enableLocalTxn.isValueSet(); + } + + /** + * 设置本地事务开关 + * + * @param enableLocalTxn 本地事务开关 + */ + public void setLocalTxnEnabled(boolean enableLocalTxn) { + this.enableLocalTxn.setValue(enableLocalTxn); + } + + /** + * 获取本地事务开关,如果未设置则抛出异常 + * + * @return 本地事务开关设置。 + */ + public boolean isLocalTxnEnabled() { + if (!enableLocalTxn.isValueSet()) { + throw new IllegalStateException("The value of enableLocalTxn is not set."); + } + return enableLocalTxn.getValue(); + } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/CreateTableRequestEx.java b/src/main/java/com/alicloud/openservices/tablestore/model/CreateTableRequestEx.java new file mode 100755 index 0000000..167b33b --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/CreateTableRequestEx.java @@ -0,0 +1,59 @@ +package com.alicloud.openservices.tablestore.model; + +import com.alicloud.openservices.tablestore.core.utils.Preconditions; + +import java.util.ArrayList; +import java.util.List; + +/** + * CreateTableRequestEx继承了CreateTableRequest,并额外提供了表预分区能力。 + */ +public class CreateTableRequestEx extends CreateTableRequest { + + /** + * 表的分区信息。 + */ + private List splitPoints = new ArrayList(); + + public CreateTableRequestEx(TableMeta tableMeta, TableOptions tableOptions) { + super(tableMeta, tableOptions); + } + + public CreateTableRequestEx(TableMeta tableMeta, TableOptions tableOptions, ReservedThroughput reservedThroughput) { + super(tableMeta, tableOptions, reservedThroughput); + } + + public CreateTableRequestEx(TableMeta tableMeta, TableOptions tableOptions, List indexMeta) { + super(tableMeta, tableOptions, indexMeta); + } + + public CreateTableRequestEx(TableMeta tableMeta, TableOptions tableOptions, ReservedThroughput reservedThroughput, List indexMeta) { + super(tableMeta, tableOptions, reservedThroughput, indexMeta); + } + + public List getSplitPoints() { + return splitPoints; + } + + public void setSplitPoints(List splitPoints) { + Preconditions.checkArgument(!(splitPoints == null || splitPoints.isEmpty()), + "The split-point list cannot be empty."); + + PrimaryKeyType pkType = getTableMeta().getPrimaryKeyList().get(0).getType(); + PrimaryKeyValue lastPoint = null; + + for (PrimaryKeyValue currentPoint : splitPoints) { + //INF_MIN和INF_MAX的type为null + Preconditions.checkArgument(currentPoint.getType() != null, + "The split-point can't be set as an INF value."); + Preconditions.checkArgument(currentPoint.getType() == pkType, + "The split-point's type doesn't match the partition key's type."); + if (lastPoint != null) { + Preconditions.checkArgument(lastPoint.compareTo(currentPoint) < 0, + "The split-point list isn't strictly increasing."); + } + lastPoint = currentPoint; + this.splitPoints = splitPoints; + } + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/CustomRetryStrategy.java b/src/main/java/com/alicloud/openservices/tablestore/model/CustomRetryStrategy.java new file mode 100644 index 0000000..25000f8 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/CustomRetryStrategy.java @@ -0,0 +1,190 @@ +package com.alicloud.openservices.tablestore.model; + +import java.util.Random; +import java.util.concurrent.TimeUnit; + +import com.alicloud.openservices.tablestore.ClientException; +import com.alicloud.openservices.tablestore.TableStoreException; +import com.alicloud.openservices.tablestore.PartialResultFailedException; +import com.alicloud.openservices.tablestore.core.ErrorCode; + +import static com.alicloud.openservices.tablestore.model.OperationNames.*; + +/** + * TableStore SDK支持自定义重试逻辑{@link RetryStrategy}, 重试逻辑用于判断在发生异常时是否需要重试, 并给出本次重试的时间间隔. + * {@link DefaultRetryStrategy}为TableStore SDK默认的重试逻辑. + */ +public class CustomRetryStrategy implements RetryStrategy { + private final int MAX_BASE = 2000; // in msec + private final Random rnd = new Random(); + private volatile int base = 100; // in msec + private volatile int retries = 0; + private volatile long timeout = 0; // in msec + private volatile long deadline = 0; + private final boolean retryUnIdempotentWriteOperation; + + public CustomRetryStrategy() { + this(10, TimeUnit.SECONDS); + } + + public CustomRetryStrategy(long timeout, TimeUnit unit) { + this(timeout, unit, false); + } + + /** + * @param timeout 重试超时时间 + * @param unit 超时时间单位 + * @param retryUnIdempotentWriteOperation 是否在可能非幂等的情况下重试写操作 + */ + public CustomRetryStrategy(long timeout, TimeUnit unit, boolean retryUnIdempotentWriteOperation) { + this.timeout = unit.toMillis(timeout); + this.deadline = System.currentTimeMillis() + this.timeout; + this.retryUnIdempotentWriteOperation = retryUnIdempotentWriteOperation; + } + + @Override + public RetryStrategy clone() { + return new CustomRetryStrategy(this.timeout, TimeUnit.MILLISECONDS); + } + + @Override + public int getRetries() { + return retries; + } + + private boolean isIdempotent(String action) { + /** + * all read operations are idempotent + */ + if (action.equals(OP_BATCH_GET_ROW) || action.equals(OP_DESCRIBE_TABLE) || + action.equals(OP_GET_RANGE) || action.equals(OP_GET_ROW) || + action.equals(OP_LIST_TABLE) || action.equals(OP_LIST_TUNNEL) || + action.equals(OP_DESCRIBE_TUNNEL) || action.equals(OP_READRECORDS)) { + return true; + } else { + return false; + } + } + + /** + * 对于以下错误类型,可以明确操作并未实际执行(不影响幂等性),所以不论是读操作或者写操作,都是明确可以重试的。 + * @param errorCode + * @param errorMessage + * @return + */ + private boolean retryNotMatterActions(String errorCode, String errorMessage) { + if (errorCode.equals(ErrorCode.ROW_OPERATION_CONFLICT) || errorCode.equals(ErrorCode.NOT_ENOUGH_CAPACITY_UNIT) + || errorCode.equals(ErrorCode.TABLE_NOT_READY) || errorCode.equals(ErrorCode.PARTITION_UNAVAILABLE) + || errorCode.equals(ErrorCode.SERVER_BUSY) + || (errorCode.equals(ErrorCode.QUOTA_EXHAUSTED) && errorMessage.equals("Too frequent table operations."))) { + return true; + } else { + return false; + } + } + + private boolean shouldRetryWithOTSException(String action, boolean isIdempotent, String errorCode, + String errorMessage, int httpStatus) { + /** + * 这些错误发生时,不论是读或写操作,都进行重试。 + */ + if (retryNotMatterActions(errorCode, errorMessage)) { + return true; + } + + // 判断是否为服务层错误。 + boolean serverError = (httpStatus >= 500 && httpStatus <= 599) + || errorCode.equals(ErrorCode.STORAGE_TIMEOUT) + || errorCode.equals(ErrorCode.INTERNAL_SERVER_ERROR) + || errorCode.equals(ErrorCode.SERVER_UNAVAILABLE) + || errorCode.equals(ErrorCode.TUNNEL_SERVER_UNAVAILABLE); + + // 对于服务层错误,且操作为幂等操作,进行重试。 + if (serverError && isIdempotent) { + return true; + } + + // 对于服务层错误,且操作为写操作(非幂等),由retryUnIdempotentWriteOperation这个开关来判断是否重试。 + if (serverError && retryUnIdempotentWriteOperation && (OP_UPDATE_ROW.equals(action) + || OP_PUT_ROW.equals(action) + || OP_BATCH_WRITE_ROW.equals(action))) { + return true; + } + + // 非以上情况,都不重试。 + return false; + } + + /** + * 幂等操作: + * 本策略中,认为所有读相关的操作是幂等的,而所有写相关的操作会被认为是非幂等的。 + * + * 重试策略,规则为: + * 1. 若异常为TableStoreException,则明确收到了服务端返回的异常,通过shouldRetryWithOTSException判断是否可重试。 + * 特别的是,对于batch操作部分行失败的情况,仅当所有失败行都可重试时,才会进行重试。 + * 2. 若异常为ClientException,一般为网络错误等,没有收到服务端响应,此时只重试幂等操作。 + * + * @param action 操作名,比如"ListTable"、"GetRow"、"PutRow"等 + * @param ex 上次访问失败的错误信息、为ClientException或OTSException + * @return + */ + public boolean shouldRetry(String action, Exception ex) { + boolean isIdempotent = isIdempotent(action); + if (ex instanceof TableStoreException) { + if (ex instanceof PartialResultFailedException) { + PartialResultFailedException prfe = (PartialResultFailedException)ex; + for (TableStoreException otsException : prfe.getErrors()) { + if (!shouldRetryWithOTSException(action, isIdempotent, otsException.getErrorCode(), + otsException.getMessage(), prfe.getHttpStatus())) { + return false; + } + } + return true; + } else { + TableStoreException otsException = (TableStoreException)ex; + return shouldRetryWithOTSException(action, isIdempotent, otsException.getErrorCode(), + otsException.getMessage(), otsException.getHttpStatus()); + } + } else if (ex instanceof ClientException) { + return isIdempotent; + } else { + return false; + } + } + + /** + * 若返回0,代表不可重试,否则返回本次重试的间隔时间。 + * + * 重试间隔的基础值(base),会随着重试次数倍增,最大不超过MAX_BASE。 + * 为了请求的平滑性考虑,实际的重试间隔会在base基础上做一些随机的浮动。 + * + * @param action 操作名,比如"ListTable"、"GetRow"、"PutRow"等 + * @param ex 上次访问失败的错误信息、为ClientException或TableStoreException + * @return + */ + @Override + public long nextPause(String action, Exception ex) { + if (!shouldRetry(action, ex)) { + return 0; + } + + if (base <= 0) { + return 0; + } + + long now = System.currentTimeMillis(); + int expire = (int)(deadline - now); + if (expire <= 0) { + return 0; + } + + // randomly exponential backoff, in order to make requests sparse. + long delay = Math.min(base / 2 + rnd.nextInt(base), expire); + ++retries; + base *= 2; + if (base > MAX_BASE) { + base = MAX_BASE; + } + return delay; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/DataBlockType.java b/src/main/java/com/alicloud/openservices/tablestore/model/DataBlockType.java new file mode 100644 index 0000000..11698bf --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/DataBlockType.java @@ -0,0 +1,21 @@ +package com.alicloud.openservices.tablestore.model; + +import com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi; + +import java.io.IOException; + +public enum DataBlockType { + DBT_PLAIN_BUFFER, + DBT_SIMPLE_ROW_MATRIX; + + public static DataBlockType fromProtocolType(OtsInternalApi.DataBlockType type) throws IOException { + switch (type) { + case DBT_PLAIN_BUFFER: + return DBT_PLAIN_BUFFER; + case DBT_SIMPLE_ROW_MATRIX: + return DBT_SIMPLE_ROW_MATRIX; + default: + throw new IOException("Unknown dataBlockType:" + type); + } + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/DefaultRetryStrategy.java b/src/main/java/com/alicloud/openservices/tablestore/model/DefaultRetryStrategy.java index 76959a4..3a5325d 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/model/DefaultRetryStrategy.java +++ b/src/main/java/com/alicloud/openservices/tablestore/model/DefaultRetryStrategy.java @@ -41,7 +41,7 @@ public int getRetries() { return retries; } - private boolean isIdempotent(String action) { + protected boolean isIdempotent(String action) { /** * all read operations are idempotent */ @@ -55,7 +55,7 @@ private boolean isIdempotent(String action) { } } - private boolean retryNotMatterActions(String errorCode, String errorMessage) { + protected boolean retryNotMatterActions(String errorCode, String errorMessage) { if (errorCode.equals(ErrorCode.ROW_OPERATION_CONFLICT) || errorCode.equals(ErrorCode.NOT_ENOUGH_CAPACITY_UNIT) || errorCode.equals(ErrorCode.TABLE_NOT_READY) || errorCode.equals(ErrorCode.PARTITION_UNAVAILABLE) || errorCode.equals(ErrorCode.SERVER_BUSY) @@ -66,7 +66,7 @@ private boolean retryNotMatterActions(String errorCode, String errorMessage) { } } - private boolean shouldRetryWithOTSException(String action, boolean isIdempotent, String errorCode, + protected boolean shouldRetryWithOTSException(String action, boolean isIdempotent, String errorCode, String errorMessage, int httpStatus) { if (retryNotMatterActions(errorCode, errorMessage)) { return true; diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/DeleteDefinedColumnRequest.java b/src/main/java/com/alicloud/openservices/tablestore/model/DeleteDefinedColumnRequest.java new file mode 100644 index 0000000..8d5e11d --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/DeleteDefinedColumnRequest.java @@ -0,0 +1,60 @@ +package com.alicloud.openservices.tablestore.model; + +import com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi; +import com.alicloud.openservices.tablestore.core.utils.OptionalValue; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +/** + * DeleteDefinedColumn包含为一张表删除预定义列所必需的一些参数,包括表的名字,要删除的预定义列的名字 + */ +public class DeleteDefinedColumnRequest implements Request { + private String tableName; + private List definedColumns = new ArrayList(); + + /** + * 设置表的名称。 + * + * @param tableName 表的名称。 + */ + public void setTableName(String tableName) { + Preconditions.checkArgument(tableName != null && !tableName.isEmpty(), "The name of table should not be null or empty."); + + this.tableName = tableName; + } + + /** + * 获取表名称 + * @return 表的名称 + */ + public String getTableName() { + return tableName; + } + + /** + * 添加一个预定义列 + * @param name 预定义列的名称。 + */ + public void addDefinedColumn(String name) { + Preconditions.checkArgument(name != null && !name.isEmpty(), "The name of defined column should not be null or empty."); + + this.definedColumns.add(name); + } + + /** + * 获取预定义列列表 + * @return 预定义列列表 + */ + public List getDefinedColumn() { + return Collections.unmodifiableList(definedColumns); + } + + @Override + public String getOperationName() { + return OperationNames.OP_DELETE_DEFINED_COLUMN; + } +} + diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/DeleteDefinedColumnResponse.java b/src/main/java/com/alicloud/openservices/tablestore/model/DeleteDefinedColumnResponse.java new file mode 100644 index 0000000..d6d3f9f --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/DeleteDefinedColumnResponse.java @@ -0,0 +1,12 @@ +package com.alicloud.openservices.tablestore.model; + +/** + * DeleteDefinedColumn操作的返回结果。 + */ +public class DeleteDefinedColumnResponse extends Response { + + public DeleteDefinedColumnResponse(Response meta) { + super(meta); + } +} + diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/DescribeTableResponse.java b/src/main/java/com/alicloud/openservices/tablestore/model/DescribeTableResponse.java index ec34939..02d406b 100755 --- a/src/main/java/com/alicloud/openservices/tablestore/model/DescribeTableResponse.java +++ b/src/main/java/com/alicloud/openservices/tablestore/model/DescribeTableResponse.java @@ -31,11 +31,21 @@ public class DescribeTableResponse extends Response implements Jsonizable { */ private StreamDetails streamDetails; + /** + * 表的服务器端加密信息。 + */ + private SSEDetails sseDetails; + /** * 索引表信息 */ private List indexMeta = new ArrayList(); + /** + * 建表时间,单位微秒 + */ + private long creationTime; + /* * 内部接口。请勿使用。 */ @@ -110,6 +120,19 @@ public void setStreamDetails(StreamDetails streamDetails) { this.streamDetails = streamDetails; } + /** + * 获取表的服务器端加密信息。 + * + * @return 表的服务器端加密信息。 + */ + public SSEDetails getSseDetails() { + return sseDetails; + } + + public void setSseDetails(SSEDetails sseDetails) { + this.sseDetails = sseDetails; + } + /** * 获取索引表的信息 * @@ -127,6 +150,19 @@ public void setTableOptions(TableOptions tableOptions) { this.tableOptions = tableOptions; } + /** + * 获取建表时间,单位微秒 + * + * @return long 建表时间 + * */ + public long getCreationTime() { + return creationTime; + } + + public void setCreationTime(long creationTime) { + this.creationTime = creationTime; + } + @Override public String jsonize() { StringBuilder sb = new StringBuilder(); @@ -138,6 +174,10 @@ public String jsonize() { public void jsonize(StringBuilder sb, String newline) { sb.append('{'); sb.append(newline); + sb.append("\"CreationTime\": "); + sb.append(creationTime); + sb.append(","); + sb.append(newline); sb.append("\"TableMeta\": "); tableMeta.jsonize(sb, newline + " "); sb.append(","); diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/GetRangeResponse.java b/src/main/java/com/alicloud/openservices/tablestore/model/GetRangeResponse.java index bb949bc..96d769b 100755 --- a/src/main/java/com/alicloud/openservices/tablestore/model/GetRangeResponse.java +++ b/src/main/java/com/alicloud/openservices/tablestore/model/GetRangeResponse.java @@ -22,6 +22,8 @@ public class GetRangeResponse extends Response { private byte[] nextToken; + private long bodyBytes; + /** * internal use */ @@ -84,4 +86,12 @@ public void setNextToken(byte[] nextToken) { public boolean hasNextToken() { return (nextToken != null) && (nextToken.length > 0); } + + public long getBodyBytes() { + return bodyBytes; + } + + public void setBodyBytes(long bodyBytes) { + this.bodyBytes = bodyBytes; + } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/GetShardIteratorRequest.java b/src/main/java/com/alicloud/openservices/tablestore/model/GetShardIteratorRequest.java index 32f9699..9a2a7b3 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/model/GetShardIteratorRequest.java +++ b/src/main/java/com/alicloud/openservices/tablestore/model/GetShardIteratorRequest.java @@ -1,6 +1,6 @@ package com.alicloud.openservices.tablestore.model; - +import com.alicloud.openservices.tablestore.core.utils.OptionalValue; import com.alicloud.openservices.tablestore.core.utils.Preconditions; public class GetShardIteratorRequest implements Request { @@ -15,6 +15,16 @@ public class GetShardIteratorRequest implements Request { */ private String shardId; + /** + * 根据时间获取ShardIterator, 时间单位us。 + */ + private OptionalValue timestamp = new OptionalValue("Timestamp"); + + /** + * 用于分页获取 + */ + private OptionalValue token = new OptionalValue("Token"); + public GetShardIteratorRequest(String streamId, String shardId) { setStreamId(streamId); setShardId(shardId); @@ -58,4 +68,34 @@ public void setShardId(String shardId) { public String getOperationName() { return OperationNames.OP_GET_SHARD_ITERATOR; } -} + + public boolean hasTimestamp() { + return timestamp.isValueSet(); + } + + public long getTimestamp() { + if (!timestamp.isValueSet()) { + throw new IllegalStateException("The value of Timestamp is not set."); + } + return timestamp.getValue(); + } + + public void setTimestamp(long timestamp) { + this.timestamp.setValue(timestamp); + } + + public boolean hasToken() { + return token.isValueSet(); + } + + public String getToken() { + if (!token.isValueSet()) { + throw new IllegalStateException("The value of Token is not set."); + } + return token.getValue(); + } + + public void setToken(String token) { + this.token.setValue(token); + } +} \ No newline at end of file diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/GetShardIteratorResponse.java b/src/main/java/com/alicloud/openservices/tablestore/model/GetShardIteratorResponse.java index ee30b52..70007b6 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/model/GetShardIteratorResponse.java +++ b/src/main/java/com/alicloud/openservices/tablestore/model/GetShardIteratorResponse.java @@ -8,6 +8,8 @@ public class GetShardIteratorResponse extends Response { */ private String shardIterator; + private String nextToken; + public GetShardIteratorResponse() { } @@ -27,4 +29,12 @@ public String getShardIterator() { public void setShardIterator(String shardIterator) { this.shardIterator = shardIterator; } -} + + public String getNextToken() { + return nextToken; + } + + public void setNextToken(String nextToken) { + this.nextToken = nextToken; + } +} \ No newline at end of file diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/IndexType.java b/src/main/java/com/alicloud/openservices/tablestore/model/IndexType.java index 5e46bf0..8d26a1d 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/model/IndexType.java +++ b/src/main/java/com/alicloud/openservices/tablestore/model/IndexType.java @@ -7,5 +7,6 @@ public enum IndexType { /** * 全局索引。 */ - IT_GLOBAL_INDEX; + IT_GLOBAL_INDEX, + IT_LOCAL_INDEX } diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/IndexUpdateMode.java b/src/main/java/com/alicloud/openservices/tablestore/model/IndexUpdateMode.java index f971750..78c60b8 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/model/IndexUpdateMode.java +++ b/src/main/java/com/alicloud/openservices/tablestore/model/IndexUpdateMode.java @@ -7,5 +7,9 @@ public enum IndexUpdateMode { /** * 异步更新索引。 */ - IUM_ASYNC_INDEX; + IUM_ASYNC_INDEX, + /** + * 同步更新索引 + */ + IUM_SYNC_INDEX } diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/OperationNames.java b/src/main/java/com/alicloud/openservices/tablestore/model/OperationNames.java index b79ae19..9919c6a 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/model/OperationNames.java +++ b/src/main/java/com/alicloud/openservices/tablestore/model/OperationNames.java @@ -1,77 +1,123 @@ -package com.alicloud.openservices.tablestore.model; - -public class OperationNames { - public static final String OP_CREATE_TABLE = "CreateTable"; - - public static final String OP_LIST_TABLE = "ListTable"; - - public static final String OP_DELETE_TABLE = "DeleteTable"; - - public static final String OP_DESCRIBE_TABLE = "DescribeTable"; - - public static final String OP_UPDATE_TABLE = "UpdateTable"; - - public static final String OP_GET_ROW = "GetRow"; - - public static final String OP_PUT_ROW = "PutRow"; - - public static final String OP_UPDATE_ROW = "UpdateRow"; - - public static final String OP_DELETE_ROW = "DeleteRow"; - - public static final String OP_BATCH_GET_ROW = "BatchGetRow"; - - public static final String OP_BATCH_WRITE_ROW = "BatchWriteRow"; - - public static final String OP_GET_RANGE = "GetRange"; - - public static final String OP_LIST_STREAM = "ListStream"; - - public static final String OP_DESCRIBE_STREAM = "DescribeStream"; - - public static final String OP_GET_SHARD_ITERATOR = "GetShardIterator"; - - public static final String OP_GET_STREAM_RECORD = "GetStreamRecord"; - - public static final String OP_COMPUTE_SPLITS_BY_SIZE = "ComputeSplitPointsBySize"; - - public static final String OP_START_LOCAL_TRANSACTION = "StartLocalTransaction"; - - public static final String OP_COMMIT_TRANSACTION = "CommitTransaction"; - - public static final String OP_ABORT_TRANSACTION = "AbortTransaction"; - - public static final String OP_CREATE_INDEX = "CreateIndex"; - - public static final String OP_DELETE_INDEX = "DropIndex"; - - public static final String OP_CREATE_SEARCH_INDEX = "CreateSearchIndex"; - - public static final String OP_DELETE_SEARCH_INDEX = "DeleteSearchIndex"; - - public static final String OP_LIST_SEARCH_INDEX = "ListSearchIndex"; - - public static final String OP_DESCRIBE_SEARCH_INDEX = "DescribeSearchIndex"; - - public static final String OP_SEARCH = "Search"; - - public static final String OP_CREATE_TUNNEL = "tunnel/create"; - - public static final String OP_DELETE_TUNNEL = "tunnel/delete"; - - public static final String OP_LIST_TUNNEL = "tunnel/list"; - - public static final String OP_DESCRIBE_TUNNEL = "tunnel/describe"; - - public static final String OP_CONNECT_TUNNEL = "tunnel/connect"; - - public static final String OP_HEARTBEAT = "tunnel/heartbeat"; - - public static final String OP_SHUTDOWN_TUNNEL = "tunnel/shutdown"; - - public static final String OP_GETCHECKPOINT = "tunnel/getcheckpoint"; - - public static final String OP_READRECORDS = "tunnel/readrecords"; - - public static final String OP_CHECKPOINT = "tunnel/checkpoint"; -} +package com.alicloud.openservices.tablestore.model; + +public class OperationNames { + public static final String OP_CREATE_TABLE = "CreateTable"; + + public static final String OP_LIST_TABLE = "ListTable"; + + public static final String OP_DELETE_TABLE = "DeleteTable"; + + public static final String OP_DESCRIBE_TABLE = "DescribeTable"; + + public static final String OP_UPDATE_TABLE = "UpdateTable"; + + public static final String OP_GET_ROW = "GetRow"; + + public static final String OP_PUT_ROW = "PutRow"; + + public static final String OP_UPDATE_ROW = "UpdateRow"; + + public static final String OP_DELETE_ROW = "DeleteRow"; + + public static final String OP_BATCH_GET_ROW = "BatchGetRow"; + + public static final String OP_BATCH_WRITE_ROW = "BatchWriteRow"; + + public static final String OP_BULK_IMPORT = "BulkImport"; + + public static final String OP_GET_RANGE = "GetRange"; + + public static final String OP_BULK_EXPORT = "BulkExport"; + + public static final String OP_LIST_STREAM = "ListStream"; + + public static final String OP_DESCRIBE_STREAM = "DescribeStream"; + + public static final String OP_GET_SHARD_ITERATOR = "GetShardIterator"; + + public static final String OP_GET_STREAM_RECORD = "GetStreamRecord"; + + public static final String OP_COMPUTE_SPLITS_BY_SIZE = "ComputeSplitPointsBySize"; + + public static final String OP_CREATE_DELIVERY_TASK = "CreateDeliveryTask"; + + public static final String OP_DELETE_DELIVERY_TASK = "DeleteDeliveryTask"; + + public static final String OP_UPDATE_DELIVERY_TASK = "UpdateDeliveryTask"; + + public static final String OP_DESCRIBE_DELIVERY_TASK = "DescribeDeliveryTask"; + + public static final String OP_LIST_DELIVERY_TASK = "ListDeliveryTask"; + + public static final String OP_START_LOCAL_TRANSACTION = "StartLocalTransaction"; + + public static final String OP_COMMIT_TRANSACTION = "CommitTransaction"; + + public static final String OP_ABORT_TRANSACTION = "AbortTransaction"; + + public static final String OP_CREATE_INDEX = "CreateIndex"; + + public static final String OP_DELETE_INDEX = "DropIndex"; + + public static final String OP_ADD_DEFINED_COLUMN = "AddDefinedColumn"; + + public static final String OP_DELETE_DEFINED_COLUMN = "DeleteDefinedColumn"; + + public static final String OP_CREATE_SEARCH_INDEX = "CreateSearchIndex"; + + public static final String OP_UPDATE_SEARCH_INDEX = "UpdateSearchIndex"; + + public static final String OP_DELETE_SEARCH_INDEX = "DeleteSearchIndex"; + + public static final String OP_LIST_SEARCH_INDEX = "ListSearchIndex"; + + public static final String OP_DESCRIBE_SEARCH_INDEX = "DescribeSearchIndex"; + + public static final String OP_SEARCH = "Search"; + + public static final String OP_PARALLEL_SCAN = "ParallelScan"; + + public static final String OP_COMPUTE_SPLITS = "ComputeSplits"; + + public static final String OP_CREATE_TUNNEL = "tunnel/create"; + + public static final String OP_DELETE_TUNNEL = "tunnel/delete"; + + public static final String OP_LIST_TUNNEL = "tunnel/list"; + + public static final String OP_DESCRIBE_TUNNEL = "tunnel/describe"; + + public static final String OP_CONNECT_TUNNEL = "tunnel/connect"; + + public static final String OP_HEARTBEAT = "tunnel/heartbeat"; + + public static final String OP_SHUTDOWN_TUNNEL = "tunnel/shutdown"; + + public static final String OP_GETCHECKPOINT = "tunnel/getcheckpoint"; + + public static final String OP_READRECORDS = "tunnel/readrecords"; + + public static final String OP_CHECKPOINT = "tunnel/checkpoint"; + + public static final String OP_PUT_TIMESERIES_DATA = "PutTimeseriesData"; + + public static final String OP_GET_TIMESERIES_DATA = "GetTimeseriesData"; + + public static final String OP_QUERY_TIMESERIES_META = "QueryTimeseriesMeta"; + + public static final String OP_LIST_TIMESERIES_TABLE = "ListTimeseriesTable"; + + public static final String OP_CREATE_TIMESERIES_TABLE = "CreateTimeseriesTable"; + + public static final String OP_DELETE_TIMESERIES_TABLE = "DeleteTimeseriesTable"; + + public static final String OP_DESCRIBE_TIMESERIES_TABLE = "DescribeTimeseriesTable"; + + public static final String OP_UPDATE_TIMESERIES_TABLE = "UpdateTimeseriesTable"; + + public static final String OP_UPDATE_TIMESERIES_META = "UpdateTimeseriesMeta"; + + public static final String OP_DELETE_TIMESERIES_META = "DeleteTimeseriesMeta"; + + public static final String OP_SQL_Query = "SQLQuery"; +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/PlainBufferBlockParser.java b/src/main/java/com/alicloud/openservices/tablestore/model/PlainBufferBlockParser.java new file mode 100644 index 0000000..583de91 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/PlainBufferBlockParser.java @@ -0,0 +1,63 @@ +package com.alicloud.openservices.tablestore.model; + +import com.alicloud.openservices.tablestore.ClientException; +import com.alicloud.openservices.tablestore.core.protocol.*; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.nio.ByteBuffer; +import java.util.ArrayList; +import java.util.List; + +import static com.alicloud.openservices.tablestore.core.Constants.UTF8_CHARSET; + +/** + * 面向range scan场景的基于行的数据块 + */ +public class PlainBufferBlockParser { + + private static Logger logger = LoggerFactory.getLogger(ResponseFactory.class); + + private ByteBuffer buffer; + private List rows; + + public PlainBufferBlockParser(ByteBuffer buffer) { + this.buffer = buffer; + this.rows = new ArrayList(); + try { + if (buffer != null) { + PlainBufferCodedInputStream inputStream = new PlainBufferCodedInputStream( + new PlainBufferInputStream(buffer)); + List pbRows = inputStream.readRowsWithHeader(); + for (PlainBufferRow pbRow : pbRows) { + rows.add(PlainBufferConversion.toRow(pbRow)); + } + } + } catch (Exception e) { + throw new ClientException("Failed to parse get range response.", e); + } + } + + public int getRowCount() { + return rows.size(); + } + + public List getRows() { + return rows; + } + + public int getTotalBytes() { + return buffer.limit(); + } + + @Override + public String toString() { + final StringBuilder sb = new StringBuilder("PlainBufferBlock{\n"); + for (Row row: rows) { + sb.append(row).append('\n'); + } + sb.append("}"); + return sb.toString(); + } +} + diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/PlainBufferBlockRowIterator.java b/src/main/java/com/alicloud/openservices/tablestore/model/PlainBufferBlockRowIterator.java new file mode 100755 index 0000000..a13908d --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/PlainBufferBlockRowIterator.java @@ -0,0 +1,94 @@ +package com.alicloud.openservices.tablestore.model; + +import com.alicloud.openservices.tablestore.ClientException; +import com.alicloud.openservices.tablestore.SyncClientInterface; +import com.alicloud.openservices.tablestore.model.tunnel.BulkExportQueryCriteria; + +import java.util.Iterator; +import java.util.NoSuchElementException; + +public class PlainBufferBlockRowIterator implements Iterator { + + private SyncClientInterface client; + private BulkExportQueryCriteria parameter; + + private BulkExportResponse result; + private Iterator rowsIter; + + public PlainBufferBlockRowIterator(SyncClientInterface client, BulkExportQueryCriteria parameter) { + this.client = client; + this.parameter = parameter; + fetchData(buildRequest()); + } + + private BulkExportRequest buildRequest() { + BulkExportQueryCriteria criteria = new BulkExportQueryCriteria(parameter.getTableName()); + if (parameter.hasSetFilter()) { + criteria.setFilter(parameter.getFilter()); + } + + if (result == null) { + criteria.setInclusiveStartPrimaryKey(parameter.getInclusiveStartPrimaryKey()); + } else { + criteria.setInclusiveStartPrimaryKey(result.getNextStartPrimaryKey()); + } + + criteria.setExclusiveEndPrimaryKey(parameter.getExclusiveEndPrimaryKey()); + criteria.setDataBlockType(DataBlockType.DBT_PLAIN_BUFFER); + + criteria.addColumnsToGet(parameter.getColumnsToGet()); + + if (parameter.hasSetFilter()) { + criteria.setFilter(parameter.getFilter()); + } + return new BulkExportRequest(criteria); + } + + private void fetchData(BulkExportRequest request) { + this.result = client.bulkExport(request); + this.rowsIter = new PlainBufferBlockParser(result.getRows()).getRows().iterator(); + } + + private boolean isBufferHasMoreData() { + return rowsIter.hasNext(); + } + + private Row getNextFromBuffer() { + return rowsIter.next(); + } + + @Override + public boolean hasNext() { + // has data in buffer + if (isBufferHasMoreData()) { + return true; + } + + // need to send one more request + PrimaryKey nextToken = result.getNextStartPrimaryKey(); + while (nextToken != null && !nextToken.isEmpty()) { + fetchData(buildRequest()); + if (isBufferHasMoreData()) { + return true; + } + nextToken = result.getNextStartPrimaryKey(); + } + + return false; + } + + @Override + public Row next() { + if (!hasNext()) { + throw new NoSuchElementException(); + } + + return getNextFromBuffer(); + } + + @Override + public void remove() { + throw new ClientException("RowIterator do not support remove()."); + } + +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/Row.java b/src/main/java/com/alicloud/openservices/tablestore/model/Row.java index abd54f8..29fb449 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/model/Row.java +++ b/src/main/java/com/alicloud/openservices/tablestore/model/Row.java @@ -22,6 +22,17 @@ public Row(PrimaryKey primaryKey, List columns) { this(primaryKey, columns.toArray(new Column[columns.size()])); } + /** + * 构造函数。 + * + * @param primaryKey 行的主键,不能为null或者为空 + * @param columns 该行的属性列,不能为null + * @param needSortColumns 属性列是否需要顺序 + */ + public Row(PrimaryKey primaryKey, List columns, boolean needSortColumns) { + this(primaryKey, columns.toArray(new Column[columns.size()]), needSortColumns); + } + /** * 构造函数。 * @@ -29,12 +40,18 @@ public Row(PrimaryKey primaryKey, List columns) { * @param columns 该行的属性列,不能为null */ public Row(PrimaryKey primaryKey, Column[] columns) { + this(primaryKey, columns, true); + } + + public Row(PrimaryKey primaryKey, Column[] columns, boolean needSortColumns) { Preconditions.checkArgument(primaryKey != null, "The primary key of row should not be null."); Preconditions.checkNotNull(columns, "The columns of row should not be null."); this.primaryKey = primaryKey; this.columns = columns; - sortColumns(); // it may not been sorted, so we should sort it first + if (needSortColumns) { + sortColumns(); // it may not been sorted, so we should sort it first + } } /** diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/SSEDetails.java b/src/main/java/com/alicloud/openservices/tablestore/model/SSEDetails.java new file mode 100644 index 0000000..d32b3bc --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/SSEDetails.java @@ -0,0 +1,154 @@ +package com.alicloud.openservices.tablestore.model; + + +import com.alicloud.openservices.tablestore.core.utils.Jsonizable; + +public class SSEDetails implements Jsonizable { + + /** + * 是否开启服务器端加密 + */ + private boolean enable; + + /** + * 秘钥类型 + * 开启服务器端加密时有效 + */ + private SSEKeyType keyType; + + /** + * 主密钥在KMS中的id + * 可以根据keyId在KMS系统中对秘钥的使用情况进行审计 + * 开启服务器端加密时有效 + */ + private String keyId; + + /** + * 授权表格存储临时访问KMS用户主密钥的全局资源描述符 + * 开启服务器端加密且秘钥类型为SSE_BYOK时有效 + */ + private String roleArn; + + public SSEDetails() { + + } + + public SSEDetails(boolean enable, SSEKeyType keyType, String keyId, String roleArn) { + setEnable(enable); + setKeyType(keyType); + setKeyId(keyId); + setRoleArn(roleArn); + } + + public SSEDetails(boolean enable, SSEKeyType keyType, byte[] keyId, byte[] roleArn) { + setEnable(enable); + setKeyType(keyType); + setKeyId(keyId); + setRoleArn(roleArn); + } + + /** + * 获取是否开启服务器端加密 + * @return 是否开启服务器端加密 + */ + public boolean isEnable() { + return enable; + } + + public void setEnable(boolean enable) { + this.enable = enable; + } + + /** + * 获取服务器端加密的秘钥类型 + * @return 秘钥类型 + */ + public SSEKeyType getKeyType() { + return keyType; + } + + public void setKeyType(SSEKeyType keyType) { + this.keyType = keyType; + } + + /** + * 获取主密钥在KMS中的id + * @return 主密钥id + */ + public String getKeyId() { + return keyId; + } + + public void setKeyId(String keyId) { + this.keyId = keyId; + } + + public void setKeyId(byte[] keyId) { + if (keyId == null) { + this.keyId = null; + } + this.keyId = new String(keyId); + } + + /** + * 获取授权表格存储临时访问KMS用户主密钥的全局资源描述符 + * @return 全局资源描述符 + */ + public String getRoleArn() { + return roleArn; + } + + public void setRoleArn(String roleArn) { + this.roleArn = roleArn; + } + + public void setRoleArn(byte[] roleArn) { + if (roleArn == null) { + this.roleArn = null; + } + this.roleArn = new String(roleArn); + } + + @Override + public String jsonize() { + StringBuilder sb = new StringBuilder(); + jsonize(sb, "\n "); + return sb.toString(); + } + + @Override + public void jsonize(StringBuilder sb, String newline) { + sb.append('{'); + sb.append(newline); + sb.append("\"Enable\": "); + sb.append(enable); + sb.append(","); + sb.append(newline); + sb.append("\"keyType\": "); + sb.append("\"" + keyType.toString() + "\""); + sb.append(","); + sb.append(newline); + sb.append("\"keyId\": "); + sb.append("\"" + keyId + "\""); + sb.append(","); + sb.append(newline); + sb.append("\"roleArn\": "); + sb.append("\"" + roleArn + "\""); + sb.append(newline); + sb.append("}"); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("Enable: "); + sb.append(enable); + sb.append(", keyType: "); + sb.append(keyType.toString()); + sb.append(", keyId: "); + sb.append(keyId); + sb.append(", roleArn: "); + sb.append(roleArn); + return sb.toString(); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/SSEKeyType.java b/src/main/java/com/alicloud/openservices/tablestore/model/SSEKeyType.java new file mode 100644 index 0000000..e477fe3 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/SSEKeyType.java @@ -0,0 +1,15 @@ +package com.alicloud.openservices.tablestore.model; + +/** + * 表示服务器端加密的秘钥类型 + */ +public enum SSEKeyType { + /** + * 使用KMS的服务主密钥 + */ + SSE_KMS_SERVICE, + /** + * 使用KMS的用户主密钥,支持用户自定义秘钥上传 + */ + SSE_BYOK; +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/SSESpecification.java b/src/main/java/com/alicloud/openservices/tablestore/model/SSESpecification.java new file mode 100644 index 0000000..6e8653a --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/SSESpecification.java @@ -0,0 +1,219 @@ +package com.alicloud.openservices.tablestore.model; + +import com.alicloud.openservices.tablestore.ClientException; +import com.alicloud.openservices.tablestore.core.utils.Jsonizable; +import com.alicloud.openservices.tablestore.core.utils.OptionalValue; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; + +public class SSESpecification implements Jsonizable { + + /** + * 是否开启服务器端加密 + */ + private boolean enable = false; + + /** + * 当开启服务器端加密时,该参数用于设置秘钥类型 + */ + private OptionalValue keyType = new OptionalValue("KeyType"); + + /** + * 当开启服务器端加密且秘钥类型为BYOK时,该参数用于指定KMS用户主密钥的id + */ + private OptionalValue keyId = new OptionalValue("KeyId"); + + /** + * 当开启服务器端加密且秘钥类型为BYOK时, + * 需要通过STS服务授权表格存储获取临时访问令牌访问传入的KMS用户主密钥, + * 该参数用于指定为此创建的RAM角色的全局资源描述符 + */ + private OptionalValue roleArn = new OptionalValue("RoleArn"); + + /** + * 构造一个SSESpecification对象。 + * 注意:传入的enable必须为false,原因是当enableStream为true时,必须指定keyType。 + * 如果需要设置开启服务器端加密,请使用另外两个构造函数。 + * @param enable 必须为false,代表关闭服务器端加密 + */ + public SSESpecification(boolean enable) { + if (enable) { + throw new ClientException("Key type is required when enable is true."); + } + setEnable(enable); + } + + /** + * 构造一个SSESpecification对象。 + * 注意: + * 1. 传入的enable必须为true,原因是当enable为false时,不能指定keyType。 + * 如果需要设置关闭服务器端加密,请使用第一个构造函数。 + * 2. 传入的keyType必须为SSE_KMS_SERVICE,原因是当keyType为SSE_BYOK时,必须指定keyId和roleArn。 + * 如果需要设置加密类型为KMS服务主秘钥,请使用第三个构造函数 + * @param enable 必须为true,代表开启服务器端加密 + * @param keyType 必须为SSE_KMS_SERVICE,代表使用KMS的服务主密钥 + */ + public SSESpecification(boolean enable, SSEKeyType keyType) { + if (!enable) { + throw new ClientException("Key type cannot be set when enable is false."); + } + if (keyType != SSEKeyType.SSE_KMS_SERVICE) { + throw new ClientException("Key id and role arn are required when key type is not SSE_KMS_SERVICE."); + } + setEnable(enable); + setKeyType(keyType); + } + + /** + * 构造一个SSESpecification对象。 + * 注意: + * 1. 传入的enable必须为true,原因是当enable为false时,不能指定keyType。 + * 如果需要设置关闭服务器端加密,请使用第一个构造函数。 + * 2. 传入的keyType必须为SSE_BYOK,原因是当keyType为SSE_KMS_SERVICE时,不能指定keyId和roleArn。 + * 如果需要设置加密类型为KMS用户主密钥,请使用第二个构造函数 + * @param enable 必须为true,代表开启服务器端加密 + * @param keyType 必须为SSE_BYOK,代表使用KMS的用户主密钥,支持用户自定义秘钥上传 + * @param keyId KMS用户主密钥的id + * @param roleArn 授权表格存储临时访问keyId的全局资源描述符 + */ + public SSESpecification(boolean enable, SSEKeyType keyType, String keyId, String roleArn) { + if (!enable) { + throw new ClientException("Key type cannot be set when enable is false."); + } + if (keyType != SSEKeyType.SSE_BYOK) { + throw new ClientException("Key id and role arn cannot be set when key type is not SSE_BYOK."); + } + setEnable(enable); + setKeyType(keyType); + setKeyId(keyId); + setRoleArn(roleArn); + } + + /** + * 返回是否开启服务器端加密 + * + * @return enable + */ + public boolean isEnable() { + return enable; + } + + /** + * 设置是否开启服务器端加密 + * + * @param enable + */ + public void setEnable(boolean enable) { + this.enable = enable; + } + + /** + * 获取keyType参数 + * + * @return keyType + */ + public SSEKeyType getKeyType() { + return keyType.getValue(); + } + + /** + * 设置keyType参数 + * + * @param keyType + */ + public void setKeyType(SSEKeyType keyType) { + this.keyType.setValue(keyType); + } + + /** + * 获取keyId参数 + * + * @return keyId + */ + public String getKeyId() { + return keyId.getValue(); + } + + /** + * 设置keyId参数 + * + * @param keyId + */ + public void setKeyId(String keyId) { + this.keyId.setValue(keyId); + } + + /** + * 获取roleArn参数 + * + * @return roleArn + */ + public String getRoleArn() { + return roleArn.getValue(); + } + + /** + * 设置roleArn参数 + * + * @param roleArn + */ + public void setRoleArn(String roleArn) { + this.roleArn.setValue(roleArn); + } + + @Override + public String jsonize() { + StringBuilder sb = new StringBuilder(); + jsonize(sb, "\n "); + return sb.toString(); + } + + @Override + public void jsonize(StringBuilder sb, String newline) { + sb.append('{'); + sb.append(newline); + sb.append("\"Enable\": "); + sb.append(enable); + if (keyType.isValueSet()) { + sb.append(","); + sb.append(newline); + sb.append("\"KeyType\": "); + sb.append(keyType.getValue().toString()); + sb.append(newline); + } + if (keyId.isValueSet()) { + sb.append(","); + sb.append(newline); + sb.append("\"KeyId\": "); + sb.append(keyId.getValue()); + sb.append(newline); + } + if (roleArn.isValueSet()) { + sb.append(","); + sb.append(newline); + sb.append("\"RoleArn\": "); + sb.append(roleArn.getValue()); + sb.append(newline); + } + sb.append("}"); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("Enable: "); + sb.append(enable); + if (keyType.isValueSet()) { + sb.append(", KeyType: "); + sb.append(keyType.getValue().toString()); + } + if (keyId.isValueSet()) { + sb.append(", KeyId: "); + sb.append(keyId.getValue()); + } + if (roleArn.isValueSet()) { + sb.append(", RoleArn: "); + sb.append(roleArn.getValue()); + } + return sb.toString(); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/SearchIndexSplitsOptions.java b/src/main/java/com/alicloud/openservices/tablestore/model/SearchIndexSplitsOptions.java new file mode 100644 index 0000000..95b455e --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/SearchIndexSplitsOptions.java @@ -0,0 +1,25 @@ +package com.alicloud.openservices.tablestore.model; + +/** + * for {@link ComputeSplitsRequest} + */ +public class SearchIndexSplitsOptions implements SplitsOptions{ + + private String indexName; + + public SearchIndexSplitsOptions() { + } + + public SearchIndexSplitsOptions(String indexName) { + this.indexName = indexName; + } + + public String getIndexName() { + return indexName; + } + + public SearchIndexSplitsOptions setIndexName(String indexName) { + this.indexName = indexName; + return this; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/SimpleRowMatrixBlockConstants.java b/src/main/java/com/alicloud/openservices/tablestore/model/SimpleRowMatrixBlockConstants.java new file mode 100644 index 0000000..77e0953 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/SimpleRowMatrixBlockConstants.java @@ -0,0 +1,11 @@ +package com.alicloud.openservices.tablestore.model; + +public class SimpleRowMatrixBlockConstants { + public static final int API_VERSION = 0x304d5253; + public static final byte TAG_CHECKSUM = 1; + public static final byte TAG_ROW = 2; + public static final byte TAG_ROW_COUNT = 3; + public static final byte TAG_ENTIRE_PRIMARY_KEYS = 10; +} + + diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/SimpleRowMatrixBlockParser.java b/src/main/java/com/alicloud/openservices/tablestore/model/SimpleRowMatrixBlockParser.java new file mode 100644 index 0000000..30ab6c4 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/SimpleRowMatrixBlockParser.java @@ -0,0 +1,412 @@ +package com.alicloud.openservices.tablestore.model; + +import com.alicloud.openservices.tablestore.ClientException; +import com.alicloud.openservices.tablestore.core.protocol.PlainBufferCrc8; +import com.alicloud.openservices.tablestore.core.protocol.ResponseFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.util.ArrayList; +import java.util.List; + +import static com.alicloud.openservices.tablestore.core.Constants.UTF8_CHARSET; + +/** + * 面向range scan场景的基于行的数据块 + */ +public class SimpleRowMatrixBlockParser { + + private final ByteBuffer buffer; + private final int apiVersion; + private final int dataOffset; + private final int optionsOffset; + private final int pkCount; + private final int attrCount; + private final int fieldCount; + private final int footerOffset; + private final int totalBufferBytes; + private final boolean hasEntirePrimaryKeys; + private final int rowCount; + private final int fieldNameArrayOffset; + private final int[] fieldDataOffsetArray;//包含主键和非主键 + private String[] fieldNames; + + private int nextRowIndex = 0; + private int nextRowOffset; + + public SimpleRowMatrixBlockParser(ByteBuffer buffer) { + buffer.rewind(); + buffer.order(ByteOrder.LITTLE_ENDIAN); + this.buffer = buffer; + this.totalBufferBytes = buffer.limit(); + + // parse fixed fields + apiVersion = buffer.getInt(); + ensureEqual(apiVersion, SimpleRowMatrixBlockConstants.API_VERSION, "apiVersion"); + + dataOffset = buffer.getInt(); + ensureNonNegative(dataOffset, "dataOffset"); + + optionsOffset = buffer.getInt(); + ensureNonNegative(optionsOffset, "optionsOffset"); + + pkCount = buffer.getInt(); + ensureNonNegative(pkCount, "pkCount"); + attrCount = buffer.getInt(); + ensureNonNegative(attrCount, "attrCount"); + fieldCount = pkCount + attrCount; + + // only record, do not parse names until have to + fieldNameArrayOffset = buffer.position(); + + // parse options + buffer.position(optionsOffset); + + final byte tagEntirePrimaryKeys = buffer.get(); + ensureEqual(tagEntirePrimaryKeys, SimpleRowMatrixBlockConstants.TAG_ENTIRE_PRIMARY_KEYS, "tagEntirePrimaryKeys"); + final byte hasEntirePrimaryKeys = buffer.get(); + if (hasEntirePrimaryKeys != 0 && hasEntirePrimaryKeys != 1) { + throw new ClientException("Invalid hasEntirePrimaryKeys value:" + hasEntirePrimaryKeys); + } + this.hasEntirePrimaryKeys = (hasEntirePrimaryKeys == 1); + + final byte tagRowCount = buffer.get(); + ensureEqual(tagRowCount, SimpleRowMatrixBlockConstants.TAG_ROW_COUNT, "tagRowCount"); + rowCount = buffer.getInt(); + ensureNonNegative(rowCount, "rowCount"); + + // parse footer + buffer.position(totalBufferBytes - 2); + final byte tagCheckSum = buffer.get(); + ensureEqual(tagCheckSum, SimpleRowMatrixBlockConstants.TAG_CHECKSUM, "tagCheckSum"); + final byte crc = buffer.get(); + final byte expectCrc = calcCheckSum(); + ensureEqual(crc, expectCrc, "checksum"); + + // 提前初始化,后续每行都会变化 + fieldDataOffsetArray = new int[fieldCount]; + + // init footer + footerOffset = this.totalBufferBytes - 2; + + // 读数据起点 + nextRowOffset = dataOffset; + } + + private static void ensureEqual(byte actual, byte expect, String fieldName) { + if (actual != expect) { + throw new ClientException(fieldName + " mismatch. Actual:" + actual + + ". Expect:" + expect); + } + } + + private static void ensureEqual(int actual, int expect, String fieldName) { + if (actual != expect) { + throw new ClientException(fieldName + " mismatch. Actual:" + actual + + ". Expect:" + expect); + } + } + + private static void ensureNonNegative(int value, String fieldName) { + if (value < 0) { + throw new ClientException(fieldName + " can't be negative. Now:" + value); + } + } + + public String[] parseFieldNames() { + if (fieldNames == null) { + fieldNames = new String[fieldCount]; + buffer.position(fieldNameArrayOffset); + for (int i = 0; i < fieldCount; i++) { + short nameLength = buffer.getShort(); + ensureNonNegative(nameLength, "nameLength"); + fieldNames[i] = retrieveString(nameLength); + } + } + return fieldNames; + } + + public int getPkCount() { + return pkCount; + } + + public int getAttrCount() { + return attrCount; + } + + public int getFieldCount() { + return fieldCount; + } + + public boolean hasEntirePrimaryKeys() { + return hasEntirePrimaryKeys; + } + + public int getRowCount() { + return rowCount; + } + + public boolean hasNext() { + return nextRowOffset < footerOffset; + } + + public int next() { + if (!hasNext()) { + throw new ClientException("SimpleRowMatrixBlockParser has no next"); + } + buffer.position(nextRowOffset); + final byte tagRow = buffer.get(); + ensureEqual(tagRow, SimpleRowMatrixBlockConstants.TAG_ROW, "tagRow"); + + for (int i = 0; i < fieldCount; i++) { + fieldDataOffsetArray[i] = buffer.position(); + final byte type = buffer.get(); + skipColumn(toColumnType(type)); + } + + nextRowOffset = buffer.position(); + return nextRowIndex++;//先返回 + } + + public int getTotalBytes() { + return totalBufferBytes; + } + + /** + * 总的数据字节数,没有包含头部信息,表示已经从server拖取过来的纯粹的数据量 + */ + public int getDataBytes() { + return footerOffset - dataOffset; + } + + public boolean isNull(int fieldIndex) { + return getColumnType(fieldIndex) == null; + } + + public boolean getBoolean(int fieldIndex) { + ColumnType type = getColumnType(fieldIndex); + if (type != ColumnType.BOOLEAN) { + throw new ClientException("ColumnType mismatch. Actual:" + type + + ". Expect:" + ColumnType.BOOLEAN); + } + + final byte value = buffer.get(); + if (value != 0 && value != 1) { + throw new ClientException("Invalid value for boolean:" + value); + } + return value != 0; + } + + public long getLong(int fieldIndex) { + ColumnType type = getColumnType(fieldIndex); + if (type != ColumnType.INTEGER) { + throw new ClientException("ColumnType mismatch. Actual:" + type + + ". Expect:" + ColumnType.INTEGER); + } + return buffer.getLong(); + } + + public double getDouble(int fieldIndex) { + ColumnType type = getColumnType(fieldIndex); + if (type != ColumnType.DOUBLE) { + throw new ClientException("ColumnType mismatch. Actual:" + type + + ". Expect:" + ColumnType.DOUBLE); + } + + return buffer.getDouble(); + } + + public String getString(int fieldIndex) { + ColumnType type = getColumnType(fieldIndex); + if (type != ColumnType.STRING) { + throw new ClientException("ColumnType mismatch. Actual:" + type + + ". Expect:" + ColumnType.STRING); + } + int length = buffer.getInt(); + return retrieveString(length); + } + + public byte[] getBinary(int fieldIndex) { + ColumnType type = getColumnType(fieldIndex); + if (type != ColumnType.BINARY) { + throw new ClientException("ColumnType mismatch. Actual:" + type + + ". Expect:" + ColumnType.BINARY); + } + int length = buffer.getInt(); + byte[] bs = new byte[length]; + buffer.get(bs); + return bs; + } + + public Object getObject(int fieldIndex) { + final ColumnType type = getColumnType(fieldIndex); + if (type == null) { + return null; + } + switch (type) { + case STRING: + return getString(fieldIndex); + case BINARY: + return getBinary(fieldIndex); + case BOOLEAN: + return getBoolean(fieldIndex); + case INTEGER: + return getLong(fieldIndex); + case DOUBLE: + return getDouble(fieldIndex); + } + throw new ClientException("Unknown columnType:" + type); + } + + public ColumnType getColumnType(int fieldIndex) { + buffer.position(fieldDataOffsetArray[fieldIndex]); + byte type = buffer.get(); + return toColumnType(type); + } + + // compatiable with old interface but will generate many objects + // get row from current cursor + public Row getRow() { + List pks = new ArrayList(pkCount); + parseFieldNames(); // ensure fieldNames not null + for (int j = 0; j < pkCount; j++) { + ColumnType type = getColumnType(j); + switch (type) { + case INTEGER: + pks.add(new PrimaryKeyColumn(fieldNames[j], PrimaryKeyValue.fromLong(getLong(j)))); + break; + case STRING: + pks.add(new PrimaryKeyColumn(fieldNames[j], PrimaryKeyValue.fromString(getString(j)))); + break; + case BINARY: + pks.add(new PrimaryKeyColumn(fieldNames[j], PrimaryKeyValue.fromBinary(getBinary(j)))); + break; + default: + throw new ClientException("Invalid ColumnType for PrimaryKeyType:" + type); + } + } + List cols = new ArrayList(attrCount); + for (int j = pkCount; j < fieldCount; j++) { + ColumnType type = getColumnType(j); + if (type == null) { + // ignore null columns + continue; + } + switch (type) { + case INTEGER: + cols.add(new Column(fieldNames[j], ColumnValue.fromLong(getLong(j)))); + break; + case BOOLEAN: + cols.add(new Column(fieldNames[j], ColumnValue.fromBoolean(getBoolean(j)))); + break; + case DOUBLE: + cols.add(new Column(fieldNames[j], ColumnValue.fromDouble(getDouble(j)))); + break; + case STRING: + cols.add(new Column(fieldNames[j], ColumnValue.fromString(getString(j)))); + break; + case BINARY: + cols.add(new Column(fieldNames[j], ColumnValue.fromBinary(getBinary(j)))); + break; + default: + throw new ClientException("Invalid ColumnType:" + type); + } + } + return new Row(new PrimaryKey(pks), cols); + } + + // compatiable with old interface but will generate many objects + public List getRows() { + List rows = new ArrayList(rowCount); + nextRowOffset = dataOffset; + for (int i = 0; i < rowCount; i++) { + next(); + rows.add(getRow()); + } + return rows; + } + + @Override + public String toString() { + final StringBuilder sb = new StringBuilder("SimpleRowMatrixBlock{"); + sb.append("apiVersion=").append(apiVersion) + .append(", pkCount=").append(pkCount) + .append(", attrCount=").append(attrCount) + .append(", fieldCount=").append(fieldCount) + .append(", rowCount=").append(rowCount) + .append(", fieldNameArrayOffset=").append(fieldNameArrayOffset) + .append(", dataOffset=").append(dataOffset) + .append(", footerOffset=").append(footerOffset) + .append(", totalBufferBytes=").append(totalBufferBytes) + .append(", hasEntirePrimaryKeys=").append(hasEntirePrimaryKeys) + .append('}'); + return sb.toString(); + } + + private byte calcCheckSum() { + int current = buffer.position(); + buffer.position(0); + byte crc = 0; + for (int i = 0; i < totalBufferBytes - 1; i++) { + crc = PlainBufferCrc8.crc8(crc, buffer.get()); + } + buffer.position(current); + return crc; + } + + private ColumnType toColumnType(byte value) { + switch (value) { + case 0: + return ColumnType.INTEGER; + case 1: + return ColumnType.DOUBLE; + case 2: + return ColumnType.BOOLEAN; + case 3: + return ColumnType.STRING; + case 6: + return null; + case 7: + return ColumnType.BINARY; + } + throw new ClientException("Unsupported data type:" + value); + } + + private String retrieveString(int length) { + if (buffer.isReadOnly()) { + byte[] bs = new byte[length]; + buffer.get(bs);//不要直接用array()接口,因为当前为ReadOnlyBuffer,会报错 + return new String(bs, UTF8_CHARSET); + } else { + int p = buffer.position(); + String x = new String(buffer.array(), p, length); + buffer.position(p + length); + return x; + } + } + + private void skipColumn(ColumnType type) { + int skipLen = 0; + if (type != null) { + switch (type) { + case STRING: + case BINARY: + skipLen = buffer.getInt(); + break; + case BOOLEAN: + skipLen = 1; + break; + case INTEGER: + case DOUBLE: + skipLen = 8; + break; + default: + throw new ClientException("Unknown columnType:" + type); + } + } + buffer.position(buffer.position() + skipLen); + } +} + diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/SimpleRowMatrixBlockRowIterator.java b/src/main/java/com/alicloud/openservices/tablestore/model/SimpleRowMatrixBlockRowIterator.java new file mode 100644 index 0000000..614bd21 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/SimpleRowMatrixBlockRowIterator.java @@ -0,0 +1,218 @@ +package com.alicloud.openservices.tablestore.model; + +import com.alicloud.openservices.tablestore.ClientException; +import com.alicloud.openservices.tablestore.SyncClientInterface; +import com.alicloud.openservices.tablestore.model.tunnel.BulkExportQueryCriteria; + +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; +import java.util.NoSuchElementException; + +/** + * 面向SimleRowMatrixBlock的行迭代器 + */ +public class SimpleRowMatrixBlockRowIterator implements Iterator { + + private SyncClientInterface client; + private BulkExportQueryCriteria parameter; + + private BulkExportResponse result; + private SimpleRowMatrixBlockParser block; + private Map fieldNames; + private long index = 0; + private long completedBytes; + + // if true verify field names of first response the same as the following responses + private boolean verifyFieldNames; + + public SimpleRowMatrixBlockRowIterator(SyncClientInterface client, BulkExportQueryCriteria parameter, boolean verifyFieldNames) { + this.client = client; + this.parameter = parameter; + this.verifyFieldNames = verifyFieldNames; + this.completedBytes = 0; + fetchData(buildRequest()); + } + + private BulkExportRequest buildRequest() { + BulkExportQueryCriteria criteria = new BulkExportQueryCriteria(parameter.getTableName()); + if (parameter.hasSetFilter()) { + criteria.setFilter(parameter.getFilter()); + } + + if (result == null) { + criteria.setInclusiveStartPrimaryKey(parameter.getInclusiveStartPrimaryKey()); + } else { + criteria.setInclusiveStartPrimaryKey(result.getNextStartPrimaryKey()); + } + + criteria.setExclusiveEndPrimaryKey(parameter.getExclusiveEndPrimaryKey()); + criteria.setDataBlockType(DataBlockType.DBT_SIMPLE_ROW_MATRIX); + + criteria.addColumnsToGet(parameter.getColumnsToGet()); + + if (parameter.hasSetFilter()) { + criteria.setFilter(parameter.getFilter()); + } + + return new BulkExportRequest(criteria); + } + + private void fetchData(BulkExportRequest request) { + this.result = client.bulkExport(request); + this.completedBytes += this.result.getBodyBytes(); + this.block = new SimpleRowMatrixBlockParser(this.result.getRows()); + + if (fieldNames == null) { + String[] fns = block.parseFieldNames(); + fieldNames = new HashMap(fns.length); + for (int i = 0; i < fns.length; i++) { + this.fieldNames.put(fns[i], i); + } + } else if (verifyFieldNames) { + String[] fns = block.parseFieldNames(); + if (fns.length != fieldNames.size()) { + throw new ClientException("Inconsistent field name count"); + } + for (int i = 0; i < fns.length; i++) { + Integer idx = fieldNames.get(fns[i]); + if (idx == null || idx != i) { + throw new ClientException("Inconsistent field name:" + fns[i]); + } + } + } + } + + private boolean isBufferHasMoreData() { + return block != null && block.hasNext(); + } + + private long getNextFromBuffer() { + block.next(); + return index++; + } + + @Override + public boolean hasNext() { + // has data in buffer + if (isBufferHasMoreData()) { + return true; + } + + // need to send one more request + PrimaryKey nextToken = result.getNextStartPrimaryKey(); + while (nextToken != null && !nextToken.isEmpty()) { + fetchData(buildRequest()); + if (isBufferHasMoreData()) { + return true; + } + nextToken = result.getNextStartPrimaryKey(); + } + + return false; + } + + @Override + public Long next() { + if (!hasNext()) { + throw new NoSuchElementException(); + } + + return getNextFromBuffer(); + } + + public int locate(String fieldName) { + Integer x = fieldNames.get(fieldName); + if (x == null) { + throw new ClientException("Can't find the field by name:" + fieldName); + } + return x; + } + + // high-level interface but will generate many objects + public Row getRow() { + return block.getRow(); + } + + public boolean getBoolean(String fieldName) { + int idx = locate(fieldName); + return block.getBoolean(idx); + } + + public boolean getBoolean(int index) { + return block.getBoolean(index); + } + + public String getString(String fieldName) { + int idx = locate(fieldName); + return block.getString(idx); + } + + public String getString(int index) { + return block.getString(index); + } + + public long getLong(String fieldName) { + int idx = locate(fieldName); + return block.getLong(idx); + } + + public long getLong(int index) { + return block.getLong(index); + } + + public double getDouble(String fieldName) { + int idx = locate(fieldName); + return block.getDouble(idx); + } + + public double getDouble(int index) { + return block.getDouble(index); + } + + public byte[] getBinary(String fieldName) { + int idx = locate(fieldName); + return block.getBinary(idx); + } + + public byte[] getBinary(int index) { + return block.getBinary(index); + } + + public boolean isNull(String fieldName) { + int idx = locate(fieldName); + return block.isNull(idx); + } + + public boolean isNull(int index) { + return block.isNull(index); + } + + public Object getObject(String fieldName) { + int idx = locate(fieldName); + return block.getObject(idx); + } + + public Object getObject(int index) { + return block.getObject(index); + } + + public ColumnType getFieldType(String fieldName) { + int idx = locate(fieldName); + return block.getColumnType(idx); + } + + public ColumnType getFieldType(int index) { + return block.getColumnType(index); + } + + @Override + public void remove() { + throw new ClientException("SimpleRowMatrixBlockRowIterator do not support remove()."); + } + + public long getCompletedBytes() { + return this.completedBytes; + } +} + diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/SplitPointFactory.java b/src/main/java/com/alicloud/openservices/tablestore/model/SplitPointFactory.java new file mode 100644 index 0000000..36a9b8e --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/SplitPointFactory.java @@ -0,0 +1,90 @@ +package com.alicloud.openservices.tablestore.model; + +import com.alicloud.openservices.tablestore.core.utils.Preconditions; + +import java.math.BigInteger; +import java.util.ArrayList; +import java.util.List; + + +public class SplitPointFactory{ + + private static int DEFAULT_MAX_LENGTH = 8; + + public static List getDigit(int pointCount, long begin, long end) { + Preconditions.checkArgument(pointCount > 0, + "The number of pointCount must be greater than 0."); + List points = new ArrayList(); + end = end + 1; + + double range = (double)(end - begin) / (pointCount + 1); + double point = begin; + Preconditions.checkArgument(range >= 1, + String.format("When you try to set the split points for the interval [%d, %d], you can set up to %d split points, currently %d.", + begin, end - 1, end - begin - 1, pointCount)); + + for (long i = 0; i < pointCount; i++) { + point += range; + points.add(PrimaryKeyValue.fromLong((long)Math.floor(point))); + } + + return points; + } + + private static List getHexValue(int pointCount, int pointLength){ + + Preconditions.checkArgument(pointCount > 0 && pointLength > 0, + "The number of pointCount and pointLength must be greater than 0."); + + List pointsString = new ArrayList(); + + StringBuilder endStringBuilder = new StringBuilder(); + for (int i = 0; i < pointLength; i++){ + endStringBuilder.append('f'); + } + String endString = endStringBuilder.toString(); + BigInteger end = new BigInteger(endString, 16); + BigInteger begin = new BigInteger("0", 16); + BigInteger partitionCount = new BigInteger(Integer.toString(pointCount+1)); + + BigInteger range = end.subtract(begin).add(BigInteger.ONE).divide(new BigInteger(new Integer(pointCount+1).toString())); + Preconditions.checkArgument(range != BigInteger.ZERO, + String.format("When the length of MD5 is %d, you can set up to %d split points, currently %d.", + pointLength, (1 << (pointLength*4)) - 1, pointCount)); + for (int i = 0; i < pointCount; i++){ + BigInteger point = end.subtract(begin).add(BigInteger.ONE).multiply(new BigInteger(new Integer(i+1).toString())); + point = point.divide(partitionCount); + StringBuilder pointString = new StringBuilder().append(point.toString(16)); + while (pointLength - pointString.length() > 0){ + pointString.insert(0,'0'); + } + pointsString.add(pointString.toString()); + } + + return pointsString; + } + + public static List getLowerHexString(int pointCount, int pointLength){ + + List points = new ArrayList(); + List pointsString = getHexValue(pointCount,pointLength); + + for (int i = 0; i < pointCount; i++){ + points.add(PrimaryKeyValue.fromString(pointsString.get(i))); + } + + return points; + } + + public static List getUpperHexString(int pointCount, int pointLength){ + + List points = new ArrayList(); + List pointsString = getHexValue(pointCount,pointLength); + + for (int i = 0; i < pointCount; i++){ + points.add(PrimaryKeyValue.fromString(pointsString.get(i).toUpperCase())); + } + + return points; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/SplitsOptions.java b/src/main/java/com/alicloud/openservices/tablestore/model/SplitsOptions.java new file mode 100644 index 0000000..2f5b258 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/SplitsOptions.java @@ -0,0 +1,7 @@ +package com.alicloud.openservices.tablestore.model; + +/** + * for {@link ComputeSplitsRequest} + */ +public interface SplitsOptions { +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/TableOptions.java b/src/main/java/com/alicloud/openservices/tablestore/model/TableOptions.java index ba18b8b..c896a37 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/model/TableOptions.java +++ b/src/main/java/com/alicloud/openservices/tablestore/model/TableOptions.java @@ -1,9 +1,12 @@ package com.alicloud.openservices.tablestore.model; +import com.alicloud.openservices.tablestore.core.utils.NumberUtils; import com.alicloud.openservices.tablestore.core.utils.Preconditions; import com.alicloud.openservices.tablestore.core.utils.OptionalValue; import com.alicloud.openservices.tablestore.core.utils.Jsonizable; +import java.util.concurrent.TimeUnit; + /** * 表的配置选项,用于配置TTL、MaxVersions. *

TTL: TimeToLive的缩写, TableStore支持数据自动过期, TimeToLive即为数据的存活时间.

@@ -31,6 +34,13 @@ public class TableOptions implements Jsonizable { */ private OptionalValue maxTimeDeviation = new OptionalValue("MaxTimeDeviation"); + /** + * 表上是否允许有Update操作 + * 如果设置为false,则对应表中,只能执行Put和Delete操作,不能执行Update操作 + * 在表创建后,该配置项可通过调用{@link com.alicloud.openservices.tablestore.SyncClient#updateTable(UpdateTableRequest)}动态修改。 + */ + private OptionalValue allowUpdate = new OptionalValue("AllowUpdate"); + /** * 构造TableOptions对象。 */ @@ -70,6 +80,13 @@ public TableOptions(int timeToLive, int maxVersions, long maxTimeDeviation) { setMaxTimeDeviation(maxTimeDeviation); } + /** + * 构造TableOptions对象 + */ + public TableOptions(boolean allowUpdate) { + setAllowUpdate(allowUpdate); + } + /** * 获取TTL时间,单位为秒。 * @@ -94,6 +111,22 @@ public void setTimeToLive(int timeToLive) { this.timeToLive.setValue(timeToLive); } + /** + * 设置表数据的TTL时间 + * + * @param days TTL时间,单位为天 + */ + public void setTimeToLiveInDays(int days) { + Preconditions.checkArgument(days > 0 || days == -1, + "The value of timeToLive can be -1 or any positive value."); + if (days == -1) { + this.timeToLive.setValue(-1); + } else { + long seconds = TimeUnit.DAYS.toSeconds(days); + this.timeToLive.setValue(NumberUtils.longToInt(seconds)); + } + } + /** * 查询是否调用{@link #setTimeToLive(int)}设置了TTL。 * @@ -167,9 +200,35 @@ public boolean hasSetMaxTimeDeviation() { return maxTimeDeviation.isValueSet(); } + /** + * 设置表中的数据允许或者禁止Update操作 + * @param allowUpdate + */ + public void setAllowUpdate(boolean allowUpdate) { + this.allowUpdate.setValue(allowUpdate); + } + + /** + * 查询是否调用{@link #setAllowUpdate(boolean)}禁止/允许表中的数据有Update操作 + * @return 是否有设置AllowUpdate + */ + public boolean hasSetAllowUpdate() { return allowUpdate.isValueSet(); } + + /** + * 获取是否允许表中的数据上有Update操作 + * @return 是否允许Update + * @throws java.lang.IllegalStateException 若没有配置该参数 + */ + public boolean getAllowUpdate() { + if (!allowUpdate.isValueSet()) { + throw new IllegalStateException("The value of AllowUpdate is not set."); + } + return allowUpdate.getValue(); + } + @Override public String toString() { - return timeToLive + ", " + maxVersions + ", " + maxTimeDeviation; + return timeToLive + ", " + maxVersions + ", " + maxTimeDeviation + ", " + allowUpdate; } @Override @@ -214,6 +273,15 @@ protected boolean jsonizeFields(StringBuilder sb, boolean firstItem) { sb.append("\"MaxTimeDeviation\": "); sb.append(this.maxTimeDeviation.getValue()); } + if (this.allowUpdate.isValueSet()) { + if (firstItem) { + firstItem = false; + } else { + sb.append(", "); + } + sb.append("\"AllowUpdate\": "); + sb.append(this.allowUpdate.getValue()); + } return firstItem; } diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/TimeseriesTableMeta.java b/src/main/java/com/alicloud/openservices/tablestore/model/TimeseriesTableMeta.java new file mode 100755 index 0000000..c393b85 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/TimeseriesTableMeta.java @@ -0,0 +1,130 @@ +package com.alicloud.openservices.tablestore.model; + +import com.alicloud.openservices.tablestore.core.utils.Jsonizable; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; + +/** + * 表的结构信息,包含表的名称以及表的配置信息。 + */ +public class TimeseriesTableMeta implements Jsonizable { + + /** + * 表的名称。 + */ + private String timeseriesTableName; + + /** + * 表的配置项, 目前只包括TTL。 + */ + private TimeseriesTableOptions timeseriesTableOptions; + + /** + * 表的状态。 + */ + private String status; + + /** + * 创建一个新的给定表名的TableMeta实例。 + * + * @param timeseriesTableName 表名。 + */ + public TimeseriesTableMeta(String timeseriesTableName) { + this(timeseriesTableName, new TimeseriesTableOptions()); + } + + public TimeseriesTableMeta(String timeseriesTableName, TimeseriesTableOptions timeseriesTableOptions) { + Preconditions.checkArgument(timeseriesTableName != null && !timeseriesTableName.isEmpty(), "The name of table should not be null or empty."); + setTimeseriesTableName(timeseriesTableName); + setTimeseriesTableOptions(timeseriesTableOptions); + } + + /* 内部使用 */ + public TimeseriesTableMeta(String timeseriesTableName, TimeseriesTableOptions timeseriesTableOptions, String status) { + Preconditions.checkArgument(timeseriesTableName != null && !timeseriesTableName.isEmpty(), "The name of table should not be null or empty."); + setTimeseriesTableName(timeseriesTableName); + setTimeseriesTableOptions(timeseriesTableOptions); + setStatus(status); + } + + /** + * 设置表的名称。 + * + * @param timeseriesTableName 表的名称。 + */ + public void setTimeseriesTableName(String timeseriesTableName) { + Preconditions.checkArgument(timeseriesTableName != null && !timeseriesTableName.isEmpty(), "The name of table should not be null or empty."); + + this.timeseriesTableName = timeseriesTableName; + } + + /** + * 返回表的名称。 + * + * @return 表的名称。 + */ + public String getTimeseriesTableName() { + return timeseriesTableName; + } + + /** + * 设置表的配置参数。 + * + * @param timeseriesTableOptions 表的配置。 + */ + public void setTimeseriesTableOptions(TimeseriesTableOptions timeseriesTableOptions) { + Preconditions.checkNotNull(timeseriesTableOptions, "TimeseriesTableOptionsEx should not be null."); + this.timeseriesTableOptions = timeseriesTableOptions; + } + + /** + * 返回表的配置。 + * + * @return 表的配置。 + */ + public TimeseriesTableOptions getTimeseriesTableOptions() { + return timeseriesTableOptions; + + } + + /** + * 设置表的配置参数。 + * + * @param status 表的配置。 + */ + public void setStatus(String status) { + this.status = status; + } + + /** + * 返回表的配置。 + * + * @return 表的配置。 + */ + public String getStatus() { + return status; + } + + @Override + public String toString() { + String s = "TimeseriesTableName: " + timeseriesTableName; + return s; + } + + @Override + public String jsonize() { + StringBuilder sb = new StringBuilder(); + jsonize(sb, "\n "); + return sb.toString(); + } + + @Override + public void jsonize(StringBuilder sb, String newline) { + sb.append('{'); + sb.append(newline); + sb.append("\"TimeseriesTableName\": \""); + sb.append(timeseriesTableName); + sb.append('\"'); + + sb.append("}"); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/TimeseriesTableOptions.java b/src/main/java/com/alicloud/openservices/tablestore/model/TimeseriesTableOptions.java new file mode 100644 index 0000000..ae85891 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/TimeseriesTableOptions.java @@ -0,0 +1,106 @@ +package com.alicloud.openservices.tablestore.model; + +import com.alicloud.openservices.tablestore.core.utils.Jsonizable; +import com.alicloud.openservices.tablestore.core.utils.OptionalValue; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; + +/** + * 时序表的配置选项,目前只用于用于配置TTL + *

TTL: TimeToLive的缩写, TableStore支持数据自动过期, TimeToLive即为数据的存活时间.

+ * 服务端根据当前时间, 每列每个版本的版本号, 表的TTL设置决定该列该版本是否过期, 过期的数据会自动清理. + */ +public class TimeseriesTableOptions implements Jsonizable { + /** + * 表数据的TTL时间,单位为秒。 + * 在表创建后,该配置项可通过调用{@link com.alicloud.openservices.tablestore.SyncClient#updateTable(UpdateTableRequest)}动态更改。 + */ + private OptionalValue timeToLive = new OptionalValue("TimeToLive"); + + /** + * 构造TableOptions对象。 + */ + public TimeseriesTableOptions() { + } + + /** + * 构造TableOptions对象。 + * + * @param timeToLive TTL时间 + */ + public TimeseriesTableOptions(int timeToLive) { + setTimeToLive(timeToLive); + } + + /** + * 获取TTL时间,单位为秒。 + * + * @return TTL时间 + * @throws IllegalStateException 若没有配置该参数 + */ + public int getTimeToLive() { + if (!timeToLive.isValueSet()) { + throw new IllegalStateException("The value of TimeToLive is not set."); + } + return timeToLive.getValue(); + } + + /** + * 设置表数据的TTL时间,单位为秒。 + * + * @param timeToLive TTL时间,单位为秒 + */ + public void setTimeToLive(int timeToLive) { + Preconditions.checkArgument(timeToLive > 0 || timeToLive == -1, + "The value of timeToLive can be -1 or any positive value."); + this.timeToLive.setValue(timeToLive); + } + + /** + * 查询是否调用{@link #setTimeToLive(int)}设置了TTL。 + * + * @return 是否有设置TTL。 + */ + public boolean hasSetTimeToLive() { + return this.timeToLive.isValueSet(); + } + + /** + * 获取最大版本数。 + * + * @return 最大版本数 + * @throws IllegalStateException 若没有配置该参数 + */ + + @Override + public String toString() { + return timeToLive.toString(); + } + + @Override + public String jsonize() { + StringBuilder sb = new StringBuilder(); + jsonize(sb, "\n "); + return sb.toString(); + } + + @Override + public void jsonize(StringBuilder sb, String newline) { + sb.append("{"); + this.jsonizeFields(sb, true); + sb.append("}"); + } + + protected boolean jsonizeFields(StringBuilder sb, boolean firstItem) { + if (this.timeToLive.isValueSet()) { + if (firstItem) { + firstItem = false; + } else { + sb.append(", "); + } + sb.append("\"TimeToLive\": "); + sb.append(this.timeToLive.getValue()); + } + return firstItem; + } + +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/delivery/CreateDeliveryTaskRequest.java b/src/main/java/com/alicloud/openservices/tablestore/model/delivery/CreateDeliveryTaskRequest.java new file mode 100644 index 0000000..feb520d --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/delivery/CreateDeliveryTaskRequest.java @@ -0,0 +1,117 @@ +package com.alicloud.openservices.tablestore.model.delivery; + +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.alicloud.openservices.tablestore.model.OperationNames; +import com.alicloud.openservices.tablestore.model.Request; + +public class CreateDeliveryTaskRequest implements Request { + /** + *表名 + */ + private String tableName; + + /** + *投递任务名 + */ + private String taskName; + + /** + * 投递任务配置 + */ + private OSSTaskConfig taskConfig; + + /** + * 投递任务类型,目前支持全量、增量、全量加增量三种类型 + */ + private DeliveryTaskType taskType; + + /** + * 初始化CreateDeliveryTask实例 + */ + public CreateDeliveryTaskRequest() {} + + /** + * 初始化CreateDeliveryTask实例 + * @param tableName 表名 + * @param taskName 任务名 + * @param taskConfig 投递任务配置 + */ + public CreateDeliveryTaskRequest(String tableName, String taskName, OSSTaskConfig taskConfig) { + setTableName(tableName); + setTaskName(taskName); + setTaskConfig(taskConfig); + } + + /** + * 获取表名 + * + * @return 表名 + */ + public String getTableName() { return tableName; } + + /** + *设置表名 + * + * @param tableName 表名 + */ + public void setTableName(String tableName) { + Preconditions.checkArgument(tableName != null && !tableName.isEmpty(), "tableName should not be null or empty"); + this.tableName = tableName; + } + + /** + * 获取投递任务名 + * + * @return 任务名 + */ + public String getTaskName() { return taskName; } + + /** + * 设置投递任务名 + * + * @param taskName 任务名 + */ + public void setTaskName(String taskName) { + Preconditions.checkArgument(taskName != null && !taskName.isEmpty(), "taskName should not be null or empty"); + this.taskName = taskName; + } + + /** + * 获取投递任务配置 + * + * @return 任务配置 + */ + public OSSTaskConfig getTaskConfig() { return taskConfig; } + + /** + * 设置投递任务配置 + * + * @param taskConfig 任务配置 + */ + public void setTaskConfig(OSSTaskConfig taskConfig) { + Preconditions.checkNotNull(taskConfig); + this.taskConfig = taskConfig; + } + + /** + * 获取投递任务类型 + * + * @return 任务类型 + */ + public DeliveryTaskType getTaskType() { return taskType; } + + /** + * 设置投递任务类型 + * + * @param taskType 投递任务类型 + */ + public void setTaskType(DeliveryTaskType taskType) { + Preconditions.checkNotNull(taskType); + this.taskType = taskType; + } + + @Override + public String getOperationName() { return OperationNames.OP_CREATE_DELIVERY_TASK; } +} + + diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/delivery/CreateDeliveryTaskResponse.java b/src/main/java/com/alicloud/openservices/tablestore/model/delivery/CreateDeliveryTaskResponse.java new file mode 100644 index 0000000..d752d10 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/delivery/CreateDeliveryTaskResponse.java @@ -0,0 +1,11 @@ +package com.alicloud.openservices.tablestore.model.delivery; + +import com.alicloud.openservices.tablestore.model.Response; + +/** + *CreateDeliveryTaskResponse 返回的结果 + */ + +public class CreateDeliveryTaskResponse extends Response { + public CreateDeliveryTaskResponse(Response meta) {super(meta);} +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/delivery/DataType.java b/src/main/java/com/alicloud/openservices/tablestore/model/delivery/DataType.java new file mode 100644 index 0000000..29b57a8 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/delivery/DataType.java @@ -0,0 +1,20 @@ +package com.alicloud.openservices.tablestore.model.delivery; + +public enum DataType { + BOOL, + INT64, + UTF8, + DOUBLE, + DATE, + DECIMAL, + TIME_MILLIS, + TIME_MICROS, + TIMESTAMP_MILLIS, + TIMESTAMP_MICROS, + LIST, + MAP, + INTERVAL, + FLOAT, + INT32, + INT96 +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/delivery/DeleteDeliveryTaskRequest.java b/src/main/java/com/alicloud/openservices/tablestore/model/delivery/DeleteDeliveryTaskRequest.java new file mode 100644 index 0000000..d3616e8 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/delivery/DeleteDeliveryTaskRequest.java @@ -0,0 +1,64 @@ +package com.alicloud.openservices.tablestore.model.delivery; + +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.alicloud.openservices.tablestore.model.OperationNames; +import com.alicloud.openservices.tablestore.model.Request; + +public class DeleteDeliveryTaskRequest implements Request { + + /** + * 表名 + */ + private String tableName; + + /** + * 任务名 + */ + private String taskName; + + /** + * 初始化DeleteDeliveryTaskRquest实例 + * + * @param tableName 表名 + * @param taskName 任务名 + */ + public DeleteDeliveryTaskRequest(String tableName, String taskName) { + setTableName(tableName); + setTaskName(taskName); + } + + /** + * 获取表名 + * @return 表名 + */ + public String getTableName() { return tableName; } + + /** + * 设置表名 + * @param tableName 表名 + */ + public void setTableName(String tableName) { + Preconditions.checkArgument(tableName != null && !tableName.isEmpty(), "tableName should not be null or empty"); + this.tableName = tableName; + } + + /** + * 获取任务名 + * @return 任务名 + */ + public String getTaskName() { return taskName; } + + /** + * 设置任务名 + * @param taskName 任务名 + */ + public void setTaskName(String taskName) { + Preconditions.checkArgument(taskName != null && !taskName.isEmpty(), "taskName should not be null or empty"); + this.taskName = taskName; + } + + @Override + public String getOperationName() { return OperationNames.OP_DELETE_DELIVERY_TASK; } +} + + diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/delivery/DeleteDeliveryTaskResponse.java b/src/main/java/com/alicloud/openservices/tablestore/model/delivery/DeleteDeliveryTaskResponse.java new file mode 100644 index 0000000..e6ad0b6 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/delivery/DeleteDeliveryTaskResponse.java @@ -0,0 +1,7 @@ +package com.alicloud.openservices.tablestore.model.delivery; + +import com.alicloud.openservices.tablestore.model.Response; + +public class DeleteDeliveryTaskResponse extends Response { + public DeleteDeliveryTaskResponse(Response meta) {super(meta);} +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/delivery/DeliveryErrorType.java b/src/main/java/com/alicloud/openservices/tablestore/model/delivery/DeliveryErrorType.java new file mode 100644 index 0000000..225bd50 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/delivery/DeliveryErrorType.java @@ -0,0 +1,7 @@ +package com.alicloud.openservices.tablestore.model.delivery; + +public enum DeliveryErrorType { + OK, + UNAUTHORIZED, + INVALID_OSS_BUCKET +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/delivery/DeliveryTaskInfo.java b/src/main/java/com/alicloud/openservices/tablestore/model/delivery/DeliveryTaskInfo.java new file mode 100644 index 0000000..4615c48 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/delivery/DeliveryTaskInfo.java @@ -0,0 +1,54 @@ +package com.alicloud.openservices.tablestore.model.delivery; + +public class DeliveryTaskInfo { + + /** + * 表名 + */ + private String tableName; + + /** + * 任务名 + */ + private String taskName; + + /** + * 投递任务类型 + */ + private DeliveryTaskType taskType; + + /** + * 获取表名 + * @return 表名 + */ + public String getTableName() { + return tableName; + } + + /** + * 内部接口,请勿使用 + */ + public void setTableName(String tablename) { this.tableName = tablename; } + + /** + * 投递获取任务名 + * @return 投递任务名 + */ + public String getTaskName() { return taskName; } + + /** + * 内部接口,请勿使用 + */ + public void setTaskName(String taskName) { this.taskName = taskName; } + + /** + * 获取任务类型 + * @return 任务类型 + */ + public DeliveryTaskType getTaskType() { return taskType; } + + /** + * 内部接口,请勿使用 + */ + public void setTaskType(DeliveryTaskType taskType) { this.taskType = taskType; } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/delivery/DeliveryTaskType.java b/src/main/java/com/alicloud/openservices/tablestore/model/delivery/DeliveryTaskType.java new file mode 100644 index 0000000..c98d5fb --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/delivery/DeliveryTaskType.java @@ -0,0 +1,19 @@ +package com.alicloud.openservices.tablestore.model.delivery; + +public enum DeliveryTaskType { + + /** + * 全量 + */ + BASE, + + /** + * 增量 + */ + INC, + + /** + * 全量加增量 + */ + BASE_INC +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/delivery/DescribeDeliveryTaskRequest.java b/src/main/java/com/alicloud/openservices/tablestore/model/delivery/DescribeDeliveryTaskRequest.java new file mode 100644 index 0000000..ad46012 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/delivery/DescribeDeliveryTaskRequest.java @@ -0,0 +1,66 @@ +package com.alicloud.openservices.tablestore.model.delivery; + +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.alicloud.openservices.tablestore.model.OperationNames; +import com.alicloud.openservices.tablestore.model.Request; + +public class DescribeDeliveryTaskRequest implements Request { + + /** + * 表名 + */ + private String tableName; + + /** + * 任务名 + */ + private String taskName; + + /** + * 初始化DescribeDeliveryTaskRequest实例 + * + * @param tableName 表名 + * @param taskName 任务名 + */ + public DescribeDeliveryTaskRequest(String tableName, String taskName) { + setTableName(tableName); + setTaskName(taskName); + } + + /** + * 获取表名 + * + * @return 表名 + */ + public String getTableName() { return tableName; } + + /** + * 设置表名 + * + * @param tableName 表名 + */ + public void setTableName(String tableName) { + Preconditions.checkArgument(tableName != null && !tableName.isEmpty(), "tableName should not be null or empty"); + this.tableName = tableName; + } + + /** + * 获取任务名 + * + * @return 任务名 + */ + public String getTaskName() { return taskName; } + + /** + * 设置任务名 + * + * @param taskName 任务名 + */ + public void setTaskName(String taskName) { + Preconditions.checkArgument(taskName != null && !taskName.isEmpty(), "taskName should not be null or empty"); + this.taskName = taskName; + } + + @Override + public String getOperationName() { return OperationNames.OP_DESCRIBE_DELIVERY_TASK; } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/delivery/DescribeDeliveryTaskResponse.java b/src/main/java/com/alicloud/openservices/tablestore/model/delivery/DescribeDeliveryTaskResponse.java new file mode 100644 index 0000000..1628269 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/delivery/DescribeDeliveryTaskResponse.java @@ -0,0 +1,71 @@ +package com.alicloud.openservices.tablestore.model.delivery; + +import com.alicloud.openservices.tablestore.model.Response; + +/** + * DescribeDeliveryTask返回的结果 + */ +public class DescribeDeliveryTaskResponse extends Response { + + /** + * 投递任务配置 + */ + private OSSTaskConfig taskConfig; + + /** + * 投递任务状态 + */ + private TaskSyncStat taskSyncStat; + + /** + * 投递任务类型 + */ + private DeliveryTaskType taskType; + + public DescribeDeliveryTaskResponse (Response meta) {super(meta);} + + /** + * 获取投递任务配置 + * @return 投递任务配置信息 + */ + public OSSTaskConfig getTaskConfig() { return taskConfig; } + + /** + * 内部接口,请勿使用 + */ + public void setTaskConfig(OSSTaskConfig taskConfig) { this.taskConfig = taskConfig; } + + /** + * 获取任务同步状态信息 + * @return 任务同步状态信息 + */ + public TaskSyncStat getTaskSyncStat() { return taskSyncStat; } + + /** + * 内部接口,请勿使用 + * @param taskSyncStat + */ + public void setTaskSyncStat(TaskSyncStat taskSyncStat) { this.taskSyncStat = taskSyncStat; } + + /** + * 获取投递任务类型 + * @return 投递任务类型 + */ + public DeliveryTaskType getTaskType() { return taskType; } + + /** + * 内部接口,请勿使用 + */ + public void setTaskType(DeliveryTaskType taskType) { this.taskType = taskType; } + + /** + * 投递任务是否已经完成 + * @return 是否完成 + */ + public boolean isFinished() { + if (taskSyncStat != null && taskType != null) { + return taskType == DeliveryTaskType.BASE && taskSyncStat.getTaskSyncPhase() == TaskSyncPhase.INCR; + } + return false; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/delivery/EventColumn.java b/src/main/java/com/alicloud/openservices/tablestore/model/delivery/EventColumn.java new file mode 100644 index 0000000..117e862 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/delivery/EventColumn.java @@ -0,0 +1,70 @@ +package com.alicloud.openservices.tablestore.model.delivery; + +import com.alicloud.openservices.tablestore.core.utils.Preconditions; + + +public class EventColumn { + + /** + * 事件时间列列名 + */ + private String columnName; + + /** + * 事件时间列时间格式 + */ + private EventTimeFormat timeFormat; + + /** + * 初始化EventColumn实例 + * + * @param columnName 列名 + * @param timeFormat 时间格式 + */ + public EventColumn(String columnName, EventTimeFormat timeFormat ) { + setColumnName(columnName); + setEventTimeFormat(timeFormat); + } + + /** + * 获取事件时间列列名 + * + * @return 事件时间列列名 + */ + public String getColumnName() { return columnName; } + + /** + * 设置事件时间列列名 + * + * @param columnName 事件时间列列名 + */ + public void setColumnName(String columnName) { + Preconditions.checkArgument(columnName != null && !columnName.isEmpty(), "the columnName should not be null or empty"); + this.columnName = columnName; + } + + /** + * 获取事件时间格式 + * + * @return 事件时间格式 + */ + public EventTimeFormat getEventTimeFormat() { return timeFormat; } + + /** + * 设置事件时间格式 + * + * @param timeFormat 事件时间列时间格式 + */ + public void setEventTimeFormat(EventTimeFormat timeFormat) { + Preconditions.checkArgument(timeFormat != null, + "The time format should not be null."); + this.timeFormat = timeFormat; + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("columnName: " + columnName + ", " ); + sb.append("timeFormat: " + timeFormat.name() + ", "); + return sb.toString(); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/delivery/EventTimeFormat.java b/src/main/java/com/alicloud/openservices/tablestore/model/delivery/EventTimeFormat.java new file mode 100644 index 0000000..220d373 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/delivery/EventTimeFormat.java @@ -0,0 +1,9 @@ +package com.alicloud.openservices.tablestore.model.delivery; + +public enum EventTimeFormat { + RFC822, + RFC850, + RFC1123, + RFC3339, + Unix +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/delivery/ListDeliveryTaskRequest.java b/src/main/java/com/alicloud/openservices/tablestore/model/delivery/ListDeliveryTaskRequest.java new file mode 100644 index 0000000..c702a15 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/delivery/ListDeliveryTaskRequest.java @@ -0,0 +1,40 @@ +package com.alicloud.openservices.tablestore.model.delivery; + +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.alicloud.openservices.tablestore.model.OperationNames; +import com.alicloud.openservices.tablestore.model.Request; + +public class ListDeliveryTaskRequest implements Request { + + /** + * 表名 + */ + private String tableName; + + /** + * 初始化ListDeliveryTaskRequest实例 + * + * @param tableName 表名 + */ + public ListDeliveryTaskRequest(String tableName) { + setTableName(tableName); + } + + /** + * 获取表名 + * @return 表名 + */ + public String getTableName() { return tableName; } + + /** + *设置表名 + * @param tableName 表名 + */ + public void setTableName(String tableName) { + Preconditions.checkArgument(tableName != null && !tableName.isEmpty(), "tableName should not be null or empty"); + this.tableName = tableName; + } + + @Override + public String getOperationName() { return OperationNames.OP_LIST_DELIVERY_TASK; } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/delivery/ListDeliveryTaskResponse.java b/src/main/java/com/alicloud/openservices/tablestore/model/delivery/ListDeliveryTaskResponse.java new file mode 100644 index 0000000..1e1f8c3 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/delivery/ListDeliveryTaskResponse.java @@ -0,0 +1,29 @@ +package com.alicloud.openservices.tablestore.model.delivery; + +import com.alicloud.openservices.tablestore.model.Response; + +import java.util.List; + +/** + * ListDeliveryTask返回的结果 + */ +public class ListDeliveryTaskResponse extends Response { + + /** + * 投递任务列表 + */ + private List taskInfos; + + public ListDeliveryTaskResponse(Response meta) {super(meta);} + + /** + * 获取投递任务列表 + * @return + */ + public List getTaskInfos() { return taskInfos; } + + /** + * 内部接口,请勿使用 + */ + public void setTaskInfos(List taskInfos) { this.taskInfos = taskInfos; } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/delivery/OSSFileEncoding.java b/src/main/java/com/alicloud/openservices/tablestore/model/delivery/OSSFileEncoding.java new file mode 100644 index 0000000..936e592 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/delivery/OSSFileEncoding.java @@ -0,0 +1,9 @@ +package com.alicloud.openservices.tablestore.model.delivery; + +public enum OSSFileEncoding { + PLAIN, + PLAIN_DICTIONARY, + DELTA_BINARY_PACKED, + DELTA_BYTE_ARRAY, + DELTA_LENGTH_BYTE_ARRAY +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/delivery/OSSFileFormat.java b/src/main/java/com/alicloud/openservices/tablestore/model/delivery/OSSFileFormat.java new file mode 100644 index 0000000..cf37bad --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/delivery/OSSFileFormat.java @@ -0,0 +1,9 @@ +package com.alicloud.openservices.tablestore.model.delivery; + +public enum OSSFileFormat { + + /** + * 投递到OSS文件格式,目前仅支持Parquet + */ + Parquet +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/delivery/OSSTaskConfig.java b/src/main/java/com/alicloud/openservices/tablestore/model/delivery/OSSTaskConfig.java new file mode 100644 index 0000000..6a3d726 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/delivery/OSSTaskConfig.java @@ -0,0 +1,194 @@ +package com.alicloud.openservices.tablestore.model.delivery; + +import com.alicloud.openservices.tablestore.core.utils.Preconditions; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +public class OSSTaskConfig { + + /** + * 投递任务OSS路径前缀 + */ + private String ossPrefix; + + /** + * OSS分区格式 + */ + private TimeFormatter timeFormatter; + + /** + * OSS Bucket + */ + private String ossBucket; + + /** + * OSS服务的endpoint + */ + + private String ossEndpoint; + + /** + * 赋予otsf服务账号的且有bucket写入权限的StsRole + */ + private String ossStsRole; + + /** + * 事件时间列 + */ + private EventColumn eventTimeColumn; + + /** + * 投递到OSS文件格式,目前只支持Parquet + */ + private OSSFileFormat format; + + /** + * 用户投递任务Schema + */ + private List parquetSchema = new ArrayList(); + + /** + * 初始化OSSTaskConfig实例 + */ + public OSSTaskConfig() { + setTimeFormatter(TimeFormatter.YDMFormatter); + //only support parquet + setFormat(OSSFileFormat.Parquet); + } + + /** + * 获取OSS路径前缀 + * + * @return OSS路径前缀 + */ + public String getOssPrefix() { return ossPrefix; } + + /** + * 设置OSS路径前缀 + * + * @param ossPrefix OSS路径前缀 + */ + public void setOssPrefix(String ossPrefix) { + Preconditions.checkArgument(ossPrefix != null && !ossPrefix.isEmpty(), "the ossPrefix should not be null or empty"); + this.ossPrefix = ossPrefix; + } + + /** + * 获取投递OSS分区格式,目前仅支持年月日格式 + * + * @return OSS分区格式 + */ + public TimeFormatter getTimeFormatter() { return timeFormatter; } + + /** + * 设置投递OSS分区格式 + * + * @param timeFormatter 投递OSS分区格式 + */ + public void setTimeFormatter(TimeFormatter timeFormatter) { + Preconditions.checkNotNull(timeFormatter); + this.timeFormatter = timeFormatter; + } + + /** + * 获取OSS Bucket + * @return OSS Bucket + */ + public String getOssBucket() { return ossBucket; } + + /** + * 设置OSS Bucket + * @param ossBucket OSS Bucket + */ + public void setOssBucket(String ossBucket) { + Preconditions.checkArgument(ossBucket != null && !ossBucket.isEmpty(), "the oss Bucket should not be null or empty"); + this.ossBucket = ossBucket; + } + + /** + * 获取OSS endpoint + * @return OSS endpoint + */ + public String getOssEndpoint() { return ossEndpoint; } + + /** + * 设置OSS endpoint + * @param ossEndpoint OSS endpoint + */ + public void setOssEndpoint(String ossEndpoint) { + Preconditions.checkArgument(ossEndpoint != null && !ossEndpoint.isEmpty(), "the oss endpoint should not be null or empty"); + this.ossEndpoint = ossEndpoint; + } + + /** + * 获取StsRole + * @return StsRole + */ + public String getOssStsRole() { return ossStsRole; } + + /** + * 设置StsRole + * @param ossStsRole StsRole + */ + public void setOssStsRole(String ossStsRole) { + Preconditions.checkArgument(ossStsRole != null && !ossStsRole.isEmpty(), "the oss stsRole should not be null or empty"); + this.ossStsRole = ossStsRole; + } + + /** + * 获取事件时间列名 + * @return 事件时间列名 + */ + public EventColumn getEventTimeColumn() { return eventTimeColumn; } + + /** + * 设置事件时间列名 + * @param eventTimeColumn 事件时间列名 + */ + public void setEventTimeColumn(EventColumn eventTimeColumn) { + Preconditions.checkNotNull(eventTimeColumn); + this.eventTimeColumn = eventTimeColumn; + } + + /** + * 获取投递OSS上文件格式,目前仅支持parquet格式 + * @return OSS上文件格式 + */ + public OSSFileFormat getFormat() { return format; } + + /** + * 设置投递OSS上文件格式 + * @param format + */ + public void setFormat(OSSFileFormat format) { + Preconditions.checkNotNull(format); + this.format = format; + } + + /** + * 获取投递任务Schema + * @return 投递任务Schema + */ + public List getParquetSchemaList() { return Collections.unmodifiableList(parquetSchema); } + + /** + * 添加数据投递列 + * @param parquetSchema + */ + public void addParquetSchema(ParquetSchema parquetSchema) { + Preconditions.checkNotNull(parquetSchema); + this.parquetSchema.add(parquetSchema); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{").append("ossPrefix: ").append(ossPrefix).append(", timeFormatter: ") + .append(timeFormatter).append(", ossBucket: ").append(ossBucket).append(", ossEndpoint: ").append(ossEndpoint) + .append(", ossStsRole: ").append(ossStsRole).append(", eventTimeColumn: ").append(eventTimeColumn) + .append(", format: ").append(format.name()).append(", parquetSchema: ").append(parquetSchema); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/delivery/ParquetSchema.java b/src/main/java/com/alicloud/openservices/tablestore/model/delivery/ParquetSchema.java new file mode 100644 index 0000000..31b90f0 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/delivery/ParquetSchema.java @@ -0,0 +1,160 @@ +package com.alicloud.openservices.tablestore.model.delivery; + +import com.alicloud.openservices.tablestore.core.utils.Preconditions; + +public class ParquetSchema { + + /** + * 投递OTS表列名 + */ + private String columnName; + + /** + * 投递到OSS上的列名 + */ + private String ossColumnName; + + /** + * 投递OTS表列类型 + */ + private DataType type; + + /** + *parquet编码类型 + */ + private OSSFileEncoding encode; + + /** + *parquet扩展类型 + */ + private String typeExtend; + + /** + * 初始化ParquetSchema实例 + */ + public ParquetSchema() { + setEncode(OSSFileEncoding.PLAIN); + } + + /** + * 初始化ParquetSchema实例 + * + * @param columnName ots表中列名 + * @param type ots表中该列类型 + */ + public ParquetSchema(String columnName, DataType type) { + setColumnName(columnName); + setOssColumnName(columnName); + setType(type); + setEncode(OSSFileEncoding.PLAIN); + } + + /** + * 初始化ParquetSchema实例 + * + * @param columnName OTS表中列名 + * @param ossColumnName 投递到OSS列名 + * @param type OTS表中该列的类型 + */ + public ParquetSchema(String columnName, String ossColumnName, DataType type) { + setColumnName(columnName); + setOssColumnName(ossColumnName); + setType(type); + setEncode(OSSFileEncoding.PLAIN); + } + + /** + * 获取OTS表中列名 + * + * @return OTS表中列名 + */ + public String getColumnName() {return columnName; } + + /** + * 设置OTS表中列名 + * + * @param columnName OTS表中列名 + */ + public void setColumnName(String columnName) { + Preconditions.checkArgument(columnName != null && !columnName.isEmpty(), "the columnName should not be null or empty"); + this.columnName = columnName; + } + + /** + * 获取投递到OSS上的列名 + * + * @return OSS上列名 + */ + public String getOssColumnName() { return ossColumnName; } + + /** + * 设置投递到OSS上的列名 + * + * @param ossColumnName OSS上列名 + */ + public void setOssColumnName(String ossColumnName) { + Preconditions.checkArgument(ossColumnName != null && !ossColumnName.isEmpty(), "the oss columnName should not be null or empty"); + this.ossColumnName = ossColumnName; + } + + /** + * 获取OTS表中列类型 + * + * @return OTS表中该列类型 + */ + public DataType getType() { return type; } + + /** + * 设置OTS表中列类型 + * + * @param type OTS表中该列类型 + */ + public void setType(DataType type) { + Preconditions.checkNotNull(type); + this.type = type; + } + + /** + * 获取该列的编码类型 + * + * @return 该列编码类型 + */ + public OSSFileEncoding getEncode() { return encode; } + + /** + *设置该列编码类型 + * + * @param encode 设置该列编码类型 + */ + public void setEncode(OSSFileEncoding encode) { + Preconditions.checkNotNull(encode); + this.encode = encode; + } + + /** + * 扩展功能,未来会支持更多parquet类型 + * 暂不支持 + * + * @return parquet扩展类型 + */ + public String getTypeExtend() { return typeExtend; } + + /** + * 获取parquet扩展类型 + * 暂不支持 + * + * @param typeExtend parquet扩展类型 + */ + public void setTypeExtend(String typeExtend) { + Preconditions.checkNotNull(typeExtend); + this.typeExtend = typeExtend; + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{").append("columnName: ").append(columnName).append(", ossColumnName: ").append(ossColumnName) + .append(", type: ").append(type).append(", encode: ").append(encode).append(", typeExtend: ").append(typeExtend) + .append("}"); + return sb.toString(); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/delivery/TaskSyncPhase.java b/src/main/java/com/alicloud/openservices/tablestore/model/delivery/TaskSyncPhase.java new file mode 100644 index 0000000..7422131 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/delivery/TaskSyncPhase.java @@ -0,0 +1,16 @@ +package com.alicloud.openservices.tablestore.model.delivery; + +public enum TaskSyncPhase { + /** + * 初始化阶段 + */ + INIT, + /** + * 全量消费阶段 + */ + FULL, + /** + * 增量消费阶段 + */ + INCR +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/delivery/TaskSyncStat.java b/src/main/java/com/alicloud/openservices/tablestore/model/delivery/TaskSyncStat.java new file mode 100644 index 0000000..93a1246 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/delivery/TaskSyncStat.java @@ -0,0 +1,78 @@ +package com.alicloud.openservices.tablestore.model.delivery; + +import java.util.Date; + +public class TaskSyncStat { + + /** + * 投递任务状态 + */ + private TaskSyncPhase taskSyncPhase; + + /** + * 当前同步时间时间点 + */ + private Date currentSyncPoint; + + /** + * 错误类型 + */ + private DeliveryErrorType errorType; + + /** + * 更多详细信息 + */ + private String detail; + + /** + * 获取任务投递状态 + * @return + */ + public TaskSyncPhase getTaskSyncPhase() { return taskSyncPhase; } + + /** + * 内部接口,请勿使用 + */ + public void setTaskSyncPhase(TaskSyncPhase taskSyncPhase) { this.taskSyncPhase = taskSyncPhase; } + + /** + * 获取当前同步时间戳 + * @return + */ + public Date getCurrentSyncPoint() { return currentSyncPoint; } + + /** + * 内部接口,请勿使用 + */ + public void setCurrentSyncPoint(Date currentSyncPoint) { this.currentSyncPoint = currentSyncPoint; } + + /** + * 获取错误类型 + * + * @return 错误类型 + */ + public DeliveryErrorType getErrorType() { return errorType; } + + /** + * 内部接口,请勿使用 + */ + public void setErrorType(DeliveryErrorType errorType) { this.errorType = errorType; } + + /** + * 获取更多详细信息 + * @return + */ + public String getDetail() { return detail; } + + /** + * 内部接口,请勿使用 + */ + public void setDetail(String detail) { this.detail = detail; } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("{").append("taskSyncPhase: ").append(taskSyncPhase).append(", current_sync_timestamp: ").append(currentSyncPoint.toString()) + .append(", ErrorType: ").append(errorType).append(", detail: ").append(detail).append("}"); + return sb.toString(); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/delivery/TimeFormatter.java b/src/main/java/com/alicloud/openservices/tablestore/model/delivery/TimeFormatter.java new file mode 100644 index 0000000..5e45570 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/delivery/TimeFormatter.java @@ -0,0 +1,8 @@ +package com.alicloud.openservices.tablestore.model.delivery; + +public enum TimeFormatter { + /** + * 年月日格式 + */ + YDMFormatter +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/filter/RegexRule.java b/src/main/java/com/alicloud/openservices/tablestore/model/filter/RegexRule.java new file mode 100644 index 0000000..c893bef --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/filter/RegexRule.java @@ -0,0 +1,48 @@ +package com.alicloud.openservices.tablestore.model.filter; + +import com.alicloud.openservices.tablestore.core.protocol.*; + +public class RegexRule { + public enum CastType { + VT_INTEGER, + VT_DOUBLE, + VT_STRING, + } + + private String regex; + private CastType castType = CastType.VT_INTEGER; + + public RegexRule(String regex, CastType type) { + this.regex = regex; + this.castType = type; + } + + public String getRegex() { + return this.regex; + } + + public CastType getCastType() { + return this.castType; + } + + // support serialize to pb + public OtsFilter.ValueTransferRule serialize() { + OtsFilter.ValueTransferRule.Builder builder = OtsFilter.ValueTransferRule.newBuilder(); + builder.setRegex(this.regex); + + switch (this.castType) { + case VT_INTEGER: + builder.setCastType(OtsFilter.VariantType.VT_INTEGER); + break; + case VT_DOUBLE: + builder.setCastType(OtsFilter.VariantType.VT_DOUBLE); + break; + case VT_STRING: + builder.setCastType(OtsFilter.VariantType.VT_STRING); + break; + default: + throw new IllegalArgumentException("Unknown variant type: " + this.castType); + } + return builder.build(); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/filter/SingleColumnValueRegexFilter.java b/src/main/java/com/alicloud/openservices/tablestore/model/filter/SingleColumnValueRegexFilter.java new file mode 100644 index 0000000..22263e8 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/filter/SingleColumnValueRegexFilter.java @@ -0,0 +1,187 @@ +package com.alicloud.openservices.tablestore.model.filter; + +import com.alicloud.openservices.tablestore.ClientException; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.alicloud.openservices.tablestore.model.ColumnValue; +import com.alicloud.openservices.tablestore.core.protocol.OTSProtocolBuilder; +import com.alicloud.openservices.tablestore.core.utils.OptionalValue; +import com.alicloud.openservices.tablestore.model.condition.SingleColumnValueCondition; +import com.alicloud.openservices.tablestore.model.filter.Filter; + +import com.google.protobuf.ByteString; + +/** + * TableStore查询操作时使用的过滤器,SingleColumnValueRegexFilter扩展子SingleColumnValueFilter,列值正则匹配之后,再比较。 + */ +public class SingleColumnValueRegexFilter extends ColumnValueFilter { + public enum CompareOperator { + EQUAL, NOT_EQUAL, GREATER_THAN, GREATER_EQUAL, LESS_THAN, LESS_EQUAL, EXIST, NOT_EXIST; + } + + private CompareOperator operator; + private String columnName; + private ColumnValue columnValue; + private boolean latestVersionsOnly = true; + private OptionalValue regexRule = new OptionalValue("RegexRule"); + + /** + * 构造函数。 + * + * @param columnName 列的名称 + * @param rule 正则规则 + * @param operator 比较函数, 操作符限定在EQUAL, NOT_EQUAL, GREATER_THAN, GREATER_EQUAL, LESS_THAN, LESS_EQUAL + * @param columnValue 列的值 + * + * 说明:若filter期望的列不存在时,则该行被过滤掉 + */ + public SingleColumnValueRegexFilter(String columnName, final RegexRule rule, final CompareOperator operator, final ColumnValue columnValue) { + if (operator == CompareOperator.EXIST || operator == CompareOperator.NOT_EXIST) { + throw new ClientException("operator " + operator.name() + " should not use in this construct function"); + } + setColumnName(columnName); + setOperator(operator); + setColumnValue(columnValue); + setRegexRule(rule); + } + + /** + * 构造函数。 + * + * @param columnName 列的名称 + * @param operator 比较函数,操作符限定在EXIST, NOT_EXIST + */ + public SingleColumnValueRegexFilter(String columnName, final RegexRule rule, final CompareOperator operator) { + if (operator != CompareOperator.EXIST && operator != CompareOperator.NOT_EXIST) { + throw new ClientException("operator " + operator.name() + " should not use in this construct function"); + } + setColumnName(columnName); + setOperator(operator); + setColumnValue(ColumnValue.fromLong(0)); + setRegexRule(rule); + } + + /** + * 空regex构造函数。 + * + * @param columnName 列的名称 + * @param operator 比较函数, 操作符限定在EQUAL, NOT_EQUAL, GREATER_THAN, GREATER_EQUAL, LESS_THAN, LESS_EQUAL + * @param columnValue 列的值 + * + * 说明:若filter期望的列不存在时,则该行被过滤掉 + */ + public SingleColumnValueRegexFilter(String columnName, final CompareOperator operator, final ColumnValue columnValue) { + if (operator == CompareOperator.EXIST || operator == CompareOperator.NOT_EXIST) { + throw new ClientException("operator " + operator.name() + " should not use in this construct function"); + } + setColumnName(columnName); + setOperator(operator); + setColumnValue(columnValue); + } + + /** + * 空regex构造函数。 + * + * @param columnName 列的名称 + * @param operator 比较函数,操作符限定在EXIST, NOT_EXIST + */ + public SingleColumnValueRegexFilter(String columnName, final CompareOperator operator) { + if (operator != CompareOperator.EXIST && operator != CompareOperator.NOT_EXIST) { + throw new ClientException("operator " + operator.name() + " should not use in this construct function"); + } + setColumnName(columnName); + setOperator(operator); + setColumnValue(ColumnValue.fromLong(0)); + } + + /** + * 设置列的比较操作符。 + * + * @param operator 比较操作符 + * @return this for chain invocation + */ + private SingleColumnValueRegexFilter setOperator(CompareOperator operator) { + Preconditions.checkNotNull(operator, "The operator should not be null."); + this.operator = operator; + return this; + } + + public SingleColumnValueRegexFilter.CompareOperator getOperator() { + return operator; + } + + /** + * 设置列的名称。 + * + * @param columnName 列的名称 + * @return this for chain invocation + */ + private SingleColumnValueRegexFilter setColumnName(String columnName) { + Preconditions.checkArgument(columnName != null && !columnName.isEmpty(), "The name of column should not be null or empty."); + this.columnName = columnName; + return this; + } + + public String getColumnName() { + return columnName; + } + + /** + * 设置列的对比值。 + * + * @param columnValue 列的对比值。 + * @return this for chain invocation + */ + private SingleColumnValueRegexFilter setColumnValue(ColumnValue columnValue) { + Preconditions.checkNotNull(columnValue, "The value of column should not be null."); + this.columnValue = columnValue; + return this; + } + + public ColumnValue getColumnValue() { + return columnValue; + } + + /** + * 设置正则规则。 + * + * @param rule 正则表达式, cast type。 + * @return this for chain invocation + */ + private SingleColumnValueRegexFilter setRegexRule(RegexRule rule) { + this.regexRule.setValue(rule); + return this; + } + + public boolean hasRegexRule() { + return this.regexRule.isValueSet(); + } + + public RegexRule getRegexRule() { + return this.regexRule.getValue(); + } + + /** + * 设置多版本filter策略。 + * + * @param latestVersionsOnly, 为true,则只会对最新版本的值进行比较,否则会对该列的所有版本(最新的max_versions个)进行比较 + * @return this for chain invocation + */ + public SingleColumnValueRegexFilter setLatestVersionsOnly(boolean latestVersionsOnly) { + this.latestVersionsOnly = latestVersionsOnly; + return this; + } + + public boolean getLatestVersionsOnly() { + return latestVersionsOnly; + } + + @Override + public FilterType getFilterType() { + return FilterType.SINGLE_COLUMN_VALUE_FILTER; + } + + @Override + public ByteString serialize() { + return OTSProtocolBuilder.buildSingleColumnValueRegexFilter(this); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/iterator/BulkExportIterator.java b/src/main/java/com/alicloud/openservices/tablestore/model/iterator/BulkExportIterator.java new file mode 100644 index 0000000..0197eb0 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/iterator/BulkExportIterator.java @@ -0,0 +1,117 @@ +package com.alicloud.openservices.tablestore.model.iterator; + +import com.alicloud.openservices.tablestore.ClientException; +import com.alicloud.openservices.tablestore.SyncClientInterface; +import com.alicloud.openservices.tablestore.model.*; +import com.alicloud.openservices.tablestore.model.tunnel.BulkExportQueryCriteria; + +import java.util.Iterator; +import java.util.NoSuchElementException; + +public class BulkExportIterator implements RowIterator { + + private SyncClientInterface client; + private RangeIteratorParameter parameter; + + private BulkExportResponse result; + private Iterator rowsIter; + private int totalCount; + private int bufferSize; + private int rowsRead; + + public BulkExportIterator(SyncClientInterface client, RangeIteratorParameter parameter) { + this.client = client; + this.parameter = parameter; + this.rowsRead = 0; + this.totalCount = parameter.getMaxCount(); + this.bufferSize = parameter.getBufferSize(); + + if (bufferSize == -1) { + bufferSize = totalCount; + } else if (totalCount != -1 && bufferSize > totalCount) { + bufferSize = totalCount; + } + + fetchData(buildRequest()); + } + + private BulkExportRequest buildRequest() { + BulkExportQueryCriteria criteria = new BulkExportQueryCriteria(parameter.getTableName()); + criteria.addColumnsToGet(parameter.getColumnsToGet()); + + if (parameter.hasSetFilter()) { + criteria.setFilter(parameter.getFilter()); + } + + if (result == null) { + criteria.setInclusiveStartPrimaryKey(parameter.getInclusiveStartPrimaryKey()); + } else { + criteria.setInclusiveStartPrimaryKey(result.getNextStartPrimaryKey()); + } + + criteria.setExclusiveEndPrimaryKey(parameter.getExclusiveEndPrimaryKey()); + if (bufferSize > 0) { + if (totalCount != -1 && totalCount - rowsRead < bufferSize) { + //criteria.setLimit(totalCount - rowsRead); + } else { + //criteria.setLimit(bufferSize); + } + } + return new BulkExportRequest(criteria); + } + + private void fetchData(BulkExportRequest request) { + BulkExportResponse result = client.bulkExport(request); + this.result = result; + SimpleRowMatrixBlockParser parser = new SimpleRowMatrixBlockParser(result.getRows()); + this.rowsIter = parser.getRows().iterator(); + this.rowsRead += parser.getRows().size(); + } + + private boolean isBufferHasMoreData() { + return rowsIter.hasNext(); + } + + private Row getNextFromBuffer() { + return rowsIter.next(); + } + + @Override + public boolean hasNext() { + // has data in buffer + if (isBufferHasMoreData()) { + return true; + } + + // need to send one more request + PrimaryKey nextToken = result.getNextStartPrimaryKey(); + while (nextToken != null && !nextToken.isEmpty() && totalCount != rowsRead) { + fetchData(buildRequest()); + if (isBufferHasMoreData()) { + return true; + } + nextToken = result.getNextStartPrimaryKey(); + } + + return false; + } + + @Override + public Row next() { + if (!hasNext()) { + throw new NoSuchElementException(); + } + + return getNextFromBuffer(); + } + + @Override + public void remove() { + throw new ClientException("RowIterator do not support remove()."); + } + + public long getTotalCount() { + return totalCount; + } +} + diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/RowIterator.java b/src/main/java/com/alicloud/openservices/tablestore/model/iterator/GetRangeRowIterator.java similarity index 78% rename from src/main/java/com/alicloud/openservices/tablestore/model/RowIterator.java rename to src/main/java/com/alicloud/openservices/tablestore/model/iterator/GetRangeRowIterator.java index a8ed2a2..4079ece 100755 --- a/src/main/java/com/alicloud/openservices/tablestore/model/RowIterator.java +++ b/src/main/java/com/alicloud/openservices/tablestore/model/iterator/GetRangeRowIterator.java @@ -1,30 +1,36 @@ -package com.alicloud.openservices.tablestore.model; +package com.alicloud.openservices.tablestore.model.iterator; import java.util.Iterator; import java.util.NoSuchElementException; import com.alicloud.openservices.tablestore.ClientException; -import com.alicloud.openservices.tablestore.SyncClient; import com.alicloud.openservices.tablestore.SyncClientInterface; +import com.alicloud.openservices.tablestore.model.GetRangeRequest; +import com.alicloud.openservices.tablestore.model.GetRangeResponse; +import com.alicloud.openservices.tablestore.model.PrimaryKey; +import com.alicloud.openservices.tablestore.model.RangeIteratorParameter; +import com.alicloud.openservices.tablestore.model.RangeRowQueryCriteria; +import com.alicloud.openservices.tablestore.model.Row; -public class RowIterator implements Iterator { +public class GetRangeRowIterator implements RowIterator { private SyncClientInterface client; private RangeIteratorParameter parameter; - + private GetRangeResponse result; private Iterator rowsIter; private int totalCount; private int bufferSize; private int rowsRead; + private long completedBytes; - public RowIterator(SyncClientInterface client, RangeIteratorParameter parameter) { + public GetRangeRowIterator(SyncClientInterface client, RangeIteratorParameter parameter) { this.client = client; this.parameter = parameter; this.rowsRead = 0; this.totalCount = parameter.getMaxCount(); this.bufferSize = parameter.getBufferSize(); - + this.completedBytes = 0; if (bufferSize == -1) { bufferSize = totalCount; } else if (totalCount != -1 && bufferSize > totalCount) { @@ -33,7 +39,7 @@ public RowIterator(SyncClientInterface client, RangeIteratorParameter parameter) fetchData(buildRequest()); } - + private GetRangeRequest buildRequest() { RangeRowQueryCriteria criteria = new RangeRowQueryCriteria(parameter.getTableName()); criteria.setDirection(parameter.getDirection()); @@ -59,7 +65,7 @@ private GetRangeRequest buildRequest() { } else { criteria.setInclusiveStartPrimaryKey(result.getNextStartPrimaryKey()); } - + criteria.setExclusiveEndPrimaryKey(parameter.getExclusiveEndPrimaryKey()); if (bufferSize > 0) { if (totalCount != -1 && totalCount - rowsRead < bufferSize) { @@ -72,16 +78,17 @@ private GetRangeRequest buildRequest() { } private void fetchData(GetRangeRequest request) { - GetRangeResponse result = client.getRange(request); + GetRangeResponse result = client.getRange(request); this.result = result; this.rowsIter = result.getRows().iterator(); this.rowsRead += result.getRows().size(); + this.completedBytes += result.getBodyBytes(); } private boolean isBufferHasMoreData() { return rowsIter.hasNext(); } - + private Row getNextFromBuffer() { return rowsIter.next(); } @@ -111,7 +118,7 @@ public Row next() { if (!hasNext()) { throw new NoSuchElementException(); } - + return getNextFromBuffer(); } @@ -120,4 +127,12 @@ public void remove() { throw new ClientException("RowIterator do not support remove()."); } + public long getTotalCount() { + return totalCount; + } + + public long getCompletedBytes() { + return completedBytes; + } } + diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/iterator/ParallelScanRowIterator.java b/src/main/java/com/alicloud/openservices/tablestore/model/iterator/ParallelScanRowIterator.java new file mode 100755 index 0000000..2d39225 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/iterator/ParallelScanRowIterator.java @@ -0,0 +1,82 @@ +package com.alicloud.openservices.tablestore.model.iterator; + +import java.util.Iterator; +import java.util.NoSuchElementException; + +import com.alicloud.openservices.tablestore.ClientException; +import com.alicloud.openservices.tablestore.SyncClientInterface; +import com.alicloud.openservices.tablestore.model.Row; +import com.alicloud.openservices.tablestore.model.search.ParallelScanRequest; +import com.alicloud.openservices.tablestore.model.search.ParallelScanResponse; + +public class ParallelScanRowIterator implements RowIterator { + + private SyncClientInterface client; + private Iterator rowsIterator; + private ParallelScanRequest parallelScanRequest; + private ParallelScanResponse parallelScanResponse; + private long completedBytes; + + public ParallelScanRowIterator(SyncClientInterface syncClient, ParallelScanRequest parallelScanRequest) { + this.parallelScanRequest = parallelScanRequest; + this.client = syncClient; + if (null != parallelScanRequest.getScanQuery().getToken()) { + throw new IllegalArgumentException("ScanQuery's token must be null when initializing the ParallelScanRowIterator."); + } + fetchData(); + } + + private void fetchData() { + if (null != parallelScanResponse) { + if (null == parallelScanResponse.getNextToken()) { + return; + } else { + parallelScanRequest.getScanQuery().setToken(parallelScanResponse.getNextToken()); + } + } + parallelScanResponse = this.client.parallelScan(parallelScanRequest); + completedBytes += parallelScanResponse.getBodyBytes(); + rowsIterator = parallelScanResponse.getRows().iterator(); + } + + + private boolean isBufferHasMoreData() { + return rowsIterator.hasNext(); + } + + private Row getNextFromBuffer() { + return rowsIterator.next(); + } + + @Override + public boolean hasNext() { + // has data in buffer + if (isBufferHasMoreData()) { + return true; + } + fetchData(); + return isBufferHasMoreData(); + } + + @Override + public Row next() { + if (!hasNext()) { + throw new NoSuchElementException(); + } + return getNextFromBuffer(); + } + + @Override + public void remove() { + throw new ClientException("RowIterator do not support remove()."); + } + + @Override + public long getTotalCount() { + throw new ClientException("ParallelScanRowIterator do not support getTotalCount()."); + } + + public long getCompletedBytes() { + return this.completedBytes; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/iterator/RowIterator.java b/src/main/java/com/alicloud/openservices/tablestore/model/iterator/RowIterator.java new file mode 100755 index 0000000..a3d2302 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/iterator/RowIterator.java @@ -0,0 +1,9 @@ +package com.alicloud.openservices.tablestore.model.iterator; + +import java.util.Iterator; + +import com.alicloud.openservices.tablestore.model.Row; + +public interface RowIterator extends Iterator { + long getTotalCount(); +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/iterator/SearchRowIterator.java b/src/main/java/com/alicloud/openservices/tablestore/model/iterator/SearchRowIterator.java new file mode 100755 index 0000000..1d6f517 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/iterator/SearchRowIterator.java @@ -0,0 +1,89 @@ +package com.alicloud.openservices.tablestore.model.iterator; + +import java.util.Iterator; +import java.util.NoSuchElementException; + +import com.alicloud.openservices.tablestore.ClientException; +import com.alicloud.openservices.tablestore.SyncClientInterface; +import com.alicloud.openservices.tablestore.model.Row; +import com.alicloud.openservices.tablestore.model.search.SearchRequest; +import com.alicloud.openservices.tablestore.model.search.SearchResponse; + +public class SearchRowIterator implements RowIterator { + + private static int DEFAULT_PAGE_LIMIT = 100; + + private SyncClientInterface client; + private Iterator rowsIterator; + private SearchRequest searchRequest; + private SearchResponse searchResponse; + private long completedBytes; + + public SearchRowIterator(SyncClientInterface syncClient, SearchRequest searchRequest) { + this.searchRequest = searchRequest; + this.client = syncClient; + this.completedBytes = 0; + fetchData(); + } + + private void fetchData() { + if (null != searchResponse) { + if (null == searchResponse.getNextToken()) { + return; + } else { + searchRequest.getSearchQuery().setToken(searchResponse.getNextToken()); + } + } + if (searchRequest.getSearchQuery().getLimit() == null) { + searchRequest.getSearchQuery().setLimit(DEFAULT_PAGE_LIMIT); + } + searchResponse = this.client.search(searchRequest); + completedBytes += searchResponse.getBodyBytes(); + if (searchResponse.isAllSuccess()) { + rowsIterator = searchResponse.getRows().iterator(); + } else { + throw new RuntimeException("not all success"); + } + } + + + private boolean isBufferHasMoreData() { + return rowsIterator.hasNext(); + } + + private Row getNextFromBuffer() { + return rowsIterator.next(); + } + + @Override + public boolean hasNext() { + // has data in buffer + if (isBufferHasMoreData()) { + return true; + } + fetchData(); + return isBufferHasMoreData(); + } + + @Override + public Row next() { + if (!hasNext()) { + throw new NoSuchElementException(); + } + return getNextFromBuffer(); + } + + @Override + public void remove() { + throw new ClientException("RowIterator do not support remove()."); + } + + @Override + public long getTotalCount() { + return searchResponse == null ? -1 : searchResponse.getTotalCount(); + } + + public long getCompletedBytes() { + return completedBytes; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/Collapse.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/Collapse.java index 0abaeee..4d1c2f1 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/model/search/Collapse.java +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/Collapse.java @@ -7,6 +7,9 @@ * 但是我们通过设置{@link Collapse}为菜系type,就可以返回8个最火的菜(每个菜系只返回一个,因为{@link Collapse}帮我们进行了去重)。一次查询搞定用户的需求。

*/ public class Collapse { + public Collapse(String fieldName) { + this.fieldName = fieldName; + } private String fieldName; diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/CreateSearchIndexRequest.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/CreateSearchIndexRequest.java index 7439f55..26f5bdc 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/model/search/CreateSearchIndexRequest.java +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/CreateSearchIndexRequest.java @@ -1,8 +1,12 @@ package com.alicloud.openservices.tablestore.model.search; +import com.alicloud.openservices.tablestore.core.utils.NumberUtils; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; import com.alicloud.openservices.tablestore.model.OperationNames; import com.alicloud.openservices.tablestore.model.Request; +import java.util.concurrent.TimeUnit; + public class CreateSearchIndexRequest implements Request { /** @@ -19,6 +23,18 @@ public class CreateSearchIndexRequest implements Request { */ private IndexSchema indexSchema; + /** + * 一般情况下,不需要设置本字段。 + * 仅在动态修改多元索引schema的场景下,通过setter方法进行设置本字段,作为重建索引的源索引名字。 + */ + private String sourceIndexName; + + /** + *

索引数据的TTL时间,单位为秒。

+ *

在表创建后,该配置项可通过调用{@link UpdateSearchIndexRequest}动态更改。

+ */ + private Integer timeToLive; + public CreateSearchIndexRequest() { } @@ -51,6 +67,49 @@ public void setIndexSchema(IndexSchema indexSchema) { this.indexSchema = indexSchema; } + public String getSourceIndexName() { + return sourceIndexName; + } + + public void setSourceIndexName(String sourceIndexName) { + this.sourceIndexName = sourceIndexName; + } + + /** + * 获取TTL时间,单位为秒。 + * @return TTL时间 + */ + public Integer getTimeToLive() { + return timeToLive; + } + + /** + *

索引数据的TTL时间

+ *

在表创建后,该配置项可通过调用{@link UpdateSearchIndexRequest}动态更改。

+ * + * @param days ttl, 参数单位是天 + */ + public CreateSearchIndexRequest setTimeToLiveInDays(int days) { + this.setTimeToLive(days, TimeUnit.DAYS); + return this; + } + + /** + *

索引数据的TTL时间。

+ *

在表创建后,该配置项可通过调用{@link UpdateSearchIndexRequest}动态更改。

+ */ + public CreateSearchIndexRequest setTimeToLive(int timeToLive, TimeUnit timeUnit) { + Preconditions.checkArgument(timeToLive > 0 || timeToLive == -1, + "The value of timeToLive can be -1 or any positive value."); + if (timeToLive == -1) { + this.timeToLive = -1; + } else { + long seconds = timeUnit.toSeconds(timeToLive); + this.timeToLive = NumberUtils.longToInt(seconds); + } + return this; + } + @Override public String getOperationName() { return OperationNames.OP_CREATE_SEARCH_INDEX; diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/DescribeSearchIndexResponse.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/DescribeSearchIndexResponse.java index b969c2b..66b81cd 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/model/search/DescribeSearchIndexResponse.java +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/DescribeSearchIndexResponse.java @@ -3,12 +3,24 @@ import com.alicloud.openservices.tablestore.core.utils.Jsonizable; import com.alicloud.openservices.tablestore.model.Response; +import java.util.ArrayList; +import java.util.List; + public class DescribeSearchIndexResponse extends Response implements Jsonizable { private IndexSchema schema; private SyncStat syncStat; private MeteringInfo meteringInfo; + private String brotherIndexName; + private List queryFlowWeight; + private Long createTime; + + /** + *

索引数据的TTL时间,单位为秒。

+ */ + private Integer timeToLive; + public DescribeSearchIndexResponse(Response meta) { super(meta); } @@ -37,6 +49,45 @@ public void setMeteringInfo(MeteringInfo meteringInfo) { this.meteringInfo = meteringInfo; } + public void setBrotherIndexName(String brotherIndexName) { + this.brotherIndexName = brotherIndexName; + } + + public String getBrotherIndexName() { + return brotherIndexName; + } + + public void setQueryFlowWeight(List queryFlowWeight) { + this.queryFlowWeight = queryFlowWeight; + } + + public void addQueryFlowWeight(QueryFlowWeight w) { + if (this.queryFlowWeight == null) { + this.queryFlowWeight = new ArrayList(); + } + this.queryFlowWeight.add(w); + } + + public List getQueryFlowWeight() { + return queryFlowWeight; + } + + public void setCreateTime(Long createTime) { + this.createTime = createTime; + } + + public Long getCreateTime() { + return createTime; + } + + public Integer getTimeToLive() { + return timeToLive; + } + + public void setTimeToLive(Integer timeToLive) { + this.timeToLive = timeToLive; + } + @Override public String jsonize() { StringBuilder sb = new StringBuilder(); @@ -62,6 +113,45 @@ public void jsonize(StringBuilder sb, String newline) { } else { sb.append("null"); } + + if (brotherIndexName != null) { + sb.append(","); + sb.append(newline); + sb.append("\"BrotherIndexName\": \""); + sb.append(brotherIndexName); + sb.append("\""); + } + + if (queryFlowWeight != null && queryFlowWeight.size() > 0) { + sb.append(","); + sb.append(newline); + sb.append("\"QueryFlowWeight\": ["); + boolean first = true; + for (QueryFlowWeight queryFlowWeight : this.queryFlowWeight) { + if (first) { + first = false; + } else { + sb.append(","); + sb.append(newline + " "); + } + queryFlowWeight.jsonize(sb, newline + " "); + } + sb.append("]"); + } + + if (createTime != null) { + sb.append(","); + sb.append(newline); + sb.append("\"CreateTime\": "); + sb.append(createTime); + } + if (timeToLive != null) { + sb.append(","); + sb.append(newline); + sb.append("\"TimeToLive\": "); + sb.append(timeToLive); + } + sb.append(newline.substring(0, newline.length() - 2)); sb.append("}"); } diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/FieldSchema.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/FieldSchema.java index 92ad560..e517b7d 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/model/search/FieldSchema.java +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/FieldSchema.java @@ -2,7 +2,12 @@ import com.alicloud.openservices.tablestore.ClientException; import com.alicloud.openservices.tablestore.core.utils.Jsonizable; +import com.alicloud.openservices.tablestore.model.search.analysis.AnalyzerParameter; +import com.alicloud.openservices.tablestore.model.search.analysis.FuzzyAnalyzerParameter; +import com.alicloud.openservices.tablestore.model.search.analysis.SingleWordAnalyzerParameter; +import com.alicloud.openservices.tablestore.model.search.analysis.SplitAnalyzerParameter; +import java.util.Collections; import java.util.List; /** @@ -12,9 +17,12 @@ public class FieldSchema implements Jsonizable { public enum Analyzer { SingleWord("single_word"), - MaxWord("max_word"); + MaxWord("max_word"), + MinWord("min_word"), + Split("split"), + Fuzzy("fuzzy"); - private String value; + private final String value; Analyzer(String value) { this.value = value; } @@ -28,6 +36,12 @@ public static Analyzer fromString(String value) { return SingleWord; } else if (value.equals(MaxWord.toString())) { return MaxWord; + } else if (value.equals(MinWord.toString())) { + return MinWord; + } else if (value.equals(Split.toString())) { + return Split; + } else if (value.equals(Fuzzy.toString())) { + return Fuzzy; } else { throw new ClientException("Unknown analyzer"); } @@ -51,9 +65,14 @@ public static Analyzer fromString(String value) { */ private IndexOptions indexOptions; /** - * 分词器设置 + * analyzer */ private Analyzer analyzer; + /** + * analyzer parameter + */ + private AnalyzerParameter analyzerParameter; + /** * 是否开启排序和聚合功能 */ @@ -75,6 +94,17 @@ public static Analyzer fromString(String value) { */ private List subFieldSchemas; + /** + * 是否是虚拟字段 + */ + private Boolean isVirtualField; + + /** + * 虚拟字段对应的原始字段。 + * 当前仅支持设置一个原始字段。 + */ + private List sourceFieldNames; + public FieldSchema(String fieldName, FieldType fieldType) { this.fieldName = fieldName; this.fieldType = fieldType; @@ -125,6 +155,15 @@ public FieldSchema setAnalyzer(Analyzer analyzer) { return this; } + public AnalyzerParameter getAnalyzerParameter() { + return analyzerParameter; + } + + public FieldSchema setAnalyzerParameter(AnalyzerParameter analyzerParameter) { + this.analyzerParameter = analyzerParameter; + return this; + } + public Boolean isEnableSortAndAgg() { return enableSortAndAgg; } @@ -161,6 +200,29 @@ public FieldSchema setSubFieldSchemas(List subFieldSchemas) { return this; } + public Boolean isVirtualField() { + return isVirtualField; + } + + public FieldSchema setVirtualField(Boolean virtualField) { + isVirtualField = virtualField; + return this; + } + + public List getSourceFieldNames() { + return sourceFieldNames; + } + + public FieldSchema setSourceFieldName(String sourceFieldName) { + this.sourceFieldNames = Collections.singletonList(sourceFieldName); + return this; + } + + public FieldSchema setSourceFieldNames(List sourceFieldNames) { + this.sourceFieldNames = sourceFieldNames; + return this; + } + @Override public String jsonize() { StringBuilder sb = new StringBuilder(); @@ -197,10 +259,37 @@ public void jsonize(StringBuilder sb, String newline) { sb.append(newline); } if (analyzer != null) { - sb.append("\"Analyzer\": "); + sb.append("\"Analyzer\": \""); sb.append(analyzer.toString()); - sb.append(","); + sb.append("\","); sb.append(newline); + + if (analyzerParameter != null) { + if (analyzer == Analyzer.SingleWord && analyzerParameter instanceof SingleWordAnalyzerParameter) { + sb.append("\"AnalyzerParameter\": {"); + sb.append("\"CaseSensitive\": "); + sb.append(((SingleWordAnalyzerParameter)analyzerParameter).isCaseSensitive()); + sb.append(", \"DelimitWord\": "); + sb.append(((SingleWordAnalyzerParameter)analyzerParameter).isDelimitWord()); + sb.append("},"); + sb.append(newline); + } else if (analyzer == Analyzer.Split && analyzerParameter instanceof SplitAnalyzerParameter) { + String delimiter = ((SplitAnalyzerParameter)analyzerParameter).getDelimiter(); + sb.append("\"AnalyzerParameter\": {"); + sb.append("\"Delimiter\": "); + sb.append(delimiter == null ? "null" : "\"" + delimiter + "\""); + sb.append("},"); + sb.append(newline); + } else if (analyzer == Analyzer.Fuzzy && analyzerParameter instanceof FuzzyAnalyzerParameter) { + sb.append("\"AnalyzerParameter\": {"); + sb.append("\"MinChars\": "); + sb.append(((FuzzyAnalyzerParameter)analyzerParameter).getMinChars()); + sb.append(", \"MaxChars\": "); + sb.append(((FuzzyAnalyzerParameter)analyzerParameter).getMaxChars()); + sb.append("},"); + sb.append(newline); + } + } } if (enableSortAndAgg != null) { sb.append("\"EnableSortAndAgg\": "); @@ -221,18 +310,37 @@ public void jsonize(StringBuilder sb, String newline) { sb.append(newline); } sb.append("\"SubFieldSchemas\": ["); - boolean first = true; - for (FieldSchema schema : subFieldSchemas) { - if (first) { - first = false; - } else { - sb.append(","); - sb.append(newline + " "); + if (subFieldSchemas != null) { + for (int i = 0; i < subFieldSchemas.size(); i++) { + FieldSchema schema = subFieldSchemas.get(i); + schema.jsonize(sb, newline); + if (i != subFieldSchemas.size() - 1) { + sb.append(", "); + sb.append(newline); + } } - schema.jsonize(sb, newline + " "); } sb.append("]"); - sb.append(newline.substring(0, newline.length() - 2)); + if (isVirtualField != null) { + sb.append(","); + sb.append(newline); + sb.append("\"IsVirtualField\": "); + sb.append(isVirtualField); + } + if (sourceFieldNames != null) { + sb.append(","); + sb.append(newline); + sb.append("\"SourceFieldNames\": ["); + for (int i = 0; i < sourceFieldNames.size(); i++) { + String sourceField = sourceFieldNames.get(i); + sb.append("\"").append(sourceField).append("\""); + if (i != sourceFieldNames.size() - 1) { + sb.append(", "); + } + } + sb.append("]"); + } + sb.append(newline); sb.append("}"); } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/IndexSchema.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/IndexSchema.java index 98774c6..2c6fd6a 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/model/search/IndexSchema.java +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/IndexSchema.java @@ -23,7 +23,6 @@ public class IndexSchema implements Jsonizable { /** * 自定义索引的预排序方式 - * @return */ private Sort indexSort; diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/IndexSetting.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/IndexSetting.java index cce1c71..4e42189 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/model/search/IndexSetting.java +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/IndexSetting.java @@ -51,15 +51,12 @@ public void jsonize(StringBuilder sb, String newline) { sb.append('{'); if (routingFields != null) { sb.append("\"RoutingFields\": ["); - boolean first = true; - for (String field : routingFields) { - if (first) { - first = false; - } else { - sb.append(","); - sb.append(newline + " "); + for (int i = 0; i < routingFields.size(); i++) { + String sourceField = routingFields.get(i); + sb.append("\"").append(sourceField).append("\""); + if (i != routingFields.size() - 1) { + sb.append(", "); } - sb.append(field); } sb.append("]"); } diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/MeteringInfo.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/MeteringInfo.java index 9d3efeb..2d56fb9 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/model/search/MeteringInfo.java +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/MeteringInfo.java @@ -17,7 +17,7 @@ public class MeteringInfo { /** * 索引表的总行数,该行数为上一次计量时(通过timestamp获取计量时间)统计到的值,并非当前时刻的值。 */ - private long docCount; + private long rowCount; /** * 索引表上一次计量的时间。 @@ -40,12 +40,12 @@ public void setStorageSize(long storageSize) { this.storageSize = storageSize; } - public long getDocCount() { - return docCount; + public long getRowCount() { + return rowCount; } - public void setDocCount(long docCount) { - this.docCount = docCount; + public void setRowCount(long rowCount) { + this.rowCount = rowCount; } public long getTimestamp() { diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/ParallelScanRequest.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/ParallelScanRequest.java new file mode 100644 index 0000000..95f83d6 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/ParallelScanRequest.java @@ -0,0 +1,214 @@ +package com.alicloud.openservices.tablestore.model.search; + +import com.google.gson.GsonBuilder; +import java.util.Arrays; +import java.util.List; + +import com.alicloud.openservices.tablestore.model.ComputeSplitsResponse; +import com.alicloud.openservices.tablestore.model.OperationNames; +import com.alicloud.openservices.tablestore.model.Request; +import com.alicloud.openservices.tablestore.model.search.SearchRequest.ColumnsToGet; + +/** + * Scan data from search index. + */ +public class ParallelScanRequest implements Request { + + /** + * the name of your table. + */ + private String tableName; + + /** + * SearchIndex index name. + */ + private String indexName; + + /** + * Query criteria. + */ + private ScanQuery scanQuery; + + /** + * Specify which property columns need to return. Recommend returning only what you need. + */ + private ColumnsToGet columnsToGet; + + /** + * {@link ParallelScanRequest} establishes a link to the server with this sessionId. + * sessionId can get from {@link ComputeSplitsResponse#getSessionId}. + */ + private byte[] sessionId; + + /** + * Request-level parallel scan timeout in millisecond + */ + private int timeoutInMillisecond = -1; + + public String getRequestInfo(boolean prettyFormat) { + GsonBuilder builder = new GsonBuilder() + .disableHtmlEscaping() + .disableInnerClassSerialization() + .serializeNulls() + .serializeSpecialFloatingPointValues() + .enableComplexMapKeySerialization(); + if (prettyFormat) { + return builder.setPrettyPrinting().create().toJson(this); + } else { + return builder.create().toJson(this); + } + } + + public void printRequestInfo() { + System.out.println(getRequestInfo(true)); + } + + + public ParallelScanRequest() { + } + + public static Builder newBuilder() { + return new Builder(); + } + + public String getTableName() { + return tableName; + } + + public ParallelScanRequest setTableName(String tableName) { + this.tableName = tableName; + return this; + } + + public String getIndexName() { + return indexName; + } + + public ParallelScanRequest setIndexName(String indexName) { + this.indexName = indexName; + return this; + } + + public ScanQuery getScanQuery() { + return scanQuery; + } + + public ParallelScanRequest setScanQuery(ScanQuery scanQuery) { + this.scanQuery = scanQuery; + return this; + } + + public ColumnsToGet getColumnsToGet() { + return columnsToGet; + } + + public ParallelScanRequest setColumnsToGet(ColumnsToGet columnsToGet) { + this.columnsToGet = columnsToGet; + return this; + } + + public byte[] getSessionId() { + return sessionId; + } + + public ParallelScanRequest setSessionId(byte[] sessionId) { + this.sessionId = sessionId; + return this; + } + + public int getTimeoutInMillisecond() { + return this.timeoutInMillisecond; + } + + public ParallelScanRequest setTimeoutInMillisecond(int timeoutInMillisecond) { + this.timeoutInMillisecond = timeoutInMillisecond; + return this; + } + + @Override + public String getOperationName() { + return OperationNames.OP_PARALLEL_SCAN; + } + + private ParallelScanRequest(Builder builder) { + setTableName(builder.tableName); + setIndexName(builder.indexName); + setScanQuery(builder.scanQuery); + setColumnsToGet(builder.columnsToGet); + setSessionId(builder.sessionId); + setTimeoutInMillisecond(builder.timeoutInMillisecond); + } + + public static final class Builder { + private String tableName; + private String indexName; + private ScanQuery scanQuery; + private ColumnsToGet columnsToGet; + private byte[] sessionId; + private int timeoutInMillisecond = -1; + + private Builder() {} + + public Builder tableName(String tableName) { + this.tableName = tableName; + return this; + } + + public Builder indexName(String indexName) { + this.indexName = indexName; + return this; + } + + public Builder scanQuery(ScanQuery scanQuery) { + this.scanQuery = scanQuery; + return this; + } + + /** + * Specify which property columns need to return. Recommend returning only what you need. + */ + public Builder addColumnsToGet(List columnsToGetList) { + if (this.columnsToGet == null) { + this.columnsToGet = new ColumnsToGet(); + } + this.columnsToGet.getColumns().addAll(columnsToGetList); + return this; + } + + /** + * Specify which property columns need to return. Recommend returning only what you need. + */ + public Builder addColumnsToGet(String... columnsToGet) { + if (this.columnsToGet == null) { + this.columnsToGet = new ColumnsToGet(); + } + this.columnsToGet.getColumns().addAll(Arrays.asList(columnsToGet)); + return this; + } + + /** + * All property columns which had created searchIndex need to return. + */ + public Builder returnAllColumnsFromIndex(boolean returnAllIndex) { + if (this.columnsToGet == null) { + this.columnsToGet = new ColumnsToGet(); + } + this.columnsToGet.setReturnAllFromIndex(returnAllIndex); + return this; + } + + public Builder sessionId(byte[] sessionId) { + this.sessionId = sessionId; + return this; + } + + public Builder timeout(int timeoutInMillisecond) { + this.timeoutInMillisecond = timeoutInMillisecond; + return this; + } + + public ParallelScanRequest build() { + return new ParallelScanRequest(this); + } + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/ParallelScanResponse.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/ParallelScanResponse.java new file mode 100644 index 0000000..32e7f86 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/ParallelScanResponse.java @@ -0,0 +1,69 @@ +package com.alicloud.openservices.tablestore.model.search; + +import java.util.List; + +import com.alicloud.openservices.tablestore.model.Response; +import com.alicloud.openservices.tablestore.model.Row; +import com.alicloud.openservices.tablestore.model.search.agg.AggregationResults; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupByResults; +import com.google.gson.GsonBuilder; + +public class ParallelScanResponse extends Response { + + private List rows; + + private byte[] nextToken; + + private long bodyBytes; + + public ParallelScanResponse(Response meta) { + super(meta); + } + + public ParallelScanResponse() { + } + + public List getRows() { + return rows; + } + + public ParallelScanResponse setRows(List rows) { + this.rows = rows; + return this; + } + + public byte[] getNextToken() { + return nextToken; + } + + public ParallelScanResponse setNextToken(byte[] nextToken) { + this.nextToken = nextToken; + return this; + } + + public String getResponseInfo(boolean prettyFormat) { + GsonBuilder builder = new GsonBuilder() + .disableHtmlEscaping() + .disableInnerClassSerialization() + .serializeNulls() + .serializeSpecialFloatingPointValues() + .enableComplexMapKeySerialization(); + if (prettyFormat) { + return builder.setPrettyPrinting().create().toJson(this); + } else { + return builder.create().toJson(this); + } + } + + public void printResponseInfo() { + System.out.println(getResponseInfo(true)); + } + + public long getBodyBytes() { + return bodyBytes; + } + + public void setBodyBytes(long bodyBytes) { + this.bodyBytes = bodyBytes; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/QueryFlowWeight.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/QueryFlowWeight.java new file mode 100644 index 0000000..8c96126 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/QueryFlowWeight.java @@ -0,0 +1,65 @@ +package com.alicloud.openservices.tablestore.model.search; + +import com.alicloud.openservices.tablestore.core.utils.Jsonizable; + +public class QueryFlowWeight implements Jsonizable { + /** + * index name + */ + private String indexName; + + /** + * query flow weight, should be within range [0, 100] + */ + private Integer weight; + + + public QueryFlowWeight(String indexName, Integer weight) { + this.indexName = indexName; + this.weight = weight; + } + + public String getIndexName() { + return indexName; + } + + public QueryFlowWeight setIndexName(String indexName) { + this.indexName = indexName; + return this; + } + + public Integer getWeight() { + return weight; + } + + public QueryFlowWeight setWeight(Integer weight) { + this.weight = weight; + return this; + } + + + @Override + public String jsonize() { + StringBuilder sb = new StringBuilder(); + jsonize(sb, "\n "); + return sb.toString(); + } + + @Override + public void jsonize(StringBuilder sb, String newline) { + sb.append("{"); + sb.append(newline); + + sb.append("\"IndexName\": \""); + sb.append(indexName); + sb.append("\""); + sb.append(","); + sb.append(newline); + + sb.append("\"Weight\": "); + sb.append(weight.intValue()); + sb.append(newline); + + sb.append("}"); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/ScanQuery.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/ScanQuery.java new file mode 100644 index 0000000..aac83af --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/ScanQuery.java @@ -0,0 +1,194 @@ +package com.alicloud.openservices.tablestore.model.search; + +import com.alicloud.openservices.tablestore.SyncClientInterface; +import com.alicloud.openservices.tablestore.TableStoreException; +import com.alicloud.openservices.tablestore.model.search.query.Query; +import com.alicloud.openservices.tablestore.model.search.query.QueryBuilder; +import com.alicloud.openservices.tablestore.model.ComputeSplitsResponse; + +/** + * Query for scan data. + * + *

Function:

+ *

The function is to scan data in batches.

+ * + *

Usage scenarios:

+ *

When you want to scan data in bulk, and you don't care about sorting, aggregation, etc.

+ *

{@link ScanQuery} supports multiple threads to access data in parallel.

+ *

{@link ScanQuery#setLimit(Integer)} can be very large and you can san data faster.

+ * + *

Exception:

+ *

{@link TableStoreException}:

+ *

When you scan data, there may be an exception that session is expired. {@link TableStoreException#getErrorCode()} is OTSServerSessionExpired.

+ *

For Example: + *

    + *
  • Scan data after the time of aliveTime.
  • + *
  • The Tablestore service is being upgraded.
  • + *
  • The request has a network timeout.
  • + *
+ *

You should retry ComputeSplitsRequest and then retry ScanQuery.

+ */ +public class ScanQuery{ + + /** + * Query statement, which decides what data you can get. + */ + private Query query; + + /** + * How many pieces of data are returned in a network request. + */ + private Integer limit; + + /** + * Maximum number of parallels. The default value is 1. + * Its value can refer to {@link ComputeSplitsResponse#getSplitsSize()}. It is not allowed to exceed the reference value. + *

{@link ScanQuery} supports multiple threads to access data in parallel. + * Every thread uses the same {@link ScanQuery#query}, but you should set a different {@link ScanQuery#currentParallelId}

. + */ + private Integer maxParallel; + + /** + * ID of parallel, value range is [0, maxParallel) + */ + private Integer currentParallelId; + + /** + * The aliveTime of this request. + * Unit: second, the default is 60 seconds. The request needs to be re initiated after timeout. + * The aliveTime will be refreshed every time the data is fetched. + */ + private Integer aliveTime; + + /** + * Token used for page turning. + * It is recommended to use the iterator interface of {@link SyncClientInterface#createParallelScanIterator(ParallelScanRequest)}. + * It has encapsulated continuous page turning calls and does not require users to directly use this parameter. + */ + private byte[] token; + + public ScanQuery() { + } + + public Query getQuery() { + return query; + } + + public ScanQuery setQuery(Query query) { + this.query = query; + return this; + } + + public Integer getLimit() { + return limit; + } + + public ScanQuery setLimit(Integer limit) { + this.limit = limit; + return this; + } + + public Integer getMaxParallel() { + return maxParallel; + } + + public ScanQuery setMaxParallel(Integer maxParallel) { + this.maxParallel = maxParallel; + return this; + } + + public Integer getCurrentParallelId() { + return currentParallelId; + } + + public ScanQuery setCurrentParallelId(Integer currentParallelId) { + this.currentParallelId = currentParallelId; + return this; + } + + public Integer getAliveTime() { + return aliveTime; + } + + public ScanQuery setAliveTime(Integer aliveTime) { + this.aliveTime = aliveTime; + return this; + } + + public byte[] getToken() { + return token; + } + + public ScanQuery setToken(byte[] token) { + this.token = token; + return this; + } + + private ScanQuery(Builder builder) { + setQuery(builder.query); + setLimit(builder.limit); + setMaxParallel(builder.maxParallel); + setCurrentParallelId(builder.currentParallelId); + setAliveTime(builder.aliveTime); + setToken(builder.token); + } + + public static Builder newBuilder() { + return new Builder(); + } + + public static final class Builder { + private Query query; + private Integer limit; + private Integer maxParallel; + private Integer currentParallelId; + private Integer aliveTime; + private byte[] token; + + private Builder() {} + + public Builder query(QueryBuilder query) { + this.query = query.build(); + return this; + } + + public Builder query(Query query) { + this.query = query; + return this; + } + + public Builder limit(int limit) { + this.limit = limit; + return this; + } + + public Builder maxParallel(int maxParallel) { + this.maxParallel = maxParallel; + return this; + } + + public Builder currentParallelId(int currentParallelId) { + this.currentParallelId = currentParallelId; + return this; + } + + public Builder aliveTimeInSeconds(int aliveTime) { + this.aliveTime = aliveTime; + return this; + } + + /** + * Token used for page turning. + * It is recommended to use the iterator interface of {@link SyncClientInterface#createParallelScanIterator(ParallelScanRequest)}. + * It has encapsulated continuous page turning calls and does not require users to directly use this parameter. + */ + public Builder token(byte[] token) { + this.token = token; + return this; + } + + public ScanQuery build() { + return new ScanQuery(this); + } + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/SearchQuery.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/SearchQuery.java index 9b0db25..badb7e8 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/model/search/SearchQuery.java +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/SearchQuery.java @@ -1,6 +1,14 @@ package com.alicloud.openservices.tablestore.model.search; +import java.util.ArrayList; +import java.util.List; + +import com.alicloud.openservices.tablestore.model.search.agg.Aggregation; +import com.alicloud.openservices.tablestore.model.search.agg.AggregationBuilder; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupBy; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupByBuilder; import com.alicloud.openservices.tablestore.model.search.query.Query; +import com.alicloud.openservices.tablestore.model.search.query.QueryBuilder; import com.alicloud.openservices.tablestore.model.search.sort.Sort; /** @@ -35,10 +43,38 @@ public class SearchQuery { */ private Sort sort; + /** + * 是否返回匹配到的总行数 + */ private boolean getTotalCount = false; + private List aggregationList; + + private List groupByList; + private byte[] token; + public static Builder newBuilder() { + return new Builder(); + } + + public List getAggregationList() { + return aggregationList; + } + + public void setAggregationList( + List aggregationList) { + this.aggregationList = aggregationList; + } + + public List getGroupByList() { + return groupByList; + } + + public void setGroupByList(List groupByList) { + this.groupByList = groupByList; + } + public Integer getOffset() { return offset; } @@ -98,6 +134,117 @@ public byte[] getToken() { public void setToken(byte[] token) { this.token = token; - this.sort = null; // Token中编码了Sort条件,所以设置Token时不需要设置Sort + // Token中编码了Sort条件,所以设置Token时不需要设置Sort + if (null != token) { + this.sort = null; + } + } + + public SearchQuery() { + } + + public SearchQuery toCopy() { + SearchQuery copy = new SearchQuery(); + copy.setAggregationList(this.getAggregationList()); + copy.setCollapse(this.getCollapse()); + copy.setGetTotalCount(this.isGetTotalCount()); + copy.setGroupByList(this.getGroupByList()); + copy.setLimit(this.getLimit()); + copy.setOffset(this.getOffset()); + copy.setQuery(this.getQuery()); + copy.setSort(this.getSort()); + copy.setToken(this.getToken()); + return copy; + } + + private SearchQuery(Builder builder) { + setOffset(builder.offset); + setLimit(builder.limit); + setQuery(builder.query); + setCollapse(builder.collapse); + setSort(builder.sort); + setGetTotalCount(builder.getTotalCount); + setAggregationList(builder.aggregationList); + setGroupByList(builder.groupByList); + setToken(builder.token); + } + + public static final class Builder { + private Integer offset; + private Integer limit; + private Query query; + private Collapse collapse; + private Sort sort; + private boolean getTotalCount = false; + private List aggregationList; + private List groupByList; + private byte[] token; + + private Builder() {} + + public Builder offset(int val) { + offset = val; + return this; + } + + public Builder limit(int val) { + limit = val; + return this; + } + + public Builder query(QueryBuilder queryBuilder) { + query = queryBuilder.build(); + return this; + } + + /** + * 字段折叠 + * 能够实现某个字段的结果去重。 + */ + public Builder collapse(String fieldName) { + collapse = new Collapse(fieldName); + return this; + } + + public Builder sort(Sort val) { + sort = val; + return this; + } + + /** + * 是否返回匹配到的总行数 + */ + public Builder getTotalCount(boolean val) { + getTotalCount = val; + return this; + } + + public Builder addAggregation(AggregationBuilder aggregationBuilder) { + if (aggregationList == null) { + aggregationList = new ArrayList(); + } + aggregationList.add(aggregationBuilder.build()); + return this; + } + + public Builder addGroupBy(GroupByBuilder groupByBuilder) { + if (groupByList == null) { + groupByList = new ArrayList(); + } + groupByList.add(groupByBuilder.build()); + return this; + } + + /** + * 进行翻页的参数 + */ + public Builder token(byte[] val) { + token = val; + return this; + } + + public SearchQuery build() { + return new SearchQuery(this); + } } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/SearchRequest.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/SearchRequest.java index 33504b8..f02ed98 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/model/search/SearchRequest.java +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/SearchRequest.java @@ -1,68 +1,101 @@ package com.alicloud.openservices.tablestore.model.search; +import com.alicloud.openservices.tablestore.model.ColumnValue; +import com.google.gson.ExclusionStrategy; +import com.google.gson.FieldAttributes; +import com.google.gson.GsonBuilder; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + import com.alicloud.openservices.tablestore.model.OperationNames; import com.alicloud.openservices.tablestore.model.PrimaryKey; +import com.alicloud.openservices.tablestore.model.PrimaryKeyBuilder; import com.alicloud.openservices.tablestore.model.Request; -import java.util.List; - - /** - * SearchIndex的搜索的Request + * SearchIndex's Request */ public class SearchRequest implements Request { - public static class ColumnsToGet { - private List columns; - private boolean returnAll; - - public List getColumns() { - return columns; - } - - public void setColumns(List columns) { - this.columns = columns; - } - - public boolean isReturnAll() { - return returnAll; - } - - public void setReturnAll(boolean returnAll) { - this.returnAll = returnAll; - } + public SearchRequest() { } - public SearchRequest(String tableName, String indexName, SearchQuery searchQuery) { + public SearchRequest(String tableName, String indexName, SearchQuery queryBase) { this.tableName = tableName; this.indexName = indexName; - this.searchQuery = searchQuery; + this.searchQuery = queryBase; } /** - * TableStore的表名 + * TableStore's table name */ private String tableName; + /** - * SearchIndex中的index名 + * SearchIndex index name */ private String indexName; + /** - * 查询语句,具体参数详见{@link SearchQuery} + * Query criteria. {@link SearchQuery} */ private SearchQuery searchQuery; + /** - * 指定哪些属性列需要返回 - *

如果SearchIndex中的属性列太多,而只想要某些属性列,则可以减少网络传输的数据量,提高响应速度

+ * Specify which property columns need to return. Recommend returning only what you need. */ private ColumnsToGet columnsToGet; + + /** + * Request-level search timeout in millisecond + */ + private int timeoutInMillisecond = -1; + /** - * 路由字段 - * 默认为空,大多数场景下不需要使用该值。如果使用了自定义路由,可以指定路由字段。 - *

注意:高级特性。如需了解或使用请提工单或联系开发人员

+ * Routing field. + *

The default is empty, which is not required in most scenarios. If a custom route is used, you can specify the route field.

+ *

Note: advanced features. If you need to know or use, please submit a ticket or contact the developer.

*/ private List routingValues; + + public static class ColumnsToGet { + private List columns = new ArrayList(); + private boolean returnAll = false; + private boolean returnAllFromIndex = false; + + public List getColumns() { + return columns; + } + + public void setColumns(List columns) { + this.columns = columns; + } + + public boolean isReturnAll() { + return returnAll; + } + + public void setReturnAll(boolean returnAll) { + if (returnAll && returnAllFromIndex) { + throw new IllegalArgumentException("The parameter returnAll and returnAllFromIndex should not all be true."); + } + this.returnAll = returnAll; + } + + public boolean isReturnAllFromIndex() { + return returnAllFromIndex; + } + + public void setReturnAllFromIndex(boolean returnAllFromIndex) { + if (returnAll && returnAllFromIndex) { + throw new IllegalArgumentException("The parameter returnAll and returnAllFromIndex should not all be true."); + } + this.returnAllFromIndex = returnAllFromIndex; + } + } + public String getTableName() { return tableName; } @@ -79,12 +112,13 @@ public void setIndexName(String indexName) { this.indexName = indexName; } - public SearchQuery getSearchQuery() { - return searchQuery; + public SearchRequest setSearchQuery(SearchQuery searchQuery) { + this.searchQuery = searchQuery; + return this; } - public void setSearchQuery(SearchQuery searchQuery) { - this.searchQuery = searchQuery; + public SearchQuery getSearchQuery() { + return searchQuery; } public ColumnsToGet getColumnsToGet() { @@ -103,8 +137,166 @@ public void setRoutingValues(List routingValues) { this.routingValues = routingValues; } + public int getTimeoutInMillisecond() { + return timeoutInMillisecond; + } + + public void setTimeoutInMillisecond(int timeoutInMillisecond) { + this.timeoutInMillisecond = timeoutInMillisecond; + } + @Override public String getOperationName() { return OperationNames.OP_SEARCH; } + + public String getRequestInfo(boolean prettyFormat) { + GsonBuilder builder = new GsonBuilder() + .disableHtmlEscaping() + .serializeNulls() + .serializeSpecialFloatingPointValues() + .setExclusionStrategies(new ExclusionStrategy() { + @Override + public boolean shouldSkipField(FieldAttributes f) { + return f.getName().equals("dataSize") + && f.getDeclaredClass().getName().equals("int") + && f.getDeclaringClass().equals(ColumnValue.class); + } + + @Override + public boolean shouldSkipClass(Class aClass) { + return false; + } + }) + .enableComplexMapKeySerialization(); + if (prettyFormat) { + return builder.setPrettyPrinting().create().toJson(this); + } else { + return builder.create().toJson(this); + } + } + + public void printRequestInfo() { + System.out.println(getRequestInfo(true)); + } + + private SearchRequest(Builder builder) { + setTableName(builder.tableName); + setIndexName(builder.indexName); + setSearchQuery(builder.searchQuery); + setColumnsToGet(builder.columnsToGet); + setRoutingValues(builder.routingValues); + setTimeoutInMillisecond(builder.timeoutInMillisecond); + } + + public static Builder newBuilder() { + return new Builder(); + } + + public static final class Builder { + private String tableName; + private String indexName; + private SearchQuery searchQuery; + private ColumnsToGet columnsToGet; + private List routingValues; + private int timeoutInMillisecond = -1; + + private Builder() {} + + public Builder tableName(String tableName) { + this.tableName = tableName; + return this; + } + + public Builder indexName(String indexName) { + this.indexName = indexName; + return this; + } + + public Builder searchQuery(SearchQuery searchQuery) { + this.searchQuery = searchQuery; + return this; + } + + /** + * Specify which property columns need to return. Recommend returning only what you need. + */ + public Builder addColumnsToGet(String... columnsToGet) { + if (this.columnsToGet == null) { + this.columnsToGet = new ColumnsToGet(); + } + this.columnsToGet.getColumns().addAll(Arrays.asList(columnsToGet)); + return this; + } + + /** + * Specify which property columns need to return. Recommend returning only what you need. + */ + public Builder addColumnsToGet(List columnsToGetList) { + if (this.columnsToGet == null) { + this.columnsToGet = new ColumnsToGet(); + } + this.columnsToGet.getColumns().addAll(columnsToGetList); + return this; + } + + /** + * All property columns need to return. + */ + public Builder returnAllColumns(boolean returnAll) { + if (this.columnsToGet == null) { + this.columnsToGet = new ColumnsToGet(); + } + this.columnsToGet.setReturnAll(returnAll); + return this; + } + + /** + * All property columns which had created searchIndex need to return. + */ + public Builder returnAllColumnsFromIndex(boolean returnAllIndex) { + if (this.columnsToGet == null) { + this.columnsToGet = new ColumnsToGet(); + } + this.columnsToGet.setReturnAllFromIndex(returnAllIndex); + return this; + } + + /** + * Routing field. + *

The default is empty, which is not required in most scenarios. If a custom route is used, you can specify the route field.

+ *

Note: advanced features. If you need to know or use, please submit a ticket or contact the developer.

+ */ + public Builder addRoutingValue(PrimaryKeyBuilder primaryKeyBuilder) { + if (routingValues == null) { + routingValues = new ArrayList(); + } + this.routingValues.add(primaryKeyBuilder.build()); + return this; + } + + /** + * Routing field. + *

The default is empty, which is not required in most scenarios. If a custom route is used, you can specify the route field.

+ *

Note: advanced features. If you need to know or use, please submit a ticket or contact the developer.

+ */ + public Builder addRoutingValues(List primaryKeys) { + if (routingValues == null) { + routingValues = new ArrayList(); + } + this.routingValues.addAll(primaryKeys); + return this; + } + + public Builder timeout(int timeoutInMillisecond) { + if (timeoutInMillisecond > 0) { + this.timeoutInMillisecond = timeoutInMillisecond; + } + return this; + } + + public SearchRequest build() { + return new SearchRequest(this); + } + } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/SearchResponse.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/SearchResponse.java index 02edbd8..de4d734 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/model/search/SearchResponse.java +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/SearchResponse.java @@ -1,9 +1,12 @@ package com.alicloud.openservices.tablestore.model.search; +import java.util.List; + import com.alicloud.openservices.tablestore.model.Response; import com.alicloud.openservices.tablestore.model.Row; - -import java.util.List; +import com.alicloud.openservices.tablestore.model.search.agg.AggregationResults; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupByResults; +import com.google.gson.GsonBuilder; /** * SearchIndex的返回结果 @@ -11,8 +14,8 @@ public class SearchResponse extends Response { /** - * 根据输入的Query语句进行查询,SearchIndex引擎返回的总命中数 - *

注:是查询到的实际数量,不是该Response中返回的具体的行数。行数可以由其他参数来控制,进行类似分页的操作

+ * 根据输入的Query语句进行查询,SearchIndex引擎返回的总命中数 + *

注:是查询到的实际数量,不是该Response中返回的具体的行数。行数可以由其他参数来控制,进行类似分页的操作

*/ private long totalCount; @@ -28,10 +31,36 @@ public class SearchResponse extends Response { private byte[] nextToken; + private long bodyBytes; + + private AggregationResults aggregationResults; + + private GroupByResults groupByResults; + public SearchResponse(Response meta) { super(meta); } + public AggregationResults getAggregationResults() { + return aggregationResults; + } + + public SearchResponse setAggregationResults( + AggregationResults aggregationResults) { + this.aggregationResults = aggregationResults; + return this; + } + + public GroupByResults getGroupByResults() { + return groupByResults; + } + + public SearchResponse setGroupByResults( + GroupByResults groupByResults) { + this.groupByResults = groupByResults; + return this; + } + public long getTotalCount() { return totalCount; } @@ -63,4 +92,29 @@ public byte[] getNextToken() { public void setNextToken(byte[] nextToken) { this.nextToken = nextToken; } + + public long getBodyBytes() { + return bodyBytes; + } + public void setBodyBytes(long bodyBytes) { + this.bodyBytes = bodyBytes; + } + + public String getResponseInfo(boolean prettyFormat) { + GsonBuilder builder = new GsonBuilder() + .disableHtmlEscaping() + .disableInnerClassSerialization() + .serializeNulls() + .serializeSpecialFloatingPointValues() + .enableComplexMapKeySerialization(); + if (prettyFormat) { + return builder.setPrettyPrinting().create().toJson(this); + } else { + return builder.create().toJson(this); + } + } + + public void printResponseInfo() { + System.out.println(getResponseInfo(true)); + } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/SyncStat.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/SyncStat.java index f4d4920..2d923b2 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/model/search/SyncStat.java +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/SyncStat.java @@ -49,8 +49,6 @@ public void jsonize(StringBuilder sb, String newline) { if (currentSyncTimestamp != null) { sb.append("\"CurrentSyncTimestamp\": "); sb.append(currentSyncTimestamp.toString()); - sb.append(","); - sb.append(newline); } sb.append("}"); } diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/UpdateSearchIndexRequest.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/UpdateSearchIndexRequest.java new file mode 100644 index 0000000..a6fc72a --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/UpdateSearchIndexRequest.java @@ -0,0 +1,124 @@ +package com.alicloud.openservices.tablestore.model.search; + +import com.alicloud.openservices.tablestore.core.utils.NumberUtils; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.alicloud.openservices.tablestore.model.OperationNames; +import com.alicloud.openservices.tablestore.model.Request; + +import java.util.List; +import java.util.concurrent.TimeUnit; + +public class UpdateSearchIndexRequest implements Request { + private String tableName; + + private String indexName; + + private String switchIndexName; + + private List queryFlowWeight; + + /** + *

索引数据的TTL时间,单位为秒。

+ */ + private Integer timeToLive; + + public UpdateSearchIndexRequest(String tableName, String indexName) { + this.tableName = tableName; + this.indexName = indexName; + } + + /** + * 索引交换请求 构造方法 + *
在动态修改schema的场景下,当重建索引同步追上源索引,且AB test充分验证后,才能"交换索引"。交换后,所有的查询流量都会打到新schema的索引上。 + * @param tableName 表名 + * @param indexName 索引名 + * @param switchIndexName the index to be switched 被交换索引名 + */ + public UpdateSearchIndexRequest(String tableName, String indexName, String switchIndexName) { + this.tableName = tableName; + this.indexName = indexName; + this.switchIndexName = switchIndexName; + } + + /** + * 设置查询流量权重 + * @param tableName 表名 + * @param indexName 索引名 + * @param queryFlowWeight 查询流量权重列表。设置"源索引"和"重建索引"被查询时的流量分配权重,列表长度为2。 + * e.g. 设置权重为[(index1, 20), (index2, 80)],表示 20%的查询流量会打到index1,80%的查询流量会打到index2 + */ + public UpdateSearchIndexRequest(String tableName, String indexName, List queryFlowWeight) { + this.tableName = tableName; + this.indexName = indexName; + this.queryFlowWeight = queryFlowWeight; + } + + public String getTableName() { + return tableName; + } + + public UpdateSearchIndexRequest setTableName(String tableName) { + this.tableName = tableName; + return this; + } + + public String getIndexName() { + return indexName; + } + + public UpdateSearchIndexRequest setIndexName(String indexName) { + this.indexName = indexName; + return this; + } + + public String getSwitchIndexName() { + return switchIndexName; + } + + public UpdateSearchIndexRequest setSwitchIndexName(String switchIndexName) { + this.switchIndexName = switchIndexName; + return this; + } + + public List getQueryFlowWeight() { + return queryFlowWeight; + } + + public UpdateSearchIndexRequest setQueryFlowWeight(List queryFlowWeight) { + this.queryFlowWeight = queryFlowWeight; + return this; + } + + public Integer getTimeToLive() { + return timeToLive; + } + + /** + *

索引数据的TTL时间

+ * @param days ttl, 参数单位是天 + */ + public UpdateSearchIndexRequest setTimeToLiveInDays(int days) { + this.setTimeToLive(days, TimeUnit.DAYS); + return this; + } + + /** + *

索引数据的TTL时间。

+ */ + public UpdateSearchIndexRequest setTimeToLive(int timeToLive, TimeUnit timeUnit) { + Preconditions.checkArgument(timeToLive > 0 || timeToLive == -1, + "The value of timeToLive can be -1 or any positive value."); + if (timeToLive == -1) { + this.timeToLive = -1; + } else { + long seconds = timeUnit.toSeconds(timeToLive); + this.timeToLive = NumberUtils.longToInt(seconds); + } + return this; + } + + @Override + public String getOperationName() { + return OperationNames.OP_UPDATE_SEARCH_INDEX; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/UpdateSearchIndexResponse.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/UpdateSearchIndexResponse.java new file mode 100644 index 0000000..be4dbb5 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/UpdateSearchIndexResponse.java @@ -0,0 +1,9 @@ +package com.alicloud.openservices.tablestore.model.search; + +import com.alicloud.openservices.tablestore.model.Response; + +public class UpdateSearchIndexResponse extends Response { + public UpdateSearchIndexResponse(Response meta) { + super(meta); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/Aggregation.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/Aggregation.java new file mode 100644 index 0000000..6ff24f9 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/Aggregation.java @@ -0,0 +1,15 @@ +package com.alicloud.openservices.tablestore.model.search.agg; + +import com.google.protobuf.ByteString; + +/** + * agg的接口,具体说明请看具体实现里的说明 + */ +public interface Aggregation { + + String getAggName(); + + AggregationType getAggType(); + + ByteString serialize(); +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/AggregationBuilder.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/AggregationBuilder.java new file mode 100644 index 0000000..7ee806e --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/AggregationBuilder.java @@ -0,0 +1,9 @@ +package com.alicloud.openservices.tablestore.model.search.agg; + +/** + * 所有 agg 的 innerBuilder 继承自 AggregationBuilder + */ +public interface AggregationBuilder { + + Aggregation build(); +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/AggregationBuilders.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/AggregationBuilders.java new file mode 100644 index 0000000..22dc73d --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/AggregationBuilders.java @@ -0,0 +1,40 @@ +package com.alicloud.openservices.tablestore.model.search.agg; + +/** + * Aggregation 总的构建器。 + * 所有的 Aggregation 进行使用时候,均用到该类。 + */ +public final class AggregationBuilders { + + public static MaxAggregation.Builder max(String aggregationName, String fieldName) { + return MaxAggregation.newBuilder().aggName(aggregationName).fieldName(fieldName); + } + + public static MinAggregation.Builder min(String aggregationName, String fieldName) { + return MinAggregation.newBuilder().aggName(aggregationName).fieldName(fieldName); + } + + public static SumAggregation.Builder sum(String aggregationName, String fieldName) { + return SumAggregation.newBuilder().aggName(aggregationName).fieldName(fieldName); + } + + public static AvgAggregation.Builder avg(String aggregationName, String fieldName) { + return AvgAggregation.newBuilder().aggName(aggregationName).fieldName(fieldName); + } + + public static DistinctCountAggregation.Builder distinctCount(String aggregationName, String fieldName) { + return DistinctCountAggregation.newBuilder().aggName(aggregationName).fieldName(fieldName); + } + + public static CountAggregation.Builder count(String aggregationName, String fieldName) { + return CountAggregation.newBuilder().aggName(aggregationName).fieldName(fieldName); + } + + public static TopRowsAggregation.Builder topRows(String aggregationName) { + return TopRowsAggregation.newBuilder().aggName(aggregationName); + } + + public static PercentilesAggregation.Builder percentiles(String aggregationName, String fieldName) { + return PercentilesAggregation.newBuilder().aggName(aggregationName).fieldName(fieldName); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/AggregationResult.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/AggregationResult.java new file mode 100644 index 0000000..fbd16fc --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/AggregationResult.java @@ -0,0 +1,12 @@ +package com.alicloud.openservices.tablestore.model.search.agg; + +/** + * 聚合结果的接口,具体说明请看具体实现里的说明 + */ +public interface AggregationResult { + + String getAggName(); + + AggregationType getAggType(); + +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/AggregationResults.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/AggregationResults.java new file mode 100644 index 0000000..bbd86ae --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/AggregationResults.java @@ -0,0 +1,154 @@ +package com.alicloud.openservices.tablestore.model.search.agg; + +import java.util.Map; + +/** + * 用于取到Aggregation的结果 + */ +public class AggregationResults { + + private Map resultMap; + + public int size() { + if (resultMap == null) { + return 0; + } + return resultMap.size(); + } + + public AggregationResults setResultMap( + Map resultMap) { + this.resultMap = resultMap; + return this; + } + + public Map getResultAsMap() { + return resultMap; + } + + public AvgAggregationResult getAsAvgAggregationResult(String aggregationName) { + if (resultMap != null && !resultMap.containsKey(aggregationName)) { + throw new IllegalArgumentException("AggregationResults don't contains: " + aggregationName); + } else { + assert resultMap != null; + AggregationResult result = resultMap.get(aggregationName); + if (result.getAggType() == AggregationType.AGG_AVG) { + return (AvgAggregationResult)result; + } else { + throw new IllegalArgumentException( + "the result with this aggregationName can't cast to AvgAggregationResult."); + } + } + + } + + public DistinctCountAggregationResult getAsDistinctCountAggregationResult(String aggregationName) { + if (resultMap != null && !resultMap.containsKey(aggregationName)) { + throw new IllegalArgumentException("AggregationResults don't contains: " + aggregationName); + } else { + assert resultMap != null; + AggregationResult result = resultMap.get(aggregationName); + if (result.getAggType() == AggregationType.AGG_DISTINCT_COUNT) { + return (DistinctCountAggregationResult)result; + } else { + throw new IllegalArgumentException( + "the result with this aggregationName can't cast to DistinctCountAggregationResult."); + } + } + + } + + public MaxAggregationResult getAsMaxAggregationResult(String aggregationName) { + if (resultMap != null && !resultMap.containsKey(aggregationName)) { + throw new IllegalArgumentException("AggregationResults don't contains: " + aggregationName); + } else { + assert resultMap != null; + AggregationResult result = resultMap.get(aggregationName); + if (result.getAggType() == AggregationType.AGG_MAX) { + return (MaxAggregationResult)result; + } else { + throw new IllegalArgumentException( + "the result with this aggregationName can't cast to MaxAggregationResult."); + } + } + + } + + public MinAggregationResult getAsMinAggregationResult(String aggregationName) { + if (resultMap != null && !resultMap.containsKey(aggregationName)) { + throw new IllegalArgumentException("AggregationResults don't contains: " + aggregationName); + } else { + assert resultMap != null; + AggregationResult result = resultMap.get(aggregationName); + if (result.getAggType() == AggregationType.AGG_MIN) { + return (MinAggregationResult)result; + } else { + throw new IllegalArgumentException( + "the result with this aggregationName can't cast to MinAggregationResult."); + } + } + + } + + public SumAggregationResult getAsSumAggregationResult(String aggregationName) { + if (resultMap != null && !resultMap.containsKey(aggregationName)) { + throw new IllegalArgumentException("AggregationResults don't contains: " + aggregationName); + } else { + assert resultMap != null; + AggregationResult result = resultMap.get(aggregationName); + if (result.getAggType() == AggregationType.AGG_SUM) { + return (SumAggregationResult)result; + } else { + throw new IllegalArgumentException( + "the result with this aggregationName can't cast to SumAggregationResult."); + } + } + + } + + public CountAggregationResult getAsCountAggregationResult(String aggregationName) { + if (resultMap != null && !resultMap.containsKey(aggregationName)) { + throw new IllegalArgumentException("AggregationResults don't contains: " + aggregationName); + } else { + assert resultMap != null; + AggregationResult result = resultMap.get(aggregationName); + if (result.getAggType() == AggregationType.AGG_COUNT) { + return (CountAggregationResult)result; + } else { + throw new IllegalArgumentException( + "the result with this aggregationName can't cast to CountAggregationResult."); + } + } + + } + + public TopRowsAggregationResult getAsTopRowsAggregationResult(String aggregationName) { + if (resultMap != null && !resultMap.containsKey(aggregationName)) { + throw new IllegalArgumentException("AggregationResults don't contains: " + aggregationName); + } else { + assert resultMap != null; + AggregationResult result = resultMap.get(aggregationName); + if (result.getAggType() == AggregationType.AGG_TOP_ROWS) { + return (TopRowsAggregationResult)result; + } else { + throw new IllegalArgumentException( + "the result with this aggregationName can't cast to TopRowsAggregationResult."); + } + } + } + + public PercentilesAggregationResult getAsPercentilesAggregationResult(String aggregationName) { + if (resultMap != null && !resultMap.containsKey(aggregationName)) { + throw new IllegalArgumentException("AggregationResults don't contains: " + aggregationName); + } else { + assert resultMap != null; + AggregationResult result = resultMap.get(aggregationName); + if (result.getAggType() == AggregationType.AGG_PERCENTILES) { + return (PercentilesAggregationResult)result; + } else { + throw new IllegalArgumentException( + "the result with this aggregationName can't cast to PercentilesAggregationResult."); + } + } + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/AggregationType.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/AggregationType.java new file mode 100644 index 0000000..9cca716 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/AggregationType.java @@ -0,0 +1,20 @@ +package com.alicloud.openservices.tablestore.model.search.agg; + +public enum AggregationType { + + AGG_AVG, + + AGG_DISTINCT_COUNT, + + AGG_MAX, + + AGG_MIN, + + AGG_SUM, + + AGG_COUNT, + + AGG_TOP_ROWS, + + AGG_PERCENTILES +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/AvgAggregation.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/AvgAggregation.java new file mode 100644 index 0000000..b2dac8e --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/AvgAggregation.java @@ -0,0 +1,112 @@ +package com.alicloud.openservices.tablestore.model.search.agg; + +import com.alicloud.openservices.tablestore.core.protocol.SearchAggregationBuilder; +import com.alicloud.openservices.tablestore.core.utils.ValueUtil; +import com.alicloud.openservices.tablestore.model.ColumnValue; +import com.google.protobuf.ByteString; + +/** + * 求一个字段的平均值。 + *

举例:如果字段“age”恰好有5行(少一点我们方便举例),分别为:1、2、3、4、5,则进行AvgAggregation的结果为4。

+ */ +public class AvgAggregation implements Aggregation { + + private AggregationType aggregationType = AggregationType.AGG_AVG; + + /** + * 聚合的名字,之后从聚合结果列表中根据该名字拿到聚合结果 + */ + private String aggName; + /** + * 字段名字 + */ + private String fieldName; + + /** + * 缺失字段的默认值。 + *

如果一个文档缺少该字段,则采用什么默认值

+ */ + private ColumnValue missing; + + public AvgAggregation() { + } + + private AvgAggregation(Builder builder) { + aggName = builder.aggName; + fieldName = builder.fieldName; + missing = builder.missing; + } + + public static Builder newBuilder() { + return new Builder(); + } + + @Override + public String getAggName() { + return aggName; + } + + @Override + public AggregationType getAggType() { + return aggregationType; + } + + @Override + public ByteString serialize() { + return SearchAggregationBuilder.buildAvgAggregation(this).toByteString(); + } + + public String getFieldName() { + return fieldName; + } + + public ColumnValue getMissing() { + return missing; + } + + public AvgAggregation setAggName(String aggName) { + this.aggName = aggName; + return this; + } + + public AvgAggregation setFieldName(String fieldName) { + this.fieldName = fieldName; + return this; + } + + public AvgAggregation setMissing(ColumnValue missing) { + this.missing = missing; + return this; + } + + public static final class Builder implements AggregationBuilder { + private String aggName; + private String fieldName; + private ColumnValue missing; + + private Builder() {} + + public Builder aggName(String aggName) { + this.aggName = aggName; + return this; + } + + public Builder fieldName(String fieldName) { + this.fieldName = fieldName; + return this; + } + /** + * 缺失字段的默认值。 + *

如果一个文档缺少该字段,则采用什么默认值

+ */ + public Builder missing(Object missing) { + this.missing = ValueUtil.toColumnValue(missing); + return this; + } + + @Override + public AvgAggregation build() { + return new AvgAggregation(this); + } + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/AvgAggregationResult.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/AvgAggregationResult.java new file mode 100644 index 0000000..85d3202 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/AvgAggregationResult.java @@ -0,0 +1,40 @@ +package com.alicloud.openservices.tablestore.model.search.agg; + +/** + * * {@link AvgAggregation}的结果 + */ +public class AvgAggregationResult implements AggregationResult { + + /** + * 聚合的名字 + */ + private String aggName; + /** + * 聚合的结果 + */ + private double value; + + @Override + public String getAggName() { + return aggName; + } + + @Override + public AggregationType getAggType() { + return AggregationType.AGG_AVG; + } + + public double getValue() { + return value; + } + + public AvgAggregationResult setValue(double value) { + this.value = value; + return this; + } + + public AvgAggregationResult setAggName(String aggName) { + this.aggName = aggName; + return this; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/CountAggregation.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/CountAggregation.java new file mode 100644 index 0000000..b02f3a9 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/CountAggregation.java @@ -0,0 +1,86 @@ +package com.alicloud.openservices.tablestore.model.search.agg; + +import com.alicloud.openservices.tablestore.core.protocol.SearchAggregationBuilder; +import com.google.protobuf.ByteString; + +/** + * 根据某一个字段统计文档数 + */ +public class CountAggregation implements Aggregation { + + private AggregationType aggregationType = AggregationType.AGG_COUNT; + + /** + * 聚合的名字,之后从聚合结果列表中根据该名字拿到聚合结果 + */ + private String aggName; + /** + * 字段名字 + */ + private String fieldName; + + private CountAggregation(Builder builder) { + aggName = builder.aggName; + fieldName = builder.fieldName; + } + + public CountAggregation() { + } + + + public static Builder newBuilder() { + return new Builder(); + } + + @Override + public String getAggName() { + return aggName; + } + + @Override + public AggregationType getAggType() { + return aggregationType; + } + + @Override + public ByteString serialize() { + return SearchAggregationBuilder.buildCountAggregation(this).toByteString(); + } + + public String getFieldName() { + return fieldName; + } + + + public CountAggregation setAggName(String aggName) { + this.aggName = aggName; + return this; + } + + public CountAggregation setFieldName(String fieldName) { + this.fieldName = fieldName; + return this; + } + + public static final class Builder implements AggregationBuilder { + private String aggName; + private String fieldName; + + private Builder() {} + + public Builder aggName(String aggName) { + this.aggName = aggName; + return this; + } + + public Builder fieldName(String fieldName) { + this.fieldName = fieldName; + return this; + } + + @Override + public CountAggregation build() { + return new CountAggregation(this); + } + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/CountAggregationResult.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/CountAggregationResult.java new file mode 100644 index 0000000..6b2da44 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/CountAggregationResult.java @@ -0,0 +1,34 @@ +package com.alicloud.openservices.tablestore.model.search.agg; + +/** + * {@link CountAggregation}的统计结果 + */ +public class CountAggregationResult implements AggregationResult { + + private String aggName; + private long value; + + @Override + public String getAggName() { + return aggName; + } + + @Override + public AggregationType getAggType() { + return AggregationType.AGG_COUNT; + } + + public CountAggregationResult setAggName(String aggName) { + this.aggName = aggName; + return this; + } + + public long getValue() { + return value; + } + + public CountAggregationResult setValue(long value) { + this.value = value; + return this; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/DistinctCountAggregation.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/DistinctCountAggregation.java new file mode 100644 index 0000000..2786ee1 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/DistinctCountAggregation.java @@ -0,0 +1,111 @@ +package com.alicloud.openservices.tablestore.model.search.agg; + +import com.alicloud.openservices.tablestore.core.protocol.SearchAggregationBuilder; +import com.alicloud.openservices.tablestore.core.utils.ValueUtil; +import com.alicloud.openservices.tablestore.model.ColumnValue; +import com.google.protobuf.ByteString; + +/** + * 根据某一个字段统计去重后的文档总数。 该总数为大约值,数据量特别大时候存在一定的误差。 + */ +public class DistinctCountAggregation implements Aggregation { + + private AggregationType aggregationType = AggregationType.AGG_DISTINCT_COUNT; + + /** + * 聚合的名字,之后从聚合结果列表中根据该名字拿到聚合结果 + */ + private String aggName; + /** + * 字段名字 + */ + private String fieldName; + + /** + * 缺失字段的默认值。 + *

如果一个文档缺少该字段,则采用什么默认值

+ */ + private ColumnValue missing; + + public DistinctCountAggregation() { + } + + private DistinctCountAggregation(Builder builder) { + aggName = builder.aggName; + fieldName = builder.fieldName; + missing = builder.missing; + } + public static Builder newBuilder() { + return new Builder(); + } + + @Override + public String getAggName() { + return aggName; + } + + @Override + public AggregationType getAggType() { + return aggregationType; + } + + @Override + public ByteString serialize() { + return SearchAggregationBuilder.buildDistinctCountAggregation(this).toByteString(); + } + + public String getFieldName() { + return fieldName; + } + + public ColumnValue getMissing() { + return missing; + } + + public DistinctCountAggregation setAggName(String aggName) { + this.aggName = aggName; + return this; + } + + public DistinctCountAggregation setFieldName(String fieldName) { + this.fieldName = fieldName; + return this; + } + + public DistinctCountAggregation setMissing(ColumnValue missing) { + this.missing = missing; + return this; + } + + + public static final class Builder implements AggregationBuilder { + private String aggName; + private String fieldName; + private ColumnValue missing; + + private Builder() {} + + public Builder aggName(String aggName) { + this.aggName = aggName; + return this; + } + + public Builder fieldName(String fieldName) { + this.fieldName = fieldName; + return this; + } + /** + * 缺失字段的默认值。 + *

如果一个文档缺少该字段,则采用什么默认值

+ */ + public Builder missing(Object missing) { + this.missing = ValueUtil.toColumnValue(missing); + return this; + } + + @Override + public DistinctCountAggregation build() { + return new DistinctCountAggregation(this); + } + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/DistinctCountAggregationResult.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/DistinctCountAggregationResult.java new file mode 100644 index 0000000..216ab3a --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/DistinctCountAggregationResult.java @@ -0,0 +1,33 @@ +package com.alicloud.openservices.tablestore.model.search.agg; +/** + * {@link DistinctCountAggregation}的统计结果 + */ +public class DistinctCountAggregationResult implements AggregationResult { + + private String aggName; + private long value; + + @Override + public String getAggName() { + return aggName; + } + + @Override + public AggregationType getAggType() { + return AggregationType.AGG_DISTINCT_COUNT; + } + + public DistinctCountAggregationResult setAggName(String aggName) { + this.aggName = aggName; + return this; + } + + public long getValue() { + return value; + } + + public DistinctCountAggregationResult setValue(long count) { + this.value = count; + return this; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/MaxAggregation.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/MaxAggregation.java new file mode 100644 index 0000000..dfc74a2 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/MaxAggregation.java @@ -0,0 +1,110 @@ +package com.alicloud.openservices.tablestore.model.search.agg; + +import com.alicloud.openservices.tablestore.core.protocol.SearchAggregationBuilder; +import com.alicloud.openservices.tablestore.core.utils.ValueUtil; +import com.alicloud.openservices.tablestore.model.ColumnValue; +import com.google.protobuf.ByteString; + +/** + * 统计某一个字段的最大值 + *

举例:如果字段“age”恰好有5行(少一点我们方便举例),分别为:1、2、3、4、5,则进行 MaxAggregation 的结果为5。

+ */ +public class MaxAggregation implements Aggregation { + + private AggregationType aggregationType = AggregationType.AGG_MAX; + + /** + * 聚合的名字,之后从聚合结果列表中根据该名字拿到聚合结果 + */ + private String aggName; + /** + * 字段名字 + */ + private String fieldName; + /** + * 缺失字段的默认值。 + *

如果一个文档缺少该字段,则采用什么默认值

+ */ + private ColumnValue missing; + + public MaxAggregation() { + } + + private MaxAggregation(Builder builder) { + aggName = builder.aggName; + fieldName = builder.fieldName; + missing = builder.missing; + } + public static Builder newBuilder() { + return new Builder(); + } + + @Override + public String getAggName() { + return aggName; + } + + @Override + public AggregationType getAggType() { + return aggregationType; + } + + @Override + public ByteString serialize() { + return SearchAggregationBuilder.buildMaxAggregation(this).toByteString(); + } + + public String getFieldName() { + return fieldName; + } + + public ColumnValue getMissing() { + return missing; + } + + public MaxAggregation setAggName(String aggName) { + this.aggName = aggName; + return this; + } + + public MaxAggregation setFieldName(String fieldName) { + this.fieldName = fieldName; + return this; + } + + public MaxAggregation setMissing(ColumnValue missing) { + this.missing = missing; + return this; + } + + public static final class Builder implements AggregationBuilder { + private String aggName; + private String fieldName; + private ColumnValue missing; + + private Builder() {} + + public Builder aggName(String aggName) { + this.aggName = aggName; + return this; + } + + public Builder fieldName(String fieldName) { + this.fieldName = fieldName; + return this; + } + /** + * 缺失字段的默认值。 + *

如果一个文档缺少该字段,则采用什么默认值

+ */ + public Builder missing(Object missing) { + this.missing = ValueUtil.toColumnValue(missing); + return this; + } + + @Override + public MaxAggregation build() { + return new MaxAggregation(this); + } + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/MaxAggregationResult.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/MaxAggregationResult.java new file mode 100644 index 0000000..8eb1619 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/MaxAggregationResult.java @@ -0,0 +1,35 @@ +package com.alicloud.openservices.tablestore.model.search.agg; + +/** + * {@link MaxAggregation}的结果 + */ +public class MaxAggregationResult implements AggregationResult { + + private String aggName; + + private double value; + + @Override + public String getAggName() { + return aggName; + } + + @Override + public AggregationType getAggType() { + return AggregationType.AGG_MAX; + } + + public double getValue() { + return value; + } + + public MaxAggregationResult setValue(double value) { + this.value = value; + return this; + } + + public MaxAggregationResult setAggName(String aggName) { + this.aggName = aggName; + return this; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/MinAggregation.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/MinAggregation.java new file mode 100644 index 0000000..87ade8a --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/MinAggregation.java @@ -0,0 +1,108 @@ +package com.alicloud.openservices.tablestore.model.search.agg; + +import com.alicloud.openservices.tablestore.core.protocol.SearchAggregationBuilder; +import com.alicloud.openservices.tablestore.core.utils.ValueUtil; +import com.alicloud.openservices.tablestore.model.ColumnValue; +import com.google.protobuf.ByteString; + +/** + * 统计某一个字段的最小值 + *

举例:如果字段“age”恰好有5行(少一点我们方便举例),分别为:1、2、3、4、5,则进行 MinAggregation 的结果为1。

+ */ +public class MinAggregation implements Aggregation { + + private AggregationType aggregationType = AggregationType.AGG_MIN; + + /** + * 聚合的名字,之后从聚合结果列表中根据该名字拿到聚合结果 + */ + private String aggName; + /** + * 字段名字 + */ + private String fieldName; + /** + * 缺失字段的默认值。 + *

如果一个文档缺少该字段,则采用什么默认值

+ */ + private ColumnValue missing; + + public MinAggregation() { + } + + private MinAggregation(Builder builder) { + setAggName(builder.aggName); + setFieldName(builder.fieldName); + setMissing(builder.missing); + } + + public static Builder newBuilder() { + return new Builder(); + } + + @Override + public String getAggName() { + return aggName; + } + + @Override + public AggregationType getAggType() { + return aggregationType; + } + + @Override + public ByteString serialize() { + return SearchAggregationBuilder.buildMinAggregation(this).toByteString(); + } + + public void setAggName(String aggName) { + this.aggName = aggName; + } + + public String getFieldName() { + return fieldName; + } + + public void setFieldName(String fieldName) { + this.fieldName = fieldName; + } + + public ColumnValue getMissing() { + return missing; + } + + public void setMissing(ColumnValue missing) { + this.missing = missing; + } + + public static final class Builder implements AggregationBuilder { + private String aggName; + private String fieldName; + private ColumnValue missing; + + private Builder() {} + + public Builder aggName(String aggName) { + this.aggName = aggName; + return this; + } + + public Builder fieldName(String fieldName) { + this.fieldName = fieldName; + return this; + } + /** + * 缺失字段的默认值。 + *

如果一个文档缺少该字段,则采用什么默认值

+ */ + public Builder missing(Object missing) { + this.missing = ValueUtil.toColumnValue(missing); + return this; + } + + @Override + public MinAggregation build() { + return new MinAggregation(this); + } + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/MinAggregationResult.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/MinAggregationResult.java new file mode 100644 index 0000000..1e786f5 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/MinAggregationResult.java @@ -0,0 +1,34 @@ +package com.alicloud.openservices.tablestore.model.search.agg; + +/** + * {@link MinAggregation}的统计结果 + */ +public class MinAggregationResult implements AggregationResult { + + private String aggName; + private double value; + + @Override + public String getAggName() { + return aggName; + } + + @Override + public AggregationType getAggType() { + return AggregationType.AGG_MIN; + } + + public double getValue() { + return value; + } + + public MinAggregationResult setValue(double value) { + this.value = value; + return this; + } + + public MinAggregationResult setAggName(String aggName) { + this.aggName = aggName; + return this; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/PercentilesAggregation.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/PercentilesAggregation.java new file mode 100644 index 0000000..f0bf0b7 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/PercentilesAggregation.java @@ -0,0 +1,140 @@ +package com.alicloud.openservices.tablestore.model.search.agg; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.alicloud.openservices.tablestore.core.protocol.SearchAggregationBuilder; +import com.alicloud.openservices.tablestore.core.utils.ValueUtil; +import com.alicloud.openservices.tablestore.model.ColumnValue; +import com.google.protobuf.ByteString; + +/** + * Return the range of percentiles in the group. + */ +public class PercentilesAggregation implements Aggregation { + + private AggregationType aggregationType = AggregationType.AGG_PERCENTILES; + + private String aggName; + /** + * 字段名字 + */ + private String fieldName; + /** + * 百分位范围 + * 必填,例如:[0,90,99] + */ + private List percentiles; + /** + * 缺失字段的默认值。 + *

如果一个文档缺少该字段,则采用什么默认值

+ */ + private ColumnValue missing; + + public PercentilesAggregation() { + } + + private PercentilesAggregation(Builder builder) { + setAggName(builder.aggName); + setFieldName(builder.fieldName); + setPercentiles(builder.percentiles); + setMissing(builder.missing); + } + + public static Builder newBuilder() { + return new Builder(); + } + + @Override + public String getAggName() { + return aggName; + } + + @Override + public AggregationType getAggType() { + return aggregationType; + } + + @Override + public ByteString serialize() { + return SearchAggregationBuilder.buildPercentilesAggregation(this).toByteString(); + } + + public PercentilesAggregation setAggName(String aggName) { + this.aggName = aggName; + return this; + } + + public String getFieldName() { + return fieldName; + } + + public PercentilesAggregation setFieldName(String fieldName) { + this.fieldName = fieldName; + return this; + } + + public List getPercentiles() { + return percentiles; + } + + public PercentilesAggregation setPercentiles(List percentiles) { + this.percentiles = percentiles; + return this; + } + + public ColumnValue getMissing() { + return missing; + } + + public PercentilesAggregation setMissing(ColumnValue missing) { + this.missing = missing; + return this; + } + + public static final class Builder implements AggregationBuilder { + private String aggName; + private String fieldName; + private List percentiles; + private ColumnValue missing; + + public Builder() {} + + public Builder aggName(String aggName) { + this.aggName = aggName; + return this; + } + + public Builder fieldName(String fieldName) { + this.fieldName = fieldName; + return this; + } + + public Builder percentiles(Double... percentile) { + if (percentiles == null) { + percentiles = new ArrayList(); + } + this.percentiles.addAll(Arrays.asList(percentile)); + return this; + } + + public Builder percentiles(List percentileList) { + if (percentiles == null) { + percentiles = new ArrayList(); + } + this.percentiles.addAll(percentileList); + return this; + } + + public Builder missing(Object missing) { + this.missing = ValueUtil.toColumnValue(missing); + return this; + } + + @Override + public PercentilesAggregation build() { + return new PercentilesAggregation(this); + } + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/PercentilesAggregationItem.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/PercentilesAggregationItem.java new file mode 100644 index 0000000..c16b267 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/PercentilesAggregationItem.java @@ -0,0 +1,27 @@ +package com.alicloud.openservices.tablestore.model.search.agg; + +import com.alicloud.openservices.tablestore.model.ColumnValue; + +public class PercentilesAggregationItem { + + private double key; + private ColumnValue value; + + public double getKey() { + return key; + } + + public PercentilesAggregationItem setKey(double key) { + this.key = key; + return this; + } + + public ColumnValue getValue() { + return value; + } + + public PercentilesAggregationItem setValue(ColumnValue value) { + this.value = value; + return this; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/PercentilesAggregationResult.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/PercentilesAggregationResult.java new file mode 100644 index 0000000..ae93f36 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/PercentilesAggregationResult.java @@ -0,0 +1,37 @@ +package com.alicloud.openservices.tablestore.model.search.agg; + +import java.util.List; + +/** + * the result of {@link PercentilesAggregation} + */ +public class PercentilesAggregationResult implements AggregationResult { + + private String aggName; + private List percentilesAggregationItems; + + @Override + public String getAggName() { + return aggName; + } + + @Override + public AggregationType getAggType() { + return AggregationType.AGG_PERCENTILES; + } + + public PercentilesAggregationResult setAggName(String aggName) { + this.aggName = aggName; + return this; + } + + public List getPercentilesAggregationItems() { + return percentilesAggregationItems; + } + + public PercentilesAggregationResult setPercentilesAggregationItems( + List percentilesAggregationItems) { + this.percentilesAggregationItems = percentilesAggregationItems; + return this; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/SumAggregation.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/SumAggregation.java new file mode 100644 index 0000000..c49f596 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/SumAggregation.java @@ -0,0 +1,112 @@ +package com.alicloud.openservices.tablestore.model.search.agg; + +import com.alicloud.openservices.tablestore.core.protocol.SearchAggregationBuilder; +import com.alicloud.openservices.tablestore.core.utils.ValueUtil; +import com.alicloud.openservices.tablestore.model.ColumnValue; +import com.google.protobuf.ByteString; + +/** + * 求某一个字段的和 + *

举例:如果字段“age”恰好有5行(少一点我们方便举例),分别为:1、2、3、4、5,则进行 SumAggregation 的结果为15。

+ */ +public class SumAggregation implements Aggregation { + + private AggregationType aggregationType = AggregationType.AGG_SUM; + + /** + * 聚合的名字,之后从聚合结果列表中根据该名字拿到聚合结果 + */ + private String aggName; + /** + * 字段名字 + */ + private String fieldName; + /** + * 缺失字段的默认值。 + *

如果一个文档缺少该字段,则采用什么默认值

+ */ + private ColumnValue missing; + + public SumAggregation() { + } + + private SumAggregation(Builder builder) { + aggName = builder.aggName; + fieldName = builder.fieldName; + missing = builder.missing; + } + + public static Builder newBuilder() { + return new Builder(); + } + + @Override + public String getAggName() { + return aggName; + } + + @Override + public AggregationType getAggType() { + return aggregationType; + } + + @Override + public ByteString serialize() { + return SearchAggregationBuilder.buildSumAggregation(this).toByteString(); + } + + public String getFieldName() { + return fieldName; + } + + public ColumnValue getMissing() { + return missing; + } + + public SumAggregation setAggName(String aggName) { + this.aggName = aggName; + return this; + } + + public SumAggregation setFieldName(String fieldName) { + this.fieldName = fieldName; + return this; + } + + public SumAggregation setMissing(ColumnValue missing) { + this.missing = missing; + return this; + } + + + public static final class Builder implements AggregationBuilder { + private String aggName; + private String fieldName; + private ColumnValue missing; + + private Builder() {} + + public Builder aggName(String aggName) { + this.aggName = aggName; + return this; + } + + public Builder fieldName(String fieldName) { + this.fieldName = fieldName; + return this; + } + /** + * 缺失字段的默认值。 + *

如果一个文档缺少该字段,则采用什么默认值

+ */ + public Builder missing(Object missing) { + this.missing = ValueUtil.toColumnValue(missing); + return this; + } + + @Override + public SumAggregation build() { + return new SumAggregation(this); + } + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/SumAggregationResult.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/SumAggregationResult.java new file mode 100644 index 0000000..3246dfe --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/SumAggregationResult.java @@ -0,0 +1,33 @@ +package com.alicloud.openservices.tablestore.model.search.agg; +/** + * {@link SumAggregation}的统计结果 + */ +public class SumAggregationResult implements AggregationResult { + + private String aggName; + private double value; + + @Override + public String getAggName() { + return aggName; + } + + @Override + public AggregationType getAggType() { + return AggregationType.AGG_SUM; + } + + public double getValue() { + return value; + } + + public SumAggregationResult setValue(double value) { + this.value = value; + return this; + } + + public SumAggregationResult setAggName(String aggName) { + this.aggName = aggName; + return this; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/TopRowsAggregation.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/TopRowsAggregation.java new file mode 100644 index 0000000..1baaf75 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/TopRowsAggregation.java @@ -0,0 +1,95 @@ +package com.alicloud.openservices.tablestore.model.search.agg; + +import com.alicloud.openservices.tablestore.core.protocol.SearchAggregationBuilder; +import com.alicloud.openservices.tablestore.model.search.sort.Sort; +import com.google.protobuf.ByteString; + +/** + * Return the first few rows in the group. + */ +public class TopRowsAggregation implements Aggregation { + + private AggregationType aggregationType = AggregationType.AGG_TOP_ROWS; + + private String aggName; + private Integer limit; + private Sort sort; + + public TopRowsAggregation() { + } + + private TopRowsAggregation(Builder builder) { + setAggName(builder.aggName); + setLimit(builder.limit); + setSort(builder.sort); + } + + public static Builder newBuilder() { + return new Builder(); + } + + @Override + public String getAggName() { + return aggName; + } + + @Override + public AggregationType getAggType() { + return aggregationType; + } + + @Override + public ByteString serialize() { + return SearchAggregationBuilder.buildTopRowsAggregation(this).toByteString(); + } + + public TopRowsAggregation setAggName(String aggName) { + this.aggName = aggName; + return this; + } + + public Integer getLimit() { + return limit; + } + + public TopRowsAggregation setLimit(Integer limit) { + this.limit = limit; + return this; + } + + public Sort getSort() { + return sort; + } + + public TopRowsAggregation setSort(Sort sort) { + this.sort = sort; + return this; + } + + public static final class Builder implements AggregationBuilder { + private String aggName; + private Integer limit; + private Sort sort; + + public Builder() {} + + public Builder aggName(String aggName) { + this.aggName = aggName; + return this; + } + + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + public Builder sort(Sort sort) { + this.sort = sort; + return this; + } + + public TopRowsAggregation build() { + return new TopRowsAggregation(this); + } + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/TopRowsAggregationResult.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/TopRowsAggregationResult.java new file mode 100644 index 0000000..42014f9 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/agg/TopRowsAggregationResult.java @@ -0,0 +1,38 @@ +package com.alicloud.openservices.tablestore.model.search.agg; + +import java.util.List; + +import com.alicloud.openservices.tablestore.model.Row; + +/** + * the result of {@link TopRowsAggregation} + */ +public class TopRowsAggregationResult implements AggregationResult { + + private String aggName; + private List rows; + + @Override + public String getAggName() { + return aggName; + } + + @Override + public AggregationType getAggType() { + return AggregationType.AGG_TOP_ROWS; + } + + public TopRowsAggregationResult setAggName(String aggName) { + this.aggName = aggName; + return this; + } + + public List getRows() { + return rows; + } + + public TopRowsAggregationResult setRows(List rows) { + this.rows = rows; + return this; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/analysis/AnalyzerParameter.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/analysis/AnalyzerParameter.java new file mode 100644 index 0000000..9c63cd3 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/analysis/AnalyzerParameter.java @@ -0,0 +1,8 @@ +package com.alicloud.openservices.tablestore.model.search.analysis; + +import com.google.protobuf.ByteString; + +public interface AnalyzerParameter { + + ByteString serialize(); +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/analysis/AnalyzerParameterBuilder.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/analysis/AnalyzerParameterBuilder.java new file mode 100644 index 0000000..f3d87b7 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/analysis/AnalyzerParameterBuilder.java @@ -0,0 +1,35 @@ +package com.alicloud.openservices.tablestore.model.search.analysis; + +import com.alicloud.openservices.tablestore.core.protocol.Search; + +public class AnalyzerParameterBuilder { + public static Search.SingleWordAnalyzerParameter buildSingleWordAnalyzerParameter(SingleWordAnalyzerParameter param) { + Search.SingleWordAnalyzerParameter.Builder builder = Search.SingleWordAnalyzerParameter.newBuilder(); + if (param.isCaseSensitive() != null) { + builder.setCaseSensitive(param.isCaseSensitive()); + } + if (param.isDelimitWord() != null) { + builder.setDelimitWord(param.isDelimitWord()); + } + return builder.build(); + } + + public static Search.SplitAnalyzerParameter buildSplitAnalyzerParameter(SplitAnalyzerParameter param) { + Search.SplitAnalyzerParameter.Builder builder = Search.SplitAnalyzerParameter.newBuilder(); + if (param.getDelimiter() != null) { + builder.setDelimiter(param.getDelimiter()); + } + return builder.build(); + } + + public static Search.FuzzyAnalyzerParameter buildFuzzyAnalyzerParameter(FuzzyAnalyzerParameter param) { + Search.FuzzyAnalyzerParameter.Builder builder = Search.FuzzyAnalyzerParameter.newBuilder(); + if (param.getMinChars() != null) { + builder.setMinChars(param.getMinChars()); + } + if (param.getMaxChars() != null) { + builder.setMaxChars(param.getMaxChars()); + } + return builder.build(); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/analysis/FuzzyAnalyzerParameter.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/analysis/FuzzyAnalyzerParameter.java new file mode 100644 index 0000000..33060d0 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/analysis/FuzzyAnalyzerParameter.java @@ -0,0 +1,44 @@ +package com.alicloud.openservices.tablestore.model.search.analysis; + +import com.google.protobuf.ByteString; + +public class FuzzyAnalyzerParameter implements AnalyzerParameter { + private Integer minChars = null; + private Integer maxChars = null; + + public FuzzyAnalyzerParameter() { + } + + public FuzzyAnalyzerParameter(int minChars, int maxChars) { + this.minChars = minChars; + this.maxChars = maxChars; + } + + public Integer getMinChars() { + return minChars; + } + + public FuzzyAnalyzerParameter setMinChars(int minChars) { + this.minChars = minChars; + return this; + } + + public Integer getMaxChars() { + return maxChars; + } + + public FuzzyAnalyzerParameter setMaxChars(int maxChars) { + this.maxChars = maxChars; + return this; + } + + @Override + public ByteString serialize() { + return AnalyzerParameterBuilder.buildFuzzyAnalyzerParameter(this).toByteString(); + } + + @Override + public String toString() { + return super.toString(); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/analysis/SingleWordAnalyzerParameter.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/analysis/SingleWordAnalyzerParameter.java new file mode 100644 index 0000000..f667a52 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/analysis/SingleWordAnalyzerParameter.java @@ -0,0 +1,39 @@ +package com.alicloud.openservices.tablestore.model.search.analysis; + +import com.google.protobuf.ByteString; + +public class SingleWordAnalyzerParameter implements AnalyzerParameter { + private Boolean caseSensitive = null; + private Boolean delimitWord = null; + + public SingleWordAnalyzerParameter() { + } + + public SingleWordAnalyzerParameter(final Boolean caseSensitive, final Boolean delimitWord) { + this.caseSensitive = caseSensitive; + this.delimitWord = delimitWord; + } + + public Boolean isCaseSensitive() { + return caseSensitive; + } + + public SingleWordAnalyzerParameter setCaseSensitive(Boolean caseSensitive) { + this.caseSensitive = caseSensitive; + return this; + } + + public Boolean isDelimitWord() { + return delimitWord; + } + + public SingleWordAnalyzerParameter setDelimitWord(Boolean delimitWord) { + this.delimitWord = delimitWord; + return this; + } + + @Override + public ByteString serialize() { + return AnalyzerParameterBuilder.buildSingleWordAnalyzerParameter(this).toByteString(); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/analysis/SplitAnalyzerParameter.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/analysis/SplitAnalyzerParameter.java new file mode 100644 index 0000000..dbed23f --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/analysis/SplitAnalyzerParameter.java @@ -0,0 +1,28 @@ +package com.alicloud.openservices.tablestore.model.search.analysis; + +import com.google.protobuf.ByteString; + +public class SplitAnalyzerParameter implements AnalyzerParameter { + private String delimiter = null; + + public SplitAnalyzerParameter() { + } + + public SplitAnalyzerParameter(final String delimiter) { + this.delimiter = delimiter; + } + + public String getDelimiter() { + return delimiter; + } + + public SplitAnalyzerParameter setDelimiter(String delimiter) { + this.delimiter = delimiter; + return this; + } + + @Override + public ByteString serialize() { + return AnalyzerParameterBuilder.buildSplitAnalyzerParameter(this).toByteString(); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/FieldRange.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/FieldRange.java new file mode 100644 index 0000000..8002f16 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/FieldRange.java @@ -0,0 +1,31 @@ +package com.alicloud.openservices.tablestore.model.search.groupby; + +import com.alicloud.openservices.tablestore.model.ColumnValue; + +public class FieldRange { + + private ColumnValue min; + + private ColumnValue max; + + public ColumnValue getMin() { + return min; + } + + public void setMin(ColumnValue min) { + this.min = min; + } + + public ColumnValue getMax() { + return max; + } + + public void setMax(ColumnValue max) { + this.max = max; + } + + public FieldRange(ColumnValue min, ColumnValue max) { + this.min = min; + this.max = max; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupBy.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupBy.java new file mode 100644 index 0000000..a363b1a --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupBy.java @@ -0,0 +1,12 @@ +package com.alicloud.openservices.tablestore.model.search.groupby; + +import com.google.protobuf.ByteString; + +public interface GroupBy { + + String getGroupByName(); + + GroupByType getGroupByType(); + + ByteString serialize(); +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByBuilder.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByBuilder.java new file mode 100644 index 0000000..4a8ad40 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByBuilder.java @@ -0,0 +1,9 @@ +package com.alicloud.openservices.tablestore.model.search.groupby; + +/** + * 所有 GroupBy 的 innerBuilder GroupByBuilder + */ +public interface GroupByBuilder { + + GroupBy build(); +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByBuilders.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByBuilders.java new file mode 100644 index 0000000..13aba42 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByBuilders.java @@ -0,0 +1,28 @@ +package com.alicloud.openservices.tablestore.model.search.groupby; + +/** + * GroupBy 总的构建器。 + * 所有的 GroupBy 进行使用时候,均用到该类。 + */ +public final class GroupByBuilders { + + public static GroupByField.Builder groupByField(String groupByName, String field) { + return GroupByField.newBuilder().groupByName(groupByName).fieldName(field); + } + + public static GroupByRange.Builder groupByRange(String groupByName, String field) { + return GroupByRange.newBuilder().groupByName(groupByName).fieldName(field); + } + + public static GroupByHistogram.Builder groupByHistogram(String groupByName, String field) { + return GroupByHistogram.newBuilder().groupByName(groupByName).fieldName(field); + } + + public static GroupByFilter.Builder groupByFilter(String groupByName) { + return GroupByFilter.newBuilder().groupByName(groupByName); + } + + public static GroupByGeoDistance.Builder groupByGeoDistance(String groupByName, String field) { + return GroupByGeoDistance.newBuilder().groupByName(groupByName).fieldName(field); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByField.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByField.java new file mode 100644 index 0000000..f829183 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByField.java @@ -0,0 +1,215 @@ +package com.alicloud.openservices.tablestore.model.search.groupby; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.alicloud.openservices.tablestore.core.protocol.SearchGroupByBuilder; +import com.alicloud.openservices.tablestore.model.search.agg.Aggregation; +import com.alicloud.openservices.tablestore.model.search.agg.AggregationBuilder; +import com.alicloud.openservices.tablestore.model.search.sort.GroupBySorter; +import com.google.protobuf.ByteString; + +/** + * 对某一个字段进行分组统计。 + *

举例:

+ *

库存账单里有“篮球”、“足球”、“羽毛球”等,对这一个字段进行聚合,返回: “篮球:10个”,“足球:5个”,“网球:1个”这样的聚合信息。

+ */ +public class GroupByField implements GroupBy { + + private GroupByType groupByType = GroupByType.GROUP_BY_FIELD; + + /** + * GroupBy的名字,之后从GroupBy结果列表中根据该名字拿到GroupBy结果 + */ + private String groupByName; + /** + * 字段名字 + */ + private String fieldName; + /** + * 返回多少个分组 + */ + private Integer size; + + /** + * 排序 + */ + private List groupBySorters; + + /** + * 子聚合 + */ + private List subAggregations; + + /** + * 子分组 + */ + private List subGroupBys; + + /** + * 最小文档数 + */ + private Long minDocCount; + + public GroupByField() { + } + + private GroupByField(Builder builder) { + groupByName = builder.groupByName; + fieldName = builder.fieldName; + size = builder.size; + groupBySorters = builder.groupBySorters; + subAggregations = builder.subAggregations; + subGroupBys = builder.subGroupBys; + minDocCount = builder.minDocCount; + } + + public static Builder newBuilder() { + return new Builder(); + } + + @Override + public String getGroupByName() { + return groupByName; + } + + @Override + public GroupByType getGroupByType() { + return groupByType; + } + + @Override + public ByteString serialize() { + return SearchGroupByBuilder.buildGroupByField(this).toByteString(); + } + + public String getFieldName() { + return fieldName; + } + + public Long getMinDocCount() { + return minDocCount; + } + + public Integer getSize() { + return size; + } + + public List getGroupBySorters() { + return groupBySorters; + } + + public List getSubAggregations() { + return subAggregations; + } + + public List getSubGroupBys() { + return subGroupBys; + } + + public GroupByField setGroupByName(String groupByName) { + this.groupByName = groupByName; + return this; + } + + public GroupByField setFieldName(String fieldName) { + this.fieldName = fieldName; + return this; + } + + public GroupByField setMinDocCount(Long minDocCount) { + this.minDocCount = minDocCount; + return this; + } + + public GroupByField setSize(Integer size) { + this.size = size; + return this; + } + + public GroupByField setGroupBySorters(List groupBySorters) { + this.groupBySorters = groupBySorters; + return this; + } + + public GroupByField setSubAggregations(List subAggregations) { + this.subAggregations = subAggregations; + return this; + } + + public GroupByField setSubGroupBys(List subGroupBys) { + this.subGroupBys = subGroupBys; + return this; + } + + public static final class Builder implements GroupByBuilder { + private String groupByName; + private String fieldName; + private Integer size; + private List groupBySorters; + private List subAggregations; + private List subGroupBys; + private Long minDocCount; + + private Builder() { + } + + public Builder groupByName(String groupByName) { + this.groupByName = groupByName; + return this; + } + + public Builder fieldName(String fieldName) { + this.fieldName = fieldName; + return this; + } + + public Builder size(Integer size) { + this.size = size; + return this; + } + + public Builder minDocCount(Long minDocCount) { + this.minDocCount = minDocCount; + return this; + } + + public Builder addGroupBySorter(GroupBySorter... groupBySorter) { + if (groupBySorters == null) { + groupBySorters = new ArrayList(); + } + this.groupBySorters.addAll(Arrays.asList(groupBySorter)); + return this; + } + + public Builder addGroupBySorter(List groupBySorter) { + if (groupBySorters == null) { + groupBySorters = new ArrayList(); + } + this.groupBySorters.addAll(groupBySorter); + return this; + } + + public Builder addSubAggregation(AggregationBuilder aggregationBuilder) { + if (subAggregations == null) { + subAggregations = new ArrayList(); + } + this.subAggregations.add(aggregationBuilder.build()); + return this; + } + + public Builder addSubGroupBy(GroupByBuilder groupByBuilder) { + if (subGroupBys == null) { + subGroupBys = new ArrayList(); + } + this.subGroupBys.add(groupByBuilder.build()); + return this; + } + + @Override + public GroupByField build() { + return new GroupByField(this); + } + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByFieldResult.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByFieldResult.java new file mode 100644 index 0000000..a7f2f76 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByFieldResult.java @@ -0,0 +1,36 @@ +package com.alicloud.openservices.tablestore.model.search.groupby; + +import java.util.List; + +/** + * {@link GroupByField}的统计结果 + */ +public class GroupByFieldResult implements GroupByResult { + + private String groupByName; + private List groupByFieldResultItems; + + @Override + public String getGroupByName() { + return groupByName; + } + + @Override + public GroupByType getGroupByType() { + return GroupByType.GROUP_BY_FIELD; + } + + public GroupByFieldResult setGroupByName(String groupByName) { + this.groupByName = groupByName; + return this; + } + + public List getGroupByFieldResultItems() { + return groupByFieldResultItems; + } + + public GroupByFieldResult setGroupByFieldResultItems(List groupByFieldResultItems) { + this.groupByFieldResultItems = groupByFieldResultItems; + return this; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByFieldResultItem.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByFieldResultItem.java new file mode 100644 index 0000000..02c8001 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByFieldResultItem.java @@ -0,0 +1,50 @@ +package com.alicloud.openservices.tablestore.model.search.groupby; + +import com.alicloud.openservices.tablestore.model.search.agg.AggregationResults; + +public class GroupByFieldResultItem { + + private String key; + private long rowCount; + private AggregationResults subAggregationResults; + private GroupByResults subGroupByResults; + + public AggregationResults getSubAggregationResults() { + return subAggregationResults; + } + + public GroupByFieldResultItem setSubAggregationResults( + AggregationResults subAggregationResults) { + this.subAggregationResults = subAggregationResults; + return this; + } + + public GroupByResults getSubGroupByResults() { + return subGroupByResults; + } + + public GroupByFieldResultItem setSubGroupByResults( + GroupByResults subGroupByResults) { + this.subGroupByResults = subGroupByResults; + return this; + } + + public String getKey() { + return key; + } + + public GroupByFieldResultItem setKey(String key) { + this.key = key; + return this; + } + + public long getRowCount() { + return rowCount; + } + + public GroupByFieldResultItem setRowCount(long rowCount) { + this.rowCount = rowCount; + return this; + } + +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByFilter.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByFilter.java new file mode 100644 index 0000000..1e7d845 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByFilter.java @@ -0,0 +1,142 @@ +package com.alicloud.openservices.tablestore.model.search.groupby; + +import java.util.ArrayList; +import java.util.List; + +import com.alicloud.openservices.tablestore.core.protocol.SearchGroupByBuilder; +import com.alicloud.openservices.tablestore.model.search.agg.Aggregation; +import com.alicloud.openservices.tablestore.model.search.agg.AggregationBuilder; +import com.alicloud.openservices.tablestore.model.search.query.Query; +import com.alicloud.openservices.tablestore.model.search.query.QueryBuilder; +import com.google.protobuf.ByteString; + +/** + * 根据查询语句进行分组。 + */ +public class GroupByFilter implements GroupBy { + + private GroupByType groupByType = GroupByType.GROUP_BY_FILTER; + + /** + * GroupBy的名字,之后从GroupBy结果列表中根据该名字拿到GroupBy结果 + */ + private String groupByName; + /** + * filters + */ + private List filters; + + /** + * 子聚合 + */ + private List subAggregations; + + /** + * 子分组 + */ + private List subGroupBys; + + public GroupByFilter() { + } + + private GroupByFilter(Builder builder) { + groupByName = builder.groupByName; + filters = builder.filters; + subAggregations = builder.subAggregations; + subGroupBys = builder.subGroupBys; + } + + public static Builder newBuilder() { + return new Builder(); + } + + @Override + public String getGroupByName() { + return groupByName; + } + + @Override + public GroupByType getGroupByType() { + return groupByType; + } + + @Override + public ByteString serialize() { + return SearchGroupByBuilder.buildGroupByFilter(this).toByteString(); + } + + public List getFilters() { + return filters; + } + + public List getSubAggregations() { + return subAggregations; + } + + public List getSubGroupBys() { + return subGroupBys; + } + + public GroupByFilter setGroupByName(String groupByName) { + this.groupByName = groupByName; + return this; + } + + public GroupByFilter setFilters(List filters) { + this.filters = filters; + return this; + } + + public GroupByFilter setSubAggregations(List subAggregations) { + this.subAggregations = subAggregations; + return this; + } + + public GroupByFilter setSubGroupBys(List subGroupBys) { + this.subGroupBys = subGroupBys; + return this; + } + + public static final class Builder implements GroupByBuilder { + private String groupByName; + private List filters; + private List subAggregations; + private List subGroupBys; + + private Builder() {} + + public Builder groupByName(String groupByName) { + this.groupByName = groupByName; + return this; + } + + public Builder addFilter(QueryBuilder builder) { + if (filters == null) { + this.filters = new ArrayList(); + } + this.filters.add(builder.build()); + return this; + } + + public Builder addSubAggregation(AggregationBuilder builder) { + if (subAggregations == null) { + this.subAggregations = new ArrayList(); + } + this.subAggregations.add(builder.build()); + return this; + } + + public Builder addSubGroupBy(GroupByBuilder builder) { + if (subGroupBys == null) { + this.subGroupBys = new ArrayList(); + } + this.subGroupBys.add(builder.build()); + return this; + } + + @Override + public GroupByFilter build() { + return new GroupByFilter(this); + } + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByFilterResult.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByFilterResult.java new file mode 100644 index 0000000..0b08f04 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByFilterResult.java @@ -0,0 +1,37 @@ +package com.alicloud.openservices.tablestore.model.search.groupby; + +import java.util.List; + +/** + * {@link GroupByFilter}的统计结果 + */ +public class GroupByFilterResult implements GroupByResult { + + private String groupByName; + private List groupByFilterResultItems; + + @Override + public String getGroupByName() { + return groupByName; + } + + @Override + public GroupByType getGroupByType() { + return GroupByType.GROUP_BY_FILTER; + } + + public GroupByFilterResult setGroupByName(String groupByName) { + this.groupByName = groupByName; + return this; + } + + public List getGroupByFilterResultItems() { + return groupByFilterResultItems; + } + + public GroupByFilterResult setGroupByFilterResultItems( + List groupByFilterResultItems) { + this.groupByFilterResultItems = groupByFilterResultItems; + return this; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByFilterResultItem.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByFilterResultItem.java new file mode 100644 index 0000000..5f1ec01 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByFilterResultItem.java @@ -0,0 +1,39 @@ +package com.alicloud.openservices.tablestore.model.search.groupby; + +import com.alicloud.openservices.tablestore.model.search.agg.AggregationResults; + +public class GroupByFilterResultItem { + + private long rowCount; + private AggregationResults subAggregationResults; + private GroupByResults subGroupByResults; + + public long getRowCount() { + return rowCount; + } + + public GroupByFilterResultItem setRowCount(long rowCount) { + this.rowCount = rowCount; + return this; + } + + public AggregationResults getSubAggregationResults() { + return subAggregationResults; + } + + public GroupByFilterResultItem setSubAggregationResults( + AggregationResults subAggregationResults) { + this.subAggregationResults = subAggregationResults; + return this; + } + + public GroupByResults getSubGroupByResults() { + return subGroupByResults; + } + + public GroupByFilterResultItem setSubGroupByResults( + GroupByResults subGroupByResults) { + this.subGroupByResults = subGroupByResults; + return this; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByGeoDistance.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByGeoDistance.java new file mode 100644 index 0000000..0aab7f2 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByGeoDistance.java @@ -0,0 +1,198 @@ +package com.alicloud.openservices.tablestore.model.search.groupby; + +import java.util.ArrayList; +import java.util.List; + +import com.alicloud.openservices.tablestore.core.protocol.SearchGroupByBuilder; +import com.alicloud.openservices.tablestore.model.search.GeoPoint; +import com.alicloud.openservices.tablestore.model.search.agg.Aggregation; +import com.alicloud.openservices.tablestore.model.search.agg.AggregationBuilder; +import com.google.protobuf.ByteString; + +/** + * 根据地理位置坐标进行分组。 + */ +public class GroupByGeoDistance implements GroupBy { + + private GroupByType groupByType = GroupByType.GROUP_BY_GEO_DISTANCE; + + /** + * GroupBy的名字,之后从GroupBy结果列表中根据该名字拿到GroupBy结果 + */ + private String groupByName; + /** + * 字段名字 + */ + private String fieldName; + + /** + * 设置起始中心点坐标 + */ + private GeoPoint origin; + + /** + * 分组的依据范围 + */ + private List ranges; + + /** + * 子聚合 + */ + private List subAggregations; + + /** + * 子分组 + */ + private List subGroupBys; + + public GroupByGeoDistance() { + } + + private GroupByGeoDistance(Builder builder) { + groupByName = builder.groupByName; + fieldName = builder.fieldName; + origin = builder.origin; + ranges = builder.ranges; + subAggregations = builder.subAggregations; + subGroupBys = builder.subGroupBys; + } + + public static Builder newBuilder() { + return new Builder(); + } + + @Override + public String getGroupByName() { + return groupByName; + } + + @Override + public GroupByType getGroupByType() { + return groupByType; + } + + @Override + public ByteString serialize() { + return SearchGroupByBuilder.buildGroupByGeoDistance(this).toByteString(); + } + + public String getFieldName() { + return fieldName; + } + + public GeoPoint getOrigin() { + return origin; + } + + public List getRanges() { + return ranges; + } + + public List getSubAggregations() { + return subAggregations; + } + + public List getSubGroupBys() { + return subGroupBys; + } + + public GroupByGeoDistance setGroupByName(String groupByName) { + this.groupByName = groupByName; + return this; + } + + public GroupByGeoDistance setFieldName(String fieldName) { + this.fieldName = fieldName; + return this; + } + + public GroupByGeoDistance setOrigin(GeoPoint origin) { + this.origin = origin; + return this; + } + + public GroupByGeoDistance setRanges(List ranges) { + this.ranges = ranges; + return this; + } + + public GroupByGeoDistance setSubAggregations(List subAggregations) { + this.subAggregations = subAggregations; + return this; + } + + public GroupByGeoDistance setSubGroupBys(List subGroupBys) { + this.subGroupBys = subGroupBys; + return this; + } + + public static final class Builder implements GroupByBuilder { + private String groupByName; + private String fieldName; + private GeoPoint origin; + private List ranges; + private List subAggregations; + private List subGroupBys; + + private Builder() { + } + + public Builder groupByName(String groupByName) { + this.groupByName = groupByName; + return this; + } + + public Builder fieldName(String fieldName) { + this.fieldName = fieldName; + return this; + } + + /** + * 设置起始中心点坐标 + * + * @param lat 起始中心点坐标纬度 + * @param lon 起始中心点坐标经度 + * @return builder + */ + public Builder origin(double lat, double lon) { + origin = new GeoPoint(lat, lon); + return this; + } + + /** + * 添加分组的范围 + * + * @param from 起始值,单位是米。可以使用最小值
 Double.MIN_VALUE
+ * @param to 结束值,单位是米。可以使用最大值
 Double.MAX_VALUE
+ * @return 当前 builder + */ + public Builder addRange(double from, double to) { + if (ranges == null) { + ranges = new ArrayList(); + } + this.ranges.add(new Range(from, to)); + return this; + } + + public Builder addSubAggregation(AggregationBuilder builder) { + if (subAggregations == null) { + subAggregations = new ArrayList(); + } + this.subAggregations.add(builder.build()); + return this; + } + + public Builder addSubGroupBy(GroupByBuilder builder) { + if (subGroupBys == null) { + subGroupBys = new ArrayList(); + } + this.subGroupBys.add(builder.build()); + return this; + } + + @Override + public GroupByGeoDistance build() { + return new GroupByGeoDistance(this); + } + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByGeoDistanceResult.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByGeoDistanceResult.java new file mode 100644 index 0000000..84766c0 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByGeoDistanceResult.java @@ -0,0 +1,35 @@ +package com.alicloud.openservices.tablestore.model.search.groupby; + +import java.util.List; + +public class GroupByGeoDistanceResult implements GroupByResult { + + private String groupByName; + private List groupByGeoDistanceResultItems; + + @Override + public String getGroupByName() { + return groupByName; + } + + @Override + public GroupByType getGroupByType() { + return GroupByType.GROUP_BY_GEO_DISTANCE; + } + + public GroupByGeoDistanceResult setGroupByName(String groupByName) { + this.groupByName = groupByName; + return this; + } + + public List getGroupByGeoDistanceResultItems() { + return groupByGeoDistanceResultItems; + } + + public GroupByGeoDistanceResult setGroupByGeoDistanceResultItems( + List groupByGeoDistanceResultItems) { + this.groupByGeoDistanceResultItems = groupByGeoDistanceResultItems; + return this; + } + +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByGeoDistanceResultItem.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByGeoDistanceResultItem.java new file mode 100644 index 0000000..1dd0831 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByGeoDistanceResultItem.java @@ -0,0 +1,59 @@ +package com.alicloud.openservices.tablestore.model.search.groupby; + +import com.alicloud.openservices.tablestore.model.search.agg.AggregationResults; + +public class GroupByGeoDistanceResultItem { + + private double from; + private double to; + private long rowCount; + private AggregationResults subAggregationResults; + private GroupByResults subGroupByResults; + + public double getFrom() { + return from; + } + + public GroupByGeoDistanceResultItem setFrom(double from) { + this.from = from; + return this; + } + + public double getTo() { + return to; + } + + public GroupByGeoDistanceResultItem setTo(double to) { + this.to = to; + return this; + } + + public long getRowCount() { + return rowCount; + } + + public GroupByGeoDistanceResultItem setRowCount(long rowCount) { + this.rowCount = rowCount; + return this; + } + + public AggregationResults getSubAggregationResults() { + return subAggregationResults; + } + + public GroupByGeoDistanceResultItem setSubAggregationResults( + AggregationResults subAggregationResults) { + this.subAggregationResults = subAggregationResults; + return this; + } + + public GroupByResults getSubGroupByResults() { + return subGroupByResults; + } + + public GroupByGeoDistanceResultItem setSubGroupByResults( + GroupByResults subGroupByResults) { + this.subGroupByResults = subGroupByResults; + return this; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByHistogram.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByHistogram.java new file mode 100644 index 0000000..e281582 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByHistogram.java @@ -0,0 +1,267 @@ +package com.alicloud.openservices.tablestore.model.search.groupby; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.alicloud.openservices.tablestore.core.protocol.SearchGroupByBuilder; +import com.alicloud.openservices.tablestore.core.utils.ValueUtil; +import com.alicloud.openservices.tablestore.model.ColumnValue; +import com.alicloud.openservices.tablestore.model.search.agg.Aggregation; +import com.alicloud.openservices.tablestore.model.search.agg.AggregationBuilder; +import com.alicloud.openservices.tablestore.model.search.sort.GroupBySorter; +import com.google.protobuf.ByteString; + +/** + * 对某一个字段进行直方图统计。 + *

举例:

+ *

数据有 1、1、5、5、8、10,对这组数据进行直方图统计,间隔(interval)为5,返回: “0->2;5->3;10>1”这样的范围统计数据。

+ */ +public class GroupByHistogram implements GroupBy { + + private GroupByType groupByType = GroupByType.GROUP_BY_HISTOGRAM; + + /** + * GroupBy的名字,之后从GroupBy结果列表中根据该名字拿到GroupBy结果 + */ + private String groupByName; + /** + * 字段名字 + */ + private String fieldName; + /** + * 间隔 + */ + private ColumnValue interval; + /** + * 缺失字段的默认值。 + *

如果一个文档缺少该字段,则采用什么默认值

+ */ + private ColumnValue missing; + /** + * 排序 + */ + private List groupBySorters; + /** + * 最小文档数 + */ + private Long minDocCount; + /** + * 桶边界限制 + */ + private FieldRange fieldRange; + /** + * 子聚合 + */ + private List subAggregations; + + /** + * 子分组 + */ + private List subGroupBys; + + public GroupByHistogram() { + } + + private GroupByHistogram(Builder builder) { + groupByName = builder.groupByName; + fieldName = builder.fieldName; + interval = builder.interval; + groupBySorters = builder.groupBySorters; + missing = builder.missing; + minDocCount = builder.minDocCount; + fieldRange = builder.fieldRange; + subAggregations = builder.subAggregations; + subGroupBys = builder.subGroupBys; + } + + public static Builder newBuilder() { + return new Builder(); + } + + @Override + public String getGroupByName() { + return groupByName; + } + + @Override + public GroupByType getGroupByType() { + return groupByType; + } + + @Override + public ByteString serialize() { + return SearchGroupByBuilder.buildGroupByHistogram(this).toByteString(); + } + + public String getFieldName() { + return fieldName; + } + + public Long getMinDocCount() { + return minDocCount; + } + + public ColumnValue getInterval() { + return interval; + } + + public ColumnValue getMissing() { + return missing; + } + + public List getGroupBySorters() { + return groupBySorters; + } + + public FieldRange getFieldRange() { + return fieldRange; + } + + public List getSubAggregations() { + return subAggregations; + } + + public List getSubGroupBys() { + return subGroupBys; + } + + public GroupByHistogram setGroupByName(String groupByName) { + this.groupByName = groupByName; + return this; + } + + public GroupByHistogram setFieldName(String fieldName) { + this.fieldName = fieldName; + return this; + } + + public GroupByHistogram setMinDocCount(Long minDocCount) { + this.minDocCount = minDocCount; + return this; + } + + public GroupByHistogram setGroupBySorters(List groupBySorters) { + this.groupBySorters = groupBySorters; + return this; + } + + public GroupByHistogram setGroupByType(GroupByType groupByType) { + this.groupByType = groupByType; + return this; + } + + public GroupByHistogram setInterval(ColumnValue interval) { + this.interval = interval; + return this; + } + + public GroupByHistogram setMissing(ColumnValue missing) { + this.missing = missing; + return this; + } + + public GroupByHistogram setFieldRange(FieldRange fieldRange) { + this.fieldRange = fieldRange; + return this; + } + + public GroupByHistogram setSubAggregations( + List subAggregations) { + this.subAggregations = subAggregations; + return this; + } + + public GroupByHistogram setSubGroupBys(List subGroupBys) { + this.subGroupBys = subGroupBys; + return this; + } + + public static final class Builder implements GroupByBuilder { + private String groupByName; + private String fieldName; + private ColumnValue interval; + private ColumnValue missing; + private Long minDocCount; + private List groupBySorters; + private FieldRange fieldRange; + private List subAggregations; + private List subGroupBys; + + private Builder() { + } + + public Builder groupByName(String groupByName) { + this.groupByName = groupByName; + return this; + } + + public Builder fieldName(String fieldName) { + this.fieldName = fieldName; + return this; + } + + public Builder interval(Object interval) { + this.interval = ValueUtil.toColumnValue(interval); + return this; + } + + /** + * 缺失字段的默认值。 + *

如果一个文档缺少该字段,则采用什么默认值

+ */ + public Builder missing(Object missing) { + this.missing = ValueUtil.toColumnValue(missing); + return this; + } + + public Builder minDocCount(Long minDocCount) { + this.minDocCount = minDocCount; + return this; + } + + public Builder addGroupBySorter(GroupBySorter... groupBySorter) { + if (groupBySorters == null) { + groupBySorters = new ArrayList(); + } + this.groupBySorters.addAll(Arrays.asList(groupBySorter)); + return this; + } + + public Builder addGroupBySorter(List groupBySorter) { + if (groupBySorters == null) { + groupBySorters = new ArrayList(); + } + this.groupBySorters.addAll(groupBySorter); + return this; + } + + public Builder addFieldRange(Object min, Object max) { + if (fieldRange == null) { + fieldRange = new FieldRange(ValueUtil.toColumnValue(min), ValueUtil.toColumnValue(max)); + } + return this; + } + + public Builder addSubAggregation(AggregationBuilder builder) { + if (subAggregations == null) { + subAggregations = new ArrayList(); + } + this.subAggregations.add(builder.build()); + return this; + } + + public Builder addSubGroupBy(GroupByBuilder builder) { + if (subGroupBys == null) { + subGroupBys = new ArrayList(); + } + this.subGroupBys.add(builder.build()); + return this; + } + + @Override + public GroupByHistogram build() { + return new GroupByHistogram(this); + } + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByHistogramItem.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByHistogramItem.java new file mode 100644 index 0000000..a086ea4 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByHistogramItem.java @@ -0,0 +1,49 @@ +package com.alicloud.openservices.tablestore.model.search.groupby; + +import com.alicloud.openservices.tablestore.model.ColumnValue; +import com.alicloud.openservices.tablestore.model.search.agg.AggregationResults; + +public class GroupByHistogramItem { + + private ColumnValue key; + private long value; + private AggregationResults subAggregationResults; + private GroupByResults subGroupByResults; + + public ColumnValue getKey() { + return key; + } + + public GroupByHistogramItem setKey(ColumnValue key) { + this.key = key; + return this; + } + + public long getValue() { + return value; + } + + public GroupByHistogramItem setValue(long value) { + this.value = value; + return this; + } + + public AggregationResults getSubAggregationResults() { + return subAggregationResults; + } + + public GroupByHistogramItem setSubAggregationResults( + AggregationResults subAggregationResults) { + this.subAggregationResults = subAggregationResults; + return this; + } + + public GroupByResults getSubGroupByResults() { + return subGroupByResults; + } + + public GroupByHistogramItem setSubGroupByResults(GroupByResults subGroupByResults) { + this.subGroupByResults = subGroupByResults; + return this; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByHistogramResult.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByHistogramResult.java new file mode 100644 index 0000000..61ba21a --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByHistogramResult.java @@ -0,0 +1,34 @@ +package com.alicloud.openservices.tablestore.model.search.groupby; + +import java.util.List; + +public class GroupByHistogramResult implements GroupByResult { + + private String groupByName; + private List groupByHistogramItems; + + @Override + public String getGroupByName() { + return groupByName; + } + + @Override + public GroupByType getGroupByType() { + return GroupByType.GROUP_BY_HISTOGRAM; + } + + public GroupByHistogramResult setGroupByName(String groupByName) { + this.groupByName = groupByName; + return this; + } + + public List getGroupByHistogramItems() { + return groupByHistogramItems; + } + + public GroupByHistogramResult setGroupByHistogramItems( + List groupByHistogramItems) { + this.groupByHistogramItems = groupByHistogramItems; + return this; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByRange.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByRange.java new file mode 100644 index 0000000..6b0213f --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByRange.java @@ -0,0 +1,169 @@ +package com.alicloud.openservices.tablestore.model.search.groupby; + +import java.util.ArrayList; +import java.util.List; + +import com.alicloud.openservices.tablestore.core.protocol.SearchGroupByBuilder; +import com.alicloud.openservices.tablestore.model.search.agg.Aggregation; +import com.alicloud.openservices.tablestore.model.search.agg.AggregationBuilder; +import com.google.protobuf.ByteString; + +/** + * 根据范围进行分组。 + */ +public class GroupByRange implements GroupBy { + + private GroupByType groupByType = GroupByType.GROUP_BY_RANGE; + + /** + * GroupBy的名字,之后从GroupBy结果列表中根据该名字拿到GroupBy结果 + */ + private String groupByName; + /** + * 字段名字 + */ + private String fieldName; + + /** + * range list. + * note: includes the from value and excludes the to value for each range. + */ + private List ranges; + + /** + * 子聚合 + */ + private List subAggregations; + + /** + * 子分组 + */ + private List subGroupBys; + + public GroupByRange() { + } + + private GroupByRange(Builder builder) { + groupByName = builder.groupByName; + fieldName = builder.fieldName; + ranges = builder.ranges; + subAggregations = builder.subAggregations; + subGroupBys = builder.subGroupBys; + } + + public static Builder newBuilder() { + return new Builder(); + } + + @Override + public String getGroupByName() { + return groupByName; + } + + @Override + public GroupByType getGroupByType() { + return groupByType; + } + + @Override + public ByteString serialize() { + return SearchGroupByBuilder.buildGroupByRange(this).toByteString(); + } + + public String getFieldName() { + return fieldName; + } + + public List getRanges() { + return ranges; + } + + public List getSubAggregations() { + return subAggregations; + } + + public List getSubGroupBys() { + return subGroupBys; + } + + public GroupByRange setGroupByName(String groupByName) { + this.groupByName = groupByName; + return this; + } + + public GroupByRange setFieldName(String fieldName) { + this.fieldName = fieldName; + return this; + } + + public GroupByRange setRanges(List ranges) { + this.ranges = ranges; + return this; + } + + public GroupByRange setSubAggregations(List subAggregations) { + this.subAggregations = subAggregations; + return this; + } + + public GroupByRange setSubGroupBys(List subGroupBys) { + this.subGroupBys = subGroupBys; + return this; + } + + public static final class Builder implements GroupByBuilder { + private String groupByName; + private String fieldName; + private List ranges; + private List subAggregations; + private List subGroupBys; + + private Builder() {} + + public Builder groupByName(String groupByName) { + this.groupByName = groupByName; + return this; + } + + public Builder fieldName(String fieldName) { + this.fieldName = fieldName; + return this; + } + + /** + * add one Range. + * note: includes the from value and excludes the to value for each range. + * + * @param from you can use
 Double.MIN_VALUE
+ * @param to you can use
 Double.MAX_VALUE
+ */ + public Builder addRange(double from, double to) { + if (ranges == null) { + ranges = new ArrayList(); + } + this.ranges.add(new Range(from, to)); + return this; + } + + public Builder addSubAggregation(AggregationBuilder builder) { + if (subAggregations == null) { + subAggregations = new ArrayList(); + } + this.subAggregations.add(builder.build()); + return this; + } + + public Builder addSubGroupBy(GroupByBuilder builder) { + if (subGroupBys == null) { + subGroupBys = new ArrayList(); + } + this.subGroupBys.add(builder.build()); + return this; + } + + @Override + public GroupByRange build() { + return new GroupByRange(this); + } + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByRangeResult.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByRangeResult.java new file mode 100644 index 0000000..39ff528 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByRangeResult.java @@ -0,0 +1,34 @@ +package com.alicloud.openservices.tablestore.model.search.groupby; + +import java.util.List; + +public class GroupByRangeResult implements GroupByResult { + + private String groupByName; + private List groupByRangeResultItems; + + @Override + public String getGroupByName() { + return groupByName; + } + + @Override + public GroupByType getGroupByType() { + return GroupByType.GROUP_BY_RANGE; + } + + public GroupByRangeResult setGroupByName(String groupByName) { + this.groupByName = groupByName; + return this; + } + + public List getGroupByRangeResultItems() { + return groupByRangeResultItems; + } + + public GroupByRangeResult setGroupByRangeResultItems(List groupByRangeResultItems) { + this.groupByRangeResultItems = groupByRangeResultItems; + return this; + } + +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByRangeResultItem.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByRangeResultItem.java new file mode 100644 index 0000000..bbdb83b --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByRangeResultItem.java @@ -0,0 +1,59 @@ +package com.alicloud.openservices.tablestore.model.search.groupby; + +import com.alicloud.openservices.tablestore.model.search.agg.AggregationResults; + +public class GroupByRangeResultItem { + + private double from; + private double to; + private long rowCount; + private AggregationResults subAggregationResults; + private GroupByResults subGroupByResults; + + public double getFrom() { + return from; + } + + public GroupByRangeResultItem setFrom(double from) { + this.from = from; + return this; + } + + public double getTo() { + return to; + } + + public GroupByRangeResultItem setTo(double to) { + this.to = to; + return this; + } + + public long getRowCount() { + return rowCount; + } + + public GroupByRangeResultItem setRowCount(long rowCount) { + this.rowCount = rowCount; + return this; + } + + public AggregationResults getSubAggregationResults() { + return subAggregationResults; + } + + public GroupByRangeResultItem setSubAggregationResults( + AggregationResults subAggregationResults) { + this.subAggregationResults = subAggregationResults; + return this; + } + + public GroupByResults getSubGroupByResults() { + return subGroupByResults; + } + + public GroupByRangeResultItem setSubGroupByResults( + GroupByResults subGroupByResults) { + this.subGroupByResults = subGroupByResults; + return this; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByResult.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByResult.java new file mode 100644 index 0000000..7443e60 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByResult.java @@ -0,0 +1,12 @@ +package com.alicloud.openservices.tablestore.model.search.groupby; + +/** + * GroupBy 结果的接口,具体说明请看具体实现里的说明 + */ +public interface GroupByResult { + + String getGroupByName(); + + GroupByType getGroupByType(); + +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByResults.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByResults.java new file mode 100644 index 0000000..239e1df --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByResults.java @@ -0,0 +1,103 @@ +package com.alicloud.openservices.tablestore.model.search.groupby; + +import java.util.Map; + +public class GroupByResults { + + private Map groupByResultMap; + + public int size(){ + return groupByResultMap.size(); + } + + public GroupByResults setGroupByResultMap( + Map groupByResultMap) { + this.groupByResultMap = groupByResultMap; + return this; + } + + public Map getResultAsMap() { + return groupByResultMap; + } + + public GroupByFieldResult getAsGroupByFieldResult(String groupByName) { + if (groupByResultMap != null && !groupByResultMap.containsKey(groupByName)) { + throw new IllegalArgumentException("GroupByResults don't contains: " + groupByName); + } else { + assert groupByResultMap != null; + GroupByResult result = groupByResultMap.get(groupByName); + if (result.getGroupByType() == GroupByType.GROUP_BY_FIELD) { + return (GroupByFieldResult)result; + } else { + throw new IllegalArgumentException( + "the result with this groupByName can't cast to GroupByFieldResult."); + } + } + + } + + public GroupByGeoDistanceResult getAsGroupByGeoDistanceResult(String groupByName) { + if (groupByResultMap != null && !groupByResultMap.containsKey(groupByName)) { + throw new IllegalArgumentException("GroupByResults don't contains: " + groupByName); + } else { + assert groupByResultMap != null; + GroupByResult result = groupByResultMap.get(groupByName); + if (result.getGroupByType() == GroupByType.GROUP_BY_GEO_DISTANCE) { + return (GroupByGeoDistanceResult)result; + } else { + throw new IllegalArgumentException( + "the result with this groupByName can't cast to GroupByGeoDistanceResult."); + } + } + + } + + public GroupByFilterResult getAsGroupByFilterResult(String groupByName) { + if (groupByResultMap != null && !groupByResultMap.containsKey(groupByName)) { + throw new IllegalArgumentException("GroupByResults don't contains: " + groupByName); + } else { + assert groupByResultMap != null; + GroupByResult result = groupByResultMap.get(groupByName); + if (result.getGroupByType() == GroupByType.GROUP_BY_FILTER) { + return (GroupByFilterResult)result; + } else { + throw new IllegalArgumentException( + "the result with this groupByName can't cast to GroupByFilterResult."); + } + } + + } + + public GroupByRangeResult getAsGroupByRangeResult(String groupByName) { + if (groupByResultMap != null && !groupByResultMap.containsKey(groupByName)) { + throw new IllegalArgumentException("GroupByResults don't contains: " + groupByName); + } else { + assert groupByResultMap != null; + GroupByResult result = groupByResultMap.get(groupByName); + if (result.getGroupByType() == GroupByType.GROUP_BY_RANGE) { + return (GroupByRangeResult)result; + } else { + throw new IllegalArgumentException( + "the result with this groupByName can't cast to GroupByRangeResult."); + } + } + + } + + public GroupByHistogramResult getAsGroupByHistogramResult(String groupByName) { + if (groupByResultMap != null && !groupByResultMap.containsKey(groupByName)) { + throw new IllegalArgumentException("GroupByResults don't contains: " + groupByName); + } else { + assert groupByResultMap != null; + GroupByResult result = groupByResultMap.get(groupByName); + if (result.getGroupByType() == GroupByType.GROUP_BY_HISTOGRAM) { + return (GroupByHistogramResult)result; + } else { + throw new IllegalArgumentException( + "the result with this groupByName can't cast to GroupByHistogramResult."); + } + } + + } + +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByType.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByType.java new file mode 100644 index 0000000..6cd27b2 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByType.java @@ -0,0 +1,25 @@ +package com.alicloud.openservices.tablestore.model.search.groupby; + +public enum GroupByType { + /** + * 根据 field 进行 groupBy + */ + GROUP_BY_FIELD, + /** + * 根据范围进行 groupBy + */ + GROUP_BY_RANGE, + /** + * 根据filter进行 groupBy + */ + GROUP_BY_FILTER, + /** + * 根据经纬度进行 groupBy + */ + GROUP_BY_GEO_DISTANCE, + /** + * 对数据进行直方图统计 + */ + GROUP_BY_HISTOGRAM, + +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/Range.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/Range.java new file mode 100644 index 0000000..cf86c4b --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/groupby/Range.java @@ -0,0 +1,29 @@ +package com.alicloud.openservices.tablestore.model.search.groupby; + +public class Range { + + private Double from; + + private Double to; + + public Double getFrom() { + return from; + } + + public void setFrom(Double from) { + this.from = from; + } + + public Double getTo() { + return to; + } + + public void setTo(Double to) { + this.to = to; + } + + public Range(Double from, Double to) { + this.from = from; + this.to = to; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/query/BoolQuery.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/query/BoolQuery.java index e2f6769..e87c512 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/model/search/query/BoolQuery.java +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/query/BoolQuery.java @@ -1,19 +1,22 @@ package com.alicloud.openservices.tablestore.model.search.query; +import java.util.ArrayList; +import java.util.List; + import com.alicloud.openservices.tablestore.core.protocol.SearchQueryBuilder; import com.google.protobuf.ByteString; -import java.util.List; - /** * 联合查询(复杂查询条件下用的最多的一个查询)。Bool查询对应Lucene中的BooleanQuery,它由一个或者多个子句组成,每个子句都有特定的类型。 *
    - *
  • must: 文档必须完全匹配条件
  • - *
  • should: should下面会带一个以上的条件,至少满足一个条件,这个文档就符合should
  • - *
  • must_not: 文档必须不匹配条件
  • + *
  • must: 文档必须完全匹配条件
  • + *
  • should: should下面会带一个以上的条件,至少满足一个条件,这个文档就符合should
  • + *
  • must_not: 文档必须不匹配条件
  • *
*/ -public class BoolQuery implements Query{ +public class BoolQuery implements Query { + + private QueryType queryType = QueryType.QueryType_BoolQuery; /** * 文档必须完全匹配所有的子query @@ -78,11 +81,73 @@ public void setMinimumShouldMatch(int minimumShouldMatch) { @Override public QueryType getQueryType() { - return QueryType.QueryType_BoolQuery; + return queryType; } @Override public ByteString serialize() { return SearchQueryBuilder.buildBoolQuery(this).toByteString(); } + + protected static Builder newBuilder() { + return new Builder(); + } + + public static final class Builder implements QueryBuilder { + private List mustQueries; + private List mustNotQueries; + private List filterQueries; + private List shouldQueries; + private Integer minimumShouldMatch; + + public Builder() {} + + public Builder must(QueryBuilder queryBuilder) { + if (this.mustQueries == null) { + this.mustQueries = new ArrayList(); + } + this.mustQueries.add(queryBuilder.build()); + return this; + } + + public Builder mustNot(QueryBuilder queryBuilder) { + if (this.mustNotQueries == null) { + this.mustNotQueries = new ArrayList(); + } + this.mustNotQueries.add(queryBuilder.build()); + return this; + } + + public Builder filter(QueryBuilder queryBuilder) { + if (this.filterQueries == null) { + this.filterQueries = new ArrayList(); + } + this.filterQueries.add(queryBuilder.build()); + return this; + } + + public Builder should(QueryBuilder queryBuilder) { + if (this.shouldQueries == null) { + this.shouldQueries = new ArrayList(); + } + this.shouldQueries.add(queryBuilder.build()); + return this; + } + + public Builder minimumShouldMatch(int value) { + this.minimumShouldMatch = value; + return this; + } + + @Override + public BoolQuery build() { + BoolQuery boolQuery = new BoolQuery(); + boolQuery.setMustQueries(this.mustQueries); + boolQuery.setMustNotQueries(this.mustNotQueries); + boolQuery.setFilterQueries(this.filterQueries); + boolQuery.setShouldQueries(this.shouldQueries); + boolQuery.minimumShouldMatch = this.minimumShouldMatch; + return boolQuery; + } + } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/query/ConstScoreQuery.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/query/ConstScoreQuery.java index 5800241..1e71d0b 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/model/search/query/ConstScoreQuery.java +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/query/ConstScoreQuery.java @@ -5,10 +5,13 @@ /** * 当我们不关心检索词频率TF(Term Frequency)对搜索结果排序的影响时,可以使用constant_score将查询语句query或者过滤语句filter包装起来,达到提高搜索速度。 - *

举例:我们班有100个人,有一个字段叫“name”,我们想要获得名字中包含“王”的人,我们并不关心排序结果,使用ConstScoreQuery(将原来的Query放在" private Query filter;"中)将会大大提高搜索速度。

+ *

举例:我们班有100个人,有一个字段叫“name”,我们想要获得名字中包含“王”的人,我们并不关心排序结果,使用ConstScoreQuery(将原来的Query放在" private Query + * filter;"中)将会大大提高搜索速度。

*/ public class ConstScoreQuery implements Query { + private QueryType queryType = QueryType.QueryType_ConstScoreQuery; + private Query filter; public Query getFilter() { @@ -21,11 +24,33 @@ public void setFilter(Query filter) { @Override public QueryType getQueryType() { - return QueryType.QueryType_ConstScoreQuery; + return queryType; } @Override public ByteString serialize() { return SearchQueryBuilder.buildConstScoreQuery(this).toByteString(); } + + protected static Builder newBuilder() { + return new ConstScoreQuery.Builder(); + } + + public static final class Builder implements QueryBuilder { + private Query filter; + + private Builder() {} + + public Builder filter(QueryBuilder queryBuilder) { + this.filter = queryBuilder.build(); + return this; + } + + @Override + public ConstScoreQuery build() { + ConstScoreQuery constScoreQuery = new ConstScoreQuery(); + constScoreQuery.setFilter(this.filter); + return constScoreQuery; + } + } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/query/ExistsQuery.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/query/ExistsQuery.java new file mode 100644 index 0000000..0de9079 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/query/ExistsQuery.java @@ -0,0 +1,53 @@ +package com.alicloud.openservices.tablestore.model.search.query; + +import com.alicloud.openservices.tablestore.core.protocol.SearchQueryBuilder; +import com.google.protobuf.ByteString; + +/** + * exists字段存在性查询 + */ +public class ExistsQuery implements Query { + + private QueryType queryType = QueryType.QueryType_ExistsQuery; + + private String fieldName; + + public String getFieldName() { + return fieldName; + } + + public void setFieldName(String fieldName) { + this.fieldName = fieldName; + } + + @Override + public QueryType getQueryType() { + return queryType; + } + + @Override + public ByteString serialize() { + return SearchQueryBuilder.buildExistsQuery(this).toByteString(); + } + + protected static Builder newBuilder() { + return new ExistsQuery.Builder(); + } + public static final class Builder implements QueryBuilder{ + private String fieldName; + + private Builder() {} + + public Builder field(String fieldName) { + this.fieldName = fieldName; + return this; + } + + @Override + public ExistsQuery build() { + ExistsQuery existsQuery= new ExistsQuery(); + existsQuery.setFieldName(fieldName); + return existsQuery; + } + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/query/FunctionScoreQuery.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/query/FunctionScoreQuery.java index 22562a9..33042fd 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/model/search/query/FunctionScoreQuery.java +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/query/FunctionScoreQuery.java @@ -9,6 +9,8 @@ */ public class FunctionScoreQuery implements Query { + private QueryType queryType = QueryType.QueryType_FunctionScoreQuery; + /** * 正常的{@link Query} */ @@ -38,11 +40,37 @@ public void setFieldValueFactor(FieldValueFactor fieldValueFactor) { @Override public QueryType getQueryType() { - return QueryType.QueryType_FunctionScoreQuery; + return queryType; } @Override public ByteString serialize() { return SearchQueryBuilder.buildFunctionScoreQuery(this).toByteString(); } + + protected static Builder newBuilder() { + return new Builder(); + } + + public static final class Builder implements QueryBuilder{ + private Query query; + private FieldValueFactor fieldValueFactor; + + private Builder() {} + + public Builder query(QueryBuilder queryBuilder) { + this.query = queryBuilder.build(); + return this; + } + + public Builder fieldValueFactor(String fieldName) { + this.fieldValueFactor = new FieldValueFactor(fieldName); + return this; + } + + @Override + public FunctionScoreQuery build() { + return new FunctionScoreQuery(this.query, this.fieldValueFactor); + } + } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/query/GeoBoundingBoxQuery.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/query/GeoBoundingBoxQuery.java index d26e756..94b43a6 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/model/search/query/GeoBoundingBoxQuery.java +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/query/GeoBoundingBoxQuery.java @@ -10,6 +10,8 @@ */ public class GeoBoundingBoxQuery implements Query { + private QueryType queryType = QueryType.QueryType_GeoBoundingBoxQuery; + private String fieldName; /** * 矩形的左上角的经纬度 @@ -48,11 +50,53 @@ public void setBottomRight(String bottomRight) { @Override public QueryType getQueryType() { - return QueryType.QueryType_GeoBoundingBoxQuery; + return queryType; } @Override public ByteString serialize() { return SearchQueryBuilder.buildGeoBoundingBoxQuery(this).toByteString(); } + + protected static Builder newBuilder() { + return new Builder(); + } + + public static final class Builder implements QueryBuilder { + private String fieldName; + private String topLeft; + private String bottomRight; + + private Builder() {} + + public Builder field(String fieldName) { + this.fieldName = fieldName; + return this; + } + + /** + * @param topLeft 矩形的左上角的经纬度,示例:"46.24123424, 23.2342424" + */ + public Builder topLeft(String topLeft) { + this.topLeft = topLeft; + return this; + } + + /** + * @param bottomRight 矩形的右下角经纬度,示例:"46.24123424, 23.2342424" + */ + public Builder bottomRight(String bottomRight) { + this.bottomRight = bottomRight; + return this; + } + + @Override + public GeoBoundingBoxQuery build() { + GeoBoundingBoxQuery boundingBoxQuery = new GeoBoundingBoxQuery(); + boundingBoxQuery.setBottomRight(this.bottomRight); + boundingBoxQuery.setTopLeft(this.topLeft); + boundingBoxQuery.setFieldName(this.fieldName); + return boundingBoxQuery; + } + } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/query/GeoDistanceQuery.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/query/GeoDistanceQuery.java index 010d603..de39f56 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/model/search/query/GeoDistanceQuery.java +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/query/GeoDistanceQuery.java @@ -10,6 +10,8 @@ */ public class GeoDistanceQuery implements Query { + private QueryType queryType = QueryType.QueryType_GeoDistanceQuery; + /** * 字段名 */ @@ -49,7 +51,7 @@ public void setDistanceInMeter(double distanceInMeter) { @Override public QueryType getQueryType() { - return QueryType.QueryType_GeoDistanceQuery; + return queryType; } @Override @@ -57,4 +59,39 @@ public ByteString serialize() { return SearchQueryBuilder.buildGeoDistanceQuery(this).toByteString(); } + protected static Builder newBuilder() { + return new Builder(); + } + + public static final class Builder implements QueryBuilder { + private String fieldName; + private String centerPoint; + private double distanceInMeter; + + private Builder() {} + + public Builder field(String fieldName) { + this.fieldName = fieldName; + return this; + } + + public Builder centerPoint(String centerPoint) { + this.centerPoint = centerPoint; + return this; + } + + public Builder distanceInMeter(double distanceInMeter) { + this.distanceInMeter = distanceInMeter; + return this; + } + + @Override + public GeoDistanceQuery build() { + GeoDistanceQuery geoDistanceQuery = new GeoDistanceQuery(); + geoDistanceQuery.setCenterPoint(this.centerPoint); + geoDistanceQuery.setDistanceInMeter(this.distanceInMeter); + geoDistanceQuery.setFieldName(this.fieldName); + return geoDistanceQuery; + } + } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/query/GeoPolygonQuery.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/query/GeoPolygonQuery.java index f48a694..d4ff7d8 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/model/search/query/GeoPolygonQuery.java +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/query/GeoPolygonQuery.java @@ -1,22 +1,26 @@ package com.alicloud.openservices.tablestore.model.search.query; +import java.util.ArrayList; +import java.util.List; + import com.alicloud.openservices.tablestore.core.protocol.SearchQueryBuilder; import com.google.protobuf.ByteString; -import java.util.List; - /** * 找出落在指定多边形包围起来的图形内的数据 + *

注意:这个查询器使用代价很大,请避免使用

*

场景举例:小黄车只能在繁华的地方服务,出了市区要收额外的服务费,而繁华的城市的边界是多边形的。我们想查询该车辆是否需要付额外的服务费,就需要通过搜索用户的经纬度是否在多边形内。

*/ public class GeoPolygonQuery implements Query { + private QueryType queryType = QueryType.QueryType_GeoPolygonQuery; + /** * 字段名 */ private String fieldName; /** - * 经纬度字符串的List + * 经纬度字符串的List */ private List points; @@ -38,11 +42,44 @@ public void setPoints(List points) { @Override public QueryType getQueryType() { - return QueryType.QueryType_GeoPolygonQuery; + return queryType; } @Override public ByteString serialize() { return SearchQueryBuilder.buildGeoPolygonQuery(this).toByteString(); } + + protected static Builder newBuilder() { + return new Builder(); + } + + public static final class Builder implements QueryBuilder { + private String fieldName; + private List points; + + private Builder() {} + + public Builder field(String fieldName) { + this.fieldName = fieldName; + return this; + } + + public Builder addPoint(String pointString) { + if (this.points == null) { + this.points = new ArrayList(); + } + this.points.add(pointString); + return this; + } + + @Override + public GeoPolygonQuery build() { + GeoPolygonQuery geoPolygonQuery = new GeoPolygonQuery(); + geoPolygonQuery.setFieldName(this.fieldName); + geoPolygonQuery.setPoints(this.points); + return geoPolygonQuery; + } + + } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/query/MatchAllQuery.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/query/MatchAllQuery.java index be6b02f..f456674 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/model/search/query/MatchAllQuery.java +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/query/MatchAllQuery.java @@ -8,13 +8,27 @@ */ public class MatchAllQuery implements Query { + private QueryType queryType = QueryType.QueryType_MatchAllQuery; + @Override public QueryType getQueryType() { - return QueryType.QueryType_MatchAllQuery; + return queryType; } @Override public ByteString serialize() { return SearchQueryBuilder.buildMatchAllQuery().toByteString(); } + + protected static MatchAllQuery.Builder newBuilder() { + return new MatchAllQuery.Builder(); + } + + public static final class Builder implements QueryBuilder { + + @Override + public Query build() { + return new MatchAllQuery(); + } + } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/query/MatchPhraseQuery.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/query/MatchPhraseQuery.java index 62ee84d..04de617 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/model/search/query/MatchPhraseQuery.java +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/query/MatchPhraseQuery.java @@ -8,8 +8,11 @@ */ public class MatchPhraseQuery implements Query { + private QueryType queryType = QueryType.QueryType_MatchPhraseQuery; + private String fieldName; private String text; + private float weight = 1.0f; public String getFieldName() { return fieldName; @@ -27,13 +30,59 @@ public void setText(String text) { this.text = text; } + public float getWeight() { + return weight; + } + + public void setWeight(float weight) { + this.weight = weight; + } + @Override public QueryType getQueryType() { - return QueryType.QueryType_MatchPhraseQuery; + return queryType; } @Override public ByteString serialize() { return SearchQueryBuilder.buildMatchPhraseQuery(this).toByteString(); } + + protected static Builder newBuilder() { + return new Builder(); + } + + public static final class Builder implements QueryBuilder{ + private String fieldName; + private String text; + private float weight = 1.0f; + + public Builder weight(float weight) { + this.weight = weight; + return this; + } + + private Builder() {} + + public Builder field(String fieldName) { + this.fieldName = fieldName; + return this; + } + + + + public Builder text(String text) { + this.text = text; + return this; + } + + @Override + public MatchPhraseQuery build() { + MatchPhraseQuery matchAllQuery = new MatchPhraseQuery(); + matchAllQuery.setFieldName(this.fieldName); + matchAllQuery.setText(this.text); + matchAllQuery.setWeight(this.weight); + return matchAllQuery; + } + } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/query/MatchQuery.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/query/MatchQuery.java index 1be3d5f..748a985 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/model/search/query/MatchQuery.java +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/query/MatchQuery.java @@ -7,6 +7,9 @@ * 包括模糊匹配和短语或邻近查询 */ public class MatchQuery implements Query { + + private QueryType queryType = QueryType.QueryType_MatchQuery; + /** * 字段 */ @@ -16,14 +19,18 @@ public class MatchQuery implements Query { */ private String text; + private float weight = 1.0f; + /** * 最小匹配个数 + * * @return */ private Integer minimumShouldMatch; /** * 操作符 + * * @return */ private QueryOperator operator; @@ -44,6 +51,14 @@ public void setText(String text) { this.text = text; } + public float getWeight() { + return weight; + } + + public void setWeight(float weight) { + this.weight = weight; + } + public QueryOperator getOperator() { return operator; } @@ -62,7 +77,7 @@ public void setMinimumShouldMatch(Integer minimumShouldMatch) { @Override public QueryType getQueryType() { - return QueryType.QueryType_MatchQuery; + return queryType; } @Override @@ -70,4 +85,56 @@ public ByteString serialize() { return SearchQueryBuilder.buildMatchQuery(this).toByteString(); } + protected static Builder newBuilder() { + return new Builder(); + } + + public static final class Builder implements QueryBuilder { + private String fieldName; + private String text; + private Integer minimumShouldMatch; + private QueryOperator operator; + private float weight = 1.0f; + + public Builder weight(float weight) { + this.weight = weight; + return this; + } + + private Builder() {} + + public Builder field(String fieldName) { + this.fieldName = fieldName; + return this; + } + + public Builder text(String text) { + this.text = text; + return this; + } + + public Builder minimumShouldMatch(int minimumShouldMatch) { + this.minimumShouldMatch = minimumShouldMatch; + return this; + } + + /** + * 设置操作符(非必要操作) + */ + public Builder operator(QueryOperator queryOperator) { + this.operator = queryOperator; + return this; + } + + @Override + public MatchQuery build() { + MatchQuery matchQuery = new MatchQuery(); + matchQuery.setFieldName(this.fieldName); + matchQuery.setMinimumShouldMatch(this.minimumShouldMatch); + matchQuery.setText(this.text); + matchQuery.setWeight(this.weight); + matchQuery.setOperator(this.operator); + return matchQuery; + } + } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/query/NestedQuery.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/query/NestedQuery.java index ad80ac7..dd21caf 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/model/search/query/NestedQuery.java +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/query/NestedQuery.java @@ -9,6 +9,9 @@ * 但是不能直接查询,需要通过{@link NestedQuery}来进行查询。在"path"设置为“os”,然后query中放一个正常的Query

*/ public class NestedQuery implements Query { + + private QueryType queryType = QueryType.QueryType_NestedQuery; + /** * 嵌套文档的路径 */ @@ -22,9 +25,11 @@ public class NestedQuery implements Query { */ private ScoreMode scoreMode; + private float weight = 1.0f; + @Override public QueryType getQueryType() { - return QueryType.QueryType_NestedQuery; + return queryType; } @Override @@ -55,4 +60,55 @@ public ScoreMode getScoreMode() { public void setScoreMode(ScoreMode scoreMode) { this.scoreMode = scoreMode; } + + public float getWeight() { + return weight; + } + + public void setWeight(float weight) { + this.weight = weight; + } + + protected static Builder newBuilder() { + return new Builder(); + } + + public static final class Builder implements QueryBuilder { + private String path; + private Query query; + private ScoreMode scoreMode; + private float weight = 1.0f; + + public Builder weight(float weight) { + this.weight = weight; + return this; + } + + private Builder() {} + + public Builder path(String path) { + this.path = path; + return this; + } + + public Builder query(QueryBuilder queryBuilder) { + this.query = queryBuilder.build(); + return this; + } + + public Builder scoreMode(ScoreMode scoreMode) { + this.scoreMode = scoreMode; + return this; + } + + @Override + public NestedQuery build() { + NestedQuery nestedQuery = new NestedQuery(); + nestedQuery.setPath(this.path); + nestedQuery.setQuery(this.query); + nestedQuery.setWeight(this.weight); + nestedQuery.setScoreMode(this.scoreMode); + return nestedQuery; + } + } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/query/PrefixQuery.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/query/PrefixQuery.java index cd68c3e..efd6ee9 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/model/search/query/PrefixQuery.java +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/query/PrefixQuery.java @@ -8,15 +8,19 @@ */ public class PrefixQuery implements Query { + private QueryType queryType = QueryType.QueryType_PrefixQuery; + private String fieldName; /** * 字符串前缀 */ private String prefix; + private float weight = 1.0f; + @Override public QueryType getQueryType() { - return QueryType.QueryType_PrefixQuery; + return queryType; } @Override @@ -39,4 +43,48 @@ public String getPrefix() { public void setPrefix(String prefix) { this.prefix = prefix; } + + public float getWeight() { + return weight; + } + + public void setWeight(float weight) { + this.weight = weight; + } + + protected static Builder newBuilder() { + return new Builder(); + } + + public static final class Builder implements QueryBuilder { + private String fieldName; + private String prefix; + private float weight = 1.0f; + + public Builder weight(float weight) { + this.weight = weight; + return this; + } + + private Builder() {} + + public Builder field(String fieldName) { + this.fieldName = fieldName; + return this; + } + + public Builder prefix(String prefix) { + this.prefix = prefix; + return this; + } + + @Override + public PrefixQuery build() { + PrefixQuery prefixQuery = new PrefixQuery(); + prefixQuery.setFieldName(this.fieldName); + prefixQuery.setPrefix(this.prefix); + prefixQuery.setWeight(this.weight); + return prefixQuery; + } + } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/query/QueryBuilder.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/query/QueryBuilder.java new file mode 100644 index 0000000..0ae2c86 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/query/QueryBuilder.java @@ -0,0 +1,9 @@ +package com.alicloud.openservices.tablestore.model.search.query; + +/** + * 所有Query的 innerBuilder 继承自QueryBuilder + */ +public interface QueryBuilder { + + Query build(); +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/query/QueryBuilders.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/query/QueryBuilders.java new file mode 100644 index 0000000..0c0437c --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/query/QueryBuilders.java @@ -0,0 +1,69 @@ +package com.alicloud.openservices.tablestore.model.search.query; + +public final class QueryBuilders { + + public static BoolQuery.Builder bool() { + return BoolQuery.newBuilder(); + } + + public static ConstScoreQuery.Builder constScore() { + return ConstScoreQuery.newBuilder(); + } + + public static ExistsQuery.Builder exists(String fieldName) { + return ExistsQuery.newBuilder().field(fieldName); + } + + public static FunctionScoreQuery.Builder functionScore(String fieldName) { + return FunctionScoreQuery.newBuilder().fieldValueFactor(fieldName); + } + + public static GeoBoundingBoxQuery.Builder geoBoundingBox(String fieldName) { + return GeoBoundingBoxQuery.newBuilder().field(fieldName); + } + + public static GeoDistanceQuery.Builder geoDistance(String fieldName) { + return GeoDistanceQuery.newBuilder().field(fieldName); + } + + public static GeoPolygonQuery.Builder geoPolygon(String fieldName) { + return GeoPolygonQuery.newBuilder().field(fieldName); + } + + public static MatchAllQuery.Builder matchAll() { + return MatchAllQuery.newBuilder(); + } + + public static MatchPhraseQuery.Builder matchPhrase(String fieldName, String text) { + return MatchPhraseQuery.newBuilder().field(fieldName).text(text); + } + + public static MatchQuery.Builder match(String fieldName, String text) { + return MatchQuery.newBuilder().field(fieldName).text(text); + } + + public static NestedQuery.Builder nested() { + return NestedQuery.newBuilder(); + } + + public static PrefixQuery.Builder prefix(String fieldName, String prefix) { + return PrefixQuery.newBuilder().field(fieldName).prefix(prefix); + } + + public static RangeQuery.Builder range(String fieldName) { + return RangeQuery.newBuilder().field(fieldName); + } + + public static TermQuery.Builder term(String fieldName, Object termValue) { + return TermQuery.newBuilder().field(fieldName).term(termValue); + } + + public static TermsQuery.Builder terms(String fieldName) { + return TermsQuery.newBuilder().field(fieldName); + } + + public static WildcardQuery.Builder wildcard(String fieldName, String value) { + return WildcardQuery.newBuilder().field(fieldName).value(value); + } + +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/query/QueryType.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/query/QueryType.java index 0927dc2..d4b286b 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/model/search/query/QueryType.java +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/query/QueryType.java @@ -19,5 +19,6 @@ public enum QueryType { QueryType_GeoBoundingBoxQuery, QueryType_GeoDistanceQuery, QueryType_GeoPolygonQuery, - QueryType_TermsQuery + QueryType_TermsQuery, + QueryType_ExistsQuery, } diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/query/RangeQuery.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/query/RangeQuery.java index 8216a7a..2653886 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/model/search/query/RangeQuery.java +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/query/RangeQuery.java @@ -1,6 +1,7 @@ package com.alicloud.openservices.tablestore.model.search.query; import com.alicloud.openservices.tablestore.core.protocol.SearchQueryBuilder; +import com.alicloud.openservices.tablestore.core.utils.ValueUtil; import com.alicloud.openservices.tablestore.model.ColumnValue; import com.google.protobuf.ByteString; @@ -9,6 +10,7 @@ */ public class RangeQuery implements Query { + private QueryType queryType = QueryType.QueryType_RangeQuery; /** * 字段名 */ @@ -66,7 +68,7 @@ public void setTo(ColumnValue value, boolean includeUpper) { @Override public QueryType getQueryType() { - return QueryType.QueryType_RangeQuery; + return queryType; } @Override @@ -105,4 +107,59 @@ public boolean isIncludeUpper() { public void setIncludeUpper(boolean includeUpper) { this.includeUpper = includeUpper; } + + protected static Builder newBuilder() { + return new Builder(); + } + + public static final class Builder implements QueryBuilder { + private String fieldName; + private ColumnValue from; + private ColumnValue to; + private boolean includeLower; + private boolean includeUpper; + + private Builder() {} + + public Builder field(String fieldName) { + this.fieldName = fieldName; + return this; + } + + public Builder greaterThanOrEqual(Object value) { + this.from = ValueUtil.toColumnValue(value); + this.includeLower = true; + return this; + } + + public Builder greaterThan(Object value) { + this.from = ValueUtil.toColumnValue(value); + this.includeLower = false; + return this; + } + + public Builder lessThanOrEqual(Object value) { + this.to = ValueUtil.toColumnValue(value); + this.includeUpper = true; + return this; + } + + public Builder lessThan(Object value) { + this.to = ValueUtil.toColumnValue(value); + this.includeUpper = false; + return this; + } + + @Override + public RangeQuery build() { + RangeQuery rangeQuery = new RangeQuery(); + rangeQuery.setFieldName(this.fieldName); + rangeQuery.setFrom(this.from); + rangeQuery.setTo(this.to); + rangeQuery.setIncludeLower(this.includeLower); + rangeQuery.setIncludeUpper(this.includeUpper); + return rangeQuery; + } + + } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/query/TermQuery.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/query/TermQuery.java index 9acdc2c..563354b 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/model/search/query/TermQuery.java +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/query/TermQuery.java @@ -1,6 +1,7 @@ package com.alicloud.openservices.tablestore.model.search.query; import com.alicloud.openservices.tablestore.core.protocol.SearchQueryBuilder; +import com.alicloud.openservices.tablestore.core.utils.ValueUtil; import com.alicloud.openservices.tablestore.model.ColumnValue; import com.google.protobuf.ByteString; @@ -9,8 +10,11 @@ */ public class TermQuery implements Query { + private QueryType queryType = QueryType.QueryType_TermQuery; + private String fieldName; private ColumnValue term; + private float weight = 1.0f; public String getFieldName() { return fieldName; @@ -28,13 +32,60 @@ public void setTerm(ColumnValue term) { this.term = term; } + public float getWeight() { + return weight; + } + + public void setWeight(float weight) { + this.weight = weight; + } + @Override public QueryType getQueryType() { - return QueryType.QueryType_TermQuery; + return queryType; } @Override public ByteString serialize() { return SearchQueryBuilder.buildTermQuery(this).toByteString(); } + + public TermQuery() { + } + + protected static Builder newBuilder() { + return new Builder(); + } + + public static final class Builder implements QueryBuilder { + private String fieldName; + private ColumnValue term; + private float weight = 1.0f; + + public Builder weight(float weight) { + this.weight = weight; + return this; + } + + private Builder() {} + + public Builder field(String val) { + fieldName = val; + return this; + } + + public Builder term(Object val) { + term = ValueUtil.toColumnValue(val); + return this; + } + + @Override + public TermQuery build() { + TermQuery termQuery = new TermQuery(); + termQuery.setTerm(this.term); + termQuery.setWeight(this.weight); + termQuery.setFieldName(this.fieldName); + return termQuery; + } + } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/query/TermsQuery.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/query/TermsQuery.java index d8397b3..6c56a16 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/model/search/query/TermsQuery.java +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/query/TermsQuery.java @@ -1,19 +1,23 @@ package com.alicloud.openservices.tablestore.model.search.query; +import java.util.ArrayList; +import java.util.List; + import com.alicloud.openservices.tablestore.core.protocol.SearchQueryBuilder; +import com.alicloud.openservices.tablestore.core.utils.ValueUtil; import com.alicloud.openservices.tablestore.model.ColumnValue; import com.google.protobuf.ByteString; -import java.util.ArrayList; -import java.util.List; - /** * 多个term查询。 */ public class TermsQuery implements Query { + private QueryType queryType = QueryType.QueryType_TermsQuery; + private String fieldName; private List terms; + private float weight = 1.0f; public String getFieldName() { return fieldName; @@ -38,9 +42,17 @@ public void addTerm(ColumnValue term) { this.terms.add(term); } + public float getWeight() { + return weight; + } + + public void setWeight(float weight) { + this.weight = weight; + } + @Override public QueryType getQueryType() { - return QueryType.QueryType_TermsQuery; + return queryType; } @Override @@ -48,4 +60,52 @@ public ByteString serialize() { return SearchQueryBuilder.buildTermsQuery(this).toByteString(); } + protected static Builder newBuilder() { + return new Builder(); + } + + public static final class Builder implements QueryBuilder { + private String fieldName; + private List terms; + private float weight = 1.0f; + + public Builder weight(float weight) { + this.weight = weight; + return this; + } + + private Builder() {} + + public Builder field(String fieldName) { + this.fieldName = fieldName; + return this; + } + + public Builder addTerm(Object term) { + if (terms == null) { + terms = new ArrayList(); + } + this.terms.add(ValueUtil.toColumnValue(term)); + return this; + } + + public Builder terms(Object... termArray) { + if (terms == null) { + terms = new ArrayList(); + } + for (Object o : termArray) { + terms.add(ValueUtil.toColumnValue(o)); + } + return this; + } + + @Override + public TermsQuery build() { + TermsQuery termsQuery = new TermsQuery(); + termsQuery.setFieldName(this.fieldName); + termsQuery.setTerms(this.terms); + termsQuery.setWeight(this.weight); + return termsQuery; + } + } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/query/WildcardQuery.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/query/WildcardQuery.java index b9fe852..f5e48a4 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/model/search/query/WildcardQuery.java +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/query/WildcardQuery.java @@ -9,12 +9,15 @@ */ public class WildcardQuery implements Query { + private QueryType queryType = QueryType.QueryType_WildcardQuery; + private String fieldName; private String value; + private float weight = 1.0f; @Override public QueryType getQueryType() { - return QueryType.QueryType_WildcardQuery; + return queryType; } @Override @@ -37,4 +40,48 @@ public String getValue() { public void setValue(String value) { this.value = value; } + + public float getWeight() { + return weight; + } + + public void setWeight(float weight) { + this.weight = weight; + } + + protected static Builder newBuilder() { + return new Builder(); + } + + public static final class Builder implements QueryBuilder { + private String fieldName; + private String value; + private float weight = 1.0f; + + public Builder weight(float weight) { + this.weight = weight; + return this; + } + + private Builder() {} + + public Builder field(String fieldName) { + this.fieldName = fieldName; + return this; + } + + public Builder value(String value) { + this.value = value; + return this; + } + + @Override + public WildcardQuery build() { + WildcardQuery wildcardQuery = new WildcardQuery(); + wildcardQuery.setFieldName(this.fieldName); + wildcardQuery.setValue(this.value); + wildcardQuery.setWeight(this.weight); + return wildcardQuery; + } + } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/sort/FieldSort.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/sort/FieldSort.java index 1243727..d8c9be5 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/model/search/sort/FieldSort.java +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/sort/FieldSort.java @@ -1,12 +1,25 @@ package com.alicloud.openservices.tablestore.model.search.sort; +import com.alicloud.openservices.tablestore.model.ColumnValue; + public class FieldSort implements Sort.Sorter { + public static final ColumnValue FIRST_WHEN_MISSING = ColumnValue.fromString("_first"); + public static final ColumnValue LAST_WHEN_MISSING = ColumnValue.fromString("_last"); + private String fieldName; private SortOrder order = SortOrder.ASC; private SortMode mode; private NestedFilter nestedFilter; + /** + * 当排序的字段某些行没有填充值的时候,排序行为支持以下三种: + *

1. {@link FieldSort#FIRST_WHEN_MISSING}: 当排序字段值缺省时候排在最前面

+ *

2. {@link FieldSort#LAST_WHEN_MISSING}: 当排序字段值缺省时候排在最后面

+ *

3. 自定义值: 当排序字段值缺省时候使用指定的值进行排序

+ */ + private ColumnValue missing; + public FieldSort(String fieldName) { this.fieldName = fieldName; } @@ -47,4 +60,15 @@ public NestedFilter getNestedFilter() { public void setNestedFilter(NestedFilter nestedFilter) { this.nestedFilter = nestedFilter; } + + public ColumnValue getMissing() { + return missing; + } + + /** + * @see FieldSort#missing + */ + public void setMissing(ColumnValue missing) { + this.missing = missing; + } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/sort/GroupBySorter.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/sort/GroupBySorter.java new file mode 100644 index 0000000..c49ef12 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/sort/GroupBySorter.java @@ -0,0 +1,72 @@ +package com.alicloud.openservices.tablestore.model.search.sort; + +public class GroupBySorter { + + private GroupKeySort groupKeySort; + private RowCountSort rowCountSort; + private SubAggSort subAggSort; + + private GroupBySorter(GroupKeySort groupKeySort, RowCountSort rowCountSort, SubAggSort subAggSort) { + this.groupKeySort = groupKeySort; + this.rowCountSort = rowCountSort; + this.subAggSort = subAggSort; + } + + public GroupBySorter() { + } + + public GroupKeySort getGroupKeySort() { + return groupKeySort; + } + + public RowCountSort getRowCountSort() { + return rowCountSort; + } + + public SubAggSort getSubAggSort() { + return subAggSort; + } + + public GroupBySorter setGroupKeySort(GroupKeySort groupKeySort) { + this.groupKeySort = groupKeySort; + return this; + } + + public GroupBySorter setRowCountSort(RowCountSort rowCountSort) { + this.rowCountSort = rowCountSort; + return this; + } + + public GroupBySorter setSubAggSort(SubAggSort subAggSort) { + this.subAggSort = subAggSort; + return this; + } + + public static GroupBySorter groupKeySortInAsc() { + return new GroupBySorter(GroupKeySort.asc(), null, null); + } + + public static GroupBySorter groupKeySortInDesc() { + return new GroupBySorter(GroupKeySort.desc(), null, null); + } + + public static GroupBySorter rowCountSortInAsc() { + return new GroupBySorter(null, RowCountSort.asc(), null); + } + + public static GroupBySorter rowCountSortInDesc() { + return new GroupBySorter(null, RowCountSort.desc(), null); + } + + public static GroupBySorter subAggSortInAsc(String subAggName) { + return new GroupBySorter(null, null, SubAggSort.asc(subAggName)); + } + + public static GroupBySorter subAggSortInDesc(String subAggName) { + return new GroupBySorter(null, null, SubAggSort.desc(subAggName)); + } + +} + + + diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/sort/GroupKeySort.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/sort/GroupKeySort.java new file mode 100644 index 0000000..69701a4 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/sort/GroupKeySort.java @@ -0,0 +1,28 @@ +package com.alicloud.openservices.tablestore.model.search.sort; + +public class GroupKeySort { + private SortOrder order; + + private GroupKeySort(SortOrder order) { + this.order = order; + } + + public static GroupKeySort asc() { + return new GroupKeySort(SortOrder.ASC); + } + + public static GroupKeySort desc() { + return new GroupKeySort(SortOrder.DESC); + } + + public SortOrder getOrder() { + return order; + } + + public void setOrder(SortOrder order) { + this.order = order; + } + + public GroupKeySort() { + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/sort/RowCountSort.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/sort/RowCountSort.java new file mode 100644 index 0000000..15bd26f --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/sort/RowCountSort.java @@ -0,0 +1,28 @@ +package com.alicloud.openservices.tablestore.model.search.sort; + +public class RowCountSort { + private SortOrder order; + + private RowCountSort(SortOrder order) { + this.order = order; + } + + public SortOrder getOrder() { + return order; + } + + public static RowCountSort asc() { + return new RowCountSort(SortOrder.ASC); + } + + public static RowCountSort desc() { + return new RowCountSort(SortOrder.DESC); + } + + public void setOrder(SortOrder order) { + this.order = order; + } + + public RowCountSort() { + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/sort/SortOrder.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/sort/SortOrder.java index 4a0c94e..e9e1adf 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/model/search/sort/SortOrder.java +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/sort/SortOrder.java @@ -6,4 +6,5 @@ public enum SortOrder { ASC, DESC + } diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/search/sort/SubAggSort.java b/src/main/java/com/alicloud/openservices/tablestore/model/search/sort/SubAggSort.java new file mode 100644 index 0000000..f8196a8 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/search/sort/SubAggSort.java @@ -0,0 +1,38 @@ +package com.alicloud.openservices.tablestore.model.search.sort; + +public class SubAggSort { + private SortOrder order; + private String subAggName; + + private SubAggSort(SortOrder order, String subAggName) { + this.order = order; + this.subAggName = subAggName; + } + + public SortOrder getOrder() { + return order; + } + + public String getSubAggName() { + return subAggName; + } + + public static SubAggSort asc(String subAggName) { + return new SubAggSort(SortOrder.ASC, subAggName); + } + + public static SubAggSort desc(String subAggName) { + return new SubAggSort(SortOrder.DESC, subAggName); + } + + public void setOrder(SortOrder order) { + this.order = order; + } + + public void setSubAggName(String subAggName) { + this.subAggName = subAggName; + } + + public SubAggSort() { + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLColumnSchema.java b/src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLColumnSchema.java new file mode 100644 index 0000000..6b8d918 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLColumnSchema.java @@ -0,0 +1,73 @@ +package com.alicloud.openservices.tablestore.model.sql; + +import com.alicloud.openservices.tablestore.core.utils.Jsonizable; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.alicloud.openservices.tablestore.model.ColumnType; + +/** + * 表示 SQL 表的列结构信息 + */ +public class SQLColumnSchema implements Jsonizable { + + private String name; + private ColumnType type; + + public SQLColumnSchema(String name, ColumnType type) { + Preconditions.checkArgument(name != null && !name.isEmpty(), "SQL col's name should not be null or empty."); + Preconditions.checkNotNull(type, "The type should not be null."); + + this.name = name; + this.type = type; + } + + /** + * 获取 SQL 列的名称 + * @return SQL 列的名称 + */ + public String getName() { + return name; + } + + /** + * 获取 SQL 列的类型 + * @return SQL 列的类型 + */ + public ColumnType getType() { + return type; + } + + @Override + public boolean equals(Object o) { + if (o == null || !(o instanceof SQLColumnSchema)) { + return false; + } + + SQLColumnSchema target = (SQLColumnSchema) o; + return this.name.equals(target.name) && this.type == target.type; + } + + @Override + public int hashCode() { + return this.name.hashCode() ^ this.type.hashCode(); + } + + @Override + public String toString() { + return name + ":" + type; + } + + @Override + public String jsonize() { + StringBuilder sb = new StringBuilder(); + jsonize(sb, "\n "); + return sb.toString(); + } + + @Override + public void jsonize(StringBuilder sb, String newline) { + sb.append(String.format( + "{\"Name\": \"%s\", \"Type\": \"%s\"}", + name, type.toString())); + + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLFactory.java b/src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLFactory.java new file mode 100644 index 0000000..a464664 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLFactory.java @@ -0,0 +1,46 @@ +package com.alicloud.openservices.tablestore.model.sql; + +import com.alicloud.openservices.tablestore.core.protocol.sql.flatbuffers.SQLResponseColumns; +import com.google.protobuf.ByteString; + +import java.nio.ByteBuffer; + +/** + * SQL 相关的静态工厂方法 + **/ +public class SQLFactory { + + public static SQLResultSet getSQLResultSet(SQLPayloadVersion version, SQLStatementType type, ByteString rows) { + switch (type) { + case SQL_SELECT: + case SQL_SHOW_TABLE: + case SQL_DESCRIBE_TABLE: + return new SQLResultSetImpl(version, rows); + case SQL_CREATE_TABLE: + case SQL_DROP_TABLE: + case SQL_ALTER_TABLE: + default: + return null; + } + } + + public static SQLRows getSQLRows(SQLPayloadVersion version, ByteString rows) { + switch (version) { + case SQL_FLAT_BUFFERS: + if (!rows.isEmpty()) { + ByteBuffer rowBuffer = rows.asReadOnlyByteBuffer(); + SQLResponseColumns columns = SQLResponseColumns.getRootAsSQLResponseColumns(rowBuffer); + return new SQLRowsFBsColumnBased(columns); + } else { + throw new IllegalStateException("Sql response get rows should not be null"); + } + default: + throw new IllegalStateException("Do not support other sql payload version: " + version); + } + } + + public static SQLRow getSQLRow(SQLRows sqlRows, int rowIndex) { + return new SQLRowImpl(sqlRows, rowIndex); + } + +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLPayloadVersion.java b/src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLPayloadVersion.java new file mode 100644 index 0000000..590bb4a --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLPayloadVersion.java @@ -0,0 +1,12 @@ +package com.alicloud.openservices.tablestore.model.sql; + +/** + * internal use + * 表示 SQL 序列化格式 + */ +public enum SQLPayloadVersion { + /** + * Flatbuffers 列存 + */ + SQL_FLAT_BUFFERS; +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLQueryRequest.java b/src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLQueryRequest.java new file mode 100644 index 0000000..c66b6c8 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLQueryRequest.java @@ -0,0 +1,43 @@ +package com.alicloud.openservices.tablestore.model.sql; + +import com.alicloud.openservices.tablestore.model.OperationNames; +import com.alicloud.openservices.tablestore.model.Request; + +/** + * 表示 SQL 数据查询请求 + */ +public class SQLQueryRequest implements Request { + + /** + * 单行查询条件 + */ + private final String query; + + /** + * 序列化格式 + */ + private final SQLPayloadVersion sqlPayloadVersion; + + public SQLQueryRequest(String query) { + this(query, SQLPayloadVersion.SQL_FLAT_BUFFERS); + } + + private SQLQueryRequest(String query, SQLPayloadVersion sqlPayloadVersion) { + this.query = query; + this.sqlPayloadVersion = sqlPayloadVersion; + } + + @Override + public String getOperationName() { + return OperationNames.OP_SQL_Query; + } + + public String getQuery() { + return query; + } + + public SQLPayloadVersion getSqlPayloadVersion() { + return sqlPayloadVersion; + } + +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLQueryResponse.java b/src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLQueryResponse.java new file mode 100644 index 0000000..5424ef9 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLQueryResponse.java @@ -0,0 +1,67 @@ +package com.alicloud.openservices.tablestore.model.sql; + +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.alicloud.openservices.tablestore.model.ConsumedCapacity; +import com.alicloud.openservices.tablestore.model.Response; +import com.google.protobuf.ByteString; + +import java.util.Map; + +/** + * 表示 SQL 请求的返回结果 + **/ +public class SQLQueryResponse extends Response { + + private Map consumedCapacityByTable; + + private SQLPayloadVersion version; + + private SQLStatementType type; + + private ByteString rows; + + /** + * internal use + */ + public SQLQueryResponse(Response meta, + Map consumedCapacityByTable, + SQLPayloadVersion version, + SQLStatementType type, + ByteString rows) { + super(meta); + Preconditions.checkNotNull(consumedCapacityByTable); + this.consumedCapacityByTable = consumedCapacityByTable; + this.version = version; + this.type = type; + this.rows = rows; + } + + /** + * 获取此次操作消耗的CapacityUnit。 + * + * @return 此次操作消耗的CapacityUnit。 + */ + public Map getConsumedCapacity() { + return consumedCapacityByTable; + } + + /** + * 获取 Statement 类型。 + * + * @return Statement 类型 + */ + public SQLStatementType getSQLStatementType() { + return type; + } + + /** + * 获取 SQL 数据集合。 + * {@link SQLStatementType#SQL_CREATE_TABLE},{@link SQLStatementType#SQL_DROP_TABLE},{@link SQLStatementType#SQL_ALTER_TABLE} 等 DDL 操作返回空 + * + * @return 数据返回集合 + */ + public SQLResultSet getSQLResultSet() { + return SQLFactory.getSQLResultSet(version, type, rows); + } + +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLResultSet.java b/src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLResultSet.java new file mode 100644 index 0000000..dd1c18d --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLResultSet.java @@ -0,0 +1,41 @@ +package com.alicloud.openservices.tablestore.model.sql; + +/** + * 表示 SQL 表的数据返回集合 + */ +public interface SQLResultSet { + + /** + * 返回数据集的 Schema + * + * @return + */ + SQLTableMeta getSQLTableMeta(); + + /** + * 是否有下一条数据。 + * @return + */ + boolean hasNext(); + + /** + * 返回下一条数据 + * @return + */ + SQLRow next(); + + /** + * 返回总行数 + * @return + */ + long rowCount(); + + /** + * 跳转到第 rowIndex 行 + * + * @param rowIndex 列游标 + * @return 如果跳转成功返回 true,如果未成功(比如越界),返回 false + */ + boolean absolute(int rowIndex); + +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLResultSetImpl.java b/src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLResultSetImpl.java new file mode 100644 index 0000000..422c6ad --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLResultSetImpl.java @@ -0,0 +1,54 @@ +package com.alicloud.openservices.tablestore.model.sql; + +import com.google.protobuf.ByteString; + +/** + * 表示 SQL 表的数据返回集合 + */ +public class SQLResultSetImpl implements SQLResultSet { + + private SQLRows sqlRows; + + private int current = 0; + + public SQLResultSetImpl(SQLPayloadVersion version, ByteString rows) { + this.sqlRows = SQLFactory.getSQLRows(version, rows); + } + + @Override + public SQLTableMeta getSQLTableMeta() { + return sqlRows.getSQLTableMeta(); + } + + @Override + public boolean hasNext() { + return current < sqlRows.rowCount(); + } + + @Override + public SQLRow next() { + if (hasNext()) { + SQLRow sqlRow = SQLFactory.getSQLRow(sqlRows, current); + current++; + return sqlRow; + } else { + throw new IllegalStateException("SQLRow doesn't have next row"); + } + } + + @Override + public long rowCount() { + return sqlRows.rowCount(); + } + + @Override + public boolean absolute(int rowIndex) { + if (rowIndex >= sqlRows.rowCount() || rowIndex < 0) { + return false; + } else { + current = rowIndex; + return true; + } + } + +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLRow.java b/src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLRow.java new file mode 100644 index 0000000..0a543a0 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLRow.java @@ -0,0 +1,126 @@ +package com.alicloud.openservices.tablestore.model.sql; + +import com.alicloud.openservices.tablestore.model.ColumnType; + +import java.nio.ByteBuffer; + +/** + * 表示 SQL 行的数据结构 + **/ +public interface SQLRow { + + /** + * 根据列游标获取数据对象。 + * + * @param columnIndex 列游标 + * @return 数据对象 + */ + Object get(int columnIndex); + + /** + * 根据列名获取数据对象。 + * + * @param name 列名 + * @return 数据对象 + */ + Object get(String name); + + /** + * 根据列游标获取字符串类型的值。 + *

当前仅当数据类型为{@link ColumnType#STRING}才能获取到值。

+ * + * @param columnIndex 列游标 + * @return 字符串类型的值 + */ + String getString(int columnIndex); + + /** + * 根据列名获取字符串类型的值。 + *

当前仅当数据类型为{@link ColumnType#STRING}才能获取到值。

+ * + * @param name 列名 + * @return 字符串类型的值 + */ + String getString(String name); + + /** + * 根据列游标获取整型的值。 + *

当前仅当数据类型为{@link ColumnType#INTEGER}才能获取到值。

+ * + * @param columnIndex 列游标 + * @return 整型的值 + */ + Long getLong(int columnIndex); + + /** + * 根据列名获取整型的值。 + *

当前仅当数据类型为{@link ColumnType#INTEGER}才能获取到值。

+ * + * @param name 列名 + * @return 整型的值 + */ + Long getLong(String name); + + /** + * 根据列游标获取布尔类型的值。 + *

当前仅当数据类型为{@link ColumnType#BOOLEAN}才能获取到值。

+ * + * @param columnIndex 列游标 + * @return 布尔类型的值 + */ + Boolean getBoolean(int columnIndex); + + /** + * 根据列名获取布尔类型的值。 + *

当前仅当数据类型为{@link ColumnType#BOOLEAN}才能获取到值。

+ * + * @param name 列名 + * @return 布尔类型的值 + */ + Boolean getBoolean(String name); + + /** + * 根据列游标获取浮点数类型的值。 + *

当前仅当数据类型为{@link ColumnType#DOUBLE}才能获取到值。

+ * + * @param columnIndex 列游标 + * @return 浮点数类型的值 + */ + Double getDouble(int columnIndex); + + /** + * 根据列名获取浮点数类型的值。 + *

当前仅当数据类型为{@link ColumnType#DOUBLE}才能获取到值。

+ * + * @param name 列名 + * @return 浮点数类型的值 + */ + Double getDouble(String name); + + /** + * 根据列游标获取 Binary 类型的值。 + *

当前仅当数据类型为{@link ColumnType#BINARY}才能获取到值。

+ * + * @param columnIndex 列游标 + * @return Binary 类型的值 + */ + ByteBuffer getBinary(int columnIndex); + + /** + * 根据列名获取 BINARY 类型的值。 + *

当前仅当数据类型为{@link ColumnType#BINARY}才能获取到值。

+ * + * @param name 列名 + * @return BINARY 类型的值 + */ + ByteBuffer getBinary(String name); + + /** + * 建议只用于 Debug 和 测试使用 + * 格式化输出该行的数据,按"columnA: valueA, columnB: valueB"的格式 + * + * @return 格式化输出 + */ + String toDebugString(); + +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLRowImpl.java b/src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLRowImpl.java new file mode 100644 index 0000000..a0cc8d3 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLRowImpl.java @@ -0,0 +1,176 @@ +package com.alicloud.openservices.tablestore.model.sql; + +import com.alicloud.openservices.tablestore.model.ColumnType; + +import java.nio.ByteBuffer; +import java.util.List; + +public class SQLRowImpl implements SQLRow { + + private SQLRows sqlRows; + + private int rowIndex; + + public SQLRowImpl(SQLRows sqlRows, int rowIndex) { + this.sqlRows = sqlRows; + this.rowIndex = rowIndex; + } + + @Override + public Object get(int columnIndex) { + checkValid(columnIndex, null); + return sqlRows.get(rowIndex, columnIndex); + } + + @Override + public Object get(String name) { + checkValid(name, null); + return get(sqlRows.getSQLTableMeta().getColumnsMap().get(name)); + } + + @Override + public String getString(int columnIndex) { + checkValid(columnIndex, ColumnType.STRING); + Object value = get(columnIndex); + if (value == null) { + return null; + } else { + return (String) value; + } + } + + @Override + public String getString(String name) { + checkValid(name, ColumnType.STRING); + Object value = get(name); + if (value == null) { + return null; + } else { + return (String) value; + } + } + + @Override + public Long getLong(int columnIndex) { + checkValid(columnIndex, ColumnType.INTEGER); + Object value = get(columnIndex); + if (value == null) { + return null; + } else { + return (Long) value; + } + } + + @Override + public Long getLong(String name) { + checkValid(name, ColumnType.INTEGER); + Object value = get(name); + if (value == null) { + return null; + } else { + return (Long) value; + } + } + + @Override + public Boolean getBoolean(int columnIndex) { + checkValid(columnIndex, ColumnType.BOOLEAN); + Object value = get(columnIndex); + if (value == null) { + return null; + } else { + return (Boolean) value; + } + } + + @Override + public Boolean getBoolean(String name) { + checkValid(name, ColumnType.BOOLEAN); + Object value = get(name); + if (value == null) { + return null; + } else { + return (Boolean) value; + } + } + + @Override + public Double getDouble(int columnIndex) { + checkValid(columnIndex, ColumnType.DOUBLE); + Object value = get(columnIndex); + if (value == null) { + return null; + } else { + return (Double) value; + } + } + + @Override + public Double getDouble(String name) { + checkValid(name, ColumnType.DOUBLE); + Object value = get(name); + if (value == null) { + return null; + } else { + return (Double) value; + } + } + + @Override + public ByteBuffer getBinary(int columnIndex) { + checkValid(columnIndex, ColumnType.BINARY); + Object value = get(columnIndex); + if (value == null) { + return null; + } else { + return (ByteBuffer) value; + } + } + + @Override + public ByteBuffer getBinary(String name) { + checkValid(name, ColumnType.BINARY); + Object value = get(name); + if (value == null) { + return null; + } else { + return (ByteBuffer) value; + } + } + + @Override + public String toDebugString() { + StringBuilder sb = new StringBuilder(); + List schemas = sqlRows.getSQLTableMeta().getSchema(); + for (int i = 0; i < schemas.size(); i++) { + sb.append(schemas.get(i).getName() + ": "); + sb.append(get(i)); + if (i < schemas.size() - 1) { + sb.append(", "); + } + } + return sb.toString(); + } + + private void checkValid(int columnIndex, ColumnType responseType) { + if (columnIndex >= sqlRows.columnCount() || columnIndex < 0) { + throw new UnsupportedOperationException("Column index " + columnIndex + " is out of range"); + } + if (responseType != null && responseType != sqlRows.getSQLTableMeta().getSchema().get(columnIndex).getType()) { + throw new UnsupportedOperationException("Column type collates failed, response type: " + responseType + + ", but the real is: " + sqlRows.getSQLTableMeta().getSchema().get(columnIndex).getType()); + } + } + + private void checkValid(String name, ColumnType responseType) { + if (!sqlRows.getSQLTableMeta().getColumnsMap().containsKey(name)) { + throw new IllegalStateException("SQLRow doesn't contains field name: " + name); + } + int columnIndex = sqlRows.getSQLTableMeta().getColumnsMap().get(name); + if (responseType != null && responseType != sqlRows.getSQLTableMeta().getSchema().get(columnIndex).getType()) { + throw new UnsupportedOperationException("Column type collates failed, response type: " + responseType + + ", but the real is: " + sqlRows.getSQLTableMeta().getSchema().get(columnIndex).getType()); + } + } + +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLRows.java b/src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLRows.java new file mode 100644 index 0000000..dc93667 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLRows.java @@ -0,0 +1,38 @@ +package com.alicloud.openservices.tablestore.model.sql; + +/** + * 表示 SQL 数据存储的数据集 + **/ +public interface SQLRows { + + /** + * 返回数据集的 Schema + * + * @return 数据集的 Schema + */ + SQLTableMeta getSQLTableMeta(); + + /** + * 返回数据集的总行数 + * + * @return 总行数 + */ + long rowCount(); + + /** + * 返回数据集的列个数 + * + * @return 总行数 + */ + long columnCount(); + + /** + * 按行游标和列游标查询某行某列的数据 + * + * @param rowIndex 行游标 + * @param columnIndex 列游标 + * @return 数据 + */ + Object get(int rowIndex, int columnIndex); + +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLRowsFBsColumnBased.java b/src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLRowsFBsColumnBased.java new file mode 100644 index 0000000..7756787 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLRowsFBsColumnBased.java @@ -0,0 +1,153 @@ +package com.alicloud.openservices.tablestore.model.sql; + +import com.alicloud.openservices.tablestore.core.protocol.sql.flatbuffers.BytesValue; +import com.alicloud.openservices.tablestore.core.protocol.sql.flatbuffers.ColumnValues; +import com.alicloud.openservices.tablestore.core.protocol.sql.flatbuffers.DataType; +import com.alicloud.openservices.tablestore.core.protocol.sql.flatbuffers.RLEStringValues; +import com.alicloud.openservices.tablestore.core.protocol.sql.flatbuffers.SQLResponseColumn; +import com.alicloud.openservices.tablestore.core.protocol.sql.flatbuffers.SQLResponseColumns; +import com.alicloud.openservices.tablestore.model.ColumnType; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * 表示以 Flatbuffers 协议列式存储的数据集 + **/ +public class SQLRowsFBsColumnBased implements SQLRows { + + private SQLTableMeta sqlTableMeta; + + private String[] columnNames; + + private byte[] columnTypes; + + private ColumnValues[] columnValues; + + private RLEStringValues[] rleStringValues; + + private long rowCount; + + private long columnCount; + + public SQLRowsFBsColumnBased(SQLResponseColumns columns) { + this.columnNames = new String[columns.columnsLength()]; + this.columnTypes = new byte[columns.columnsLength()]; + this.columnValues = new ColumnValues[columns.columnsLength()]; + this.rleStringValues = new RLEStringValues[columns.columnsLength()]; + for (int i = 0; i < columns.columnsLength(); i++) { + SQLResponseColumn column = columns.columns(i); + this.columnNames[i] = column.columnName(); + this.columnTypes[i] = column.columnType(); + this.columnValues[i] = column.columnValue(); + this.rleStringValues[i] = this.columnValues[i].rleStringValues(); + } + this.rowCount = columns.rowCount(); + this.columnCount = columns.columnsLength(); + this.sqlTableMeta = resolveSQLTableMetaFromColumns(); + } + + private SQLTableMeta resolveSQLTableMetaFromColumns() { + List schema = new ArrayList(); + Map columnsMap = new HashMap(); + for (int i = 0; i < columnCount; i++) { + schema.add(new SQLColumnSchema(columnNames[i], convertColumnType(columnTypes[i]))); + columnsMap.put(columnNames[i], i); + } + return new SQLTableMeta(schema, columnsMap); + } + + private ColumnType convertColumnType(byte columnType) { + switch (columnType) { + case DataType.LONG: + return ColumnType.INTEGER; + case DataType.BOOLEAN: + return ColumnType.BOOLEAN; + case DataType.DOUBLE: + return ColumnType.DOUBLE; + case DataType.STRING: + case DataType.STRING_RLE: + return ColumnType.STRING; + case DataType.BINARY: + return ColumnType.BINARY; + default: + throw new UnsupportedOperationException("not supported column type in flatbuffers: " + columnType); + } + } + + @Override + public SQLTableMeta getSQLTableMeta() { + return sqlTableMeta; + } + + @Override + public long rowCount() { + return rowCount; + } + + @Override + public long columnCount() { + return columnCount; + } + + @Override + public Object get(int rowIndex, int columnIndex) { + if (rowIndex >= rowCount() || rowIndex < 0) { + throw new IllegalStateException("Row index " + columnIndex + " out of range"); + } + if (columnIndex >= columnCount || columnIndex < 0) { + throw new IllegalStateException("Column index " + columnIndex + " out of range"); + } + byte columnType = columnTypes[columnIndex]; + ColumnValues columnValue = columnValues[columnIndex]; + switch (columnType) { + case DataType.LONG: + if (columnValue.isNullvalues(rowIndex)) { + return null; + } else { + return columnValue.longValues(rowIndex); + } + case DataType.BOOLEAN: + if (columnValue.isNullvalues(rowIndex)) { + return null; + } else { + return columnValue.boolValues(rowIndex); + } + case DataType.DOUBLE: + if (columnValue.isNullvalues(rowIndex)) { + return null; + } else { + return columnValue.doubleValues(rowIndex); + } + case DataType.STRING: + if (columnValue.isNullvalues(rowIndex)) { + return null; + } else { + return columnValue.stringValues(rowIndex); + } + case DataType.BINARY: + if (columnValue.isNullvalues(rowIndex)) { + return null; + } else { + BytesValue bytesValue = columnValue.binaryValues(rowIndex); + return bytesValue.valueAsByteBuffer().duplicate(); + } + case DataType.STRING_RLE: + if (columnValue.isNullvalues(rowIndex)) { + return null; + } else { + RLEStringValues rleStringValue = rleStringValues[columnIndex]; + return resolveRLEString(rleStringValue, rowIndex); + } + default: + throw new UnsupportedOperationException("not supported column type in flatbuffers: " + columnType); + } + } + + private String resolveRLEString(RLEStringValues rleStringValue, int rowIndex) { + return rleStringValue.array(rleStringValue.indexMapping(rowIndex)); + } + +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLStatementType.java b/src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLStatementType.java new file mode 100644 index 0000000..1883bd1 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLStatementType.java @@ -0,0 +1,36 @@ +package com.alicloud.openservices.tablestore.model.sql; + +/** + * 表示 SQL Statement 的数据类型。 + */ +public enum SQLStatementType { + /** + * 查询。 + */ + SQL_SELECT, + + /** + * 建表。 + */ + SQL_CREATE_TABLE, + + /** + * 查询表列表。 + */ + SQL_SHOW_TABLE, + + /** + * 查询表格式。 + */ + SQL_DESCRIBE_TABLE, + + /** + * 删除表。 + */ + SQL_DROP_TABLE, + + /** + * 修改表。 + */ + SQL_ALTER_TABLE, +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLTableMeta.java b/src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLTableMeta.java new file mode 100644 index 0000000..9ca91d4 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLTableMeta.java @@ -0,0 +1,34 @@ +package com.alicloud.openservices.tablestore.model.sql; + +import java.util.List; +import java.util.Map; + +/** + * SQL 表的结构信息 + */ +public class SQLTableMeta { + + /** + * 表的字段定义 + */ + private final List schema; + + /** + * 表字段名到表字段下标的映射表 + */ + private final Map columnsMap; + + public SQLTableMeta(List schema, Map columnsMap) { + this.schema = schema; + this.columnsMap = columnsMap; + } + + public List getSchema() { + return schema; + } + + public Map getColumnsMap() { + return columnsMap; + } + +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLUtils.java b/src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLUtils.java new file mode 100644 index 0000000..625273e --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/sql/SQLUtils.java @@ -0,0 +1,33 @@ +package com.alicloud.openservices.tablestore.model.sql; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.ArrayList; +import java.util.List; + +/** + * SQL API 的 Utils 方法 + **/ +public class SQLUtils { + + private static final Logger LOG = LoggerFactory.getLogger(SQLUtils.class); + + /** + * 解析 Show Tables SQL 返回结果 + * @param response Show Tables SQL 返回结果 + * @return 表列表 + */ + public static List parseShowTablesResponse(SQLQueryResponse response) { + if (response.getSQLStatementType() != SQLStatementType.SQL_SHOW_TABLE) { + throw new IllegalStateException("SQL statement is not `show tables`."); + } + SQLResultSet rs = response.getSQLResultSet(); + List tables = new ArrayList(); + while (rs.hasNext()) { + tables.add(rs.next().getString(0)); + } + return tables; + } + +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/AttributeMetaQueryCondition.java b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/AttributeMetaQueryCondition.java new file mode 100644 index 0000000..381ebbd --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/AttributeMetaQueryCondition.java @@ -0,0 +1,36 @@ +package com.alicloud.openservices.tablestore.model.timeseries; + +import com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.google.protobuf.ByteString; + +public class AttributeMetaQueryCondition implements MetaQueryCondition { + + private final MetaQuerySingleOperator operator; + private final String attributeName; + private final String value; + + public AttributeMetaQueryCondition(MetaQuerySingleOperator operator, String attributeName, String value) { + Preconditions.checkNotNull(operator); + Preconditions.checkStringNotNullAndEmpty(attributeName, "tag name should not be null or empty"); + Preconditions.checkNotNull(value); + this.operator = operator; + this.attributeName = attributeName; + this.value = value; + } + + @Override + public Timeseries.MetaQueryConditionType getType() { + return Timeseries.MetaQueryConditionType.ATTRIBUTE_CONDITION; + } + + @Override + public ByteString serialize() { + return Timeseries.MetaQueryAttributeCondition.newBuilder() + .setOp(operator.toPB()) + .setAttrName(attributeName) + .setValue(value) + .build() + .toByteString(); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/CompositeMetaQueryCondition.java b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/CompositeMetaQueryCondition.java new file mode 100644 index 0000000..b1cbe78 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/CompositeMetaQueryCondition.java @@ -0,0 +1,49 @@ +package com.alicloud.openservices.tablestore.model.timeseries; + +import com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.google.protobuf.ByteString; + +import java.util.ArrayList; +import java.util.List; + +public class CompositeMetaQueryCondition implements MetaQueryCondition { + + private final MetaQueryCompositeOperator operator; + private List subConditions = new ArrayList(); + + public CompositeMetaQueryCondition(MetaQueryCompositeOperator op) { + Preconditions.checkNotNull(op); + this.operator = op; + } + + public List getSubConditions() { + return subConditions; + } + + public void setSubConditions(List subConditions) { + this.subConditions = subConditions; + } + + public void addSubCondition(MetaQueryCondition subCondition) { + this.subConditions.add(subCondition); + } + + @Override + public Timeseries.MetaQueryConditionType getType() { + return Timeseries.MetaQueryConditionType.COMPOSITE_CONDITION; + } + + @Override + public ByteString serialize() { + Preconditions.checkArgument(!subConditions.isEmpty(), "subConditions is empty"); + Timeseries.MetaQueryCompositeCondition.Builder builder = + Timeseries.MetaQueryCompositeCondition.newBuilder().setOp(operator.toPB()); + for (MetaQueryCondition condition : subConditions) { + builder.addSubConditions(Timeseries.MetaQueryCondition.newBuilder() + .setType(condition.getType()) + .setProtoData(condition.serialize())); + } + return builder.build().toByteString(); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/CreateTimeseriesTableRequest.java b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/CreateTimeseriesTableRequest.java new file mode 100644 index 0000000..1ce4aec --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/CreateTimeseriesTableRequest.java @@ -0,0 +1,49 @@ +package com.alicloud.openservices.tablestore.model.timeseries; + +import com.alicloud.openservices.tablestore.core.utils.OptionalValue; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.alicloud.openservices.tablestore.model.*; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; + +public class CreateTimeseriesTableRequest implements Request { + + /** + * 表的结构信息。 + */ + private TimeseriesTableMeta timeseriesTableMeta; + + /** + * 初始化CreateTimeseriesTableRequest实例。 + *

表的各项均为默认值,目前只包含timeseriestablemeta + * @param timeseriesTableMeta 表的结构信息。 + */ + public CreateTimeseriesTableRequest(TimeseriesTableMeta timeseriesTableMeta) { + setTimeseriesTableMeta(timeseriesTableMeta); + } + + @Override + public String getOperationName() { + return OperationNames.OP_CREATE_TIMESERIES_TABLE; + } + + /** + * 获取表的结构信息。 + * @return 表的结构信息 + */ + public TimeseriesTableMeta getTimeseriesTableMeta() { + return timeseriesTableMeta; + } + + /** + * 设置表的结构信息。 + * @param timeseriesTableMeta 表的结构信息 + */ + public void setTimeseriesTableMeta(TimeseriesTableMeta timeseriesTableMeta) { + Preconditions.checkNotNull(timeseriesTableMeta, "timeseriesTableMeta should not be null."); + this.timeseriesTableMeta = timeseriesTableMeta; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/CreateTimeseriesTableResponse.java b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/CreateTimeseriesTableResponse.java new file mode 100644 index 0000000..b54669c --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/CreateTimeseriesTableResponse.java @@ -0,0 +1,10 @@ +package com.alicloud.openservices.tablestore.model.timeseries; + +import com.alicloud.openservices.tablestore.model.Response; + +public class CreateTimeseriesTableResponse extends Response { + + public CreateTimeseriesTableResponse(Response meta) { + super(meta); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/DataSourceMetaQueryCondition.java b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/DataSourceMetaQueryCondition.java new file mode 100644 index 0000000..d1ec22a --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/DataSourceMetaQueryCondition.java @@ -0,0 +1,32 @@ +package com.alicloud.openservices.tablestore.model.timeseries; + +import com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.google.protobuf.ByteString; + +public class DataSourceMetaQueryCondition implements MetaQueryCondition { + + private final MetaQuerySingleOperator operator; + private final String value; + + public DataSourceMetaQueryCondition(MetaQuerySingleOperator operator, String value) { + Preconditions.checkNotNull(operator); + Preconditions.checkNotNull(value); + this.operator = operator; + this.value = value; + } + + @Override + public Timeseries.MetaQueryConditionType getType() { + return Timeseries.MetaQueryConditionType.SOURCE_CONDITION; + } + + @Override + public ByteString serialize() { + return Timeseries.MetaQuerySourceCondition.newBuilder() + .setOp(operator.toPB()) + .setValue(value) + .build() + .toByteString(); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/DeleteTimeseriesMetaRequest.java b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/DeleteTimeseriesMetaRequest.java new file mode 100644 index 0000000..84406a6 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/DeleteTimeseriesMetaRequest.java @@ -0,0 +1,34 @@ +package com.alicloud.openservices.tablestore.model.timeseries; + +import com.alicloud.openservices.tablestore.model.OperationNames; +import com.alicloud.openservices.tablestore.model.Request; + +import java.util.ArrayList; +import java.util.List; + +public class DeleteTimeseriesMetaRequest implements Request { + + private final String timeseriesTableName; + private List timeseriesKeys = new ArrayList(); + + public DeleteTimeseriesMetaRequest(String timeseriesTableName) { + this.timeseriesTableName = timeseriesTableName; + } + + @Override + public String getOperationName() { + return OperationNames.OP_DELETE_TIMESERIES_META; + } + + public String getTimeseriesTableName() { + return timeseriesTableName; + } + + public List getTimeseriesKeys() { + return timeseriesKeys; + } + + public void setTimeseriesKeys(List timeseriesKeys) { + this.timeseriesKeys = timeseriesKeys; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/DeleteTimeseriesMetaResponse.java b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/DeleteTimeseriesMetaResponse.java new file mode 100644 index 0000000..6c76dce --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/DeleteTimeseriesMetaResponse.java @@ -0,0 +1,49 @@ +package com.alicloud.openservices.tablestore.model.timeseries; + +import com.alicloud.openservices.tablestore.model.Error; +import com.alicloud.openservices.tablestore.model.Response; + +import java.util.ArrayList; +import java.util.List; + +public class DeleteTimeseriesMetaResponse extends Response { + + public static class FailedRowResult { + private int index; + private Error error; + + public FailedRowResult(int index, Error error) { + this.index = index; + this.error = error; + } + + public int getIndex() { + return index; + } + + public Error getError() { + return error; + } + } + + private List failedRows; + + public DeleteTimeseriesMetaResponse(Response meta) { + super(meta); + } + + public boolean isAllSuccess() { + return failedRows == null || failedRows.isEmpty(); + } + + public List getFailedRows() { + if (failedRows == null) { + return new ArrayList(); + } + return failedRows; + } + + public void setFailedRows(List failedRows) { + this.failedRows = failedRows; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/DeleteTimeseriesTableRequest.java b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/DeleteTimeseriesTableRequest.java new file mode 100644 index 0000000..0de8207 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/DeleteTimeseriesTableRequest.java @@ -0,0 +1,46 @@ +package com.alicloud.openservices.tablestore.model.timeseries; + +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.alicloud.openservices.tablestore.model.OperationNames; +import com.alicloud.openservices.tablestore.model.Request; + +public class DeleteTimeseriesTableRequest implements Request { + + /** + * 表名信息。 + */ + private String timeseriesTableName; + + /** + * 初始化DeleteTimeseriesTableRequest实例。 + * @param timeseriesTableName 表名。 + */ + public DeleteTimeseriesTableRequest(String timeseriesTableName) { + setTimeseriesTableName(timeseriesTableName); + } + + /** + * 获取表的名称。 + * @return 表的名称。 + */ + public String getTimeseriesTableName() { + return timeseriesTableName; + } + + /** + * 设置表的名称。 + * @param timeseriesTableName 表的名称。 + */ + public void setTimeseriesTableName(String timeseriesTableName) { + Preconditions.checkArgument( + timeseriesTableName != null && !timeseriesTableName.isEmpty(), + "The name of table should not be null or empty."); + + this.timeseriesTableName = timeseriesTableName; + } + + @Override + public String getOperationName() { + return OperationNames.OP_DELETE_TIMESERIES_TABLE; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/DeleteTimeseriesTableResponse.java b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/DeleteTimeseriesTableResponse.java new file mode 100644 index 0000000..95966b3 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/DeleteTimeseriesTableResponse.java @@ -0,0 +1,10 @@ +package com.alicloud.openservices.tablestore.model.timeseries; + +import com.alicloud.openservices.tablestore.model.Response; + +public class DeleteTimeseriesTableResponse extends Response { + + public DeleteTimeseriesTableResponse(Response meta) { + super(meta); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/DescribeTimeseriesTableRequest.java b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/DescribeTimeseriesTableRequest.java new file mode 100644 index 0000000..1a852c6 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/DescribeTimeseriesTableRequest.java @@ -0,0 +1,49 @@ +package com.alicloud.openservices.tablestore.model.timeseries; + +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.alicloud.openservices.tablestore.model.OperationNames; +import com.alicloud.openservices.tablestore.model.Request; + + +public class DescribeTimeseriesTableRequest implements Request { + + + /** + * 表名信息。 + */ + private String timeseriesTableName; + + /** + * 初始化DeleteTimeseriesTableRequest实例。 + * @param timeseriesTableName 表名。 + */ + public DescribeTimeseriesTableRequest(String timeseriesTableName) { + setTimeseriesTableName(timeseriesTableName); + } + + /** + * 获取表的名称。 + * @return 表的名称。 + */ + public String getTimeseriesTableName() { + return timeseriesTableName; + } + + /** + * 设置表的名称。 + * @param timeseriesTableName 表的名称。 + */ + public void setTimeseriesTableName(String timeseriesTableName) { + Preconditions.checkArgument( + timeseriesTableName != null && !timeseriesTableName.isEmpty(), + "The name of table should not be null or empty."); + + this.timeseriesTableName = timeseriesTableName; + } + + @Override + public String getOperationName() { + return OperationNames.OP_DESCRIBE_TIMESERIES_TABLE; + } + +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/DescribeTimeseriesTableResponse.java b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/DescribeTimeseriesTableResponse.java new file mode 100644 index 0000000..b0969ac --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/DescribeTimeseriesTableResponse.java @@ -0,0 +1,32 @@ +package com.alicloud.openservices.tablestore.model.timeseries; + +import com.alicloud.openservices.tablestore.model.Response; +import com.alicloud.openservices.tablestore.model.TimeseriesTableMeta; + +public class DescribeTimeseriesTableResponse extends Response { + + /** + * 表的结构信息。 + */ + private TimeseriesTableMeta timeseriesTableMeta; + + + public DescribeTimeseriesTableResponse(Response meta) { + super(meta); + } + + /** + * 获取表的tablemeta。 + * @return 表的tablemeta。 + */ + public TimeseriesTableMeta getTimeseriesTableMeta() { + return timeseriesTableMeta; + } + + /* + * 内部接口。请勿使用。 + */ + public void setTimeseriesTableMeta(TimeseriesTableMeta timeseriesTableMeta) { + this.timeseriesTableMeta = timeseriesTableMeta; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/GetTimeseriesDataRequest.java b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/GetTimeseriesDataRequest.java new file mode 100644 index 0000000..7bbd3d7 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/GetTimeseriesDataRequest.java @@ -0,0 +1,107 @@ +package com.alicloud.openservices.tablestore.model.timeseries; + +import com.alicloud.openservices.tablestore.core.utils.Pair; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.alicloud.openservices.tablestore.model.ColumnType; +import com.alicloud.openservices.tablestore.model.OperationNames; +import com.alicloud.openservices.tablestore.model.Request; + +import java.util.ArrayList; +import java.util.List; + +public class GetTimeseriesDataRequest implements Request { + + private final String timeseriesTableName; + private TimeseriesKey timeseriesKey; + private long beginTimeInUs; + private long endTimeInUs; + private int limit = -1; + private byte[] nextToken; + private boolean backward; + private List> fieldsToGet; + + public GetTimeseriesDataRequest(String timeseriesTableName) { + this.timeseriesTableName = timeseriesTableName; + } + + public String getTimeseriesTableName() { + return timeseriesTableName; + } + + public TimeseriesKey getTimeseriesKey() { + return timeseriesKey; + } + + public void setTimeseriesKey(TimeseriesKey timeseriesKey) { + this.timeseriesKey = timeseriesKey; + } + + public void setTimeRange(long beginTimeInUs, long endTimeInUs) { + Preconditions.checkArgument(beginTimeInUs >= 0, "begin time must be large than or equal to 0"); + Preconditions.checkArgument(endTimeInUs > 0, "end time must be large than 0"); + this.beginTimeInUs = beginTimeInUs; + this.endTimeInUs = endTimeInUs; + } + + public long getBeginTimeInUs() { + return beginTimeInUs; + } + + public long getEndTimeInUs() { + return endTimeInUs; + } + + public void setNextToken(byte[] nextToken) { + this.nextToken = nextToken; + } + + public byte[] getNextToken() { + return nextToken; + } + + @Override + public String getOperationName() { + return OperationNames.OP_GET_TIMESERIES_DATA; + } + + public int getLimit() { + return limit; + } + + public void setLimit(int limit) { + Preconditions.checkArgument(limit > 0, "limit must large than 0"); + this.limit = limit; + } + + public boolean isBackward() { + return backward; + } + + /** + * 是否按照时间逆序读,可用于获取最新的数据 + * @param backward + */ + public void setBackward(boolean backward) { + this.backward = backward; + } + + public List> getFieldsToGet() { + if (fieldsToGet == null) { + fieldsToGet = new ArrayList>(); + } + return fieldsToGet; + } + + public void setFieldsToGet(List> fieldsToGet) { + this.fieldsToGet = fieldsToGet; + } + + public void addFieldToGet(String fieldName, ColumnType fieldType) { + Preconditions.checkNotNull(fieldName); + Preconditions.checkNotNull(fieldType); + if (fieldsToGet == null) { + fieldsToGet = new ArrayList>(); + } + fieldsToGet.add(new Pair(fieldName, fieldType)); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/GetTimeseriesDataResponse.java b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/GetTimeseriesDataResponse.java new file mode 100644 index 0000000..bee5698 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/GetTimeseriesDataResponse.java @@ -0,0 +1,32 @@ +package com.alicloud.openservices.tablestore.model.timeseries; + +import com.alicloud.openservices.tablestore.model.Response; + +import java.util.ArrayList; +import java.util.List; + +public class GetTimeseriesDataResponse extends Response { + + private List rows = new ArrayList(); + private byte[] nextToken; + + public GetTimeseriesDataResponse(Response meta) { + super(meta); + } + + public List getRows() { + return rows; + } + + public void setRows(List rows) { + this.rows = rows; + } + + public byte[] getNextToken() { + return nextToken; + } + + public void setNextToken(byte[] nextToken) { + this.nextToken = nextToken; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/ListTimeseriesTableRequest.java b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/ListTimeseriesTableRequest.java new file mode 100644 index 0000000..e7d520b --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/ListTimeseriesTableRequest.java @@ -0,0 +1,19 @@ +package com.alicloud.openservices.tablestore.model.timeseries; + +import com.alicloud.openservices.tablestore.model.OperationNames; +import com.alicloud.openservices.tablestore.model.Request; + + + +public class ListTimeseriesTableRequest implements Request { + + + public ListTimeseriesTableRequest() { + } + + @Override + public String getOperationName() { + return OperationNames.OP_LIST_TIMESERIES_TABLE; + } + +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/ListTimeseriesTableResponse.java b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/ListTimeseriesTableResponse.java new file mode 100644 index 0000000..c94fa65 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/ListTimeseriesTableResponse.java @@ -0,0 +1,75 @@ +package com.alicloud.openservices.tablestore.model.timeseries; + +import com.alicloud.openservices.tablestore.core.utils.Jsonizable; +import com.alicloud.openservices.tablestore.model.OperationNames; +import com.alicloud.openservices.tablestore.model.Request; +import com.alicloud.openservices.tablestore.model.Response; +import com.alicloud.openservices.tablestore.model.TimeseriesTableMeta; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Iterator; +import java.util.List; + +public class ListTimeseriesTableResponse extends Response implements Jsonizable { + + /** + * 表列表。 + */ + private List timeseriesTableMetas = new ArrayList(); + + public ListTimeseriesTableResponse(Response meta) { + super(meta); + } + + /** + * 获取表的名称列表。 + * @return 表的名称列表。 + */ + public List getTimeseriesTableNames() { + List timeseriesTableNames = new ArrayList(); + for (TimeseriesTableMeta a: timeseriesTableMetas) { + timeseriesTableNames.add(a.getTimeseriesTableName()); + } + return timeseriesTableNames; + } + + public List getTimeseriesTableMetas() { + return this.timeseriesTableMetas; + } + + /* + * 内部接口。请勿使用。 + */ + public void setTimeseriesTableMetas(List timeseriesTableMetas) { + this.timeseriesTableMetas = timeseriesTableMetas; + } + + + @Override + public String jsonize() { + StringBuilder sb = new StringBuilder(); + jsonize(sb, "\n "); + return sb.toString(); + } + + @Override + public void jsonize(StringBuilder sb, String newline) { + List timeseriesTableNames = getTimeseriesTableNames(); + if (timeseriesTableNames == null) { + sb.append("null"); + } else { + sb.append("["); + Iterator iter = timeseriesTableNames.listIterator(); + if (iter.hasNext()) { + sb.append(iter.next()); + for (;iter.hasNext();) { + sb.append(", \""); + sb.append(iter.next()); + sb.append("\""); + } + } + sb.append("]"); + } + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/MeasurementMetaQueryCondition.java b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/MeasurementMetaQueryCondition.java new file mode 100644 index 0000000..fc01038 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/MeasurementMetaQueryCondition.java @@ -0,0 +1,32 @@ +package com.alicloud.openservices.tablestore.model.timeseries; + +import com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.google.protobuf.ByteString; + +public class MeasurementMetaQueryCondition implements MetaQueryCondition { + + private final MetaQuerySingleOperator operator; + private final String value; + + public MeasurementMetaQueryCondition(MetaQuerySingleOperator operator, String value) { + Preconditions.checkNotNull(operator); + Preconditions.checkNotNull(value); + this.operator = operator; + this.value = value; + } + + @Override + public Timeseries.MetaQueryConditionType getType() { + return Timeseries.MetaQueryConditionType.MEASUREMENT_CONDITION; + } + + @Override + public ByteString serialize() { + return Timeseries.MetaQueryMeasurementCondition.newBuilder() + .setOp(operator.toPB()) + .setValue(value) + .build() + .toByteString(); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/MetaQueryCompositeOperator.java b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/MetaQueryCompositeOperator.java new file mode 100644 index 0000000..51d2ed5 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/MetaQueryCompositeOperator.java @@ -0,0 +1,27 @@ +package com.alicloud.openservices.tablestore.model.timeseries; + +import com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries; + +public enum MetaQueryCompositeOperator { + OP_AND, + OP_OR, + OP_NOT; + + public Timeseries.MetaQueryCompositeOperator toPB() { + switch (this) { + case OP_AND: { + return Timeseries.MetaQueryCompositeOperator.OP_AND; + } + case OP_OR: { + return Timeseries.MetaQueryCompositeOperator.OP_OR; + } + case OP_NOT: { + return Timeseries.MetaQueryCompositeOperator.OP_NOT; + } + default: { + throw new IllegalArgumentException(); + } + } + } + +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/MetaQueryCondition.java b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/MetaQueryCondition.java new file mode 100644 index 0000000..2e3cd9f --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/MetaQueryCondition.java @@ -0,0 +1,11 @@ +package com.alicloud.openservices.tablestore.model.timeseries; + +import com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries; +import com.google.protobuf.ByteString; + +public interface MetaQueryCondition { + + Timeseries.MetaQueryConditionType getType(); + + ByteString serialize(); +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/MetaQuerySingleOperator.java b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/MetaQuerySingleOperator.java new file mode 100644 index 0000000..b13dd03 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/MetaQuerySingleOperator.java @@ -0,0 +1,40 @@ +package com.alicloud.openservices.tablestore.model.timeseries; + +import com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries; + +public enum MetaQuerySingleOperator { + + OP_EQUAL, + OP_NOT_EQUAL, + OP_GREATER_THAN, + OP_GREATER_EQUAL, + OP_LESS_THAN, + OP_LESS_EQUAL, + OP_PREFIX; + + public Timeseries.MetaQuerySingleOperator toPB() { + switch (this) { + case OP_EQUAL: { + return Timeseries.MetaQuerySingleOperator.OP_EQUAL; + } + case OP_GREATER_THAN: { + return Timeseries.MetaQuerySingleOperator.OP_GREATER_THAN; + } + case OP_GREATER_EQUAL: { + return Timeseries.MetaQuerySingleOperator.OP_GREATER_EQUAL; + } + case OP_LESS_THAN: { + return Timeseries.MetaQuerySingleOperator.OP_LESS_THAN; + } + case OP_LESS_EQUAL: { + return Timeseries.MetaQuerySingleOperator.OP_LESS_EQUAL; + } + case OP_PREFIX: { + return Timeseries.MetaQuerySingleOperator.OP_PREFIX; + } + default: { + throw new IllegalArgumentException(); + } + } + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/PutTimeseriesDataRequest.java b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/PutTimeseriesDataRequest.java new file mode 100644 index 0000000..bd41c38 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/PutTimeseriesDataRequest.java @@ -0,0 +1,49 @@ +package com.alicloud.openservices.tablestore.model.timeseries; + +import com.alicloud.openservices.tablestore.ClientException; +import com.alicloud.openservices.tablestore.model.OperationNames; +import com.alicloud.openservices.tablestore.model.Request; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +public class PutTimeseriesDataRequest implements Request { + + private final String timeseriesTableName; + private List rows = new ArrayList(); + + public PutTimeseriesDataRequest(String timeseriesTableName) { + this.timeseriesTableName = timeseriesTableName; + } + + @Override + public String getOperationName() { + return OperationNames.OP_PUT_TIMESERIES_DATA; + } + + public String getTimeseriesTableName() { + return timeseriesTableName; + } + + public List getRows() { + return rows; + } + + public void setRows(List rows) { + for (TimeseriesRow row : rows) { + if (row.getTimeInUs() < 0) { + throw new ClientException("time not set in timeseriesRow"); + } + } + this.rows = rows; + } + + public void addRows(Collection rows) { + this.rows.addAll(rows); + } + + public void addRow(TimeseriesRow row) { + this.rows.add(row); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/PutTimeseriesDataResponse.java b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/PutTimeseriesDataResponse.java new file mode 100644 index 0000000..05722b7 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/PutTimeseriesDataResponse.java @@ -0,0 +1,49 @@ +package com.alicloud.openservices.tablestore.model.timeseries; + +import com.alicloud.openservices.tablestore.model.Error; +import com.alicloud.openservices.tablestore.model.Response; + +import java.util.ArrayList; +import java.util.List; + +public class PutTimeseriesDataResponse extends Response { + + public static class FailedRowResult { + private int index; + private Error error; + + public FailedRowResult(int index, Error error) { + this.index = index; + this.error = error; + } + + public int getIndex() { + return index; + } + + public Error getError() { + return error; + } + } + + private List failedRows; + + public PutTimeseriesDataResponse(Response meta) { + super(meta); + } + + public boolean isAllSuccess() { + return failedRows == null || failedRows.isEmpty(); + } + + public List getFailedRows() { + if (failedRows == null) { + return new ArrayList(); + } + return failedRows; + } + + public void setFailedRows(List failedRows) { + this.failedRows = failedRows; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/QueryTimeseriesMetaRequest.java b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/QueryTimeseriesMetaRequest.java new file mode 100644 index 0000000..ce200fb --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/QueryTimeseriesMetaRequest.java @@ -0,0 +1,60 @@ +package com.alicloud.openservices.tablestore.model.timeseries; + +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.alicloud.openservices.tablestore.model.OperationNames; +import com.alicloud.openservices.tablestore.model.Request; + +public class QueryTimeseriesMetaRequest implements Request { + + private final String timeseriesTableName; + private MetaQueryCondition condition; + private boolean getTotalHits = false; + private int limit = -1; + private byte[] nextToken; + + public QueryTimeseriesMetaRequest(String timeseriesTableName) { + Preconditions.checkNotNull(timeseriesTableName); + this.timeseriesTableName = timeseriesTableName; + } + + @Override + public String getOperationName() { + return OperationNames.OP_QUERY_TIMESERIES_META; + } + + public MetaQueryCondition getCondition() { + return condition; + } + + public void setCondition(MetaQueryCondition condition) { + this.condition = condition; + } + + public String getTimeseriesTableName() { + return timeseriesTableName; + } + + public boolean isGetTotalHits() { + return getTotalHits; + } + + public void setGetTotalHits(boolean getTotalHits) { + this.getTotalHits = getTotalHits; + } + + public byte[] getNextToken() { + return nextToken; + } + + public void setNextToken(byte[] nextToken) { + this.nextToken = nextToken; + } + + public int getLimit() { + return limit; + } + + public void setLimit(int limit) { + this.limit = limit; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/QueryTimeseriesMetaResponse.java b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/QueryTimeseriesMetaResponse.java new file mode 100644 index 0000000..70cafea --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/QueryTimeseriesMetaResponse.java @@ -0,0 +1,41 @@ +package com.alicloud.openservices.tablestore.model.timeseries; + +import com.alicloud.openservices.tablestore.model.Response; + +import java.util.ArrayList; +import java.util.List; + +public class QueryTimeseriesMetaResponse extends Response { + + private List timeseriesMetas = new ArrayList(); + private long totalHits = -1; + private byte[] nextToken; + + public QueryTimeseriesMetaResponse(Response meta) { + super(meta); + } + + public List getTimeseriesMetas() { + return timeseriesMetas; + } + + public void setTimeseriesMetas(List timeseriesMetas) { + this.timeseriesMetas = timeseriesMetas; + } + + public byte[] getNextToken() { + return nextToken; + } + + public void setNextToken(byte[] nextToken) { + this.nextToken = nextToken; + } + + public long getTotalHits() { + return totalHits; + } + + public void setTotalHits(long totalHits) { + this.totalHits = totalHits; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/TagMetaQueryCondition.java b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/TagMetaQueryCondition.java new file mode 100644 index 0000000..e9d7dde --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/TagMetaQueryCondition.java @@ -0,0 +1,36 @@ +package com.alicloud.openservices.tablestore.model.timeseries; + +import com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.google.protobuf.ByteString; + +public class TagMetaQueryCondition implements MetaQueryCondition { + + private final MetaQuerySingleOperator operator; + private final String tagName; + private final String value; + + public TagMetaQueryCondition(MetaQuerySingleOperator operator, String tagName, String value) { + Preconditions.checkNotNull(operator); + Preconditions.checkStringNotNullAndEmpty(tagName, "tag name should not be null or empty"); + Preconditions.checkNotNull(value); + this.operator = operator; + this.tagName = tagName; + this.value = value; + } + + @Override + public Timeseries.MetaQueryConditionType getType() { + return Timeseries.MetaQueryConditionType.TAG_CONDITION; + } + + @Override + public ByteString serialize() { + return Timeseries.MetaQueryTagCondition.newBuilder() + .setOp(operator.toPB()) + .setTagName(tagName) + .setValue(value) + .build() + .toByteString(); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/TimeseriesKey.java b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/TimeseriesKey.java new file mode 100644 index 0000000..80aac4e --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/TimeseriesKey.java @@ -0,0 +1,87 @@ +package com.alicloud.openservices.tablestore.model.timeseries; + +import com.alicloud.openservices.tablestore.core.protocol.timeseries.TimeseriesProtocolBuilder; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.google.common.base.Objects; +import com.google.gson.Gson; + +import java.util.Collections; +import java.util.Map; +import java.util.SortedMap; +import java.util.TreeMap; + +public class TimeseriesKey { + + private final String measurementName; + private final String dataSource; + private final SortedMap tags = new TreeMap(); + private String tagsString; + + public TimeseriesKey(String measurementName, String dataSource) { + this(measurementName, dataSource, null); + } + + public TimeseriesKey(String measurementName, String dataSource, Map tags) { + Preconditions.checkStringNotNullAndEmpty(measurementName, "measurement should not be null or empty"); + this.measurementName = measurementName; + if (dataSource != null) { + this.dataSource = dataSource; + } else { + this.dataSource = ""; + } + if (tags != null) { + this.tags.putAll(tags); + } + } + + public String getMeasurementName() { + return measurementName; + } + + public String getDataSource() { + return dataSource; + } + + public SortedMap getTags() { + return Collections.unmodifiableSortedMap(tags); + } + + public String buildTagsString() { + if (tagsString == null) { + tagsString = TimeseriesProtocolBuilder.buildTagsString(this.tags); + return tagsString; + } + return tagsString; + } + + public String buildMetaCacheKey(String tableName) { + StringBuilder sb = new StringBuilder(tableName.length() + measurementName.length() + + dataSource.length() + buildTagsString().length() + 3); + sb.append(tableName); + sb.append('\t'); + sb.append(measurementName); + sb.append('\t'); + sb.append(dataSource); + sb.append('\t'); + sb.append(buildTagsString()); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TimeseriesKey that = (TimeseriesKey) o; + return Objects.equal(measurementName, that.measurementName) && Objects.equal(dataSource, that.dataSource) && Objects.equal(tags, that.tags); + } + + @Override + public int hashCode() { + return Objects.hashCode(measurementName, dataSource, tags); + } + + @Override + public String toString() { + return new Gson().toJson(this); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/TimeseriesMeta.java b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/TimeseriesMeta.java new file mode 100644 index 0000000..2062d2c --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/TimeseriesMeta.java @@ -0,0 +1,49 @@ +package com.alicloud.openservices.tablestore.model.timeseries; + +import com.google.gson.Gson; + +import java.util.Collections; +import java.util.Map; +import java.util.SortedMap; +import java.util.TreeMap; + +public class TimeseriesMeta { + + private TimeseriesKey timeseriesKey; + private SortedMap attributes = new TreeMap(); + private long updateTimeInUs = -1; + + public TimeseriesMeta(TimeseriesKey timeseriesKey) { + this.timeseriesKey = timeseriesKey; + } + + public TimeseriesKey getTimeseriesKey() { + return timeseriesKey; + } + + public void setTimeseriesKey(TimeseriesKey timeseriesKey) { + this.timeseriesKey = timeseriesKey; + } + + public SortedMap getAttributes() { + return Collections.unmodifiableSortedMap(attributes); + } + + public void setAttributes(Map attributes) { + this.attributes.clear(); + this.attributes.putAll(attributes); + } + + public long getUpdateTimeInUs() { + return updateTimeInUs; + } + + public void setUpdateTimeInUs(long updateTimeInUs) { + this.updateTimeInUs = updateTimeInUs; + } + + @Override + public String toString() { + return new Gson().toJson(this); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/TimeseriesRow.java b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/TimeseriesRow.java new file mode 100644 index 0000000..16d30f3 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/TimeseriesRow.java @@ -0,0 +1,74 @@ +package com.alicloud.openservices.tablestore.model.timeseries; + +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.alicloud.openservices.tablestore.model.ColumnValue; +import com.google.common.base.Objects; +import com.google.gson.Gson; + +import java.util.Map; +import java.util.SortedMap; +import java.util.TreeMap; + +public class TimeseriesRow { + + private TimeseriesKey timeseriesKey; + private long timeInUs = -1; + private final SortedMap fields = new TreeMap(); + + public TimeseriesRow(TimeseriesKey timeseriesKey) { + this.timeseriesKey = timeseriesKey; + } + + public TimeseriesRow(TimeseriesKey timeseriesKey, long timeInUs) { + this.timeseriesKey = timeseriesKey; + this.timeInUs = timeInUs; + } + + public TimeseriesKey getTimeseriesKey() { + return timeseriesKey; + } + + public void setTimeseriesKey(TimeseriesKey timeseriesKey) { + this.timeseriesKey = timeseriesKey; + } + + public long getTimeInUs() { + return timeInUs; + } + + public void setTimeInUs(long timeInUs) { + Preconditions.checkArgument(timeInUs >= 0, "time can not be negative"); + this.timeInUs = timeInUs; + } + + public SortedMap getFields() { + return fields; + } + + public void setFields(Map fields) { + this.fields.clear(); + this.fields.putAll(fields); + } + + public void addField(String key, ColumnValue value) { + this.fields.put(key, value); + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TimeseriesRow that = (TimeseriesRow) o; + return Objects.equal(timeseriesKey, that.timeseriesKey) && Objects.equal(timeInUs, that.timeInUs) && Objects.equal(fields, that.fields); + } + + @Override + public int hashCode() { + return Objects.hashCode(timeseriesKey, timeInUs, fields); + } + + @Override + public String toString() { + return new Gson().toJson(this); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/UpdateTimeMetaQueryCondition.java b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/UpdateTimeMetaQueryCondition.java new file mode 100644 index 0000000..9012d61 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/UpdateTimeMetaQueryCondition.java @@ -0,0 +1,31 @@ +package com.alicloud.openservices.tablestore.model.timeseries; + +import com.alicloud.openservices.tablestore.core.protocol.timeseries.Timeseries; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.google.protobuf.ByteString; + +public class UpdateTimeMetaQueryCondition implements MetaQueryCondition { + + private final MetaQuerySingleOperator operator; + private final long timeInUs; + + public UpdateTimeMetaQueryCondition(MetaQuerySingleOperator operator, long timeInUs) { + Preconditions.checkNotNull(operator); + this.operator = operator; + this.timeInUs = timeInUs; + } + + @Override + public Timeseries.MetaQueryConditionType getType() { + return Timeseries.MetaQueryConditionType.UPDATE_TIME_CONDITION; + } + + @Override + public ByteString serialize() { + return Timeseries.MetaQueryUpdateTimeCondition.newBuilder() + .setOp(operator.toPB()) + .setValue(timeInUs) + .build() + .toByteString(); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/UpdateTimeseriesMetaRequest.java b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/UpdateTimeseriesMetaRequest.java new file mode 100644 index 0000000..833a905 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/UpdateTimeseriesMetaRequest.java @@ -0,0 +1,34 @@ +package com.alicloud.openservices.tablestore.model.timeseries; + +import com.alicloud.openservices.tablestore.model.OperationNames; +import com.alicloud.openservices.tablestore.model.Request; + +import java.util.ArrayList; +import java.util.List; + +public class UpdateTimeseriesMetaRequest implements Request { + + private final String timeseriesTableName; + private List metas = new ArrayList(); + + public UpdateTimeseriesMetaRequest(String timeseriesTableName) { + this.timeseriesTableName = timeseriesTableName; + } + + @Override + public String getOperationName() { + return OperationNames.OP_UPDATE_TIMESERIES_META; + } + + public String getTimeseriesTableName() { + return timeseriesTableName; + } + + public List getMetas() { + return metas; + } + + public void setMetas(List metas) { + this.metas = metas; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/UpdateTimeseriesMetaResponse.java b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/UpdateTimeseriesMetaResponse.java new file mode 100644 index 0000000..82eefe7 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/UpdateTimeseriesMetaResponse.java @@ -0,0 +1,49 @@ +package com.alicloud.openservices.tablestore.model.timeseries; + +import com.alicloud.openservices.tablestore.model.Error; +import com.alicloud.openservices.tablestore.model.Response; + +import java.util.ArrayList; +import java.util.List; + +public class UpdateTimeseriesMetaResponse extends Response { + + public static class FailedRowResult { + private int index; + private Error error; + + public FailedRowResult(int index, Error error) { + this.index = index; + this.error = error; + } + + public int getIndex() { + return index; + } + + public Error getError() { + return error; + } + } + + private List failedRows; + + public UpdateTimeseriesMetaResponse(Response meta) { + super(meta); + } + + public boolean isAllSuccess() { + return failedRows == null || failedRows.isEmpty(); + } + + public List getFailedRows() { + if (failedRows == null) { + return new ArrayList(); + } + return failedRows; + } + + public void setFailedRows(List failedRows) { + this.failedRows = failedRows; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/UpdateTimeseriesTableRequest.java b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/UpdateTimeseriesTableRequest.java new file mode 100644 index 0000000..230d18a --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/UpdateTimeseriesTableRequest.java @@ -0,0 +1,72 @@ +package com.alicloud.openservices.tablestore.model.timeseries; + +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.alicloud.openservices.tablestore.model.OperationNames; +import com.alicloud.openservices.tablestore.model.Request; +import com.alicloud.openservices.tablestore.model.TimeseriesTableOptions; + + +public class UpdateTimeseriesTableRequest implements Request { + + /** + * 表名信息和表的option信息 + */ + private String timeseriesTableName; + private TimeseriesTableOptions timeseriesTableOptions; + + /** + * 初始化UpdateTimeseriesTableRequest实例。 + * @param timeseriesTableName 表名。 + * @param timeseriesTableOptions 表的options。 + */ + public UpdateTimeseriesTableRequest(String timeseriesTableName, TimeseriesTableOptions timeseriesTableOptions) { + setTimeseriesTableName(timeseriesTableName); + setTimeseriesTableOptions(timeseriesTableOptions); + } + + public UpdateTimeseriesTableRequest(String timeseriesTableName) { + setTimeseriesTableName(timeseriesTableName); + } + + /** + * 获取表的名称。 + * @return 表的名称。 + */ + public String getTimeseriesTableName() { + return timeseriesTableName; + } + + /** + * 获取表的options。 + * @return 表的options。 + */ + public TimeseriesTableOptions getTimeseriesTableOptions() { + return timeseriesTableOptions; + } + + /** + * 设置表的名称。 + * @param timeseriesTableName 表的名称。 + */ + public void setTimeseriesTableName(String timeseriesTableName) { + Preconditions.checkArgument( + timeseriesTableName != null && !timeseriesTableName.isEmpty(), + "The name of table should not be null or empty."); + this.timeseriesTableName = timeseriesTableName; + } + + /** + * 设置表的options。 + * @param timeseriesTableOptions 表的options。 + */ + public void setTimeseriesTableOptions(TimeseriesTableOptions timeseriesTableOptions) { + Preconditions.checkNotNull(timeseriesTableOptions, "TimeseriesTableOptions should not be null."); + this.timeseriesTableOptions = timeseriesTableOptions; + } + + @Override + public String getOperationName() { + return OperationNames.OP_UPDATE_TIMESERIES_TABLE; + } + +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/UpdateTimeseriesTableResponse.java b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/UpdateTimeseriesTableResponse.java new file mode 100644 index 0000000..d34a79d --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/timeseries/UpdateTimeseriesTableResponse.java @@ -0,0 +1,10 @@ +package com.alicloud.openservices.tablestore.model.timeseries; + +import com.alicloud.openservices.tablestore.model.Response; + +public class UpdateTimeseriesTableResponse extends Response { + + public UpdateTimeseriesTableResponse(Response meta) { + super(meta); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/tunnel/BulkExportQueryCriteria.java b/src/main/java/com/alicloud/openservices/tablestore/model/tunnel/BulkExportQueryCriteria.java new file mode 100644 index 0000000..8606bb3 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/tunnel/BulkExportQueryCriteria.java @@ -0,0 +1,226 @@ +package com.alicloud.openservices.tablestore.model.tunnel; + +import com.alicloud.openservices.tablestore.core.protocol.OtsInternalApi; +import com.alicloud.openservices.tablestore.core.utils.OptionalValue; +import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.alicloud.openservices.tablestore.model.*; +import com.alicloud.openservices.tablestore.model.filter.Filter; + +import java.util.Collection; +import java.util.Collections; +import java.util.HashSet; +import java.util.Set; + +public class BulkExportQueryCriteria { + + /** + * 查询的表的名称。 + */ + private String tableName; + + /** + * 左边界的主键值 和 右边界的主键值。 + */ + + private PrimaryKey inclusiveStartPrimaryKey; + + private PrimaryKey exclusiveEndPrimaryKey; + + /** + * 要读取的属性列名列表,若为空,则代表读取该行所有的列。 + */ + private Set columnsToGet = new HashSet(); + + /** + * 本次查询使用的Filter。 + */ + private OptionalValue filter = new OptionalValue("Filter"); + + /** + * 行信息的数据类型 + */ + private DataBlockType dataBlockType = DataBlockType.DBT_SIMPLE_ROW_MATRIX; + + /** + * 构造一个在给定名称的表中查询的条件。 + * @param tableName + * 查询的表名。 + */ + public BulkExportQueryCriteria(String tableName){ + Preconditions.checkArgument(tableName != null && !tableName.isEmpty(), "The name of table should not be null or empty."); + this.tableName = tableName; + } + + public void setDataBlockType(DataBlockType dataBlockType){ + Preconditions.checkArgument(dataBlockType == DataBlockType.DBT_PLAIN_BUFFER || dataBlockType == DataBlockType.DBT_SIMPLE_ROW_MATRIX, + "Unknown DataBlockType."); + this.dataBlockType = dataBlockType; + } + + /** + * 行信息的数据类型 + */ + public DataBlockType getDataBlockType(){ + return dataBlockType; + } + + /** + * 获取范围查询的左边界的主键值。 + * @return 范围查询的左边界的主键值。 + */ + public PrimaryKey getInclusiveStartPrimaryKey() { + return inclusiveStartPrimaryKey; + } + + /** + * 范围查询需要用户指定一个主键的范围,该范围是一个左闭右开的区间,inclusiveStartPrimaryKey为该区间的左边界。 + * 若direction为FORWARD,则inclusiveStartPrimaryKey必须小于exclusiveEndPrimaryKey。 + * 若direction为BACKWARD,则inclusiveStartPrimaryKey必须大于exclusiveEndPrimaryKey。 + * inclusiveStartPrimaryKey必须包含表中定义的所有主键列,列的值可以定义{@link PrimaryKeyValue#INF_MIN}或者{@link PrimaryKeyValue#INF_MAX}用于表示该列的所有取值范围。 + * @param inclusiveStartPrimaryKey 范围查询的左边界的主键值。 + */ + public void setInclusiveStartPrimaryKey(PrimaryKey inclusiveStartPrimaryKey) { + Preconditions.checkArgument(inclusiveStartPrimaryKey != null && !inclusiveStartPrimaryKey.isEmpty(), "The inclusive start primary key should not be null."); + this.inclusiveStartPrimaryKey = inclusiveStartPrimaryKey; + } + + /** + * 获取范围查询的右边界的主键值。 + * @return 范围查询的右边界的主键值。 + */ + public PrimaryKey getExclusiveEndPrimaryKey() { + return exclusiveEndPrimaryKey; + } + + /** + * 范围查询需要用户指定一个主键的范围,该范围是一个左闭右开的区间,exclusiveEndPrimaryKey为该区间的右边界。 + * 若direction为FORWARD,则exclusiveEndPrimaryKey必须大于inclusiveStartPrimaryKey。 + * 若direction为BACKWARD,则exclusiveEndPrimaryKey必须小于inclusiveStartPrimaryKey。 + * exclusiveEndPrimaryKey必须包含表中定义的所有主键列,列的值可以定义{@link PrimaryKeyValue#INF_MIN}或者{@link PrimaryKeyValue#INF_MAX}用于表示该列的所有取值范围。 + * @param exclusiveEndPrimaryKey 范围查询的右边界的主键值。 + */ + public void setExclusiveEndPrimaryKey(PrimaryKey exclusiveEndPrimaryKey) { + Preconditions.checkArgument(exclusiveEndPrimaryKey != null && !exclusiveEndPrimaryKey.isEmpty(), "The exclusive end primary key should not be null."); + this.exclusiveEndPrimaryKey = exclusiveEndPrimaryKey; + } + + /** + * 设置查询的表名。 + * + * @param tableName 表的名称。 + */ + public void setTableName(String tableName) { + Preconditions.checkArgument( + tableName != null && !tableName.isEmpty(), + "The name of table should not be null or empty."); + this.tableName = tableName; + } + + /** + * 返回查询的表名。 + * + * @return 表的名称 + */ + public String getTableName() { + return tableName; + } + + /** + * 返回要读取的列的名称列表(只读)。 + * + * @return 列的名称的列表(只读)。 + */ + public Set getColumnsToGet() { + return Collections.unmodifiableSet(columnsToGet); + } + + /** + * 添加要读取的列。 + * + * @param columnName 要返回列的名称。 + */ + public void addColumnsToGet(String columnName) { + Preconditions.checkArgument(columnName != null && !columnName.isEmpty(), "Column's name should not be null or empty."); + this.columnsToGet.add(columnName); + } + + /** + * 添加要读取的列。 + * + * @param columnNames 要返回列的名称。 + */ + public void addColumnsToGet(String[] columnNames) { + Preconditions.checkNotNull(columnNames, "columnNames should not be null."); + for (int i = 0; i < columnNames.length; ++i) { + addColumnsToGet(columnNames[i]); + } + } + + /** + * 添加要读取的列。 + * + * @param columnsToGet + */ + public void addColumnsToGet(Collection columnsToGet) { + this.columnsToGet.addAll(columnsToGet); + } + + /** + * 将设置过的要读取的列的名称列表清空。 + */ + public void clearColumnsToGet() { + this.columnsToGet.clear(); + } + + /** + * 返回要读取的列的个数。 + * + * @return 要读取的列的个数。 + */ + public int numColumnsToGet() { + return this.columnsToGet.size(); + } + + /** + * 设置本次查询使用的Filter。 + * + * @param filter + */ + public void setFilter(Filter filter) { + Preconditions.checkNotNull(filter, "The filter should not be null"); + this.filter.setValue(filter); + } + + /** + * 获取本次查询使用的Filter。 + * + * @return Filter + * @throws java.lang.IllegalStateException 若没有设置Filter + */ + public Filter getFilter() { + if (!this.filter.isValueSet()) { + throw new IllegalStateException("The value of filter is not set."); + } + return this.filter.getValue(); + } + + /** + * 查询是否设置了Filter。 + * + * @return 若设置了Filter,则返回true,否则返回false。 + */ + public boolean hasSetFilter() { + return this.filter.isValueSet(); + } + + public void copyTo(BulkExportQueryCriteria target) { + target.setTableName(tableName); + target.columnsToGet.addAll(columnsToGet); + target.setDataBlockType(dataBlockType); + target.setInclusiveStartPrimaryKey(inclusiveStartPrimaryKey); + target.setExclusiveEndPrimaryKey(exclusiveEndPrimaryKey); + if (filter.isValueSet()) { + target.filter.setValue(filter.getValue()); + } + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/tunnel/CreateTunnelRequest.java b/src/main/java/com/alicloud/openservices/tablestore/model/tunnel/CreateTunnelRequest.java index 3b48004..3f2e240 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/model/tunnel/CreateTunnelRequest.java +++ b/src/main/java/com/alicloud/openservices/tablestore/model/tunnel/CreateTunnelRequest.java @@ -23,6 +23,11 @@ public class CreateTunnelRequest implements Request { */ private TunnelType tunnelType; + /** + * Tunnel时间范围配置。 + */ + private StreamTunnelConfig streamTunnelConfig; + /** * 初始化CreateTunnelRequest实例。 * @@ -101,4 +106,12 @@ public void setTunnelType(TunnelType tunnelType) { public String getOperationName() { return OperationNames.OP_CREATE_TUNNEL; } + + public StreamTunnelConfig getStreamTunnelConfig() { + return streamTunnelConfig; + } + + public void setStreamTunnelConfig(StreamTunnelConfig streamTunnelConfig) { + this.streamTunnelConfig = streamTunnelConfig; + } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/tunnel/StartOffsetFlag.java b/src/main/java/com/alicloud/openservices/tablestore/model/tunnel/StartOffsetFlag.java new file mode 100644 index 0000000..f254600 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/tunnel/StartOffsetFlag.java @@ -0,0 +1,12 @@ +package com.alicloud.openservices.tablestore.model.tunnel; + +public enum StartOffsetFlag { + /** + * Default, the create time of the tunnel. + */ + LATEST, + /** + * The earliest stream log time. + */ + EARLIEST +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/tunnel/StreamTunnelConfig.java b/src/main/java/com/alicloud/openservices/tablestore/model/tunnel/StreamTunnelConfig.java new file mode 100644 index 0000000..eee421c --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/model/tunnel/StreamTunnelConfig.java @@ -0,0 +1,67 @@ +package com.alicloud.openservices.tablestore.model.tunnel; + +public class StreamTunnelConfig { + /** + * StartOffsetFlag(EARLIEST or LATEST) + */ + private StartOffsetFlag flag; + /** + * StartOffset(in MillSecond), valid range: [CurrentSystemTime - StreamExpiration + 5 minute, CurrentSystemTime) + */ + private long startOffset; + /** + * EndOffset(in MillSecond) + */ + private long endOffset; + + public StreamTunnelConfig() { + this(StartOffsetFlag.LATEST); + } + + public StreamTunnelConfig(StartOffsetFlag flag) { + this.flag = flag; + } + + public StreamTunnelConfig(long startOffset, long endOffset) { + this(StartOffsetFlag.LATEST, startOffset, endOffset); + } + + public StreamTunnelConfig(StartOffsetFlag flag, long startOffset, long endOffset) { + this.flag = flag; + this.startOffset = startOffset; + this.endOffset = endOffset; + } + + public StartOffsetFlag getFlag() { + return flag; + } + + public void setFlag(StartOffsetFlag flag) { + this.flag = flag; + } + + public long getStartOffset() { + return startOffset; + } + + public void setStartOffset(long startOffset) { + this.startOffset = startOffset; + } + + public long getEndOffset() { + return endOffset; + } + + public void setEndOffset(long endOffset) { + this.endOffset = endOffset; + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("StartOffsetFlag: " + flag.name() + ", "); + sb.append("StartOffset: " + startOffset + ", "); + sb.append("EndOffset: " + endOffset); + return sb.toString(); + } +} + diff --git a/src/main/java/com/alicloud/openservices/tablestore/model/tunnel/TunnelInfo.java b/src/main/java/com/alicloud/openservices/tablestore/model/tunnel/TunnelInfo.java index e184d37..dd737a9 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/model/tunnel/TunnelInfo.java +++ b/src/main/java/com/alicloud/openservices/tablestore/model/tunnel/TunnelInfo.java @@ -30,6 +30,16 @@ public class TunnelInfo { */ private boolean expired; + /** + * Tunnel对应的时间范围配置。 + */ + private StreamTunnelConfig streamTunnelConfig; + + /** + * Tunnel创建时间。 + */ + private long createTime; + /** * 获取Tunnel名称。 * @return Tunnel名称。 @@ -142,13 +152,30 @@ public void setExpired(boolean expired) { this.expired = expired; } + public StreamTunnelConfig getStreamTunnelConfig() { + return streamTunnelConfig; + } + + public void setStreamTunnelConfig(StreamTunnelConfig streamTunnelConfig) { + this.streamTunnelConfig = streamTunnelConfig; + } + + public long getCreateTime() { + return createTime; + } + + public void setCreateTime(long createTime) { + this.createTime = createTime; + } + @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{").append("TunnelName: ").append(tunnelName).append(", TunnelId: ") .append(tunnelId).append(", TunnelType: ").append(tunnelType).append(", TableName: ").append(tableName) .append(", InstanceName: ").append(instanceName).append(", Stage: ").append(stage.name()) - .append(", Expired: ").append(expired).append("}"); + .append(", Expired: ").append(expired).append(", StreamTunnelConfig: ").append(streamTunnelConfig) + .append(", CreateTime: ").append(createTime).append("}"); return sb.toString(); } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/timeline/TimelineQueue.java b/src/main/java/com/alicloud/openservices/tablestore/timeline/TimelineQueue.java index 6fb4aad..316db0b 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/timeline/TimelineQueue.java +++ b/src/main/java/com/alicloud/openservices/tablestore/timeline/TimelineQueue.java @@ -1,9 +1,12 @@ package com.alicloud.openservices.tablestore.timeline; +import com.alicloud.openservices.tablestore.model.search.SearchQuery; import com.alicloud.openservices.tablestore.timeline.model.TimelineEntry; import com.alicloud.openservices.tablestore.timeline.model.TimelineIdentifier; import com.alicloud.openservices.tablestore.timeline.model.TimelineMessage; import com.alicloud.openservices.tablestore.timeline.query.ScanParameter; +import com.alicloud.openservices.tablestore.timeline.query.SearchParameter; +import com.alicloud.openservices.tablestore.timeline.query.SearchResult; import java.util.Iterator; import java.util.concurrent.Future; @@ -162,6 +165,26 @@ public interface TimelineQueue { */ TimelineEntry getLatestTimelineEntry(); + /** + * Search timeline entries by search parameter. + * Search will throw TimelineException when index info not set in TimelineSchema. + * + * @param searchParameter The parameter of search, which will convert to SearchQuery. + * + * @return SearchResult + */ + SearchResult search(SearchParameter searchParameter); + + /** + * Search TimelineEntry by search parameter. + * Search will throw TimelineException when index info not set in TimelineSchema. + * + * @param searchQuery The SearchQuery of search, which is self-defined query condition. + * + * @return SearchResult + */ + SearchResult search(SearchQuery searchQuery); + /** * Flush all the messages in buffer, wait until finish writing. */ diff --git a/src/main/java/com/alicloud/openservices/tablestore/timeline/core/TimelineEntryIterator.java b/src/main/java/com/alicloud/openservices/tablestore/timeline/core/TimelineEntryIterator.java index f06430b..8e3283e 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/timeline/core/TimelineEntryIterator.java +++ b/src/main/java/com/alicloud/openservices/tablestore/timeline/core/TimelineEntryIterator.java @@ -3,7 +3,8 @@ import com.alicloud.openservices.tablestore.SyncClientInterface; import com.alicloud.openservices.tablestore.model.RangeIteratorParameter; import com.alicloud.openservices.tablestore.model.Row; -import com.alicloud.openservices.tablestore.model.RowIterator; +import com.alicloud.openservices.tablestore.model.iterator.GetRangeRowIterator; +import com.alicloud.openservices.tablestore.model.iterator.RowIterator; import com.alicloud.openservices.tablestore.timeline.model.TimelineEntry; import com.alicloud.openservices.tablestore.timeline.model.TimelineSchema; import com.alicloud.openservices.tablestore.timeline.utils.Utils; @@ -15,7 +16,7 @@ public class TimelineEntryIterator implements Iterator { private TimelineSchema schema; TimelineEntryIterator(SyncClientInterface client, RangeIteratorParameter iteratorParameter, TimelineSchema schema) { - rowIterator = new RowIterator(client, iteratorParameter); + rowIterator = new GetRangeRowIterator(client, iteratorParameter); this.schema = schema; } diff --git a/src/main/java/com/alicloud/openservices/tablestore/timeline/core/TimelineQueueImpl.java b/src/main/java/com/alicloud/openservices/tablestore/timeline/core/TimelineQueueImpl.java index 095ee97..0259eaf 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/timeline/core/TimelineQueueImpl.java +++ b/src/main/java/com/alicloud/openservices/tablestore/timeline/core/TimelineQueueImpl.java @@ -2,16 +2,29 @@ import com.alicloud.openservices.tablestore.*; import com.alicloud.openservices.tablestore.model.*; +import com.alicloud.openservices.tablestore.model.search.SearchQuery; +import com.alicloud.openservices.tablestore.model.search.SearchRequest; +import com.alicloud.openservices.tablestore.model.search.SearchResponse; +import com.alicloud.openservices.tablestore.model.search.query.BoolQuery; +import com.alicloud.openservices.tablestore.model.search.query.Query; +import com.alicloud.openservices.tablestore.model.search.query.TermQuery; +import com.alicloud.openservices.tablestore.model.search.query.TermsQuery; import com.alicloud.openservices.tablestore.timeline.TimelineQueue; import com.alicloud.openservices.tablestore.timeline.TimelineCallback; import com.alicloud.openservices.tablestore.timeline.TimelineException; import com.alicloud.openservices.tablestore.timeline.model.*; import com.alicloud.openservices.tablestore.timeline.model.RowPutChangeWithCallback; import com.alicloud.openservices.tablestore.timeline.query.ScanParameter; +import com.alicloud.openservices.tablestore.timeline.query.SearchParameter; +import com.alicloud.openservices.tablestore.timeline.query.SearchResult; import com.alicloud.openservices.tablestore.timeline.utils.Preconditions; import com.alicloud.openservices.tablestore.timeline.utils.Utils; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; import java.util.Iterator; +import java.util.List; import java.util.concurrent.*; public class TimelineQueueImpl implements TimelineQueue { @@ -96,6 +109,7 @@ public Future storeAsync(TimelineMessage message, TimelineCallbac Preconditions.checkArgument(schema.isAutoGenerateSeqId(), "The sequence id of this timeline is not auto generated."); + PrimaryKey primaryKey = Utils.identifierToPrimaryKeyWithSequenceId(identifier, this.schema.getSequenceIdColumnName(), -1, schema.isAutoGenerateSeqId()); RowPutChange rowChange = new RowPutChange(schema.getTableName(), primaryKey); @@ -447,6 +461,59 @@ private Future doBatchWriteAsync(PrimaryKey primaryKey, TimelineM return rowChange.getFuture(); } + @Override + public SearchResult search(SearchParameter searchParameter) { + return search(Utils.toSearchQuery(searchParameter)); + } + + @Override + public SearchResult search(SearchQuery searchQuery) { + Preconditions.checkArgument(schema.hasDataIndex(), "The store not support search cause not has data index"); + + // add field value in identifier to searchquery + List queries = new ArrayList(); + queries.add(searchQuery.getQuery()); + for (PrimaryKeyColumn column : identifier.getFields()) { + try { + TermQuery q = new TermQuery(); + q.setFieldName(column.getName()); + q.setTerm(column.getValue().toColumnValue()); + queries.add(q); + } catch (Exception e) { + throw Utils.convertException(e); + } + } + BoolQuery query = new BoolQuery(); + query.setMustQueries(queries); + + SearchQuery searchQueryCopy = searchQuery.toCopy(); + searchQueryCopy.setQuery(query); + + SearchRequest request = new SearchRequest(schema.getTableName(), schema.getIndexName(), searchQueryCopy); + SearchRequest.ColumnsToGet columnsToGet = new SearchRequest.ColumnsToGet(); + columnsToGet.setReturnAll(true); + request.setColumnsToGet(columnsToGet); + + SearchResponse response; + try { + response = client.search(request); + } catch (Exception e) { + throw Utils.convertException(e); + } + + List> entries = new ArrayList>(response.getRows().size()); + for (Row row : response.getRows()) { + TimelineEntry entry = Utils.rowToTimelineEntry(schema, row); + TimelineIdentifier identifier = Utils.primaryKeyToIdentifier(schema.getIdentifierSchema(), row.getPrimaryKey()); + SearchResult.Entry se = new SearchResult.Entry(identifier, entry); + entries.add(se); + } + SearchResult result = new SearchResult( + entries, response.isAllSuccess(), + response.getTotalCount(), response.getNextToken()); + return result; + } + @Override public void flush() { if (writer != null) { diff --git a/src/main/java/com/alicloud/openservices/tablestore/timeline/core/TimelineStoreImpl.java b/src/main/java/com/alicloud/openservices/tablestore/timeline/core/TimelineStoreImpl.java index 8d4597f..29d232a 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/timeline/core/TimelineStoreImpl.java +++ b/src/main/java/com/alicloud/openservices/tablestore/timeline/core/TimelineStoreImpl.java @@ -136,6 +136,7 @@ public void prepareTables() { TableOptions tableOptions = new TableOptions(); tableOptions.setTimeToLive(schema.getTimeToLive()); tableOptions.setMaxVersions(1); + tableOptions.setMaxTimeDeviation(86400L * 365 * 100); CreateTableRequest request = new CreateTableRequest(tableMeta, tableOptions); try { diff --git a/src/main/java/com/alicloud/openservices/tablestore/timestream/model/query/DataGetter.java b/src/main/java/com/alicloud/openservices/tablestore/timestream/model/query/DataGetter.java index ba183bc..987de96 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/timestream/model/query/DataGetter.java +++ b/src/main/java/com/alicloud/openservices/tablestore/timestream/model/query/DataGetter.java @@ -21,7 +21,7 @@ public DataGetter(AsyncClient asyncClient, String tableName, TimestreamIdentifie this.identifier = identifier; } - /** + /** * 设置数据行的过滤条件,仅支持对数据行的fields进行过滤 * @param filter * @return @@ -62,7 +62,7 @@ public DataGetter timestamp(long timestamp, TimeUnit unit) { return this; } - /** + /** * 按照数据点的时间戳进行逆序排序,默认正序 * @return */ diff --git a/src/main/java/com/alicloud/openservices/tablestore/timestream/model/query/DataQuery.java b/src/main/java/com/alicloud/openservices/tablestore/timestream/model/query/DataQuery.java index d4e5777..962b28a 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/timestream/model/query/DataQuery.java +++ b/src/main/java/com/alicloud/openservices/tablestore/timestream/model/query/DataQuery.java @@ -135,14 +135,14 @@ public long getTimestamp() { return timestamp; } - /** + /** * 设置按照数据的时间戳进行逆序排序 */ protected void setOrderByTimestampDesc() { this.isDesc = true; } - /** + /** * * @return 查询是否按照数据的时间戳进行逆序排序 */ @@ -150,7 +150,7 @@ public boolean isDescTimestamp() { return this.isDesc; } - /** + /** * 数据查询的过滤条件 * @param filter 数据查询过滤条件 */ @@ -158,7 +158,7 @@ protected void setFilter(Filter filter) { this.filter = filter; } - /** + /** * 获取数据查询的过滤条件 * @return */ @@ -166,7 +166,7 @@ public Filter getFilter() { return this.filter; } - /** + /** * 设置查询时单次请求返回的行数 * @param limit */ @@ -177,7 +177,7 @@ protected void setLimit(int limit) { this.limit = limit; } - /** + /** * 获取查询时单次请求返回的行数 * @return */ diff --git a/src/main/java/com/alicloud/openservices/tablestore/timestream/model/query/MetaFilter.java b/src/main/java/com/alicloud/openservices/tablestore/timestream/model/query/MetaFilter.java index 3cc3692..6cc4e53 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/timestream/model/query/MetaFilter.java +++ b/src/main/java/com/alicloud/openservices/tablestore/timestream/model/query/MetaFilter.java @@ -58,7 +58,7 @@ public MetaFilter offset(int offset) { return this; } - /** + /** * 指定排序条件会返回结果进行排序 * @param sorter 排序规则 * @return diff --git a/src/main/java/com/alicloud/openservices/tablestore/tunnel/pipeline/ProcessDataBackoff.java b/src/main/java/com/alicloud/openservices/tablestore/tunnel/pipeline/ProcessDataBackoff.java index 19d5a2e..2a3d17b 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/tunnel/pipeline/ProcessDataBackoff.java +++ b/src/main/java/com/alicloud/openservices/tablestore/tunnel/pipeline/ProcessDataBackoff.java @@ -17,6 +17,11 @@ public ProcessDataBackoff() { reset(); } + public ProcessDataBackoff(int maxIntervalMillis) { + reset(); + this.maxIntervalMillis = maxIntervalMillis; + } + @Override public void reset() { currentIntervalMillis = initialIntervalMillis; @@ -44,9 +49,7 @@ private long getRandomValueFromInterval( double minInterval = currentIntervalMillis - delta; double maxInterval = currentIntervalMillis + delta; - long randomValue = (long) (minInterval + (random * (maxInterval - minInterval + 1))); + long randomValue = (long)(minInterval + (random * (maxInterval - minInterval + 1))); return randomValue; } - - } diff --git a/src/main/java/com/alicloud/openservices/tablestore/tunnel/pipeline/ProcessDataPipeline.java b/src/main/java/com/alicloud/openservices/tablestore/tunnel/pipeline/ProcessDataPipeline.java index 2bbbb9f..184280a 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/tunnel/pipeline/ProcessDataPipeline.java +++ b/src/main/java/com/alicloud/openservices/tablestore/tunnel/pipeline/ProcessDataPipeline.java @@ -1,12 +1,5 @@ package com.alicloud.openservices.tablestore.tunnel.pipeline; -import java.util.List; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.ThreadFactory; -import java.util.concurrent.ThreadPoolExecutor; -import java.util.concurrent.atomic.AtomicInteger; - import com.alicloud.openservices.tablestore.model.StreamRecord; import com.alicloud.openservices.tablestore.model.tunnel.internal.CheckpointResponse; import com.alicloud.openservices.tablestore.model.tunnel.internal.ReadRecordsRequest; @@ -18,6 +11,12 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.util.LinkedList; +import java.util.List; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Semaphore; +import java.util.concurrent.ThreadPoolExecutor; + import static com.alicloud.openservices.tablestore.core.protocol.ResponseFactory.FINISH_TAG; /** @@ -33,6 +32,10 @@ public class ProcessDataPipeline implements Runnable { private volatile boolean started = false; private final ThreadPoolExecutor readRecordsExecutor; private final ThreadPoolExecutor processRecordsExecutor; + private Semaphore semaphore; + private int readMaxTimesPerRound = 1; + private int readMaxBytesPerRound = 4 * 1024 * 1024; // 4M bytes + /** * pipelineHelperExecutor用于pipeline初始化,运行中的错误处理等。 */ @@ -52,22 +55,44 @@ public ProcessDataPipeline(ChannelConnect connect, ExecutorService helperExecuto this.processRecordsExecutor = processRecordsExecutor; } + public ProcessDataPipeline(ChannelConnect connect, ExecutorService helperExecutor, + ThreadPoolExecutor readRecordsExecutor, ThreadPoolExecutor processRecordsExecutor, + Semaphore semaphore) { + this.connect = connect; + this.pipelineHelperExecutor = helperExecutor; + this.readRecordsExecutor = readRecordsExecutor; + this.processRecordsExecutor = processRecordsExecutor; + this.semaphore = semaphore; + } + @Override public void run() { + // 若信号量存在,则先检查信号量再运行。 + if (semaphore != null) { + try { + semaphore.acquire(); + LOG.info("Tunnel {}, Channel {} acquire semaphore succeed, permits remaining: {}", + connect.getTunnelId(), connect.getChannelId(), semaphore.availablePermits()); + LOG.debug("Semaphore permits remaining {}, queued {}", semaphore.availablePermits(), semaphore.getQueueLength()); + } catch (InterruptedException e) { + LOG.warn("Acquire semaphore failed: {}, ChannelId: {}", e.toString(), connect.getChannelId()); + semaphore.release(); + } + } // 第一次运行Pipeline的时候,进行初始化操作,单个Pipeline实例的运行是串行的,不会存在竞态。 if (!started) { LOG.info("Initial process data pipeline."); this.pipeline = buildPipeline(); - pipeline.init(new ProcessDataPipelineContext(connect)); + pipeline.init(new ProcessDataPipelineContext(connect, semaphore)); started = true; } this.pipeline.process(new ReadRecordsRequest(connect.getTunnelId(), connect.getClientId(), - connect.getChannelId(), connect.getToken())); + connect.getChannelId(), connect.getToken())); } private Pipeline buildPipeline() { final Pipeline pipeline = - new Pipeline(pipelineHelperExecutor); + new Pipeline(pipelineHelperExecutor); // 依次插入任务的两个Stage Stage readRecordsStage = createReadRecordsStage(); @@ -88,21 +113,40 @@ public ProcessRecordsInput doProcess(ReadRecordsRequest readRecordsRequest) thro try { LOG.debug("Begin read records, connect: {}", connect); long beginTs = System.currentTimeMillis(); - ReadRecordsResponse resp = connect.getClient().readRecords(readRecordsRequest); - List records = resp.getRecords(); - LOG.info("GetRecords, Num: {}, Channel connect: {}, Latency: {} ms, Next Token: {}", - records.size(), connect, System.currentTimeMillis() - beginTs, resp.getNextToken()); - if (backoff != null) { - if (checkDataEnough(resp.getRecords().size(), resp.getMemoizedSerializedSize())) { - LOG.debug("Backoff is reset"); - backoff.reset(); - } else { - long sleepMills = backoff.nextBackOffMillis(); - LOG.debug("Data is not full, sleep {} msec.", sleepMills); - Thread.sleep(backoff.nextBackOffMillis()); + ReadRecordsResponse resp = null; + List totalRecords = new LinkedList(); + int totalBytes = 0, times = 0, totalRecordsCount = 0; + while (totalBytes < readMaxBytesPerRound && times < readMaxTimesPerRound) { + resp = connect.getClient().readRecords(readRecordsRequest); + totalRecords.addAll(resp.getRecords()); + totalRecordsCount += resp.getRecords().size(); + totalBytes += resp.getMemoizedSerializedSize(); + times++; + + if (resp.getNextToken() == null || FINISH_TAG.equals(resp.getNextToken())) { + LOG.info("Channel {} next token is null", connect.getChannelId()); + break; + } + if (backoff != null) { + if (checkDataEnough(resp.getRecords().size(), resp.getMemoizedSerializedSize())) { + LOG.debug("Backoff is reset"); + backoff.reset(); + } else { + long sleepMills = backoff.nextBackOffMillis(); + LOG.debug("Data is not full, sleep {} msec.", sleepMills); + Thread.sleep(backoff.nextBackOffMillis()); + break; + } } } - return new ProcessRecordsInput(resp.getRecords(), resp.getNextToken(), resp.getRequestId()); + if (resp == null) { + LOG.info("ReadRecordsResponse is null, channelId: {}", connect.getChannelId()); + return new ProcessRecordsInput(totalRecords, null, null); + } else { + LOG.info("GetRecords, Num: {}, LoopTimes: {}, TotalBytes: {}, Channel connect: {}, Latency: {} ms, Next Token: {}", + totalRecordsCount, times, totalBytes, connect, System.currentTimeMillis() - beginTs, resp.getNextToken()); + return new ProcessRecordsInput(totalRecords, resp.getNextToken(), resp.getRequestId()); + } } catch (Exception e) { throw new StageException(this, readRecordsRequest, e.getMessage(), e); } @@ -131,6 +175,11 @@ public Boolean doProcess(ProcessRecordsInput processRecordsInput) throws StageEx connect.setToken(processRecordsInput.getNextToken()); LOG.info("Continue run pipeline, connect: {}", connect); connect.getChannelExecutorService().submit(connect.getProcessPipeline()); + if (semaphore != null) { + semaphore.release(); + LOG.info("Channel {} release semaphore succeed", connect.getChannelId()); + LOG.debug("Semaphore permits remaining {}, queued {}", semaphore.availablePermits(), semaphore.getQueueLength()); + } return true; } catch (Exception e) { throw new StageException(this, processRecordsInput, e.getMessage(), e); @@ -160,4 +209,20 @@ public ProcessDataBackoff getBackoff() { public void setBackoff(ProcessDataBackoff backoff) { this.backoff = backoff; } + + public Semaphore getSemaphore() { + return semaphore; + } + + public void setSemaphore(Semaphore semaphore) { + this.semaphore = semaphore; + } + + public void setReadMaxTimesPerRound(int readMaxTimesPerRound) { + this.readMaxTimesPerRound = readMaxTimesPerRound; + } + + public void setReadMaxBytesPerRound(int readMaxBytesPerRound) { + this.readMaxBytesPerRound = readMaxBytesPerRound; + } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/tunnel/pipeline/ProcessDataPipelineContext.java b/src/main/java/com/alicloud/openservices/tablestore/tunnel/pipeline/ProcessDataPipelineContext.java index 637569f..6e4d59e 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/tunnel/pipeline/ProcessDataPipelineContext.java +++ b/src/main/java/com/alicloud/openservices/tablestore/tunnel/pipeline/ProcessDataPipelineContext.java @@ -1,28 +1,42 @@ package com.alicloud.openservices.tablestore.tunnel.pipeline; +import com.alicloud.openservices.tablestore.model.tunnel.internal.Channel; import com.alicloud.openservices.tablestore.tunnel.worker.ChannelConnect; import com.alicloud.openservices.tablestore.tunnel.worker.ChannelConnectStatus; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.util.concurrent.Semaphore; + /** - * ProcessDataPipleline计算环境的抽象,主要进行错误处理等操作。 + * ProcessDataPipeline计算环境的抽象,主要进行错误处理等操作。 */ public class ProcessDataPipelineContext implements PipelineContext { private static final Logger LOG = LoggerFactory.getLogger(ProcessDataPipelineContext.class); private ChannelConnect connect; + private Semaphore semaphore; public ProcessDataPipelineContext(ChannelConnect connect) { this.connect = connect; } + public ProcessDataPipelineContext(ChannelConnect connect, Semaphore semaphore) { + this.connect = connect; + this.semaphore = semaphore; + } + @Override public void handleError(StageException ex) { // CLOSED状态的ChannelConnect代表已经被关闭了, 其它状态的ChannelConnect发生异常需要将ChannelConnect关闭。 if (connect.getStatus() != ChannelConnectStatus.CLOSED) { - LOG.warn("Channel connect will be closed, channelId: {}, error detail: [{},{}]", - connect.getChannelId(), ex.getCause(), ex.getMessage()); + LOG.warn("Channel connect will be closed, channelId: {}, error detail: [{},{}, {}]", + connect.getChannelId(), ex.getCause(), ex.getMessage(), ex.getStackTrace()); connect.close(false); } + if (semaphore != null) { + semaphore.release(); + LOG.info("Tunnel {}, Channel {} release semaphore after channel close, remaining: {}", + connect.getTunnelId(), connect.getChannelId(), semaphore.availablePermits()); + } } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/tunnel/pipeline/Utils.java b/src/main/java/com/alicloud/openservices/tablestore/tunnel/pipeline/Utils.java index d2578ca..ac8238a 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/tunnel/pipeline/Utils.java +++ b/src/main/java/com/alicloud/openservices/tablestore/tunnel/pipeline/Utils.java @@ -8,7 +8,7 @@ public class Utils { private static final Logger LOG = LoggerFactory.getLogger(Utils.class); - private static TunnelServiceApi.TokenContentV2 parseRequestToken(String token) throws Exception { + public static TunnelServiceApi.TokenContentV2 parseRequestToken(String token) throws Exception { TunnelServiceApi.Token tokenPb = TunnelServiceApi.Token.parseFrom(Base64.decodeBase64(token)); if (!tokenPb.hasVersion()) { throw new Exception("token miss must field: version."); diff --git a/src/main/java/com/alicloud/openservices/tablestore/tunnel/worker/ChannelConnect.java b/src/main/java/com/alicloud/openservices/tablestore/tunnel/worker/ChannelConnect.java index 300c6d1..60fff0e 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/tunnel/worker/ChannelConnect.java +++ b/src/main/java/com/alicloud/openservices/tablestore/tunnel/worker/ChannelConnect.java @@ -114,7 +114,7 @@ public void close() { public void close(boolean finish) { if (status.get() != ChannelConnectStatus.CLOSED) { - LOG.info("Shutdown Channel connect."); + LOG.info("Begin Shutdown Channel connect {}", channelId); if (processor != null) { processor.shutdown(); } @@ -122,7 +122,7 @@ public void close(boolean finish) { finished.set(true); } status.set(ChannelConnectStatus.CLOSED); - LOG.info("After close, ChannelConnectStatus: {}", status.get()); + LOG.info("After close channel {}, ChannelConnectStatus: {}", channelId, status.get()); } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/tunnel/worker/ChannelDialer.java b/src/main/java/com/alicloud/openservices/tablestore/tunnel/worker/ChannelDialer.java index 656a81a..eb8f20f 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/tunnel/worker/ChannelDialer.java +++ b/src/main/java/com/alicloud/openservices/tablestore/tunnel/worker/ChannelDialer.java @@ -20,6 +20,7 @@ public class ChannelDialer implements IChannelDialer { private final TunnelClientInterface client; private final TunnelWorkerConfig config; private final ExecutorService channelHelperExecutor; + private boolean isInnerConstruct = true; public ChannelDialer(TunnelClientInterface client, TunnelWorkerConfig config) { Preconditions.checkNotNull(client, "Tunnel client cannot be null."); @@ -27,14 +28,20 @@ public ChannelDialer(TunnelClientInterface client, TunnelWorkerConfig config) { this.client = client; this.config = config; - this.channelHelperExecutor = Executors.newCachedThreadPool(new ThreadFactory() { - private final AtomicInteger counter = new AtomicInteger(0); + if (config.getChannelHelperExecutor() != null) { + this.channelHelperExecutor = config.getChannelHelperExecutor(); + this.isInnerConstruct = false; + } else { + this.channelHelperExecutor = Executors.newCachedThreadPool(new ThreadFactory() { + private final AtomicInteger counter = new AtomicInteger(0); + + @Override + public Thread newThread(Runnable r) { + return new Thread(r, "channel-helper-executor-" + counter.getAndIncrement()); + } + }); + } - @Override - public Thread newThread(Runnable r) { - return new Thread(r, "channel-helper-executor-" + counter.getAndIncrement()); - } - }); } @Override @@ -52,10 +59,18 @@ public IChannelConnect channelDial(String tunnelId, String clientId, String chan channelConnect.setStateMachine(stateMachine); channelConnect.setFinished(new AtomicBoolean(false)); channelConnect.setStreamChannel(Utils.isStreamToken(token)); - channelConnect.setProcessPipeline(new ProcessDataPipeline(channelConnect, channelHelperExecutor, - config.getReadRecordsExecutor(), config.getProcessRecordsExecutor())); + ProcessDataPipeline pipeline = new ProcessDataPipeline(channelConnect, channelHelperExecutor, + config.getReadRecordsExecutor(), config.getProcessRecordsExecutor()); + if (config.getMaxChannelSemaphore() != null) { + pipeline.setSemaphore(config.getMaxChannelSemaphore()); + } + pipeline.setReadMaxBytesPerRound(config.getReadMaxBytesPerRound()); + pipeline.setReadMaxTimesPerRound(config.getReadMaxTimesPerRound()); + channelConnect.setProcessPipeline(pipeline); + if (channelConnect.isStreamChannel()) { - channelConnect.getProcessPipeline().setBackoff(new ProcessDataBackoff()); + channelConnect.getProcessPipeline().setBackoff( + new ProcessDataBackoff(config.getMaxRetryIntervalInMillis())); } channelConnect.setChannelExecutorService(channelHelperExecutor); return channelConnect; @@ -64,6 +79,9 @@ public IChannelConnect channelDial(String tunnelId, String clientId, String chan @Override public void shutdown() { LOG.info("Shutdown pipeline helper executor."); - channelHelperExecutor.shutdownNow(); + if (isInnerConstruct) { + LOG.info("Shutdown channel helper executor."); + channelHelperExecutor.shutdownNow(); + } } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/tunnel/worker/TunnelStateMachine.java b/src/main/java/com/alicloud/openservices/tablestore/tunnel/worker/TunnelStateMachine.java index c6b5fc2..d65ed39 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/tunnel/worker/TunnelStateMachine.java +++ b/src/main/java/com/alicloud/openservices/tablestore/tunnel/worker/TunnelStateMachine.java @@ -172,7 +172,7 @@ private ConcurrentHashMap mergeChannels(List batchChan } public void close() { - LOG.info("Begin close tunnel state machine."); + LOG.info("Begin close tunnel state machine, channelConnects: {}", channelConnects.size()); for (IChannelConnect connect : channelConnects.values()) { connect.close(); } diff --git a/src/main/java/com/alicloud/openservices/tablestore/tunnel/worker/TunnelWorker.java b/src/main/java/com/alicloud/openservices/tablestore/tunnel/worker/TunnelWorker.java index aa643e9..a17cb5e 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/tunnel/worker/TunnelWorker.java +++ b/src/main/java/com/alicloud/openservices/tablestore/tunnel/worker/TunnelWorker.java @@ -1,30 +1,20 @@ package com.alicloud.openservices.tablestore.tunnel.worker; -import java.util.Date; -import java.util.List; -import java.util.Random; -import java.util.concurrent.Executors; -import java.util.concurrent.ScheduledExecutorService; -import java.util.concurrent.ThreadFactory; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicReference; - import com.alicloud.openservices.tablestore.ClientException; import com.alicloud.openservices.tablestore.TableStoreException; import com.alicloud.openservices.tablestore.TunnelClientInterface; import com.alicloud.openservices.tablestore.core.ErrorCode; import com.alicloud.openservices.tablestore.core.utils.Preconditions; -import com.alicloud.openservices.tablestore.model.tunnel.internal.Channel; -import com.alicloud.openservices.tablestore.model.tunnel.internal.ConnectTunnelRequest; -import com.alicloud.openservices.tablestore.model.tunnel.internal.ConnectTunnelResponse; -import com.alicloud.openservices.tablestore.model.tunnel.internal.HeartbeatRequest; -import com.alicloud.openservices.tablestore.model.tunnel.internal.HeartbeatResponse; -import com.alicloud.openservices.tablestore.model.tunnel.internal.ShutdownTunnelRequest; +import com.alicloud.openservices.tablestore.model.tunnel.internal.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import static com.alicloud.openservices.tablestore.core.ErrorCode.RESOURCE_GONE; +import java.util.Date; +import java.util.List; +import java.util.Random; +import java.util.concurrent.*; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicReference; /** * TunnelWorker是基于TableStore数据接口之上的全增量一体化服务,用户可以简单地实现对表中历史存量和新增数据的消费处理。 @@ -39,7 +29,7 @@ * 1.4 根据用户传入的处理数据的Callback和TunnelWorkerConfig中CheckpointInterval(向服务端记数据位点的间隔) * 包装出一个带自动记Checkpoint功能的数据处理器, 详细参见: ChannelProcessFactory。 * 1.5 初始化TunnelStateMachine(会进行Channel状态机的自动化处理)。 - * + *

* 2. 固定间隔进行Heartbeat,间隔由TunnelWorkerConfig里的heartbeatIntervalInSec参数决定。 * 2.1 进行heartbeat请求,从Tunnel服务端获取最新可用的Channel列表,Channel中会包含有ChannelId, Channel的版本和Channel的状态信息。 * 2.2 将服务端获取到的Channel列表和本地内存中的Channel列表进行Merge,然后进行ChannelConnect的新建和update,规则大致如下 @@ -50,12 +40,12 @@ * 3) Update已有ChannelConnect: Merge完成后,若Channel对应的ChannelConnect存在,则根据相同ChannelId的Channel状态来更新 * ChannelConnect的状态,比如Channel为Close状态也需要将ChannelConnect的状态置为Closed,进而终止处理任务的流水线任务, * 详细的细节可以参见ChannelConnect.notifyStatus方法。 - * + *

* 3. 自动化的负载均衡和良好的水平扩展性 * 运行多个TunnelWorker对同一个Tunnel进行消费时(TunnelId相同), 在TunnelWorker执行Heartbeat时,Tunnel服务端会自动的对Channel资源进行重分配, * 让活跃的Channel尽可能的均摊到每一个TunnelWorker上,达到资源负载均衡的目的。同时,在水平扩展性方面,用户可以很容易的通过增加TunnelWorker的 * 数量来完成,TunnelWorker可以在同一个机器或者不同机器上。 - * + *

* 4. 自动化的资源清理和容错处理 * 4.1 资源清理: 当客户端(TunnelWorker)没有被正常shutdown时(比如异常退出或者手动结束),我们会自动帮用户进行资源的回收,包括释放线程池, * 自动调用用户在Channel上注册的shutdown方法,关闭Tunnel连接等。 @@ -75,13 +65,30 @@ public class TunnelWorker implements ITunnelWorker { private AtomicReference workerStatus = new AtomicReference(); private Date lastHeartbeatTime; private ScheduledExecutorService heartbeatExecutor; + private IChannelProcessorFactory factory; - public TunnelWorker(String tunnelId, TunnelClientInterface client, TunnelWorkerConfig workerConfig) { + public TunnelWorker( + String tunnelId, + TunnelClientInterface client, + TunnelWorkerConfig workerConfig) { + this(tunnelId, client, workerConfig, null); + } + + public TunnelWorker( + String tunnelId, + TunnelClientInterface client, + TunnelWorkerConfig workerConfig, + IChannelProcessorFactory factory) { Preconditions.checkArgument(tunnelId != null && !tunnelId.isEmpty(), - "The tunnel id should not be null or empty."); + "The tunnel id should not be null or empty."); Preconditions.checkNotNull(client, "Tunnel client cannot be null."); Preconditions.checkNotNull(workerConfig, "Tunnel worker workerConfig cannot be null."); - Preconditions.checkNotNull(workerConfig.getChannelProcessor(), "Channel Processor cannot be null."); + + this.factory = factory; + // 工厂对象没有的情况下,需要明确设置ChannelProcessor + if (this.factory == null) { + Preconditions.checkNotNull(workerConfig.getChannelProcessor(), "Channel Processor cannot be null."); + } init(tunnelId, client, workerConfig); } @@ -90,6 +97,9 @@ private void init(String tunnelId, TunnelClientInterface client, TunnelWorkerCon LOG.info("Initial tunnel worker, tunnelId: {}", tunnelId); this.tunnelId = tunnelId; this.client = client; + if (config.getMaxChannelParallel() > 0) { + config.setMaxChannelSemaphore(new Semaphore(config.getMaxChannelParallel(), true)); + } this.workerConfig = config; this.workerStatus.set(TunnelWorkerStatus.WORKER_READY); this.lastHeartbeatTime = new Date(); @@ -111,7 +121,7 @@ private void connect() { while (true) { try { TunnelClientConfig conf = new TunnelClientConfig(workerConfig.getHeartbeatTimeoutInSec(), - workerConfig.getClientTag()); + workerConfig.getClientTag()); ConnectTunnelRequest request = new ConnectTunnelRequest(tunnelId, conf); ConnectTunnelResponse resp = client.connectTunnel(request); this.clientId = resp.getClientId(); @@ -119,10 +129,16 @@ private void connect() { this.channelDialer = new ChannelDialer(client, workerConfig); // 根据用户传入的处理数据的Callback和CheckpointInterval(向服务端记数据位点的间隔) // 包装出一个带自动记Checkpoint功能的数据处理器。 - IChannelProcessorFactory channelProcessorFactory = new ChannelProcessFactory(workerConfig); - stateMachine = new TunnelStateMachine(tunnelId, clientId, channelDialer, channelProcessorFactory, - client); - LOG.info("Connect tunnel success, clientId: {}, tunnelId: {}", clientId, tunnelId); + if (factory == null) { + factory = new ChannelProcessFactory(workerConfig); + } + stateMachine = new TunnelStateMachine( + tunnelId, + clientId, + channelDialer, + factory, + client); + LOG.info("Connect tunnel success, RequestId: {}, clientId: {}, tunnelId: {}", resp.getRequestId(), clientId, tunnelId); break; } catch (TableStoreException te) { LOG.warn("Connect tunnel failed, tunnel id {}, error detail {}", tunnelId, te.toString()); @@ -156,9 +172,10 @@ public void run() { Date now = new Date(); if (lastHeartbeatTime.compareTo(now) != 0) { if (now.getTime() - lastHeartbeatTime.getTime() > TimeUnit.SECONDS.toMillis( - workerConfig.getHeartbeatTimeoutInSec())) { + workerConfig.getHeartbeatTimeoutInSec())) { LOG.error("Tunnel client heartbeat timeout, lastHeartbeatTime: {}.", lastHeartbeatTime); - throw new TableStoreException("tunnel client heartbeat timeout", RESOURCE_GONE); + shutdown(false); + return; } } LOG.info("Begin batch get channels."); @@ -167,20 +184,17 @@ public void run() { HeartbeatResponse resp = client.heartbeat(request); lastHeartbeatTime = new Date(); List targetChannels = resp.getChannels(); - LOG.info("Begin batch update channels, num: {}, detail: {}.", targetChannels.size(), - channelsToString(targetChannels)); + LOG.info("Begin batch update channels, RequestId: {}, num: {}, detail: {}.", resp.getRequestId(), + targetChannels.size(), channelsToString(targetChannels)); stateMachine.batchUpdateChannels(targetChannels); } catch (TableStoreException te) { LOG.warn("Heartbeat error, TableStore Exception: {}.", te.toString()); if (isTunnelInvalid(te.getErrorCode())) { LOG.error("Tunnel is expired or invalid, tunnel worker will be halted."); shutdown(true); - } else { - shutdown(false); } } catch (Throwable e) { LOG.warn("Heartbeat error, Throwable: {}", e.toString()); - shutdown(false); } } } @@ -205,7 +219,7 @@ public void connectAndWorking() throws Exception { connect(); // 定期进行Heartbeat, 进行活跃Channel的探测,Channel和ChannelConnect状态的更新,数据处理任务的初始化、运行和结束等。 heartbeatExecutor.scheduleAtFixedRate(new Heartbeat(), 0, workerConfig.getHeartbeatIntervalInSec(), - TimeUnit.SECONDS); + TimeUnit.SECONDS); // Add Shutdown hook for resource clear. Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() { @@ -230,7 +244,7 @@ public void shutdown() { */ private void shutdown(boolean isHalt) { if (workerStatus.get().equals(TunnelWorkerStatus.WORKER_ENDED) || - workerStatus.get().equals(TunnelWorkerStatus.WORKER_HALT)) { + workerStatus.get().equals(TunnelWorkerStatus.WORKER_HALT)) { LOG.info("Tunnel worker has already been {} status, skip shutdown logic.", workerStatus); return; } @@ -244,13 +258,22 @@ private void shutdown(boolean isHalt) { } if (isHalt && heartbeatExecutor != null) { LOG.info("Shutdown heartbeat executor."); - heartbeatExecutor.shutdown(); + heartbeatExecutor.shutdownNow(); + try { + if (heartbeatExecutor.awaitTermination(5, TimeUnit.SECONDS)) { + LOG.info("Heartbeat executor termination success."); + } else { + LOG.warn("Heartbeat executor termination until timeout"); + } + } catch (InterruptedException e) { + LOG.warn("Wait heartbeat executor termination failed", e); + } } try { LOG.info("Shutdown tunnel, tunnelId: {}, clientId: {}", tunnelId, clientId); client.shutdownTunnel(new ShutdownTunnelRequest(tunnelId, clientId)); } catch (Exception e) { - LOG.warn("Shutdown tunnel failed, tunnelId: {}, clientId: {}", tunnelId, clientId); + LOG.warn("Shutdown tunnel failed, tunnelId: {}, clientId: {}", tunnelId, clientId, e); } LOG.info("Tunnel worker is ended."); if (isHalt) { diff --git a/src/main/java/com/alicloud/openservices/tablestore/tunnel/worker/TunnelWorkerConfig.java b/src/main/java/com/alicloud/openservices/tablestore/tunnel/worker/TunnelWorkerConfig.java index cafd6be..dbfcab2 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/tunnel/worker/TunnelWorkerConfig.java +++ b/src/main/java/com/alicloud/openservices/tablestore/tunnel/worker/TunnelWorkerConfig.java @@ -1,16 +1,13 @@ package com.alicloud.openservices.tablestore.tunnel.worker; -import java.util.concurrent.ArrayBlockingQueue; -import java.util.concurrent.ThreadFactory; -import java.util.concurrent.ThreadPoolExecutor; -import java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicInteger; - import com.alicloud.openservices.tablestore.core.utils.Preconditions; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.util.concurrent.*; +import java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy; +import java.util.concurrent.atomic.AtomicInteger; + /** * TunnelWorker的自定义配置。 */ @@ -22,6 +19,7 @@ public class TunnelWorkerConfig { private static final int BLOCKING_QUEUE_SIZE = 16; private static final int HEARTBEAT_MIN_INTERVAL_SEC = 5; + private static final int MAX_RETRY_MILL_SEC_MIN = 200; /** * Heartbeat的超时间隔,当Heartbeat发生超时,Tunnel服务端会认为当前TunnelClient不可用(失活),客户端需要重新的进行ConnectTunnel。 @@ -59,11 +57,41 @@ public class TunnelWorkerConfig { */ private ThreadPoolExecutor processRecordsExecutor; + /** + * Channel读取和处理数据的最大并行度,可用于内存控制,默认为-1,表示不限制最大并行度。 + */ + private int maxChannelParallel = -1; + private Semaphore maxChannelSemaphore; + + /** + * TunnelWorker的辅助线程池,默认用的是CachedThreadPool。 + */ + private ThreadPoolExecutor channelHelperExecutor; + + private int maxRetryIntervalInMillis = 2000; + + /** + * Tunnel ReadRecords阶段每一轮的相关配置, 包括最大的读取轮数和最大的读取数据量。 + */ + private int readMaxTimesPerRound= 1; + private int readMaxBytesPerRound = 4 * 1024 * 1024; // 4M bytes + // TODO: Add max limit + private static final int READ_MAX_TIMES_PER_ROUND = 50; + private static final int READ_MAX_BYTES_PER_ROUND = 64 * 1024 * 1024; + + public TunnelWorkerConfig() { + this( + newDefaultThreadPool("read-records-executor-"), + newDefaultThreadPool("process-records-executor-"), + null + ); + } + public TunnelWorkerConfig(IChannelProcessor processor) { this( - newDefaultThreadPool("read-records-executor-"), - newDefaultThreadPool("process-records-executor-"), - processor + newDefaultThreadPool("read-records-executor-"), + newDefaultThreadPool("process-records-executor-"), + processor ); } @@ -80,7 +108,7 @@ public long getHeartbeatTimeoutInSec() { public void setHeartbeatTimeoutInSec(long heartbeatTimeoutInSec) { Preconditions.checkArgument(heartbeatTimeoutInSec > heartbeatIntervalInSec, - "heartbeat timeout should larger than heartbeat interval."); + "heartbeat timeout should larger than heartbeat interval."); this.heartbeatTimeoutInSec = heartbeatTimeoutInSec; } @@ -89,8 +117,8 @@ public long getHeartbeatIntervalInSec() { } public void setHeartbeatIntervalInSec(long heartbeatIntervalInSec) { - Preconditions.checkArgument(heartbeatIntervalInSec > HEARTBEAT_MIN_INTERVAL_SEC, - "heartbeat interval must greater than or equal to %d seconds.", HEARTBEAT_MIN_INTERVAL_SEC); + Preconditions.checkArgument(heartbeatIntervalInSec >= HEARTBEAT_MIN_INTERVAL_SEC, + "heartbeat interval must greater than or equal to %d seconds.", HEARTBEAT_MIN_INTERVAL_SEC); this.heartbeatIntervalInSec = heartbeatIntervalInSec; } @@ -140,6 +168,16 @@ public void setProcessRecordsExecutor(ThreadPoolExecutor processRecordsExecutor) this.processRecordsExecutor = processRecordsExecutor; } + public int getMaxRetryIntervalInMillis() { + return maxRetryIntervalInMillis; + } + + public void setMaxRetryIntervalInMillis(int maxRetryIntervalInMillis) { + Preconditions.checkArgument(maxRetryIntervalInMillis >= MAX_RETRY_MILL_SEC_MIN, + "max retry interval must bigger than or equal to %s mill seconds.", MAX_RETRY_MILL_SEC_MIN); + this.maxRetryIntervalInMillis = maxRetryIntervalInMillis; + } + /** * 初始化默认的线程池。在我们的默认线程池配置中,我们做了以下几件事,以保障吞吐量: * 1. 默认预发分配32个的核心线程,以保障数据较小时(Channel数较少时)的实时吞吐。 @@ -151,18 +189,58 @@ public void setProcessRecordsExecutor(ThreadPoolExecutor processRecordsExecutor) */ public static ThreadPoolExecutor newDefaultThreadPool(final String threadPrefix) { return new ThreadPoolExecutor(CORE_POOL_SIZE, MAX_CORE_POOL_SIZE, KEEP_ALIVE_SECONDS, TimeUnit.SECONDS, - new ArrayBlockingQueue(BLOCKING_QUEUE_SIZE), - new ThreadFactory() { - private final AtomicInteger counter = new AtomicInteger(); + new ArrayBlockingQueue(BLOCKING_QUEUE_SIZE), + new ThreadFactory() { + private final AtomicInteger counter = new AtomicInteger(); - @Override - public Thread newThread(Runnable r) { - String threadName = threadPrefix + counter.getAndIncrement(); - LOG.info("TunnelWorkerConfig new thread: " + threadName); - return new Thread(r, threadName); - } - }, - new CallerRunsPolicy()); + @Override + public Thread newThread(Runnable r) { + String threadName = threadPrefix + counter.getAndIncrement(); + LOG.info("TunnelWorkerConfig new thread: " + threadName); + return new Thread(r, threadName); + } + }, + new CallerRunsPolicy()); + } + + public int getMaxChannelParallel() { + return maxChannelParallel; + } + + public void setMaxChannelParallel(int maxChannelParallel) { + this.maxChannelParallel = maxChannelParallel; + } + + void setMaxChannelSemaphore(Semaphore maxChannelSemaphore) { + this.maxChannelSemaphore = maxChannelSemaphore; + } + + Semaphore getMaxChannelSemaphore() { + return maxChannelSemaphore; + } + + public void setChannelHelperExecutor(ThreadPoolExecutor channelHelperExecutor) { + this.channelHelperExecutor = channelHelperExecutor; + } + + public ThreadPoolExecutor getChannelHelperExecutor() { + return channelHelperExecutor; + } + + public int getReadMaxTimesPerRound() { + return readMaxTimesPerRound; + } + + public void setReadMaxTimesPerRound(int readMaxTimesPerRound) { + this.readMaxTimesPerRound = readMaxTimesPerRound; + } + + public int getReadMaxBytesPerRound() { + return readMaxBytesPerRound; + } + + public void setReadMaxBytesPerRound(int readMaxBytesPerRound) { + this.readMaxBytesPerRound = readMaxBytesPerRound; } /** @@ -171,7 +249,29 @@ public Thread newThread(Runnable r) { public void shutdown() { LOG.info("shutdown read records executor"); readRecordsExecutor.shutdownNow(); + try { + if (readRecordsExecutor.awaitTermination(100, TimeUnit.SECONDS)) { + LOG.info("ReadRecords executor termination success."); + } else { + LOG.warn("ReadRecords executor termination until timeout"); + } + } catch (InterruptedException e) { + LOG.warn("Wait read records executor termination failed", e); + } LOG.info("shutdown process records executor"); processRecordsExecutor.shutdownNow(); + try { + if (processRecordsExecutor.awaitTermination(100, TimeUnit.SECONDS)) { + LOG.info("ProcessRecords executor termination success."); + } else { + LOG.warn("ProcessRecords executor termination until timeout"); + } + } catch (InterruptedException e) { + LOG.warn("Wait process records executor termination failed", e); + } + if (channelHelperExecutor != null) { + channelHelperExecutor.shutdownNow(); + LOG.info("shutdown channel helper executor"); + } } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/writer/Bucket.java b/src/main/java/com/alicloud/openservices/tablestore/writer/Bucket.java new file mode 100644 index 0000000..5aac363 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/writer/Bucket.java @@ -0,0 +1,105 @@ +package com.alicloud.openservices.tablestore.writer; + +import com.alicloud.openservices.tablestore.AsyncClientInterface; +import com.alicloud.openservices.tablestore.TableStoreCallback; +import com.alicloud.openservices.tablestore.model.RowChange; +import com.alicloud.openservices.tablestore.writer.config.BucketConfig; +import com.alicloud.openservices.tablestore.writer.handle.RowEventHandler; +import com.alicloud.openservices.tablestore.writer.handle.WriterHandleStatistics; +import com.lmax.disruptor.InsufficientCapacityException; +import com.lmax.disruptor.RingBuffer; +import com.lmax.disruptor.dsl.Disruptor; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.concurrent.*; + + +public class Bucket { + private Logger logger = LoggerFactory.getLogger(Bucket.class); + + private final BucketConfig bucketConfig; + + private final Disruptor disruptor; + + private final RingBuffer ringBuffer; + + private final RowEventHandler eventHandler; + + private final ExecutorService disruptorExecutor; + + private final WriterConfig writerConfig; + + private final Semaphore semaphore; + + private TableStoreCallback resultCallback; + + public Bucket(BucketConfig bucketConfig, AsyncClientInterface ots, WriterConfig writerConfig, + TableStoreCallback resultCallback, Executor executor, + WriterHandleStatistics writerStatistics, Semaphore semaphore) { + RowChangeEvent.RowChangeEventFactory factory = new RowChangeEvent.RowChangeEventFactory(); + + this.bucketConfig = bucketConfig; + this.writerConfig = writerConfig; + this.semaphore = semaphore; + this.resultCallback = resultCallback; + disruptorExecutor = Executors.newFixedThreadPool(1); + disruptor = new Disruptor(factory, this.writerConfig.getBufferSize(), disruptorExecutor); + ringBuffer = disruptor.getRingBuffer(); + eventHandler = new RowEventHandler(ots, bucketConfig, writerConfig, this.resultCallback, executor, + writerStatistics, this.semaphore); + + disruptor.handleEventsWith(eventHandler); + disruptor.start(); + } + + + public boolean addRowChange(RowChange rowChange, Group group) { + try { + long sequence = ringBuffer.tryNext(); + RowChangeEvent event = ringBuffer.get(sequence); + event.setValue(rowChange, group); + ringBuffer.publish(sequence); + + return true; + } catch (InsufficientCapacityException e) { + return false; + } + } + + public void setResultCallback(TableStoreCallback resultCallback) { + eventHandler.setCallback(resultCallback); + } + + + public void addSignal(CountDownLatch latch) { + while (true) { + try { + long sequence = ringBuffer.tryNext(); + RowChangeEvent event = ringBuffer.get(sequence); + event.setValue(latch); + ringBuffer.publish(sequence); + + return; + } catch (InsufficientCapacityException e) { + try { + Thread.sleep(1); + } catch (InterruptedException exp) { + } + } + } + } + + public synchronized void close() { + disruptor.shutdown(); + disruptorExecutor.shutdown(); + } + + public int getId() { + return this.bucketConfig.getBucketId(); + } + + public RingBuffer getRingBuffer() { + return ringBuffer; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/writer/CallbackFactory.java b/src/main/java/com/alicloud/openservices/tablestore/writer/CallbackFactory.java new file mode 100644 index 0000000..4271093 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/writer/CallbackFactory.java @@ -0,0 +1,17 @@ +package com.alicloud.openservices.tablestore.writer; + +import com.alicloud.openservices.tablestore.TableStoreCallback; + +import java.util.List; + +/** + * 获取Callback实例:支持按序、并发两种Callback实现 + */ +public interface CallbackFactory { + + /** + * 支持批量管理时,传入每行的群组实例 + * Callback结束请求后主动更新批量统计 + */ + TableStoreCallback newInstance(List groupFuture); +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/writer/DefaultWriterStatistics.java b/src/main/java/com/alicloud/openservices/tablestore/writer/DefaultWriterStatistics.java deleted file mode 100644 index c98c1a7..0000000 --- a/src/main/java/com/alicloud/openservices/tablestore/writer/DefaultWriterStatistics.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.alicloud.openservices.tablestore.writer; - -import java.util.concurrent.atomic.AtomicLong; - -public class DefaultWriterStatistics implements WriterStatistics { - AtomicLong totalRequestCount = new AtomicLong(0); - AtomicLong totalRowsCount = new AtomicLong(0); - AtomicLong totalSucceedRowsCount = new AtomicLong(0); - AtomicLong totalFailedRowsCount = new AtomicLong(0); - AtomicLong totalSingleRowRequestCount = new AtomicLong(0); - - public DefaultWriterStatistics() { - - } - - @Override - public long getTotalRequestCount() { - return totalRequestCount.longValue(); - } - - @Override - public long getTotalRowsCount() { - return totalRowsCount.longValue(); - } - - @Override - public long getTotalSucceedRowsCount() { - return totalSucceedRowsCount.longValue(); - } - - @Override - public long getTotalFailedRowsCount() { - return totalFailedRowsCount.longValue(); - } - - @Override - public long getTotalSingleRowRequestCount() { - return totalSingleRowRequestCount.longValue(); - } -} diff --git a/src/main/java/com/alicloud/openservices/tablestore/writer/FlushCallback.java b/src/main/java/com/alicloud/openservices/tablestore/writer/FlushCallback.java deleted file mode 100644 index 1405095..0000000 --- a/src/main/java/com/alicloud/openservices/tablestore/writer/FlushCallback.java +++ /dev/null @@ -1,223 +0,0 @@ -package com.alicloud.openservices.tablestore.writer; - -import com.alicloud.openservices.tablestore.AsyncClientInterface; -import com.alicloud.openservices.tablestore.TableStoreCallback; -import com.alicloud.openservices.tablestore.TableStoreException; -import com.alicloud.openservices.tablestore.model.*; -import com.alicloud.openservices.tablestore.model.Error; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.concurrent.Executor; -import java.util.concurrent.Semaphore; -import java.util.concurrent.atomic.AtomicInteger; - -class FlushCallback implements TableStoreCallback { - private Logger logger = LoggerFactory.getLogger(FlushCallback.class); - - private AsyncClientInterface ots; - private AtomicInteger count; - private Semaphore semaphore; - private long startTime; - private TableStoreCallback callback; - private Executor executor; - private DefaultWriterStatistics writerStatistics; - - public FlushCallback(AsyncClientInterface ots, AtomicInteger count, Semaphore semaphore, - TableStoreCallback callback, Executor executor, DefaultWriterStatistics writerStatistics) { - this.ots = ots; - this.count = count; - this.semaphore = semaphore; - this.startTime = System.currentTimeMillis(); - this.callback = callback; - this.executor = executor; - this.writerStatistics = writerStatistics; - } - - private void triggerSucceedCallback(final RowChange rowChange, final ConsumedCapacity consumedCapacity, final Row row) { - if (callback == null) { - return; - } - - executor.execute(new Runnable() { - @Override - public void run() { - writerStatistics.totalSucceedRowsCount.incrementAndGet(); - callback.onCompleted(rowChange, new RowWriteResult(consumedCapacity, row)); - } - }); - } - - private void triggerFailedCallback(final RowChange rowChange, final Exception exp) { - if (callback == null) { - return; - } - - executor.execute(new Runnable() { - @Override - public void run() { - writerStatistics.totalFailedRowsCount.incrementAndGet(); - callback.onFailed(rowChange, exp); - } - }); - } - - private void triggerFailedCallback(final List rowChanges, final Exception exp) { - if (callback == null) { - return; - } - - executor.execute(new Runnable() { - @Override - public void run() { - for (RowChange rowChange : rowChanges) { - writerStatistics.totalFailedRowsCount.incrementAndGet(); - callback.onFailed(rowChange, exp); - } - } - }); - } - - /** - * 当请求结束后,需要主动释放信号量。
- * 但是注意:这里不是每个请求完成都能去释放信号量。
- * 例如一次BatchWriteRow请求申请了一个信号量,但是由于其包含脏数据,所以需要对每一行数据单独发送一次请求来重试,此时一个并发会分裂为 - * N个并发,这N个并发请求会有自己独立的callback。而其申请的那一个信号量需要由这N个并发中的其中一个来释放,如何选择哪个来释放? - * 这里采取的策略是用一个原子计数器,哪个请求最后一个完成,则由其来释放这个信号量。 - */ - private void requestComplete() { - int remain = this.count.decrementAndGet(); - if (remain == 0) { - semaphore.release(); - logger.debug("Release semaphore."); - } - long endTime = System.currentTimeMillis(); - logger.debug("BatchWriteRow latency: {}", endTime - startTime); - } - - public void onCompleted(BatchWriteRowRequest originRequest, BatchWriteRowResponse result) { - List succeed = new ArrayList(); - List failed = new ArrayList(); - - result.getResult(succeed, failed); - for (BatchWriteRowResponse.RowResult status : succeed) { - triggerSucceedCallback(originRequest.getRowChange(status.getTableName(), status.getIndex()), status.getConsumedCapacity(), status.getRow()); - } - - for (BatchWriteRowResponse.RowResult status : failed) { - Error error = status.getError(); - triggerFailedCallback(originRequest.getRowChange(status.getTableName(), status.getIndex()), new TableStoreException(error.getMessage(), null, error.getCode(), result.getRequestId(), 0)); - } - } - - @Override - public void onCompleted(Req request, Res response) { - logger.debug("OnComplete: {}", request.getClass().getName()); - if (request instanceof BatchWriteRowRequest) { - onCompleted((BatchWriteRowRequest) request, (BatchWriteRowResponse) response); - } else if (request instanceof PutRowRequest) { - PutRowRequest pr = (PutRowRequest) request; - triggerSucceedCallback(pr.getRowChange(), ((PutRowResponse) response).getConsumedCapacity(), ((PutRowResponse) response).getRow()); - } else if (request instanceof UpdateRowRequest) { - UpdateRowRequest ur = (UpdateRowRequest) request; - triggerSucceedCallback(ur.getRowChange(), ((UpdateRowResponse) response).getConsumedCapacity(), ((UpdateRowResponse) response).getRow()); - } else if (request instanceof DeleteRowRequest) { - DeleteRowRequest dr = (DeleteRowRequest) request; - triggerSucceedCallback(dr.getRowChange(), ((DeleteRowResponse) response).getConsumedCapacity(), ((DeleteRowResponse) response).getRow()); - } - - requestComplete(); - } - - @Override - public void onFailed(Req request, Exception ex) { - if (ex instanceof TableStoreException) { - failedOnException(request, (TableStoreException) ex); - } else { - failedOnUnknownException(request, ex); - } - } - - public void failedOnException(Req request, TableStoreException ex) { - logger.debug("OnFailed on TableStoreException: {}, {}", request.getClass().getName(), ex); - if (request instanceof BatchWriteRowRequest) { - retryBatchWrite((BatchWriteRowRequest) request); - } else if (request instanceof PutRowRequest) { - PutRowRequest pr = (PutRowRequest) request; - triggerFailedCallback(pr.getRowChange(), ex); - } else if (request instanceof UpdateRowRequest) { - UpdateRowRequest ur = (UpdateRowRequest) request; - triggerFailedCallback(ur.getRowChange(), ex); - } else if (request instanceof DeleteRowRequest) { - DeleteRowRequest dr = (DeleteRowRequest) request; - triggerFailedCallback(dr.getRowChange(), ex); - } - - requestComplete(); - } - - public void failedOnUnknownException(Req request, Exception ex) { - logger.debug("OnFailed on ClientException: {}, {}", request.getClass().getName(), ex); - List failedRows = new ArrayList(); - if (request instanceof BatchWriteRowRequest) { - BatchWriteRowRequest bwr = (BatchWriteRowRequest) request; - for (Map.Entry> entry : bwr.getRowChange().entrySet()) { - failedRows.addAll(entry.getValue()); - } - } else if (request instanceof PutRowRequest) { - PutRowRequest pr = (PutRowRequest) request; - failedRows.add(pr.getRowChange()); - } else if (request instanceof UpdateRowRequest) { - UpdateRowRequest ur = (UpdateRowRequest) request; - failedRows.add(ur.getRowChange()); - } else if (request instanceof DeleteRowRequest) { - DeleteRowRequest dr = (DeleteRowRequest) request; - failedRows.add(dr.getRowChange()); - } - - triggerFailedCallback(failedRows, ex); - - requestComplete(); - } - - /** - * 在一般情况下,BatchWriteRow是不会发生整体异常的,若发生,则代表其中包含有脏数据,例如有一行的属性列的大小超过大小限制等。 - * 在这种情况下,我们不希望因为这一行脏数据,导致其他的行导入失败。但是由于我们无法找出这是哪一行,所以采取的做法是将这一次Batch内 - * 包含的所有行通过PutRow等单行写操作写过去。 - * 由于我们在writer外层是有一层参数检查了,所以这种情况是极少发生的。 - * - * @param request - */ - private void retryBatchWrite(BatchWriteRowRequest request) { - for (Map.Entry> entry : request.getRowChange().entrySet()) { - count.addAndGet(entry.getValue().size()); - for (RowChange rowChange : entry.getValue()) { - if (rowChange instanceof RowPutChange) { - RowPutChange rowPutChange = (RowPutChange) rowChange; - PutRowRequest pr = new PutRowRequest(); - pr.setRowChange(rowPutChange); - writerStatistics.totalSingleRowRequestCount.incrementAndGet(); - writerStatistics.totalRequestCount.incrementAndGet(); - ots.putRow(pr, new FlushCallback(ots, count, semaphore, callback, executor, writerStatistics)); - } else if (rowChange instanceof RowUpdateChange) { - UpdateRowRequest ur = new UpdateRowRequest(); - RowUpdateChange rowUpdateChange = (RowUpdateChange) rowChange; - ur.setRowChange(rowUpdateChange); - writerStatistics.totalSingleRowRequestCount.incrementAndGet(); - writerStatistics.totalRequestCount.incrementAndGet(); - ots.updateRow(ur, new FlushCallback(ots, count, semaphore, callback, executor, writerStatistics)); - } else if (rowChange instanceof RowDeleteChange) { - DeleteRowRequest dr = new DeleteRowRequest(); - RowDeleteChange rowDeleteChange = (RowDeleteChange) rowChange; - dr.setRowChange(rowDeleteChange); - writerStatistics.totalSingleRowRequestCount.incrementAndGet(); - writerStatistics.totalRequestCount.incrementAndGet(); - ots.deleteRow(dr, new FlushCallback(ots, count, semaphore, callback, executor, writerStatistics)); - } - } - } - } -} diff --git a/src/main/java/com/alicloud/openservices/tablestore/writer/Group.java b/src/main/java/com/alicloud/openservices/tablestore/writer/Group.java new file mode 100644 index 0000000..b5335b4 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/writer/Group.java @@ -0,0 +1,69 @@ +package com.alicloud.openservices.tablestore.writer; + +import com.alicloud.openservices.tablestore.core.CallbackImpledFuture; +import com.alicloud.openservices.tablestore.model.RowChange; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicLong; +import java.util.concurrent.atomic.AtomicReferenceArray; + + +public class Group { + private Logger logger = LoggerFactory.getLogger(Group.class); + + private static AtomicLong idGenerator = new AtomicLong(0); + private final long groupId; + private final int totalCount; + private final AtomicInteger remainCounter; + private final AtomicReferenceArray rowChangeStatusList; + private final CallbackImpledFuture future; + + public Group(int totalCount) { + this.future = new CallbackImpledFuture(); + this.totalCount = totalCount; + this.remainCounter = new AtomicInteger(totalCount); + this.rowChangeStatusList = new AtomicReferenceArray(totalCount); + this.groupId = idGenerator.incrementAndGet(); + } + + public CallbackImpledFuture getFuture() { + return future; + } + + public void succeedOneRow(RowChange rowChange) { + finishOneRow(true, rowChange, null); + } + + public void failedOneRow(RowChange rowChange, Exception exception) { + finishOneRow(false, rowChange, exception); + } + + private void finishOneRow(boolean isSucceed, RowChange rowChange, Exception exception) { + int counter = this.remainCounter.decrementAndGet(); + + if (counter < 0) { + RuntimeException exp = new IllegalStateException( + String.format("[%d] WriterResult shouldn't finish more rows than total count", groupId)); + logger.error("Group OnFinishOneRow Failed", exp); + throw exp; + } + + WriterResult.RowChangeStatus status = new WriterResult.RowChangeStatus(isSucceed, rowChange, exception); + rowChangeStatusList.set(totalCount - counter - 1, status); // 完成行offset = totalCount - counter - 1 + + if (counter == 0) { + completeGroup(); + } + } + + private void completeGroup() { + WriterResult writerResult = new WriterResult(totalCount, rowChangeStatusList); + future.onCompleted(null, writerResult); + } + + public long getGroupId() { + return groupId; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/writer/RequestManager.java b/src/main/java/com/alicloud/openservices/tablestore/writer/RequestManager.java new file mode 100644 index 0000000..92f8615 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/writer/RequestManager.java @@ -0,0 +1,18 @@ +package com.alicloud.openservices.tablestore.writer; + + +/** + * 请求管理接口: + * 实现BatchWriteRowRequest、BulkImportRequest两种请求构建方式 + */ +public interface RequestManager { + boolean appendRowChange(RowChangeWithGroup rowChangeWithGroup); + + RequestWithGroups makeRequest(); + + void sendRequest(RequestWithGroups requestWithGroups); + + int getTotalRowsCount(); + + void clear(); +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/writer/RequestWithGroups.java b/src/main/java/com/alicloud/openservices/tablestore/writer/RequestWithGroups.java new file mode 100644 index 0000000..9e2842c --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/writer/RequestWithGroups.java @@ -0,0 +1,23 @@ +package com.alicloud.openservices.tablestore.writer; + +import com.alicloud.openservices.tablestore.model.Request; + +import java.util.List; + +public class RequestWithGroups { + private final Request request; + private final List groupList; + + public RequestWithGroups(Request request, List groupList) { + this.request = request; + this.groupList = groupList; + } + + public Request getRequest() { + return request; + } + + public List getGroupList() { + return groupList; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/writer/RowChangeEvent.java b/src/main/java/com/alicloud/openservices/tablestore/writer/RowChangeEvent.java index 080104b..e9c27fa 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/writer/RowChangeEvent.java +++ b/src/main/java/com/alicloud/openservices/tablestore/writer/RowChangeEvent.java @@ -4,8 +4,6 @@ import com.lmax.disruptor.EventFactory; import java.util.concurrent.CountDownLatch; -import java.util.concurrent.locks.Condition; -import java.util.concurrent.locks.ReentrantLock; public class RowChangeEvent { public enum EventType { @@ -15,14 +13,16 @@ public enum EventType { public EventType type; public RowChange rowChange; public CountDownLatch latch; + public Group group; private RowChangeEvent() { } - public void setValue(RowChange rowChange) { + public void setValue(RowChange rowChange, Group group) { this.type = EventType.DATA; this.rowChange = rowChange; + this.group = group; } public void setValue(CountDownLatch latch) { diff --git a/src/main/java/com/alicloud/openservices/tablestore/writer/RowChangeEventHandler.java b/src/main/java/com/alicloud/openservices/tablestore/writer/RowChangeEventHandler.java deleted file mode 100644 index bdc32b8..0000000 --- a/src/main/java/com/alicloud/openservices/tablestore/writer/RowChangeEventHandler.java +++ /dev/null @@ -1,115 +0,0 @@ -package com.alicloud.openservices.tablestore.writer; - -import com.alicloud.openservices.tablestore.ClientException; -import com.alicloud.openservices.tablestore.AsyncClientInterface; -import com.alicloud.openservices.tablestore.TableStoreCallback; -import com.alicloud.openservices.tablestore.model.*; -import com.lmax.disruptor.EventHandler; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.Executor; -import java.util.concurrent.Semaphore; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.locks.Condition; -import java.util.concurrent.locks.ReentrantLock; - -public class RowChangeEventHandler implements EventHandler { - private Logger logger = LoggerFactory.getLogger(RowChangeEventHandler.class); - - private AsyncClientInterface ots; - private WriteRPCBuffer buffer; - private int concurrency; - private Semaphore semaphore; - private TableStoreCallback callback; - private Executor executor; - private DefaultWriterStatistics writerStatistics; - - public RowChangeEventHandler( - AsyncClientInterface ots, WriterConfig writerConfig, - TableStoreCallback callback, - Executor executor, - DefaultWriterStatistics writerStatistics) { - this.ots = ots; - this.buffer = new WriteRPCBuffer(writerConfig); - this.concurrency = writerConfig.getConcurrency(); - this.semaphore = new Semaphore(concurrency); - this.callback = callback; - this.executor = executor; - this.writerStatistics = writerStatistics; - } - - public void setCallback(TableStoreCallback callback) { - this.callback = callback; - } - - @Override - public void onEvent(RowChangeEvent rowChangeEvent, long sequence, boolean endOfBatch) throws Exception { - BatchWriteRowRequest request = null; - - boolean shouldWaitFlush = false; - CountDownLatch latch = null; - - if (rowChangeEvent.type == RowChangeEvent.EventType.FLUSH) { - logger.debug("FlushSignal with QueueSize: {}", buffer.getTotalRowsCount()); - if (buffer.getTotalRowsCount() > 0) { - request = buffer.makeRequest(); - buffer.clear(); - } - - shouldWaitFlush = true; - latch = rowChangeEvent.latch; - } else { - writerStatistics.totalRowsCount.incrementAndGet(); - final RowChange rowChange = rowChangeEvent.rowChange; - boolean succeed = buffer.appendRowChange(rowChange); - if (!succeed) { - request = buffer.makeRequest(); - buffer.clear(); - succeed = buffer.appendRowChange(rowChange); - - if (!succeed) { - executor.execute(new Runnable() { - @Override - public void run() { - writerStatistics.totalFailedRowsCount.incrementAndGet(); - if (callback != null) { - callback.onFailed(rowChange, new ClientException("Can not even append only one row into buffer.")); - } - } - }); - } - } - } - - if (request != null) { - // send this request - semaphore.acquire(); - logger.debug("Acquire semaphore, start send async request."); - final BatchWriteRowRequest finalRequest = request; - executor.execute(new Runnable() { - @Override - public void run() { - writerStatistics.totalRequestCount.incrementAndGet(); - ots.batchWriteRow(finalRequest, new FlushCallback(ots, new AtomicInteger(1), semaphore, callback, executor, writerStatistics)); - } - }); - } - - if (shouldWaitFlush) { - waitFlush(); - latch.countDown(); - } - } - - private void waitFlush() throws InterruptedException { - logger.debug("Wait flush."); - for (int i = 0; i < concurrency; i++) { - semaphore.acquire(); - logger.debug("Wait flush: {}, {}", i, concurrency); - } - semaphore.release(concurrency); - logger.debug("Wait flush finished."); - } -} diff --git a/src/main/java/com/alicloud/openservices/tablestore/writer/RowChangeWithGroup.java b/src/main/java/com/alicloud/openservices/tablestore/writer/RowChangeWithGroup.java new file mode 100644 index 0000000..1069f01 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/writer/RowChangeWithGroup.java @@ -0,0 +1,14 @@ +package com.alicloud.openservices.tablestore.writer; + + +import com.alicloud.openservices.tablestore.model.RowChange; + +public class RowChangeWithGroup { + public final RowChange rowChange; + public final Group group; + + public RowChangeWithGroup(RowChange rowChange, Group group) { + this.rowChange = rowChange; + this.group = group; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/writer/WriteRPCBuffer.java b/src/main/java/com/alicloud/openservices/tablestore/writer/WriteRPCBuffer.java deleted file mode 100644 index 3f417fb..0000000 --- a/src/main/java/com/alicloud/openservices/tablestore/writer/WriteRPCBuffer.java +++ /dev/null @@ -1,59 +0,0 @@ -package com.alicloud.openservices.tablestore.writer; - -import com.alicloud.openservices.tablestore.model.*; - -public class WriteRPCBuffer { - public WriterConfig config; - public BatchWriteRowRequest batchWriteRowRequest; - public int totalSize; - public int totalRowsCount; - - public WriteRPCBuffer(WriterConfig config) { - this.config = config; - this.batchWriteRowRequest = new BatchWriteRowRequest(); - this.totalSize = 0; - this.totalRowsCount = 0; - } - - /** - * 向RPC缓冲中添加一个RowChange,若添加成功,返回true,否则返回false。 - * 在以下情况下会添加失败: - * 1. 如果新增这一行会导致缓冲区溢出 - * 2. 如果新增这一行会总行数会超过{@link com.alicloud.openservices.tablestore.writer.WriterConfig#maxBatchRowsCount}限制 - * - * @param rowChange 行数据 - * @return 是否添加成功 - */ - public boolean appendRowChange(RowChange rowChange) { - if (totalSize + rowChange.getDataSize() > config.getMaxBatchSize()) { - return false; - } - - if (totalRowsCount >= config.getMaxBatchRowsCount()) { - return false; - } - - addRowChange(rowChange); - this.totalSize += rowChange.getDataSize(); - this.totalRowsCount += 1; - return true; - } - - private void addRowChange(RowChange rowChange) { - batchWriteRowRequest.addRowChange(rowChange); - } - - public BatchWriteRowRequest makeRequest() { - return batchWriteRowRequest; - } - - public int getTotalRowsCount() { - return totalRowsCount; - } - - public void clear() { - batchWriteRowRequest = new BatchWriteRowRequest(); - totalSize = 0; - totalRowsCount = 0; - } -} diff --git a/src/main/java/com/alicloud/openservices/tablestore/writer/WriterConfig.java b/src/main/java/com/alicloud/openservices/tablestore/writer/WriterConfig.java index f46447c..0c1bc87 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/writer/WriterConfig.java +++ b/src/main/java/com/alicloud/openservices/tablestore/writer/WriterConfig.java @@ -1,8 +1,13 @@ package com.alicloud.openservices.tablestore.writer; import com.alicloud.openservices.tablestore.core.utils.Preconditions; +import com.alicloud.openservices.tablestore.writer.enums.BatchRequestType; +import com.alicloud.openservices.tablestore.writer.enums.DispatchMode; +import com.alicloud.openservices.tablestore.writer.enums.WriteMode; +import com.alicloud.openservices.tablestore.writer.enums.WriterRetryStrategy; public class WriterConfig { + /** * 主键列的值的最大大小,单位Byte。 */ @@ -40,14 +45,73 @@ public class WriterConfig { private int flushInterval = 10000; // milliseconds + private int logInterval = 10000; // milliseconds + /** * 是否开启SDK层的schema检查 */ private boolean enableSchemaCheck = true; - public WriterConfig() { + /** + * 多桶分发模式:默认分区键哈希后取模 + * */ + private DispatchMode dispatchMode = DispatchMode.HASH_PARTITION_KEY; - } + /** + * 写入模式:默认并发写 + * */ + private WriteMode writeMode = WriteMode.PARALLEL; + + /** + * 请求构建类型:默认BatchWriteRowRequest + * */ + private BatchRequestType batchRequestType = BatchRequestType.BATCH_WRITE_ROW; + + /** + * 分筒数,默认参数暂定3, + * 并发写:3个桶性能较好 + * 按序写:桶数与写入正相关 + * */ + private int bucketCount = 3; + + /** + * 内部构建线程池时生效(线程池内部释放) + * Callback运行线程池,计算密集型 + * 默认值:核数 + 1 + * */ + private int callbackThreadCount = Runtime.getRuntime().availableProcessors() + 1; + + /** + * 内部构建线程池时生效(线程池内部释放) + * Callback运行线程池 + * 默认值:1024 + * */ + private int callbackThreadPoolQueueSize = 1024; + + /** + * 内部Client时生效(Client内部构建与释放) + * 内部构建Client是使用的重试策略 + * 默认值:特定ErrorCode不做重试 + * */ + private WriterRetryStrategy writerRetryStrategy = WriterRetryStrategy.CERTAIN_ERROR_CODE_NOT_RETRY; + + /** + * 内部Client时生效(Client内部构建与释放) + * 内部构建Client是使用的最大连接数配置 + * 默认值:300 + * */ + private int clientMaxConnections = 300; + + /** + * 批量请求中,允许重复行,若含二级索引,忽略用户设置,禁止重复false + * true:允许(默认) + * false:禁止 + * */ + private boolean allowDuplicatedRowInBatchRequest = true; + + + + public WriterConfig() {} /** * 获取主键列的值的最大大小限制,单位Byte。 @@ -64,6 +128,7 @@ public int getMaxPKColumnSize() { * @param maxPKColumnSize 主键列的值的最大大小限制。 */ public void setMaxPKColumnSize(int maxPKColumnSize) { + Preconditions.checkArgument(maxPKColumnSize > 0, "The max PKColumnSize should be greater than 0."); this.maxPKColumnSize = maxPKColumnSize; } @@ -82,6 +147,7 @@ public int getMaxAttrColumnSize() { * @param maxAttrColumnSize 属性列的值的最大大小限制。 */ public void setMaxAttrColumnSize(int maxAttrColumnSize) { + Preconditions.checkArgument(maxAttrColumnSize > 0, "The max AttrColumnSize should be greater than 0."); this.maxAttrColumnSize = maxAttrColumnSize; } @@ -100,6 +166,7 @@ public int getMaxColumnsCount() { * @param maxColumnsCount 一行的最大列数限制。 */ public void setMaxColumnsCount(int maxColumnsCount) { + Preconditions.checkArgument(maxColumnsCount > 0, "The max ColumnsCount should be greater than 0."); this.maxColumnsCount = maxColumnsCount; } @@ -118,6 +185,7 @@ public int getMaxBatchRowsCount() { * @param maxBatchRowsCount 一次批量RPC请求导入的最大行数。 */ public void setMaxBatchRowsCount(int maxBatchRowsCount) { + Preconditions.checkArgument(maxBatchRowsCount > 0, "The max BatchRowsCount should be greater than 0."); this.maxBatchRowsCount = maxBatchRowsCount; } @@ -136,6 +204,7 @@ public int getMaxBatchSize() { * @param maxBatchSize 一次批量RPC请求导入的最大数据量。 */ public void setMaxBatchSize(int maxBatchSize) { + Preconditions.checkArgument(maxBatchSize > 0, "The max BatchSize should be greater than 0."); this.maxBatchSize = maxBatchSize; } @@ -154,6 +223,7 @@ public int getConcurrency() { * @param concurrency 一个TableStoreWriter的最大请求并发数。 */ public void setConcurrency(int concurrency){ + Preconditions.checkArgument(concurrency > 0, "The concurrency should be greater than 0."); this.concurrency = concurrency; } @@ -172,6 +242,7 @@ public int getBufferSize() { * @param bufferSize 一个TableStoreWriter在内存中缓冲队列的大小。 */ public void setBufferSize(int bufferSize) { + Preconditions.checkArgument(bufferSize > 0, "The buffer size should be greater than 0."); this.bufferSize = bufferSize; } @@ -211,4 +282,93 @@ public boolean isEnableSchemaCheck() { public void setEnableSchemaCheck(boolean enableSchemaCheck) { this.enableSchemaCheck = enableSchemaCheck; } + + public int getBucketCount() { + return bucketCount; + } + + public void setBucketCount(int bucketCount) { + Preconditions.checkArgument(bucketCount > 0, "The bulk count should be greater than 0."); + this.bucketCount = bucketCount; + } + + public DispatchMode getDispatchMode() { + return dispatchMode; + } + + public void setDispatchMode(DispatchMode dispatchMode) { + Preconditions.checkArgument(dispatchMode != null, "The dispatch mode should be null"); + this.dispatchMode = dispatchMode; + } + + public WriteMode getWriteMode() { + return writeMode; + } + + public void setWriteMode(WriteMode writeMode) { + Preconditions.checkArgument(writeMode != null, "The write mode should be null"); + this.writeMode = writeMode; + } + + public BatchRequestType getBatchRequestType() { + return batchRequestType; + } + + public void setBatchRequestType(BatchRequestType batchRequestType) { + Preconditions.checkArgument(batchRequestType != null, "The batch request type should be null"); + this.batchRequestType = batchRequestType; + } + + public int getLogInterval() { + return logInterval; + } + + public void setLogInterval(int logInterval) { + Preconditions.checkArgument(logInterval > 0, "The LogInterval should be greater than 0."); + this.logInterval = logInterval; + } + + public int getCallbackThreadCount() { + return callbackThreadCount; + } + + public void setCallbackThreadCount(int callbackThreadCount) { + Preconditions.checkArgument(callbackThreadCount > 0, "The CallbackThreadCount should be greater than 0."); + this.callbackThreadCount = callbackThreadCount; + } + + public int getCallbackThreadPoolQueueSize() { + return callbackThreadPoolQueueSize; + } + + public void setCallbackThreadPoolQueueSize(int callbackThreadPoolQueueSize) { + Preconditions.checkArgument(callbackThreadPoolQueueSize > 0, "The CallbackThreadPoolQueueSize should be greater than 0."); + this.callbackThreadPoolQueueSize = callbackThreadPoolQueueSize; + } + + public WriterRetryStrategy getWriterRetryStrategy() { + return writerRetryStrategy; + } + + public void setWriterRetryStrategy(WriterRetryStrategy writerRetryStrategy) { + Preconditions.checkArgument(writerRetryStrategy != null, "The WriterRetryStrategy should not be null."); + this.writerRetryStrategy = writerRetryStrategy; + } + + public int getClientMaxConnections() { + return clientMaxConnections; + } + + public void setClientMaxConnections(int clientMaxConnections) { + Preconditions.checkArgument(clientMaxConnections > 0, "The ClientMaxConnect should be greater than 0."); + this.clientMaxConnections = clientMaxConnections; + } + + public boolean isAllowDuplicatedRowInBatchRequest() { + return allowDuplicatedRowInBatchRequest; + } + + public void setAllowDuplicatedRowInBatchRequest(boolean allowDuplicatedRowInBatchRequest) { + this.allowDuplicatedRowInBatchRequest = allowDuplicatedRowInBatchRequest; + } } diff --git a/src/main/java/com/alicloud/openservices/tablestore/writer/WriterResult.java b/src/main/java/com/alicloud/openservices/tablestore/writer/WriterResult.java new file mode 100644 index 0000000..5e8b638 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/writer/WriterResult.java @@ -0,0 +1,83 @@ +package com.alicloud.openservices.tablestore.writer; + +import com.alicloud.openservices.tablestore.model.RowChange; + +import java.util.LinkedList; +import java.util.List; +import java.util.concurrent.atomic.AtomicReferenceArray; + +public class WriterResult { + private boolean isAllFinished = true; + private final int totalCount; + private final AtomicReferenceArray rowChangeStatusList; + + public WriterResult (int totalCount, AtomicReferenceArray rowChangeStatusList) { + this.totalCount = totalCount; + this.rowChangeStatusList = rowChangeStatusList; + } + + public List getSucceedRows() { + List succeed = new LinkedList(); + for (int i = 0; i < rowChangeStatusList.length(); i++) { + RowChangeStatus rowChangeStatus = rowChangeStatusList.get(i); + if (rowChangeStatus.isSucceed()) { + succeed.add(rowChangeStatus); + } + } + return succeed; + } + + public List getFailedRows() { + List failed = new LinkedList(); + for (int i = 0; i < rowChangeStatusList.length(); i++) { + RowChangeStatus rowChangeStatus = rowChangeStatusList.get(i); + if (!rowChangeStatus.isSucceed()) { + failed.add(rowChangeStatus); + } + } + return failed; + } + + public int getTotalCount() { + return totalCount; + } + + public boolean isAllFinished() { + return isAllFinished; + } + + public boolean isAllSucceed() { + List failed = new LinkedList(); + for (int i = 0; i < rowChangeStatusList.length(); i++) { + RowChangeStatus rowChangeStatus = rowChangeStatusList.get(i); + if (!rowChangeStatus.isSucceed()) { + failed.add(rowChangeStatus); + } + } + return failed.size() == 0; + } + + public static class RowChangeStatus { + private boolean succeed; + private Exception exception; + private RowChange rowChange; + + public RowChangeStatus(boolean succeed, RowChange rowChange, Exception exception) { + this.succeed = succeed; + this.rowChange = rowChange; + this.exception = exception; + } + + public RowChange getRowChange() { + return rowChange; + } + + public boolean isSucceed() { + return succeed; + } + + public Exception getException() { + return exception; + } + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/writer/WriterStatistics.java b/src/main/java/com/alicloud/openservices/tablestore/writer/WriterStatistics.java index e654c9c..d2f68ef 100644 --- a/src/main/java/com/alicloud/openservices/tablestore/writer/WriterStatistics.java +++ b/src/main/java/com/alicloud/openservices/tablestore/writer/WriterStatistics.java @@ -1,5 +1,6 @@ package com.alicloud.openservices.tablestore.writer; + public interface WriterStatistics { long getTotalRequestCount(); long getTotalRowsCount(); diff --git a/src/main/java/com/alicloud/openservices/tablestore/writer/config/BucketConfig.java b/src/main/java/com/alicloud/openservices/tablestore/writer/config/BucketConfig.java new file mode 100644 index 0000000..f2f5cf6 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/writer/config/BucketConfig.java @@ -0,0 +1,34 @@ +package com.alicloud.openservices.tablestore.writer.config; + +import com.alicloud.openservices.tablestore.writer.enums.WriteMode; + + +public class BucketConfig { + private int bucketId; + private String tableName; + private WriteMode writeMode; + private boolean allowDuplicateRowInBatchRequest; + + public BucketConfig(int bucketId, String tableName,WriteMode writeMode, boolean allowDuplicateRowInBatchRequest) { + this.bucketId = bucketId; + this.tableName = tableName; + this.writeMode = writeMode; + this.allowDuplicateRowInBatchRequest = allowDuplicateRowInBatchRequest; + } + + public int getBucketId() { + return bucketId; + } + + public String getTableName() { + return tableName; + } + + public WriteMode getWriteMode() { + return writeMode; + } + + public boolean isAllowDuplicateRowInBatchRequest() { + return allowDuplicateRowInBatchRequest; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/writer/dispatch/BaseDispatcher.java b/src/main/java/com/alicloud/openservices/tablestore/writer/dispatch/BaseDispatcher.java new file mode 100644 index 0000000..4b22075 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/writer/dispatch/BaseDispatcher.java @@ -0,0 +1,28 @@ +package com.alicloud.openservices.tablestore.writer.dispatch; + +import java.util.concurrent.atomic.AtomicLong; + + +public abstract class BaseDispatcher implements Dispatcher { + private final AtomicLong[] bucketDispatchRowCount; + + public BaseDispatcher(int bucketCount) { + bucketDispatchRowCount = new AtomicLong[bucketCount]; + for (int i = 0; i < bucketCount; i++) { + bucketDispatchRowCount[i] = new AtomicLong(0); + } + } + + + protected void addBucketCount(int bucketId) { + bucketDispatchRowCount[bucketId].incrementAndGet(); + } + + + /** + * 分筒写入统计 + * */ + public AtomicLong[] getBucketDispatchRowCount() { + return bucketDispatchRowCount; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/writer/dispatch/Dispatcher.java b/src/main/java/com/alicloud/openservices/tablestore/writer/dispatch/Dispatcher.java new file mode 100644 index 0000000..66831e6 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/writer/dispatch/Dispatcher.java @@ -0,0 +1,11 @@ +package com.alicloud.openservices.tablestore.writer.dispatch; + +import com.alicloud.openservices.tablestore.model.RowChange; + + +public interface Dispatcher { + /** + * 获取写入分筒编号 + * */ + int getDispatchIndex(RowChange rowChange); +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/writer/dispatch/HashPartitionKeyDispatcher.java b/src/main/java/com/alicloud/openservices/tablestore/writer/dispatch/HashPartitionKeyDispatcher.java new file mode 100644 index 0000000..e8ef035 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/writer/dispatch/HashPartitionKeyDispatcher.java @@ -0,0 +1,23 @@ +package com.alicloud.openservices.tablestore.writer.dispatch; + +import com.alicloud.openservices.tablestore.model.*; + + +public class HashPartitionKeyDispatcher extends BaseDispatcher { + private int bucketCount; + + public HashPartitionKeyDispatcher(int bucketCount) { + super(bucketCount); + this.bucketCount = bucketCount; + } + + @Override + public int getDispatchIndex(RowChange rowChange) { + int bucketIndex = rowChange.getPrimaryKey().getPrimaryKeyColumn(0).hashCode() % bucketCount; + bucketIndex = (bucketIndex + bucketCount) % bucketCount; + addBucketCount(bucketIndex); + + return bucketIndex; + } + +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/writer/dispatch/HashPrimaryKeyDispatcher.java b/src/main/java/com/alicloud/openservices/tablestore/writer/dispatch/HashPrimaryKeyDispatcher.java new file mode 100644 index 0000000..18e0d1c --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/writer/dispatch/HashPrimaryKeyDispatcher.java @@ -0,0 +1,22 @@ +package com.alicloud.openservices.tablestore.writer.dispatch; + +import com.alicloud.openservices.tablestore.model.*; + + +public class HashPrimaryKeyDispatcher extends BaseDispatcher { + private int bucketCount; + + public HashPrimaryKeyDispatcher(int bucketCount) { + super(bucketCount); + this.bucketCount = bucketCount; + } + + @Override + public int getDispatchIndex(RowChange rowChange) { + int bucketIndex = rowChange.getPrimaryKey().hashCode() % bucketCount; + bucketIndex = (bucketIndex + bucketCount) % bucketCount; + addBucketCount(bucketIndex); + + return bucketIndex; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/writer/dispatch/RoundRobinDispatcher.java b/src/main/java/com/alicloud/openservices/tablestore/writer/dispatch/RoundRobinDispatcher.java new file mode 100644 index 0000000..e2bd5dd --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/writer/dispatch/RoundRobinDispatcher.java @@ -0,0 +1,24 @@ +package com.alicloud.openservices.tablestore.writer.dispatch; + + +import com.alicloud.openservices.tablestore.model.*; + +import java.util.concurrent.atomic.AtomicLong; + + +public class RoundRobinDispatcher extends BaseDispatcher { + private AtomicLong counter = new AtomicLong(0); + private int bucketCount; + + public RoundRobinDispatcher(int bucketCount) { + super(bucketCount); + this.bucketCount = bucketCount; + } + @Override + public int getDispatchIndex(RowChange rowChange) { + int bucketIndex = (int)counter.getAndIncrement() % bucketCount; + addBucketCount(bucketIndex); + + return bucketIndex; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/writer/enums/BatchRequestType.java b/src/main/java/com/alicloud/openservices/tablestore/writer/enums/BatchRequestType.java new file mode 100644 index 0000000..a3381e0 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/writer/enums/BatchRequestType.java @@ -0,0 +1,13 @@ +package com.alicloud.openservices.tablestore.writer.enums; + + +public enum BatchRequestType { + /** + * 构建BatchWriteRowRequest + * */ + BATCH_WRITE_ROW, + /** + * 构建BulkImportRequest + * */ + BULK_IMPORT +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/writer/enums/DispatchMode.java b/src/main/java/com/alicloud/openservices/tablestore/writer/enums/DispatchMode.java new file mode 100644 index 0000000..02134d1 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/writer/enums/DispatchMode.java @@ -0,0 +1,17 @@ +package com.alicloud.openservices.tablestore.writer.enums; + + +public enum DispatchMode { + /** + * 循环遍历分筒派发 + */ + ROUND_ROBIN, + /** + * 哈希分区键分筒派发 + * */ + HASH_PARTITION_KEY, + /** + * 哈希完整主键分筒派发 + * */ + HASH_PRIMARY_KEY, +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/writer/enums/WriteMode.java b/src/main/java/com/alicloud/openservices/tablestore/writer/enums/WriteMode.java new file mode 100644 index 0000000..6cac3f5 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/writer/enums/WriteMode.java @@ -0,0 +1,15 @@ +package com.alicloud.openservices.tablestore.writer.enums; + + +public enum WriteMode { + /** + * 串行写: + * 不同筒间并发,同一个筒内串行请求 + * */ + SEQUENTIAL, + /** + * 并行写 + * 不同筒间并发,同一个筒内也会并行请求 + * */ + PARALLEL +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/writer/enums/WriterRetryStrategy.java b/src/main/java/com/alicloud/openservices/tablestore/writer/enums/WriterRetryStrategy.java new file mode 100644 index 0000000..148ac60 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/writer/enums/WriterRetryStrategy.java @@ -0,0 +1,25 @@ +package com.alicloud.openservices.tablestore.writer.enums; + + +public enum WriterRetryStrategy { + + /** + * 给定需要重试的错误码集合 + * 非给定的错误码,都不做重试 + * + * 重试列表: + * OTSInternalServerError, OTSRequestTimeout, OTSPartitionUnavailable, OTSTableNotReady, + * OTSRowOperationConflict, OTSTimeout, OTSServerUnavailable, OTSServerBusy, + */ + CERTAIN_ERROR_CODE_RETRY, + + /** + * 给定不需要重试的错误码集合 + * 非给定的错误码,都做重试 + * + * 不重试列表: + * OTSParameterInvalid, OTSConditionCheckFail, OTSRequestBodyTooLarge, + * OTSInvalidPK, OTSOutOfColumnCountLimit, OTSOutOfRowSizeLimit, + */ + CERTAIN_ERROR_CODE_NOT_RETRY, +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/writer/handle/BaseRequestManager.java b/src/main/java/com/alicloud/openservices/tablestore/writer/handle/BaseRequestManager.java new file mode 100644 index 0000000..f30e2c4 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/writer/handle/BaseRequestManager.java @@ -0,0 +1,98 @@ +package com.alicloud.openservices.tablestore.writer.handle; + +import com.alicloud.openservices.tablestore.AsyncClientInterface; +import com.alicloud.openservices.tablestore.TableStoreCallback; +import com.alicloud.openservices.tablestore.model.PrimaryKey; +import com.alicloud.openservices.tablestore.model.RowChange; +import com.alicloud.openservices.tablestore.writer.*; +import com.alicloud.openservices.tablestore.writer.config.BucketConfig; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.LinkedList; +import java.util.List; +import java.util.concurrent.ConcurrentSkipListSet; +import java.util.concurrent.Executor; +import java.util.concurrent.Semaphore; + + +/** + * 请求构建管理 + * + */ +public abstract class BaseRequestManager implements RequestManager { + private Logger logger = LoggerFactory.getLogger(BaseRequestManager.class); + + protected AsyncClientInterface ots; + protected BucketConfig bucketConfig; + protected WriterConfig writerConfig; + protected Semaphore callbackSemaphore; + protected TableStoreCallback callback; + protected Executor executor; + protected WriterHandleStatistics writerStatistics; + protected Semaphore bucketSemaphore; + + protected CallbackFactory callbackFactory; + protected List rowChangeWithGroups = new LinkedList(); + + protected int totalSize; + protected int totalRowsCount; + + protected boolean allowDuplicatedRowInBatchRequest; + protected ConcurrentSkipListSet sendingPrimarykeys = new ConcurrentSkipListSet(); + + public BaseRequestManager(AsyncClientInterface ots, WriterConfig writerConfig, BucketConfig bucketConfig, Executor executor, + WriterHandleStatistics writerStatistics, TableStoreCallback callback, + Semaphore callbackSemaphore, Semaphore bucketSemaphore) { + this.ots = ots; + this.writerConfig = writerConfig; + this.bucketConfig = bucketConfig; + this.executor = executor; + this.writerStatistics = writerStatistics; + this.callback = callback; + this.callbackSemaphore = callbackSemaphore; + this.bucketSemaphore = bucketSemaphore; + this.totalSize = 0; + this.totalRowsCount = 0; + this.allowDuplicatedRowInBatchRequest = bucketConfig.isAllowDuplicateRowInBatchRequest(); + this.callbackFactory = new FlushCallbackFactory(ots, callbackSemaphore, callback, executor, + writerStatistics, bucketConfig, bucketSemaphore); + } + + @Override + public boolean appendRowChange(RowChangeWithGroup rowChangeWithGroup) { + if (totalSize + rowChangeWithGroup.rowChange.getDataSize() > writerConfig.getMaxBatchSize()) { + return false; + } + + if (totalRowsCount >= writerConfig.getMaxBatchRowsCount()) { + return false; + } + + if (!allowDuplicatedRowInBatchRequest) { + if (sendingPrimarykeys.contains(rowChangeWithGroup.rowChange.getPrimaryKey())) { + return false; + } else { + sendingPrimarykeys.add(rowChangeWithGroup.rowChange.getPrimaryKey()); + } + } + + rowChangeWithGroups.add(rowChangeWithGroup); + this.totalSize += rowChangeWithGroup.rowChange.getDataSize(); + this.totalRowsCount += 1; + return true; + } + + @Override + public int getTotalRowsCount() { + return totalRowsCount; + } + + @Override + public void clear() { + rowChangeWithGroups.clear(); + sendingPrimarykeys.clear(); + totalSize = 0; + totalRowsCount = 0; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/writer/handle/BatchWriteRowRequestManager.java b/src/main/java/com/alicloud/openservices/tablestore/writer/handle/BatchWriteRowRequestManager.java new file mode 100644 index 0000000..0b5e40b --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/writer/handle/BatchWriteRowRequestManager.java @@ -0,0 +1,49 @@ +package com.alicloud.openservices.tablestore.writer.handle; + +import com.alicloud.openservices.tablestore.AsyncClientInterface; +import com.alicloud.openservices.tablestore.TableStoreCallback; +import com.alicloud.openservices.tablestore.model.*; +import com.alicloud.openservices.tablestore.writer.*; +import com.alicloud.openservices.tablestore.writer.config.BucketConfig; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.Executor; +import java.util.concurrent.Semaphore; + +public class BatchWriteRowRequestManager extends BaseRequestManager { + private Logger logger = LoggerFactory.getLogger(BatchWriteRowRequestManager.class); + + public BatchWriteRowRequestManager(AsyncClientInterface ots, WriterConfig writerConfig, BucketConfig bucketConfig, Executor executor, + WriterHandleStatistics writerStatistics, TableStoreCallback callback, + Semaphore callbackSemaphore, Semaphore bucketSemaphore) { + super(ots, writerConfig, bucketConfig, executor, writerStatistics, callback, callbackSemaphore, bucketSemaphore); + } + + @Override + public RequestWithGroups makeRequest() { + if (rowChangeWithGroups.size() > 0) { + BatchWriteRowRequest request = new BatchWriteRowRequest(); + List groupFutureList = new ArrayList(rowChangeWithGroups.size()); + + for (RowChangeWithGroup rowChangeWithGroup : rowChangeWithGroups) { + request.addRowChange(rowChangeWithGroup.rowChange); + groupFutureList.add(rowChangeWithGroup.group); + } + clear(); + return new RequestWithGroups(request, groupFutureList); + } + + return null; + } + + @Override + public void sendRequest(RequestWithGroups requestWithGroups) { + BatchWriteRowRequest finalRequest = (BatchWriteRowRequest) requestWithGroups.getRequest(); + List finalGroupFuture = requestWithGroups.getGroupList(); + + ots.batchWriteRow(finalRequest, callbackFactory.newInstance(finalGroupFuture)); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/writer/handle/BulkImportRequestManager.java b/src/main/java/com/alicloud/openservices/tablestore/writer/handle/BulkImportRequestManager.java new file mode 100644 index 0000000..50d99ac --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/writer/handle/BulkImportRequestManager.java @@ -0,0 +1,50 @@ +package com.alicloud.openservices.tablestore.writer.handle; + +import com.alicloud.openservices.tablestore.AsyncClientInterface; +import com.alicloud.openservices.tablestore.TableStoreCallback; +import com.alicloud.openservices.tablestore.model.*; +import com.alicloud.openservices.tablestore.writer.*; +import com.alicloud.openservices.tablestore.writer.config.BucketConfig; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.Executor; +import java.util.concurrent.Semaphore; + +public class BulkImportRequestManager extends BaseRequestManager { + private Logger logger = LoggerFactory.getLogger(BulkImportRequestManager.class); + + public BulkImportRequestManager(AsyncClientInterface ots, WriterConfig writerConfig, BucketConfig bucketConfig, Executor executor, + WriterHandleStatistics writerStatistics, TableStoreCallback callback, + Semaphore callbackSemaphore, Semaphore bucketSemaphore) { + super(ots, writerConfig, bucketConfig, executor, writerStatistics, callback, callbackSemaphore, bucketSemaphore); + } + + + @Override + public RequestWithGroups makeRequest() { + if (rowChangeWithGroups.size() > 0) { + BulkImportRequest request = new BulkImportRequest(bucketConfig.getTableName()); + List groupFutureList = new ArrayList(rowChangeWithGroups.size()); + + for (RowChangeWithGroup rowChangeWithGroup : rowChangeWithGroups) { + request.addRowChange(rowChangeWithGroup.rowChange); + groupFutureList.add(rowChangeWithGroup.group); + } + clear(); + + return new RequestWithGroups(request, groupFutureList); + } + + return null; + } + + public void sendRequest(RequestWithGroups requestWithGroups) { + BulkImportRequest finalRequest = (BulkImportRequest) requestWithGroups.getRequest(); + List finalGroupFuture = requestWithGroups.getGroupList(); + + ots.bulkImport(finalRequest, callbackFactory.newInstance(finalGroupFuture)); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/writer/handle/FlushCallback.java b/src/main/java/com/alicloud/openservices/tablestore/writer/handle/FlushCallback.java new file mode 100644 index 0000000..197d2ec --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/writer/handle/FlushCallback.java @@ -0,0 +1,342 @@ +package com.alicloud.openservices.tablestore.writer.handle; + +import com.alicloud.openservices.tablestore.AsyncClientInterface; +import com.alicloud.openservices.tablestore.TableStoreCallback; +import com.alicloud.openservices.tablestore.TableStoreException; +import com.alicloud.openservices.tablestore.model.*; +import com.alicloud.openservices.tablestore.model.Error; +import com.alicloud.openservices.tablestore.writer.Group; +import com.alicloud.openservices.tablestore.writer.RowWriteResult; +import com.alicloud.openservices.tablestore.writer.config.BucketConfig; +import com.alicloud.openservices.tablestore.writer.enums.WriteMode; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.concurrent.Executor; +import java.util.concurrent.Semaphore; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicLong; + +class FlushCallback implements TableStoreCallback { + private Logger logger = LoggerFactory.getLogger(FlushCallback.class); + + private final AsyncClientInterface ots; + private final AtomicInteger count; + private final Semaphore semaphore; + private final BucketConfig bucketConfig; + private final TableStoreCallback callback; + private final Executor executor; + private final WriterHandleStatistics writerStatistics; + private final Semaphore bucketSemaphore; + private final List groupList; + public static AtomicLong counter = new AtomicLong(0); + + public FlushCallback(AsyncClientInterface ots, AtomicInteger count, Semaphore semaphore, + TableStoreCallback callback, + Executor executor, WriterHandleStatistics writerStatistics, + BucketConfig bucketConfig, Semaphore bucketSemaphore, List groupList) { + this.ots = ots; + this.count = count; + this.semaphore = semaphore; + this.bucketConfig = bucketConfig; + this.callback = callback; + this.executor = executor; + this.writerStatistics = writerStatistics; + this.bucketSemaphore = bucketSemaphore; + this.groupList = groupList; + } + + private void triggerSucceedCallback(final RowChange rowChange, final ConsumedCapacity consumedCapacity, final Row row, final Group group) { + writerStatistics.totalSucceedRowsCount.incrementAndGet(); + group.succeedOneRow(rowChange); + if (callback == null) { + return; + } + + executor.execute(new Runnable() { + @Override + public void run() { + callback.onCompleted(rowChange, new RowWriteResult(consumedCapacity, row)); + } + }); + } + + private void triggerFailedCallback(final RowChange rowChange, final Exception exp, final Group group) { + writerStatistics.totalFailedRowsCount.incrementAndGet(); + group.failedOneRow(rowChange, exp); + logger.error("RowChange Failed: ", exp); + if (callback == null) { + return; + } + + executor.execute(new Runnable() { + @Override + public void run() { + callback.onFailed(rowChange, exp); + } + }); + } + + private void triggerFailedCallback(final List rowChanges, final Exception exp, final List groupList) { + writerStatistics.totalFailedRowsCount.addAndGet(rowChanges.size()); + for (int i = 0; i < rowChanges.size(); i++) { + RowChange rowChange = rowChanges.get(i); + Group group = groupList.get(i); + group.failedOneRow(rowChange, exp); + logger.error("RowChange Failed: ", exp); + } + if (callback == null) { + return; + } + + executor.execute(new Runnable() { + @Override + public void run() { + for (RowChange rowChange : rowChanges) { + callback.onFailed(rowChange, exp); + } + } + }); + } + + /** + * 当请求结束后,需要主动释放信号量。
+ * 但是注意:这里不是每个请求完成都能去释放信号量。
+ * 例如一次BatchWriteRow请求申请了一个信号量,但是由于其包含脏数据,所以需要对每一行数据单独发送一次请求来重试,此时一个并发会分裂为 + * N个并发,这N个并发请求会有自己独立的callback。而其申请的那一个信号量需要由这N个并发中的其中一个来释放,如何选择哪个来释放? + * 这里采取的策略是用一个原子计数器,哪个请求最后一个完成,则由其来释放这个信号量。 + */ + private void requestComplete() { + int remain = this.count.decrementAndGet(); + if (remain == 0) { + logger.debug("BucketSemaphore Release: " + counter.incrementAndGet()); + semaphore.release(); + bucketSemaphore.release(); + logger.debug("Release semaphore."); + } + } + + public void onCompleted(BatchWriteRowRequest originRequest, BatchWriteRowResponse result) { + List succeed = new ArrayList(); + List failed = new ArrayList(); + + result.getResult(succeed, failed); + + for (BatchWriteRowResponse.RowResult status : succeed) { + Group group = groupList.get(status.getIndex()); + triggerSucceedCallback(originRequest.getRowChange(status.getTableName(), status.getIndex()), status.getConsumedCapacity(), + status.getRow(), group); + } + + for (BatchWriteRowResponse.RowResult status : failed) { + Error error = status.getError(); + Group group = groupList.get(status.getIndex()); + triggerFailedCallback(originRequest.getRowChange(status.getTableName(), status.getIndex()), + new TableStoreException(error.getMessage(), null, error.getCode(), result.getRequestId(), 0), + group); + } + } + + public void onCompleted(BulkImportRequest originRequest, BulkImportResponse result) { + List succeed = new ArrayList(); + List failed = new ArrayList(); + + result.getResult(succeed, failed); + + for (BulkImportResponse.RowResult status : succeed) { + Group group = groupList.get(status.getIndex()); + triggerSucceedCallback(originRequest.getRowChange(status.getIndex()), status.getConsumedCapacity(), + null, group); + } + + for (BulkImportResponse.RowResult status : failed) { + Error error = status.getError(); + Group group = groupList.get(status.getIndex()); + triggerFailedCallback(originRequest.getRowChange(status.getIndex()), + new TableStoreException(error.getMessage(), null, error.getCode(), result.getRequestId(), 0), + group); + } + } + + @Override + public void onCompleted(Req request, Res response) { + logger.debug("OnComplete: {}", request.getClass().getName()); + if (request instanceof BatchWriteRowRequest) { + onCompleted((BatchWriteRowRequest) request, (BatchWriteRowResponse) response); + } else if (request instanceof BulkImportRequest) { + onCompleted((BulkImportRequest) request, (BulkImportResponse) response); + } else if (request instanceof PutRowRequest) { + PutRowRequest pr = (PutRowRequest) request; + triggerSucceedCallback(pr.getRowChange(), ((PutRowResponse) response).getConsumedCapacity(), ((PutRowResponse) response).getRow(), groupList.get(0)); + } else if (request instanceof UpdateRowRequest) { + UpdateRowRequest ur = (UpdateRowRequest) request; + triggerSucceedCallback(ur.getRowChange(), ((UpdateRowResponse) response).getConsumedCapacity(), ((UpdateRowResponse) response).getRow(), groupList.get(0)); + } else if (request instanceof DeleteRowRequest) { + DeleteRowRequest dr = (DeleteRowRequest) request; + triggerSucceedCallback(dr.getRowChange(), ((DeleteRowResponse) response).getConsumedCapacity(), ((DeleteRowResponse) response).getRow(), groupList.get(0)); + } + + requestComplete(); + + } + + @Override + public void onFailed(Req request, Exception ex) { + + if (ex instanceof TableStoreException) { + failedOnException(request, (TableStoreException) ex); + } else { + failedOnUnknownException(request, ex); + } + + requestComplete(); + + } + + public void failedOnException(Req request, TableStoreException ex) { + logger.debug("OnFailed on TableStoreException: {}, {}", request.getClass().getName(), ex); + if (request instanceof BatchWriteRowRequest) { + retryBatchWrite((BatchWriteRowRequest) request); + } else if (request instanceof BulkImportRequest) { + retryBulkImport((BulkImportRequest) request); + } else if (request instanceof PutRowRequest) { + PutRowRequest pr = (PutRowRequest) request; + triggerFailedCallback(pr.getRowChange(), ex, groupList.get(0)); + } else if (request instanceof UpdateRowRequest) { + UpdateRowRequest ur = (UpdateRowRequest) request; + triggerFailedCallback(ur.getRowChange(), ex, groupList.get(0)); + } else if (request instanceof DeleteRowRequest) { + DeleteRowRequest dr = (DeleteRowRequest) request; + triggerFailedCallback(dr.getRowChange(), ex, groupList.get(0)); + } + + } + + public void failedOnUnknownException(Req request, Exception ex) { + logger.debug("OnFailed on ClientException: {}, {}", request.getClass().getName(), ex); + List failedRows = new ArrayList(); + if (request instanceof BatchWriteRowRequest) { + BatchWriteRowRequest bwr = (BatchWriteRowRequest) request; + for (Map.Entry> entry : bwr.getRowChange().entrySet()) { + failedRows.addAll(entry.getValue()); + } + } else if (request instanceof BulkImportRequest) { + BulkImportRequest bir = (BulkImportRequest) request; + failedRows.addAll(bir.getRowChange()); + } else if (request instanceof PutRowRequest) { + PutRowRequest pr = (PutRowRequest) request; + failedRows.add(pr.getRowChange()); + } else if (request instanceof UpdateRowRequest) { + UpdateRowRequest ur = (UpdateRowRequest) request; + failedRows.add(ur.getRowChange()); + } else if (request instanceof DeleteRowRequest) { + DeleteRowRequest dr = (DeleteRowRequest) request; + failedRows.add(dr.getRowChange()); + } + + triggerFailedCallback(failedRows, ex, groupList); + } + + /** + * 在一般情况下,BatchWriteRow是不会发生整体异常的,若发生,则代表其中包含有脏数据,例如有一行的属性列的大小超过大小限制等。 + * 在这种情况下,我们不希望因为这一行脏数据,导致其他的行导入失败。但是由于我们无法找出这是哪一行,所以采取的做法是将这一次Batch内 + * 包含的所有行通过PutRow等单行写操作写过去。 + * 由于我们在writer外层是有一层参数检查了,所以这种情况是极少发生的。 + * + * @param request + */ + private void retryBatchWrite(BatchWriteRowRequest request) { + for (Map.Entry> entry : request.getRowChange().entrySet()) { + for (int i = 0; i < entry.getValue().size(); i++) { + Group group = groupList.get(i); + retrySingleRowChange(entry.getValue().get(i), group); + } + } + } + + /** + * 类似BatchWriteRow,BulkImport是不会发生整体异常的,若发生,则代表其中包含有脏数据,例如有一行的属性列的大小超过大小限制等。 + * 在这种情况下,我们不希望因为这一行脏数据,导致其他的行导入失败。但是由于我们无法找出这是哪一行,所以采取的做法是将这一次Batch内 + * 包含的所有行通过PutRow等单行写操作写过去。 + * 由于我们在writer外层是有一层参数检查了,所以这种情况是极少发生的。 + * + * @param request + */ + private void retryBulkImport(BulkImportRequest request) { + for (int i = 0; i < request.getRowChange().size(); i++) { + Group group = groupList.get(i); + retrySingleRowChange(request.getRowChange(i), group); + } + } + + private void retrySingleRowChange(RowChange rowChange, Group group) { + writerStatistics.totalSingleRowRequestCount.incrementAndGet(); + writerStatistics.totalRequestCount.incrementAndGet(); + + if (WriteMode.SEQUENTIAL.equals(bucketConfig.getWriteMode())) { + retrySequentialWriteSingleRowChange(rowChange, group); + } else { + retryParallelWriteSingleRowChange(rowChange, group); + } + } + + private void retryParallelWriteSingleRowChange(RowChange rowChange, Group group) { + final List subGroupList = new ArrayList(1); + subGroupList.add(group); + + this.count.incrementAndGet(); + if (rowChange instanceof RowPutChange) { + RowPutChange rowPutChange = (RowPutChange) rowChange; + PutRowRequest pr = new PutRowRequest(); + pr.setRowChange(rowPutChange); + ots.putRow(pr, new FlushCallback(ots, count, semaphore, callback, executor, writerStatistics, bucketConfig, bucketSemaphore, subGroupList)); + } else if (rowChange instanceof RowUpdateChange) { + UpdateRowRequest ur = new UpdateRowRequest(); + RowUpdateChange rowUpdateChange = (RowUpdateChange) rowChange; + ur.setRowChange(rowUpdateChange); + ots.updateRow(ur, new FlushCallback(ots, count, semaphore, callback, executor, writerStatistics, bucketConfig, bucketSemaphore, subGroupList)); + } else if (rowChange instanceof RowDeleteChange) { + DeleteRowRequest dr = new DeleteRowRequest(); + RowDeleteChange rowDeleteChange = (RowDeleteChange) rowChange; + dr.setRowChange(rowDeleteChange); + ots.deleteRow(dr, new FlushCallback(ots, count, semaphore, callback, executor, writerStatistics, bucketConfig, bucketSemaphore, subGroupList)); + } + } + + private void retrySequentialWriteSingleRowChange(RowChange rowChange, Group group) { + if (rowChange instanceof RowPutChange) { + RowPutChange rowPutChange = (RowPutChange) rowChange; + PutRowRequest pr = new PutRowRequest(); + pr.setRowChange(rowPutChange); + try { + PutRowResponse response = ots.asSyncClient().putRow(pr); + triggerSucceedCallback(rowPutChange, response.getConsumedCapacity(), response.getRow(), group); + } catch (Exception e) { + triggerFailedCallback(rowPutChange, e, group); + } + } else if (rowChange instanceof RowUpdateChange) { + UpdateRowRequest ur = new UpdateRowRequest(); + RowUpdateChange rowUpdateChange = (RowUpdateChange) rowChange; + ur.setRowChange(rowUpdateChange); + try { + UpdateRowResponse response = ots.asSyncClient().updateRow(ur); + triggerSucceedCallback(rowUpdateChange, response.getConsumedCapacity(), response.getRow(), group); + } catch (Exception e) { + triggerFailedCallback(rowUpdateChange, e, group); + } + } else if (rowChange instanceof RowDeleteChange) { + DeleteRowRequest dr = new DeleteRowRequest(); + RowDeleteChange rowDeleteChange = (RowDeleteChange) rowChange; + dr.setRowChange(rowDeleteChange); + try { + DeleteRowResponse response = ots.asSyncClient().deleteRow(dr); + triggerSucceedCallback(rowDeleteChange, response.getConsumedCapacity(), response.getRow(), group); + } catch (Exception e) { + triggerFailedCallback(rowDeleteChange, e, group); + } + } + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/writer/handle/FlushCallbackFactory.java b/src/main/java/com/alicloud/openservices/tablestore/writer/handle/FlushCallbackFactory.java new file mode 100644 index 0000000..e53f630 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/writer/handle/FlushCallbackFactory.java @@ -0,0 +1,49 @@ +package com.alicloud.openservices.tablestore.writer.handle; + +import com.alicloud.openservices.tablestore.AsyncClientInterface; +import com.alicloud.openservices.tablestore.TableStoreCallback; +import com.alicloud.openservices.tablestore.model.DeleteRowRequest; +import com.alicloud.openservices.tablestore.model.DeleteRowResponse; +import com.alicloud.openservices.tablestore.model.RowChange; +import com.alicloud.openservices.tablestore.writer.CallbackFactory; +import com.alicloud.openservices.tablestore.writer.Group; +import com.alicloud.openservices.tablestore.writer.RowWriteResult; +import com.alicloud.openservices.tablestore.writer.WriterConfig; +import com.alicloud.openservices.tablestore.writer.config.BucketConfig; + +import java.util.List; +import java.util.concurrent.Executor; +import java.util.concurrent.Semaphore; +import java.util.concurrent.atomic.AtomicInteger; + + +public class FlushCallbackFactory implements CallbackFactory { + protected AsyncClientInterface ots; + protected BucketConfig bucketConfig; + protected WriterConfig writerConfig; + protected Semaphore callbackSemaphore; + protected TableStoreCallback callback; + protected Executor executor; + protected WriterHandleStatistics writerStatistics; + protected Semaphore bucketSemaphore; + + public FlushCallbackFactory(AsyncClientInterface ots, Semaphore callbackSemaphore, + TableStoreCallback callback, + Executor executor, WriterHandleStatistics writerStatistics, + BucketConfig bucketConfig, Semaphore bucketSemaphore) { + this.ots = ots; + this.callbackSemaphore = callbackSemaphore; + this.bucketConfig = bucketConfig; + this.callback = callback; + this.executor = executor; + this.writerStatistics = writerStatistics; + this.bucketSemaphore = bucketSemaphore; + } + + @Override + public TableStoreCallback newInstance(List groupList) { + return new FlushCallback( + ots, new AtomicInteger(1), callbackSemaphore, callback, executor, + writerStatistics, bucketConfig, bucketSemaphore, groupList); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/writer/handle/RowEventHandler.java b/src/main/java/com/alicloud/openservices/tablestore/writer/handle/RowEventHandler.java new file mode 100644 index 0000000..5054aaf --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/writer/handle/RowEventHandler.java @@ -0,0 +1,150 @@ +package com.alicloud.openservices.tablestore.writer.handle; + +import com.alicloud.openservices.tablestore.AsyncClientInterface; +import com.alicloud.openservices.tablestore.ClientException; +import com.alicloud.openservices.tablestore.TableStoreCallback; +import com.alicloud.openservices.tablestore.model.*; +import com.alicloud.openservices.tablestore.writer.*; +import com.alicloud.openservices.tablestore.writer.config.BucketConfig; +import com.lmax.disruptor.EventHandler; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.Executor; +import java.util.concurrent.Semaphore; + + + +public class RowEventHandler implements EventHandler { + private Logger logger = LoggerFactory.getLogger(RowEventHandler.class); + + private AsyncClientInterface ots; + private int concurrency; + private int bucketConcurrency; + private WriterConfig writerConfig; + private BucketConfig bucketConfig; + private TableStoreCallback callback; + private Executor executor; + private WriterHandleStatistics writerStatistics; + private Semaphore callbackSemaphore; + private Semaphore bucketSemaphore; + + private RequestManager requestManager; + + + public RowEventHandler( + AsyncClientInterface ots, + BucketConfig bucketConfig, + WriterConfig writerConfig, + TableStoreCallback callback, + Executor executor, + WriterHandleStatistics writerStatistics, + Semaphore semaphore) { + this.ots = ots; + this.concurrency = writerConfig.getConcurrency(); + this.bucketConfig = bucketConfig; + this.callbackSemaphore = semaphore; + this.callback = callback; + this.executor = executor; + this.writerStatistics = writerStatistics; + this.writerConfig = writerConfig; + + + switch (writerConfig.getWriteMode()) { + case SEQUENTIAL: + bucketConcurrency = 1; + break; + case PARALLEL: + default: + bucketConcurrency = concurrency; + break; + } + bucketSemaphore = new Semaphore(bucketConcurrency); + + initRequestManager(); + } + + private void initRequestManager() { + switch (writerConfig.getBatchRequestType()) { + case BULK_IMPORT: + requestManager = new BulkImportRequestManager(this.ots, writerConfig, this.bucketConfig, executor, + writerStatistics, callback, callbackSemaphore, bucketSemaphore); + break; + case BATCH_WRITE_ROW: + default: + requestManager = new BatchWriteRowRequestManager(this.ots, writerConfig, this.bucketConfig, executor, + writerStatistics, callback, callbackSemaphore, bucketSemaphore); + break; + } + } + + public void setCallback(TableStoreCallback callback) { + this.callback = callback; + initRequestManager(); + } + + @Override + public void onEvent(final RowChangeEvent rowChangeEvent, long sequence, boolean endOfBatch) throws Exception { + + boolean shouldWaitFlush = false; + CountDownLatch latch = null; + RequestWithGroups requestWithGroups = null; + + if (rowChangeEvent.type == RowChangeEvent.EventType.FLUSH) { + logger.debug("FlushSignal with QueueSize: {}", requestManager.getTotalRowsCount()); + if (requestManager.getTotalRowsCount() > 0) { + requestWithGroups = requestManager.makeRequest(); + } + + shouldWaitFlush = true; + latch = rowChangeEvent.latch; + } else { + writerStatistics.totalRowsCount.incrementAndGet(); + final RowChange rowChange = rowChangeEvent.rowChange; + final RowChangeWithGroup rowChangeWithGroup = new RowChangeWithGroup(rowChangeEvent.rowChange, rowChangeEvent.group); + + boolean succeed = requestManager.appendRowChange(rowChangeWithGroup); + if (!succeed) { + requestWithGroups = requestManager.makeRequest(); + succeed = requestManager.appendRowChange(rowChangeWithGroup); + + if (!succeed) { + executor.execute(new Runnable() { + @Override + public void run() { + writerStatistics.totalFailedRowsCount.incrementAndGet(); + ClientException exception = new ClientException("Can not even append only one row into buffer."); + logger.error("RowChange Failed: ", exception); + rowChangeWithGroup.group.failedOneRow(rowChangeWithGroup.rowChange, exception); + if (callback != null) { + callback.onFailed(rowChange, exception); + } + } + }); + } + } + } + + if (requestWithGroups != null) { + final RequestWithGroups finalRequestWithGroups = requestWithGroups; + bucketSemaphore.acquire(); // 先阻塞等候筒信号量 + callbackSemaphore.acquire(); // 后阻塞等候线程池信号量 + executor.execute(new Runnable() { + @Override + public void run() { + writerStatistics.totalRequestCount.incrementAndGet(); + requestManager.sendRequest(finalRequestWithGroups); + } + }); + } + + if (shouldWaitFlush) { + bucketSemaphore.acquire(bucketConcurrency); + bucketSemaphore.release(bucketConcurrency); + logger.debug("Finish bucket waitFlush."); + latch.countDown(); + } + } + +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/writer/handle/WriterHandleStatistics.java b/src/main/java/com/alicloud/openservices/tablestore/writer/handle/WriterHandleStatistics.java new file mode 100644 index 0000000..7ac4308 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/writer/handle/WriterHandleStatistics.java @@ -0,0 +1,55 @@ +package com.alicloud.openservices.tablestore.writer.handle; + +import com.alicloud.openservices.tablestore.writer.WriterStatistics; + +import java.util.concurrent.atomic.AtomicLong; + +public class WriterHandleStatistics implements WriterStatistics { + AtomicLong totalRequestCount = new AtomicLong(0); + AtomicLong totalRowsCount = new AtomicLong(0); + AtomicLong totalSucceedRowsCount = new AtomicLong(0); + AtomicLong totalFailedRowsCount = new AtomicLong(0); + AtomicLong totalSingleRowRequestCount = new AtomicLong(0); + + public WriterHandleStatistics() { + + } + + @Override + public long getTotalRequestCount() { + return totalRequestCount.longValue(); + } + + @Override + public long getTotalRowsCount() { + return totalRowsCount.longValue(); + } + + @Override + public long getTotalSucceedRowsCount() { + return totalSucceedRowsCount.longValue(); + } + + @Override + public long getTotalFailedRowsCount() { + return totalFailedRowsCount.longValue(); + } + + @Override + public long getTotalSingleRowRequestCount() { + return totalSingleRowRequestCount.longValue(); + } + + public String toString() { + StringBuilder builder = new StringBuilder(); + builder.append("WriterStatistics: {\n") + .append(" totalRequestCount=").append(totalRequestCount.get()).append(",\n") + .append(" totalRowsCount=").append(totalRowsCount.get()).append(",\n") + .append(" totalSucceedRowsCount=").append(totalSucceedRowsCount.get()).append(",\n") + .append(" totalFailedRowsCount=").append(totalFailedRowsCount.get()).append(",\n") + .append(" totalSingleRowRequestCount=").append(totalSingleRowRequestCount.get()).append(",\n") + .append("}"); + + return builder.toString(); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/writer/retry/BaseWriterRetryStrategy.java b/src/main/java/com/alicloud/openservices/tablestore/writer/retry/BaseWriterRetryStrategy.java new file mode 100644 index 0000000..db19f94 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/writer/retry/BaseWriterRetryStrategy.java @@ -0,0 +1,102 @@ +package com.alicloud.openservices.tablestore.writer.retry; + + +import com.alicloud.openservices.tablestore.ClientException; +import com.alicloud.openservices.tablestore.PartialResultFailedException; +import com.alicloud.openservices.tablestore.TableStoreException; +import com.alicloud.openservices.tablestore.model.RetryStrategy; + +import java.util.Random; +import java.util.concurrent.TimeUnit; + +public abstract class BaseWriterRetryStrategy implements RetryStrategy { + private final int MAX_BASE = 320; // in msec + private Random rnd = new Random(); + private int retries = 0; + protected long timeout = 0; // in msec + private int base = 10; // in msec + private long deadline = 0; + + public BaseWriterRetryStrategy(long timeout, TimeUnit unit) { + this.timeout = unit.toMillis(timeout); + this.deadline = System.currentTimeMillis() + this.timeout; + } + + @Override + public abstract RetryStrategy clone(); + + @Override + public int getRetries() { + return retries; + } + + /** + * 不做重试的误码集合: + * OTSParameterInvalid, OTSConditionCheckFail, OTSRequestBodyTooLarge, + * OTSInvalidPK, OTSOutOfColumnCountLimit, OTSOutOfRowSizeLimit, + **/ + abstract boolean retryNotMatterActions(String errorCode); + + private boolean shouldRetryWithOTSException(String errorCode, int httpStatus) { + boolean serverError = httpStatus >= 500 && httpStatus <= 599; + + return retryNotMatterActions(errorCode) || serverError; + }; + + /** + * Writer特殊使用的重试策略,规则为: + * 1. 若异常为TableStoreException,且为可重试时,可以重试。 + * 2. 若异常为ClientException(网络类异常),则可以重试。 + * 3. 若http状态码为500, 502或503,则可以重试。 + * 4. 若操作为Batch操作,只有所有失败的行可重试时,批量操作才可以重试 + * + * @param ex 上次访问失败的错误信息、为ClientException或OTSException + * @return + */ + protected boolean shouldRetry( Exception ex) { + if (ex instanceof TableStoreException) { + if (ex instanceof PartialResultFailedException) { + PartialResultFailedException prfe = (PartialResultFailedException)ex; + for (TableStoreException otsException : prfe.getErrors()) { + if (!shouldRetryWithOTSException(otsException.getErrorCode(), prfe.getHttpStatus())) { + return false; + } + } + return true; + } else { + TableStoreException otsException = (TableStoreException)ex; + return shouldRetryWithOTSException(otsException.getErrorCode(), otsException.getHttpStatus()); + } + } else if (ex instanceof ClientException) { + return true; + } else { + return false; + } + } + + @Override + public long nextPause(String action, Exception ex) { + if (!shouldRetry(ex)) { + return 0; + } + + if (base <= 0) { + return 0; + } + + long now = System.currentTimeMillis(); + int expire = (int)(deadline - now); + if (expire <= 0) { + return 0; + } + + // randomly exponential backoff, in order to make requests sparse. + long delay = 1 + rnd.nextInt(base < expire ? base : expire); + ++retries; + base *= 2; + if (base > MAX_BASE) { + base = MAX_BASE; + } + return delay; + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/writer/retry/CertainCodeNotRetryStrategy.java b/src/main/java/com/alicloud/openservices/tablestore/writer/retry/CertainCodeNotRetryStrategy.java new file mode 100644 index 0000000..4df4194 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/writer/retry/CertainCodeNotRetryStrategy.java @@ -0,0 +1,53 @@ +package com.alicloud.openservices.tablestore.writer.retry; + +import com.alicloud.openservices.tablestore.core.ErrorCode; +import com.alicloud.openservices.tablestore.model.RetryStrategy; + +import java.util.concurrent.TimeUnit; + +/** + * writer supported operation: + * BatchWriteRow, BulkImportRow, PutRow, UpdateRow, DeleteRow + * + */ +public class CertainCodeNotRetryStrategy extends BaseWriterRetryStrategy { + + public CertainCodeNotRetryStrategy() { + super(10, TimeUnit.SECONDS); + } + + public CertainCodeNotRetryStrategy(long timeout, TimeUnit unit) { + super(timeout, unit); + } + + @Override + public RetryStrategy clone() { + return new CertainCodeNotRetryStrategy(super.timeout, TimeUnit.MILLISECONDS); + } + + /** + * 不做重试的误码集合:其他默认重试 + * OTSParameterInvalid, OTSConditionCheckFail, OTSRequestBodyTooLarge, + * OTSInvalidPK, OTSOutOfColumnCountLimit, OTSOutOfRowSizeLimit, + **/ + protected boolean retryNotMatterActions(String errorCode) { + if (ErrorCode.INVALID_PARAMETER.equals(errorCode) || ErrorCode.CONDITION_CHECK_FAIL.equals(errorCode) + || ErrorCode.REQUEST_TOO_LARGE.equals(errorCode) || ErrorCode.INVALID_PK.equals(errorCode) + || ErrorCode.OUT_OF_COLUMN_COUNT_LIMIT.equals(errorCode) || ErrorCode.OUT_OF_ROW_SIZE_LIMIT.equals(errorCode) + ) { + return false; + } else { + return true; + } + } + + @Override + public boolean shouldRetry( Exception ex) { + return super.shouldRetry(ex); + } + + @Override + public long nextPause(String action, Exception ex) { + return super.nextPause(action, ex); + } +} diff --git a/src/main/java/com/alicloud/openservices/tablestore/writer/retry/CertainCodeRetryStrategy.java b/src/main/java/com/alicloud/openservices/tablestore/writer/retry/CertainCodeRetryStrategy.java new file mode 100644 index 0000000..0229a47 --- /dev/null +++ b/src/main/java/com/alicloud/openservices/tablestore/writer/retry/CertainCodeRetryStrategy.java @@ -0,0 +1,52 @@ +package com.alicloud.openservices.tablestore.writer.retry; + +import com.alicloud.openservices.tablestore.core.ErrorCode; +import com.alicloud.openservices.tablestore.model.RetryStrategy; + +import java.util.concurrent.TimeUnit; + +/** + * writer supported operation: + * BatchWriteRow, BulkImportRow, PutRow, UpdateRow, DeleteRow + */ +public class CertainCodeRetryStrategy extends BaseWriterRetryStrategy { + + public CertainCodeRetryStrategy() { + super(10, TimeUnit.SECONDS); + } + + public CertainCodeRetryStrategy(long timeout, TimeUnit unit) { + super(timeout, unit); + } + + @Override + public RetryStrategy clone() { + return new CertainCodeRetryStrategy(this.timeout, TimeUnit.MILLISECONDS); + } + + /** + * 可以重试的误码集合:其他默认不重试 + * OTSInternalServerError, OTSRequestTimeout, OTSPartitionUnavailable, OTSTableNotReady, + * OTSRowOperationConflict, OTSTimeout, OTSServerUnavailable, OTSServerBusy,则重试 + **/ + protected boolean retryNotMatterActions(String errorCode) { + if (ErrorCode.INTERNAL_SERVER_ERROR.equals(errorCode) || ErrorCode.REQUEST_TIMEOUT.equals(errorCode) + || ErrorCode.PARTITION_UNAVAILABLE.equals(errorCode) || ErrorCode.TABLE_NOT_READY.equals(errorCode) + || ErrorCode.ROW_OPERATION_CONFLICT.equals(errorCode) || ErrorCode.STORAGE_TIMEOUT.equals(errorCode) + || ErrorCode.SERVER_UNAVAILABLE.equals(errorCode) || ErrorCode.SERVER_BUSY.equals(errorCode)) { + return true; + } else { + return false; + } + } + + @Override + public boolean shouldRetry( Exception ex) { + return super.shouldRetry(ex); + } + + @Override + public long nextPause(String action, Exception ex) { + return super.nextPause(action, ex); + } +} diff --git a/src/test/java/com/alicloud/openservices/tablestore/common/ServiceSettings.java b/src/test/java/com/alicloud/openservices/tablestore/common/ServiceSettings.java index 13884e5..1653912 100644 --- a/src/test/java/com/alicloud/openservices/tablestore/common/ServiceSettings.java +++ b/src/test/java/com/alicloud/openservices/tablestore/common/ServiceSettings.java @@ -3,15 +3,13 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.InputStream; +import java.io.*; import java.util.Properties; public class ServiceSettings { private static final String SETTINGS_FILE_NAME = "src/test/resources/conf.properties"; + private static final String LOCAL_SETTINGS_FILE_NAME = "src/test/resources/local_conf.properties"; private static final Log log = LogFactory.getLog(ServiceSettings.class); @@ -69,6 +67,18 @@ public void setOTSInstanceName(String otsInstanceName) { properties.setProperty("ots.instancename", otsInstanceName); } + public void setOTSInstanceNameInternal(String otsInstanceName) { + properties.setProperty("ots.instancenameinternal", otsInstanceName); + } + + public String getOTSInstanceNameInternal() { + String instanceName = properties.getProperty("ots.instancenameinternal"); + if (instanceName.isEmpty()) { + instanceName = System.getenv("instancenameinternal"); + } + return instanceName; + } + public String getProxyHost() { return properties.getProperty("proxy.host"); } @@ -103,21 +113,21 @@ public void setProxyPort(int proxyPort) { *

* @return */ - public static ServiceSettings load() { + public static ServiceSettings load(String settingFile) { ServiceSettings ss = new ServiceSettings(); InputStream is = null; try { - is = new FileInputStream(SETTINGS_FILE_NAME); + is = new FileInputStream(settingFile); Properties pr = new Properties(); pr.load(is); ss.properties = pr; } catch (FileNotFoundException e) { - log.warn("The settings file '" + SETTINGS_FILE_NAME + "' does not exist."); + log.warn("The settings file '" + settingFile + "' does not exist."); } catch (IOException e) { - log.warn("Failed to load the settings from the file: " + SETTINGS_FILE_NAME); + log.warn("Failed to load the settings from the file: " + settingFile); } finally { if (is != null) { try { @@ -128,5 +138,13 @@ public static ServiceSettings load() { return ss; } + + public static ServiceSettings load() { + if (new File(LOCAL_SETTINGS_FILE_NAME).isFile()) { + return load(LOCAL_SETTINGS_FILE_NAME); + } else { + return load(SETTINGS_FILE_NAME); + } + } } diff --git a/src/test/java/com/alicloud/openservices/tablestore/common/Utils.java b/src/test/java/com/alicloud/openservices/tablestore/common/Utils.java index 81155a2..96e2e72 100644 --- a/src/test/java/com/alicloud/openservices/tablestore/common/Utils.java +++ b/src/test/java/com/alicloud/openservices/tablestore/common/Utils.java @@ -68,7 +68,7 @@ public static void deleteTableIfExist(SyncClientInterface ots, String tableName) try { OTSHelper.deleteTable(ots, tableName); } catch (TableStoreException e) { - if (e.getErrorCode() != ErrorCode.OBJECT_NOT_EXIST) { + if (!e.getErrorCode().equals(ErrorCode.OBJECT_NOT_EXIST)) { throw e; } } diff --git a/src/test/java/com/alicloud/openservices/tablestore/core/ResourceManagerTest.java b/src/test/java/com/alicloud/openservices/tablestore/core/ResourceManagerTest.java new file mode 100644 index 0000000..d2aba91 --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/core/ResourceManagerTest.java @@ -0,0 +1,99 @@ +package com.alicloud.openservices.tablestore.core; + +import com.alicloud.openservices.tablestore.ClientConfiguration; +import com.alicloud.openservices.tablestore.SyncClient; +import com.alicloud.openservices.tablestore.common.ServiceSettings; +import com.alicloud.openservices.tablestore.core.auth.DefaultCredentialProvider; +import com.alicloud.openservices.tablestore.core.protocol.PlainBufferCodedInputStream; +import org.junit.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.Random; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +public class ResourceManagerTest { + + private static Logger logger = LoggerFactory.getLogger(ResourceManagerTest.class); + + @Test + public void testCreateClientWithRM() throws Exception { + ServiceSettings settings = ServiceSettings.load(); + logger.debug("trigger to create logger thread"); + + int initThreadCount = Thread.getAllStackTraces().size(); + + ClientConfiguration clientConfiguration = new ClientConfiguration(); + Random random = new Random(); + int ioThread = random.nextInt(5) + 1; + int retryThread = random.nextInt(3) + 1; + int callbackThread = random.nextInt(3) + 1; + clientConfiguration.setIoThreadCount(ioThread); + clientConfiguration.setRetryThreadCount(retryThread); + ExecutorService executorService = Executors.newFixedThreadPool(callbackThread); + ResourceManager resourceManager = new ResourceManager(clientConfiguration, executorService); + + SyncClient syncClient = new SyncClient(settings.getOTSEndpoint(), + new DefaultCredentialProvider(settings.getOTSAccessKeyId(), settings.getOTSAccessKeySecret()), + settings.getOTSInstanceName(), + clientConfiguration, resourceManager.sharedResourceManager()); + for (int i = 0; i < callbackThread; i++) { + syncClient.listTable(); + } + + int threadCount = Thread.getAllStackTraces().size(); + assertEquals(ioThread + 1 + 1 + callbackThread, threadCount - initThreadCount); + + SyncClient syncClientWithoutShare1 = new SyncClient(settings.getOTSEndpoint(), + settings.getOTSAccessKeyId(), settings.getOTSAccessKeySecret(), + settings.getOTSInstanceName()); + for (int i = 0; i < callbackThread; i++) { + syncClientWithoutShare1.listTable(); + } + + int newThreadCount = Thread.getAllStackTraces().size() - threadCount; + threadCount += newThreadCount; + assertTrue(newThreadCount > 0); + + SyncClient syncClientWithoutShare2 = new SyncClient(settings.getOTSEndpoint(), + settings.getOTSAccessKeyId(), settings.getOTSAccessKeySecret(), + settings.getOTSInstanceName()); + for (int i = 0; i < callbackThread; i++) { + syncClientWithoutShare2.listTable(); + } + + assertEquals(newThreadCount, Thread.getAllStackTraces().size() - threadCount); + threadCount = Thread.getAllStackTraces().size(); + + SyncClient syncClientShareResource = new SyncClient(settings.getOTSEndpoint(), + new DefaultCredentialProvider(settings.getOTSAccessKeyId(), settings.getOTSAccessKeySecret()), + settings.getOTSInstanceName(), + clientConfiguration, resourceManager.sharedResourceManager()); + for (int i = 0; i < callbackThread; i++) { + syncClientShareResource.listTable(); + } + + assertEquals(0, Thread.getAllStackTraces().size() - threadCount); + syncClientShareResource.shutdown(); + assertEquals(0, Thread.getAllStackTraces().size() - threadCount); + + syncClientWithoutShare2.shutdown(); + assertEquals(newThreadCount, threadCount - Thread.getAllStackTraces().size()); + + threadCount -= newThreadCount; + syncClientWithoutShare1.shutdown(); + assertEquals(newThreadCount, threadCount - Thread.getAllStackTraces().size()); + + threadCount -= newThreadCount; + syncClient.shutdown(); + assertEquals(0, Thread.getAllStackTraces().size() - threadCount); + assertTrue(Thread.getAllStackTraces().size() > initThreadCount); + + resourceManager.shutdown(); + assertEquals(initThreadCount, Thread.getAllStackTraces().size()); + } +} diff --git a/src/test/java/com/alicloud/openservices/tablestore/core/auth/TestCredentials.java b/src/test/java/com/alicloud/openservices/tablestore/core/auth/TestCredentials.java index 21b06fd..ee3b248 100644 --- a/src/test/java/com/alicloud/openservices/tablestore/core/auth/TestCredentials.java +++ b/src/test/java/com/alicloud/openservices/tablestore/core/auth/TestCredentials.java @@ -76,6 +76,13 @@ public void testDefaultCredentialProvider() { assertEquals(e.getMessage(), "Access key secret should not be null or empty."); } + try { + CredentialsProviderFactory.newDefaultCredentialProvider("%", "ad9j23JDS"); + fail("expect failure"); + } catch (IllegalArgumentException e) { + assertEquals(e.getMessage(), "The access key id is invalid: %"); + } + CredentialsProvider cp = CredentialsProviderFactory.newDefaultCredentialProvider("accessid", "accesskey", "token"); assertEquals(cp.getCredentials().getAccessKeyId(), "accessid"); assertEquals(cp.getCredentials().getAccessKeySecret(), "accesskey"); @@ -85,6 +92,11 @@ public void testDefaultCredentialProvider() { assertEquals(cp.getCredentials().getSecurityToken(), null); assertEquals(cp.getCredentials().getAccessKeyId(), "accessid"); assertEquals(cp.getCredentials().getAccessKeySecret(), "accesskey"); + + cp = CredentialsProviderFactory.newDefaultCredentialProvider("STS.adjxau239x", "ad9j23JDS"); + assertEquals(cp.getCredentials().getSecurityToken(), null); + assertEquals(cp.getCredentials().getAccessKeyId(), "STS.adjxau239x"); + assertEquals(cp.getCredentials().getAccessKeySecret(), "ad9j23JDS"); } @Test diff --git a/src/test/java/com/alicloud/openservices/tablestore/core/protocol/BaseSearchTest.java b/src/test/java/com/alicloud/openservices/tablestore/core/protocol/BaseSearchTest.java new file mode 100644 index 0000000..12f46e2 --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/core/protocol/BaseSearchTest.java @@ -0,0 +1,1150 @@ +package com.alicloud.openservices.tablestore.core.protocol; + +import com.alicloud.openservices.tablestore.core.utils.RepeatRule; +import com.alicloud.openservices.tablestore.core.utils.ValueUtil; +import com.alicloud.openservices.tablestore.model.ColumnValue; +import com.alicloud.openservices.tablestore.model.PrimaryKey; +import com.alicloud.openservices.tablestore.model.PrimaryKeyBuilder; +import com.alicloud.openservices.tablestore.model.PrimaryKeyValue; +import com.alicloud.openservices.tablestore.model.search.Collapse; +import com.alicloud.openservices.tablestore.model.search.GeoPoint; +import com.alicloud.openservices.tablestore.model.search.ParallelScanRequest; +import com.alicloud.openservices.tablestore.model.search.ScanQuery; +import com.alicloud.openservices.tablestore.model.search.SearchQuery; +import com.alicloud.openservices.tablestore.model.search.SearchRequest; +import com.alicloud.openservices.tablestore.model.search.SearchRequest.ColumnsToGet; +import com.alicloud.openservices.tablestore.model.search.agg.Aggregation; +import com.alicloud.openservices.tablestore.model.search.agg.AggregationType; +import com.alicloud.openservices.tablestore.model.search.agg.AvgAggregation; +import com.alicloud.openservices.tablestore.model.search.agg.CountAggregation; +import com.alicloud.openservices.tablestore.model.search.agg.DistinctCountAggregation; +import com.alicloud.openservices.tablestore.model.search.agg.MaxAggregation; +import com.alicloud.openservices.tablestore.model.search.agg.MinAggregation; +import com.alicloud.openservices.tablestore.model.search.agg.PercentilesAggregation; +import com.alicloud.openservices.tablestore.model.search.agg.SumAggregation; +import com.alicloud.openservices.tablestore.model.search.agg.TopRowsAggregation; +import com.alicloud.openservices.tablestore.model.search.groupby.FieldRange; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupBy; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupByField; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupByFilter; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupByGeoDistance; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupByHistogram; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupByRange; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupByType; +import com.alicloud.openservices.tablestore.model.search.groupby.Range; +import com.alicloud.openservices.tablestore.model.search.query.BoolQuery; +import com.alicloud.openservices.tablestore.model.search.query.ConstScoreQuery; +import com.alicloud.openservices.tablestore.model.search.query.ExistsQuery; +import com.alicloud.openservices.tablestore.model.search.query.FieldValueFactor; +import com.alicloud.openservices.tablestore.model.search.query.FunctionScoreQuery; +import com.alicloud.openservices.tablestore.model.search.query.GeoBoundingBoxQuery; +import com.alicloud.openservices.tablestore.model.search.query.GeoDistanceQuery; +import com.alicloud.openservices.tablestore.model.search.query.GeoPolygonQuery; +import com.alicloud.openservices.tablestore.model.search.query.MatchAllQuery; +import com.alicloud.openservices.tablestore.model.search.query.MatchPhraseQuery; +import com.alicloud.openservices.tablestore.model.search.query.MatchQuery; +import com.alicloud.openservices.tablestore.model.search.query.NestedQuery; +import com.alicloud.openservices.tablestore.model.search.query.PrefixQuery; +import com.alicloud.openservices.tablestore.model.search.query.Query; +import com.alicloud.openservices.tablestore.model.search.query.QueryOperator; +import com.alicloud.openservices.tablestore.model.search.query.QueryType; +import com.alicloud.openservices.tablestore.model.search.query.RangeQuery; +import com.alicloud.openservices.tablestore.model.search.query.ScoreMode; +import com.alicloud.openservices.tablestore.model.search.query.TermQuery; +import com.alicloud.openservices.tablestore.model.search.query.TermsQuery; +import com.alicloud.openservices.tablestore.model.search.query.WildcardQuery; +import com.alicloud.openservices.tablestore.model.search.sort.FieldSort; +import com.alicloud.openservices.tablestore.model.search.sort.GeoDistanceSort; +import com.alicloud.openservices.tablestore.model.search.sort.GeoDistanceType; +import com.alicloud.openservices.tablestore.model.search.sort.GroupBySorter; +import com.alicloud.openservices.tablestore.model.search.sort.GroupKeySort; +import com.alicloud.openservices.tablestore.model.search.sort.NestedFilter; +import com.alicloud.openservices.tablestore.model.search.sort.PrimaryKeySort; +import com.alicloud.openservices.tablestore.model.search.sort.RowCountSort; +import com.alicloud.openservices.tablestore.model.search.sort.ScoreSort; +import com.alicloud.openservices.tablestore.model.search.sort.Sort; +import com.alicloud.openservices.tablestore.model.search.sort.Sort.Sorter; +import com.alicloud.openservices.tablestore.model.search.sort.SortMode; +import com.alicloud.openservices.tablestore.model.search.sort.SortOrder; +import com.alicloud.openservices.tablestore.model.search.sort.SubAggSort; +import com.google.common.base.Supplier; +import com.google.gson.ExclusionStrategy; +import com.google.gson.FieldAttributes; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonObject; +import org.junit.Rule; +import org.junit.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Random; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +/** + * Base test for SearchIndex. Using this base test can avoid some wrong implementation in protocol serialization and deserialization. + */ +public abstract class BaseSearchTest { + + protected static Logger logger = LoggerFactory.getLogger(BaseSearchTest.class); + + /** + * repeat many times to avoid random fail. + */ + @Rule + public RepeatRule repeatRule = new RepeatRule(500); + + private static final Gson GSON = new GsonBuilder() + .disableHtmlEscaping() + .serializeNulls() + .serializeSpecialFloatingPointValues() + .enableComplexMapKeySerialization() + .setExclusionStrategies(new ExclusionStrategy() { + @Override + public boolean shouldSkipField(FieldAttributes f) { + return "rawData".equals(f.getName()) + && "[B".equals(f.getDeclaredClass().getName()) + && f.getDeclaringClass().equals(PrimaryKeyValue.class); + } + @Override + public boolean shouldSkipClass(Class aClass) { + return false; + } + }) + .create(); + + private static final Random RANDOM = new Random(); + private static final char[] ALPHABET = "0123456789_abcdefghijklmnopqrstuvwxyz".toCharArray(); + + protected Random random() { + return RANDOM; + } + + @Test + public void testAllQueryShouldBeTest() { + // 'QueryType_None' is useless + int actualQueryTypeKinds = QueryType.values().length - 1; + assertEquals("all Query should be test. if you add a new kind, please add it to here", actualQueryTypeKinds, getAllQuerySupplier().size()); + assertEquals(actualQueryTypeKinds, Search.QueryType.values().length); + } + + @Test + public void testAllGroupByShouldBeTest() { + assertEquals("all GroupBy should be test. if you add a new kind, please add it to here", GroupByType.values().length, getAllGroupBySupplier().size()); + assertEquals(GroupByType.values().length, Search.GroupByType.values().length); + } + + @Test + public void testAllAggregationShouldBeTest() { + assertEquals("all Aggregation should be test. if you add a new kind, please add it to here", AggregationType.values().length, getAllAggregationSupplier().size()); + assertEquals(AggregationType.values().length, Search.AggregationType.values().length); + } + + @Test + public void testAllSorterShouldBeTest() { + assertEquals("all Sort.Sorter should be test. if you add a new kind, please add it to here", 4, getAllSortSorterSupplier().size()); + } + + @Test + public void testAllFieldShouldBeTest() { + randomSearchQuery(); + randomSearchRequest(); + randomScanQuery(); + randomParallelScanRequest(); + randomFrom(getAllQuerySupplier()).get(); + randomFrom(getAllGroupBySupplier()).get(); + randomFrom(getAllAggregationSupplier()).get(); + randomFrom(getAllSortSorterSupplier()).get(); + } + + /** + * 保证所有的字段都被测试到。防止后面同学修改代码漏掉一些实现或者漏掉测试。 + * 假如一个类有新的成员变量加入,case一定通不过。一个类新加成员变量后,这时候需要 + * 1. 修改下面的randomXXX的实现,将新的成员变量也加入到random实现中。 + * 2. 修改'maxField'才能通过。 + * 3. 验证相关的反序列化case(TestSearchProtocolParser等)可以通过。 + */ + public static void assertAllFieldTested(Object o, int maxField) { + JsonObject jsonObject = GSON.toJsonTree(o).getAsJsonObject(); + assertTrue("class[" + o.getClass().getSimpleName() + "] except " + maxField + " fields but get " + jsonObject.entrySet().size() + " fields. Maybe add a new field.", + jsonObject.entrySet().size() <= maxField); + } + + public static void assertJsonEquals(Object origin, Object newParsed) { + assertEquals(GSON.toJson(origin), GSON.toJson(newParsed)); + } + + public static String randomString(int length) { + char[] ret = new char[length]; + for (int i = 0; i < length; i++) { + ret[i] = ALPHABET[(int) (System.nanoTime() % ALPHABET.length)]; + } + return new String(ret); + } + + public static SortOrder randomSortOrder() { + return randomFrom(SortOrder.values()); + } + + public static GroupKeySort randomGroupKeySort() { + GroupKeySort groupKeySort = new GroupKeySort(); + groupKeySort.setOrder(randomSortOrder()); + assertAllFieldTested(groupKeySort, 1); + return groupKeySort; + } + + + public static RowCountSort randomRowCountSort() { + RowCountSort sort = new RowCountSort(); + sort.setOrder(randomSortOrder()); + assertAllFieldTested(sort, 1); + return sort; + } + + public static SubAggSort randomSubAggSort() { + SubAggSort sort = new SubAggSort(); + sort.setOrder(randomSortOrder()); + sort.setSubAggName(randomString(10)); + assertAllFieldTested(sort, 2); + return sort; + } + + public static GroupBySorter randomGroupBySorter() { + GroupBySorter sorter = new GroupBySorter(); + int i = RANDOM.nextInt(9); + if (i < 3) { + sorter.setSubAggSort(randomSubAggSort()); + } else if (i < 6) { + sorter.setGroupKeySort(randomGroupKeySort()); + } else { + sorter.setRowCountSort(randomRowCountSort()); + } + assertAllFieldTested(sorter, 3); + return sorter; + } + + public static List randomGroupBySorterList() { + List list = new ArrayList(); + int size = RANDOM.nextInt(4); + for (int i = 0; i < size; i++) { + list.add(randomGroupBySorter()); + } + return list; + } + + public static FieldSort randomFieldSort() { + FieldSort sort = new FieldSort(randomString(10), randomSortOrder()); + sort.setMode(randomSortMode()); + if (RANDOM.nextBoolean()) { + sort.setNestedFilter(randomNestedFilter()); + } + sort.setOrder(randomSortOrder()); + assertAllFieldTested(sort, 5); + if (RANDOM.nextBoolean()) { + sort.setMissing(randomColumnValue()); + } + return sort; + } + + public static ScoreSort randomScoreSort() { + ScoreSort sort = new ScoreSort(); + sort.setOrder(randomSortOrder()); + assertAllFieldTested(sort, 1); + return sort; + } + + private static NestedFilter randomNestedFilter() { + NestedFilter nestedFilter = new NestedFilter(randomString(4), randomQuery()); + assertAllFieldTested(nestedFilter, 2); + return nestedFilter; + } + + public static PrimaryKeySort randomPrimaryKeySort() { + PrimaryKeySort sort = new PrimaryKeySort(); + sort.setOrder(randomSortOrder()); + assertAllFieldTested(sort, 1); + return sort; + } + + public static SortMode randomSortMode() { + return randomFrom(SortMode.values()); + } + + public static GeoDistanceSort randomGeoDistanceSort() { + List points = new ArrayList(); + int size = RANDOM.nextInt(3); + for (int i = 0; i < size; i++) { + points.add(randomString(3)); + } + GeoDistanceSort sort = new GeoDistanceSort(randomString(10), points); + sort.setMode(randomSortMode()); + sort.setOrder(randomSortOrder()); + if (RANDOM.nextBoolean()) { + sort.setDistanceType(RANDOM.nextBoolean() ? GeoDistanceType.ARC : GeoDistanceType.PLANE); + } + if (RANDOM.nextBoolean()) { + sort.setNestedFilter(randomNestedFilter()); + } + assertAllFieldTested(sort, 6); + return sort; + } + + public static Sort.Sorter randomSorter() { + return randomFrom(getAllSortSorterSupplier()).get(); + } + + public static List> getAllSortSorterSupplier() { + List> all = new ArrayList>(); + all.add(new Supplier() { + @Override + public Sorter get() { + return randomFieldSort(); + } + }); + all.add(new Supplier() { + @Override + public Sorter get() { + return randomGeoDistanceSort(); + } + }); + all.add(new Supplier() { + @Override + public Sorter get() { + return randomScoreSort(); + } + }); + all.add(new Supplier() { + @Override + public Sorter get() { + return randomPrimaryKeySort(); + } + }); + return all; + } + + public static Sort randomSort() { + List sorters = new ArrayList(); + int size = RANDOM.nextInt(3); + for (int i = 0; i < size; i++) { + sorters.add(randomSorter()); + } + return new Sort(sorters); + } + + public static Query randomQuery() { + return randomFrom(getAllQuerySupplier()).get(); + } + + public static List> getAllQuerySupplier() { + List> all = new ArrayList>(); + all.add(new Supplier() { + @Override + public Query get() { + return randomWildcardQuery(); + } + }); + all.add(new Supplier() { + @Override + public Query get() { + return randomTermsQuery(); + } + }); + all.add(new Supplier() { + @Override + public Query get() { + return randomTermQuery(); + } + }); + all.add(new Supplier() { + @Override + public Query get() { + return randomRangeQuery(); + } + }); + all.add(new Supplier() { + @Override + public Query get() { + return randomPrefixQuery(); + } + }); + all.add(new Supplier() { + @Override + public Query get() { + return randomNestedQuery(); + } + }); + all.add(new Supplier() { + @Override + public Query get() { + return randomMatchQuery(); + } + }); + all.add(new Supplier() { + @Override + public Query get() { + return randomMatchPhraseQuery(); + } + }); + all.add(new Supplier() { + @Override + public Query get() { + return randomMatchAllQuery(); + } + }); + all.add(new Supplier() { + @Override + public Query get() { + return randomGeoPolygonQuery(); + } + }); + all.add(new Supplier() { + @Override + public Query get() { + return randomGeoBoundingBoxQuery(); + } + }); + all.add(new Supplier() { + @Override + public Query get() { + return randomGeoDistanceQuery(); + } + }); + all.add(new Supplier() { + @Override + public Query get() { + return randomFunctionScoreQuery(); + } + }); + all.add(new Supplier() { + @Override + public Query get() { + return randomExistsQuery(); + } + }); + all.add(new Supplier() { + @Override + public Query get() { + return randomConstScoreQuery(); + } + }); + all.add(new Supplier() { + @Override + public Query get() { + return randomBoolQuery(); + } + }); + return all; + } + + public static List randomQueries() { + List queryList = new ArrayList(); + int i = RANDOM.nextInt(4); + for (int i1 = 0; i1 < i; i1++) { + queryList.add(randomQuery()); + } + return queryList; + } + + public static WildcardQuery randomWildcardQuery() { + WildcardQuery query = new WildcardQuery(); + query.setFieldName(randomString(10)); + query.setValue(randomString(20)); + if (RANDOM.nextBoolean()) { + query.setWeight(RANDOM.nextFloat()); + } + assertAllFieldTested(query, 4); + return query; + } + + public static TermsQuery randomTermsQuery() { + TermsQuery query = new TermsQuery(); + query.setFieldName(randomString(10)); + List terms = new ArrayList(); + int size = RANDOM.nextInt(4); + for (int i = 0; i < size; i++) { + terms.add(ValueUtil.toColumnValue(randomString(20))); + } + query.setTerms(terms); + if (RANDOM.nextBoolean()) { + query.setWeight(RANDOM.nextFloat()); + } + assertAllFieldTested(query, 4); + return query; + } + + public static TermQuery randomTermQuery() { + TermQuery query = new TermQuery(); + query.setFieldName(randomString(10)); + query.setTerm(ValueUtil.toColumnValue(randomString(20))); + if (RANDOM.nextBoolean()) { + query.setWeight(RANDOM.nextFloat()); + } + assertAllFieldTested(query, 4); + return query; + } + + public static RangeQuery randomRangeQuery() { + RangeQuery query = new RangeQuery(); + query.setFieldName(randomString(10)); + query.setFrom(ValueUtil.toColumnValue(randomString(20))); + query.setTo(ValueUtil.toColumnValue(randomString(20))); + query.setIncludeUpper(RANDOM.nextBoolean()); + query.setIncludeLower(RANDOM.nextBoolean()); + assertAllFieldTested(query, 6); + return query; + } + + public static PrefixQuery randomPrefixQuery() { + PrefixQuery query = new PrefixQuery(); + query.setFieldName(randomString(10)); + query.setPrefix(randomString(20)); + if (RANDOM.nextBoolean()) { + query.setWeight(RANDOM.nextFloat()); + } + assertAllFieldTested(query, 4); + return query; + } + + public static T randomFrom(List values) { + int total = values.size(); + return values.get(RANDOM.nextInt(total)); + } + + public static T randomFrom(T[] values) { + int total = values.length; + return values[RANDOM.nextInt(total)]; + } + + public static List randomList(Supplier supplier) { + int total = RANDOM.nextInt(5); + List list = new ArrayList(); + for (int i = 0; i < total; i++) { + list.add(supplier.get()); + } + return list; + } + + public static ScoreMode randomScoreMode() { + return randomFrom(ScoreMode.values()); + } + + public static QueryOperator randomQueryOperator() { + return randomFrom(QueryOperator.values()); + } + + public static NestedQuery randomNestedQuery() { + NestedQuery query = new NestedQuery(); + query.setPath(randomString(10)); + query.setQuery(randomQuery()); + if (RANDOM.nextBoolean()) { + query.setWeight(RANDOM.nextFloat()); + } + query.setScoreMode(randomScoreMode()); + assertAllFieldTested(query, 5); + return query; + } + + public static MatchQuery randomMatchQuery() { + MatchQuery query = new MatchQuery(); + query.setFieldName(randomString(10)); + query.setText(randomString(20)); + if (RANDOM.nextBoolean()) { + query.setWeight(RANDOM.nextFloat()); + } + if (RANDOM.nextBoolean()) { + query.setMinimumShouldMatch(RANDOM.nextInt()); + } + if (RANDOM.nextBoolean()) { + query.setOperator(randomQueryOperator()); + } + assertAllFieldTested(query, 6); + return query; + } + + public static MatchAllQuery randomMatchAllQuery() { + MatchAllQuery matchAllQuery = new MatchAllQuery(); + assertAllFieldTested(matchAllQuery, 1); + return matchAllQuery; + } + + public static MatchPhraseQuery randomMatchPhraseQuery() { + MatchPhraseQuery query = new MatchPhraseQuery(); + query.setFieldName(randomString(10)); + query.setText(randomString(20)); + if (RANDOM.nextBoolean()) { + query.setWeight(RANDOM.nextFloat()); + } + assertAllFieldTested(query, 4); + return query; + } + + public static GeoPolygonQuery randomGeoPolygonQuery() { + GeoPolygonQuery query = new GeoPolygonQuery(); + query.setFieldName(randomString(10)); + int size = RANDOM.nextInt(3); + List points = new ArrayList(); + for (int i = 0; i < size; i++) { + points.add(randomString(10)); + } + query.setPoints(points); + assertAllFieldTested(query, 3); + return query; + } + + public static GeoDistanceQuery randomGeoDistanceQuery() { + GeoDistanceQuery query = new GeoDistanceQuery(); + query.setFieldName(randomString(10)); + query.setCenterPoint(randomString(10)); + query.setDistanceInMeter(RANDOM.nextDouble()); + assertAllFieldTested(query, 4); + return query; + } + + public static GeoBoundingBoxQuery randomGeoBoundingBoxQuery() { + GeoBoundingBoxQuery query = new GeoBoundingBoxQuery(); + query.setFieldName(randomString(10)); + query.setTopLeft(randomString(10)); + query.setBottomRight(randomString(10)); + assertAllFieldTested(query, 4); + return query; + } + + public static FunctionScoreQuery randomFunctionScoreQuery() { + FunctionScoreQuery query = new FunctionScoreQuery(randomQuery(), new FieldValueFactor(randomString(10))); + assertAllFieldTested(query, 3); + return query; + } + + public static ExistsQuery randomExistsQuery() { + ExistsQuery query = new ExistsQuery(); + query.setFieldName(randomString(10)); + assertAllFieldTested(query, 2); + return query; + } + + public static ConstScoreQuery randomConstScoreQuery() { + ConstScoreQuery query = new ConstScoreQuery(); + query.setFilter(randomQuery()); + assertAllFieldTested(query, 2); + return query; + } + + public static BoolQuery randomBoolQuery() { + BoolQuery query = new BoolQuery(); + if (RANDOM.nextBoolean()) { + query.setMinimumShouldMatch(RANDOM.nextInt()); + } + query.setFilterQueries(randomQueries()); + query.setShouldQueries(randomQueries()); + query.setMustQueries(randomQueries()); + query.setMustNotQueries(randomQueries()); + assertAllFieldTested(query, 6); + return query; + } + + public static MaxAggregation randomMaxAggregation() { + MaxAggregation aggregation = new MaxAggregation(); + aggregation.setAggName(randomString(10)); + aggregation.setFieldName(randomString(10)); + if (RANDOM.nextBoolean()) { + aggregation.setMissing(ValueUtil.toColumnValue(RANDOM.nextInt())); + } + assertAllFieldTested(aggregation, 4); + return aggregation; + } + + public static SumAggregation randomSumAggregation() { + SumAggregation aggregation = new SumAggregation(); + aggregation.setAggName(randomString(10)); + aggregation.setFieldName(randomString(10)); + if (RANDOM.nextBoolean()) { + aggregation.setMissing(ValueUtil.toColumnValue(RANDOM.nextInt())); + } + assertAllFieldTested(aggregation, 4); + return aggregation; + } + + public static MinAggregation randomMinAggregation() { + MinAggregation aggregation = new MinAggregation(); + aggregation.setAggName(randomString(10)); + aggregation.setFieldName(randomString(10)); + if (RANDOM.nextBoolean()) { + aggregation.setMissing(ValueUtil.toColumnValue(RANDOM.nextInt())); + } + assertAllFieldTested(aggregation, 4); + return aggregation; + } + + public static AvgAggregation randomAvgAggregation() { + AvgAggregation aggregation = new AvgAggregation(); + aggregation.setAggName(randomString(10)); + aggregation.setFieldName(randomString(10)); + if (RANDOM.nextBoolean()) { + aggregation.setMissing(ValueUtil.toColumnValue(RANDOM.nextInt())); + } + assertAllFieldTested(aggregation, 4); + return aggregation; + } + + public static CountAggregation randomCountAggregation() { + CountAggregation aggregation = new CountAggregation(); + aggregation.setAggName(randomString(10)); + aggregation.setFieldName(randomString(10)); + assertAllFieldTested(aggregation, 3); + return aggregation; + } + + public static DistinctCountAggregation randomDistinctCountAggregation() { + DistinctCountAggregation aggregation = new DistinctCountAggregation(); + aggregation.setAggName(randomString(10)); + aggregation.setFieldName(randomString(10)); + if (RANDOM.nextBoolean()) { + aggregation.setMissing(ValueUtil.toColumnValue(RANDOM.nextInt())); + } + assertAllFieldTested(aggregation, 4); + return aggregation; + } + + public static PercentilesAggregation randomPercentilesAggregation() { + PercentilesAggregation aggregation = new PercentilesAggregation(); + aggregation.setAggName(randomString(10)); + aggregation.setFieldName(randomString(10)); + if (RANDOM.nextBoolean()) { + aggregation.setMissing(ValueUtil.toColumnValue(RANDOM.nextInt())); + } + int size = RANDOM.nextInt(4); + List percentiles = new ArrayList(); + for (int i = 0; i < size; i++) { + percentiles.add(RANDOM.nextDouble()); + } + aggregation.setPercentiles(percentiles); + assertAllFieldTested(aggregation, 5); + return aggregation; + } + + public static TopRowsAggregation randomTopRowsAggregation() { + TopRowsAggregation aggregation = new TopRowsAggregation(); + aggregation.setAggName(randomString(10)); + if (RANDOM.nextBoolean()) { + aggregation.setLimit(RANDOM.nextInt()); + } + if (RANDOM.nextBoolean()) { + aggregation.setSort(randomSort()); + } + assertAllFieldTested(aggregation, 4); + return aggregation; + } + + public static List> getAllAggregationSupplier() { + List> all = new ArrayList>(); + all.add(new Supplier() { + @Override + public Aggregation get() { + return randomAvgAggregation(); + } + }); + all.add(new Supplier() { + @Override + public Aggregation get() { + return randomCountAggregation(); + } + }); + all.add(new Supplier() { + @Override + public Aggregation get() { + return randomMaxAggregation(); + } + }); + all.add(new Supplier() { + @Override + public Aggregation get() { + return randomMinAggregation(); + } + }); + all.add(new Supplier() { + @Override + public Aggregation get() { + return randomSumAggregation(); + } + }); + all.add(new Supplier() { + @Override + public Aggregation get() { + return randomDistinctCountAggregation(); + } + }); + all.add(new Supplier() { + @Override + public Aggregation get() { + return randomPercentilesAggregation(); + } + }); + all.add(new Supplier() { + @Override + public Aggregation get() { + return randomTopRowsAggregation(); + } + }); + + return all; + } + + public static Aggregation randomAggregation() { + return randomFrom(getAllAggregationSupplier()).get(); + } + + public static List randomAggregations() { + List aggregations = new ArrayList(); + int size = RANDOM.nextInt(4); + for (int i = 0; i < size; i++) { + aggregations.add(randomAggregation()); + } + return aggregations; + } + + + public static GroupByField randomGroupByField() { + GroupByField groupBy = new GroupByField(); + groupBy.setGroupByName(randomString(10)); + groupBy.setFieldName(randomString(10)); + if (RANDOM.nextBoolean()) { + groupBy.setGroupBySorters(randomGroupBySorterList()); + } + if (RANDOM.nextBoolean()) { + groupBy.setSize(RANDOM.nextInt()); + } + if (RANDOM.nextBoolean()) { + groupBy.setSubGroupBys(randomGroupBys()); + } + if (RANDOM.nextBoolean()) { + groupBy.setSubAggregations(randomAggregations()); + } + if (RANDOM.nextBoolean()) { + groupBy.setMinDocCount(RANDOM.nextLong()); + } + assertAllFieldTested(groupBy, 8); + return groupBy; + } + + public static GroupByGeoDistance randomGroupByGeoDistance() { + GroupByGeoDistance groupBy = new GroupByGeoDistance(); + groupBy.setGroupByName(randomString(10)); + groupBy.setFieldName(randomString(10)); + groupBy.setOrigin(new GeoPoint(RANDOM.nextDouble(), RANDOM.nextDouble())); + List list = new ArrayList(); + int i = RANDOM.nextInt(4) + 1; + for (int i1 = 0; i1 < i; i1++) { + list.add(new Range(RANDOM.nextDouble(), RANDOM.nextDouble())); + } + groupBy.setRanges(list); + if (RANDOM.nextBoolean()) { + groupBy.setSubGroupBys(randomGroupBys()); + } + if (RANDOM.nextBoolean()) { + groupBy.setSubAggregations(randomAggregations()); + } + assertAllFieldTested(groupBy, 7); + return groupBy; + } + + public static GroupByRange randomGroupByRange() { + GroupByRange groupBy = new GroupByRange(); + groupBy.setGroupByName(randomString(10)); + groupBy.setFieldName(randomString(10)); + List list = new ArrayList(); + int i = RANDOM.nextInt(4) + 1; + for (int i1 = 0; i1 < i; i1++) { + list.add(new Range(RANDOM.nextDouble(), RANDOM.nextDouble())); + } + groupBy.setRanges(list); + if (RANDOM.nextBoolean()) { + groupBy.setSubGroupBys(randomGroupBys()); + } + if (RANDOM.nextBoolean()) { + groupBy.setSubAggregations(randomAggregations()); + } + assertAllFieldTested(groupBy, 6); + return groupBy; + } + + public static ColumnValue randomNumberColumnValue() { + return RANDOM.nextBoolean() ? ValueUtil.toColumnValue(RANDOM.nextLong()) : ValueUtil.toColumnValue(RANDOM.nextDouble()); + } + + public static ColumnValue randomStringColumnValue() { + return randomFrom(Arrays.asList( + ValueUtil.toColumnValue(randomString(10)), + FieldSort.FIRST_WHEN_MISSING, + FieldSort.LAST_WHEN_MISSING + )); + } + + public static ColumnValue randomBoolColumnValue() { + return ValueUtil.toColumnValue(RANDOM.nextBoolean()); + } + + public static ColumnValue randomColumnValue() { + List> objects = Arrays.asList( + new Supplier() { + @Override + public ColumnValue get() { + return randomNumberColumnValue(); + } + }, + new Supplier() { + @Override + public ColumnValue get() { + return randomStringColumnValue(); + } + }, + new Supplier() { + @Override + public ColumnValue get() { + return randomBoolColumnValue(); + } + } + ); + return randomFrom(objects).get(); + } + + public static GroupByHistogram randomGroupByHistogram() { + GroupByHistogram groupBy = new GroupByHistogram(); + groupBy.setGroupByName(randomString(10)); + groupBy.setFieldName(randomString(10)); + if (RANDOM.nextBoolean()) { + groupBy.setGroupBySorters(randomGroupBySorterList()); + } + if (RANDOM.nextBoolean()) { + groupBy.setInterval(randomNumberColumnValue()); + } + if (RANDOM.nextBoolean()) { + groupBy.setFieldRange(new FieldRange(randomNumberColumnValue(), randomNumberColumnValue())); + } + if (RANDOM.nextBoolean()) { + groupBy.setMinDocCount(RANDOM.nextLong()); + } + if (RANDOM.nextBoolean()) { + groupBy.setMissing(randomNumberColumnValue()); + } + if (RANDOM.nextBoolean()) { + groupBy.setSubGroupBys(randomGroupBys()); + } + if (RANDOM.nextBoolean()) { + groupBy.setSubAggregations(randomAggregations()); + } + assertAllFieldTested(groupBy, 10); + return groupBy; + } + + public static GroupByFilter randomGroupByFilter() { + GroupByFilter groupBy = new GroupByFilter(); + groupBy.setGroupByName(randomString(10)); + groupBy.setFilters(randomQueries()); + if (RANDOM.nextBoolean()) { + groupBy.setSubGroupBys(randomGroupBys()); + } + if (RANDOM.nextBoolean()) { + groupBy.setSubAggregations(randomAggregations()); + } + assertAllFieldTested(groupBy, 5); + return groupBy; + } + + public static GroupBy randomGroupBy() { + return randomFrom(getAllGroupBySupplier()).get(); + } + + public static List> getAllGroupBySupplier() { + List> all = new ArrayList>(); + all.add(new Supplier() { + @Override + public GroupBy get() { + return randomGroupByField(); + } + }); + all.add(new Supplier() { + @Override + public GroupBy get() { + return randomGroupByFilter(); + } + }); + all.add(new Supplier() { + @Override + public GroupBy get() { + return randomGroupByRange(); + } + }); + all.add(new Supplier() { + @Override + public GroupBy get() { + return randomGroupByHistogram(); + } + }); + all.add(new Supplier() { + @Override + public GroupBy get() { + return randomGroupByGeoDistance(); + } + }); + return all; + } + + public static List randomGroupBys() { + List groupBIES = new ArrayList(); + int i = RANDOM.nextInt(2); + for (int i1 = 0; i1 < i; i1++) { + groupBIES.add(randomGroupBy()); + } + return groupBIES; + } + + public static SearchQuery randomSearchQuery() { + SearchQuery searchQuery = new SearchQuery(); + if (RANDOM.nextBoolean()) { + searchQuery.setOffset(RANDOM.nextInt()); + } + if (RANDOM.nextBoolean()) { + searchQuery.setLimit(RANDOM.nextInt()); + } + if (RANDOM.nextBoolean()) { + searchQuery.setQuery(randomQuery()); + } + if (RANDOM.nextBoolean()) { + searchQuery.setSort(randomSort()); + } + if (RANDOM.nextBoolean()) { + searchQuery.setCollapse(new Collapse(randomString(6))); + } + if (RANDOM.nextBoolean()) { + searchQuery.setGetTotalCount(RANDOM.nextBoolean()); + } + if (RANDOM.nextBoolean()) { + searchQuery.setToken(randomString(10).getBytes()); + } + if (RANDOM.nextBoolean()) { + searchQuery.setAggregationList(randomAggregations()); + } + if (RANDOM.nextBoolean()) { + searchQuery.setGroupByList(randomGroupBys()); + } + assertAllFieldTested(searchQuery, 9); + return searchQuery; + } + + public static PrimaryKey randomPrimaryKey() { + PrimaryKeyBuilder primaryKeyBuilder = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + primaryKeyBuilder.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromString(randomString(RANDOM.nextInt(100) + 1))); + if (RANDOM.nextBoolean()) { + primaryKeyBuilder.addPrimaryKeyColumn("pk2", PrimaryKeyValue.fromLong(RANDOM.nextBoolean() ? RANDOM.nextInt() : RANDOM.nextLong())); + } + if (RANDOM.nextBoolean()) { + primaryKeyBuilder.addPrimaryKeyColumn("pk3", PrimaryKeyValue.fromBinary(randomString(RANDOM.nextInt(200) + 1).getBytes())); + } + return primaryKeyBuilder.build(); + } + + public static List randomPrimaryKeys() { + List list = new ArrayList(); + int size = RANDOM.nextInt(3) + 1; + for (int i = 0; i < size; i++) { + list.add(randomPrimaryKey()); + } + return list; + } + + public static SearchRequest randomSearchRequest() { + SearchRequest searchRequest = new SearchRequest(); + if (RANDOM.nextBoolean()) { + searchRequest.setTableName(randomString(10)); + } + if (RANDOM.nextBoolean()) { + searchRequest.setIndexName(randomString(10)); + } + if (RANDOM.nextBoolean()) { + searchRequest.setColumnsToGet(randomColumnsToGet()); + } + if (RANDOM.nextBoolean()) { + searchRequest.setSearchQuery(randomSearchQuery()); + } + if (RANDOM.nextBoolean()) { + searchRequest.setRoutingValues(randomPrimaryKeys()); + } + if (RANDOM.nextBoolean()) { + searchRequest.setTimeoutInMillisecond(RANDOM.nextInt(100000000)); + } + assertAllFieldTested(searchRequest, 6); + return searchRequest; + } + + public static ColumnsToGet randomColumnsToGet() { + ColumnsToGet columnsToGet = new ColumnsToGet(); + if (RANDOM.nextBoolean()) { + randomList(new Supplier() { + @Override + public String get() { + return randomString(RANDOM.nextInt(30) + 1); + } + }); + } + if (RANDOM.nextBoolean()) { + columnsToGet.setReturnAll(RANDOM.nextBoolean()); + } else if (RANDOM.nextBoolean()) { + columnsToGet.setReturnAllFromIndex(RANDOM.nextBoolean()); + } + return columnsToGet; + } + + public static ScanQuery randomScanQuery() { + ScanQuery scanQuery = new ScanQuery(); + if (RANDOM.nextBoolean()) { + scanQuery.setLimit(RANDOM.nextInt()); + } + if (RANDOM.nextBoolean()) { + scanQuery.setQuery(randomQuery()); + } + if (RANDOM.nextBoolean()) { + scanQuery.setToken(randomString(RANDOM.nextInt(100) + 1).getBytes()); + } + if (RANDOM.nextBoolean()) { + scanQuery.setMaxParallel(RANDOM.nextInt()); + } + if (RANDOM.nextBoolean()) { + scanQuery.setCurrentParallelId(RANDOM.nextInt()); + } + if (RANDOM.nextBoolean()) { + scanQuery.setAliveTime(RANDOM.nextInt(100000000)); + } + assertAllFieldTested(scanQuery, 6); + return scanQuery; + } + + public static ParallelScanRequest randomParallelScanRequest() { + ParallelScanRequest request = new ParallelScanRequest(); + if (RANDOM.nextBoolean()) { + request.setTableName(randomString(RANDOM.nextInt(100) + 1)); + } + if (RANDOM.nextBoolean()) { + request.setIndexName(randomString(RANDOM.nextInt(100) + 1)); + } + if (RANDOM.nextBoolean()) { + request.setColumnsToGet(randomColumnsToGet()); + } + if (RANDOM.nextBoolean()) { + request.setSessionId(randomString(RANDOM.nextInt(100) + 1).getBytes()); + } + if (RANDOM.nextBoolean()) { + request.setScanQuery(randomScanQuery()); + } + if (RANDOM.nextBoolean()) { + request.setTimeoutInMillisecond(RANDOM.nextInt(100000000)); + } + assertAllFieldTested(request, 6); + return request; + } +} + diff --git a/src/test/java/com/alicloud/openservices/tablestore/core/protocol/OTSProtocolBuilderTest.java b/src/test/java/com/alicloud/openservices/tablestore/core/protocol/OTSProtocolBuilderTest.java new file mode 100644 index 0000000..3a0f1f2 --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/core/protocol/OTSProtocolBuilderTest.java @@ -0,0 +1,84 @@ +package com.alicloud.openservices.tablestore.core.protocol; + +import com.alicloud.openservices.tablestore.model.ComputeSplitsRequest; +import com.alicloud.openservices.tablestore.model.SearchIndexSplitsOptions; +import org.junit.Test; + +import static com.alicloud.openservices.tablestore.core.protocol.OTSProtocolBuilder.buildComputeSplitsRequest; +import static org.junit.Assert.*; + +public class OTSProtocolBuilderTest { + + @Test + public void testBuildComputeSplitsRequest() { + String tableName = "tableName"; + String indexName = "indexName"; + + { + ComputeSplitsRequest request = ComputeSplitsRequest.newBuilder() + .tableName(tableName) + .splitsOptions(new SearchIndexSplitsOptions(indexName)) + .build(); + OtsInternalApi.ComputeSplitsRequest request1 = buildComputeSplitsRequest(request); + + OtsInternalApi.ComputeSplitsRequest.Builder builder = OtsInternalApi.ComputeSplitsRequest.newBuilder(); + builder.setTableName(tableName); + OtsInternalApi.SearchIndexSplitsOptions.Builder sBuilder = OtsInternalApi.SearchIndexSplitsOptions.newBuilder(); + builder.setSearchIndexSplitsOptions(sBuilder.setIndexName(indexName)); + OtsInternalApi.ComputeSplitsRequest request2 = builder.build(); + assertEquals(request1.toByteString(), request2.toByteString()); + } + // tableName no set + { + ComputeSplitsRequest request = ComputeSplitsRequest.newBuilder() + .splitsOptions(new SearchIndexSplitsOptions(indexName)) + .build(); + OtsInternalApi.ComputeSplitsRequest request1 = buildComputeSplitsRequest(request); + + OtsInternalApi.ComputeSplitsRequest.Builder builder = OtsInternalApi.ComputeSplitsRequest.newBuilder(); + OtsInternalApi.SearchIndexSplitsOptions.Builder sBuilder = OtsInternalApi.SearchIndexSplitsOptions.newBuilder(); + builder.setSearchIndexSplitsOptions(sBuilder.setIndexName(indexName)); + OtsInternalApi.ComputeSplitsRequest request2 = builder.build(); + assertEquals(request1.toByteString(), request2.toByteString()); + } + // indexName no set + { + ComputeSplitsRequest request = ComputeSplitsRequest.newBuilder() + .tableName(tableName) + .splitsOptions(new SearchIndexSplitsOptions()) + .build(); + OtsInternalApi.ComputeSplitsRequest request1 = buildComputeSplitsRequest(request); + + OtsInternalApi.ComputeSplitsRequest.Builder builder = OtsInternalApi.ComputeSplitsRequest.newBuilder(); + builder.setTableName(tableName); + OtsInternalApi.SearchIndexSplitsOptions.Builder sBuilder = OtsInternalApi.SearchIndexSplitsOptions.newBuilder(); + builder.setSearchIndexSplitsOptions(sBuilder); + OtsInternalApi.ComputeSplitsRequest request2 = builder.build(); + assertEquals(request1.toByteString(), request2.toByteString()); + } + // SearchIndexSplitsOptions no set + { + ComputeSplitsRequest request = ComputeSplitsRequest.newBuilder() + .tableName(tableName) + .build(); + OtsInternalApi.ComputeSplitsRequest request1 = buildComputeSplitsRequest(request); + + OtsInternalApi.ComputeSplitsRequest.Builder builder = OtsInternalApi.ComputeSplitsRequest.newBuilder(); + builder.setTableName(tableName); + OtsInternalApi.ComputeSplitsRequest request2 = builder.build(); + assertEquals(request1.toByteString(), request2.toByteString()); + } + // all no set + { + ComputeSplitsRequest request = ComputeSplitsRequest.newBuilder() + .build(); + OtsInternalApi.ComputeSplitsRequest request1 = buildComputeSplitsRequest(request); + + OtsInternalApi.ComputeSplitsRequest.Builder builder = OtsInternalApi.ComputeSplitsRequest.newBuilder(); + OtsInternalApi.ComputeSplitsRequest request2 = builder.build(); + assertEquals(request1.toByteString(), request2.toByteString()); + } + + } + +} \ No newline at end of file diff --git a/src/test/java/com/alicloud/openservices/tablestore/core/protocol/ProtocolBufferParserTest.java b/src/test/java/com/alicloud/openservices/tablestore/core/protocol/ProtocolBufferParserTest.java new file mode 100644 index 0000000..c6d4bf1 --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/core/protocol/ProtocolBufferParserTest.java @@ -0,0 +1,51 @@ +package com.alicloud.openservices.tablestore.core.protocol; + +import com.alicloud.openservices.tablestore.core.ResponseContentWithMeta; +import com.alicloud.openservices.tablestore.core.http.ResponseMessage; +import com.alicloud.openservices.tablestore.core.utils.HttpResponse; +import com.google.protobuf.InvalidProtocolBufferException; +import com.google.protobuf.Message; +import org.apache.http.HttpVersion; +import org.apache.http.ProtocolVersion; +import org.apache.http.entity.BasicHttpEntity; +import org.apache.http.message.BasicHttpResponse; +import org.apache.http.message.BasicStatusLine; +import org.junit.Test; +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; +import static org.junit.Assert.*; +public class ProtocolBufferParserTest { + @Test + public void testGetLargeObject() throws ResultParseException { + StringBuilder largeStringBuilder = new StringBuilder(); + int len = 128 * 1024 * 1024; + for (int i = 0; i < len; i++) { + largeStringBuilder.append('a'); + } + String largeMessage = largeStringBuilder.toString(); + Message.Builder builder = OtsInternalApi.Error.newBuilder().setCode(largeMessage).setMessage(largeMessage); + byte[] serialized = builder.build().toByteString().toByteArray(); + try { + OtsInternalApi.Error.newBuilder().mergeFrom(new ByteArrayInputStream(serialized)).build(); + fail(); + } catch (InvalidProtocolBufferException ex) { + // expect + } catch (IOException e) { + fail(); + } + ProtocolBufferParser parser = new ProtocolBufferParser(OtsInternalApi.Error.getDefaultInstance(), "trace_id"); + BasicHttpResponse basicHttpResponse = new BasicHttpResponse( + new BasicStatusLine(new ProtocolVersion("http", 1,0), 200, "")); + basicHttpResponse.setHeader("x-ots-requestid", "aaa"); + BasicHttpEntity entity = new BasicHttpEntity(); + entity.setContent(new ByteArrayInputStream(serialized)); + basicHttpResponse.setEntity(entity); + ResponseMessage responseMessage = new ResponseMessage(basicHttpResponse); + + OtsInternalApi.Error errorMessage = (OtsInternalApi.Error) ((ResponseContentWithMeta)parser.getObject(responseMessage)).getMessage(); + assertEquals(largeMessage, errorMessage.getMessage()); + assertEquals(largeMessage, errorMessage.getCode()); + } +} \ No newline at end of file diff --git a/src/test/java/com/alicloud/openservices/tablestore/core/protocol/SearchVariantTypeTest.java b/src/test/java/com/alicloud/openservices/tablestore/core/protocol/SearchVariantTypeTest.java new file mode 100644 index 0000000..df8f8fe --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/core/protocol/SearchVariantTypeTest.java @@ -0,0 +1,40 @@ +package com.alicloud.openservices.tablestore.core.protocol; + +import com.alicloud.openservices.tablestore.model.ColumnType; +import com.alicloud.openservices.tablestore.model.ColumnValue; +import org.junit.Test; + +import static org.junit.Assert.*; + +public class SearchVariantTypeTest { + + @Test + public void testForceConvertToDestType() throws Exception { + { + Long lValue = 1234L; + ColumnValue columnValue = SearchVariantType.forceConvertToDestColumnValue( + SearchVariantType.fromLong(lValue)); + assertEquals(columnValue.getType(), ColumnType.INTEGER); + } + + { + double dValue = 123.456; + ColumnValue columnValue = SearchVariantType.forceConvertToDestColumnValue( + SearchVariantType.fromDouble(dValue)); + assertEquals(columnValue.getType(), ColumnType.DOUBLE); + } + + { + String sValue = "123.456"; + ColumnValue columnValue = SearchVariantType.forceConvertToDestColumnValue( + SearchVariantType.fromString(sValue)); + assertEquals(columnValue.getType(), ColumnType.STRING); + } + { + boolean bValue = false; + ColumnValue columnValue = SearchVariantType.forceConvertToDestColumnValue( + SearchVariantType.fromBoolean(bValue)); + assertEquals(columnValue.getType(), ColumnType.BOOLEAN); + } + } +} \ No newline at end of file diff --git a/src/test/java/com/alicloud/openservices/tablestore/core/protocol/TestScanQueryBuilder.java b/src/test/java/com/alicloud/openservices/tablestore/core/protocol/TestScanQueryBuilder.java new file mode 100644 index 0000000..0539444 --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/core/protocol/TestScanQueryBuilder.java @@ -0,0 +1,79 @@ +package com.alicloud.openservices.tablestore.core.protocol; + +import com.alicloud.openservices.tablestore.model.search.ParallelScanRequest; +import com.alicloud.openservices.tablestore.model.search.ScanQuery; +import com.alicloud.openservices.tablestore.model.search.query.QueryBuilders; +import com.alicloud.openservices.tablestore.model.search.query.WildcardQuery; +import org.junit.Test; + +import static com.alicloud.openservices.tablestore.core.protocol.SearchProtocolBuilder.buildParallelScanRequest; +import static com.alicloud.openservices.tablestore.core.protocol.SearchProtocolBuilder.buildScanQuery; +import static org.junit.Assert.assertEquals; + +public class TestScanQueryBuilder extends BaseSearchTest { + + @Test + public void testBuildParallelScanRequest() { + WildcardQuery query = new WildcardQuery(); + query.setFieldName("FieldName"); + query.setValue("FieldValue"); + ScanQuery scanQuery = ScanQuery + .newBuilder() + .query(QueryBuilders.wildcard("FieldName", "FieldValue")) + .limit(13) + .currentParallelId(12) + .maxParallel(1) + .aliveTimeInSeconds(98) + .build(); + ParallelScanRequest sq1 = ParallelScanRequest + .newBuilder() + .scanQuery(scanQuery) + .build(); + Search.ParallelScanRequest request1 = buildParallelScanRequest(sq1); + + + Search.Query qbQuery = SearchQueryBuilder.buildQuery(query); + Search.ScanQuery.Builder builder = Search.ScanQuery.newBuilder(); + builder.setQuery(qbQuery); + builder.setCurrentParallelId(12); + builder.setMaxParallel(1); + builder.setLimit(13); + builder.setAliveTime(98); + Search.ScanQuery sq2 = builder.build(); + Search.ParallelScanRequest.Builder builder1 = Search.ParallelScanRequest.newBuilder(); + builder1.setScanQuery(sq2); + Search.ParallelScanRequest request2 = builder1.build(); + + assertEquals(request1, request2); + + } + + @Test + public void testBuildScanQuery() { + WildcardQuery query = new WildcardQuery(); + query.setFieldName("FieldName"); + query.setValue("FieldValue"); + ScanQuery scanQuery = ScanQuery + .newBuilder() + .query(QueryBuilders.wildcard("FieldName", "FieldValue")) + .limit(13) + .currentParallelId(12) + .maxParallel(1) + .aliveTimeInSeconds(98) + .build(); + Search.ScanQuery sq1 = buildScanQuery(scanQuery); + + Search.Query qbQuery = SearchQueryBuilder.buildQuery(query); + Search.ScanQuery.Builder builder = Search.ScanQuery.newBuilder(); + builder.setQuery(qbQuery); + builder.setCurrentParallelId(12); + builder.setMaxParallel(1); + builder.setLimit(13); + builder.setAliveTime(98); + Search.ScanQuery sq2 = builder.build(); + + assertEquals(sq1, sq2); + + + } +} diff --git a/src/test/java/com/alicloud/openservices/tablestore/core/protocol/TestSearchProtocolBuilder.java b/src/test/java/com/alicloud/openservices/tablestore/core/protocol/TestSearchProtocolBuilder.java new file mode 100644 index 0000000..b460d59 --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/core/protocol/TestSearchProtocolBuilder.java @@ -0,0 +1,464 @@ +package com.alicloud.openservices.tablestore.core.protocol; + +import com.alicloud.openservices.tablestore.ClientException; +import com.alicloud.openservices.tablestore.model.search.FieldSchema; +import com.alicloud.openservices.tablestore.model.search.FieldType; +import com.alicloud.openservices.tablestore.model.search.QueryFlowWeight; +import com.alicloud.openservices.tablestore.model.search.UpdateSearchIndexRequest; +import com.alicloud.openservices.tablestore.model.search.analysis.FuzzyAnalyzerParameter; +import com.alicloud.openservices.tablestore.model.search.analysis.SingleWordAnalyzerParameter; +import com.alicloud.openservices.tablestore.model.search.analysis.SplitAnalyzerParameter; +import com.google.protobuf.InvalidProtocolBufferException; +import org.junit.Test; + +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.TimeUnit; + +import static org.junit.Assert.*; + +public class TestSearchProtocolBuilder extends BaseSearchTest { + @Test + public void buildFieldSchema_SingleWord() throws InvalidProtocolBufferException { + // model + FieldSchema fieldSchema = new FieldSchema("Col_Name", FieldType.TEXT) + .setAnalyzer(FieldSchema.Analyzer.SingleWord) + .setAnalyzerParameter(new SingleWordAnalyzerParameter(true, true)); + + // to pb + Search.FieldSchema pbFieldSchema = SearchProtocolBuilder.buildFieldSchema(fieldSchema); + + // assert + assertEquals("single_word", pbFieldSchema.getAnalyzer()); + assertTrue(pbFieldSchema.hasAnalyzerParameter()); + Search.SingleWordAnalyzerParameter param = Search.SingleWordAnalyzerParameter.parseFrom(pbFieldSchema.getAnalyzerParameter()); + assertTrue(param.getCaseSensitive()); + assertTrue(param.getDelimitWord()); + } + + @Test + public void buildFieldSchema_SingleWord_NoCaseSensitive() throws InvalidProtocolBufferException { + // model + FieldSchema fieldSchema = new FieldSchema("Col_Name", FieldType.TEXT) + .setAnalyzer(FieldSchema.Analyzer.SingleWord) + .setAnalyzerParameter(new SingleWordAnalyzerParameter().setDelimitWord(true)); + + // to pb + Search.FieldSchema pbFieldSchema = SearchProtocolBuilder.buildFieldSchema(fieldSchema); + + // assert + assertEquals("single_word", pbFieldSchema.getAnalyzer()); + assertTrue(pbFieldSchema.hasAnalyzerParameter()); + Search.SingleWordAnalyzerParameter param = Search.SingleWordAnalyzerParameter.parseFrom(pbFieldSchema.getAnalyzerParameter()); + assertFalse(param.hasCaseSensitive()); + assertTrue(param.getDelimitWord()); + } + + @Test + public void buildFieldSchema_SingleWord_NoDelimitWord() throws InvalidProtocolBufferException { + // model + FieldSchema fieldSchema = new FieldSchema("Col_Name", FieldType.TEXT) + .setAnalyzer(FieldSchema.Analyzer.SingleWord) + .setAnalyzerParameter(new SingleWordAnalyzerParameter().setCaseSensitive(true)); + + // to pb + Search.FieldSchema pbFieldSchema = SearchProtocolBuilder.buildFieldSchema(fieldSchema); + + // assert + assertEquals("single_word", pbFieldSchema.getAnalyzer()); + assertTrue(pbFieldSchema.hasAnalyzerParameter()); + Search.SingleWordAnalyzerParameter param = Search.SingleWordAnalyzerParameter.parseFrom(pbFieldSchema.getAnalyzerParameter()); + assertFalse(param.hasDelimitWord()); + assertTrue(param.getCaseSensitive()); + } + + @Test + public void buildFieldSchema_SingleWord_DefaultParam() throws InvalidProtocolBufferException { + // model + FieldSchema fieldSchema = new FieldSchema("Col_Name", FieldType.TEXT) + .setAnalyzer(FieldSchema.Analyzer.SingleWord) + .setAnalyzerParameter(new SingleWordAnalyzerParameter()); + + // to pb + Search.FieldSchema pbFieldSchema = SearchProtocolBuilder.buildFieldSchema(fieldSchema); + + // assert + assertEquals("single_word", pbFieldSchema.getAnalyzer()); + assertTrue(pbFieldSchema.hasAnalyzerParameter()); + Search.SingleWordAnalyzerParameter param = Search.SingleWordAnalyzerParameter.parseFrom(pbFieldSchema.getAnalyzerParameter()); + assertFalse(param.hasCaseSensitive()); + assertFalse(param.hasDelimitWord()); + } + + @Test + public void buildFieldSchema_SingleWord_NoParam() throws InvalidProtocolBufferException { + // model + FieldSchema fieldSchema = new FieldSchema("Col_Name", FieldType.TEXT) + .setAnalyzer(FieldSchema.Analyzer.SingleWord); + + // to pb + Search.FieldSchema pbFieldSchema = SearchProtocolBuilder.buildFieldSchema(fieldSchema); + + // assert + assertEquals("single_word", pbFieldSchema.getAnalyzer()); + assertFalse(pbFieldSchema.hasAnalyzerParameter()); + } + + @Test + public void buildFieldSchema_Split() throws InvalidProtocolBufferException { + // model + FieldSchema fieldSchema = new FieldSchema("Col_Name", FieldType.TEXT) + .setAnalyzer(FieldSchema.Analyzer.Split) + .setAnalyzerParameter(new SplitAnalyzerParameter("-")); + + // to pb + Search.FieldSchema pbFieldSchema = SearchProtocolBuilder.buildFieldSchema(fieldSchema); + + // assert + assertEquals("split", pbFieldSchema.getAnalyzer()); + assertTrue(pbFieldSchema.hasAnalyzerParameter()); + Search.SplitAnalyzerParameter param = Search.SplitAnalyzerParameter.parseFrom(pbFieldSchema.getAnalyzerParameter()); + assertEquals("-", param.getDelimiter()); + } + + @Test + public void buildFieldSchema_Split_DefaultParam() throws InvalidProtocolBufferException { + // model + FieldSchema fieldSchema = new FieldSchema("Col_Name", FieldType.TEXT) + .setAnalyzer(FieldSchema.Analyzer.Split) + .setAnalyzerParameter(new SplitAnalyzerParameter()); + + // to pb + Search.FieldSchema pbFieldSchema = SearchProtocolBuilder.buildFieldSchema(fieldSchema); + + // assert + assertEquals("split", pbFieldSchema.getAnalyzer()); + assertTrue(pbFieldSchema.hasAnalyzerParameter()); + Search.SplitAnalyzerParameter param = Search.SplitAnalyzerParameter.parseFrom(pbFieldSchema.getAnalyzerParameter()); + assertFalse(param.hasDelimiter()); + } + + @Test + public void buildFieldSchema_Split_NoParam() throws InvalidProtocolBufferException { + // model + FieldSchema fieldSchema = new FieldSchema("Col_Name", FieldType.TEXT) + .setAnalyzer(FieldSchema.Analyzer.Split); + + // to pb + Search.FieldSchema pbFieldSchema = SearchProtocolBuilder.buildFieldSchema(fieldSchema); + + // assert + assertEquals("split", pbFieldSchema.getAnalyzer()); + assertFalse(pbFieldSchema.hasAnalyzerParameter()); + } + + @Test + public void buildFieldSchema_Fuzzy() throws InvalidProtocolBufferException { + // model + FieldSchema fieldSchema = new FieldSchema("Col_Name", FieldType.TEXT) + .setAnalyzer(FieldSchema.Analyzer.Fuzzy) + .setAnalyzerParameter(new FuzzyAnalyzerParameter(2, 4)); + + // to pb + Search.FieldSchema pbFieldSchema = SearchProtocolBuilder.buildFieldSchema(fieldSchema); + + // assert + assertEquals("fuzzy", pbFieldSchema.getAnalyzer()); + assertTrue(pbFieldSchema.hasAnalyzerParameter()); + Search.FuzzyAnalyzerParameter param = Search.FuzzyAnalyzerParameter.parseFrom(pbFieldSchema.getAnalyzerParameter()); + assertEquals(2, param.getMinChars()); + assertEquals(4, param.getMaxChars()); + } + + @Test + public void buildFieldSchema_Fuzzy_NoMinChars() throws InvalidProtocolBufferException { + // model + FieldSchema fieldSchema = new FieldSchema("Col_Name", FieldType.TEXT) + .setAnalyzer(FieldSchema.Analyzer.Fuzzy) + .setAnalyzerParameter(new FuzzyAnalyzerParameter().setMaxChars(4)); + + // to pb + Search.FieldSchema pbFieldSchema = SearchProtocolBuilder.buildFieldSchema(fieldSchema); + + // assert + assertEquals("fuzzy", pbFieldSchema.getAnalyzer()); + assertTrue(pbFieldSchema.hasAnalyzerParameter()); + Search.FuzzyAnalyzerParameter param = Search.FuzzyAnalyzerParameter.parseFrom(pbFieldSchema.getAnalyzerParameter()); + assertFalse(param.hasMinChars()); + assertEquals(4, param.getMaxChars()); + } + + @Test + public void buildFieldSchema_Fuzzy_NoMaxChars() throws InvalidProtocolBufferException { + // model + FieldSchema fieldSchema = new FieldSchema("Col_Name", FieldType.TEXT) + .setAnalyzer(FieldSchema.Analyzer.Fuzzy) + .setAnalyzerParameter(new FuzzyAnalyzerParameter().setMinChars(2)); + + // to pb + Search.FieldSchema pbFieldSchema = SearchProtocolBuilder.buildFieldSchema(fieldSchema); + + // assert + assertEquals("fuzzy", pbFieldSchema.getAnalyzer()); + assertTrue(pbFieldSchema.hasAnalyzerParameter()); + Search.FuzzyAnalyzerParameter param = Search.FuzzyAnalyzerParameter.parseFrom(pbFieldSchema.getAnalyzerParameter()); + assertEquals(2, param.getMinChars()); + assertFalse(param.hasMaxChars()); + } + + @Test + public void buildFieldSchema_Fuzzy_DefaultParam() throws InvalidProtocolBufferException { + // model + FieldSchema fieldSchema = new FieldSchema("Col_Name", FieldType.TEXT) + .setAnalyzer(FieldSchema.Analyzer.Fuzzy) + .setAnalyzerParameter(new FuzzyAnalyzerParameter()); + + // to pb + Search.FieldSchema pbFieldSchema = SearchProtocolBuilder.buildFieldSchema(fieldSchema); + + // assert + assertEquals("fuzzy", pbFieldSchema.getAnalyzer()); + assertTrue(pbFieldSchema.hasAnalyzerParameter()); + Search.FuzzyAnalyzerParameter param = Search.FuzzyAnalyzerParameter.parseFrom(pbFieldSchema.getAnalyzerParameter()); + assertFalse(param.hasMinChars()); + } + + @Test + public void buildFieldSchema_Fuzzy_NoParam() throws InvalidProtocolBufferException { + // model + FieldSchema fieldSchema = new FieldSchema("Col_Name", FieldType.TEXT) + .setAnalyzer(FieldSchema.Analyzer.Fuzzy); + + // to pb + Search.FieldSchema pbFieldSchema = SearchProtocolBuilder.buildFieldSchema(fieldSchema); + + // assert + assertEquals("fuzzy", pbFieldSchema.getAnalyzer()); + assertFalse(pbFieldSchema.hasAnalyzerParameter()); + } + + @Test + public void buildFieldSchema_MinWord() throws InvalidProtocolBufferException { + // model + FieldSchema fieldSchema = new FieldSchema("Col_Name", FieldType.TEXT) + .setAnalyzer(FieldSchema.Analyzer.MinWord); + + // to pb + Search.FieldSchema pbFieldSchema = SearchProtocolBuilder.buildFieldSchema(fieldSchema); + + // assert + assertEquals("min_word", pbFieldSchema.getAnalyzer()); + assertFalse(pbFieldSchema.hasAnalyzerParameter()); + } + + @Test + public void buildFieldSchema_MinWord_IgnoreParam() throws InvalidProtocolBufferException { + // model + FieldSchema fieldSchema = new FieldSchema("Col_Name", FieldType.TEXT) + .setAnalyzer(FieldSchema.Analyzer.MinWord) + .setAnalyzerParameter(new SingleWordAnalyzerParameter()); + + // to pb + Search.FieldSchema pbFieldSchema = SearchProtocolBuilder.buildFieldSchema(fieldSchema); + + // assert + assertEquals("min_word", pbFieldSchema.getAnalyzer()); + assertFalse(pbFieldSchema.hasAnalyzerParameter()); + } + + @Test + public void buildFieldSchema_MaxWord() throws InvalidProtocolBufferException { + // model + FieldSchema fieldSchema = new FieldSchema("Col_Name", FieldType.TEXT) + .setAnalyzer(FieldSchema.Analyzer.MaxWord); + + // to pb + Search.FieldSchema pbFieldSchema = SearchProtocolBuilder.buildFieldSchema(fieldSchema); + + // assert + assertEquals("max_word", pbFieldSchema.getAnalyzer()); + assertFalse(pbFieldSchema.hasAnalyzerParameter()); + } + + @Test + public void buildFieldSchemaVirtualField() throws InvalidProtocolBufferException { + // model + FieldSchema fieldSchema = new FieldSchema("Col_Name", FieldType.TEXT) + .setAnalyzer(FieldSchema.Analyzer.MaxWord) + .setVirtualField(true) + .setSourceFieldName("name1"); + + // to pb + Search.FieldSchema pbFieldSchema = SearchProtocolBuilder.buildFieldSchema(fieldSchema); + + // assert + assertTrue(pbFieldSchema.getIsVirtualField()); + assertEquals(fieldSchema.getSourceFieldNames(), pbFieldSchema.getSourceFieldNamesList()); + assertEquals("name1", pbFieldSchema.getSourceFieldNamesList().get(0)); + } + + @Test + public void buildFieldSchemaSourceFieldName() throws InvalidProtocolBufferException { + // model + FieldSchema fieldSchema = new FieldSchema("Col_Name", FieldType.TEXT) + .setAnalyzer(FieldSchema.Analyzer.MaxWord) + .setVirtualField(false) + .setSourceFieldNames(Arrays.asList("name1", "n2", "f3")); + + // to pb + Search.FieldSchema pbFieldSchema = SearchProtocolBuilder.buildFieldSchema(fieldSchema); + + // assert + assertFalse(pbFieldSchema.getIsVirtualField()); + assertEquals(fieldSchema.getSourceFieldNames(), pbFieldSchema.getSourceFieldNamesList()); + assertEquals("name1", pbFieldSchema.getSourceFieldNamesList().get(0)); + } + + @Test + public void buildFieldSchema_MaxWord_IgnoreParam() throws InvalidProtocolBufferException { + // model + FieldSchema fieldSchema = new FieldSchema("Col_Name", FieldType.TEXT) + .setAnalyzer(FieldSchema.Analyzer.MaxWord) + .setAnalyzerParameter(new SingleWordAnalyzerParameter()); + + // to pb + Search.FieldSchema pbFieldSchema = SearchProtocolBuilder.buildFieldSchema(fieldSchema); + + // assert + assertEquals("max_word", pbFieldSchema.getAnalyzer()); + assertFalse(pbFieldSchema.hasAnalyzerParameter()); + } + + @Test + public void buildFieldSchema_NoAnalyzer_WithParam() throws InvalidProtocolBufferException { + // model + FieldSchema fieldSchema = new FieldSchema("Col_Name", FieldType.TEXT) + .setAnalyzerParameter(new SingleWordAnalyzerParameter(true, true)); + + // to pb + Search.FieldSchema pbFieldSchema = SearchProtocolBuilder.buildFieldSchema(fieldSchema); + + // assert + assertFalse(pbFieldSchema.hasAnalyzer()); + assertFalse(pbFieldSchema.hasAnalyzerParameter()); + } + + @Test + public void buildQueryFlowWeightNoIndexName() { + QueryFlowWeight queryFlowWeight = new QueryFlowWeight(null, 100); + + try { + SearchProtocolBuilder.buildQueryFlowWeight(queryFlowWeight); + fail(); + } catch (ClientException e) { + assertEquals("[query_flow_weight.index_name] must not be null", e.getMessage()); + } catch (Exception e) { + fail(); + } + } + + @Test + public void buildQueryFlowWeightNoWeight() { + QueryFlowWeight queryFlowWeight = new QueryFlowWeight("index1", null); + + try { + SearchProtocolBuilder.buildQueryFlowWeight(queryFlowWeight); + fail(); + } catch (ClientException e) { + assertEquals("[query_flow_weight.weight] must not be null", e.getMessage()); + } catch (Exception e) { + fail(); + } + } + + @Test + public void buildQueryFlowWeightNormal() { + QueryFlowWeight queryFlowWeight = new QueryFlowWeight("index1", 80); + + Search.QueryFlowWeight pbQueryFlowWeight = SearchProtocolBuilder.buildQueryFlowWeight(queryFlowWeight); + + assertEquals("index1", pbQueryFlowWeight.getIndexName()); + assertEquals(80, pbQueryFlowWeight.getWeight()); + } + + private void assertClientException(UpdateSearchIndexRequest req, String errMsg) { + try { + SearchProtocolBuilder.buildUpdateSearchIndexRequest(req); + fail(); + } catch (ClientException e) { + assertEquals(errMsg, e.getMessage()); + } catch (Exception e) { + fail(); + } + } + + @Test + public void buildUpdateSearchIndexRequestSwitchIndex() { + UpdateSearchIndexRequest req = new UpdateSearchIndexRequest("table1", "index1_reindex", "index1"); + + Search.UpdateSearchIndexRequest pbReq = SearchProtocolBuilder.buildUpdateSearchIndexRequest(req); + + assertEquals("table1", pbReq.getTableName()); + assertEquals("index1_reindex", pbReq.getIndexName()); + assertEquals("index1", pbReq.getSwitchIndexName()); + } + + @Test + public void buildUpdateSearchIndexRequestSetQueryFlowWeightSizeIsOne() { + List weightList = Arrays.asList( + new QueryFlowWeight("index1", 20) + ); + + UpdateSearchIndexRequest req = new UpdateSearchIndexRequest("table1", "index1_reindex", weightList); + assertClientException(req, "[query_flow_weight] size must be 2"); + } + + @Test + public void buildUpdateSearchIndexRequestSetQueryFlowWeightSizeIsThree() { + List weightList = Arrays.asList( + new QueryFlowWeight("index1", 20), + new QueryFlowWeight("index1_reindex", 80), + new QueryFlowWeight("index_one_more", 100) + ); + + UpdateSearchIndexRequest req = new UpdateSearchIndexRequest("table1", "index1_reindex", weightList); + assertClientException(req, "[query_flow_weight] size must be 2"); + } + + @Test + public void buildUpdateSearchIndexRequestSetQueryFlowWeightNormal() { + List weightList = Arrays.asList( + new QueryFlowWeight("index1", 20), + new QueryFlowWeight("index1_reindex", 80) + ); + + UpdateSearchIndexRequest req = new UpdateSearchIndexRequest("table1", "index1_reindex", weightList); + Search.UpdateSearchIndexRequest pbReq = SearchProtocolBuilder.buildUpdateSearchIndexRequest(req); + + assertEquals("table1", pbReq.getTableName()); + assertEquals("index1_reindex", pbReq.getIndexName()); + + assertEquals(2, pbReq.getQueryFlowWeightCount()); + assertEquals("index1", pbReq.getQueryFlowWeight(0).getIndexName()); + assertEquals(20, pbReq.getQueryFlowWeight(0).getWeight()); + assertEquals("index1_reindex", pbReq.getQueryFlowWeight(1).getIndexName()); + assertEquals(80, pbReq.getQueryFlowWeight(1).getWeight()); + } + + @Test + public void buildUpdateSearchIndexRequestNeither() { + List weightList = Arrays.asList(); + new UpdateSearchIndexRequest("table1", "index1_reindex", weightList); + new UpdateSearchIndexRequest("table1", "index1_reindex"); + } + + @Test + public void testSetTTL() { + UpdateSearchIndexRequest req = new UpdateSearchIndexRequest("table1", "index1_reindex"); + req.setTimeToLive(1, TimeUnit.DAYS); + Search.UpdateSearchIndexRequest pbReq = SearchProtocolBuilder.buildUpdateSearchIndexRequest(req); + assertEquals("table1", pbReq.getTableName()); + assertEquals("index1_reindex", pbReq.getIndexName()); + assertEquals(TimeUnit.DAYS.toSeconds(1), pbReq.getTimeToLive()); + } +} diff --git a/src/test/java/com/alicloud/openservices/tablestore/core/protocol/TestSearchProtocolParser.java b/src/test/java/com/alicloud/openservices/tablestore/core/protocol/TestSearchProtocolParser.java new file mode 100644 index 0000000..77c6c51 --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/core/protocol/TestSearchProtocolParser.java @@ -0,0 +1,455 @@ +package com.alicloud.openservices.tablestore.core.protocol; + +import com.alicloud.openservices.tablestore.ClientException; +import com.alicloud.openservices.tablestore.core.protocol.Search.Aggregations; +import com.alicloud.openservices.tablestore.core.protocol.Search.GroupBySort; +import com.alicloud.openservices.tablestore.core.protocol.Search.GroupBys; +import com.alicloud.openservices.tablestore.model.search.FieldSchema; +import com.alicloud.openservices.tablestore.model.search.ParallelScanRequest; +import com.alicloud.openservices.tablestore.model.search.QueryFlowWeight; +import com.alicloud.openservices.tablestore.model.search.ScanQuery; +import com.alicloud.openservices.tablestore.model.search.SearchQuery; +import com.alicloud.openservices.tablestore.model.search.SearchRequest; +import com.alicloud.openservices.tablestore.model.search.agg.Aggregation; +import com.alicloud.openservices.tablestore.model.search.analysis.FuzzyAnalyzerParameter; +import com.alicloud.openservices.tablestore.model.search.analysis.SingleWordAnalyzerParameter; +import com.alicloud.openservices.tablestore.model.search.analysis.SplitAnalyzerParameter; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupBy; +import com.alicloud.openservices.tablestore.model.search.query.Query; +import com.alicloud.openservices.tablestore.model.search.sort.GroupBySorter; +import com.alicloud.openservices.tablestore.model.search.sort.Sort; +import org.junit.Test; + +import java.io.IOException; +import java.util.List; + +import static org.junit.Assert.*; + +public class TestSearchProtocolParser extends BaseSearchTest { + + @Test + public void toFieldSchema_FieldSchemaNotSet() { + Search.FieldSchema.Builder builder = Search.FieldSchema.newBuilder(); + + FieldSchema result = SearchProtocolParser.toFieldSchema(builder.build()); + assertTrue(result.isIndex()); + assertNull(result.isEnableSortAndAgg()); + assertNull(result.isStore()); + assertNull(result.isArray()); + } + + @Test + public void toFieldSchema_SingleWord() { + Search.FieldSchema.Builder builder = Search.FieldSchema.newBuilder(); + builder.setAnalyzer("single_word"); + + Search.SingleWordAnalyzerParameter.Builder b = Search.SingleWordAnalyzerParameter.newBuilder(); + b.setCaseSensitive(true); + b.setDelimitWord(true); + builder.setAnalyzerParameter(b.build().toByteString()); + + FieldSchema result = SearchProtocolParser.toFieldSchema(builder.build()); + assertEquals(FieldSchema.Analyzer.SingleWord, result.getAnalyzer()); + assertTrue(result.getAnalyzerParameter() instanceof SingleWordAnalyzerParameter); + assertTrue(((SingleWordAnalyzerParameter) result.getAnalyzerParameter()).isCaseSensitive()); + assertTrue(((SingleWordAnalyzerParameter) result.getAnalyzerParameter()).isDelimitWord()); + } + + @Test + public void toFieldSchema_SingleWord_NoCaseSensitive() { + Search.FieldSchema.Builder builder = Search.FieldSchema.newBuilder(); + builder.setAnalyzer("single_word"); + + Search.SingleWordAnalyzerParameter.Builder b = Search.SingleWordAnalyzerParameter.newBuilder(); + b.setDelimitWord(true); + builder.setAnalyzerParameter(b.build().toByteString()); + + FieldSchema result = SearchProtocolParser.toFieldSchema(builder.build()); + assertEquals(FieldSchema.Analyzer.SingleWord, result.getAnalyzer()); + assertTrue(result.getAnalyzerParameter() instanceof SingleWordAnalyzerParameter); + assertNull(((SingleWordAnalyzerParameter) result.getAnalyzerParameter()).isCaseSensitive()); + assertTrue(((SingleWordAnalyzerParameter) result.getAnalyzerParameter()).isDelimitWord()); + } + + @Test + public void toFieldSchema_SingleWord_NoDelimitWord() { + Search.FieldSchema.Builder builder = Search.FieldSchema.newBuilder(); + builder.setAnalyzer("single_word"); + + Search.SingleWordAnalyzerParameter.Builder b = Search.SingleWordAnalyzerParameter.newBuilder(); + b.setCaseSensitive(true); + builder.setAnalyzerParameter(b.build().toByteString()); + + FieldSchema result = SearchProtocolParser.toFieldSchema(builder.build()); + assertEquals(FieldSchema.Analyzer.SingleWord, result.getAnalyzer()); + assertTrue(result.getAnalyzerParameter() instanceof SingleWordAnalyzerParameter); + assertTrue(((SingleWordAnalyzerParameter) result.getAnalyzerParameter()).isCaseSensitive()); + assertNull(((SingleWordAnalyzerParameter) result.getAnalyzerParameter()).isDelimitWord()); + } + + @Test + public void toFieldSchema_SingleWord_NoParameter() { + Search.FieldSchema.Builder builder = Search.FieldSchema.newBuilder(); + builder.setAnalyzer("single_word"); + + FieldSchema result = SearchProtocolParser.toFieldSchema(builder.build()); // there's no fail + assertEquals(FieldSchema.Analyzer.SingleWord, result.getAnalyzer()); + assertNull(result.getAnalyzerParameter()); + } + + @Test + public void toFieldSchema_SingleWord_DefaultParameter() { + Search.FieldSchema.Builder builder = Search.FieldSchema.newBuilder(); + builder.setAnalyzer("single_word"); + + Search.SingleWordAnalyzerParameter.Builder b = Search.SingleWordAnalyzerParameter.newBuilder(); + builder.setAnalyzerParameter(b.build().toByteString()); + + FieldSchema result = SearchProtocolParser.toFieldSchema(builder.build()); // there's no fail + assertEquals(FieldSchema.Analyzer.SingleWord, result.getAnalyzer()); + assertNotNull(result.getAnalyzerParameter()); + assertNull(((SingleWordAnalyzerParameter) result.getAnalyzerParameter()).isCaseSensitive()); + assertNull(((SingleWordAnalyzerParameter) result.getAnalyzerParameter()).isDelimitWord()); + } + + @Test + public void toFieldSchema_Split() { + Search.FieldSchema.Builder builder = Search.FieldSchema.newBuilder(); + builder.setAnalyzer("split"); + + Search.SplitAnalyzerParameter.Builder b = Search.SplitAnalyzerParameter.newBuilder(); + b.setDelimiter("-"); + builder.setAnalyzerParameter(b.build().toByteString()); + + FieldSchema result = SearchProtocolParser.toFieldSchema(builder.build()); + assertEquals(FieldSchema.Analyzer.Split, result.getAnalyzer()); + assertTrue(result.getAnalyzerParameter() instanceof SplitAnalyzerParameter); + assertEquals("-", ((SplitAnalyzerParameter) result.getAnalyzerParameter()).getDelimiter()); + } + + @Test + public void toFieldSchema_Split_NoParameter() { + Search.FieldSchema.Builder builder = Search.FieldSchema.newBuilder(); + builder.setAnalyzer("split"); + + FieldSchema result = SearchProtocolParser.toFieldSchema(builder.build()); + assertEquals(FieldSchema.Analyzer.Split, result.getAnalyzer()); + assertTrue(result.getAnalyzerParameter() == null); + } + + @Test + public void toFieldSchema_Split_DefaultParam() { + Search.FieldSchema.Builder builder = Search.FieldSchema.newBuilder(); + builder.setAnalyzer("split"); + + Search.SplitAnalyzerParameter.Builder b = Search.SplitAnalyzerParameter.newBuilder(); + builder.setAnalyzerParameter(b.build().toByteString()); + + FieldSchema result = SearchProtocolParser.toFieldSchema(builder.build()); + assertEquals(FieldSchema.Analyzer.Split, result.getAnalyzer()); + assertTrue(result.getAnalyzerParameter() instanceof SplitAnalyzerParameter); + assertNull(((SplitAnalyzerParameter) result.getAnalyzerParameter()).getDelimiter()); + } + + @Test + public void toFieldSchema_Fuzzy() { + Search.FieldSchema.Builder builder = Search.FieldSchema.newBuilder(); + builder.setAnalyzer("fuzzy"); + + Search.FuzzyAnalyzerParameter.Builder b = Search.FuzzyAnalyzerParameter.newBuilder(); + b.setMinChars(2); + b.setMaxChars(3); + builder.setAnalyzerParameter(b.build().toByteString()); + + FieldSchema result = SearchProtocolParser.toFieldSchema(builder.build()); + assertEquals(FieldSchema.Analyzer.Fuzzy, result.getAnalyzer()); + assertTrue(result.getAnalyzerParameter() instanceof FuzzyAnalyzerParameter); + assertEquals(2, ((FuzzyAnalyzerParameter) result.getAnalyzerParameter()).getMinChars().intValue()); + assertEquals(3, ((FuzzyAnalyzerParameter) result.getAnalyzerParameter()).getMaxChars().intValue()); + } + + @Test + public void toFieldSchema_Fuzzy_NoMinChars() { + Search.FieldSchema.Builder builder = Search.FieldSchema.newBuilder(); + builder.setAnalyzer("fuzzy"); + + Search.FuzzyAnalyzerParameter.Builder b = Search.FuzzyAnalyzerParameter.newBuilder(); + b.setMaxChars(3); + builder.setAnalyzerParameter(b.build().toByteString()); + + FieldSchema result = SearchProtocolParser.toFieldSchema(builder.build()); + assertEquals(FieldSchema.Analyzer.Fuzzy, result.getAnalyzer()); + assertTrue(result.getAnalyzerParameter() instanceof FuzzyAnalyzerParameter); + assertNull(((FuzzyAnalyzerParameter) result.getAnalyzerParameter()).getMinChars()); + assertEquals(3, ((FuzzyAnalyzerParameter) result.getAnalyzerParameter()).getMaxChars().intValue()); + } + + @Test + public void toFieldSchema_Fuzzy_NoMaxChars() { + Search.FieldSchema.Builder builder = Search.FieldSchema.newBuilder(); + builder.setAnalyzer("fuzzy"); + + Search.FuzzyAnalyzerParameter.Builder b = Search.FuzzyAnalyzerParameter.newBuilder(); + b.setMinChars(1); + builder.setAnalyzerParameter(b.build().toByteString()); + + FieldSchema result = SearchProtocolParser.toFieldSchema(builder.build()); + assertEquals(FieldSchema.Analyzer.Fuzzy, result.getAnalyzer()); + assertTrue(result.getAnalyzerParameter() instanceof FuzzyAnalyzerParameter); + assertEquals(1, ((FuzzyAnalyzerParameter) result.getAnalyzerParameter()).getMinChars().intValue()); + assertNull(((FuzzyAnalyzerParameter) result.getAnalyzerParameter()).getMaxChars()); + } + + @Test + public void toFieldSchema_Fuzzy_NoParameter() { + Search.FieldSchema.Builder builder = Search.FieldSchema.newBuilder(); + builder.setAnalyzer("fuzzy"); + + FieldSchema result = SearchProtocolParser.toFieldSchema(builder.build()); + assertEquals(FieldSchema.Analyzer.Fuzzy, result.getAnalyzer()); + assertNull(result.getAnalyzerParameter()); + } + + @Test + public void toFieldSchema_Fuzzy_DefaultParameter() { + Search.FieldSchema.Builder builder = Search.FieldSchema.newBuilder(); + builder.setAnalyzer("fuzzy"); + + Search.FuzzyAnalyzerParameter.Builder b = Search.FuzzyAnalyzerParameter.newBuilder(); + builder.setAnalyzerParameter(b.build().toByteString()); + + FieldSchema result = SearchProtocolParser.toFieldSchema(builder.build()); + assertEquals(FieldSchema.Analyzer.Fuzzy, result.getAnalyzer()); + assertTrue(result.getAnalyzerParameter() instanceof FuzzyAnalyzerParameter); + assertNull(((FuzzyAnalyzerParameter) result.getAnalyzerParameter()).getMinChars()); + assertNull(((FuzzyAnalyzerParameter) result.getAnalyzerParameter()).getMaxChars()); + } + + @Test + public void toFieldSchema_MinWord() { + Search.FieldSchema.Builder builder = Search.FieldSchema.newBuilder(); + builder.setAnalyzer("min_word"); + + FieldSchema result = SearchProtocolParser.toFieldSchema(builder.build()); + assertEquals(FieldSchema.Analyzer.MinWord, result.getAnalyzer()); + assertNull(result.getAnalyzerParameter()); + } + + @Test + public void toFieldSchema_MaxWord() { + Search.FieldSchema.Builder builder = Search.FieldSchema.newBuilder(); + builder.setAnalyzer("max_word"); + + FieldSchema result = SearchProtocolParser.toFieldSchema(builder.build()); + assertEquals(FieldSchema.Analyzer.MaxWord, result.getAnalyzer()); + assertNull(result.getAnalyzerParameter()); + } + + @Test + public void toFieldSchema_VirtualField() { + { + Search.FieldSchema.Builder builder = Search.FieldSchema.newBuilder(); + builder.setIsVirtualField(true); + builder.addSourceFieldNames("123"); + + FieldSchema result = SearchProtocolParser.toFieldSchema(builder.build()); + assertNotNull(result.isVirtualField()); + assertTrue(result.isVirtualField()); + List sourceFieldNames = result.getSourceFieldNames(); + assertEquals(1, sourceFieldNames.size()); + assertEquals("123", sourceFieldNames.get(0)); + } + { + Search.FieldSchema.Builder builder = Search.FieldSchema.newBuilder(); + builder.setIsVirtualField(false); + + FieldSchema result = SearchProtocolParser.toFieldSchema(builder.build()); + assertNotNull(result.isVirtualField()); + assertFalse(result.isVirtualField()); + List sourceFieldNames = result.getSourceFieldNames(); + assertEquals(0, sourceFieldNames.size()); + } + { + Search.FieldSchema.Builder builder = Search.FieldSchema.newBuilder(); + builder.addSourceFieldNames("123"); + builder.addSourceFieldNames("456f"); + + FieldSchema result = SearchProtocolParser.toFieldSchema(builder.build()); + assertNull(result.isVirtualField()); + List sourceFieldNames = result.getSourceFieldNames(); + assertEquals(2, sourceFieldNames.size()); + assertEquals("123", sourceFieldNames.get(0)); + assertEquals("456f", sourceFieldNames.get(1)); + } + } + + private void assertClientException(Search.FieldSchema fieldSchema, String errMsg) { + try { + SearchProtocolParser.toFieldSchema(fieldSchema); + fail(); + } catch (ClientException e) { + assertEquals(errMsg, e.getMessage()); + } catch (Exception e) { + fail(); + } + } + + + @Test + public void toFieldSchema_InvalidAnalyzer() { + Search.FieldSchema.Builder builder = Search.FieldSchema.newBuilder(); + builder.setAnalyzer("invalid_analyzer"); + assertClientException(builder.build(), "Unknown analyzer"); + } + + private void assertClientException(Search.QueryFlowWeight queryFlowWeight, String errMsg) { + try { + SearchProtocolParser.toQueryFlowWeight(queryFlowWeight); + fail(); + } catch (ClientException e) { + assertEquals(errMsg, e.getMessage()); + } catch (Exception e) { + fail(); + } + } + + @Test + public void toQueryFlowWeightNoIndexName() { + Search.QueryFlowWeight.Builder builder = Search.QueryFlowWeight.newBuilder(); + builder.setWeight(100); + assertClientException(builder.build(), "[query_flow_weight] has no index name"); + } + + @Test + public void toQueryFlowWeightNoWeight() { + Search.QueryFlowWeight.Builder builder = Search.QueryFlowWeight.newBuilder(); + builder.setIndexName("index1"); + assertClientException(builder.build(), "[query_flow_weight] has no weight"); + } + + @Test + public void toQueryFlowWeightNormal() { + Search.QueryFlowWeight.Builder builder = Search.QueryFlowWeight.newBuilder(); + builder.setIndexName("index1"); + builder.setWeight(80); + + QueryFlowWeight queryFlowWeight = SearchProtocolParser.toQueryFlowWeight(builder.build()); + + assertEquals("index1", queryFlowWeight.getIndexName()); + assertEquals(80, queryFlowWeight.getWeight().intValue()); + + } + + + @Test + public void testSortSerialization() throws IOException { + Sort origin = randomSort(); + Search.Sort pb = SearchSortBuilder.buildSort(origin); + Sort newObj = SearchSortParser.toSort(pb); + assertJsonEquals(origin, newObj); + } + + @Test + public void testGroupBySortSerialization() throws IOException { + List origin = randomGroupBySorterList(); + GroupBySort pb = SearchSortBuilder.buildGroupBySort(origin); + List newObj = SearchSortParser.toGroupBySort(pb); + assertJsonEquals(origin, newObj); + } + + @Test + public void testAggregationsSerialization() throws IOException { + List origin = randomAggregations(); + Aggregations pb = SearchAggregationBuilder.buildAggregations(origin); + List newObj = SearchAggregationParser.toAggregations(pb); + assertJsonEquals(origin, newObj); + } + + @Test + public void testGroupBysSerialization() throws IOException { + List origin = randomGroupBys(); + GroupBys pb = SearchGroupByBuilder.buildGroupBys(origin); + List newObj = SearchGroupByParser.toGroupBys(pb); + assertJsonEquals(origin, newObj); + } + + @Test + public void testQuerySerialization() throws IOException { + { + Query origin = randomQuery(); + Search.Query pb = SearchQueryBuilder.buildQuery(origin); + Query newObj = SearchQueryParser.toQuery(pb); + assertJsonEquals(origin, newObj); + } + { + Query origin = randomQuery(); + byte[] pb = SearchQueryBuilder.buildQueryToBytes(origin); + Query newObj = SearchQueryParser.toQuery(pb); + assertJsonEquals(origin, newObj); + } + } + + @Test + public void testSearchQuerySerialization() throws IOException { + { + SearchQuery origin = randomSearchQuery(); + Search.SearchQuery pb = SearchProtocolBuilder.buildSearchQuery(origin); + SearchQuery newObj = SearchProtocolParser.toSearchQuery(pb.toByteString()); + assertJsonEquals(origin, newObj); + } + { + SearchQuery origin = randomSearchQuery(); + byte[] pb = SearchProtocolBuilder.buildSearchQueryToBytes(origin); + SearchQuery newObj = SearchProtocolParser.toSearchQuery(pb); + assertJsonEquals(origin, newObj); + } + } + + @Test + public void testSearchRequestSerialization() throws IOException { + { + SearchRequest origin = randomSearchRequest(); + Search.SearchRequest pb = SearchProtocolBuilder.buildSearchRequest(origin); + SearchRequest newObj = SearchProtocolParser.toSearchRequest(pb.toByteString()); + assertJsonEquals(origin, newObj); + } + { + SearchRequest origin = randomSearchRequest(); + byte[] pb = SearchProtocolBuilder.buildSearchRequestToBytes(origin); + SearchRequest newObj = SearchProtocolParser.toSearchRequest(pb); + assertJsonEquals(origin, newObj); + } + } + + @Test + public void testScanQuerySerialization() throws IOException { + { + ScanQuery origin = randomScanQuery(); + Search.ScanQuery pb = SearchProtocolBuilder.buildScanQuery(origin); + ScanQuery newObj = SearchProtocolParser.toScanQuery(pb.toByteString()); + assertJsonEquals(origin, newObj); + } + { + ScanQuery origin = randomScanQuery(); + byte[] pb = SearchProtocolBuilder.buildScanQueryToBytes(origin); + ScanQuery newObj = SearchProtocolParser.toScanQuery(pb); + assertJsonEquals(origin, newObj); + } + } + + @Test + public void testParallelScanRequestSerialization() throws IOException { + { + ParallelScanRequest origin = randomParallelScanRequest(); + Search.ParallelScanRequest pb = SearchProtocolBuilder.buildParallelScanRequest(origin); + ParallelScanRequest newObj = SearchProtocolParser.toParallelScanRequest(pb.toByteString()); + assertJsonEquals(origin, newObj); + } + { + ParallelScanRequest origin = randomParallelScanRequest(); + byte[] pb = SearchProtocolBuilder.buildParallelScanRequestToBytes(origin); + ParallelScanRequest newObj = SearchProtocolParser.toParallelScanRequest(pb); + assertJsonEquals(origin, newObj); + } + } +} diff --git a/src/test/java/com/alicloud/openservices/tablestore/core/protocol/TestSearchQueryBuilder.java b/src/test/java/com/alicloud/openservices/tablestore/core/protocol/TestSearchQueryBuilder.java new file mode 100644 index 0000000..208b1b5 --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/core/protocol/TestSearchQueryBuilder.java @@ -0,0 +1,456 @@ +package com.alicloud.openservices.tablestore.core.protocol; + +import com.alicloud.openservices.tablestore.model.ColumnValue; +import com.alicloud.openservices.tablestore.model.search.SearchQuery; +import com.alicloud.openservices.tablestore.model.search.query.*; + +import com.google.protobuf.ByteString; +import org.junit.Test; + +import java.util.Arrays; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.fail; + +public class TestSearchQueryBuilder extends BaseSearchTest { + // exists query + @Test + public void testExistsQuery() { + ExistsQuery query = new ExistsQuery(); + query.setFieldName("FieldName"); + + Search.Query queryPB = SearchQueryBuilder.buildQuery(query); + assertEquals(Search.QueryType.EXISTS_QUERY, queryPB.getType()); + + Search.ExistsQuery.Builder builder = Search.ExistsQuery.newBuilder(); + builder.setFieldName("FieldName"); + assertEquals(builder.build().toByteString(), queryPB.getQuery()); + } + + @Test + public void testExistsQueryEmptyFieldName() { + ExistsQuery query = new ExistsQuery(); + + try { + SearchQueryBuilder.buildQuery(query); + fail(); + } catch (NullPointerException ignored) { + } + } + + @Test + public void testEmptyQuery() { + SearchQuery searchQuery = new SearchQuery(); + + try { + SearchQueryBuilder.buildQuery(searchQuery.getQuery()); + fail(); + } catch (NullPointerException ignored) { + } + } + + // match phrase query + @Test + public void testMatchPhraseQuery() { + MatchPhraseQuery query = new MatchPhraseQuery(); + query.setFieldName("FieldName"); + query.setText("FieldValue"); + query.setWeight(2.0f); + + Search.Query queryPB = SearchQueryBuilder.buildQuery(query); + assertEquals(Search.QueryType.MATCH_PHRASE_QUERY, queryPB.getType()); + + Search.MatchPhraseQuery.Builder builder = Search.MatchPhraseQuery.newBuilder(); + builder.setFieldName("FieldName"); + builder.setText("FieldValue"); + builder.setWeight(2.0f); + assertEquals(builder.build().toByteString(), queryPB.getQuery()); + } + + @Test + public void testMatchPhraseQueryEmptyFieldName() { + MatchPhraseQuery query = new MatchPhraseQuery(); + + try { + SearchQueryBuilder.buildQuery(query); + fail(); + } catch (NullPointerException ignored) { + } + } + + @Test + public void testMatchPhraseQueryEmptyWeight() { + MatchPhraseQuery query = new MatchPhraseQuery(); + query.setFieldName("FieldName"); + query.setText("FieldValue"); + + Search.Query queryPB = SearchQueryBuilder.buildQuery(query); + Search.MatchPhraseQuery.Builder builder = Search.MatchPhraseQuery.newBuilder(); + builder.setFieldName("FieldName"); + builder.setText("FieldValue"); + builder.setWeight(1.0f); // weight is 1.0 by default + assertEquals(builder.build().toByteString(), queryPB.getQuery()); + + } + + // nested query + @Test + public void testNestedQuery() { + TermQuery termQuery = new TermQuery(); + termQuery.setFieldName("user.first_name"); + termQuery.setTerm(ColumnValue.fromString("Samuel")); + + NestedQuery query = new NestedQuery(); + query.setPath("user"); + query.setQuery(termQuery); + query.setScoreMode(ScoreMode.None); + query.setWeight(2.0f); + + Search.Query queryPB = SearchQueryBuilder.buildQuery(query); + + // assert + Search.Query.Builder builder = Search.Query.newBuilder(); + builder.setQuery(query.serialize()); + builder.setType(Search.QueryType.NESTED_QUERY); + + assertEquals(builder.build().getQuery(), queryPB.getQuery()); + assertEquals(Search.QueryType.NESTED_QUERY, queryPB.getType()); + } + + @Test + public void testNestedQueryEmptyPath() { + TermQuery termQuery = new TermQuery(); + termQuery.setFieldName("user.first_name"); + termQuery.setTerm(ColumnValue.fromString("Samuel")); + + NestedQuery query = new NestedQuery(); + //query.setPath("user"); + query.setQuery(termQuery); + query.setScoreMode(ScoreMode.None); + query.setWeight(2.0f); + + try { + SearchQueryBuilder.buildQuery(query); + } catch (NullPointerException ignored) { + } + } + + @Test + public void testNestedQueryEmptyTermQuery() { + TermQuery termQuery = new TermQuery(); + termQuery.setFieldName("user.first_name"); + termQuery.setTerm(ColumnValue.fromString("Samuel")); + + NestedQuery query = new NestedQuery(); + query.setPath("user"); + //query.setQuery(termQuery); + query.setScoreMode(ScoreMode.None); + query.setWeight(2.0f); + + try { + SearchQueryBuilder.buildQuery(query); + } catch (NullPointerException ignored) { + } + } + + @Test + public void testNestedQueryEmptyScoreMode() { + TermQuery termQuery = new TermQuery(); + termQuery.setFieldName("user.first_name"); + termQuery.setTerm(ColumnValue.fromString("Samuel")); + + NestedQuery query = new NestedQuery(); + query.setPath("user"); + query.setQuery(termQuery); + //query.setScoreMode(ScoreMode.None); + query.setWeight(2.0f); + + try { + SearchQueryBuilder.buildQuery(query); + } catch (IllegalArgumentException ignored) { + } + } + + @Test + public void testNestedQueryEmptyWeight() { + TermQuery termQuery = new TermQuery(); + termQuery.setFieldName("user.first_name"); + termQuery.setTerm(ColumnValue.fromString("Samuel")); + + NestedQuery query = new NestedQuery(); + query.setPath("user"); + query.setQuery(termQuery); + query.setScoreMode(ScoreMode.None); + //query.setWeight(2.0f); + + Search.Query queryPB = SearchQueryBuilder.buildQuery(query); + + // assert + NestedQuery query2 = new NestedQuery(); + query2.setPath("user"); + query2.setQuery(termQuery); + query2.setScoreMode(ScoreMode.None); + query2.setWeight(1.0f); // weight is 1.0 by default + + Search.Query.Builder builder = Search.Query.newBuilder(); + builder.setQuery(query2.serialize()); + builder.setType(Search.QueryType.NESTED_QUERY); + + assertEquals(builder.build().getQuery(), queryPB.getQuery()); + assertEquals(Search.QueryType.NESTED_QUERY, queryPB.getType()); + } + + // prefix query + @Test + public void testPrefixQuery() { + PrefixQuery query = new PrefixQuery(); + query.setFieldName("FieldName"); + query.setPrefix("FieldValue"); + query.setWeight(2.0f); + + Search.Query queryPB = SearchQueryBuilder.buildQuery(query); + assertEquals(Search.QueryType.PREFIX_QUERY, queryPB.getType()); + + Search.PrefixQuery.Builder builder = Search.PrefixQuery.newBuilder(); + builder.setFieldName("FieldName"); + builder.setPrefix("FieldValue"); + builder.setWeight(2.0f); + assertEquals(builder.build().toByteString(), queryPB.getQuery()); + } + + @Test + public void testPrefixQueryEmptyFieldName() { + PrefixQuery query = new PrefixQuery(); + //query.setFieldName("FieldName"); + query.setPrefix("FieldValue"); + query.setWeight(2.0f); + + try { + SearchQueryBuilder.buildQuery(query); + fail(); + } catch (NullPointerException ignored) { + } + } + + @Test + public void testPrefixQueryEmptyFieldValue() { + PrefixQuery query = new PrefixQuery(); + query.setFieldName("FieldName"); + //query.setPrefix("FieldValue"); + query.setWeight(2.0f); + + try { + SearchQueryBuilder.buildQuery(query); + fail(); + } catch (NullPointerException ignored) { + } + } + + @Test + public void testPrefixQueryEmptyWeight() { + PrefixQuery query = new PrefixQuery(); + query.setFieldName("FieldName"); + query.setPrefix("FieldValue"); + //query.setWeight(2.0f); + + Search.Query queryPB = SearchQueryBuilder.buildQuery(query); + assertEquals(Search.QueryType.PREFIX_QUERY, queryPB.getType()); + + Search.PrefixQuery.Builder builder = Search.PrefixQuery.newBuilder(); + builder.setFieldName("FieldName"); + builder.setPrefix("FieldValue"); + builder.setWeight(1.0f); // weight is 1.0 by default + assertEquals(builder.build().toByteString(), queryPB.getQuery()); + } + + // term query + @Test + public void testTermQuery() { + TermQuery query = new TermQuery(); + query.setFieldName("FieldName"); + query.setTerm(ColumnValue.fromString("FieldValue")); + query.setWeight(2.0f); + + Search.Query queryPB = SearchQueryBuilder.buildQuery(query); + assertEquals(Search.QueryType.TERM_QUERY, queryPB.getType()); + + Search.TermQuery.Builder builder = Search.TermQuery.newBuilder(); + builder.setFieldName("FieldName"); + builder.setTerm(ByteString.copyFrom(SearchVariantType.toVariant(ColumnValue.fromString("FieldValue")))); + builder.setWeight(2.0f); + assertEquals(builder.build().toByteString(), queryPB.getQuery()); + } + + @Test + public void testTermQueryEmptyFieldName() { + TermQuery query = new TermQuery(); + //query.setFieldName("FieldName"); + query.setTerm(ColumnValue.fromString("FieldValue")); + query.setWeight(2.0f); + + try { + SearchQueryBuilder.buildQuery(query); + fail(); + } catch (NullPointerException ignored) { + } + } + + @Test + public void testTermQueryEmptyTerm() { + TermQuery query = new TermQuery(); + query.setFieldName("FieldName"); + //query.setTerm(ColumnValue.fromString("FieldValue")); + query.setWeight(2.0f); + + try { + SearchQueryBuilder.buildQuery(query); + fail(); + } catch (NullPointerException ignored) { + } + } + + @Test + public void testTermQueryEmptyWeight() { + TermQuery query = new TermQuery(); + query.setFieldName("FieldName"); + query.setTerm(ColumnValue.fromString("FieldValue")); + //query.setWeight(2.0f); + + Search.Query queryPB = SearchQueryBuilder.buildQuery(query); + assertEquals(Search.QueryType.TERM_QUERY, queryPB.getType()); + + Search.TermQuery.Builder builder = Search.TermQuery.newBuilder(); + builder.setFieldName("FieldName"); + builder.setTerm(ByteString.copyFrom(SearchVariantType.toVariant(ColumnValue.fromString("FieldValue")))); + builder.setWeight(1.0f); // weight is 1.0 by default + assertEquals(builder.build().toByteString(), queryPB.getQuery()); + } + + // terms query + @Test + public void testTermsQuery() { + TermsQuery query = new TermsQuery(); + query.setFieldName("FieldName"); + query.setTerms(Arrays.asList(ColumnValue.fromString("FieldValue1"), ColumnValue.fromString("FieldValue2"))); + query.setWeight(2.0f); + + Search.Query queryPB = SearchQueryBuilder.buildQuery(query); + assertEquals(Search.QueryType.TERMS_QUERY, queryPB.getType()); + + Search.TermsQuery.Builder builder = Search.TermsQuery.newBuilder(); + builder.setFieldName("FieldName"); + builder.addTerms(ByteString.copyFrom(SearchVariantType.toVariant(ColumnValue.fromString("FieldValue1")))); + builder.addTerms(ByteString.copyFrom(SearchVariantType.toVariant(ColumnValue.fromString("FieldValue2")))); + builder.setWeight(2.0f); + assertEquals(builder.build().toByteString(), queryPB.getQuery()); + } + + @Test + public void testTermsQueryEmptyFieldName() { + TermsQuery query = new TermsQuery(); + //query.setFieldName("FieldName"); + query.setTerms(Arrays.asList(ColumnValue.fromString("FieldValue1"), ColumnValue.fromString("FieldValue2"))); + query.setWeight(2.0f); + + try { + SearchQueryBuilder.buildQuery(query); + fail(); + } catch (NullPointerException ignored) { + } + } + + @Test + public void testTermsQueryEmptyTerms() { + TermsQuery query = new TermsQuery(); + query.setFieldName("FieldName"); + //query.setTerms(Arrays.asList(ColumnValue.fromString("FieldValue1"), ColumnValue.fromString("FieldValue2"))); + query.setWeight(2.0f); + + try { + SearchQueryBuilder.buildQuery(query); + fail(); + } catch (IllegalArgumentException ignored) { + } + } + + @Test + public void testTermsQueryEmptyWeight() { + TermsQuery query = new TermsQuery(); + query.setFieldName("FieldName"); + query.setTerms(Arrays.asList(ColumnValue.fromString("FieldValue1"), ColumnValue.fromString("FieldValue2"))); + //query.setWeight(2.0f); + + Search.Query queryPB = SearchQueryBuilder.buildQuery(query); + assertEquals(Search.QueryType.TERMS_QUERY, queryPB.getType()); + + Search.TermsQuery.Builder builder = Search.TermsQuery.newBuilder(); + builder.setFieldName("FieldName"); + builder.addTerms(ByteString.copyFrom(SearchVariantType.toVariant(ColumnValue.fromString("FieldValue1")))); + builder.addTerms(ByteString.copyFrom(SearchVariantType.toVariant(ColumnValue.fromString("FieldValue2")))); + builder.setWeight(1.0f); // weight is 1.0 by default + assertEquals(builder.build().toByteString(), queryPB.getQuery()); + } + + // term query + @Test + public void testWildcardQuery() { + WildcardQuery query = new WildcardQuery(); + query.setFieldName("FieldName"); + query.setValue("FieldValue"); + query.setWeight(2.0f); + + Search.Query queryPB = SearchQueryBuilder.buildQuery(query); + assertEquals(Search.QueryType.WILDCARD_QUERY, queryPB.getType()); + + Search.WildcardQuery.Builder builder = Search.WildcardQuery.newBuilder(); + builder.setFieldName("FieldName"); + builder.setValue("FieldValue"); + builder.setWeight(2.0f); + assertEquals(builder.build().toByteString(), queryPB.getQuery()); + } + + @Test + public void testWildcardQueryEmptyFieldName() { + WildcardQuery query = new WildcardQuery(); + //query.setFieldName("FieldName"); + query.setValue("FieldValue"); + query.setWeight(2.0f); + + try { + SearchQueryBuilder.buildQuery(query); + fail(); + } catch (NullPointerException ignored) { + } + } + + @Test + public void testWildcardQueryEmptyValue() { + WildcardQuery query = new WildcardQuery(); + query.setFieldName("FieldName"); + //query.setValue("FieldValue"); + query.setWeight(2.0f); + + try { + SearchQueryBuilder.buildQuery(query); + fail(); + } catch (NullPointerException ignored) { + } + } + + @Test + public void testWildcardQueryEmptyWeight() { + WildcardQuery query = new WildcardQuery(); + query.setFieldName("FieldName"); + query.setValue("FieldValue"); + //query.setWeight(2.0f); + + Search.Query queryPB = SearchQueryBuilder.buildQuery(query); + assertEquals(Search.QueryType.WILDCARD_QUERY, queryPB.getType()); + + Search.WildcardQuery.Builder builder = Search.WildcardQuery.newBuilder(); + builder.setFieldName("FieldName"); + builder.setValue("FieldValue"); + builder.setWeight(1.0f); // weight is 1.0 by default + assertEquals(builder.build().toByteString(), queryPB.getQuery()); + } +} diff --git a/src/test/java/com/alicloud/openservices/tablestore/core/utils/HttpUtilTest.java b/src/test/java/com/alicloud/openservices/tablestore/core/utils/HttpUtilTest.java new file mode 100644 index 0000000..0ba7aa0 --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/core/utils/HttpUtilTest.java @@ -0,0 +1,38 @@ +package com.alicloud.openservices.tablestore.core.utils; + +import org.junit.Test; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.fail; + +public class HttpUtilTest { + @Test + public void testValidateEndpoint() { + assertEquals(true, HttpUtil.validateEndpointArgs("http://test.cn-hangzhou.aliyuncs.com")); + assertEquals(true, HttpUtil.validateEndpointArgs("http://test.cn-hangzhou.aliyuncs.com/")); + assertEquals(true, HttpUtil.validateEndpointArgs("https://test.cn-hangzhou.aliyuncs.com")); + assertEquals(true, HttpUtil.validateEndpointArgs("https://10.10.11.1")); + assertEquals(true, HttpUtil.validateEndpointArgs("https://test")); + assertEquals(true, HttpUtil.validateEndpointArgs("HTTP://test")); + assertEquals(true, HttpUtil.validateEndpointArgs("HTTPs://test")); + assertEquals(true, HttpUtil.validateEndpointArgs("HTTPS://test")); + assertEquals(true, HttpUtil.validateEndpointArgs("https://test.cn-hangzhou.aliyuncs.com/")); + assertEquals(true, HttpUtil.validateEndpointArgs("https://test.cn-hangzhou.aliyuncs.com:80/")); + assertEquals(true, HttpUtil.validateEndpointArgs("https://test.cn-hangzhou.aliyuncs.com:80")); + assertEquals(true, HttpUtil.validateEndpointArgs("https://test.cn-hangzhou.aliyuncs.com:8090/")); + assertEquals(false, HttpUtil.validateEndpointArgs("https://test.cn-hangzhou.aliyuncs.com:8090a/")); + assertEquals(false, HttpUtil.validateEndpointArgs("test.cn-hangzhou.aliyuncs.com/")); + assertEquals(false, HttpUtil.validateEndpointArgs("http://test.cn-hangzhou.aliyuncs.com/s")); + assertEquals(false, HttpUtil.validateEndpointArgs("https://test?.cn-hangzhou.aliyuncs.com/")); + } + + @Test + public void testSSRFCheck() { + assertEquals(true, HttpUtil.checkSSRF("ots-zzf")); + assertEquals(true, HttpUtil.checkSSRF("abcd")); + assertEquals(true, HttpUtil.checkSSRF("12345")); + assertEquals(true, HttpUtil.checkSSRF("abc_def")); + assertEquals(true, HttpUtil.checkSSRF("Abcd0192_232-efe")); + assertEquals(false, HttpUtil.checkSSRF("sda*2")); + } +} diff --git a/src/test/java/com/alicloud/openservices/tablestore/core/utils/NumberUtilsTest.java b/src/test/java/com/alicloud/openservices/tablestore/core/utils/NumberUtilsTest.java new file mode 100644 index 0000000..260235f --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/core/utils/NumberUtilsTest.java @@ -0,0 +1,33 @@ +package com.alicloud.openservices.tablestore.core.utils; + +import org.junit.Assert; +import org.junit.Test; + +import java.util.Random; + +public class NumberUtilsTest { + + @Test + public void longToInt() { + // normal + Random random = new Random(); + for (int i = 0; i < 1000; i++) { + int nextInt = random.nextInt(Integer.MAX_VALUE); + Assert.assertEquals(nextInt, NumberUtils.longToInt(nextInt)); + } + + // too large + for (int i = 0; i < 1000; i++) { + int nextInt = random.nextInt(Integer.MAX_VALUE); + try { + int longToInt = NumberUtils.longToInt((long) nextInt + Integer.MAX_VALUE); + Assert.fail(); + } catch (Exception e) { + Assert.assertEquals(e.getClass(), ArithmeticException.class); + Assert.assertEquals("integer overflow", e.getMessage()); + } + } + + + } +} \ No newline at end of file diff --git a/src/test/java/com/alicloud/openservices/tablestore/core/utils/Repeat.java b/src/test/java/com/alicloud/openservices/tablestore/core/utils/Repeat.java new file mode 100644 index 0000000..bd34aee --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/core/utils/Repeat.java @@ -0,0 +1,13 @@ +package com.alicloud.openservices.tablestore.core.utils; + +import static java.lang.annotation.ElementType.ANNOTATION_TYPE; +import static java.lang.annotation.ElementType.METHOD; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention( RetentionPolicy.RUNTIME ) +@Target({ METHOD, ANNOTATION_TYPE }) +public @interface Repeat { + int value() default 1; +} \ No newline at end of file diff --git a/src/test/java/com/alicloud/openservices/tablestore/core/utils/RepeatRule.java b/src/test/java/com/alicloud/openservices/tablestore/core/utils/RepeatRule.java new file mode 100644 index 0000000..7f18b70 --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/core/utils/RepeatRule.java @@ -0,0 +1,45 @@ +package com.alicloud.openservices.tablestore.core.utils; + +import org.junit.rules.TestRule; +import org.junit.runner.Description; +import org.junit.runners.model.Statement; + +public class RepeatRule implements TestRule { + + private final int defaultTimes; + + public RepeatRule(int defaultTimes) { + this.defaultTimes = defaultTimes; + } + + private static class RepeatStatement extends Statement { + private final Statement statement; + private final int repeat; + + public RepeatStatement(Statement statement, int repeat) { + this.statement = statement; + this.repeat = repeat; + } + + @Override + public void evaluate() throws Throwable { + for (int i = 0; i < repeat; i++) { + statement.evaluate(); + } + } + + } + + @Override + public Statement apply(Statement statement, Description description) { + Statement result; + Repeat repeat = description.getAnnotation(Repeat.class); + if (repeat != null) { + int times = repeat.value(); + result = new RepeatStatement(statement, times); + } else { + result = new RepeatStatement(statement, defaultTimes); + } + return result; + } +} \ No newline at end of file diff --git a/src/test/java/com/alicloud/openservices/tablestore/core/utils/StringUtilTest.java b/src/test/java/com/alicloud/openservices/tablestore/core/utils/StringUtilTest.java new file mode 100644 index 0000000..f040d6c --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/core/utils/StringUtilTest.java @@ -0,0 +1,27 @@ +package com.alicloud.openservices.tablestore.core.utils; + +import com.alicloud.openservices.tablestore.core.Constants; +import org.junit.Test; + +import static org.junit.Assert.assertEquals; + +public class StringUtilTest { + @Test + public void testRegexMatch() { + assertEquals(true, StringUtils.matchRegexPattern(Constants.ACCESSKEYID_REGEX, "a")); + assertEquals(true, StringUtils.matchRegexPattern(Constants.ACCESSKEYID_REGEX, "abc/s")); + assertEquals(true, StringUtils.matchRegexPattern(Constants.ACCESSKEYID_REGEX, "abc.s")); + assertEquals(true, StringUtils.matchRegexPattern(Constants.ACCESSKEYID_REGEX, "abc_a")); + assertEquals(true, StringUtils.matchRegexPattern(Constants.ACCESSKEYID_REGEX, "abc-a")); + assertEquals(true, StringUtils.matchRegexPattern(Constants.ACCESSKEYID_REGEX, "_")); + assertEquals(true, StringUtils.matchRegexPattern(Constants.ACCESSKEYID_REGEX, "-")); + assertEquals(true, StringUtils.matchRegexPattern(Constants.ACCESSKEYID_REGEX, "/")); + assertEquals(true, StringUtils.matchRegexPattern(Constants.ACCESSKEYID_REGEX, ".")); + assertEquals(true, StringUtils.matchRegexPattern(Constants.ACCESSKEYID_REGEX, "+")); + assertEquals(true, StringUtils.matchRegexPattern(Constants.ACCESSKEYID_REGEX, "45tzcjfdcsau3dsuo9du2k6g")); + assertEquals(true, StringUtils.matchRegexPattern(Constants.ACCESSKEYID_REGEX, "STS.NTAqTQC8MEi51BZu2MJZk3ton")); + assertEquals(false, StringUtils.matchRegexPattern(Constants.ACCESSKEYID_REGEX, "abc&s")); + assertEquals(false, StringUtils.matchRegexPattern(Constants.ACCESSKEYID_REGEX, "")); + assertEquals(false, StringUtils.matchRegexPattern(Constants.ACCESSKEYID_REGEX, "abc%")); + } +} diff --git a/src/test/java/com/alicloud/openservices/tablestore/ecosystem/GeoWriter.java b/src/test/java/com/alicloud/openservices/tablestore/ecosystem/GeoWriter.java new file mode 100644 index 0000000..afaa261 --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/ecosystem/GeoWriter.java @@ -0,0 +1,145 @@ +package com.alicloud.openservices.tablestore.ecosystem; + +import com.alicloud.openservices.tablestore.AsyncClient; +import com.alicloud.openservices.tablestore.DefaultTableStoreWriter; +import com.alicloud.openservices.tablestore.TableStoreCallback; +import com.alicloud.openservices.tablestore.TableStoreWriter; +import com.alicloud.openservices.tablestore.model.ColumnValue; +import com.alicloud.openservices.tablestore.model.ConsumedCapacity; +import com.alicloud.openservices.tablestore.model.PrimaryKey; +import com.alicloud.openservices.tablestore.model.PrimaryKeyBuilder; +import com.alicloud.openservices.tablestore.model.PrimaryKeyValue; +import com.alicloud.openservices.tablestore.model.RowChange; +import com.alicloud.openservices.tablestore.model.RowPutChange; +import com.alicloud.openservices.tablestore.writer.WriterConfig; +import com.google.common.util.concurrent.ThreadFactoryBuilder; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.Random; +import java.util.concurrent.*; +import java.util.concurrent.atomic.AtomicLong; + + +/** + * + * 在运行testGetUnhandledOtsFilter/testSplitsGenerationForSearchIndex前需要运行该函数构造原始数据集,并构建多元索引 + */ + +public class GeoWriter { + private static Logger logger = LoggerFactory.getLogger(GeoWriter.class); + public static String endpoint = ""; + public static String AccessKey = ""; + public static String SECRET = ""; + public static String instanceName = "sxSparkSearch"; + public static String tableName = "geo_table"; + public static String indexName = "geo_table_index3"; + + public static AsyncClient asyncClient = new AsyncClient(endpoint, AccessKey, SECRET, instanceName); + public static AtomicLong succeedCount = new AtomicLong(); + public static AtomicLong failedCount = new AtomicLong(); + + public static void main(String[] args) { + try { + writeData(200000000L); + } finally { + asyncClient.shutdown(); + } + } + + public static void writeData(long total) { + TableStoreWriter tablestoreWriter = getWriter(); + while (succeedCount.get() < total) { + tablestoreWriter.addRowChange(generateData()); + } + tablestoreWriter.flush(); + tablestoreWriter.close(); + } + + public static RowChange generateData() { + PrimaryKey primaryKey = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromString(RandomHelper.randomString(30))) + .build(); + RowPutChange rowChange = new RowPutChange(tableName); + rowChange.setPrimaryKey(primaryKey); + rowChange.addColumn("val_keyword1", ColumnValue.fromString(RandomHelper.randomString(3))); + rowChange.addColumn("val_keyword2", ColumnValue.fromString(RandomHelper.randomString(RandomHelper.randomInt(10)))); + rowChange.addColumn("val_keyword3", ColumnValue.fromString(RandomHelper.randomString(RandomHelper.randomInt(50)))); + rowChange.addColumn("val_bool", ColumnValue.fromBoolean(RandomHelper.randomBool())); + rowChange.addColumn("val_double", ColumnValue.fromDouble(RandomHelper.randomDouble(10000))); + rowChange.addColumn("val_long1", ColumnValue.fromLong(RandomHelper.randomLong(100000000))); + rowChange.addColumn("val_long2", ColumnValue.fromLong(RandomHelper.randomLong(10000))); + rowChange.addColumn("val_text", ColumnValue.fromString(RandomHelper.randomText(RandomHelper.randomInt(15), 4))); + rowChange.addColumn("val_geo", ColumnValue.fromString(RandomHelper.randomDouble(80) + "," + RandomHelper.randomDouble(80))); + return rowChange; + } + + public static TableStoreWriter getWriter() { + WriterConfig config = new WriterConfig(); + config.setMaxBatchSize(4 * 1024 * 1024); + config.setMaxColumnsCount(128); + config.setBufferSize(1024); + config.setMaxBatchRowsCount(100); + config.setConcurrency(10); + config.setMaxAttrColumnSize(2 * 1024 * 1024); + config.setMaxPKColumnSize(1024); + config.setFlushInterval(10000); + + TableStoreCallback callback = new TableStoreCallback() { + @Override + public void onCompleted(RowChange req, ConsumedCapacity res) { + succeedCount.incrementAndGet(); + } + + @Override + public void onFailed(RowChange req, Exception ex) { + failedCount.incrementAndGet(); + } + }; + ThreadFactory namedThreadFactory = new ThreadFactoryBuilder().setNameFormat("geotable-runner-%d").build(); + int size = 10; + ExecutorService executor = new ThreadPoolExecutor(size, size, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue(), namedThreadFactory); + return new DefaultTableStoreWriter(asyncClient, tableName, config, callback, executor); + } +} + +class RandomHelper { + + static final char[] ALPHABET = "0123456789_abcdefghijklmnopqrstuvwxyz".toCharArray(); + + public static String randomString(int length) { + char[] ret = new char[length]; + for (int i = 0; i < length; i++) { + ret[i] = ALPHABET[(int) (System.nanoTime() % ALPHABET.length)]; + } + return new String(ret); + } + + public static String randomText(int length, int termLength) { + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < length; i++) { + if (i != 0) { + sb.append(" "); + } + sb.append(randomString(termLength)); + } + return sb.toString(); + } + + public static long randomLong(long max) { + return System.nanoTime() % max; + } + + public static int randomInt(int max) { + return Long.valueOf(System.nanoTime() % max).intValue(); + } + + public static boolean randomBool() { + return System.nanoTime() % 2 == 0; + } + + public static double randomDouble(double bound) { + return new Random().nextDouble(); + } + +} diff --git a/src/test/java/com/alicloud/openservices/tablestore/ecosystem/testGetUnhandledOtsFilter.java b/src/test/java/com/alicloud/openservices/tablestore/ecosystem/testGetUnhandledOtsFilter.java new file mode 100644 index 0000000..9a08351 --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/ecosystem/testGetUnhandledOtsFilter.java @@ -0,0 +1,159 @@ +package com.alicloud.openservices.tablestore.ecosystem; + +import com.alicloud.openservices.tablestore.ClientConfiguration; +import com.alicloud.openservices.tablestore.SyncClient; +import com.alicloud.openservices.tablestore.model.ColumnValue; +import com.google.gson.Gson; +import com.google.gson.JsonSyntaxException; +import org.junit.*; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +public class testGetUnhandledOtsFilter { + + + private static SyncClient client; + public static ComputeParameters para; + private static final Gson GSON = new Gson(); + + public static String endpoint = "http://iquandata.ali-cn-hangzhou.ots.aliyuncs.com"; + public static String accessKey = ""; + public static String secret = ""; + public static String instanceName = "iquandata"; + public static String tableName = "wenxian_searchIndex_spark_test"; + public static String indexName = "wenxian_searchIndex_spark_test_index2"; + + public static Filter filterPk1StartWith = new Filter(Filter.CompareOperator.START_WITH, "pk1", ColumnValue.fromString("0000pppeee4444")); + public static Filter filterPk1Equal = new Filter(Filter.CompareOperator.EQUAL, "pk1", ColumnValue.fromString("0000pppeee4444tttiii8888xxxmmm")); + public static Filter filterPk1NotEqual = new Filter(Filter.CompareOperator.NOT_EQUAL, "pk1", ColumnValue.fromString("0000pppeee4444tttiii8888xxxmmm")); + public static Filter filterIsNull = new Filter(Filter.CompareOperator.IS_NULL, "val_long1"); + public static Filter filterLessThan = new Filter(Filter.CompareOperator.LESS_THAN, "val_long1", ColumnValue.fromLong(98350700)); + public static Filter filterGreaterThan = new Filter(Filter.CompareOperator.GREATER_THAN, "val_long1", ColumnValue.fromLong(3697900)); + public static Filter filterLessTanOrEqual = new Filter(Filter.CompareOperator.LESS_EQUAL, "val_long1", ColumnValue.fromLong(98350700)); + public static Filter filterGreaterThanOrEqual = new Filter(Filter.CompareOperator.GREATER_EQUAL, "val_long1", ColumnValue.fromLong(3697900)); + public static Filter filterGeoDistance = new Filter(Filter.CompareOperator.EQUAL, "val_geo", ColumnValue.fromString("{\"centerPoint\":\"6,9\", \"distanceInMeter\": 100000}")); + public static Filter filterGeoBoundingBox = new Filter(Filter.CompareOperator.EQUAL, "val_geo", ColumnValue.fromString("{\"topLeft\":\"3,0\", \"bottomRight\": \"0,3\"}")); + public static Filter filterGeoPolygon = new Filter(Filter.CompareOperator.EQUAL, "val_geo", ColumnValue.fromString("{\"points\":[\"5,0\",\"5,1\", \"6,1\", \"6,10\"]}")); + + + public static ArrayList requiredColumns = new ArrayList(); + + @BeforeClass + public static void classBefore() throws JsonSyntaxException, IOException { + resetOrGeoFlag(); + ClientConfiguration conf = new ClientConfiguration(); + client = new SyncClient( + endpoint, + accessKey, + secret, + instanceName, + conf); + requiredColumns.add("pk1"); + requiredColumns.add("val_keyword1"); + requiredColumns.add("val_keyword2"); + requiredColumns.add("val_keyword3"); + requiredColumns.add("val_bool"); + requiredColumns.add("val_double"); + requiredColumns.add("val_long1"); + requiredColumns.add("val_long2"); + requiredColumns.add("val_text"); + requiredColumns.add("val_geo"); + + para = new ComputeParameters(indexName, 16); + } + + @AfterClass + public static void classAfter() { + client.shutdown(); + } + + private static void resetOrGeoFlag() { + TablestoreSplit.containOr = false; + TablestoreSplit.containGeo = false; + } + + @Test + // a < 1 and b like 'begin%' => a<1 + public void test1() { + ArrayList filters1 = new ArrayList(); + filters1.add(filterLessThan); + filters1.add(filterPk1StartWith); + Filter filterOld = new Filter(Filter.LogicOperator.AND, filters1); + + + ITablestoreSplitManager manager = new DefaultTablestoreSplitManager(client); + List splits = manager.generateTablestoreSplits(client, filterOld, tableName, para, requiredColumns); + for (ITablestoreSplit split : splits) { + Filter unhandledOtsFilter = ((TablestoreSplit) split).getUnhandledOtsFilter(client, filterOld, tableName, indexName, new FilterPushdownConfig(false, false)); + Assert.assertEquals(filterLessThan, unhandledOtsFilter); + } + } + + @Test + + public void test4() { + ArrayList filters1 = new ArrayList(); + filters1.add(filterPk1Equal); + filters1.add(filterPk1StartWith); + filters1.add(filterGeoDistance); + Filter filterOld = new Filter(Filter.LogicOperator.OR, filters1); + + ITablestoreSplitManager manager = new DefaultTablestoreSplitManager(client); + List splits = manager.generateTablestoreSplits(client, filterOld, tableName, para, requiredColumns); + for (ITablestoreSplit split : splits) { + Filter unhandledOtsFilter = ((TablestoreSplit) split).getUnhandledOtsFilter(client, filterOld, tableName, indexName, new FilterPushdownConfig(false, false)); + Assert.assertEquals(null, unhandledOtsFilter); + } + } + + @Test + // (a = 1 and geodistance )or ( geodistance1 and geodistance2) => a = 1 + public void test2() { + List filters1 = new ArrayList(); + filters1.add(filterPk1Equal); + filters1.add(filterGeoDistance); + List filters2 = new ArrayList(); + filters2.add(filterGeoBoundingBox); + filters2.add(filterGeoPolygon); + ArrayList filters3 = new ArrayList(); + filters3.add(new Filter(Filter.LogicOperator.AND, filters1)); + filters3.add(new Filter(Filter.LogicOperator.AND, filters2)); + Filter filterOld = new Filter(Filter.LogicOperator.OR, filters3); + + Filter filterExpected = null; + + ITablestoreSplitManager manager = new DefaultTablestoreSplitManager(client); + List splits = manager.generateTablestoreSplits(client, filterOld, tableName, para, requiredColumns); + for (ITablestoreSplit split : splits) { + Filter unhandledOtsFilter = ((TablestoreSplit) split).getUnhandledOtsFilter(client, filterOld, tableName, indexName, new FilterPushdownConfig(false, false)); + Assert.assertEquals(filterExpected, unhandledOtsFilter); + } + + } + + @Test + // (a > 1 and geodistance )or ( geodistance1 and geodistance2) => error + public void test3() { + List filters1 = new ArrayList(); + filters1.add(filterGreaterThan); + filters1.add(filterGeoDistance); + List filters2 = new ArrayList(); + filters2.add(filterGeoBoundingBox); + filters2.add(filterGeoPolygon); + ArrayList filters3 = new ArrayList(); + filters3.add(new Filter(Filter.LogicOperator.AND, filters1)); + filters3.add(new Filter(Filter.LogicOperator.AND, filters2)); + Filter filterOld = new Filter(Filter.LogicOperator.OR, filters3); + + Filter filterExpected = null; + + ITablestoreSplitManager manager = new DefaultTablestoreSplitManager(client); + List splits = manager.generateTablestoreSplits(client, filterOld, tableName, para, requiredColumns); + for (ITablestoreSplit split : splits) { + Filter unhandledOtsFilter = ((TablestoreSplit) split).getUnhandledOtsFilter(client, filterOld, tableName, indexName, new FilterPushdownConfig(true, true)); + Assert.assertEquals(filterExpected, unhandledOtsFilter); + } + } +} \ No newline at end of file diff --git a/src/test/java/com/alicloud/openservices/tablestore/ecosystem/testSplitsGeneration.java b/src/test/java/com/alicloud/openservices/tablestore/ecosystem/testSplitsGeneration.java new file mode 100644 index 0000000..dc23240 --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/ecosystem/testSplitsGeneration.java @@ -0,0 +1,622 @@ +package com.alicloud.openservices.tablestore.ecosystem; + +import com.alicloud.openservices.tablestore.ClientConfiguration; +import com.alicloud.openservices.tablestore.SyncClient; +import com.alicloud.openservices.tablestore.model.*; +import com.google.gson.JsonSyntaxException; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +public class testSplitsGeneration { + private static SyncClient ots; + + @BeforeClass + public static void classBefore() throws JsonSyntaxException, IOException { + ClientConfiguration conf = new ClientConfiguration(); + ots = new SyncClient("http://tantan-console.ali-cn-hangzhou.ots.aliyuncs.com", "", "", "tantan-console", conf); + } + + @AfterClass + public static void classAfter() { + ots.shutdown(); + } + + @Test + public void testEmptyFilter() { + ComputeParameters para = new ComputeParameters(); + ITablestoreSplitManager manager = new DefaultTablestoreSplitManager(ots); + List splits = manager.generateTablestoreSplits(ots, Filter.emptyFilter(), "OrderSource", para, null); + System.out.println("count:" + splits.size()); + } + + @Test + public void testEqualFilter() { + ComputeParameters para = new ComputeParameters(); + Filter filter = new Filter(Filter.CompareOperator.EQUAL, "UserId", ColumnValue.fromString("user_A")); + ITablestoreSplitManager manager = new DefaultTablestoreSplitManager(ots); + List splits = manager.generateTablestoreSplits(ots, filter, "OrderSource", para, null); + System.out.println("count:" + splits.size()); + } + + @Test + public void testNotEqualFilter() { + ComputeParameters para = new ComputeParameters(); + + Filter filter = new Filter(Filter.CompareOperator.NOT_EQUAL, "UserId", ColumnValue.fromString("user_A")); + ITablestoreSplitManager manager = new DefaultTablestoreSplitManager(ots); + List splits = manager.generateTablestoreSplits(ots, filter, "OrderSource", para, null); + System.out.println("count:" + splits.size()); + } + + @Test + public void testGreaterThanFilter() { + ComputeParameters para = new ComputeParameters(); + Filter filter = new Filter(Filter.CompareOperator.GREATER_THAN, "UserId", ColumnValue.fromString("user_E")); + ITablestoreSplitManager manager = new DefaultTablestoreSplitManager(ots); + List splits = manager.generateTablestoreSplits(ots, filter, "OrderSource", para, null); + System.out.println("count:" + splits.size()); + } + + @Test + public void testGreaterEqualFilter() { + ComputeParameters para = new ComputeParameters(); + Filter filter = new Filter(Filter.CompareOperator.GREATER_EQUAL, "UserId", ColumnValue.fromString("user_Z")); + ITablestoreSplitManager manager = new DefaultTablestoreSplitManager(ots); + List splits = manager.generateTablestoreSplits(ots, filter, "OrderSource", para, null); + System.out.println("count:" + splits.size()); + } + + @Test + public void testLessThanFilter() { + ComputeParameters para = new ComputeParameters(); + Filter filter = new Filter(Filter.CompareOperator.LESS_THAN, "UserId", ColumnValue.fromString("user_D")); + ITablestoreSplitManager manager = new DefaultTablestoreSplitManager(ots); + List splits = manager.generateTablestoreSplits(ots, filter, "OrderSource", para, null); + System.out.println("count:" + splits.size()); + } + + @Test + public void testStartWithFilter() { + ComputeParameters para = new ComputeParameters(); + Filter filter = new Filter(Filter.CompareOperator.START_WITH, "UserId", ColumnValue.fromString("user_D")); + ITablestoreSplitManager manager = new DefaultTablestoreSplitManager(ots); + List splits = manager.generateTablestoreSplits(ots, filter, "OrderSource", para, null); + System.out.println("count:" + splits.size()); + } + + @Test + public void testNestedFilter() { + ComputeParameters para = new ComputeParameters(); + Filter subfilter = new Filter(Filter.CompareOperator.GREATER_THAN, "UserId", ColumnValue.fromString("user_E")); + List subFilters = new ArrayList(); + subFilters.add(Filter.emptyFilter()); + subFilters.add(subfilter); + Filter filter = new Filter(Filter.LogicOperator.AND, subFilters); + ITablestoreSplitManager manager = new DefaultTablestoreSplitManager(ots); + List splits = manager.generateTablestoreSplits(ots, filter, "OrderSource", para, null); + System.out.println("count:" + splits.size()); + } + + @Test + public void testNestedFilter2() { + ComputeParameters para = new ComputeParameters(); + Filter subfilter1 = new Filter(Filter.CompareOperator.GREATER_THAN, "UserId", ColumnValue.fromString("user_E")); + Filter subfilter2 = new Filter(Filter.CompareOperator.LESS_THAN, "UserId", ColumnValue.fromString("user_G")); + List subFilters = new ArrayList(); + subFilters.add(Filter.emptyFilter()); + subFilters.add(subfilter1); + subFilters.add(subfilter2); + Filter filter = new Filter(Filter.LogicOperator.AND, subFilters); + ITablestoreSplitManager manager = new DefaultTablestoreSplitManager(ots); + List splits = manager.generateTablestoreSplits(ots, filter, "OrderSource", para, null); + System.out.println("count:" + splits.size()); + } + + @Test + public void testNestedFilter3() { + ComputeParameters para = new ComputeParameters(); + Filter subfilter1 = new Filter(Filter.CompareOperator.GREATER_THAN, "UserId", ColumnValue.fromString("user_E")); + Filter subfilter2 = new Filter(Filter.CompareOperator.LESS_THAN, "OrderId", ColumnValue.fromString("X")); + List subFilters = new ArrayList(); + subFilters.add(Filter.emptyFilter()); + subFilters.add(subfilter1); + subFilters.add(subfilter2); + Filter filter = new Filter(Filter.LogicOperator.AND, subFilters); + ITablestoreSplitManager manager = new DefaultTablestoreSplitManager(ots); + List splits = manager.generateTablestoreSplits(ots, filter, "OrderSource", para, null); + System.out.println("count:" + splits.size()); + } + + @Test + public void testNestedFilter4() { + ComputeParameters para = new ComputeParameters(); + Filter subfilter1 = new Filter(Filter.CompareOperator.GREATER_THAN, "UserId", ColumnValue.fromString("user_E")); + Filter subfilter2 = new Filter(Filter.CompareOperator.LESS_THAN, "OrderId", ColumnValue.fromString("X")); + List subFilters = new ArrayList(); + subFilters.add(Filter.emptyFilter()); + subFilters.add(subfilter1); + subFilters.add(subfilter2); + Filter filter = new Filter(Filter.LogicOperator.OR, subFilters); + ITablestoreSplitManager manager = new DefaultTablestoreSplitManager(ots); + List splits = manager.generateTablestoreSplits(ots, filter, "OrderSource", para, null); + System.out.println("count:" + splits.size()); + } + + @Test + public void testNestedFilter5() { + ComputeParameters para = new ComputeParameters(); + Filter subfilter1 = new Filter(Filter.CompareOperator.GREATER_THAN, "UserId", ColumnValue.fromString("user_E")); + Filter subfilter2 = new Filter(Filter.CompareOperator.LESS_THAN, "OrderId", ColumnValue.fromString("X")); + List subFilters = new ArrayList(); + subFilters.add(Filter.emptyFilter()); + subFilters.add(subfilter1); + subFilters.add(subfilter2); + Filter filter = new Filter(Filter.LogicOperator.NOT, subFilters); + ITablestoreSplitManager manager = new DefaultTablestoreSplitManager(ots); + List splits = manager.generateTablestoreSplits(ots, filter, "OrderSource", para, null); + System.out.println("count:" + splits.size()); + } + + @Test + public void testProjection() { + ComputeParameters para = new ComputeParameters(); + + Filter subfilter1 = new Filter(Filter.CompareOperator.GREATER_THAN, "UserId", ColumnValue.fromString("user_A")); + Filter subfilter2 = new Filter(Filter.CompareOperator.LESS_EQUAL, "UserId", ColumnValue.fromString("user_B")); + List subFilters = new ArrayList(); + subFilters.add(Filter.emptyFilter()); + subFilters.add(subfilter1); + subFilters.add(subfilter2); + Filter filter = new Filter(Filter.LogicOperator.AND, subFilters); + + List columnToGet = new ArrayList(); + columnToGet.add("timestamp"); + ITablestoreSplitManager manager = new DefaultTablestoreSplitManager(ots); + List splits = manager.generateTablestoreSplits(ots, filter, "OrderSource", para, columnToGet); + ITablestoreSplit anySplit = splits.get(0); + Iterator rows = anySplit.getRowIterator(ots); + for (int i = 0; i < 100; i++) { + if (rows.hasNext()) { + Row row = rows.next(); + System.out.println("row:" + row.toString()); + } + } + System.out.println("count:" + splits.size()); + } + + @Test + public void testIndexSelection1() { + ComputeParameters para = new ComputeParameters(); + para.setComputeMode(ComputeParameters.ComputeMode.Auto); + Filter subfilter1 = new Filter(Filter.CompareOperator.GREATER_THAN, "price", ColumnValue.fromLong(100)); + Filter subfilter2 = new Filter(Filter.CompareOperator.LESS_EQUAL, "price", ColumnValue.fromLong(101)); + List subFilters = new ArrayList(); + subFilters.add(Filter.emptyFilter()); + subFilters.add(subfilter1); + subFilters.add(subfilter2); + Filter filter = new Filter(Filter.LogicOperator.AND, subFilters); + + List columnToGet = new ArrayList(); + columnToGet.add("timestamp"); + ITablestoreSplitManager manager = new DefaultTablestoreSplitManager(ots); + List splits = manager.generateTablestoreSplits(ots, filter, "OrderSource", para, columnToGet); + ITablestoreSplit anySplit = splits.get(0); + System.out.println("splitinfo:" + anySplit.toString()); + + Iterator rows = anySplit.getRowIterator(ots); + for (int i = 0; i < 100; i++) { + if (rows.hasNext()) { + Row row = rows.next(); + System.out.println("row:" + row.toString()); + } + } + System.out.println("count:" + splits.size()); + } + + @Test + public void testIndexSelection2() { + ComputeParameters para = new ComputeParameters(); + para.setComputeMode(ComputeParameters.ComputeMode.Auto); + Filter subfilter1 = new Filter(Filter.CompareOperator.EQUAL, "UserId", ColumnValue.fromString("user_B")); + Filter subfilter2 = new Filter(Filter.CompareOperator.GREATER_THAN, "price", ColumnValue.fromLong(200)); + Filter subfilter3 = new Filter(Filter.CompareOperator.LESS_EQUAL, "price", ColumnValue.fromLong(300)); + + List subFilters = new ArrayList(); + //subFilters.add(Filter.emptyFilter()); + subFilters.add(subfilter1); + subFilters.add(subfilter2); + subFilters.add(subfilter3); + Filter filter = new Filter(Filter.LogicOperator.AND, subFilters); + + List columnToGet = new ArrayList(); + columnToGet.add("timestamp"); + ITablestoreSplitManager manager = new DefaultTablestoreSplitManager(ots); + List splits = manager.generateTablestoreSplits(ots, filter, "OrderSource", para, columnToGet); + ITablestoreSplit anySplit = splits.get(0); + System.out.println("splitinfo:" + anySplit.toString()); + + Iterator rows = anySplit.getRowIterator(ots); + for (int i = 0; i < 100; i++) { + if (rows.hasNext()) { + Row row = rows.next(); + System.out.println("row:" + row.toString()); + } + } + System.out.println("count:" + splits.size()); + } + + @Test + public void testIndexSelection3() { + ComputeParameters para = new ComputeParameters(); + para.setComputeMode(ComputeParameters.ComputeMode.Auto); + Filter subfilter1 = new Filter(Filter.CompareOperator.GREATER_THAN, "UserId", ColumnValue.fromString("user_D")); + Filter subfilter2 = new Filter(Filter.CompareOperator.LESS_EQUAL, "UserId", ColumnValue.fromString("user_E")); + List subFilters = new ArrayList(); + subFilters.add(Filter.emptyFilter()); + subFilters.add(subfilter1); + subFilters.add(subfilter2); + Filter filter = new Filter(Filter.LogicOperator.AND, subFilters); + + List columnToGet = new ArrayList(); + columnToGet.add("timestamp"); + ITablestoreSplitManager manager = new DefaultTablestoreSplitManager(ots); + List splits = manager.generateTablestoreSplits(ots, filter, "OrderSource", para, columnToGet); + ITablestoreSplit anySplit = splits.get(0); + System.out.println("splitinfo:" + anySplit.toString()); + + Iterator rows = anySplit.getRowIterator(ots); + for (int i = 0; i < 100; i++) { + if (rows.hasNext()) { + Row row = rows.next(); + System.out.println("row:" + row.toString()); + } + } + System.out.println("count:" + splits.size()); + } + + @Test + public void testIndexSelection4() { + ComputeParameters para = new ComputeParameters(); + para.setComputeMode(ComputeParameters.ComputeMode.Auto); + Filter subfilter1 = new Filter(Filter.CompareOperator.EQUAL, "UserId", ColumnValue.fromString("user_B")); + Filter subfilter2 = new Filter(Filter.CompareOperator.EQUAL, "OrderId", ColumnValue.fromString("b76c973f-41e9-432a-9028-ed61940d2dc3")); + List subFilters = new ArrayList(); + //subFilters.add(Filter.emptyFilter()); + subFilters.add(subfilter1); + subFilters.add(subfilter2); + Filter filter = new Filter(Filter.LogicOperator.AND, subFilters); + + List columnToGet = new ArrayList(); + columnToGet.add("timestamp"); + ITablestoreSplitManager manager = new DefaultTablestoreSplitManager(ots); + List splits = manager.generateTablestoreSplits(ots, filter, "OrderSource", para, columnToGet); + ITablestoreSplit anySplit = splits.get(0); + System.out.println("splitinfo:" + anySplit.toString()); + + Iterator rows = anySplit.getRowIterator(ots); + for (int i = 0; i < 100; i++) { + if (rows.hasNext()) { + Row row = rows.next(); + System.out.println("row:" + row.toString()); + } + } + System.out.println("count:" + splits.size()); + } + + @Test + public void testIndexSelection5() { + ComputeParameters para = new ComputeParameters(); + para.setComputeMode(ComputeParameters.ComputeMode.Auto); + Filter subfilter1 = new Filter(Filter.CompareOperator.EQUAL, "UserId", ColumnValue.fromString("user_B")); + Filter subfilter2 = new Filter(Filter.CompareOperator.EQUAL, "OrderId", ColumnValue.fromString("b76c973f-41e9-432a-9028-ed61940d2dc3")); + Filter subfilter3 = new Filter(Filter.CompareOperator.EQUAL, "UserId", ColumnValue.fromString("user_B")); + Filter subfilter4 = new Filter(Filter.CompareOperator.EQUAL, "OrderId", ColumnValue.fromString("163ab177-a239-461f-99a8-2d02a7f302f9")); + + List filters1 = new ArrayList(); + //subFilters.add(Filter.emptyFilter()); + filters1.add(subfilter1); + filters1.add(subfilter2); + + List filters2 = new ArrayList(); + //subFilters.add(Filter.emptyFilter()); + filters2.add(subfilter3); + filters2.add(subfilter4); + + Filter filter1 = new Filter(Filter.LogicOperator.AND, filters1); + Filter filter2 = new Filter(Filter.LogicOperator.AND, filters2); + + List filters = new ArrayList(); + filters.add(filter1); + filters.add(filter2); + + Filter filter = new Filter(Filter.LogicOperator.OR, filters); + + List columnToGet = new ArrayList(); + columnToGet.add("timestamp"); + ITablestoreSplitManager manager = new DefaultTablestoreSplitManager(ots); + List splits = manager.generateTablestoreSplits(ots, filter, "OrderSource", para, columnToGet); + ITablestoreSplit anySplit = splits.get(0); + System.out.println("splitinfo:" + anySplit.toString()); + + Iterator rows = anySplit.getRowIterator(ots); + for (int i = 0; i < 100; i++) { + if (rows.hasNext()) { + Row row = rows.next(); + if (row != null) { + System.out.println("row:" + row.toString()); + } + } else { + break; + } + } + System.out.println("count:" + splits.size()); + } + + @Test + public void testIndexSelection6() { + ComputeParameters para = new ComputeParameters(); + para.setComputeMode(ComputeParameters.ComputeMode.Auto); + Filter subfilter1 = new Filter(Filter.CompareOperator.EQUAL, "UserId", ColumnValue.fromString("user_B")); + Filter subfilter2 = new Filter(Filter.CompareOperator.EQUAL, "OrderId", ColumnValue.fromString("b76c973f-41e9-432a-9028-ed61940d2dc3")); + Filter subfilter3 = new Filter(Filter.CompareOperator.EQUAL, "UserId", ColumnValue.fromString("user_B")); + Filter subfilter4 = new Filter(Filter.CompareOperator.EQUAL, "OrderId", ColumnValue.fromString("notexist")); + + List filters1 = new ArrayList(); + //subFilters.add(Filter.emptyFilter()); + filters1.add(subfilter1); + filters1.add(subfilter2); + + List filters2 = new ArrayList(); + //subFilters.add(Filter.emptyFilter()); + filters2.add(subfilter3); + filters2.add(subfilter4); + + Filter filter1 = new Filter(Filter.LogicOperator.AND, filters1); + Filter filter2 = new Filter(Filter.LogicOperator.AND, filters2); + + List filters = new ArrayList(); + filters.add(filter1); + filters.add(filter2); + + Filter filter = new Filter(Filter.LogicOperator.OR, filters); + + List columnToGet = new ArrayList(); + columnToGet.add("timestamp"); + ITablestoreSplitManager manager = new DefaultTablestoreSplitManager(ots); + List splits = manager.generateTablestoreSplits(ots, filter, "OrderSource", para, columnToGet); + ITablestoreSplit anySplit = splits.get(0); + System.out.println("splitinfo:" + anySplit.toString()); + + Iterator rows = anySplit.getRowIterator(ots); + for (int i = 0; i < 100; i++) { + if (rows.hasNext()) { + Row row = rows.next(); + if (row != null) { + System.out.println("row:" + row.toString()); + } + } else { + break; + } + } + System.out.println("count:" + splits.size()); + } + + @Test + public void testIndexSelection7() { + ComputeParameters para = new ComputeParameters(); + para.setComputeMode(ComputeParameters.ComputeMode.Auto); + Filter subfilter1 = new Filter(Filter.CompareOperator.EQUAL, "l_orderkey", ColumnValue.fromLong(1)); + Filter subfilter2 = new Filter(Filter.CompareOperator.EQUAL, "l_linenumber", ColumnValue.fromLong(1)); + + List filters1 = new ArrayList(); + //subFilters.add(Filter.emptyFilter()); + filters1.add(subfilter1); + filters1.add(subfilter2); + + + Filter filter1 = new Filter(Filter.LogicOperator.AND, filters1); + + List columnToGet = new ArrayList(); + columnToGet.add("timestamp"); + ITablestoreSplitManager manager = new DefaultTablestoreSplitManager(ots); + List splits = manager.generateTablestoreSplits(ots, filter1, "tpch_lineitem_perf", para, columnToGet); + ITablestoreSplit anySplit = splits.get(0); + System.out.println("splitinfo:" + anySplit.toString()); + + Iterator rows = anySplit.getRowIterator(ots); + for (int i = 0; i < 100; i++) { + if (rows.hasNext()) { + Row row = rows.next(); + if (row != null) { + System.out.println("row:" + row.toString()); + } + } else { + break; + } + } + System.out.println("count:" + splits.size()); + } + + @Test + public void testIndexSelection8() { + ComputeParameters para = new ComputeParameters(); + para.setComputeMode(ComputeParameters.ComputeMode.Auto); + Filter subfilter1 = new Filter(Filter.CompareOperator.EQUAL, "l_orderkey", ColumnValue.fromLong(20000)); + List columnToGet = new ArrayList(); + //columnToGet.add("timestamp"); + ITablestoreSplitManager manager = new DefaultTablestoreSplitManager(ots); + List splits = manager.generateTablestoreSplits(ots, subfilter1, "tpch_lineitem_perf", para, columnToGet); + ITablestoreSplit anySplit = splits.get(0); + System.out.println("splitinfo:" + anySplit.toString()); + + Iterator rows = anySplit.getRowIterator(ots); + for (int i = 0; i < 100; i++) { + if (rows.hasNext()) { + Row row = rows.next(); + if (row != null) { + System.out.println("row:" + row.toString()); + } + } else { + break; + } + } + System.out.println("count:" + splits.size()); + } + + @Test + public void testIndexSelection9() { + ComputeParameters para = new ComputeParameters(); + para.setComputeMode(ComputeParameters.ComputeMode.Auto); + Filter subfilter1 = new Filter(Filter.CompareOperator.EQUAL, "UserId", ColumnValue.fromString("user_E")); + + List columnToGet = new ArrayList(); + columnToGet.add("timestamp"); + ITablestoreSplitManager manager = new DefaultTablestoreSplitManager(ots); + List splits = manager.generateTablestoreSplits(ots, subfilter1, "OrderSource", para, columnToGet); + ITablestoreSplit anySplit = splits.get(0); + System.out.println("splitinfo:" + anySplit.toString()); + + Iterator rows = anySplit.getRowIterator(ots); + for (int i = 0; i < 100; i++) { + if (rows.hasNext()) { + Row row = rows.next(); + System.out.println("row:" + row.toString()); + } + } + System.out.println("count:" + splits.size()); + } + + @Test + public void testIndexSelection10() { + ComputeParameters para = new ComputeParameters(); + para.setComputeMode(ComputeParameters.ComputeMode.Auto); + Filter subfilter1 = new Filter(Filter.CompareOperator.LESS_EQUAL, "l_shipdate", ColumnValue.fromString("1993-12-01")); + + List columnToGet = new ArrayList(); + //columnToGet.add("timestamp"); + ITablestoreSplitManager manager = new DefaultTablestoreSplitManager(ots); + List splits = manager.generateTablestoreSplits(ots, subfilter1, "tpch_lineitem_perf", para, columnToGet); + TablestoreSplit anySplit = (TablestoreSplit) splits.get(0); + + TablestoreSplit anySplitX = new TablestoreSplit(anySplit.getType(), subfilter1, columnToGet); + anySplitX.setSplitName(anySplit.getSplitName()); + anySplitX.setTableName(anySplit.getTableName()); + anySplitX.setKvSplit(anySplit.getKvSplit()); + anySplitX.initial(ots); + + System.out.println("splitinfo:" + anySplitX.toString()); + + Iterator rows = anySplitX.getRowIterator(ots); + for (int i = 0; i < 100; i++) { + if (rows.hasNext()) { + Row row = rows.next(); + System.out.println("row:" + row.toString()); + } + } + System.out.println("count:" + splits.size()); + } + + @Test + public void testIndexSelection11() { + ComputeParameters para = new ComputeParameters(); + para.setComputeMode(ComputeParameters.ComputeMode.Auto); + Filter subfilter1 = new Filter(Filter.CompareOperator.LESS_EQUAL, "l_shipdate", ColumnValue.fromString("1996-12-01")); + + List columnToGet = new ArrayList(); + ITablestoreSplitManager manager = new DefaultTablestoreSplitManager(ots); + List splits = manager.generateTablestoreSplits(ots, subfilter1, "tpch_lineitem_perf", para, columnToGet); + TablestoreSplit anySplit = (TablestoreSplit) splits.get(0); + + TablestoreSplit anySplitX = new TablestoreSplit(anySplit.getType(), subfilter1, columnToGet); + anySplitX.setSplitName(anySplit.getSplitName()); + anySplitX.setTableName(anySplit.getTableName()); + anySplitX.setKvSplit(anySplit.getKvSplit()); + anySplitX.initial(ots); + + System.out.println("splitinfo:" + anySplitX.toString()); + + Iterator rows = anySplitX.getRowIterator(ots); + for (int i = 0; i < 100; i++) { + if (rows.hasNext()) { + Row row = rows.next(); + System.out.println("row:" + row.toString()); + } + } + System.out.println("count:" + splits.size()); + } + + @Test + public void testIndexSelection12() { + ComputeParameters para = new ComputeParameters(); + para.setComputeMode(ComputeParameters.ComputeMode.Auto); + + List columnToGet = new ArrayList(); + //columnToGet.add("col1"); + ITablestoreSplitManager manager = new DefaultTablestoreSplitManager(ots); + List splits = manager.generateTablestoreSplits(ots, Filter.emptyFilter(), "spark_test", para, columnToGet); + TablestoreSplit anySplit = (TablestoreSplit) splits.get(0); + System.out.println("count:" + splits.size()); + + System.out.println("splitinfo:" + anySplit.toString()); + + TablestoreSplit anySplitX = new TablestoreSplit(anySplit.getType(), Filter.emptyFilter(), columnToGet); + anySplitX.setSplitName(anySplit.getSplitName()); + anySplitX.setTableName(anySplit.getTableName()); + anySplitX.setKvSplit(anySplit.getKvSplit()); + anySplitX.initial(ots); + + Iterator rows = anySplitX.getRowIterator(ots); + + + for (int i = 0; i < 100; i++) { + if (rows.hasNext()) { + Row row = rows.next(); + System.out.println("row:" + row.toString()); + } else { + break; + } + } + } + + @Test + public void testIndexSelection13() { + ComputeParameters para = new ComputeParameters("timestream_share_car_order_index", 1); + + List columnToGet = new ArrayList(); + columnToGet.add("order_id"); + columnToGet.add("from"); + ITablestoreSplitManager manager = new DefaultTablestoreSplitManager(ots); + + Filter filter = new Filter(Filter.CompareOperator.EQUAL, "order_id", ColumnValue.fromString("O_060400347")); + + Filter filter2 = new Filter(Filter.CompareOperator.EQUAL, "from", ColumnValue.fromString("1546309320000")); + + List subFilters = new ArrayList(); + //subFilters.add(Filter.emptyFilter()); + subFilters.add(filter); + subFilters.add(filter2); + Filter filter3 = new Filter(Filter.LogicOperator.OR, subFilters); + + List splits = manager.generateTablestoreSplits(ots, filter3, "timestream_share_car_order", para, columnToGet); + TablestoreSplit anySplit = (TablestoreSplit) splits.get(0); + System.out.println("count:" + splits.size()); + System.out.println("splitinfo:" + anySplit.toString()); + + Iterator rows = anySplit.getRowIterator(ots); + + for (int i = 0; i < 100; i++) { + if (rows.hasNext()) { + Row row = rows.next(); + System.out.println("row:" + row.toString()); + } else { + break; + } + } + } +} diff --git a/src/test/java/com/alicloud/openservices/tablestore/ecosystem/testSplitsGenerationForSearchIndex.java b/src/test/java/com/alicloud/openservices/tablestore/ecosystem/testSplitsGenerationForSearchIndex.java new file mode 100644 index 0000000..122b6d8 --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/ecosystem/testSplitsGenerationForSearchIndex.java @@ -0,0 +1,474 @@ +package com.alicloud.openservices.tablestore.ecosystem; + +import com.alicloud.openservices.tablestore.ClientConfiguration; +import com.alicloud.openservices.tablestore.SyncClient; +import com.alicloud.openservices.tablestore.model.Column; +import com.alicloud.openservices.tablestore.model.ColumnValue; +import com.alicloud.openservices.tablestore.model.PrimaryKey; +import com.alicloud.openservices.tablestore.model.Row; +import com.alicloud.openservices.tablestore.model.iterator.RowIterator; +import com.alicloud.openservices.tablestore.model.search.*; +import com.alicloud.openservices.tablestore.model.search.query.*; +import com.google.gson.Gson; +import com.google.gson.JsonSyntaxException; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.BeforeClass; +import org.junit.Test; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; + + +public class testSplitsGenerationForSearchIndex { + private static SyncClient client; + public static ComputeParameters para; + private static final Gson GSON = new Gson(); + + public static String endpoint = "http://iquandata.ali-cn-hangzhou.ots.aliyuncs.com"; + public static String accessKey = ""; + public static String secret = ""; + public static String instanceName = "iquandata"; + public static String tableName = "wenxian_searchIndex_spark_test"; + public static String indexName = "wenxian_searchIndex_spark_test_index2"; + + public static Filter filterPk1StartWith = new Filter(Filter.CompareOperator.START_WITH, "pk1", ColumnValue.fromString("0000pppeee4444")); + public static Filter filterPk1Equal = new Filter(Filter.CompareOperator.EQUAL, "pk1", ColumnValue.fromString("0000pppeee4444tttiii8888xxxmmm")); + public static Filter filterPk1NotEqual = new Filter(Filter.CompareOperator.NOT_EQUAL, "pk1", ColumnValue.fromString("0000pppeee4444tttiii8888xxxmmm")); + public static Filter filterIsNull = new Filter(Filter.CompareOperator.IS_NULL, "val_long1"); + public static Filter filterLessThan = new Filter(Filter.CompareOperator.LESS_THAN, "val_long1", ColumnValue.fromLong(98350700)); + public static Filter filterGreaterThan = new Filter(Filter.CompareOperator.GREATER_THAN, "val_long1", ColumnValue.fromLong(3697900)); + public static Filter filterLessTanOrEqual = new Filter(Filter.CompareOperator.LESS_EQUAL, "val_long1", ColumnValue.fromLong(98350700)); + public static Filter filterGreaterThanOrEqual = new Filter(Filter.CompareOperator.GREATER_EQUAL, "val_long1", ColumnValue.fromLong(3697900)); + public static Filter filterGeoDistance = new Filter(Filter.CompareOperator.EQUAL, "val_geo", ColumnValue.fromString("{\"centerPoint\":\"6,9\", \"distanceInMeter\": 100000}")); + public static Filter filterGeoBoundingBox = new Filter(Filter.CompareOperator.EQUAL, "val_geo", ColumnValue.fromString("{\"topLeft\":\"3,0\", \"bottomRight\": \"0,3\"}")); + public static Filter filterGeoPolygon = new Filter(Filter.CompareOperator.EQUAL, "val_geo", ColumnValue.fromString("{\"points\":[\"5,0\",\"5,1\", \"6,1\", \"6,10\"]}")); + + + public static ArrayList requiredColumns = new ArrayList(); + + @BeforeClass + public static void classBefore() throws JsonSyntaxException, IOException { + ClientConfiguration conf = new ClientConfiguration(); + client = new SyncClient( + endpoint, + accessKey, + secret, + instanceName, + conf); + requiredColumns.add("pk1"); + requiredColumns.add("val_keyword1"); + requiredColumns.add("val_keyword2"); + requiredColumns.add("val_keyword3"); + requiredColumns.add("val_bool"); + requiredColumns.add("val_double"); + requiredColumns.add("val_long1"); + requiredColumns.add("val_long2"); + requiredColumns.add("val_text"); + requiredColumns.add("val_geo"); + + para = new ComputeParameters(indexName, 16); + } + + @AfterClass + public static void classAfter() { + client.shutdown(); + } + + + @Test + //Or + public void testOrFilter() { + resetOrGeoFlag(); + ArrayList filters = new ArrayList(); + filters.add(filterPk1Equal); + filters.add(filterPk1StartWith); + Filter filter = new Filter(Filter.LogicOperator.OR, filters); + + //通过Filter构造rowDataHashMap + HashMap rowDataHashMap = rowDataMapFromFilter(filter); + + //手动构造searchQuery(Expected) + SearchQuery.Builder builder = SearchQuery.newBuilder(); + BoolQuery.Builder boolBuilder = QueryBuilders.bool(); + boolBuilder.should(QueryBuilders.prefix(filterPk1StartWith.getColumnName(), filterPk1StartWith.getColumnValue().asString())); + boolBuilder.should(QueryBuilders.term(filterPk1Equal.getColumnName(), filterPk1Equal.getColumnValue().asString())); + SearchRequest searchRequest = new SearchRequest(tableName, indexName, builder.query(boolBuilder).build()); + SearchRequest.ColumnsToGet columnsToGet = new SearchRequest.ColumnsToGet(); + columnsToGet.setColumns(requiredColumns); + searchRequest.setColumnsToGet(columnsToGet); + RowIterator searchIterator = client.createSearchIterator(searchRequest); + + //用filter构造的rowDataHashMap来核对searchQuery取到的数据 + verifyDataFromSearchIndexByMapFromFilter(rowDataHashMap, searchIterator); + } + + @Test + //And + public void testAndFilter() { + ArrayList filters = new ArrayList(); + filters.add(filterPk1Equal); + filters.add(filterPk1StartWith); + Filter filter = new Filter(Filter.LogicOperator.AND, filters); + + //通过Filter构造rowDataHashMap + HashMap rowDataHashMap = rowDataMapFromFilter(filter); + + //手动构造searchQuery(Expected) + SearchQuery.Builder builder = SearchQuery.newBuilder(); + BoolQuery.Builder boolBuilder = QueryBuilders.bool(); + boolBuilder.must(QueryBuilders.prefix(filterPk1StartWith.getColumnName(), filterPk1StartWith.getColumnValue().asString())); + boolBuilder.must(QueryBuilders.term(filterPk1Equal.getColumnName(), filterPk1Equal.getColumnValue().asString())); + SearchRequest searchRequest = new SearchRequest(tableName, indexName, builder.query(boolBuilder).build()); + SearchRequest.ColumnsToGet columnsToGet = new SearchRequest.ColumnsToGet(); + columnsToGet.setColumns(requiredColumns); + searchRequest.setColumnsToGet(columnsToGet); + RowIterator searchIterator = client.createSearchIterator(searchRequest); + + //用filter构造的rowDataHashMap来核对searchQuery取到的数据 + verifyDataFromSearchIndexByMapFromFilter(rowDataHashMap, searchIterator); + } + + + @Test + //NOT 与 NOTEQUAL + public void testNotNotequalFilter() { + ArrayList filters = new ArrayList(); + filters.add(filterPk1NotEqual); + filters.add(filterPk1StartWith); + Filter filter = new Filter(Filter.LogicOperator.AND, filters); + + //通过Filter构造rowDataHashMap + HashMap rowDataHashMap = rowDataMapFromFilter(filter); + + //手动构造searchQuery(Expected) + SearchQuery.Builder builder = SearchQuery.newBuilder(); + BoolQuery.Builder boolBuilder = QueryBuilders.bool(); + boolBuilder.must(QueryBuilders.prefix(filterPk1StartWith.getColumnName(), filterPk1StartWith.getColumnValue().asString())); + boolBuilder.mustNot(QueryBuilders.term(filterPk1NotEqual.getColumnName(), filterPk1NotEqual.getColumnValue().asString())); + SearchRequest searchRequest = new SearchRequest(tableName, indexName, builder.query(boolBuilder).build()); + SearchRequest.ColumnsToGet columnsToGet = new SearchRequest.ColumnsToGet(); + columnsToGet.setColumns(requiredColumns); + searchRequest.setColumnsToGet(columnsToGet); + RowIterator searchIterator = client.createSearchIterator(searchRequest); + + //用filter构造的rowDataHashMap来核对searchQuery取到的数据 + verifyDataFromSearchIndexByMapFromFilter(rowDataHashMap, searchIterator); + } + + @Test + //Equal + public void testEqualFilter() { + //构造Filter + String fieldName = "val_long1"; + ColumnValue fieldValue = ColumnValue.fromLong(3697900); + Filter filter = new Filter(Filter.CompareOperator.EQUAL, fieldName, fieldValue); + + //通过Filter构造rowDataHashMap + HashMap rowDataHashMap = rowDataMapFromFilter(filter); + + //手动构造searchQuery(Expected) + SearchQuery searchQuery = new SearchQuery(); + TermQuery termQuery = new TermQuery(); + termQuery.setFieldName(fieldName); + termQuery.setTerm(fieldValue); + searchQuery.setQuery(termQuery); + SearchRequest searchRequest = new SearchRequest(tableName, indexName, searchQuery); + SearchRequest.ColumnsToGet columnsToGet = new SearchRequest.ColumnsToGet(); + columnsToGet.setColumns(requiredColumns); + searchRequest.setColumnsToGet(columnsToGet); + RowIterator searchIterator = client.createSearchIterator(searchRequest); + + //用filter构造的rowDataHashMap来核对searchQuery取到的数据 + verifyDataFromSearchIndexByMapFromFilter(rowDataHashMap, searchIterator); + } + + @Test + //IS NULL + //TODO 除了5.10 以上的pulic实例 其他requireColumn的列如果为null 则行会被过滤掉 所以这里自定义pkList作为requireColumn + + public void testIsNullFilter() { + ArrayList pkList = new ArrayList(); + pkList.add("pk1"); + + + ArrayList filters = new ArrayList(); + filters.add(filterIsNull); + Filter filter = new Filter(Filter.LogicOperator.AND, filters); + + //通过Filter构造rowDataHashMap + HashMap rowDataHashMap = new HashMap(); + ITablestoreSplitManager manager = new DefaultTablestoreSplitManager(client); + List splits = manager.generateTablestoreSplits(client, filter, tableName, para, + pkList); + + for (ITablestoreSplit split : splits) { + split.initial(client); + Iterator rowIterator = split.getRowIterator(client); + while (rowIterator.hasNext()) { + Row next = rowIterator.next(); + rowDataHashMap.put(next.getPrimaryKey(), next); + } + } + + //手动构造searchQuery(Expected) + SearchQuery.Builder builder = SearchQuery.newBuilder(); + ExistsQuery.Builder existsBuilder = QueryBuilders.exists(filterIsNull.getColumnName()); + BoolQuery.Builder boolBuilder = QueryBuilders.bool().mustNot(existsBuilder); + SearchRequest searchRequest = new SearchRequest(tableName, indexName, builder.query(boolBuilder).build()); + SearchRequest.ColumnsToGet columnsToGet = new SearchRequest.ColumnsToGet(); + columnsToGet.setColumns(pkList); + searchRequest.setColumnsToGet(columnsToGet); + RowIterator searchIterator = client.createSearchIterator(searchRequest); + + //用filter构造的rowDataHashMap来核对searchQuery取到的数据 + verifyDataFromSearchIndexByMapFromFilter(rowDataHashMap, searchIterator); + } + + //In + @Test + public void testInFilter() { + //构造Filter + String fieldName = "val_long1"; + ColumnValue fieldValue1 = ColumnValue.fromLong(3697900); + ColumnValue fieldValue2 = ColumnValue.fromLong(99871300); + ArrayList columnValues = new ArrayList(); + columnValues.add(fieldValue1); + columnValues.add(fieldValue2); + Filter filter = new Filter(Filter.CompareOperator.IN, fieldName, columnValues); + + //通过Filter构造rowDataHashMap + HashMap rowDataHashMap = rowDataMapFromFilter(filter); + + //手动构造searchQuery(Expected) + SearchQuery searchQuery = new SearchQuery(); + TermsQuery termsQuery = new TermsQuery(); + termsQuery.setFieldName(fieldName); + termsQuery.setTerms(columnValues); + searchQuery.setQuery(termsQuery); + SearchRequest searchRequest = new SearchRequest(tableName, indexName, searchQuery); + SearchRequest.ColumnsToGet columnsToGet = new SearchRequest.ColumnsToGet(); + columnsToGet.setColumns(requiredColumns); + searchRequest.setColumnsToGet(columnsToGet); + RowIterator searchIterator = client.createSearchIterator(searchRequest); + + //用filter构造的rowDataHashMap来核对searchQuery取到的数据 + verifyDataFromSearchIndexByMapFromFilter(rowDataHashMap, searchIterator); + + } + + @Test + //LessThan GreaterThan + public void testRangeFilter() { + ArrayList filters = new ArrayList(); + filters.add(filterLessThan); + filters.add(filterGreaterThan); + filters.add(filterPk1StartWith); + Filter filter = new Filter(Filter.LogicOperator.AND, filters); + + //通过Filter构造rowDataHashMap + HashMap rowDataHashMap = rowDataMapFromFilter(filter); + + //手动构造searchQuery(Expected) + SearchQuery.Builder builder = SearchQuery.newBuilder(); + BoolQuery.Builder boolBuilder = QueryBuilders.bool().must(QueryBuilders.prefix(filterPk1StartWith.getColumnName(), filterPk1StartWith.getColumnValue().asString()) + ).must(QueryBuilders.range(filterLessThan.getColumnName()).lessThan(filterLessThan.getColumnValue().getValue()) + ).must(QueryBuilders.range(filterGreaterThan.getColumnName()).greaterThan(filterGreaterThan.getColumnValue().getValue())); + + SearchRequest searchRequest = new SearchRequest(tableName, indexName, builder.query(boolBuilder).build()); + SearchRequest.ColumnsToGet columnsToGet = new SearchRequest.ColumnsToGet(); + columnsToGet.setColumns(requiredColumns); + searchRequest.setColumnsToGet(columnsToGet); + RowIterator searchIterator = client.createSearchIterator(searchRequest); + + //用filter构造的rowDataHashMap来核对searchQuery取到的数据 + verifyDataFromSearchIndexByMapFromFilter(rowDataHashMap, searchIterator); + } + + @Test + //LessThanEqual GreaterThanEqual + public void testRangeEqualFilter() { + ArrayList filters = new ArrayList(); + filters.add(filterLessTanOrEqual); + filters.add(filterGreaterThanOrEqual); + filters.add(filterPk1StartWith); + Filter filter = new Filter(Filter.LogicOperator.AND, filters); + + //通过Filter构造rowDataHashMap + HashMap rowDataHashMap = rowDataMapFromFilter(filter); + + //手动构造searchQuery(Expected) + SearchQuery.Builder builder = SearchQuery.newBuilder(); + BoolQuery.Builder boolBuilder = QueryBuilders.bool().must(QueryBuilders.prefix(filterPk1StartWith.getColumnName(), filterPk1StartWith.getColumnValue().asString()) + ).must(QueryBuilders.range(filterLessTanOrEqual.getColumnName()).lessThanOrEqual(filterLessTanOrEqual.getColumnValue().getValue()) + ).must(QueryBuilders.range(filterGreaterThanOrEqual.getColumnName()).greaterThanOrEqual(filterGreaterThanOrEqual.getColumnValue().getValue())); + + SearchRequest searchRequest = new SearchRequest(tableName, indexName, builder.query(boolBuilder).build()); + SearchRequest.ColumnsToGet columnsToGet = new SearchRequest.ColumnsToGet(); + columnsToGet.setColumns(requiredColumns); + searchRequest.setColumnsToGet(columnsToGet); + RowIterator searchIterator = client.createSearchIterator(searchRequest); + + //用filter构造的rowDataHashMap来核对searchQuery取到的数据 + verifyDataFromSearchIndexByMapFromFilter(rowDataHashMap, searchIterator); + } + + + @Test + //GeoDistance + public void testGeoDistanceFilter() { + resetOrGeoFlag(); + //通过Filter构造rowDataHashMap + HashMap rowDataHashMap = rowDataMapFromFilter(filterGeoDistance); + + GeoQueryHelper geoQueryHelper = GSON.fromJson(filterGeoDistance.getColumnValue().asString(), GeoQueryHelper.class); + + //手动构造searchQuery(Expected) + SearchQuery searchQuery = new SearchQuery(); + GeoDistanceQuery geoDistanceQuery = new GeoDistanceQuery(); + geoDistanceQuery.setFieldName(filterGeoDistance.getColumnName()); + geoDistanceQuery.setCenterPoint(geoQueryHelper.getCenterPoint()); + geoDistanceQuery.setDistanceInMeter(geoQueryHelper.getDistanceInMeter()); + searchQuery.setQuery(geoDistanceQuery); + SearchRequest searchRequest = new SearchRequest(tableName, indexName, searchQuery); + SearchRequest.ColumnsToGet columnsToGet = new SearchRequest.ColumnsToGet(); + columnsToGet.setColumns(requiredColumns); + searchRequest.setColumnsToGet(columnsToGet); + RowIterator searchIterator = client.createSearchIterator(searchRequest); + //用filter构造的rowDataHashMap来核对searchQuery取到的数据 + verifyDataFromSearchIndexByMapFromFilter(rowDataHashMap, searchIterator); + } + + @Test + //GeoBoundingBox + public void testGeoBoundingBoxFilter() { + //为了防止不同单元测试之间相互影响下面倆全局变量 + resetOrGeoFlag(); + + + //通过Filter构造rowDataHashMap + HashMap rowDataHashMap = rowDataMapFromFilter(filterGeoBoundingBox); + + //手动构造searchQuery(Expected) + GeoQueryHelper geoQueryHelper = GSON.fromJson(filterGeoBoundingBox.getColumnValue().asString(), GeoQueryHelper.class); + SearchQuery searchQuery = new SearchQuery(); + GeoBoundingBoxQuery geoBoundingBoxQuery = new GeoBoundingBoxQuery(); + geoBoundingBoxQuery.setFieldName(filterGeoBoundingBox.getColumnName()); + geoBoundingBoxQuery.setTopLeft(geoQueryHelper.getTopLeft()); + geoBoundingBoxQuery.setBottomRight(geoQueryHelper.getBottomRight()); + searchQuery.setQuery(geoBoundingBoxQuery); + SearchRequest searchRequest = new SearchRequest(tableName, indexName, searchQuery); + SearchRequest.ColumnsToGet columnsToGet = new SearchRequest.ColumnsToGet(); + columnsToGet.setColumns(requiredColumns); + searchRequest.setColumnsToGet(columnsToGet); + RowIterator searchIterator = client.createSearchIterator(searchRequest); + + //用filter构造的rowDataHashMap来核对searchQuery取到的数据 + verifyDataFromSearchIndexByMapFromFilter(rowDataHashMap, searchIterator); + } + + + @Test + //GeoPolygon + public void testGeoPolygonFilter() { + resetOrGeoFlag(); + //通过Filter构造rowDataHashMap + HashMap rowDataHashMap = rowDataMapFromFilter(filterGeoPolygon); + + //手动构造searchQuery(Expected) + SearchQuery searchQuery = new SearchQuery(); + GeoQueryHelper geoQueryHelper = GSON.fromJson(filterGeoPolygon.getColumnValue().asString(), GeoQueryHelper.class); + GeoPolygonQuery geoPolygonQuery = new GeoPolygonQuery(); + geoPolygonQuery.setFieldName(filterGeoPolygon.getColumnName()); + geoPolygonQuery.setPoints(geoQueryHelper.getPoints()); + searchQuery.setQuery(geoPolygonQuery); + SearchRequest searchRequest = new SearchRequest(tableName, indexName, searchQuery); + SearchRequest.ColumnsToGet columnsToGet = new SearchRequest.ColumnsToGet(); + columnsToGet.setColumns(requiredColumns); + searchRequest.setColumnsToGet(columnsToGet); + RowIterator searchIterator = client.createSearchIterator(searchRequest); + + //用filter构造的rowDataHashMap来核对searchQuery取到的数据 + verifyDataFromSearchIndexByMapFromFilter(rowDataHashMap, searchIterator); + } + + private HashMap rowDataMapFromFilter(Filter filter) { + + ITablestoreSplitManager manager = new DefaultTablestoreSplitManager(client); + List splits = manager.generateTablestoreSplits(client, filter, tableName, para, requiredColumns); + HashMap rowDataHashMap = new HashMap(); + + for (ITablestoreSplit split : splits) { + split.initial(client); + Iterator rowIterator = split.getRowIterator(client); + while (rowIterator.hasNext()) { + Row next = rowIterator.next(); + rowDataHashMap.put(next.getPrimaryKey(), next); + } + } + + return rowDataHashMap; + } + + private void verifyDataFromSearchIndexByMapFromFilter(HashMap rowDataHashMap, RowIterator rowIterator) { + int searchIndexRowCount = 0; + while (rowIterator.hasNext()) { + searchIndexRowCount++; + Row rowFromSearchIndex = rowIterator.next(); + PrimaryKey primaryKeyFromSearchIndex = rowFromSearchIndex.getPrimaryKey(); + Assert.assertTrue(rowDataHashMap.containsKey(primaryKeyFromSearchIndex)); + Row rowFromFilter = rowDataHashMap.get(primaryKeyFromSearchIndex); + Column[] rowFromFilterColumns = rowFromFilter.getColumns(); + Column[] rowFromSearchIndexColumns = rowFromSearchIndex.getColumns(); + Assert.assertEquals(rowFromFilterColumns.length, rowFromSearchIndexColumns.length); + List geoColumnList = getGeoColumnList(); + for (int i = 0; i < rowFromFilterColumns.length; i++) { + Column rowFromFilterColumn = rowFromFilterColumns[i]; + Column rowFromSearchIndexColumn = rowFromSearchIndexColumns[i]; + ColumnValue rowFromFilterColumnValue = rowFromFilterColumn.getValue(); + ColumnValue rowFromSearchIndexColumnValue = rowFromSearchIndexColumn.getValue(); + //geo类型 + if (geoColumnList.contains(rowFromFilterColumn.getName())) { + //因为SearchQuery是全表扫到的数据 带timestamp,且geo数据是也是用户数据表里自己写得 + // 而Filter转parallel scan的数据是索引直接返回的数据 没有timestamp,而且geo数据也是es格式化之后的 + // 所以 timestamp字段跳过检验,es数据在此做格式化,再检验 + String[] splitFilter = rowFromFilterColumnValue.asString().split(","); + String[] splitSearchIndex = rowFromSearchIndexColumnValue.asString().split(","); + for (int j = 0; j < splitFilter.length; j++) { + Assert.assertEquals(splitFilter[j].trim(), splitSearchIndex[j].trim()); + } + //其他类型 + } else { + Assert.assertEquals(rowFromFilterColumnValue, rowFromSearchIndexColumnValue); + } + + } + } + Assert.assertEquals(rowDataHashMap.size(), searchIndexRowCount); + System.out.println(rowDataHashMap.size()); + } + + private List getGeoColumnList() { + DescribeSearchIndexRequest request = new DescribeSearchIndexRequest(); + request.setTableName(tableName); + request.setIndexName(para.getSearchIndexName()); + DescribeSearchIndexResponse response = client.describeSearchIndex(request); + IndexSchema schema = response.getSchema(); + List geoFieldList = new ArrayList(); + for (FieldSchema fieldSchema : schema.getFieldSchemas()) { + if (fieldSchema.getFieldType() == FieldType.GEO_POINT) { + geoFieldList.add(fieldSchema.getFieldName()); + } + } + return geoFieldList; + } + + private void resetOrGeoFlag() { + TablestoreSplit.containOr = false; + TablestoreSplit.containGeo = false; + } + +} diff --git a/src/test/java/com/alicloud/openservices/tablestore/ecosystem/testTablestoreSplit.java b/src/test/java/com/alicloud/openservices/tablestore/ecosystem/testTablestoreSplit.java new file mode 100644 index 0000000..70fa32f --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/ecosystem/testTablestoreSplit.java @@ -0,0 +1,629 @@ +package com.alicloud.openservices.tablestore.ecosystem; + +import com.alicloud.openservices.tablestore.model.*; +import com.alicloud.openservices.tablestore.model.search.query.Query; +import com.alicloud.openservices.tablestore.model.search.query.QueryType; +import com.alicloud.openservices.tablestore.timestream.internal.TableMetaGenerator; +import com.google.gson.Gson; +import org.junit.Assert; +import org.junit.Test; + +import java.util.Arrays; +import java.util.List; + +public class testTablestoreSplit { + @Test + public void testBuildMultiTreeFilter() { + Filter binaryFilter = new Filter(Filter.LogicOperator.AND, Arrays.asList( + new Filter(Filter.LogicOperator.AND, Arrays.asList( + new Filter(Filter.CompareOperator.GREATER_THAN, "a", ColumnValue.fromLong(1)), + new Filter(Filter.LogicOperator.AND, Arrays.asList( + new Filter(Filter.CompareOperator.LESS_THAN, "a", ColumnValue.fromLong(100)), + new Filter(Filter.CompareOperator.LESS_THAN, "a", ColumnValue.fromLong(50)))) + )), + new Filter(Filter.LogicOperator.AND, Arrays.asList( + new Filter(Filter.CompareOperator.GREATER_EQUAL, "a", ColumnValue.fromLong(2)), + new Filter(Filter.LogicOperator.OR, Arrays.asList( + new Filter(Filter.CompareOperator.GREATER_THAN, "c", ColumnValue.fromLong(666)), + new Filter(Filter.CompareOperator.LESS_THAN, "d", ColumnValue.fromLong(2)) + ))) + ))); + TablestoreSplit split = new TablestoreSplit(null, null, null); + Filter multiTreeFilter = split.buildFlatTreeFilter(binaryFilter); + // TODO: Finish assert + Assert.assertEquals(5, multiTreeFilter.getSubFilters().size()); + } + + @Test + public void testMergedSearchQueryFromFilter() { + Filter binaryFilter = new Filter(Filter.LogicOperator.AND, Arrays.asList( + new Filter(Filter.LogicOperator.AND, Arrays.asList( + new Filter(Filter.CompareOperator.GREATER_THAN, "a", ColumnValue.fromLong(2)), + new Filter(Filter.LogicOperator.AND, Arrays.asList( + new Filter(Filter.CompareOperator.LESS_THAN, "a", ColumnValue.fromLong(50)), + new Filter(Filter.CompareOperator.LESS_EQUAL, "a", ColumnValue.fromLong(50)))) + )), + new Filter(Filter.LogicOperator.AND, Arrays.asList( + new Filter(Filter.CompareOperator.GREATER_EQUAL, "a", ColumnValue.fromLong(2)), + new Filter(Filter.LogicOperator.OR, Arrays.asList( + new Filter(Filter.CompareOperator.GREATER_THAN, "c", ColumnValue.fromLong(666)), + new Filter(Filter.CompareOperator.LESS_THAN, "d", ColumnValue.fromLong(2)) + ))) + ))); + TablestoreSplit split = new TablestoreSplit(null, null, null); + Filter multiTreeFilter = split.buildFlatTreeFilter(binaryFilter); + Query query = null; + try { + query = split.buildMergedSearchQueryFromFilter(multiTreeFilter); + } catch (Exception e) { + e.printStackTrace(); + } + // TODO : Finish assert + Assert.assertEquals(QueryType.QueryType_BoolQuery, query.getQueryType()); + } + + @Test + public void testGeneratePkRangeWithOnePK() { + TablestoreSplit split = new TablestoreSplit(TablestoreSplit.SplitType.KeyValue, null, null); + TableMeta meta = new TableMeta("testTable"); + meta.addPrimaryKeyColumn("pk1", PrimaryKeyType.INTEGER); + split.setKvTableMeta(meta); + + PrimaryKeyBuilder beginBuilder = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + beginBuilder.addPrimaryKeyColumn("pk1", PrimaryKeyValue.INF_MIN); + + PrimaryKeyBuilder endBuilder = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + endBuilder.addPrimaryKeyColumn("pk1", PrimaryKeyValue.INF_MAX); + + PrimaryKeyBuilder expected = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + expected.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(1)); + PrimaryKey expectedBegin = expected.build(); + + expected = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + expected.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(2)); + PrimaryKey expectedEnd = expected.build(); + + // > && < + Filter filter = new Filter(Filter.LogicOperator.AND, Arrays.asList( + new Filter(Filter.CompareOperator.GREATER_THAN, "pk1", ColumnValue.fromLong(1)), + new Filter(Filter.CompareOperator.LESS_THAN, "pk1", ColumnValue.fromLong(2)))); + List ranges = split.generatePkRange(filter, beginBuilder.build(), endBuilder.build()); + Assert.assertEquals(1, ranges.size()); + Assert.assertEquals(expectedBegin, ranges.get(0).getBegin()); + Assert.assertEquals(expectedEnd, ranges.get(0).getEnd()); + + // >= && <= + filter = new Filter(Filter.LogicOperator.AND, Arrays.asList( + new Filter(Filter.CompareOperator.GREATER_EQUAL, "pk1", ColumnValue.fromLong(1)), + new Filter(Filter.CompareOperator.LESS_EQUAL, "pk1", ColumnValue.fromLong(2)))); + ranges = split.generatePkRange(filter, beginBuilder.build(), endBuilder.build()); + Assert.assertEquals(2, ranges.size()); + Assert.assertEquals(expectedBegin, ranges.get(0).getBegin()); + Assert.assertEquals(expectedEnd, ranges.get(0).getEnd()); + Assert.assertEquals(expectedEnd, ranges.get(1).getEqual()); + + // >= && < + filter = new Filter(Filter.LogicOperator.AND, Arrays.asList( + new Filter(Filter.CompareOperator.GREATER_EQUAL, "pk1", ColumnValue.fromLong(1)), + new Filter(Filter.CompareOperator.LESS_THAN, "pk1", ColumnValue.fromLong(2)))); + ranges = split.generatePkRange(filter, beginBuilder.build(), endBuilder.build()); + Assert.assertEquals(1, ranges.size()); + Assert.assertEquals(expectedBegin, ranges.get(0).getBegin()); + Assert.assertEquals(expectedEnd, ranges.get(0).getEnd()); + + // > && <= + filter = new Filter(Filter.LogicOperator.AND, Arrays.asList( + new Filter(Filter.CompareOperator.GREATER_THAN, "pk1", ColumnValue.fromLong(1)), + new Filter(Filter.CompareOperator.LESS_EQUAL, "pk1", ColumnValue.fromLong(2)))); + ranges = split.generatePkRange(filter, beginBuilder.build(), endBuilder.build()); + Assert.assertEquals(2, ranges.size()); + Assert.assertEquals(expectedBegin, ranges.get(0).getBegin()); + Assert.assertEquals(expectedEnd, ranges.get(0).getEnd()); + Assert.assertEquals(expectedEnd, ranges.get(1).getEqual()); + + // = + filter = new Filter(Filter.LogicOperator.AND, Arrays.asList( + new Filter(Filter.CompareOperator.EQUAL, "pk1", ColumnValue.fromLong(1)))); + ranges = split.generatePkRange(filter, beginBuilder.build(), endBuilder.build()); + + Assert.assertEquals(1, ranges.size()); + Assert.assertEquals(expectedBegin, ranges.get(0).getEqual()); + } + + @Test + public void testGeneratePkRangeWithOnePKInvalidRange() { + TablestoreSplit split = new TablestoreSplit(TablestoreSplit.SplitType.KeyValue, null, null); + TableMeta meta = new TableMeta("testTable"); + meta.addPrimaryKeyColumn("pk1", PrimaryKeyType.INTEGER); + split.setKvTableMeta(meta); + + PrimaryKeyBuilder beginBuilder = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + beginBuilder.addPrimaryKeyColumn("pk1", PrimaryKeyValue.INF_MIN); + + PrimaryKeyBuilder endBuilder = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + endBuilder.addPrimaryKeyColumn("pk1", PrimaryKeyValue.INF_MAX); + + // invalid range: > 4 && <= 2 + Filter filter = new Filter(Filter.LogicOperator.AND, Arrays.asList( + new Filter(Filter.CompareOperator.GREATER_THAN, "pk1", ColumnValue.fromLong(4)), + new Filter(Filter.CompareOperator.LESS_EQUAL, "pk1", ColumnValue.fromLong(2)))); + List ranges = split.generatePkRange(filter, beginBuilder.build(), endBuilder.build()); + Assert.assertEquals(0, ranges.size()); + } + + @Test + public void testGeneratePkRangeWithOnePKWithOrFilter() { + TablestoreSplit split = new TablestoreSplit(TablestoreSplit.SplitType.KeyValue, null, null); + TableMeta meta = new TableMeta("testTable"); + meta.addPrimaryKeyColumn("pk1", PrimaryKeyType.INTEGER); + split.setKvTableMeta(meta); + + PrimaryKeyBuilder beginBuilder = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + beginBuilder.addPrimaryKeyColumn("pk1", PrimaryKeyValue.INF_MIN); + + PrimaryKeyBuilder endBuilder = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + endBuilder.addPrimaryKeyColumn("pk1", PrimaryKeyValue.INF_MAX); + + // [INF_MIN, INF_MAX) with pk1 = 1 or pk1 = 16 + Filter filter = new Filter(Filter.LogicOperator.OR, Arrays.asList( + new Filter(Filter.CompareOperator.EQUAL, "pk1", ColumnValue.fromLong(1)), + new Filter(Filter.CompareOperator.EQUAL, "pk1", ColumnValue.fromLong(16)))); + List ranges = split.generatePkRange(filter, beginBuilder.build(), endBuilder.build()); + Assert.assertEquals(2, ranges.size()); + PrimaryKeyBuilder beginPK = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + beginPK.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(1)); + Assert.assertEquals(beginPK.build(), ranges.get(0).getEqual()); + beginPK = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + beginPK.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(16)); + Assert.assertEquals(beginPK.build(), ranges.get(1).getEqual()); + + // [1, 16) with pk1 = 1 or pk1 = 16 + beginBuilder = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + beginBuilder.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(1)); + endBuilder = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + endBuilder.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(16)); + + ranges = split.generatePkRange(filter, beginBuilder.build(), endBuilder.build()); + Assert.assertEquals(1, ranges.size()); + beginPK = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + beginPK.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(1)); + Assert.assertEquals(beginPK.build(), ranges.get(0).getEqual()); + } + + @Test + public void testGeneratePkRangeWithOnePKMultiRanges() { + TablestoreSplit split = new TablestoreSplit(TablestoreSplit.SplitType.KeyValue, null, null); + TableMeta meta = new TableMeta("testTable"); + meta.addPrimaryKeyColumn("pk1", PrimaryKeyType.INTEGER); + split.setKvTableMeta(meta); + + PrimaryKeyBuilder beginBuilder = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + beginBuilder.addPrimaryKeyColumn("pk1", PrimaryKeyValue.INF_MIN); + + PrimaryKeyBuilder endBuilder = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + endBuilder.addPrimaryKeyColumn("pk1", PrimaryKeyValue.INF_MAX); + + // filter: (pk1 > 2 & pk1 < 4) or (pk1 >= 4 and pk1 < 6) or (pk1 > 8 and pk1 <= 10) + Filter filter = new Filter(Filter.LogicOperator.OR, Arrays.asList( + new Filter(Filter.LogicOperator.AND, Arrays.asList( + new Filter(Filter.CompareOperator.GREATER_THAN, "pk1", ColumnValue.fromLong(2)), + new Filter(Filter.CompareOperator.LESS_THAN, "pk1", ColumnValue.fromLong(4)))), + new Filter(Filter.LogicOperator.AND, Arrays.asList( + new Filter(Filter.CompareOperator.GREATER_EQUAL, "pk1", ColumnValue.fromLong(4)), + new Filter(Filter.CompareOperator.LESS_THAN, "pk1", ColumnValue.fromLong(6)))), + new Filter(Filter.LogicOperator.AND, Arrays.asList( + new Filter(Filter.CompareOperator.GREATER_THAN, "pk1", ColumnValue.fromLong(8)), + new Filter(Filter.CompareOperator.LESS_EQUAL, "pk1", ColumnValue.fromLong(10)))))); + List ranges = split.generatePkRange(filter, beginBuilder.build(), endBuilder.build()); + Assert.assertEquals(4, ranges.size()); + + PrimaryKeyBuilder beginPK = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + beginPK.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(2)); + PrimaryKeyBuilder endPK = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + endPK.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(4)); + Assert.assertEquals(beginPK.build(), ranges.get(0).getBegin()); + Assert.assertEquals(endPK.build(), ranges.get(0).getEnd()); + + beginPK = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + beginPK.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(4)); + endPK = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + endPK.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(6)); + Assert.assertEquals(beginPK.build(), ranges.get(1).getBegin()); + Assert.assertEquals(endPK.build(), ranges.get(1).getEnd()); + + beginPK = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + beginPK.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(8)); + endPK = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + endPK.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(10)); + Assert.assertEquals(beginPK.build(), ranges.get(2).getBegin()); + Assert.assertEquals(endPK.build(), ranges.get(2).getEnd()); + + endPK = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + endPK.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(10)); + Assert.assertEquals(endPK.build(), ranges.get(3).getEqual()); + } + + @Test + public void testGeneratePkRangeWithPrefixMatch() { + TablestoreSplit split = new TablestoreSplit(TablestoreSplit.SplitType.KeyValue, null, null); + TableMeta meta = new TableMeta("testTable"); + meta.addPrimaryKeyColumn("pk1", PrimaryKeyType.INTEGER); + meta.addPrimaryKeyColumn("pk2", PrimaryKeyType.INTEGER); + meta.addPrimaryKeyColumn("pk3", PrimaryKeyType.STRING); + split.setKvTableMeta(meta); + + PrimaryKeyBuilder beginBuilder = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + beginBuilder.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(0)); + beginBuilder.addPrimaryKeyColumn("pk2", PrimaryKeyValue.INF_MIN); + beginBuilder.addPrimaryKeyColumn("pk3", PrimaryKeyValue.INF_MIN); + + PrimaryKeyBuilder endBuilder = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + endBuilder.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(2)); + endBuilder.addPrimaryKeyColumn("pk2", PrimaryKeyValue.INF_MIN); + endBuilder.addPrimaryKeyColumn("pk3", PrimaryKeyValue.INF_MIN); + + // with 1 prefix match + Filter filter = new Filter(Filter.LogicOperator.AND, Arrays.asList( + new Filter(Filter.CompareOperator.EQUAL, "pk1", ColumnValue.fromLong(1)))); + List ranges = split.generatePkRange(filter, beginBuilder.build(), endBuilder.build()); + Assert.assertEquals(1, ranges.size()); + + PrimaryKeyBuilder expected = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + expected.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(1)); + expected.addPrimaryKeyColumn("pk2", PrimaryKeyValue.INF_MIN); + expected.addPrimaryKeyColumn("pk3", PrimaryKeyValue.INF_MIN); + Assert.assertEquals(expected.build(), ranges.get(0).getBegin()); + + expected = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + expected.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(1)); + expected.addPrimaryKeyColumn("pk2", PrimaryKeyValue.INF_MAX); + expected.addPrimaryKeyColumn("pk3", PrimaryKeyValue.INF_MAX); + Assert.assertEquals(expected.build(), ranges.get(0).getEnd()); + + + // with 2 prefix match + filter = new Filter(Filter.LogicOperator.AND, Arrays.asList( + new Filter(Filter.CompareOperator.EQUAL, "pk1", ColumnValue.fromLong(1)), + new Filter(Filter.CompareOperator.EQUAL, "pk2", ColumnValue.fromLong(2)))); + ranges = split.generatePkRange(filter, beginBuilder.build(), endBuilder.build()); + Assert.assertEquals(1, ranges.size()); + + expected = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + expected.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(1)); + expected.addPrimaryKeyColumn("pk2", PrimaryKeyValue.fromLong(2)); + expected.addPrimaryKeyColumn("pk3", PrimaryKeyValue.INF_MIN); + Assert.assertEquals(expected.build(), ranges.get(0).getBegin()); + + expected = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + expected.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(1)); + expected.addPrimaryKeyColumn("pk2", PrimaryKeyValue.fromLong(2)); + expected.addPrimaryKeyColumn("pk3", PrimaryKeyValue.INF_MAX); + Assert.assertEquals(expected.build(), ranges.get(0).getEnd()); + } + + @Test + public void testGeneratePkRangeWithAllEqualFilter() { + TablestoreSplit split = new TablestoreSplit(TablestoreSplit.SplitType.KeyValue, null, null); + TableMeta meta = new TableMeta("testTable"); + meta.addPrimaryKeyColumn("pk1", PrimaryKeyType.INTEGER); + meta.addPrimaryKeyColumn("pk2", PrimaryKeyType.INTEGER); + meta.addPrimaryKeyColumn("pk3", PrimaryKeyType.STRING); + split.setKvTableMeta(meta); + + Filter filter = new Filter(Filter.LogicOperator.AND, Arrays.asList( + new Filter(Filter.CompareOperator.EQUAL, "pk1", ColumnValue.fromLong(1)), + new Filter(Filter.CompareOperator.EQUAL, "pk2", ColumnValue.fromLong(2)), + new Filter(Filter.CompareOperator.EQUAL, "pk3", ColumnValue.fromString("testpk3")))); + PrimaryKeyBuilder beginBuilder = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + beginBuilder.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(0)); + beginBuilder.addPrimaryKeyColumn("pk2", PrimaryKeyValue.INF_MIN); + beginBuilder.addPrimaryKeyColumn("pk3", PrimaryKeyValue.INF_MIN); + + PrimaryKeyBuilder endBuilder = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + endBuilder.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(2)); + endBuilder.addPrimaryKeyColumn("pk2", PrimaryKeyValue.INF_MIN); + endBuilder.addPrimaryKeyColumn("pk3", PrimaryKeyValue.INF_MIN); + + List ranges = split.generatePkRange(filter, beginBuilder.build(), endBuilder.build()); + Assert.assertEquals(1, ranges.size()); + + PrimaryKeyBuilder expected = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + expected.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(1)); + expected.addPrimaryKeyColumn("pk2", PrimaryKeyValue.fromLong(2)); + expected.addPrimaryKeyColumn("pk3", PrimaryKeyValue.fromString("testpk3")); + Assert.assertEquals(expected.build(), ranges.get(0).getEqual()); + } + + @Test + public void testGeneratePkRangeWithEqualAndMiddleRangeFilter() { + TablestoreSplit split = new TablestoreSplit(TablestoreSplit.SplitType.KeyValue, null, null); + TableMeta meta = new TableMeta("testTable"); + meta.addPrimaryKeyColumn("pk1", PrimaryKeyType.INTEGER); + meta.addPrimaryKeyColumn("pk2", PrimaryKeyType.INTEGER); + meta.addPrimaryKeyColumn("pk3", PrimaryKeyType.STRING); + split.setKvTableMeta(meta); + + Filter filter = new Filter(Filter.LogicOperator.AND, Arrays.asList( + new Filter(Filter.CompareOperator.EQUAL, "pk1", ColumnValue.fromLong(1)), + new Filter(Filter.CompareOperator.GREATER_EQUAL, "pk2", ColumnValue.fromLong(2)), + new Filter(Filter.CompareOperator.LESS_EQUAL, "pk2", ColumnValue.fromLong(3)), + new Filter(Filter.CompareOperator.GREATER_EQUAL, "pk3", ColumnValue.fromString("testpk3")), + new Filter(Filter.CompareOperator.LESS_EQUAL, "pk3", ColumnValue.fromString("testpk4")))); + PrimaryKeyBuilder beginBuilder = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + beginBuilder.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(0)); + beginBuilder.addPrimaryKeyColumn("pk2", PrimaryKeyValue.INF_MIN); + beginBuilder.addPrimaryKeyColumn("pk3", PrimaryKeyValue.INF_MIN); + + PrimaryKeyBuilder endBuilder = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + endBuilder.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(2)); + endBuilder.addPrimaryKeyColumn("pk2", PrimaryKeyValue.INF_MIN); + endBuilder.addPrimaryKeyColumn("pk3", PrimaryKeyValue.INF_MIN); + + List ranges = split.generatePkRange(filter, beginBuilder.build(), endBuilder.build()); + Assert.assertEquals(1, ranges.size()); + + PrimaryKeyBuilder expected = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + expected.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(1)); + expected.addPrimaryKeyColumn("pk2", PrimaryKeyValue.fromLong(2)); + expected.addPrimaryKeyColumn("pk3", PrimaryKeyValue.INF_MIN); + Assert.assertEquals(expected.build(), ranges.get(0).getBegin()); + expected = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + expected.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(1)); + expected.addPrimaryKeyColumn("pk2", PrimaryKeyValue.fromLong(3)); + expected.addPrimaryKeyColumn("pk3", PrimaryKeyValue.INF_MAX); + Assert.assertEquals(expected.build(), ranges.get(0).getEnd()); + } + + @Test + public void testGeneratePkRangeWithEqualAndRangeFilter() { + TablestoreSplit split = new TablestoreSplit(TablestoreSplit.SplitType.KeyValue, null, null); + TableMeta meta = new TableMeta("testTable"); + meta.addPrimaryKeyColumn("pk1", PrimaryKeyType.INTEGER); + meta.addPrimaryKeyColumn("pk2", PrimaryKeyType.INTEGER); + meta.addPrimaryKeyColumn("pk3", PrimaryKeyType.STRING); + split.setKvTableMeta(meta); + + Filter filter = new Filter(Filter.LogicOperator.AND, Arrays.asList( + new Filter(Filter.CompareOperator.EQUAL, "pk1", ColumnValue.fromLong(1)), + new Filter(Filter.CompareOperator.EQUAL, "pk2", ColumnValue.fromLong(2)), + new Filter(Filter.CompareOperator.GREATER_EQUAL, "pk3", ColumnValue.fromString("testpk3")), + new Filter(Filter.CompareOperator.LESS_EQUAL, "pk3", ColumnValue.fromString("testpk4")))); + PrimaryKeyBuilder beginBuilder = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + beginBuilder.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(0)); + beginBuilder.addPrimaryKeyColumn("pk2", PrimaryKeyValue.INF_MIN); + beginBuilder.addPrimaryKeyColumn("pk3", PrimaryKeyValue.INF_MIN); + + PrimaryKeyBuilder endBuilder = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + endBuilder.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(2)); + endBuilder.addPrimaryKeyColumn("pk2", PrimaryKeyValue.INF_MIN); + endBuilder.addPrimaryKeyColumn("pk3", PrimaryKeyValue.INF_MIN); + + List ranges = split.generatePkRange(filter, beginBuilder.build(), endBuilder.build()); + Assert.assertEquals(2, ranges.size()); + + PrimaryKeyBuilder expected = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + expected.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(1)); + expected.addPrimaryKeyColumn("pk2", PrimaryKeyValue.fromLong(2)); + expected.addPrimaryKeyColumn("pk3", PrimaryKeyValue.fromString("testpk3")); + Assert.assertEquals(expected.build(), ranges.get(0).getBegin()); + expected = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + expected.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(1)); + expected.addPrimaryKeyColumn("pk2", PrimaryKeyValue.fromLong(2)); + expected.addPrimaryKeyColumn("pk3", PrimaryKeyValue.fromString("testpk4")); + Assert.assertEquals(expected.build(), ranges.get(0).getEnd()); + + Assert.assertEquals(expected.build(), ranges.get(1).getEqual()); + } + + @Test + public void testGeneratePkRangeMultiRanges() { + TablestoreSplit split = new TablestoreSplit(TablestoreSplit.SplitType.KeyValue, null, null); + TableMeta meta = new TableMeta("testTable"); + meta.addPrimaryKeyColumn("pk1", PrimaryKeyType.INTEGER); + meta.addPrimaryKeyColumn("pk2", PrimaryKeyType.INTEGER); + meta.addPrimaryKeyColumn("pk3", PrimaryKeyType.STRING); + split.setKvTableMeta(meta); + + PrimaryKeyBuilder beginBuilder = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + beginBuilder.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(0)); + beginBuilder.addPrimaryKeyColumn("pk2", PrimaryKeyValue.fromLong(0)); + beginBuilder.addPrimaryKeyColumn("pk3", PrimaryKeyValue.INF_MIN); + + PrimaryKeyBuilder endBuilder = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + endBuilder.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(9)); + endBuilder.addPrimaryKeyColumn("pk2", PrimaryKeyValue.INF_MIN); + endBuilder.addPrimaryKeyColumn("pk3", PrimaryKeyValue.INF_MIN); + + // filter: (pk1 > 2 & pk1 <= 4) or (pk1 >= 4 and pk1 < 6) or (pk1 > 8 and pk1 <= 10) + Filter filter = new Filter(Filter.LogicOperator.OR, Arrays.asList( + new Filter(Filter.LogicOperator.AND, Arrays.asList( + new Filter(Filter.CompareOperator.GREATER_THAN, "pk1", ColumnValue.fromLong(2)), + new Filter(Filter.CompareOperator.LESS_EQUAL, "pk1", ColumnValue.fromLong(4)))), + new Filter(Filter.LogicOperator.AND, Arrays.asList( + new Filter(Filter.CompareOperator.GREATER_EQUAL, "pk1", ColumnValue.fromLong(4)), + new Filter(Filter.CompareOperator.LESS_THAN, "pk1", ColumnValue.fromLong(6)))), + new Filter(Filter.LogicOperator.AND, Arrays.asList( + new Filter(Filter.CompareOperator.GREATER_THAN, "pk1", ColumnValue.fromLong(8)), + new Filter(Filter.CompareOperator.LESS_EQUAL, "pk1", ColumnValue.fromLong(10)))))); + List ranges = split.generatePkRange(filter, beginBuilder.build(), endBuilder.build()); + Assert.assertEquals(3, ranges.size()); + + PrimaryKeyBuilder beginPK = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + beginPK.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(2)); + beginPK.addPrimaryKeyColumn("pk2", PrimaryKeyValue.INF_MIN); + beginPK.addPrimaryKeyColumn("pk3", PrimaryKeyValue.INF_MIN); + PrimaryKeyBuilder endPK = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + endPK.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(4)); + endPK.addPrimaryKeyColumn("pk2", PrimaryKeyValue.INF_MAX); + endPK.addPrimaryKeyColumn("pk3", PrimaryKeyValue.INF_MAX); + Assert.assertEquals(beginPK.build(), ranges.get(0).getBegin()); + Assert.assertEquals(endPK.build(), ranges.get(0).getEnd()); + + beginPK = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + beginPK.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(4)); + beginPK.addPrimaryKeyColumn("pk2", PrimaryKeyValue.INF_MIN); + beginPK.addPrimaryKeyColumn("pk3", PrimaryKeyValue.INF_MIN); + endPK = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + endPK.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(6)); + endPK.addPrimaryKeyColumn("pk2", PrimaryKeyValue.INF_MIN); + endPK.addPrimaryKeyColumn("pk3", PrimaryKeyValue.INF_MIN); + Assert.assertEquals(beginPK.build(), ranges.get(1).getBegin()); + Assert.assertEquals(endPK.build(), ranges.get(1).getEnd()); + + beginPK = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + beginPK.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(8)); + beginPK.addPrimaryKeyColumn("pk2", PrimaryKeyValue.INF_MIN); + beginPK.addPrimaryKeyColumn("pk3", PrimaryKeyValue.INF_MIN); + endPK = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + endPK.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(9)); + endPK.addPrimaryKeyColumn("pk2", PrimaryKeyValue.INF_MIN); + endPK.addPrimaryKeyColumn("pk3", PrimaryKeyValue.INF_MIN); + Assert.assertEquals(beginPK.build(), ranges.get(2).getBegin()); + Assert.assertEquals(endPK.build(), ranges.get(2).getEnd()); + } + + @Test + public void testCheckIfMatchTheFilter() { + TablestoreSplit split = new TablestoreSplit(TablestoreSplit.SplitType.KeyValue, null, null); + Split kvSplit = new Split(); + PrimaryKeyBuilder begin = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + PrimaryKeyBuilder end = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + begin.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(10)); + end.addPrimaryKeyColumn("pk2", PrimaryKeyValue.fromLong(20)); + kvSplit.setLowerBound(begin.build()); + kvSplit.setUpperBound(end.build()); + split.setKvSplit(kvSplit); + + Filter filter = new Filter(Filter.LogicOperator.AND, Arrays.asList( + new Filter(Filter.CompareOperator.EQUAL, "pk1", ColumnValue.fromLong(1)))); + Assert.assertFalse(split.checkIfMatchTheFilter(filter)); + + filter = new Filter(Filter.LogicOperator.AND, Arrays.asList( + new Filter(Filter.CompareOperator.EQUAL, "pk1", ColumnValue.fromLong(10)))); + Assert.assertTrue(split.checkIfMatchTheFilter(filter)); + + filter = new Filter(Filter.LogicOperator.AND, Arrays.asList( + new Filter(Filter.CompareOperator.EQUAL, "pk1", ColumnValue.fromLong(15)))); + Assert.assertTrue(split.checkIfMatchTheFilter(filter)); + + filter = new Filter(Filter.LogicOperator.AND, Arrays.asList( + new Filter(Filter.CompareOperator.EQUAL, "pk1", ColumnValue.fromLong(20)))); + Assert.assertFalse(split.checkIfMatchTheFilter(filter)); + + filter = new Filter(Filter.LogicOperator.AND, Arrays.asList( + new Filter(Filter.CompareOperator.EQUAL, "pk1", ColumnValue.fromLong(21)))); + Assert.assertFalse(split.checkIfMatchTheFilter(filter)); + } + + @Test + public void testGeneratePkRangeWithOrFilter() { + TablestoreSplit split = new TablestoreSplit(TablestoreSplit.SplitType.KeyValue, null, null); + TableMeta meta = new TableMeta("testTable"); + meta.addPrimaryKeyColumn("pk1", PrimaryKeyType.INTEGER); + meta.addPrimaryKeyColumn("pk2", PrimaryKeyType.INTEGER); + meta.addPrimaryKeyColumn("pk3", PrimaryKeyType.STRING); + split.setKvTableMeta(meta); + + PrimaryKeyBuilder beginBuilder = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + beginBuilder.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(15)); + beginBuilder.addPrimaryKeyColumn("pk2", PrimaryKeyValue.INF_MIN); + beginBuilder.addPrimaryKeyColumn("pk3", PrimaryKeyValue.INF_MIN); + + PrimaryKeyBuilder endBuilder = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + endBuilder.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(16)); + endBuilder.addPrimaryKeyColumn("pk2", PrimaryKeyValue.INF_MIN); + endBuilder.addPrimaryKeyColumn("pk3", PrimaryKeyValue.INF_MIN); + + // pk1 = 1 or pk1 = 15 + Filter filter = new Filter(Filter.LogicOperator.OR, Arrays.asList( + new Filter(Filter.CompareOperator.EQUAL, "pk1", ColumnValue.fromLong(1)), + new Filter(Filter.CompareOperator.EQUAL, "pk1", ColumnValue.fromLong(15)))); + List ranges = split.generatePkRange(filter, beginBuilder.build(), endBuilder.build()); + Assert.assertEquals(1, ranges.size()); + + PrimaryKeyBuilder expected = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + expected.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(15)); + expected.addPrimaryKeyColumn("pk2", PrimaryKeyValue.INF_MIN); + expected.addPrimaryKeyColumn("pk3", PrimaryKeyValue.INF_MIN); + Assert.assertEquals(expected.build(), ranges.get(0).getBegin()); + + expected = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + expected.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(15)); + expected.addPrimaryKeyColumn("pk2", PrimaryKeyValue.INF_MAX); + expected.addPrimaryKeyColumn("pk3", PrimaryKeyValue.INF_MAX); + Assert.assertEquals(expected.build(), ranges.get(0).getEnd()); + + + // pk1 = 14 or pk1 = 16 + filter = new Filter(Filter.LogicOperator.OR, Arrays.asList( + new Filter(Filter.CompareOperator.EQUAL, "pk1", ColumnValue.fromLong(14)), + new Filter(Filter.CompareOperator.EQUAL, "pk2", ColumnValue.fromLong(16)))); + ranges = split.generatePkRange(filter, beginBuilder.build(), endBuilder.build()); + Assert.assertEquals(0, ranges.size()); + } + + @Test + public void testGeneratePkRangeWithPrefixOrFilter() { + TablestoreSplit split = new TablestoreSplit(TablestoreSplit.SplitType.KeyValue, null, null); + TableMeta meta = new TableMeta("testTable"); + meta.addPrimaryKeyColumn("pk1", PrimaryKeyType.INTEGER); + meta.addPrimaryKeyColumn("pk2", PrimaryKeyType.INTEGER); + meta.addPrimaryKeyColumn("pk3", PrimaryKeyType.STRING); + split.setKvTableMeta(meta); + + PrimaryKeyBuilder beginBuilder = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + beginBuilder.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(15)); + beginBuilder.addPrimaryKeyColumn("pk2", PrimaryKeyValue.INF_MIN); + beginBuilder.addPrimaryKeyColumn("pk3", PrimaryKeyValue.INF_MIN); + + PrimaryKeyBuilder endBuilder = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + endBuilder.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(16)); + endBuilder.addPrimaryKeyColumn("pk2", PrimaryKeyValue.INF_MIN); + endBuilder.addPrimaryKeyColumn("pk3", PrimaryKeyValue.INF_MIN); + + // (pk1 = 1 or pk1 = 15) and pk2 = 2 + Filter filter = new Filter(Filter.LogicOperator.AND, + Arrays.asList(new Filter(Filter.LogicOperator.OR, Arrays.asList( + new Filter(Filter.CompareOperator.EQUAL, "pk1", ColumnValue.fromLong(1)), + new Filter(Filter.CompareOperator.EQUAL, "pk1", ColumnValue.fromLong(15)))), + new Filter(Filter.CompareOperator.EQUAL, "pk2", ColumnValue.fromLong(2)))); + + List ranges = split.generatePkRange(filter, beginBuilder.build(), endBuilder.build()); + Assert.assertEquals(1, ranges.size()); + + PrimaryKeyBuilder expected = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + expected.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(15)); + expected.addPrimaryKeyColumn("pk2", PrimaryKeyValue.fromLong(2)); + expected.addPrimaryKeyColumn("pk3", PrimaryKeyValue.INF_MIN); + Assert.assertEquals(expected.build(), ranges.get(0).getBegin()); + + expected = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + expected.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(15)); + expected.addPrimaryKeyColumn("pk2", PrimaryKeyValue.fromLong(2)); + expected.addPrimaryKeyColumn("pk3", PrimaryKeyValue.INF_MAX); + Assert.assertEquals(expected.build(), ranges.get(0).getEnd()); + + + // pk2 = 2 and (pk1 = 1 or pk1 = 15) + filter = new Filter(Filter.LogicOperator.AND, + Arrays.asList( + new Filter(Filter.CompareOperator.EQUAL, "pk2", ColumnValue.fromLong(2)), + new Filter(Filter.LogicOperator.OR, Arrays.asList( + new Filter(Filter.CompareOperator.EQUAL, "pk1", ColumnValue.fromLong(1)), + new Filter(Filter.CompareOperator.EQUAL, "pk1", ColumnValue.fromLong(15)))))); + ranges = split.generatePkRange(filter, beginBuilder.build(), endBuilder.build()); + Assert.assertEquals(1, ranges.size()); + + expected = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + expected.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(15)); + expected.addPrimaryKeyColumn("pk2", PrimaryKeyValue.fromLong(2)); + expected.addPrimaryKeyColumn("pk3", PrimaryKeyValue.INF_MIN); + Assert.assertEquals(expected.build(), ranges.get(0).getBegin()); + + expected = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + expected.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(15)); + expected.addPrimaryKeyColumn("pk2", PrimaryKeyValue.fromLong(2)); + expected.addPrimaryKeyColumn("pk3", PrimaryKeyValue.INF_MAX); + Assert.assertEquals(expected.build(), ranges.get(0).getEnd()); + } +} diff --git a/src/test/java/com/alicloud/openservices/tablestore/functiontest/APITest.java b/src/test/java/com/alicloud/openservices/tablestore/functiontest/APITest.java index 192ba3d..2d8c9de 100644 --- a/src/test/java/com/alicloud/openservices/tablestore/functiontest/APITest.java +++ b/src/test/java/com/alicloud/openservices/tablestore/functiontest/APITest.java @@ -6,6 +6,7 @@ import java.io.IOException; import java.io.UnsupportedEncodingException; import java.util.ArrayList; +import java.util.Arrays; import java.util.Date; import java.util.List; @@ -456,4 +457,56 @@ public void testCase6() { List rows = OTSHelper.getRange(ots, rangeRowQueryCriteria).getRows(); assertEquals(0, rows.size()); } + + @Test + public void testStreamWithLongTableName() throws Exception { + int startSize = 230; + int maxSize = 256; + int maxSizeForStream = 238; + for (int longTableNameSize = startSize; longTableNameSize < maxSize; longTableNameSize += 1) { + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < longTableNameSize; i++) { + sb.append("a"); + } + String longTableName = sb.toString(); + List scheme = new ArrayList(); + scheme.add(new PrimaryKeySchema("pk", PrimaryKeyType.INTEGER)); + OTSHelper.createTable(ots, longTableName, scheme, -1, 1); + UpdateTableRequest updateTableRequest = new UpdateTableRequest(longTableName); + updateTableRequest.setStreamSpecification(new StreamSpecification(true, 168)); + ots.updateTable(updateTableRequest); + } + Utils.waitForPartitionLoad(""); + for (int longTableNameSize = startSize; longTableNameSize < maxSize; longTableNameSize += 1) { + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < longTableNameSize; i++) { + sb.append("a"); + } + String longTableName = sb.toString(); + for (int i = 0; i < 10; i++) { + OTSHelper.putRow(ots, longTableName, PrimaryKeyBuilder.createPrimaryKeyBuilder().addPrimaryKeyColumn("pk", PrimaryKeyValue.fromLong(i)).build(), + Arrays.asList(new Column("col", ColumnValue.fromLong(i)))); + } + ListStreamRequest listStreamRequest = new ListStreamRequest(longTableName); + String streamId = ots.listStream(listStreamRequest).getStreams().get(0).getStreamId(); + DescribeStreamRequest describeStreamRequest = new DescribeStreamRequest(streamId); + String shardId = ots.describeStream(describeStreamRequest).getShards().get(0).getShardId(); + GetShardIteratorRequest getShardIteratorRequest = new GetShardIteratorRequest(streamId, shardId); + String shardIterator = ots.getShardIterator(getShardIteratorRequest).getShardIterator(); + GetStreamRecordRequest getStreamRecordRequest = new GetStreamRecordRequest(shardIterator); + if (longTableNameSize > maxSizeForStream) { + try { + GetStreamRecordResponse getStreamRecordResponse = ots.getStreamRecord(getStreamRecordRequest); + fail(); + } catch (TableStoreException ex) { + assertEquals("OTSParameterInvalid", ex.getErrorCode()); + assertTrue(ex.getMessage().startsWith("Invalid stream id")); + } + } else { + GetStreamRecordResponse getStreamRecordResponse = ots.getStreamRecord(getStreamRecordRequest); + assertEquals(10, getStreamRecordResponse.getRecords().size()); + } + } + OTSHelper.deleteAllTable(ots); + } } diff --git a/src/test/java/com/alicloud/openservices/tablestore/functiontest/DataOperationTest.java b/src/test/java/com/alicloud/openservices/tablestore/functiontest/DataOperationTest.java index 5d1cbc3..2c9181a 100644 --- a/src/test/java/com/alicloud/openservices/tablestore/functiontest/DataOperationTest.java +++ b/src/test/java/com/alicloud/openservices/tablestore/functiontest/DataOperationTest.java @@ -27,7 +27,7 @@ import com.google.gson.JsonSyntaxException; public class DataOperationTest extends BaseFT{ - + private static String tableName = "TableOptionsFunctiontest"; private static SyncClientInterface ots; diff --git a/src/test/java/com/alicloud/openservices/tablestore/functiontest/LocalTxnTest.java b/src/test/java/com/alicloud/openservices/tablestore/functiontest/LocalTxnTest.java index 3adc7ca..ba731b7 100644 --- a/src/test/java/com/alicloud/openservices/tablestore/functiontest/LocalTxnTest.java +++ b/src/test/java/com/alicloud/openservices/tablestore/functiontest/LocalTxnTest.java @@ -3,16 +3,17 @@ import com.alicloud.openservices.tablestore.SyncClient; import com.alicloud.openservices.tablestore.TableStoreException; +import com.alicloud.openservices.tablestore.common.Utils; import com.alicloud.openservices.tablestore.model.*; import com.alicloud.openservices.tablestore.common.ServiceSettings; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; +import java.util.ArrayList; import java.util.List; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; +import static org.junit.Assert.*; public class LocalTxnTest { String tableName = "test_local_txn"; @@ -37,6 +38,10 @@ public void setUp() { CreateTableRequest request = new CreateTableRequest(tableMeta, tableOptions); + Utils.deleteTableIfExist(client, tableName); + + Utils.waitForPartitionLoad(tableName); + client.createTable(request); } @@ -271,10 +276,10 @@ public void TestStartPutTwiceAbortTxnGetRow() { abortTxn(txnId); Row row = getRow("", "chengdu", 105L); - assertTrue(!row.isEmpty()); + assertTrue(row == null); row = getRow("", "chengdu", 106L); - assertTrue(!row.isEmpty()); + assertTrue(row == null); } @Test @@ -323,7 +328,7 @@ public void TestStartPutGetCommitTxnGet() { assertEquals(1, columns.length); assertEquals("Col", columns[ 0 ].getName()); assertEquals(1099L, columns[ 0 ].getValue().asLong()); - assertTrue(!columns[ 0 ].hasSetTimestamp()); + assertTrue(columns[ 0 ].hasSetTimestamp()); commitTxn(txnId); } @@ -354,6 +359,38 @@ public void TestPutConfictTxn() { assertEquals(110L, pks[ 1 ].getValue().asLong()); } + @Test + public void TestCreateTableLocalTxnEnabled() { + createTableWithLocalTxn(true); + String transactionId = startLocalTxn(); + assertFalse(transactionId.isEmpty()); + } + + @Test + public void TestCreateTableLocalTxnDisabled() { + createTableWithLocalTxn(false); + try { + startLocalTxn(); + fail(); + } catch (TableStoreException ex) { + assertEquals("OTSParameterInvalid", ex.getErrorCode()); + assertEquals("Try to call method using explicit transaction on explicit-transaction-disabled table.", ex.getMessage()); + } + } + + @Test + @Ignore("TestCreateTableLocalTxnEnabled和TestCreateTableLocalTxnDisabled可以保证功能的正确性,所以这里没有必要继续保留") + public void TestCreateTableLocalTxnDefault() { + createTableWithLocalTxn(null); + try { + startLocalTxn(); + fail(); + } catch (TableStoreException ex) { + assertEquals("OTSParameterInvalid", ex.getErrorCode()); + assertEquals("Try to call method using explicit transaction on explicit-transaction-disabled table.", ex.getMessage()); + } + } + private String startLocalTxn() { PrimaryKeyBuilder primaryKeyBuilder = PrimaryKeyBuilder.createPrimaryKeyBuilder(); primaryKeyBuilder.addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromString("chengdu")); @@ -486,4 +523,26 @@ private void commitTxn(String txnId) { CommitTransactionRequest commitRequest = new CommitTransactionRequest(txnId); client.commitTransaction(commitRequest); } + + private void createTableWithLocalTxn(Boolean enableLocalTxn) { + // 如果表格已存在,删除表格 + Utils.deleteTableIfExist(client, tableName); + // 创建表格 + List pks = new ArrayList(); + pks.add(new PrimaryKeySchema("pk1", PrimaryKeyType.STRING)); + TableMeta meta = new TableMeta(tableName); + meta.addPrimaryKeyColumns(pks); + TableOptions tableOptions = new TableOptions(); + tableOptions.setMaxVersions(100); + tableOptions.setTimeToLive(-1); + tableOptions.setMaxTimeDeviation(Long.MAX_VALUE / 1000000); + CreateTableRequest createTableRequest = new CreateTableRequest(meta, tableOptions); + createTableRequest.setReservedThroughput(new ReservedThroughput(new CapacityUnit(0, 0))); + if (enableLocalTxn != null) { + createTableRequest.setLocalTxnEnabled(enableLocalTxn); + } + client.createTable(createTableRequest); + // 等待分区加载 + Utils.waitForPartitionLoad(tableName); + } } diff --git a/src/test/java/com/alicloud/openservices/tablestore/functiontest/OTSAPIBehaviorTest.java b/src/test/java/com/alicloud/openservices/tablestore/functiontest/OTSAPIBehaviorTest.java index 84cb476..0bb2ed6 100644 --- a/src/test/java/com/alicloud/openservices/tablestore/functiontest/OTSAPIBehaviorTest.java +++ b/src/test/java/com/alicloud/openservices/tablestore/functiontest/OTSAPIBehaviorTest.java @@ -16,6 +16,7 @@ import java.util.List; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; public class OTSAPIBehaviorTest { @@ -251,6 +252,56 @@ public void testBatchWriteRowToUpdateIdenticalRowPkAndColumnName() { Utils.checkColumns(result.getSucceedRows().get(0).getRow().getColumns(), expect); } + /** + * 当在同一张表格上的批量原子写的分区键相同时,写入成功。 + */ + @Test + public void testAtomicBatchWriteRowWithSamePartKey() { + // createTable + createTable(100); + int rowNum = 10; + BatchWriteRowRequest batchWriteRowRequest = new BatchWriteRowRequest(); + batchWriteRowRequest.setAtomic(true); + for (int row = 0; row < rowNum; row++) { + RowPutChange rowPutChange = new RowPutChange(tableName, getPrimaryKey()); + batchWriteRowRequest.addRowChange(rowPutChange); + } + BatchWriteRowResponse result = ots.batchWriteRow(batchWriteRowRequest); + List successRows = result.getSucceedRows(); + List failedRows = result.getFailedRows(); + assertEquals(rowNum, successRows.size()); + assertEquals(0, failedRows.size()); + for (BatchWriteRowResponse.RowResult rowResult : successRows) { + assertTrue(rowResult.isSucceed()); + } + } + + /** + * 当在同一张表格上的批量原子写的分区键不同时,在这张表格上的所有写入均失败。 + * Note: 需要修改后端flag sqlonline_worker_ForbidAtomicBatchModify为false + */ + @Test + public void testAtomicBatchWriteRowWithDiffPartKey() { + // createTable + createTable(100); + int rowNum = 10; + BatchWriteRowRequest batchWriteRowRequest = new BatchWriteRowRequest(); + batchWriteRowRequest.setAtomic(true); + for (int row = 0; row < rowNum; row++) { + RowPutChange rowPutChange = new RowPutChange(tableName, getPrimaryKey(String.valueOf(row))); + batchWriteRowRequest.addRowChange(rowPutChange); + } + BatchWriteRowResponse result = ots.batchWriteRow(batchWriteRowRequest); + List successRows = result.getSucceedRows(); + List failedRows = result.getFailedRows(); + assertEquals(0, successRows.size()); + assertEquals(rowNum, failedRows.size()); + for (BatchWriteRowResponse.RowResult rowResult : failedRows) { + assertEquals("OTSDataOutOfRange", rowResult.getError().getCode()); + assertEquals("Data out of scope of atomic. Atomic PartKey:0. Data PartKey:1", rowResult.getError().getMessage()); + } + } + /** * 写入2行(PK0, PK1),每行包含2个列(C0, C1),每列包含2个cell(T0, T1)。 * 分别测试: diff --git a/src/test/java/com/alicloud/openservices/tablestore/functiontest/RestrictedItemTest.java b/src/test/java/com/alicloud/openservices/tablestore/functiontest/RestrictedItemTest.java index b61a830..f8d6856 100644 --- a/src/test/java/com/alicloud/openservices/tablestore/functiontest/RestrictedItemTest.java +++ b/src/test/java/com/alicloud/openservices/tablestore/functiontest/RestrictedItemTest.java @@ -1879,7 +1879,7 @@ public void testCase15() throws Exception { * @throws Exception */ @Test - public void testCaes16() throws Exception { + public void testCase16() throws Exception { List scheme = new ArrayList(); List primaryKeyColumn = new ArrayList(); List begin = new ArrayList(); @@ -1911,6 +1911,10 @@ public void testCaes16() throws Exception { assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The number of primary key columns must be in range: [1, 4].", 400, e); } } + + // should create table now to avoid "Request table not exist" error when to get row. + OTSHelper.createTable(ots, tableName, scheme.subList(0, OTSRestrictedItemConst.PRIMARY_KEY_COLUMN_NUMBER_MAX)); + { // get row try { OTSHelper.getRowForAll(ots, tableName, new PrimaryKey(primaryKeyColumn)); diff --git a/src/test/java/com/alicloud/openservices/tablestore/functiontest/SecondaryIndexTest.java b/src/test/java/com/alicloud/openservices/tablestore/functiontest/SecondaryIndexTest.java new file mode 100644 index 0000000..0d7958b --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/functiontest/SecondaryIndexTest.java @@ -0,0 +1,421 @@ +package com.alicloud.openservices.tablestore.functiontest; + +import com.alicloud.openservices.tablestore.SyncClientInterface; +import com.alicloud.openservices.tablestore.TableStoreException; +import com.alicloud.openservices.tablestore.common.BaseFT; +import com.alicloud.openservices.tablestore.common.OTSHelper; +import com.alicloud.openservices.tablestore.common.Utils; +import com.alicloud.openservices.tablestore.model.*; +import com.google.gson.JsonSyntaxException; +import org.junit.*; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; + +public class SecondaryIndexTest extends BaseFT { + + private static String tableName = "SecondaryIndexFunctiontest"; + private static SyncClientInterface ots; + + private static final Logger LOG = LoggerFactory.getLogger(SecondaryIndexTest.class); + + @BeforeClass + public static void classBefore() throws JsonSyntaxException, IOException { + ots = Utils.getOTSInstance(); + } + + @AfterClass + public static void classAfter() { + ots.shutdown(); + } + + @Before + public void setup() throws Exception { + OTSHelper.deleteAllTable(ots); + } + + @After + public void teardown() { + + } + + @Test + public void testCase1() { + TableMeta tableMeta = new TableMeta(tableName); + tableMeta.addPrimaryKeyColumn("uid", PrimaryKeyType.STRING); + TableOptions tableOptions = new TableOptions(); + tableOptions.setTimeToLive(-1); + tableOptions.setMaxVersions(1); + + CreateTableRequest createTableRequest = new CreateTableRequest(tableMeta, tableOptions); + ots.createTable(createTableRequest); + } + + @Test + public void testCase2_1() throws Exception { + int limit = 5; + { + TableMeta tableMeta = new TableMeta(tableName); + tableMeta.addPrimaryKeyColumn("uid", PrimaryKeyType.STRING); + + tableMeta.addDefinedColumn("d0", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d1", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d2", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d3", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d4", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d5", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d6", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d7", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d8", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d9", DefinedColumnType.STRING); + + TableOptions tableOptions = new TableOptions(); + tableOptions.setTimeToLive(-1); + tableOptions.setMaxVersions(1); + + CreateTableRequest createTableRequest = new CreateTableRequest(tableMeta, tableOptions); + + for (int i = 0; i < limit + 1; i++) { + IndexMeta indexMeta = new IndexMeta("i" + i); + indexMeta.addPrimaryKeyColumn("d" + i); + indexMeta.addDefinedColumn("d9"); + createTableRequest.addIndex(indexMeta); + } + try { + ots.createTable(createTableRequest); + Assert.fail(); + } catch (TableStoreException e) { + Assert.assertEquals("OTSParameterInvalid", e.getErrorCode()); + Assert.assertEquals("Number of index per table exceeds the quota:"+ limit +".", e.getMessage()); + } + } + { + TableMeta tableMeta = new TableMeta(tableName); + tableMeta.addPrimaryKeyColumn("uid", PrimaryKeyType.STRING); + + tableMeta.addDefinedColumn("d0", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d1", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d2", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d3", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d4", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d5", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d6", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d7", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d8", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d9", DefinedColumnType.STRING); + + TableOptions tableOptions = new TableOptions(); + tableOptions.setTimeToLive(-1); + tableOptions.setMaxVersions(1); + + CreateTableRequest createTableRequest = new CreateTableRequest(tableMeta, tableOptions); + + for (int i = 0; i < limit; i++) { + IndexMeta indexMeta = new IndexMeta("i" + i); + indexMeta.addPrimaryKeyColumn("d" + i); + indexMeta.addDefinedColumn("d9"); + createTableRequest.addIndex(indexMeta); + } + ots.createTable(createTableRequest); + } + } + + @Test + public void testCase2_2() throws Exception { + int limit = 5; + + { + TableMeta tableMeta = new TableMeta(tableName); + tableMeta.addPrimaryKeyColumn("uid", PrimaryKeyType.STRING); + + tableMeta.addDefinedColumn("d0", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d1", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d2", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d3", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d4", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d5", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d6", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d7", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d8", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d9", DefinedColumnType.STRING); + + TableOptions tableOptions = new TableOptions(); + tableOptions.setTimeToLive(-1); + tableOptions.setMaxVersions(1); + + CreateTableRequest createTableRequest = new CreateTableRequest(tableMeta, tableOptions); + ots.createTable(createTableRequest); + } + + Utils.waitForPartitionLoad(tableName); + + for (int i = 0; i < limit; i++) { + IndexMeta indexMeta = new IndexMeta("i" + i); + indexMeta.addPrimaryKeyColumn("d" + i); + indexMeta.addDefinedColumn("d9"); + CreateIndexRequest createIndexRequest = new CreateIndexRequest(tableName, indexMeta, false); + + ots.createIndex(createIndexRequest); + } + + Utils.waitForPartitionLoad(tableName); + + { + IndexMeta indexMeta = new IndexMeta("i" + limit); + indexMeta.addPrimaryKeyColumn("d" + limit); + indexMeta.addDefinedColumn("d9"); + CreateIndexRequest createIndexRequest = new CreateIndexRequest(tableName, indexMeta, false); + + try { + ots.createIndex(createIndexRequest); + Assert.fail(); + } catch (TableStoreException e) { + Assert.assertEquals("OTSParameterInvalid", e.getErrorCode()); + Assert.assertEquals("Number of index per table exceeds the quota:"+ limit +".", e.getMessage()); + } + } + } + + @Test + public void testCase4() { + int limit = 32; + { + TableMeta tableMeta = new TableMeta(tableName); + tableMeta.addPrimaryKeyColumn("uid", PrimaryKeyType.STRING); + + for (int i = 0; i < limit + 1; i++) { + tableMeta.addDefinedColumn("d" + i, DefinedColumnType.STRING); + } + + TableOptions tableOptions = new TableOptions(); + tableOptions.setTimeToLive(-1); + tableOptions.setMaxVersions(1); + + CreateTableRequest createTableRequest = new CreateTableRequest(tableMeta, tableOptions); + try { + ots.createTable(createTableRequest); + Assert.fail(); + } catch (TableStoreException e) { + Assert.assertEquals("OTSParameterInvalid", e.getErrorCode()); + Assert.assertEquals("The number of defined columns must be in range: [0, 32].", e.getMessage()); + } + } + { + TableMeta tableMeta = new TableMeta(tableName); + tableMeta.addPrimaryKeyColumn("uid", PrimaryKeyType.STRING); + + for (int i = 0; i < limit; i++) { + tableMeta.addDefinedColumn("d" + i, DefinedColumnType.STRING); + } + + TableOptions tableOptions = new TableOptions(); + tableOptions.setTimeToLive(-1); + tableOptions.setMaxVersions(1); + + CreateTableRequest createTableRequest = new CreateTableRequest(tableMeta, tableOptions); + ots.createTable(createTableRequest); + } + } + + @Test + public void testCase3() throws Exception { + int limit = 4; + + // by create table + { + TableMeta tableMeta = new TableMeta(tableName); + tableMeta.addPrimaryKeyColumn("uid", PrimaryKeyType.STRING); + + tableMeta.addDefinedColumn("d0", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d1", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d2", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d3", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d4", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d5", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d6", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d7", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d8", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d9", DefinedColumnType.STRING); + + TableOptions tableOptions = new TableOptions(); + tableOptions.setTimeToLive(-1); + tableOptions.setMaxVersions(1); + + CreateTableRequest createTableRequest = new CreateTableRequest(tableMeta, tableOptions); + IndexMeta indexMeta = new IndexMeta("i"); + for (int i = 0; i < limit + 1 ; i++) { + indexMeta.addPrimaryKeyColumn("d" + i); + } + indexMeta.addDefinedColumn("d9"); + createTableRequest.addIndex(indexMeta); + try { + ots.createTable(createTableRequest); + Assert.fail(); + } catch (TableStoreException e) { + Assert.assertEquals("OTSParameterInvalid", e.getErrorCode()); + Assert.assertEquals("The number of primary key columns must be in range: [1, 4] in index.", e.getMessage()); + } + } + + // by create index + { + IndexMeta indexMeta = new IndexMeta("i"); + for (int i = 0; i < limit + 1; i++) { + indexMeta.addPrimaryKeyColumn("d" + i); + } + indexMeta.addDefinedColumn("d9"); + CreateIndexRequest createIndexRequest = new CreateIndexRequest(tableName, indexMeta, false); + + try { + ots.createIndex(createIndexRequest); + Assert.fail(); + } catch (TableStoreException e) { + Assert.assertEquals("OTSParameterInvalid", e.getErrorCode()); + Assert.assertEquals("The number of primary key columns must be in range: [1, 4] in index.", e.getMessage()); + } + } + } + + @Test + public void testCase5() { + int limit = 32; + { + TableMeta tableMeta = new TableMeta(tableName); + tableMeta.addPrimaryKeyColumn("uid", PrimaryKeyType.STRING); + tableMeta.addPrimaryKeyColumn("gid", PrimaryKeyType.STRING); + + for (int i = 0; i < limit; i++) { + tableMeta.addDefinedColumn("d" + i, DefinedColumnType.STRING); + } + + TableOptions tableOptions = new TableOptions(); + tableOptions.setTimeToLive(-1); + tableOptions.setMaxVersions(1); + + CreateTableRequest createTableRequest = new CreateTableRequest(tableMeta, tableOptions); + IndexMeta indexMeta = new IndexMeta("i"); + indexMeta.addPrimaryKeyColumn("gid"); + for (int i = 0; i < limit + 1; i++) { + indexMeta.addDefinedColumn("d" + i); + } + createTableRequest.addIndex(indexMeta); + try { + ots.createTable(createTableRequest); + Assert.fail(); + } catch (TableStoreException e) { + Assert.assertEquals("OTSParameterInvalid", e.getErrorCode()); + Assert.assertEquals("The number of attribute columns must be in range: [0, 32] in index.", e.getMessage()); + } + } + { + + TableMeta tableMeta = new TableMeta(tableName); + tableMeta.addPrimaryKeyColumn("uid", PrimaryKeyType.STRING); + tableMeta.addPrimaryKeyColumn("gid", PrimaryKeyType.STRING); + + for (int i = 0; i < limit; i++) { + tableMeta.addDefinedColumn("d" + i, DefinedColumnType.STRING); + } + + TableOptions tableOptions = new TableOptions(); + tableOptions.setTimeToLive(-1); + tableOptions.setMaxVersions(1); + + CreateTableRequest createTableRequest = new CreateTableRequest(tableMeta, tableOptions); + IndexMeta indexMeta = new IndexMeta("i"); + indexMeta.addPrimaryKeyColumn("gid"); + for (int i = 0; i < limit; i++) { + indexMeta.addDefinedColumn("d" + i); + } + createTableRequest.addIndex(indexMeta); + ots.createTable(createTableRequest); + } + } + + @Test + public void testCase6() { + // by create table + { + TableMeta tableMeta = new TableMeta(tableName); + tableMeta.addPrimaryKeyColumn("uid", PrimaryKeyType.STRING); + + tableMeta.addDefinedColumn("d0", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d1", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d2", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d3", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d4", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d5", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d6", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d7", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d8", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d9", DefinedColumnType.STRING); + + TableOptions tableOptions = new TableOptions(); + tableOptions.setTimeToLive(-1); + tableOptions.setMaxVersions(1); + + CreateTableRequest createTableRequest = new CreateTableRequest(tableMeta, tableOptions); + IndexMeta indexMeta = new IndexMeta("i"); + // indexMeta.addPrimaryKeyColumn("d"); // no pk + indexMeta.addDefinedColumn("d9"); + createTableRequest.addIndex(indexMeta); + try { + ots.createTable(createTableRequest); + Assert.fail(); + } catch (TableStoreException e) { + Assert.assertEquals("OTSParameterInvalid", e.getErrorCode()); + Assert.assertEquals("The number of primary key columns must be in range: [1, 4] in index.", e.getMessage()); + } + } + { + TableMeta tableMeta = new TableMeta(tableName); + tableMeta.addPrimaryKeyColumn("uid", PrimaryKeyType.STRING); + + tableMeta.addDefinedColumn("d0", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d1", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d2", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d3", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d4", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d5", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d6", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d7", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d8", DefinedColumnType.STRING); + tableMeta.addDefinedColumn("d9", DefinedColumnType.STRING); + + TableOptions tableOptions = new TableOptions(); + tableOptions.setTimeToLive(-1); + tableOptions.setMaxVersions(1); + + CreateTableRequest createTableRequest = new CreateTableRequest(tableMeta, tableOptions); + IndexMeta indexMeta = new IndexMeta("i"); + indexMeta.addPrimaryKeyColumn("d0"); + // indexMeta.addDefinedColumn("d9");// no attr + createTableRequest.addIndex(indexMeta); + ots.createTable(createTableRequest); + } + { + + IndexMeta indexMeta = new IndexMeta("i1"); + //indexMeta.addPrimaryKeyColumn("d0"); + indexMeta.addDefinedColumn("d9"); + CreateIndexRequest createIndexRequest = new CreateIndexRequest(tableName, indexMeta, false); + + try { + ots.createIndex(createIndexRequest); + Assert.fail(); + } catch (TableStoreException e) { + Assert.assertEquals("OTSParameterInvalid", e.getErrorCode()); + Assert.assertEquals("The number of primary key columns must be in range: [1, 4] in index.", e.getMessage()); + } + } + { + + IndexMeta indexMeta = new IndexMeta("i2"); + indexMeta.addPrimaryKeyColumn("d0"); + //indexMeta.addDefinedColumn("d9"); + CreateIndexRequest createIndexRequest = new CreateIndexRequest(tableName, indexMeta, false); + ots.createIndex(createIndexRequest); + } + } +} diff --git a/src/test/java/com/alicloud/openservices/tablestore/functiontest/SplitPointTest.java b/src/test/java/com/alicloud/openservices/tablestore/functiontest/SplitPointTest.java new file mode 100644 index 0000000..5cff9d5 --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/functiontest/SplitPointTest.java @@ -0,0 +1,482 @@ +package com.alicloud.openservices.tablestore.functiontest; + +import com.alicloud.openservices.tablestore.InternalClient; +import com.alicloud.openservices.tablestore.TableStoreException; +import com.alicloud.openservices.tablestore.common.ServiceSettings; +import com.alicloud.openservices.tablestore.model.*; +import org.junit.*; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.fail; + +public class SplitPointTest { + static String tableName = "TestPartition"; + static InternalClient client = null; + + private List getPoints() throws Exception { + DescribeTableRequest request = new DescribeTableRequest(tableName); + DescribeTableResponse response = client.describeTable(request, null).get(); + + List pointsKey = response.getShardSplits(); + List points = new ArrayList(); + //System.out.println(pointsKey); + for (PrimaryKey pointKey : pointsKey){ + points.add(pointKey.getPrimaryKeyColumn(0).getValue()); + } + return points; + } + + private void deleteTable() throws Exception { + DeleteTableRequest request = new DeleteTableRequest(tableName); + try { + client.deleteTable(request, null).get(); + } catch (TableStoreException e){ + assertEquals("Requested table does not exist.", e.getMessage()); + } + } + + @BeforeClass + public static void classBefore() { + ServiceSettings settings = ServiceSettings.load(); + + client = new InternalClient(settings.getOTSEndpoint(), settings.getOTSAccessKeyId(), + settings.getOTSAccessKeySecret(), settings.getOTSInstanceName()); + } + + @AfterClass + public static void classAfter() { + client.shutdown(); + } + + + @Test + public void testPartitionIntegerPrimaryKey() throws Exception { + + deleteTable(); + + TableMeta tableMetaInt = new TableMeta(tableName); + tableMetaInt.addPrimaryKeyColumn(new PrimaryKeySchema("pk", PrimaryKeyType.INTEGER)); + TableMeta tableMetaStr = new TableMeta(tableName); + tableMetaStr.addPrimaryKeyColumn(new PrimaryKeySchema("pk", PrimaryKeyType.STRING)); + + int timeToLive = -1; + int maxVersions = 3; + + TableOptions tableOptions = new TableOptions(timeToLive, maxVersions); + + //A、预分区分裂点只有单个数字的表格创建 + { + List points = Arrays.asList( + PrimaryKeyValue.fromLong(10000) + ); + CreateTableRequestEx request = new CreateTableRequestEx(tableMetaInt, tableOptions); + request.setSplitPoints(points); + client.createTableEx(request, null).get(); + + List tablePoints = getPoints(); + assertEquals(points, tablePoints); + deleteTable(); + } + + //B、预分区分裂点含有多个数字的表格创建 + { + List points = Arrays.asList( + PrimaryKeyValue.fromLong(10000), + PrimaryKeyValue.fromLong(20000), + PrimaryKeyValue.fromLong(30000) + ); + CreateTableRequestEx request = new CreateTableRequestEx(tableMetaInt, tableOptions); + request.setSplitPoints(points); + client.createTableEx(request, null).get(); + + List tablePoints = getPoints(); + assertEquals(points, tablePoints); + deleteTable(); + } + + //C、创建多个分区,超出server端分区限制,抛出异常 + { + List points = new ArrayList(); + for (int i = 0; i < 64; i++) { + points.add(PrimaryKeyValue.fromLong(i)); + } + CreateTableRequestEx request = new CreateTableRequestEx(tableMetaInt, tableOptions); + request.setSplitPoints(points); + try { + client.createTableEx(request, null).get(); + fail(); + } catch (TableStoreException e) { + assertEquals("The count of partitions cannot be greater than 10", e.getMessage()); + } + } + + //D、预分区分裂点含有Long.MIN_VALUE,抛出异常 + { + List points = Arrays.asList( + PrimaryKeyValue.fromLong(Long.MIN_VALUE), + PrimaryKeyValue.fromLong(20000), + PrimaryKeyValue.fromLong(30000) + ); + CreateTableRequestEx request = new CreateTableRequestEx(tableMetaInt, tableOptions); + request.setSplitPoints(points); + try { + client.createTableEx(request, null).get(); + fail(); + } catch (TableStoreException e) { + assertEquals("The value of partition range can not be INT64_MIN or INT64_MAX.", e.getMessage()); + } + } + + //E、预分区分裂点含有Long.MAX_VALUE,抛出异常 + { + List points = Arrays.asList( + PrimaryKeyValue.fromLong(10000), + PrimaryKeyValue.fromLong(20000), + PrimaryKeyValue.fromLong(Long.MAX_VALUE) + ); + CreateTableRequestEx request = new CreateTableRequestEx(tableMetaInt, tableOptions); + request.setSplitPoints(points); + + try { + client.createTableEx(request, null).get(); + fail(); + } catch (TableStoreException e) { + assertEquals("The value of partition range can not be INT64_MIN or INT64_MAX.", e.getMessage()); + } + } + + //F、设置分裂点后,通过setTableMeta修改PrimaryKey的属性 + { + List points = Arrays.asList( + PrimaryKeyValue.fromLong(10000), + PrimaryKeyValue.fromLong(20000), + PrimaryKeyValue.fromLong(30000) + ); + CreateTableRequestEx request = new CreateTableRequestEx(tableMetaInt, tableOptions); + request.setSplitPoints(points); + request.setTableMeta(tableMetaStr); + try { + client.createTableEx(request, null).get(); + fail(); + } catch (TableStoreException e) { + assertEquals("The value type of partition does not match with primary key.", e.getMessage()); + } + } + + + } + + @Test + public void testPartitionStringPrimaryKey() throws Exception { + + deleteTable(); + + TableMeta tableMetaStr = new TableMeta(tableName); + tableMetaStr.addPrimaryKeyColumn(new PrimaryKeySchema("pk", PrimaryKeyType.STRING)); + + int timeToLive = -1; + int maxVersions = 3; + + TableOptions tableOptions = new TableOptions(timeToLive, maxVersions); + + //A、预分区分裂点只有单个英文字符串的表格创建 + { + List points = Arrays.asList( + PrimaryKeyValue.fromString("Chinese") + ); + CreateTableRequestEx request = new CreateTableRequestEx(tableMetaStr, tableOptions); + request.setSplitPoints(points); + client.createTableEx(request, null).get(); + + List tablePointsA = getPoints(); + assertEquals(points, tablePointsA); + deleteTable(); + } + //B、预分区分裂点含有多个英文字符串的表格创建 + { + List points = Arrays.asList( + PrimaryKeyValue.fromString("Chinese"), + PrimaryKeyValue.fromString("England"), + PrimaryKeyValue.fromString("France ") + ); + CreateTableRequestEx request = new CreateTableRequestEx(tableMetaStr, tableOptions); + request.setSplitPoints(points); + client.createTableEx(request, null).get(); + + List tablePoints = getPoints(); + assertEquals(points, tablePoints); + deleteTable(); + } + + //C、预分区分裂点含有DataSize=64的英文字符串的表格创建 + { + char[] bigChar; + Arrays.fill(bigChar = new char[64], 'Z'); + String bigString = String.valueOf(bigChar); + PrimaryKeyValue pointBigString = PrimaryKeyValue.fromString(bigString); + + List points = Arrays.asList( + PrimaryKeyValue.fromString("Chinese"), + PrimaryKeyValue.fromString("England"), + PrimaryKeyValue.fromString("France "), + pointBigString + ); + CreateTableRequestEx request = new CreateTableRequestEx(tableMetaStr, tableOptions); + request.setSplitPoints(points); + client.createTableEx(request, null).get(); + + List tablePoints = getPoints(); + assertEquals(points, tablePoints); + deleteTable(); + } + + //D、 预分区分裂点只有单个中文字符串的表格创建 + { + List points = Arrays.asList( + PrimaryKeyValue.fromString("中国") + ); + CreateTableRequestEx request = new CreateTableRequestEx(tableMetaStr, tableOptions); + request.setSplitPoints(points); + client.createTableEx(request, null).get(); + + List tablePoints = getPoints(); + assertEquals(points, tablePoints); + deleteTable(); + } + + //E、预分区分裂点含有多个中文字符串的表格创建 + { + List points = Arrays.asList( + PrimaryKeyValue.fromString("中国"), + PrimaryKeyValue.fromString("法国"), + PrimaryKeyValue.fromString("英国") + ); + CreateTableRequestEx request = new CreateTableRequestEx(tableMetaStr, tableOptions); + request.setSplitPoints(points); + client.createTableEx(request, null).get(); + + List tablePoints = getPoints(); + assertEquals(points, tablePoints); + deleteTable(); + } + //F、预分区分裂点含有DataSize=64的中文字符串的表格创建 + { + String chineseString = "中国"; + String bigChineseString = ""; + for (int i = 0; i < 10; i++){ + bigChineseString += chineseString; + } + PrimaryKeyValue pointBigChineseString = PrimaryKeyValue.fromString(bigChineseString); + + List points = Arrays.asList( + PrimaryKeyValue.fromString("中国"), + pointBigChineseString, + PrimaryKeyValue.fromString("法国"), + PrimaryKeyValue.fromString("英国") + ); + CreateTableRequestEx request = new CreateTableRequestEx(tableMetaStr, tableOptions); + request.setSplitPoints(points); + client.createTableEx(request, null).get(); + + List tablePoints = getPoints(); + assertEquals(points, tablePoints); + deleteTable(); + } + + //G、预分区含有多个中英文混合字符串的表格创建 + { + List points = Arrays.asList( + PrimaryKeyValue.fromString("A中国"), + PrimaryKeyValue.fromString("B法国"), + PrimaryKeyValue.fromString("C英国") + ); + CreateTableRequestEx request = new CreateTableRequestEx(tableMetaStr, tableOptions); + request.setSplitPoints(points); + client.createTableEx(request, null).get(); + + List tablePointsG = getPoints(); + assertEquals(points, tablePointsG); + deleteTable(); + } + + //H、预分区分裂点含有多个英文字符串的表格创建 + { + List points = Arrays.asList( + PrimaryKeyValue.fromString(""), + PrimaryKeyValue.fromString("England"), + PrimaryKeyValue.fromString("France ") + ); + + CreateTableRequestEx request = new CreateTableRequestEx(tableMetaStr, tableOptions); + request.setSplitPoints(points); + + try { + client.createTableEx(request, null).get(); + fail(); + } catch (TableStoreException e) { + assertEquals("The value of partition range can not be empty string.", e.getMessage()); + + } + } + + //I、是否可以设置DataSize大于64的英文分裂点 + { + char[] biggerChar; + Arrays.fill(biggerChar = new char[65], 'Z'); + String biggerString = String.valueOf(biggerChar); + PrimaryKeyValue pointBiggerString = PrimaryKeyValue.fromString(biggerString); + + List points = Arrays.asList( + PrimaryKeyValue.fromString("Chinese"), + PrimaryKeyValue.fromString("England"), + PrimaryKeyValue.fromString("France "), + pointBiggerString + ); + CreateTableRequestEx request = new CreateTableRequestEx(tableMetaStr, tableOptions); + request.setSplitPoints(points); + + try { + client.createTableEx(request, null).get(); + fail(); + } catch (TableStoreException e) { + assertEquals(String.format("The value of partition range exceeds the MaxLength:64 with CurrentLength:%d.",pointBiggerString.getDataSize()), + e.getMessage()); + } + } + + //J、是否可以设置DataSize大于64的中文分裂点 + { + String chineseString = "中国"; + String biggerChineseString = ""; + for (int i = 0; i < 11; i++){ + biggerChineseString += chineseString; + } + PrimaryKeyValue pointBiggerChineseString = PrimaryKeyValue.fromString(biggerChineseString); + + List points = Arrays.asList( + PrimaryKeyValue.fromString("中国"), + pointBiggerChineseString, + PrimaryKeyValue.fromString("法国"), + PrimaryKeyValue.fromString("英国") + ); + CreateTableRequestEx request = new CreateTableRequestEx(tableMetaStr, tableOptions); + request.setSplitPoints(points); + + try { + client.createTableEx(request, null).get(); + fail(); + } catch (TableStoreException e) { + assertEquals(String.format("The value of partition range exceeds the MaxLength:64 with CurrentLength:%d.",pointBiggerChineseString.getDataSize()), + e.getMessage()); + } + } + } + + @Test + public void testPartitionBinaryPrimaryKey() throws Exception { + + deleteTable(); + + TableMeta tableMetaBin = new TableMeta(tableName); + tableMetaBin.addPrimaryKeyColumn(new PrimaryKeySchema("pk", PrimaryKeyType.BINARY)); + + int timeToLive = -1; + int maxVersions = 3; + + TableOptions tableOptions = new TableOptions(timeToLive, maxVersions); + + //A、预分区分裂点只有单个bite[]的表格创建 + { + List points = Arrays.asList( + PrimaryKeyValue.fromBinary(new byte[]{1, 1, 1}) + ); + CreateTableRequestEx request = new CreateTableRequestEx(tableMetaBin, tableOptions); + request.setSplitPoints(points); + client.createTableEx(request, null).get(); + + List tablePoints = getPoints(); + assertEquals(points, tablePoints); + deleteTable(); + } + + //B、预分区分裂点含有多个bite[]的表格创建 + { + List points = Arrays.asList( + PrimaryKeyValue.fromBinary(new byte[]{1, 1, 1}), + PrimaryKeyValue.fromBinary(new byte[]{50, 50, 50}), + PrimaryKeyValue.fromBinary(new byte[]{100, 100, 100}) + ); + CreateTableRequestEx request = new CreateTableRequestEx(tableMetaBin, tableOptions); + request.setSplitPoints(points); + client.createTableEx(request, null).get(); + + List tablePoints = getPoints(); + assertEquals(points, tablePoints); + deleteTable(); + } + + //C、预分区分裂点含有DataSize=64的bite[]的表格创建 + { + byte[] bigBinary; + Arrays.fill(bigBinary = new byte[64], (byte) 1); + PrimaryKeyValue pointBigBinary = PrimaryKeyValue.fromBinary(bigBinary); + + List points = Arrays.asList( + pointBigBinary, + PrimaryKeyValue.fromBinary(new byte[]{50, 50, 50}), + PrimaryKeyValue.fromBinary(new byte[]{100, 100, 100}) + ); + CreateTableRequestEx request = new CreateTableRequestEx(tableMetaBin, tableOptions); + request.setSplitPoints(points); + client.createTableEx(request, null).get(); + + List tablePointsC = getPoints(); + assertEquals(points, tablePointsC); + deleteTable(); + } + + //D、是否可以设置空bite[]分裂点(不可以)** + { + List points = Arrays.asList( + PrimaryKeyValue.fromBinary(new byte[]{}), + PrimaryKeyValue.fromBinary(new byte[]{50, 50, 50}), + PrimaryKeyValue.fromBinary(new byte[]{100, 100, 100}) + ); + CreateTableRequestEx request = new CreateTableRequestEx(tableMetaBin, tableOptions); + request.setSplitPoints(points); + + try { + client.createTableEx(request, null).get(); + fail(); + } catch (TableStoreException e) { + assertEquals("The value of partition range can not be empty binary.", e.getMessage()); + } + } + + //E、是否可以设置DataSize大于64的bite[]分裂点 + { + byte[] biggerBinary; + Arrays.fill(biggerBinary = new byte[65], (byte) 1); + PrimaryKeyValue pointBiggerBinary = PrimaryKeyValue.fromBinary(biggerBinary); + + List points = Arrays.asList( + pointBiggerBinary, + PrimaryKeyValue.fromBinary(new byte[]{50, 50, 50}), + PrimaryKeyValue.fromBinary(new byte[]{100, 100, 100}) + ); + CreateTableRequestEx request = new CreateTableRequestEx(tableMetaBin, tableOptions); + request.setSplitPoints(points); + try { + client.createTableEx(request, null).get(); + fail(); + } catch (TableStoreException e) { + assertEquals(String.format("The value of partition range exceeds the MaxLength:64 with CurrentLength:%d.",pointBiggerBinary.getDataSize()), + e.getMessage()); + } + } + } +} diff --git a/src/test/java/com/alicloud/openservices/tablestore/functiontest/TableCreationTimeTest.java b/src/test/java/com/alicloud/openservices/tablestore/functiontest/TableCreationTimeTest.java new file mode 100644 index 0000000..d0566d8 --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/functiontest/TableCreationTimeTest.java @@ -0,0 +1,103 @@ +package com.alicloud.openservices.tablestore.functiontest; + +import com.alicloud.openservices.tablestore.SyncClient; +import com.alicloud.openservices.tablestore.TableStoreException; +import com.alicloud.openservices.tablestore.common.ServiceSettings; +import com.alicloud.openservices.tablestore.core.ErrorCode; +import com.alicloud.openservices.tablestore.model.CreateTableRequest; +import com.alicloud.openservices.tablestore.model.CreateTableResponse; +import com.alicloud.openservices.tablestore.model.DeleteTableRequest; +import com.alicloud.openservices.tablestore.model.DeleteTableResponse; +import com.alicloud.openservices.tablestore.model.DescribeTableRequest; +import com.alicloud.openservices.tablestore.model.DescribeTableResponse; +import com.alicloud.openservices.tablestore.model.PrimaryKeySchema; +import com.alicloud.openservices.tablestore.model.PrimaryKeyType; +import com.alicloud.openservices.tablestore.model.TableMeta; +import com.alicloud.openservices.tablestore.model.TableOptions; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +import java.util.concurrent.TimeUnit; + + +public class TableCreationTimeTest { + static String testTableCreationTime = "TestTableCreationTime"; + static SyncClient client = null; + + @BeforeClass + public static void beforeClass() { + ServiceSettings settings = ServiceSettings.load(); + final String endPoint = settings.getOTSEndpoint(); + final String accessId = settings.getOTSAccessKeyId(); + final String accessKey = settings.getOTSAccessKeySecret(); + final String instanceName = settings.getOTSInstanceName(); + + client = new SyncClient(endPoint, accessId, accessKey, instanceName); + } + + @AfterClass + public static void afterClass() { + client.shutdown(); + } + + @Before + public void setUp() throws Exception { + } + + @Test + public void testCreateTableNormal() throws Exception{ + String tableName = testTableCreationTime; + tryDeleteTable(tableName); + long start = System.currentTimeMillis(); + + CreateTableResponse createTableResponse = creatTable(tableName); + Thread.sleep(TimeUnit.SECONDS.toMillis(1)); + + DescribeTableResponse describeTableResponse = describeTable(tableName); + + System.out.println(describeTableResponse); + // 有可能测试机器跟server端时间未对齐,留60s的buffer + Assert.assertTrue(describeTableResponse.getCreationTime() > (start - 60 * 1000) * 1000); + } + + + private void tryDeleteTable(String tableName) throws Exception{ + try { + deleteTable(tableName); + } catch (TableStoreException e) { + if (!e.getErrorCode().equals(ErrorCode.OBJECT_NOT_EXIST)) { + throw e; + } + } + } + + private DeleteTableResponse deleteTable(String tableName) throws Exception{ + DeleteTableRequest request = new DeleteTableRequest(tableName); + return client.deleteTable(request); + } + + private DescribeTableResponse describeTable(String tableName) throws Exception{ + DescribeTableRequest request = new DescribeTableRequest(tableName); + return client.describeTable(request); + } + + private CreateTableResponse creatTable(String tableName) throws Exception{ + TableMeta tableMeta = new TableMeta(tableName); + tableMeta.addPrimaryKeyColumn(new PrimaryKeySchema("PK1", PrimaryKeyType.STRING)); + tableMeta.addPrimaryKeyColumn(new PrimaryKeySchema("PK2", PrimaryKeyType.INTEGER)); + tableMeta.addPrimaryKeyColumn(new PrimaryKeySchema("PK3", PrimaryKeyType.BINARY)); + + int timeToLive = -1; + int maxVersions = 1; + + TableOptions tableOptions = new TableOptions(timeToLive, maxVersions); + + + CreateTableRequest request = new CreateTableRequest(tableMeta, tableOptions); + + return client.createTable(request); + } +} diff --git a/src/test/java/com/alicloud/openservices/tablestore/functiontest/TestBulkExportFunciton.java b/src/test/java/com/alicloud/openservices/tablestore/functiontest/TestBulkExportFunciton.java new file mode 100644 index 0000000..1233042 --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/functiontest/TestBulkExportFunciton.java @@ -0,0 +1,1188 @@ +package com.alicloud.openservices.tablestore.functiontest; + +import com.alicloud.openservices.tablestore.ClientException; +import com.alicloud.openservices.tablestore.SyncClient; +import com.alicloud.openservices.tablestore.TableStoreException; +import com.alicloud.openservices.tablestore.common.ServiceSettings; +import com.alicloud.openservices.tablestore.core.ErrorCode; +import com.alicloud.openservices.tablestore.model.*; +import com.alicloud.openservices.tablestore.model.filter.Filter; +import com.alicloud.openservices.tablestore.model.filter.SingleColumnValueFilter; +import com.alicloud.openservices.tablestore.model.tunnel.BulkExportQueryCriteria; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +import javax.xml.crypto.Data; +import java.io.UnsupportedEncodingException; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.TimeUnit; + +import static org.junit.Assert.*; + +public class TestBulkExportFunciton { + + static String tableName = "YSTestBulkRead"; + static SyncClient internalClient = null; + static SyncClient publicClient = null; + + @BeforeClass + public static void beforClass() { + ServiceSettings settings = ServiceSettings.load(); + final String endPoint = settings.getOTSEndpoint(); + final String accessId = settings.getOTSAccessKeyId(); + final String accessKey = settings.getOTSAccessKeySecret(); + final String publicInstanceName = settings.getOTSInstanceName(); + final String internalInstanceName = settings.getOTSInstanceNameInternal(); + + + internalClient = new SyncClient(endPoint, accessId, accessKey, internalInstanceName); + publicClient = new SyncClient(endPoint, accessId, accessKey, publicInstanceName); + } + + @AfterClass + public static void afterClass() { + internalClient.shutdown(); + publicClient.shutdown(); + } + + @Before + public void setUp() throws Exception { + try { + deleteTable(internalClient); + } catch (TableStoreException e) { + if (!e.getErrorCode().equals(ErrorCode.OBJECT_NOT_EXIST)) { + throw e; + } + } + try { + deleteTable(publicClient); + } catch (TableStoreException e) { + if (!e.getErrorCode().equals(ErrorCode.OBJECT_NOT_EXIST)) { + throw e; + } + } + + creatTable(internalClient); + creatTable(publicClient); + + Thread.sleep(TimeUnit.SECONDS.toMillis(5)); + } + + private void deleteTable(SyncClient client) { + DeleteTableRequest request = new DeleteTableRequest(tableName); + client.deleteTable(request); + } + + private void creatTable(SyncClient client) { + TableMeta tableMeta = new TableMeta(tableName); + tableMeta.addPrimaryKeyColumn(new PrimaryKeySchema("PK1", PrimaryKeyType.STRING)); + tableMeta.addPrimaryKeyColumn(new PrimaryKeySchema("PK2", PrimaryKeyType.INTEGER)); + tableMeta.addPrimaryKeyColumn(new PrimaryKeySchema("PK3", PrimaryKeyType.BINARY)); + tableMeta.addDefinedColumn(new DefinedColumnSchema("DC1", DefinedColumnType.STRING)); + tableMeta.addDefinedColumn(new DefinedColumnSchema("DC2", DefinedColumnType.INTEGER)); + tableMeta.addDefinedColumn(new DefinedColumnSchema("DC3", DefinedColumnType.BINARY)); + + int timeToLive = -1; + int maxVersions = 1; + + TableOptions tableOptions = new TableOptions(timeToLive, maxVersions); + + CreateTableRequest request = new CreateTableRequest(tableMeta, tableOptions); + + client.createTable(request); + } + + private List creatData(Integer start, Integer end) throws UnsupportedEncodingException { + List rowPutChanges = new ArrayList(); + for (Integer i = start; i < end; i++) { + PrimaryKeyBuilder primaryKeyBuilder = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + primaryKeyBuilder.addPrimaryKeyColumn("PK1", PrimaryKeyValue.fromString(i.toString())); + primaryKeyBuilder.addPrimaryKeyColumn("PK2", PrimaryKeyValue.fromLong(i)); + primaryKeyBuilder.addPrimaryKeyColumn("PK3", PrimaryKeyValue.fromBinary(i.toString().getBytes("UTF-8"))); + RowPutChange rowPutChange = new RowPutChange(tableName, primaryKeyBuilder.build()); + rowPutChange.addColumn("DC1", ColumnValue.fromString(i.toString())); + rowPutChange.addColumn("DC2", ColumnValue.fromLong(i)); + rowPutChange.addColumn("DC3", ColumnValue.fromBinary(i.toString().getBytes("UTF-8"))); + rowPutChanges.add(rowPutChange); + } + return rowPutChanges; + } + + private void putData(SyncClient client, List rowPutChanges) { + int from = 0; + while (from < rowPutChanges.size()) { + int to = from + 200 < rowPutChanges.size() ? from + 200 : rowPutChanges.size(); + List sub = rowPutChanges.subList(from, to); + BatchWriteRowRequest batchWriteRowRequest = new BatchWriteRowRequest(); + for (RowPutChange rowPutChange : sub) { + batchWriteRowRequest.addRowChange(rowPutChange); + } + client.batchWriteRow(batchWriteRowRequest); + from += 200; + } + } + + private static PrimaryKey getPK(int value) throws UnsupportedEncodingException { + PrimaryKeyBuilder pkBuilder = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + pkBuilder.addPrimaryKeyColumn("PK1", PrimaryKeyValue.fromString(new Integer(value).toString())); + pkBuilder.addPrimaryKeyColumn("PK2", PrimaryKeyValue.fromLong(value)); + pkBuilder.addPrimaryKeyColumn("PK3", PrimaryKeyValue.fromBinary(new Integer(value).toString().getBytes("UTF-8"))); + PrimaryKey pk = pkBuilder.build(); + return pk; + } + + @Test + public void testBase() throws Exception { + List rowPutChanges = creatData(100, 300); + putData(internalClient, rowPutChanges); + putData(publicClient, rowPutChanges); + + // public matrix + { + PrimaryKey lowerPK = getPK(150); + PrimaryKey upperPK = getPK(200); + + BulkExportRequest bulkExportRequest = new BulkExportRequest(); + BulkExportQueryCriteria bulkExportQueryCriteria = new BulkExportQueryCriteria(tableName); + String[] columns = new String[]{"PK1", "PK3", "DC1", "DC2"}; + + bulkExportQueryCriteria.setInclusiveStartPrimaryKey(lowerPK); + bulkExportQueryCriteria.setExclusiveEndPrimaryKey(upperPK); + bulkExportQueryCriteria.addColumnsToGet(columns); + + bulkExportRequest.setBulkExportQueryCriteria(bulkExportQueryCriteria); + BulkExportResponse response = publicClient.bulkExport(bulkExportRequest); + + assertEquals(DataBlockType.DBT_SIMPLE_ROW_MATRIX, response.getDataBlockType()); + + assertEquals(0, response.getConsumedCapacity().getCapacityUnit().getReadCapacityUnit()); + assertEquals(0, response.getConsumedCapacity().getCapacityUnit().getWriteCapacityUnit()); + assertEquals(2000, response.getConsumedCapacity().getCapacityDataSize().getReadCapacityDataSize()); + assertEquals(0, response.getConsumedCapacity().getCapacityDataSize().getWriteCapacityDataSize()); + + SimpleRowMatrixBlockParser parser = new SimpleRowMatrixBlockParser(response.getRows()); + + assertEquals(50, parser.getRowCount()); + assertArrayEquals(columns, parser.parseFieldNames()); + assertEquals(2, parser.getPkCount()); + assertEquals(2, parser.getAttrCount()); + assertEquals(4, parser.getFieldCount()); + + for (int i = 150; i < 200; i++) { + assertEquals(i - 150, parser.next()); + assertEquals(Integer.toString(i), parser.getString(0)); + assertArrayEquals(Integer.toString(i).getBytes("UTF-8"), parser.getBinary(1)); + assertEquals(Integer.toString(i), parser.getString(2)); + assertEquals(i, parser.getLong(3)); + assertEquals(false, parser.isNull(0)); + assertEquals(false, parser.isNull(1)); + assertEquals(false, parser.isNull(2)); + assertEquals(false, parser.isNull(3)); + + PrimaryKeyBuilder pkBuilder = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + pkBuilder.addPrimaryKeyColumn("PK1", PrimaryKeyValue.fromString(new Integer(i).toString())); + pkBuilder.addPrimaryKeyColumn("PK3", PrimaryKeyValue.fromBinary(new Integer(i).toString().getBytes("UTF-8"))); + PrimaryKey pk = pkBuilder.build(); + Row row = parser.getRow(); + assertEquals(pk, row.getPrimaryKey()); + + assertEquals(Integer.toString(i), row.getLatestColumn("DC1").getValue().asString()); + assertEquals(i, row.getLatestColumn("DC2").getValue().asLong()); + } + } + // public plain buffer + { + PrimaryKey lowerPK = getPK(150); + PrimaryKey upperPK = getPK(200); + + BulkExportRequest bulkExportRequest = new BulkExportRequest(); + BulkExportQueryCriteria bulkExportQueryCriteria = new BulkExportQueryCriteria(tableName); + String[] columns = new String[]{"PK1", "PK3", "DC1", "DC2"}; + + bulkExportQueryCriteria.setInclusiveStartPrimaryKey(lowerPK); + bulkExportQueryCriteria.setExclusiveEndPrimaryKey(upperPK); + bulkExportQueryCriteria.setDataBlockType(DataBlockType.DBT_PLAIN_BUFFER); + bulkExportQueryCriteria.addColumnsToGet(columns); + + bulkExportRequest.setBulkExportQueryCriteria(bulkExportQueryCriteria); + BulkExportResponse response = publicClient.bulkExport(bulkExportRequest); + + assertEquals(DataBlockType.DBT_PLAIN_BUFFER, response.getDataBlockType()); + + PlainBufferBlockParser parser = new PlainBufferBlockParser(response.getRows()); + + assertEquals(50, parser.getRowCount()); + + List rows = parser.getRows(); + for (int i = 0; i < 50; i++) { + Row row = rows.get(i); + { + PrimaryKey target = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("PK1", PrimaryKeyValue.fromString(Integer.toString(150 + i))) + .addPrimaryKeyColumn("PK2", PrimaryKeyValue.fromLong(150 + i)) + .addPrimaryKeyColumn("PK3", PrimaryKeyValue.fromBinary(Integer.toString(150 + i).getBytes("UTF-8"))) + .build(); + assertEquals(target, row.getPrimaryKey()); + } + { + assertEquals("DC1", row.getColumns()[0].getName()); + assertEquals(Integer.toString(150 + i), row.getColumns()[0].getValue().asString()); + assertTrue(row.getColumns()[0].getTimestamp() > 0); + + assertEquals("DC2", row.getColumns()[1].getName()); + assertEquals(150 + i, row.getColumns()[1].getValue().asLong()); + assertTrue(row.getColumns()[1].getTimestamp() > 0); + } + } + } + // internal matrix + { + PrimaryKey lowerPK = getPK(150); + PrimaryKey upperPK = getPK(200); + + BulkExportRequest bulkExportRequest = new BulkExportRequest(); + BulkExportQueryCriteria bulkExportQueryCriteria = new BulkExportQueryCriteria(tableName); + String[] columns = new String[]{"PK1", "PK3", "DC1", "DC2"}; + String[] outOfColumns = new String[]{"PK1", "PK2", "PK3", "DC1", "DC2"}; + + bulkExportQueryCriteria.setInclusiveStartPrimaryKey(lowerPK); + bulkExportQueryCriteria.setExclusiveEndPrimaryKey(upperPK); + bulkExportQueryCriteria.setDataBlockType(DataBlockType.DBT_SIMPLE_ROW_MATRIX); + bulkExportQueryCriteria.addColumnsToGet(columns); + + bulkExportRequest.setBulkExportQueryCriteria(bulkExportQueryCriteria); + BulkExportResponse response = internalClient.bulkExport(bulkExportRequest); + + assertEquals(0, response.getConsumedCapacity().getCapacityUnit().getReadCapacityUnit()); + assertEquals(0, response.getConsumedCapacity().getCapacityUnit().getWriteCapacityUnit()); + assertEquals(2000, response.getConsumedCapacity().getCapacityDataSize().getReadCapacityDataSize()); + assertEquals(0, response.getConsumedCapacity().getCapacityDataSize().getWriteCapacityDataSize()); + + SimpleRowMatrixBlockParser parser = new SimpleRowMatrixBlockParser(response.getRows()); + + assertEquals(50, parser.getRowCount()); + assertArrayEquals(outOfColumns, parser.parseFieldNames()); + assertEquals(3, parser.getPkCount()); + assertEquals(2, parser.getAttrCount()); + assertEquals(5, parser.getFieldCount()); + + for (int i = 150; i < 200; i++) { + assertEquals(i - 150, parser.next()); + assertEquals(Integer.toString(i), parser.getString(0)); + assertEquals(i, parser.getLong(1)); + assertArrayEquals(Integer.toString(i).getBytes("UTF-8"), parser.getBinary(2)); + assertEquals(Integer.toString(i), parser.getString(3)); + assertEquals(i, parser.getLong(4)); + assertEquals(false, parser.isNull(0)); + assertEquals(false, parser.isNull(1)); + assertEquals(false, parser.isNull(2)); + assertEquals(false, parser.isNull(3)); + assertEquals(false, parser.isNull(4)); + + PrimaryKeyBuilder pkBuilder = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + pkBuilder.addPrimaryKeyColumn("PK1", PrimaryKeyValue.fromString(new Integer(i).toString())); + pkBuilder.addPrimaryKeyColumn("PK2", PrimaryKeyValue.fromLong(i)); + pkBuilder.addPrimaryKeyColumn("PK3", PrimaryKeyValue.fromBinary(new Integer(i).toString().getBytes("UTF-8"))); + PrimaryKey pk = pkBuilder.build(); + Row row = parser.getRow(); + assertEquals(pk, row.getPrimaryKey()); + + assertEquals(Integer.toString(i), row.getLatestColumn("DC1").getValue().asString()); + assertEquals(i, row.getLatestColumn("DC2").getValue().asLong()); + } + } + // internal plain buffer + { + PrimaryKey lowerPK = getPK(150); + PrimaryKey upperPK = getPK(200); + + BulkExportRequest bulkExportRequest = new BulkExportRequest(); + BulkExportQueryCriteria bulkExportQueryCriteria = new BulkExportQueryCriteria(tableName); + String[] columns = new String[]{"PK1", "PK3", "DC1", "DC2"}; + + bulkExportQueryCriteria.setInclusiveStartPrimaryKey(lowerPK); + bulkExportQueryCriteria.setExclusiveEndPrimaryKey(upperPK); + bulkExportQueryCriteria.setDataBlockType(DataBlockType.DBT_PLAIN_BUFFER); + bulkExportQueryCriteria.addColumnsToGet(columns); + + bulkExportRequest.setBulkExportQueryCriteria(bulkExportQueryCriteria); + BulkExportResponse response = internalClient.bulkExport(bulkExportRequest); + + PlainBufferBlockParser parser = new PlainBufferBlockParser(response.getRows()); + + assertEquals(50, parser.getRowCount()); + + List rows = parser.getRows(); + for (int i = 0; i < 50; i++) { + Row row = rows.get(i); + { + PrimaryKey target = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("PK1", PrimaryKeyValue.fromString(Integer.toString(150 + i))) + .addPrimaryKeyColumn("PK2", PrimaryKeyValue.fromLong(150 + i)) + .addPrimaryKeyColumn("PK3", PrimaryKeyValue.fromBinary(Integer.toString(150 + i).getBytes("UTF-8"))) + .build(); + assertEquals(target, row.getPrimaryKey()); + } + { + assertEquals("DC1", row.getColumns()[0].getName()); + assertEquals(Integer.toString(150 + i), row.getColumns()[0].getValue().asString()); + assertTrue(row.getColumns()[0].getTimestamp() > 0); + + assertEquals("DC2", row.getColumns()[1].getName()); + assertEquals(150 + i, row.getColumns()[1].getValue().asLong()); + assertTrue(row.getColumns()[1].getTimestamp() > 0); + } + } + } + } + + @Test + public void testNoPrimaryKey() throws Exception { + List rowPutChanges = creatData(100, 300); + putData(internalClient, rowPutChanges); + putData(publicClient, rowPutChanges); + + // public matrix + { + PrimaryKey lowerPK = getPK(150); + PrimaryKey upperPK = getPK(250); + + BulkExportRequest bulkExportRequest = new BulkExportRequest(); + BulkExportQueryCriteria bulkExportQueryCriteria = new BulkExportQueryCriteria(tableName); + String[] columns = new String[]{"DC1", "DC2"}; + + bulkExportQueryCriteria.setInclusiveStartPrimaryKey(lowerPK); + bulkExportQueryCriteria.setExclusiveEndPrimaryKey(upperPK); + bulkExportQueryCriteria.setDataBlockType(DataBlockType.DBT_SIMPLE_ROW_MATRIX); + bulkExportQueryCriteria.addColumnsToGet(columns); + + bulkExportRequest.setBulkExportQueryCriteria(bulkExportQueryCriteria); + BulkExportResponse response = publicClient.bulkExport(bulkExportRequest); + + assertEquals(0, response.getConsumedCapacity().getCapacityUnit().getReadCapacityUnit()); + assertEquals(0, response.getConsumedCapacity().getCapacityUnit().getWriteCapacityUnit()); + assertEquals(4000, response.getConsumedCapacity().getCapacityDataSize().getReadCapacityDataSize()); + assertEquals(0, response.getConsumedCapacity().getCapacityDataSize().getWriteCapacityDataSize()); + + SimpleRowMatrixBlockParser parser = new SimpleRowMatrixBlockParser(response.getRows()); + + assertEquals(100, parser.getRowCount()); + assertArrayEquals(columns, parser.parseFieldNames()); + assertEquals(0, parser.getPkCount()); + assertEquals(2, parser.getAttrCount()); + assertEquals(2, parser.getFieldCount()); + + for (int i = 150; i < 250; i++) { + assertEquals(i - 150, parser.next()); + assertEquals(Integer.toString(i), parser.getString(0)); + assertEquals(i, parser.getLong(1)); + assertEquals(false, parser.isNull(0)); + assertEquals(false, parser.isNull(1)); + } + } + // public plain buffer + { + PrimaryKey lowerPK = getPK(150); + PrimaryKey upperPK = getPK(250); + + BulkExportRequest bulkExportRequest = new BulkExportRequest(); + BulkExportQueryCriteria bulkExportQueryCriteria = new BulkExportQueryCriteria(tableName); + String[] columns = new String[]{"DC1", "DC2"}; + + bulkExportQueryCriteria.setInclusiveStartPrimaryKey(lowerPK); + bulkExportQueryCriteria.setExclusiveEndPrimaryKey(upperPK); + bulkExportQueryCriteria.setDataBlockType(DataBlockType.DBT_PLAIN_BUFFER); + bulkExportQueryCriteria.addColumnsToGet(columns); + + bulkExportRequest.setBulkExportQueryCriteria(bulkExportQueryCriteria); + BulkExportResponse response = publicClient.bulkExport(bulkExportRequest); + + PlainBufferBlockParser parser = new PlainBufferBlockParser(response.getRows()); + + assertEquals(100, parser.getRowCount()); + + List rows = parser.getRows(); + for (int i = 0; i < 100; i++) { + Row row = rows.get(i); + { + PrimaryKey target = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("PK1", PrimaryKeyValue.fromString(Integer.toString(150 + i))) + .addPrimaryKeyColumn("PK2", PrimaryKeyValue.fromLong(150 + i)) + .addPrimaryKeyColumn("PK3", PrimaryKeyValue.fromBinary(Integer.toString(150 + i).getBytes("UTF-8"))) + .build(); + assertEquals(target, row.getPrimaryKey()); + } + { + assertEquals("DC1", row.getColumns()[0].getName()); + assertEquals(Integer.toString(150 + i), row.getColumns()[0].getValue().asString()); + assertTrue(row.getColumns()[0].getTimestamp() > 0); + + assertEquals("DC2", row.getColumns()[1].getName()); + assertEquals(150 + i, row.getColumns()[1].getValue().asLong()); + assertTrue(row.getColumns()[1].getTimestamp() > 0); + } + } + } + // internal matrix + { + PrimaryKey lowerPK = getPK(150); + PrimaryKey upperPK = getPK(250); + + BulkExportRequest bulkExportRequest = new BulkExportRequest(); + BulkExportQueryCriteria bulkExportQueryCriteria = new BulkExportQueryCriteria(tableName); + String[] columns = new String[]{"DC1", "DC2"}; + String[] outOfColumns = new String[]{"DC1", "DC2"}; + + bulkExportQueryCriteria.setInclusiveStartPrimaryKey(lowerPK); + bulkExportQueryCriteria.setExclusiveEndPrimaryKey(upperPK); + bulkExportQueryCriteria.setDataBlockType(DataBlockType.DBT_SIMPLE_ROW_MATRIX); + bulkExportQueryCriteria.addColumnsToGet(columns); + + bulkExportRequest.setBulkExportQueryCriteria(bulkExportQueryCriteria); + BulkExportResponse response = internalClient.bulkExport(bulkExportRequest); + + assertEquals(0, response.getConsumedCapacity().getCapacityUnit().getReadCapacityUnit()); + assertEquals(0, response.getConsumedCapacity().getCapacityUnit().getWriteCapacityUnit()); + assertEquals(4000, response.getConsumedCapacity().getCapacityDataSize().getReadCapacityDataSize()); + assertEquals(0, response.getConsumedCapacity().getCapacityDataSize().getWriteCapacityDataSize()); + + SimpleRowMatrixBlockParser parser = new SimpleRowMatrixBlockParser(response.getRows()); + + assertEquals(100, parser.getRowCount()); + assertArrayEquals(outOfColumns, parser.parseFieldNames()); + assertEquals(0, parser.getPkCount()); + assertEquals(2, parser.getAttrCount()); + assertEquals(2, parser.getFieldCount()); + + for (int i = 150; i < 250; i++) { + assertEquals(i - 150, parser.next()); + assertEquals(Integer.toString(i), parser.getString(0)); + assertEquals(i, parser.getLong(1)); + assertEquals(false, parser.isNull(0)); + assertEquals(false, parser.isNull(1)); + } + } + // internal plain buffer + { + PrimaryKey lowerPK = getPK(150); + PrimaryKey upperPK = getPK(250); + + BulkExportRequest bulkExportRequest = new BulkExportRequest(); + BulkExportQueryCriteria bulkExportQueryCriteria = new BulkExportQueryCriteria(tableName); + String[] columns = new String[]{"DC1", "DC2"}; + + bulkExportQueryCriteria.setInclusiveStartPrimaryKey(lowerPK); + bulkExportQueryCriteria.setExclusiveEndPrimaryKey(upperPK); + bulkExportQueryCriteria.setDataBlockType(DataBlockType.DBT_PLAIN_BUFFER); + bulkExportQueryCriteria.addColumnsToGet(columns); + + bulkExportRequest.setBulkExportQueryCriteria(bulkExportQueryCriteria); + BulkExportResponse response = internalClient.bulkExport(bulkExportRequest); + + PlainBufferBlockParser parser = new PlainBufferBlockParser(response.getRows()); + + assertEquals(100, parser.getRowCount()); + + List rows = parser.getRows(); + for (int i = 0; i < 100; i++) { + Row row = rows.get(i); + { + PrimaryKey target = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("PK1", PrimaryKeyValue.fromString(Integer.toString(150 + i))) + .addPrimaryKeyColumn("PK2", PrimaryKeyValue.fromLong(150 + i)) + .addPrimaryKeyColumn("PK3", PrimaryKeyValue.fromBinary(Integer.toString(150 + i).getBytes("UTF-8"))) + .build(); + assertEquals(target, row.getPrimaryKey()); + } + { + assertEquals("DC1", row.getColumns()[0].getName()); + assertEquals(Integer.toString(150 + i), row.getColumns()[0].getValue().asString()); + assertTrue(row.getColumns()[0].getTimestamp() > 0); + + assertEquals("DC2", row.getColumns()[1].getName()); + assertEquals(150 + i, row.getColumns()[1].getValue().asLong()); + assertTrue(row.getColumns()[1].getTimestamp() > 0); + } + } + } + } + + @Test + public void testWithFilter() throws Exception { + List rowPutChanges = creatData(100, 300); + putData(internalClient, rowPutChanges); + putData(publicClient, rowPutChanges); + + // public matrix + { + PrimaryKey lowerPK = getPK(150); + PrimaryKey upperPK = getPK(300); + + BulkExportRequest bulkExportRequest = new BulkExportRequest(); + BulkExportQueryCriteria bulkExportQueryCriteria = new BulkExportQueryCriteria(tableName); + String[] columns = new String[]{"DC1", "DC2"}; + + bulkExportQueryCriteria.setInclusiveStartPrimaryKey(lowerPK); + bulkExportQueryCriteria.setExclusiveEndPrimaryKey(upperPK); + bulkExportQueryCriteria.addColumnsToGet(columns); + Filter filter = new SingleColumnValueFilter( + "DC1", + SingleColumnValueFilter.CompareOperator.GREATER_EQUAL, + ColumnValue.fromString(Integer.toString(250))); + bulkExportQueryCriteria.setFilter(filter); + + bulkExportRequest.setBulkExportQueryCriteria(bulkExportQueryCriteria); + BulkExportResponse response = publicClient.bulkExport(bulkExportRequest); + + assertEquals(0, response.getConsumedCapacity().getCapacityUnit().getReadCapacityUnit()); + assertEquals(0, response.getConsumedCapacity().getCapacityUnit().getWriteCapacityUnit()); + assertEquals(6000, response.getConsumedCapacity().getCapacityDataSize().getReadCapacityDataSize()); + assertEquals(0, response.getConsumedCapacity().getCapacityDataSize().getWriteCapacityDataSize()); + + SimpleRowMatrixBlockParser parser = new SimpleRowMatrixBlockParser(response.getRows()); + + assertEquals(50, parser.getRowCount()); + assertArrayEquals(columns, parser.parseFieldNames()); + assertEquals(0, parser.getPkCount()); + assertEquals(2, parser.getAttrCount()); + assertEquals(2, parser.getFieldCount()); + + for (int i = 250; i < 300; i++) { + assertEquals(i - 250, parser.next()); + assertEquals(Integer.toString(i), parser.getString(0)); + assertEquals(i, parser.getLong(1)); + assertEquals(false, parser.isNull(0)); + assertEquals(false, parser.isNull(1)); + } + } + + // public plain buffer + { + PrimaryKey lowerPK = getPK(150); + PrimaryKey upperPK = getPK(300); + + BulkExportRequest bulkExportRequest = new BulkExportRequest(); + BulkExportQueryCriteria bulkExportQueryCriteria = new BulkExportQueryCriteria(tableName); + String[] columns = new String[]{"DC1", "DC2"}; + + bulkExportQueryCriteria.setInclusiveStartPrimaryKey(lowerPK); + bulkExportQueryCriteria.setExclusiveEndPrimaryKey(upperPK); + bulkExportQueryCriteria.setDataBlockType(DataBlockType.DBT_PLAIN_BUFFER); + bulkExportQueryCriteria.addColumnsToGet(columns); + Filter filter = new SingleColumnValueFilter( + "DC1", + SingleColumnValueFilter.CompareOperator.GREATER_EQUAL, + ColumnValue.fromString(Integer.toString(250))); + bulkExportQueryCriteria.setFilter(filter); + + bulkExportRequest.setBulkExportQueryCriteria(bulkExportQueryCriteria); + BulkExportResponse response = publicClient.bulkExport(bulkExportRequest); + + assertEquals(0, response.getConsumedCapacity().getCapacityUnit().getReadCapacityUnit()); + assertEquals(0, response.getConsumedCapacity().getCapacityUnit().getWriteCapacityUnit()); + assertEquals(6000, response.getConsumedCapacity().getCapacityDataSize().getReadCapacityDataSize()); + assertEquals(0, response.getConsumedCapacity().getCapacityDataSize().getWriteCapacityDataSize()); + + PlainBufferBlockParser parser = new PlainBufferBlockParser(response.getRows()); + + assertEquals(50, parser.getRowCount()); + + List rows = parser.getRows(); + for (int i = 0; i < 50; i++) { + Row row = rows.get(i); + { + PrimaryKey target = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("PK1", PrimaryKeyValue.fromString(Integer.toString(250 + i))) + .addPrimaryKeyColumn("PK2", PrimaryKeyValue.fromLong(250 + i)) + .addPrimaryKeyColumn("PK3", PrimaryKeyValue.fromBinary(Integer.toString(250 + i).getBytes("UTF-8"))) + .build(); + assertEquals(target, row.getPrimaryKey()); + } + { + assertEquals("DC1", row.getColumns()[0].getName()); + assertEquals(Integer.toString(250 + i), row.getColumns()[0].getValue().asString()); + assertTrue(row.getColumns()[0].getTimestamp() > 0); + + assertEquals("DC2", row.getColumns()[1].getName()); + assertEquals(250 + i, row.getColumns()[1].getValue().asLong()); + assertTrue(row.getColumns()[1].getTimestamp() > 0); + } + } + } + + // internal matrix + { + PrimaryKey lowerPK = getPK(150); + PrimaryKey upperPK = getPK(300); + + BulkExportRequest bulkExportRequest = new BulkExportRequest(); + BulkExportQueryCriteria bulkExportQueryCriteria = new BulkExportQueryCriteria(tableName); + String[] columns = new String[]{"DC1", "DC2"}; + String[] outOfColumns = new String[]{"DC1", "DC2"}; + + bulkExportQueryCriteria.setInclusiveStartPrimaryKey(lowerPK); + bulkExportQueryCriteria.setExclusiveEndPrimaryKey(upperPK); + bulkExportQueryCriteria.setDataBlockType(DataBlockType.DBT_SIMPLE_ROW_MATRIX); + bulkExportQueryCriteria.addColumnsToGet(columns); + Filter filter = new SingleColumnValueFilter( + "DC1", + SingleColumnValueFilter.CompareOperator.GREATER_EQUAL, + ColumnValue.fromString(Integer.toString(250))); + bulkExportQueryCriteria.setFilter(filter); + + bulkExportRequest.setBulkExportQueryCriteria(bulkExportQueryCriteria); + BulkExportResponse response = internalClient.bulkExport(bulkExportRequest); + + assertEquals(2, bulkExportQueryCriteria.numColumnsToGet()); + + assertEquals(0, response.getConsumedCapacity().getCapacityUnit().getReadCapacityUnit()); + assertEquals(0, response.getConsumedCapacity().getCapacityUnit().getWriteCapacityUnit()); + assertEquals(6000, response.getConsumedCapacity().getCapacityDataSize().getReadCapacityDataSize()); + assertEquals(0, response.getConsumedCapacity().getCapacityDataSize().getWriteCapacityDataSize()); + + SimpleRowMatrixBlockParser parser = new SimpleRowMatrixBlockParser(response.getRows()); + + assertEquals(50, parser.getRowCount()); + assertArrayEquals(outOfColumns, parser.parseFieldNames()); + assertEquals(0, parser.getPkCount()); + assertEquals(2, parser.getAttrCount()); + assertEquals(2, parser.getFieldCount()); + + for (int i = 250; i < 300; i++) { + assertEquals(i - 250, parser.next()); + assertEquals(Integer.toString(i), parser.getString(0)); + assertEquals(i, parser.getLong(1)); + assertEquals(false, parser.isNull(0)); + assertEquals(false, parser.isNull(1)); + } + } + // internal plain buffer + { + PrimaryKey lowerPK = getPK(150); + PrimaryKey upperPK = getPK(300); + + BulkExportRequest bulkExportRequest = new BulkExportRequest(); + BulkExportQueryCriteria bulkExportQueryCriteria = new BulkExportQueryCriteria(tableName); + String[] columns = new String[]{"DC1", "DC2"}; + + bulkExportQueryCriteria.setInclusiveStartPrimaryKey(lowerPK); + bulkExportQueryCriteria.setExclusiveEndPrimaryKey(upperPK); + bulkExportQueryCriteria.setDataBlockType(DataBlockType.DBT_PLAIN_BUFFER); + bulkExportQueryCriteria.addColumnsToGet(columns); + Filter filter = new SingleColumnValueFilter( + "DC1", + SingleColumnValueFilter.CompareOperator.GREATER_EQUAL, + ColumnValue.fromString(Integer.toString(250))); + bulkExportQueryCriteria.setFilter(filter); + + bulkExportRequest.setBulkExportQueryCriteria(bulkExportQueryCriteria); + BulkExportResponse response = internalClient.bulkExport(bulkExportRequest); + + assertEquals(0, response.getConsumedCapacity().getCapacityUnit().getReadCapacityUnit()); + assertEquals(0, response.getConsumedCapacity().getCapacityUnit().getWriteCapacityUnit()); + assertEquals(6000, response.getConsumedCapacity().getCapacityDataSize().getReadCapacityDataSize()); + assertEquals(0, response.getConsumedCapacity().getCapacityDataSize().getWriteCapacityDataSize()); + + PlainBufferBlockParser parser = new PlainBufferBlockParser(response.getRows()); + + assertEquals(50, parser.getRowCount()); + + List rows = parser.getRows(); + for (int i = 0; i < 50; i++) { + Row row = rows.get(i); + { + PrimaryKey target = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("PK1", PrimaryKeyValue.fromString(Integer.toString(250 + i))) + .addPrimaryKeyColumn("PK2", PrimaryKeyValue.fromLong(250 + i)) + .addPrimaryKeyColumn("PK3", PrimaryKeyValue.fromBinary(Integer.toString(250 + i).getBytes("UTF-8"))) + .build(); + assertEquals(target, row.getPrimaryKey()); + } + { + assertEquals("DC1", row.getColumns()[0].getName()); + assertEquals(Integer.toString(250 + i), row.getColumns()[0].getValue().asString()); + assertTrue(row.getColumns()[0].getTimestamp() > 0); + + assertEquals("DC2", row.getColumns()[1].getName()); + assertEquals(250 + i, row.getColumns()[1].getValue().asLong()); + assertTrue(row.getColumns()[1].getTimestamp() > 0); + } + } + } + } + + @Test + public void testNoColumnToGet() throws Exception { + List rowPutChanges = creatData(500, 600); + putData(internalClient, rowPutChanges); + putData(publicClient, rowPutChanges); + + // public - matrix + { + PrimaryKey lowerPK = getPK(550); + PrimaryKey upperPK = getPK(570); + + BulkExportRequest bulkExportRequest = new BulkExportRequest(); + BulkExportQueryCriteria bulkExportQueryCriteria = new BulkExportQueryCriteria(tableName); + String[] columns = new String[]{}; + + bulkExportQueryCriteria.setInclusiveStartPrimaryKey(lowerPK); + bulkExportQueryCriteria.setExclusiveEndPrimaryKey(upperPK); + bulkExportQueryCriteria.setDataBlockType(DataBlockType.DBT_SIMPLE_ROW_MATRIX); + bulkExportQueryCriteria.addColumnsToGet(columns); + bulkExportRequest.setBulkExportQueryCriteria(bulkExportQueryCriteria); + + try { + publicClient.bulkExport(bulkExportRequest); + fail(); + } catch (TableStoreException e) { + assertEquals(ErrorCode.INVALID_PARAMETER, e.getErrorCode()); + assertEquals("DBT_SIMPLE_ROW_MATRIX need at least one column to get.", e.getMessage()); + } + } + // public - pb + { + PrimaryKey lowerPK = getPK(550); + PrimaryKey upperPK = getPK(570); + + BulkExportRequest bulkExportRequest = new BulkExportRequest(); + BulkExportQueryCriteria bulkExportQueryCriteria = new BulkExportQueryCriteria(tableName); + String[] columns = new String[]{}; + + bulkExportQueryCriteria.setInclusiveStartPrimaryKey(lowerPK); + bulkExportQueryCriteria.setExclusiveEndPrimaryKey(upperPK); + bulkExportQueryCriteria.setDataBlockType(DataBlockType.DBT_PLAIN_BUFFER); + bulkExportQueryCriteria.addColumnsToGet(columns); + + bulkExportRequest.setBulkExportQueryCriteria(bulkExportQueryCriteria); + BulkExportResponse response = publicClient.bulkExport(bulkExportRequest); + + assertEquals(0, response.getConsumedCapacity().getCapacityUnit().getReadCapacityUnit()); + assertEquals(0, response.getConsumedCapacity().getCapacityUnit().getWriteCapacityUnit()); + assertEquals(920, response.getConsumedCapacity().getCapacityDataSize().getReadCapacityDataSize()); + assertEquals(0, response.getConsumedCapacity().getCapacityDataSize().getWriteCapacityDataSize()); + + PlainBufferBlockParser parser = new PlainBufferBlockParser(response.getRows()); + + assertEquals(20, parser.getRowCount()); + + List rows = parser.getRows(); + for (int i = 0; i < 20; i++) { + Row row = rows.get(i); + { + PrimaryKey target = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("PK1", PrimaryKeyValue.fromString(Integer.toString(550 + i))) + .addPrimaryKeyColumn("PK2", PrimaryKeyValue.fromLong(550 + i)) + .addPrimaryKeyColumn("PK3", PrimaryKeyValue.fromBinary(Integer.toString(550 + i).getBytes("UTF-8"))) + .build(); + assertEquals(target, row.getPrimaryKey()); + } + { + assertEquals("DC1", row.getColumns()[0].getName()); + assertEquals(Integer.toString(550 + i), row.getColumns()[0].getValue().asString()); + assertTrue(row.getColumns()[0].getTimestamp() > 0); + + assertEquals("DC2", row.getColumns()[1].getName()); + assertEquals(550 + i, row.getColumns()[1].getValue().asLong()); + assertTrue(row.getColumns()[1].getTimestamp() > 0); + + assertEquals("DC3", row.getColumns()[2].getName()); + assertArrayEquals(Integer.toString(550 + i).getBytes("UTF-8"), row.getColumns()[2].getValue().asBinary()); + assertTrue(row.getColumns()[2].getTimestamp() > 0); + } + } + } + // internal - matrix + { + PrimaryKey lowerPK = getPK(550); + PrimaryKey upperPK = getPK(570); + + BulkExportRequest bulkExportRequest = new BulkExportRequest(); + BulkExportQueryCriteria bulkExportQueryCriteria = new BulkExportQueryCriteria(tableName); + String[] columns = new String[]{}; + + bulkExportQueryCriteria.setInclusiveStartPrimaryKey(lowerPK); + bulkExportQueryCriteria.setExclusiveEndPrimaryKey(upperPK); + bulkExportQueryCriteria.setDataBlockType(DataBlockType.DBT_SIMPLE_ROW_MATRIX); + bulkExportQueryCriteria.addColumnsToGet(columns); + bulkExportRequest.setBulkExportQueryCriteria(bulkExportQueryCriteria); + + try { + internalClient.bulkExport(bulkExportRequest); + fail(); + } catch (TableStoreException e) { + assertEquals(ErrorCode.INVALID_PARAMETER, e.getErrorCode()); + assertEquals("DBT_SIMPLE_ROW_MATRIX need at least one column to get.", e.getMessage()); + } + } + // internal - pb + { + PrimaryKey lowerPK = getPK(550); + PrimaryKey upperPK = getPK(570); + + BulkExportRequest bulkExportRequest = new BulkExportRequest(); + BulkExportQueryCriteria bulkExportQueryCriteria = new BulkExportQueryCriteria(tableName); + String[] columns = new String[]{}; + + bulkExportQueryCriteria.setInclusiveStartPrimaryKey(lowerPK); + bulkExportQueryCriteria.setExclusiveEndPrimaryKey(upperPK); + bulkExportQueryCriteria.setDataBlockType(DataBlockType.DBT_PLAIN_BUFFER); + bulkExportQueryCriteria.addColumnsToGet(columns); + + bulkExportRequest.setBulkExportQueryCriteria(bulkExportQueryCriteria); + BulkExportResponse response = internalClient.bulkExport(bulkExportRequest); + + assertEquals(0, bulkExportQueryCriteria.numColumnsToGet()); + + assertEquals(0, response.getConsumedCapacity().getCapacityUnit().getReadCapacityUnit()); + assertEquals(0, response.getConsumedCapacity().getCapacityUnit().getWriteCapacityUnit()); + assertEquals(920, response.getConsumedCapacity().getCapacityDataSize().getReadCapacityDataSize()); + assertEquals(0, response.getConsumedCapacity().getCapacityDataSize().getWriteCapacityDataSize()); + + PlainBufferBlockParser parser = new PlainBufferBlockParser(response.getRows()); + + assertEquals(20, parser.getRowCount()); + + List rows = parser.getRows(); + for (int i = 0; i < 20; i++) { + Row row = rows.get(i); + { + PrimaryKey target = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("PK1", PrimaryKeyValue.fromString(Integer.toString(550 + i))) + .addPrimaryKeyColumn("PK2", PrimaryKeyValue.fromLong(550 + i)) + .addPrimaryKeyColumn("PK3", PrimaryKeyValue.fromBinary(Integer.toString(550 + i).getBytes("UTF-8"))) + .build(); + assertEquals(target, row.getPrimaryKey()); + } + { + assertEquals("DC1", row.getColumns()[0].getName()); + assertEquals(Integer.toString(550 + i), row.getColumns()[0].getValue().asString()); + assertTrue(row.getColumns()[0].getTimestamp() > 0); + + assertEquals("DC2", row.getColumns()[1].getName()); + assertEquals(550 + i, row.getColumns()[1].getValue().asLong()); + assertTrue(row.getColumns()[1].getTimestamp() > 0); + + assertEquals("DC3", row.getColumns()[2].getName()); + assertArrayEquals(Integer.toString(550 + i).getBytes("UTF-8"), row.getColumns()[2].getValue().asBinary()); + assertTrue(row.getColumns()[2].getTimestamp() > 0); + } + } + } + } + + @Test + public void testInvalidParam() throws Exception { + { + BulkExportRequest bulkExportRequest = new BulkExportRequest(); + try { + publicClient.bulkExport(bulkExportRequest); + fail(); + } catch (NullPointerException e) { + assertTrue(true); + } + } + { + PrimaryKey upperPK = getPK(570); + + PrimaryKeyBuilder pkBuilder = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + pkBuilder.addPrimaryKeyColumn("PK1", PrimaryKeyValue.fromString(new Integer(111).toString())); + pkBuilder.addPrimaryKeyColumn("PK3", PrimaryKeyValue.fromBinary(new Integer(111).toString().getBytes("UTF-8"))); + PrimaryKey lowerPK = pkBuilder.build(); + + String[] columns = new String[]{"PK1"}; + + BulkExportRequest bulkExportRequest = new BulkExportRequest(); + BulkExportQueryCriteria bulkExportQueryCriteria = new BulkExportQueryCriteria(tableName); + + bulkExportQueryCriteria.setInclusiveStartPrimaryKey(lowerPK); + bulkExportQueryCriteria.setExclusiveEndPrimaryKey(upperPK); + bulkExportQueryCriteria.addColumnsToGet(columns); + + bulkExportRequest.setBulkExportQueryCriteria(bulkExportQueryCriteria); + + try { + publicClient.bulkExport(bulkExportRequest); + fail(); + } catch (TableStoreException e) { + assertEquals(ErrorCode.INVALID_PK, e.getErrorCode()); + assertEquals("Validate PK size fail. Input: 2, Meta: 3.", e.getMessage()); + } + } + { + PrimaryKey lowerPK = getPK(570); + PrimaryKey upperPK = getPK(150); + + String[] columns = new String[]{"PK1"}; + + BulkExportRequest bulkExportRequest = new BulkExportRequest(); + BulkExportQueryCriteria bulkExportQueryCriteria = new BulkExportQueryCriteria(tableName); + + bulkExportQueryCriteria.setInclusiveStartPrimaryKey(lowerPK); + bulkExportQueryCriteria.setExclusiveEndPrimaryKey(upperPK); + bulkExportQueryCriteria.addColumnsToGet(columns); + + bulkExportRequest.setBulkExportQueryCriteria(bulkExportQueryCriteria); + + try { + publicClient.bulkExport(bulkExportRequest); + fail(); + } catch (TableStoreException e) { + assertEquals(ErrorCode.INVALID_PARAMETER, e.getErrorCode()); + assertEquals("Begin key must less than end key in FORWARD", e.getMessage()); + } + } + { + PrimaryKey lowerPK = getPK(150); + PrimaryKey upperPK = getPK(150); + + String[] columns = new String[]{"PK1"}; + + BulkExportRequest bulkExportRequest = new BulkExportRequest(); + BulkExportQueryCriteria bulkExportQueryCriteria = new BulkExportQueryCriteria(tableName); + + bulkExportQueryCriteria.setInclusiveStartPrimaryKey(lowerPK); + bulkExportQueryCriteria.setExclusiveEndPrimaryKey(upperPK); + bulkExportQueryCriteria.addColumnsToGet(columns); + + bulkExportRequest.setBulkExportQueryCriteria(bulkExportQueryCriteria); + + try { + publicClient.bulkExport(bulkExportRequest); + fail(); + } catch (TableStoreException e) { + assertEquals(ErrorCode.INVALID_PARAMETER, e.getErrorCode()); + assertEquals("Begin key must less than end key in FORWARD", e.getMessage()); + } + } + { + try { + new BulkExportQueryCriteria(""); + fail(); + } catch (IllegalArgumentException e) { + assertEquals("The name of table should not be null or empty.", e.getMessage()); + } + + try { + new BulkExportQueryCriteria(null); + fail(); + } catch (IllegalArgumentException e) { + assertEquals("The name of table should not be null or empty.", e.getMessage()); + } + } + } + + @Test + public void testWithLimit() throws Exception { + { + PrimaryKey lowerPK = getPK(150); + PrimaryKey upperPK = getPK(151); + + BulkExportRequest bulkExportRequest = new BulkExportRequest(); + BulkExportQueryCriteria bulkExportQueryCriteria = new BulkExportQueryCriteria(tableName); + + bulkExportQueryCriteria.setInclusiveStartPrimaryKey(lowerPK); + bulkExportQueryCriteria.setExclusiveEndPrimaryKey(upperPK); + for (int i = 0; i < 1024; i++) { + bulkExportQueryCriteria.addColumnsToGet("DC" + i); + } + + bulkExportRequest.setBulkExportQueryCriteria(bulkExportQueryCriteria); + publicClient.bulkExport(bulkExportRequest); + + bulkExportQueryCriteria.addColumnsToGet("DC" + 1024); + try { + publicClient.bulkExport(bulkExportRequest); + fail(); + } catch (TableStoreException e) { + assertEquals(ErrorCode.INVALID_PARAMETER, e.getErrorCode()); + assertEquals("The number of columns from the request exceeds the limit, limit count: 1024, column count: 1025.", e.getMessage()); + } + } + } + + @Test + public void testWithMatrixIterator() throws Exception { + List rowPutChanges = creatData(10000, 16000); + putData(publicClient, rowPutChanges); + putData(internalClient, rowPutChanges); + + { + PrimaryKey lowerPK = getPK(10000); + PrimaryKey upperPK = getPK(16000); + BulkExportQueryCriteria bulkExportQueryCriteria = new BulkExportQueryCriteria(tableName); + bulkExportQueryCriteria.setInclusiveStartPrimaryKey(lowerPK); + bulkExportQueryCriteria.setExclusiveEndPrimaryKey(upperPK); + bulkExportQueryCriteria.addColumnsToGet("PK2"); + bulkExportQueryCriteria.addColumnsToGet("DC1"); + bulkExportQueryCriteria.addColumnsToGet("DC2"); + bulkExportQueryCriteria.addColumnsToGet("DC3"); + bulkExportQueryCriteria.addColumnsToGet("DC4"); + + SimpleRowMatrixBlockRowIterator iterator = new SimpleRowMatrixBlockRowIterator(publicClient, bulkExportQueryCriteria, false); + int i = 0; + while (iterator.hasNext()) { + int y = 10000 + i; + assertEquals(i, iterator.next().intValue()); + { + assertEquals(y, iterator.getLong(0)); + assertEquals(Integer.toString(y), iterator.getString(1)); + assertEquals(y, iterator.getLong(2)); + assertArrayEquals(Integer.toString(y).getBytes("UTF-8"), iterator.getBinary(3)); + assertEquals(null, iterator.getObject(4)); + + assertEquals(false, iterator.isNull(0)); + assertEquals(false, iterator.isNull(1)); + assertEquals(false, iterator.isNull(2)); + assertEquals(false, iterator.isNull(3)); + assertEquals(true, iterator.isNull(4)); + } + Row row = iterator.getRow(); + { + PrimaryKey target = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("PK2", PrimaryKeyValue.fromLong(y)) + .build(); + assertEquals(target, row.getPrimaryKey()); + } + { + assertEquals(Integer.toString(y), row.getLatestColumn("DC1").getValue().asString()); + assertEquals(y, row.getLatestColumn("DC2").getValue().asLong()); + assertArrayEquals(Integer.toString(y).getBytes("UTF-8"), row.getLatestColumn("DC3").getValue().asBinary()); + assertEquals(null, row.getLatestColumn("DC4")); + } + i++; + } + } + { + PrimaryKey lowerPK = getPK(10000); + PrimaryKey upperPK = getPK(16000); + BulkExportQueryCriteria bulkExportQueryCriteria = new BulkExportQueryCriteria(tableName); + bulkExportQueryCriteria.setInclusiveStartPrimaryKey(lowerPK); + bulkExportQueryCriteria.setExclusiveEndPrimaryKey(upperPK); + bulkExportQueryCriteria.addColumnsToGet("PK2"); + bulkExportQueryCriteria.addColumnsToGet("DC1"); + bulkExportQueryCriteria.addColumnsToGet("DC2"); + bulkExportQueryCriteria.addColumnsToGet("DC3"); + bulkExportQueryCriteria.addColumnsToGet("DC4"); + + SimpleRowMatrixBlockRowIterator iterator = new SimpleRowMatrixBlockRowIterator(internalClient, bulkExportQueryCriteria, false); + int i = 0; + while (iterator.hasNext()) { + int y = 10000 + i; + assertEquals(i, iterator.next().intValue()); + { + assertEquals(Integer.toString(y), iterator.getString(0)); + assertEquals(y, iterator.getLong(1)); + assertArrayEquals(Integer.toString(y).getBytes("UTF-8"), iterator.getBinary(2)); + assertEquals(Integer.toString(y), iterator.getString(3)); + assertEquals(y, iterator.getLong(4)); + assertArrayEquals(Integer.toString(y).getBytes("UTF-8"), iterator.getBinary(5)); + assertEquals(null, iterator.getObject(6)); + + assertEquals(false, iterator.isNull(0)); + assertEquals(false, iterator.isNull(1)); + assertEquals(false, iterator.isNull(2)); + assertEquals(false, iterator.isNull(3)); + assertEquals(false, iterator.isNull(4)); + assertEquals(false, iterator.isNull(5)); + assertEquals(true, iterator.isNull(6)); + } + Row row = iterator.getRow(); + { + PrimaryKey target = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("PK1", PrimaryKeyValue.fromString(Integer.toString(y))) + .addPrimaryKeyColumn("PK2", PrimaryKeyValue.fromLong(y)) + .addPrimaryKeyColumn("PK3", PrimaryKeyValue.fromBinary(Integer.toString(y).getBytes("UTF-8"))) + .build(); + assertEquals(target, row.getPrimaryKey()); + } + { + assertEquals(Integer.toString(y), row.getLatestColumn("DC1").getValue().asString()); + assertEquals(y, row.getLatestColumn("DC2").getValue().asLong()); + assertArrayEquals(Integer.toString(y).getBytes("UTF-8"), row.getLatestColumn("DC3").getValue().asBinary()); + assertEquals(null, row.getLatestColumn("DC4")); + } + i++; + } + } + } + + @Test + public void testWithPlainBufferIterator() throws Exception { + List rowPutChanges = creatData(10000, 16000); + putData(publicClient, rowPutChanges); + putData(internalClient, rowPutChanges); + + { + PrimaryKey lowerPK = getPK(10000); + PrimaryKey upperPK = getPK(16000); + BulkExportQueryCriteria bulkExportQueryCriteria = new BulkExportQueryCriteria(tableName); + bulkExportQueryCriteria.setInclusiveStartPrimaryKey(lowerPK); + bulkExportQueryCriteria.setExclusiveEndPrimaryKey(upperPK); + bulkExportQueryCriteria.addColumnsToGet("PK2"); + bulkExportQueryCriteria.addColumnsToGet("DC1"); + bulkExportQueryCriteria.addColumnsToGet("DC2"); + bulkExportQueryCriteria.addColumnsToGet("DC3"); + bulkExportQueryCriteria.addColumnsToGet("DC4"); + + PlainBufferBlockRowIterator iterator = new PlainBufferBlockRowIterator(publicClient, bulkExportQueryCriteria); + int i = 0; + while (iterator.hasNext()) { + int y = 10000 + i; + Row row = iterator.next(); + { + PrimaryKey target = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("PK1", PrimaryKeyValue.fromString(Integer.toString(y))) + .addPrimaryKeyColumn("PK2", PrimaryKeyValue.fromLong(y)) + .addPrimaryKeyColumn("PK3", PrimaryKeyValue.fromBinary(Integer.toString(y).getBytes("UTF-8"))) + .build(); + assertEquals(target, row.getPrimaryKey()); + } + { + assertEquals(Integer.toString(y), row.getLatestColumn("DC1").getValue().asString()); + assertEquals(y, row.getLatestColumn("DC2").getValue().asLong()); + assertArrayEquals(Integer.toString(y).getBytes("UTF-8"), row.getLatestColumn("DC3").getValue().asBinary()); + assertEquals(null, row.getLatestColumn("DC4")); + } + i++; + } + } + { + PrimaryKey lowerPK = getPK(10000); + PrimaryKey upperPK = getPK(16000); + BulkExportQueryCriteria bulkExportQueryCriteria = new BulkExportQueryCriteria(tableName); + bulkExportQueryCriteria.setInclusiveStartPrimaryKey(lowerPK); + bulkExportQueryCriteria.setExclusiveEndPrimaryKey(upperPK); + bulkExportQueryCriteria.addColumnsToGet("PK2"); + bulkExportQueryCriteria.addColumnsToGet("DC1"); + bulkExportQueryCriteria.addColumnsToGet("DC2"); + bulkExportQueryCriteria.addColumnsToGet("DC3"); + bulkExportQueryCriteria.addColumnsToGet("DC4"); + + PlainBufferBlockRowIterator iterator = new PlainBufferBlockRowIterator(internalClient, bulkExportQueryCriteria); + int i = 0; + while (iterator.hasNext()) { + int y = 10000 + i; + Row row = iterator.next(); + { + PrimaryKey target = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("PK1", PrimaryKeyValue.fromString(Integer.toString(y))) + .addPrimaryKeyColumn("PK2", PrimaryKeyValue.fromLong(y)) + .addPrimaryKeyColumn("PK3", PrimaryKeyValue.fromBinary(Integer.toString(y).getBytes("UTF-8"))) + .build(); + assertEquals(target, row.getPrimaryKey()); + } + { + assertEquals(Integer.toString(y), row.getLatestColumn("DC1").getValue().asString()); + assertEquals(y, row.getLatestColumn("DC2").getValue().asLong()); + assertArrayEquals(Integer.toString(y).getBytes("UTF-8"), row.getLatestColumn("DC3").getValue().asBinary()); + assertEquals(null, row.getLatestColumn("DC4")); + } + i++; + } + } + } +} diff --git a/src/test/java/com/alicloud/openservices/tablestore/functiontest/TestBulkImportFunction.java b/src/test/java/com/alicloud/openservices/tablestore/functiontest/TestBulkImportFunction.java new file mode 100644 index 0000000..ae44ac9 --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/functiontest/TestBulkImportFunction.java @@ -0,0 +1,432 @@ +package com.alicloud.openservices.tablestore.functiontest; + +import com.alicloud.openservices.tablestore.ClientException; +import com.alicloud.openservices.tablestore.SyncClient; +import com.alicloud.openservices.tablestore.TableStoreException; +import com.alicloud.openservices.tablestore.common.ServiceSettings; +import com.alicloud.openservices.tablestore.core.ErrorCode; +import com.alicloud.openservices.tablestore.core.protocol.TunnelServiceApi; +import com.alicloud.openservices.tablestore.model.*; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +import java.io.UnsupportedEncodingException; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.TimeUnit; + +import static org.junit.Assert.*; + +public class TestBulkImportFunction { + + static String tableName = "YSTestBulkWrite"; + static SyncClient internalClient = null; + static SyncClient publicClient = null; + + @BeforeClass + public static void beforClass() { + ServiceSettings settings = ServiceSettings.load(); + final String endPoint = settings.getOTSEndpoint(); + final String accessId = settings.getOTSAccessKeyId(); + final String accessKey = settings.getOTSAccessKeySecret(); + final String publicInstanceName = settings.getOTSInstanceName(); + final String internalInstanceName = settings.getOTSInstanceNameInternal(); + + + internalClient = new SyncClient(endPoint, accessId, accessKey, internalInstanceName); + publicClient = new SyncClient(endPoint, accessId, accessKey, publicInstanceName); + } + + @AfterClass + public static void afterClass() { + internalClient.shutdown(); + publicClient.shutdown(); + } + + @Before + public void setUp() throws Exception { + try { + deleteTable(internalClient); + } catch (TableStoreException e) { + if (!e.getErrorCode().equals(ErrorCode.OBJECT_NOT_EXIST)) { + throw e; + } + } + try { + deleteTable(publicClient); + } catch (TableStoreException e) { + if (!e.getErrorCode().equals(ErrorCode.OBJECT_NOT_EXIST)) { + throw e; + } + } + + creatTable(internalClient); + creatTable(publicClient); + + Thread.sleep(TimeUnit.SECONDS.toMillis(5)); + } + + private void deleteTable(SyncClient client) { + DeleteTableRequest request = new DeleteTableRequest(tableName); + client.deleteTable(request); + } + + private void creatTable(SyncClient client) { + TableMeta tableMeta = new TableMeta(tableName); + tableMeta.addPrimaryKeyColumn(new PrimaryKeySchema("PK1", PrimaryKeyType.STRING)); + tableMeta.addPrimaryKeyColumn(new PrimaryKeySchema("PK2", PrimaryKeyType.INTEGER)); + tableMeta.addPrimaryKeyColumn(new PrimaryKeySchema("PK3", PrimaryKeyType.BINARY)); + tableMeta.addDefinedColumn(new DefinedColumnSchema("DC1", DefinedColumnType.STRING)); + tableMeta.addDefinedColumn(new DefinedColumnSchema("DC2", DefinedColumnType.INTEGER)); + tableMeta.addDefinedColumn(new DefinedColumnSchema("DC3", DefinedColumnType.BINARY)); + + int timeToLive = -1; + int maxVersions = 1; + + TableOptions tableOptions = new TableOptions(timeToLive, maxVersions); + + CreateTableRequest request = new CreateTableRequest(tableMeta, tableOptions); + + client.createTable(request); + } + + private List creatData(Integer start, Integer end) throws UnsupportedEncodingException { + List rowPutChanges = new ArrayList(); + for (Integer i = start; i < end; i++) { + PrimaryKeyBuilder primaryKeyBuilder = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + primaryKeyBuilder.addPrimaryKeyColumn("PK1", PrimaryKeyValue.fromString(i.toString())); + primaryKeyBuilder.addPrimaryKeyColumn("PK2", PrimaryKeyValue.fromLong(i)); + primaryKeyBuilder.addPrimaryKeyColumn("PK3", PrimaryKeyValue.fromBinary(i.toString().getBytes("UTF-8"))); + RowPutChange rowPutChange = new RowPutChange(tableName, primaryKeyBuilder.build()); + rowPutChange.addColumn("DC1", ColumnValue.fromString(i.toString())); + rowPutChange.addColumn("DC2", ColumnValue.fromLong(i)); + rowPutChange.addColumn("DC3", ColumnValue.fromBinary(i.toString().getBytes("UTF-8"))); + rowPutChanges.add(rowPutChange); + } + return rowPutChanges; + } + + private void putData(SyncClient client, List rowPutChanges) { + int from = 0; + while (from < rowPutChanges.size()) { + int to = from + 200 < rowPutChanges.size() ? from + 200 : rowPutChanges.size(); + List sub = rowPutChanges.subList(from, to); + BatchWriteRowRequest batchWriteRowRequest = new BatchWriteRowRequest(); + for (RowPutChange rowPutChange : sub) { + batchWriteRowRequest.addRowChange(rowPutChange); + } + client.batchWriteRow(batchWriteRowRequest); + from += 200; + } + } + + private static PrimaryKey getPK(int value) throws UnsupportedEncodingException { + PrimaryKeyBuilder pkBuilder = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + pkBuilder.addPrimaryKeyColumn("PK1", PrimaryKeyValue.fromString(new Integer(value).toString())); + pkBuilder.addPrimaryKeyColumn("PK2", PrimaryKeyValue.fromLong(value)); + pkBuilder.addPrimaryKeyColumn("PK3", PrimaryKeyValue.fromBinary(new Integer(value).toString().getBytes("UTF-8"))); + PrimaryKey pk = pkBuilder.build(); + return pk; + } + + private static List getPutRowChange(Integer start, Integer end) throws Exception { + List rowChanges = new ArrayList(); + for (Integer i = start; i < end; i++) { + RowPutChange rowChange = new RowPutChange(tableName, getPK(i)); + rowChange.addColumn(new Column("DC1", ColumnValue.fromString(i.toString()), System.currentTimeMillis())); + rowChange.addColumn(new Column("DC2", ColumnValue.fromLong(i))); + rowChange.addColumn(new Column("DC3", ColumnValue.fromBinary(i.toString().getBytes("UTF-8")))); + rowChange.setReturnType(ReturnType.RT_PK); + rowChanges.add(rowChange); + } + return rowChanges; + } + + private static List getUpDateRowChange(Integer start, Integer end) throws Exception { + List rowChanges = new ArrayList(); + for (Integer i = start; i < end; i++) { + RowUpdateChange rowChange = new RowUpdateChange(tableName, getPK(i)); + rowChange.put(new Column("DC4", ColumnValue.fromString(i.toString()))); + rowChange.put(new Column("DC5", ColumnValue.fromLong(i))); + rowChange.put(new Column("DC6", ColumnValue.fromBinary(i.toString().getBytes("UTF-8")))); + rowChange.setReturnType(ReturnType.RT_PK); + rowChanges.add(rowChange); + } + return rowChanges; + } + + private static List getDeleteRowChange(Integer start, Integer end) throws Exception { + List rowChanges = new ArrayList(); + for (Integer i = start; i < end; i++) { + RowDeleteChange rowChange = new RowDeleteChange(tableName, getPK(i)); + rowChange.setReturnType(ReturnType.RT_PK); + rowChanges.add(rowChange); + } + return rowChanges; + } + + private static GetRangeResponse getRange(SyncClient client, PrimaryKey startPk, PrimaryKey endPk) { + RangeRowQueryCriteria rangeRowQueryCriteria = new RangeRowQueryCriteria(tableName); + rangeRowQueryCriteria.setInclusiveStartPrimaryKey(startPk); + rangeRowQueryCriteria.setExclusiveEndPrimaryKey(endPk); + rangeRowQueryCriteria.setMaxVersions(1); + return client.getRange(new GetRangeRequest(rangeRowQueryCriteria)); + } + + @Test + public void testBase() throws Exception { + { + BulkImportRequest bulkImportRequest = new BulkImportRequest(tableName); + bulkImportRequest.addRowChanges(getPutRowChange(2000, 2010)); + bulkImportRequest.addRowChanges(getUpDateRowChange(2010, 2020)); + bulkImportRequest.addRowChanges(getDeleteRowChange(2020, 2030)); + + BulkImportResponse response = publicClient.bulkImport(bulkImportRequest); + assertEquals(36, response.getRequestId().length()); + assertEquals(30, response.getSucceedRows().size()); + assertEquals(0, response.getFailedRows().size()); + assertEquals(true, response.isAllSucceed()); + assertEquals(30, response.getSucceedRows().size()); + + int i = 2000; + for (BulkImportResponse.RowResult rr : response.getRowResults().subList(0, 10)) { + assertEquals(0, rr.getConsumedCapacity().getCapacityUnit().getReadCapacityUnit()); + assertEquals(0, rr.getConsumedCapacity().getCapacityUnit().getWriteCapacityUnit()); + assertEquals(0, rr.getConsumedCapacity().getCapacityDataSize().getReadCapacityDataSize()); + assertEquals(50, rr.getConsumedCapacity().getCapacityDataSize().getWriteCapacityDataSize()); + assertEquals(null, rr.getError()); + i++; + } + for (BulkImportResponse.RowResult rr : response.getRowResults().subList(10, 20)) { + assertEquals(0, rr.getConsumedCapacity().getCapacityUnit().getReadCapacityUnit()); + assertEquals(0, rr.getConsumedCapacity().getCapacityUnit().getWriteCapacityUnit()); + assertEquals(0, rr.getConsumedCapacity().getCapacityDataSize().getReadCapacityDataSize()); + assertEquals(50, rr.getConsumedCapacity().getCapacityDataSize().getWriteCapacityDataSize()); + assertEquals(null, rr.getError()); + i++; + } + for (BulkImportResponse.RowResult rr : response.getRowResults().subList(20, 30)) { + assertEquals(0, rr.getConsumedCapacity().getCapacityUnit().getReadCapacityUnit()); + assertEquals(0, rr.getConsumedCapacity().getCapacityUnit().getWriteCapacityUnit()); + assertEquals(0, rr.getConsumedCapacity().getCapacityDataSize().getReadCapacityDataSize()); + assertEquals(25, rr.getConsumedCapacity().getCapacityDataSize().getWriteCapacityDataSize()); + assertEquals(null, rr.getError()); + i++; + } + + GetRangeResponse getRangeResponse = getRange(publicClient, getPK(2000), getPK(2030)); + assertEquals(20, getRangeResponse.getRows().size()); + for (int y = 0; y < 10; y++) { + Row row = getRangeResponse.getRows().get(y); + int p = y + 2000; + assertEquals(getPK(p), row.getPrimaryKey()); + assertEquals(Integer.toString(p), row.getLatestColumn("DC1").getValue().asString()); + assertEquals(p, row.getLatestColumn("DC2").getValue().asLong()); + assertArrayEquals(Integer.toString(p).getBytes("UTF-8"), row.getLatestColumn("DC3").getValue().asBinary()); + assertEquals(null, row.getLatestColumn("DC4")); + assertEquals(null, row.getLatestColumn("DC5")); + assertEquals(null, row.getLatestColumn("DC6")); + } + for (int y = 10; y < 20; y++) { + Row row = getRangeResponse.getRows().get(y); + int p = y + 2000; + assertEquals(getPK(p), row.getPrimaryKey()); + assertEquals(null, row.getLatestColumn("DC1")); + assertEquals(null, row.getLatestColumn("DC2")); + assertEquals(null, row.getLatestColumn("DC3")); + assertEquals(Integer.toString(p), row.getLatestColumn("DC4").getValue().asString()); + assertEquals(p, row.getLatestColumn("DC5").getValue().asLong()); + assertArrayEquals(Integer.toString(p).getBytes("UTF-8"), row.getLatestColumn("DC6").getValue().asBinary()); + } + } + { + BulkImportRequest bulkImportRequest = new BulkImportRequest(tableName); + bulkImportRequest.addRowChanges(getPutRowChange(2000, 2010)); + bulkImportRequest.addRowChanges(getUpDateRowChange(2010, 2020)); + bulkImportRequest.addRowChanges(getDeleteRowChange(2020, 2030)); + + BulkImportResponse response = internalClient.bulkImport(bulkImportRequest); + assertEquals(36, response.getRequestId().length()); + assertEquals(30, response.getSucceedRows().size()); + assertEquals(0, response.getFailedRows().size()); + assertEquals(true, response.isAllSucceed()); + assertEquals(30, response.getSucceedRows().size()); + + int i = 2000; + for (BulkImportResponse.RowResult rr : response.getRowResults().subList(0, 10)) { + assertEquals(0, rr.getConsumedCapacity().getCapacityUnit().getReadCapacityUnit()); + assertEquals(0, rr.getConsumedCapacity().getCapacityUnit().getWriteCapacityUnit()); + assertEquals(0, rr.getConsumedCapacity().getCapacityDataSize().getReadCapacityDataSize()); + assertEquals(50, rr.getConsumedCapacity().getCapacityDataSize().getWriteCapacityDataSize()); + assertEquals(null, rr.getError()); + i++; + } + for (BulkImportResponse.RowResult rr : response.getRowResults().subList(10, 20)) { + assertEquals(0, rr.getConsumedCapacity().getCapacityUnit().getReadCapacityUnit()); + assertEquals(0, rr.getConsumedCapacity().getCapacityUnit().getWriteCapacityUnit()); + assertEquals(0, rr.getConsumedCapacity().getCapacityDataSize().getReadCapacityDataSize()); + assertEquals(50, rr.getConsumedCapacity().getCapacityDataSize().getWriteCapacityDataSize()); + assertEquals(null, rr.getError()); + i++; + } + for (BulkImportResponse.RowResult rr : response.getRowResults().subList(20, 30)) { + assertEquals(0, rr.getConsumedCapacity().getCapacityUnit().getReadCapacityUnit()); + assertEquals(0, rr.getConsumedCapacity().getCapacityUnit().getWriteCapacityUnit()); + assertEquals(0, rr.getConsumedCapacity().getCapacityDataSize().getReadCapacityDataSize()); + assertEquals(25, rr.getConsumedCapacity().getCapacityDataSize().getWriteCapacityDataSize()); + assertEquals(null, rr.getError()); + i++; + } + + GetRangeResponse getRangeResponse = getRange(publicClient, getPK(2000), getPK(2030)); + assertEquals(20, getRangeResponse.getRows().size()); + for (int y = 0; y < 10; y++) { + Row row = getRangeResponse.getRows().get(y); + int p = y + 2000; + assertEquals(getPK(p), row.getPrimaryKey()); + assertEquals(Integer.toString(p), row.getLatestColumn("DC1").getValue().asString()); + assertEquals(p, row.getLatestColumn("DC2").getValue().asLong()); + assertArrayEquals(Integer.toString(p).getBytes("UTF-8"), row.getLatestColumn("DC3").getValue().asBinary()); + assertEquals(null, row.getLatestColumn("DC4")); + assertEquals(null, row.getLatestColumn("DC5")); + assertEquals(null, row.getLatestColumn("DC6")); + } + for (int y = 10; y < 20; y++) { + Row row = getRangeResponse.getRows().get(y); + int p = y + 2000; + assertEquals(getPK(p), row.getPrimaryKey()); + assertEquals(null, row.getLatestColumn("DC1")); + assertEquals(null, row.getLatestColumn("DC2")); + assertEquals(null, row.getLatestColumn("DC3")); + assertEquals(Integer.toString(p), row.getLatestColumn("DC4").getValue().asString()); + assertEquals(p, row.getLatestColumn("DC5").getValue().asLong()); + assertArrayEquals(Integer.toString(p).getBytes("UTF-8"), row.getLatestColumn("DC6").getValue().asBinary()); + } + } + } + + @Test + public void testInvalidParam() throws Exception { + // no param + { + BulkImportRequest bulkImportRequest = new BulkImportRequest(tableName); + try { + publicClient.bulkImport(bulkImportRequest); + fail(); + } catch (TableStoreException e) { + assertEquals(String.format("No operation is specified for table: '%s'.", tableName), e.getMessage()); + } + } + // error table + { + try { + new BulkImportRequest(""); + fail(); + } catch (IllegalArgumentException e) { + assertEquals("The name of table should not be null or empty.", e.getMessage()); + } + } + { + PrimaryKeyBuilder pkBuilder = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + pkBuilder.addPrimaryKeyColumn("PK1", PrimaryKeyValue.fromString(new Integer(0).toString())); + pkBuilder.addPrimaryKeyColumn("PK2", PrimaryKeyValue.fromLong(0)); + pkBuilder.addPrimaryKeyColumn("PK3", PrimaryKeyValue.fromBinary(new Integer(0).toString().getBytes("UTF-8"))); + PrimaryKey pk = pkBuilder.build(); + + RowPutChange rowChange = new RowPutChange(tableName, pk); + rowChange.addColumn(new Column("DC1", ColumnValue.fromString(""), System.currentTimeMillis())); + rowChange.addColumn(new Column("DC2", ColumnValue.fromLong(0))); + rowChange.addColumn(new Column("DC3", ColumnValue.fromBinary("0".getBytes("UTF-8")))); + rowChange.setReturnType(ReturnType.RT_PK); + + BulkImportRequest bulkImportRequest = new BulkImportRequest( tableName+ "abcdefg"); + bulkImportRequest.addRowChange(rowChange); + + BulkImportResponse response = publicClient.bulkImport(bulkImportRequest); + assertEquals(false, response.isAllSucceed()); + assertEquals(1, response.getFailedRows().size()); + + BulkImportResponse.RowResult result = response.getFailedRows().get(0); + assertEquals(ErrorCode.OBJECT_NOT_EXIST, result.getError().getCode()); + assertEquals("Requested table does not exist.", result.getError().getMessage()); + } + // error pk + { + PrimaryKeyBuilder pkBuilder = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + pkBuilder.addPrimaryKeyColumn("PK1", PrimaryKeyValue.fromString(new Integer(0).toString())); + pkBuilder.addPrimaryKeyColumn("PK2", PrimaryKeyValue.fromString(new Integer(0).toString())); + pkBuilder.addPrimaryKeyColumn("PK3", PrimaryKeyValue.fromBinary(new Integer(0).toString().getBytes("UTF-8"))); + PrimaryKey pk = pkBuilder.build(); + + RowPutChange rowChange = new RowPutChange(tableName, pk); + rowChange.addColumn(new Column("DC1", ColumnValue.fromString(""), System.currentTimeMillis())); + rowChange.addColumn(new Column("DC2", ColumnValue.fromLong(0))); + rowChange.addColumn(new Column("DC3", ColumnValue.fromBinary("0".getBytes("UTF-8")))); + rowChange.setReturnType(ReturnType.RT_PK); + + BulkImportRequest bulkImportRequest = new BulkImportRequest(tableName); + bulkImportRequest.addRowChange(rowChange); + + BulkImportResponse response = publicClient.bulkImport(bulkImportRequest); + assertEquals(false, response.isAllSucceed()); + assertEquals(1, response.getFailedRows().size()); + + BulkImportResponse.RowResult result = response.getFailedRows().get(0); + assertEquals(ErrorCode.INVALID_PK, result.getError().getCode()); + assertEquals("Validate PK type fail. Input: VT_STRING, Meta: VT_INTEGER.", result.getError().getMessage()); + } + { + PrimaryKeyBuilder pkBuilder = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + pkBuilder.addPrimaryKeyColumn("PK1", PrimaryKeyValue.fromString(new Integer(0).toString())); + pkBuilder.addPrimaryKeyColumn("PK2", PrimaryKeyValue.fromLong(0)); + pkBuilder.addPrimaryKeyColumn("PK3", PrimaryKeyValue.fromBinary(new Integer(0).toString().getBytes("UTF-8"))); + PrimaryKey pk = pkBuilder.build(); + + RowPutChange rowChange = new RowPutChange(tableName, pk); + rowChange.addColumn(new Column("DC1", ColumnValue.fromString(""), System.currentTimeMillis())); + rowChange.addColumn(new Column("DC2", ColumnValue.fromLong(0))); + rowChange.addColumn(new Column("DC2", ColumnValue.fromBinary("0".getBytes("UTF-8")))); + rowChange.setReturnType(ReturnType.RT_PK); + + BulkImportRequest bulkImportRequest = new BulkImportRequest( tableName); + bulkImportRequest.addRowChange(rowChange); + + BulkImportResponse response = publicClient.bulkImport(bulkImportRequest); + assertEquals(false, response.isAllSucceed()); + assertEquals(1, response.getFailedRows().size()); + + BulkImportResponse.RowResult result = response.getFailedRows().get(0); + assertEquals(ErrorCode.INVALID_PARAMETER, result.getError().getCode()); + assertEquals("Invalid column type for column DC2 expect VT_INTEGER actual VT_BLOB", result.getError().getMessage()); + } + } + + @Test + public void testLimit() throws Exception { + { + BulkImportRequest bulkImportRequest = new BulkImportRequest(tableName); + bulkImportRequest.addRowChanges(getPutRowChange(2000, 2100)); + bulkImportRequest.addRowChanges(getUpDateRowChange(2100, 2150)); + bulkImportRequest.addRowChanges(getDeleteRowChange(2150, 2200)); + + BulkImportResponse response = publicClient.bulkImport(bulkImportRequest); + assertEquals(true, response.isAllSucceed()); + } + { + BulkImportRequest bulkImportRequest = new BulkImportRequest(tableName); + bulkImportRequest.addRowChanges(getPutRowChange(2000, 2100)); + bulkImportRequest.addRowChanges(getUpDateRowChange(2100, 2150)); + bulkImportRequest.addRowChanges(getDeleteRowChange(2150, 2201)); + + try { + publicClient.bulkImport(bulkImportRequest); + fail(); + } catch (TableStoreException e) { + assertEquals(ErrorCode.INVALID_PARAMETER, e.getErrorCode()); + assertEquals("Rows count exceeds the upper limit: 200.", e.getMessage()); + } + } + } +} diff --git a/src/test/java/com/alicloud/openservices/tablestore/functiontest/TestComputeSplitPointsBySize.java b/src/test/java/com/alicloud/openservices/tablestore/functiontest/TestComputeSplitPointsBySize.java new file mode 100644 index 0000000..6a1cae3 --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/functiontest/TestComputeSplitPointsBySize.java @@ -0,0 +1,250 @@ +package com.alicloud.openservices.tablestore.functiontest; + +import com.alicloud.openservices.tablestore.SyncClient; +import com.alicloud.openservices.tablestore.TableStoreException; +import com.alicloud.openservices.tablestore.common.ServiceSettings; +import com.alicloud.openservices.tablestore.core.ErrorCode; +import com.alicloud.openservices.tablestore.model.*; +import org.junit.*; + +import java.util.concurrent.TimeUnit; + +public class TestComputeSplitPointsBySize { + static String tableName = "YSTestComputeSplit"; + static SyncClient publicClient = null; + + static PrimaryKey lowerBound = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("PK1", PrimaryKeyValue.INF_MIN) + .addPrimaryKeyColumn("PK2", PrimaryKeyValue.INF_MIN).build(); + + static PrimaryKey upperBound = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("PK1", PrimaryKeyValue.INF_MAX) + .addPrimaryKeyColumn("PK2", PrimaryKeyValue.INF_MAX).build(); + + @BeforeClass + public static void beforeClass() { + ServiceSettings settings = ServiceSettings.load(); + final String endPoint = settings.getOTSEndpoint(); + final String accessId = settings.getOTSAccessKeyId(); + final String accessKey = settings.getOTSAccessKeySecret(); + final String publicInstanceName = settings.getOTSInstanceName(); + + publicClient = new SyncClient(endPoint, accessId, accessKey, publicInstanceName); + } + + @AfterClass + public static void afterClass() { + publicClient.shutdown(); + } + + @Before + public void setUp() throws Exception { + try { + deleteTable(publicClient); + } catch (TableStoreException e) { + if (!e.getErrorCode().equals(ErrorCode.OBJECT_NOT_EXIST)) { + throw e; + } + } + + creatTable(publicClient); + + Thread.sleep(TimeUnit.SECONDS.toMillis(5)); + } + + private void deleteTable(SyncClient client) { + DeleteTableRequest request = new DeleteTableRequest(tableName); + client.deleteTable(request); + } + + private void creatTable(SyncClient client) { + TableMeta tableMeta = new TableMeta(tableName); + tableMeta.addPrimaryKeyColumn(new PrimaryKeySchema("PK1", PrimaryKeyType.STRING)); + tableMeta.addPrimaryKeyColumn(new PrimaryKeySchema("PK2", PrimaryKeyType.INTEGER)); + + int timeToLive = -1; + int maxVersions = 1; + + TableOptions tableOptions = new TableOptions(timeToLive, maxVersions); + + CreateTableRequest request = new CreateTableRequest(tableMeta, tableOptions); + + client.createTable(request); + } + + /** + * 注意:如果要保证Case正常运行 + * 1. 需要在OTSServer将sqlonline_ots_MaxSplitPointNum 设置为10 + * 2. 需要在OTSServer将sqlonline_ots_MinSplitSizeUnitInBytes设置为100 + */ + @Test + public void testBase() { + { + for (int i = 0; i < 1000; i++) { + PrimaryKey pk = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("PK1", PrimaryKeyValue.fromString(String.format("%05d", i))) + .addPrimaryKeyColumn("PK2", PrimaryKeyValue.fromLong(i)).build(); + RowPutChange rowChange = new RowPutChange(tableName); + rowChange.setPrimaryKey(pk); + rowChange.addColumn("attr0", ColumnValue.fromString("Hello")); + rowChange.addColumn("attr1", ColumnValue.fromString("Hello")); + rowChange.addColumn("attr2", ColumnValue.fromString("Hello")); + rowChange.addColumn("attr3", ColumnValue.fromString("Hello")); + rowChange.addColumn("attr4", ColumnValue.fromString("Hello")); + PutRowRequest request = new PutRowRequest(rowChange); + publicClient.putRow(request); + } + } + + { + ComputeSplitsBySizeRequest computeSplitsBySizeRequest = new ComputeSplitsBySizeRequest(); + computeSplitsBySizeRequest.setTableName(tableName); + computeSplitsBySizeRequest.setSplitSizeInByte(1, 100 * 1024 * 1024); // 1KB + ComputeSplitsBySizeResponse response = publicClient.computeSplitsBySize(computeSplitsBySizeRequest); + Assert.assertEquals(1, response.getSplits().size()); + Assert.assertEquals(1, response.getConsumedCapacity().getCapacityUnit().getReadCapacityUnit()); + Assert.assertEquals(0, response.getConsumedCapacity().getCapacityUnit().getWriteCapacityUnit()); + } + } + + @Test + public void testEmptyTable() { + { + ComputeSplitsBySizeRequest computeSplitsBySizeRequest = new ComputeSplitsBySizeRequest(); + computeSplitsBySizeRequest.setTableName(tableName); + computeSplitsBySizeRequest.setSplitSizeIn100MB(1); + ComputeSplitsBySizeResponse response = publicClient.computeSplitsBySize(computeSplitsBySizeRequest); + Assert.assertEquals(1, response.getSplits().size()); + Assert.assertEquals(1, response.getConsumedCapacity().getCapacityUnit().getReadCapacityUnit()); + Assert.assertEquals(0, response.getConsumedCapacity().getCapacityUnit().getWriteCapacityUnit()); + + Split split = response.getSplits().get(0); + Assert.assertEquals(32, split.getLocation().length()); + Assert.assertEquals(lowerBound, split.getLowerBound()); + Assert.assertEquals(upperBound, split.getUpperBound()); + } + { + ComputeSplitsBySizeRequest computeSplitsBySizeRequest = new ComputeSplitsBySizeRequest(); + computeSplitsBySizeRequest.setTableName(tableName); + computeSplitsBySizeRequest.setSplitSizeIn100MB(1000); + computeSplitsBySizeRequest.setSplitPointLimit(1); + ComputeSplitsBySizeResponse response = publicClient.computeSplitsBySize(computeSplitsBySizeRequest); + Assert.assertEquals(1, response.getSplits().size()); + Assert.assertEquals(1, response.getConsumedCapacity().getCapacityUnit().getReadCapacityUnit()); + Assert.assertEquals(0, response.getConsumedCapacity().getCapacityUnit().getWriteCapacityUnit()); + + Split split = response.getSplits().get(0); + Assert.assertEquals(32, split.getLocation().length()); + Assert.assertEquals(lowerBound, split.getLowerBound()); + Assert.assertEquals(upperBound, split.getUpperBound()); + } + } + + /** + * 注意:如果要保证Case正常运行 + * 1. 需要在OTSServer将sqlonline_ots_MaxSplitPointNum 设置为10 + * 2. 需要在OTSServer将sqlonline_ots_MinSplitSizeUnitInBytes设置为100 + */ + @Test @Ignore + public void testTouchLimit() { + { + String v = String.format("%01000d", 100); + for (int i = 0; i < 50000; i++) { + PrimaryKey pk = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("PK1", PrimaryKeyValue.fromString(String.format("%05d", i))) + .addPrimaryKeyColumn("PK2", PrimaryKeyValue.fromLong(i)).build(); + RowPutChange rowChange = new RowPutChange(tableName); + rowChange.setPrimaryKey(pk); + rowChange.addColumn("attr0", ColumnValue.fromString(v)); + rowChange.addColumn("attr1", ColumnValue.fromString(v)); + rowChange.addColumn("attr2", ColumnValue.fromString(v)); + rowChange.addColumn("attr3", ColumnValue.fromString(v)); + rowChange.addColumn("attr4", ColumnValue.fromString(v)); + PutRowRequest request = new PutRowRequest(rowChange); + publicClient.putRow(request); + } + } + + { + ComputeSplitsBySizeRequest computeSplitsBySizeRequest = new ComputeSplitsBySizeRequest(); + computeSplitsBySizeRequest.setTableName(tableName); + computeSplitsBySizeRequest.setSplitSizeInByte(1, 1024 * 1024); // 1MB + computeSplitsBySizeRequest.setSplitPointLimit(2); + ComputeSplitsBySizeResponse response = publicClient.computeSplitsBySize(computeSplitsBySizeRequest); + Assert.assertEquals(3, response.getSplits().size()); + Assert.assertEquals(4, response.getConsumedCapacity().getCapacityUnit().getReadCapacityUnit()); + Assert.assertEquals(0, response.getConsumedCapacity().getCapacityUnit().getWriteCapacityUnit()); + + PrimaryKey p1 = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("PK1", PrimaryKeyValue.fromString("27908\u0000")) + .addPrimaryKeyColumn("PK2", PrimaryKeyValue.INF_MIN).build(); + + PrimaryKey p2 = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("PK1", PrimaryKeyValue.fromString("41420\u0000")) + .addPrimaryKeyColumn("PK2", PrimaryKeyValue.INF_MIN).build(); + + Assert.assertEquals(32, response.getSplits().get(0).getLocation().length()); + Assert.assertEquals(lowerBound, response.getSplits().get(0).getLowerBound()); + Assert.assertEquals(p1, response.getSplits().get(0).getUpperBound()); + Assert.assertEquals(32, response.getSplits().get(1).getLocation().length()); + Assert.assertEquals(p1, response.getSplits().get(1).getLowerBound()); + Assert.assertEquals(p2, response.getSplits().get(1).getUpperBound()); + Assert.assertEquals(32, response.getSplits().get(2).getLocation().length()); + Assert.assertEquals(p2, response.getSplits().get(2).getLowerBound()); + Assert.assertEquals(upperBound, response.getSplits().get(2).getUpperBound()); + } + } + + @Test + public void testInvalidParam() { + { + ComputeSplitsBySizeRequest computeSplitsBySizeRequest = new ComputeSplitsBySizeRequest(); + computeSplitsBySizeRequest.setTableName(""); + computeSplitsBySizeRequest.setSplitSizeIn100MB(1); + try { + publicClient.computeSplitsBySize(computeSplitsBySizeRequest); + Assert.fail(); + } catch (IllegalArgumentException e) { + Assert.assertEquals("The table name for ComputeSplitsBySize should not be null or empty.", e.getMessage()); + } + + } + { + ComputeSplitsBySizeRequest computeSplitsBySizeRequest = new ComputeSplitsBySizeRequest(); + computeSplitsBySizeRequest.setTableName(tableName); + computeSplitsBySizeRequest.setSplitSizeIn100MB(0); + try { + publicClient.computeSplitsBySize(computeSplitsBySizeRequest); + Assert.fail(); + } catch (TableStoreException e) { + Assert.assertEquals(ErrorCode.INVALID_PARAMETER, e.getErrorCode()); + Assert.assertEquals("The split_size should be greater than 0.", e.getMessage()); + } + } + { + ComputeSplitsBySizeRequest computeSplitsBySizeRequest = new ComputeSplitsBySizeRequest(); + computeSplitsBySizeRequest.setTableName(tableName); + computeSplitsBySizeRequest.setSplitSizeInByte(0, 100 * 1024 * 1024); + try { + publicClient.computeSplitsBySize(computeSplitsBySizeRequest); + Assert.fail(); + } catch (TableStoreException e) { + Assert.assertEquals(ErrorCode.INVALID_PARAMETER, e.getErrorCode()); + Assert.assertEquals("The split_size should be greater than 0.", e.getMessage()); + } + } + { + ComputeSplitsBySizeRequest computeSplitsBySizeRequest = new ComputeSplitsBySizeRequest(); + computeSplitsBySizeRequest.setTableName(tableName); + computeSplitsBySizeRequest.setSplitSizeInByte(1000, 0); + try { + publicClient.computeSplitsBySize(computeSplitsBySizeRequest); + Assert.fail(); + } catch (TableStoreException e) { + Assert.assertEquals(ErrorCode.INVALID_PARAMETER, e.getErrorCode()); + // fir + Assert.assertEquals("The split_size_unit_in_byte should be greater equal than: 1048576", e.getMessage()); + } + } + } +} diff --git a/src/test/java/com/alicloud/openservices/tablestore/functiontest/TestComputeSplitsBySize.java b/src/test/java/com/alicloud/openservices/tablestore/functiontest/TestComputeSplitsBySize.java index 9ffef9e..3dff693 100644 --- a/src/test/java/com/alicloud/openservices/tablestore/functiontest/TestComputeSplitsBySize.java +++ b/src/test/java/com/alicloud/openservices/tablestore/functiontest/TestComputeSplitsBySize.java @@ -1,9 +1,5 @@ package com.alicloud.openservices.tablestore.functiontest; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - import java.util.ArrayList; import java.util.List; import java.util.concurrent.ExecutorService; @@ -11,8 +7,9 @@ import com.alicloud.openservices.tablestore.*; import com.alicloud.openservices.tablestore.common.ServiceSettings; +import com.alicloud.openservices.tablestore.core.ErrorCode; import com.alicloud.openservices.tablestore.writer.WriterConfig; -import org.junit.Test; +import org.junit.*; import com.alicloud.openservices.tablestore.model.BatchWriteRowRequest; import com.alicloud.openservices.tablestore.model.CapacityUnit; @@ -36,19 +33,44 @@ import com.alicloud.openservices.tablestore.model.TableMeta; import com.alicloud.openservices.tablestore.model.TableOptions; +import static org.junit.Assert.*; + public class TestComputeSplitsBySize { - + private long sleepTime = 5l * 1000l; - private SyncClient getClient() { + static SyncClient internalClient = null; + static SyncClient publicClient = null; + + @Before + public void before() { ServiceSettings settings = ServiceSettings.load(); - return new SyncClient(settings.getOTSEndpoint(), settings.getOTSAccessKeyId(), settings.getOTSAccessKeySecret(), settings.getOTSInstanceName()); + final String endPoint = settings.getOTSEndpoint(); + final String accessId = settings.getOTSAccessKeyId(); + final String accessKey = settings.getOTSAccessKeySecret(); + final String publicInstanceName = settings.getOTSInstanceName(); + final String internalInstanceName = settings.getOTSInstanceNameInternal(); + internalClient = new SyncClient(endPoint, accessId, accessKey, internalInstanceName); + publicClient = new SyncClient(endPoint, accessId, accessKey, publicInstanceName); + } + @After + public void after() { + internalClient.shutdown(); + publicClient.shutdown(); } - + /** - * 测试目的:验证ComputeSplitsBySize功能可以正常地将表格中的数据划分为多个数据块。 - * 测试内容:调用ComputeSplitsBySize接口获得该表格的数据分块,并检查所返回的数据中分块数目大于1。 - * @throws InterruptedException + * 测试目的:1) 验证ComputeSplitsBySize功能可以正常地将表格中的数据划分为多个数据块。 + * 2) 验证ComputeSplitsBySize功能SplitLimit参数是否可以正确限制Split返回个数。 + * 测试内容:1)调用ComputeSplitsBySize接口获得该表格的数据分块,并检查所返回的数据中分块数目大于1。 + * 2)不限制SplitPointLimit获取Split个数,然后设置SplitPointLimit后再次获取Split,并检测返回Split个数是否符合预期: + * A、 0 << SplitPointLimit = 9 << Split.size(); + * B、 SplitPointLimit = 1; + * C、 SplitPointLimit = Split.size() - 1; + * D、 SplitPointLimit = Split.size() ; + * E、 SplitPointLimit = Split.size() - 2; + * F、 SplitPointLimit = 0, -1。 + * @throws InterruptedException */ @Test public void testComputeSplitsBySize() throws InterruptedException { @@ -62,7 +84,7 @@ public void testComputeSplitsBySize() throws InterruptedException { int defaultCuRead = 0; int defaultCuWrite = 0; - SyncClient client = getClient(); + SyncClient client = publicClient; WriterConfig config = new WriterConfig(); // Creating testing data @@ -83,47 +105,53 @@ public void testComputeSplitsBySize() throws InterruptedException { CreateTableRequest ctr = new CreateTableRequest(tm, to, rtp); client.createTable(ctr); Thread.sleep(sleepTime); - } - TableStoreWriter writer = new DefaultTableStoreWriter(client.asAsyncClient(), tableName, config, null, Executors.newFixedThreadPool(3)); - long startTime = System.currentTimeMillis(); - int bn = 0; - for (int i = 0; i < 100000; i++) { - RowPutChange brpc = new RowPutChange(tableName); - List pkcl = new ArrayList(); - for (int j = 0; j < maxNumberPrimaryKeysEachRow; ++j) { - String ss = primaryKeyPrefix + j; - pkcl.add(new PrimaryKeyColumn(ss, PrimaryKeyValue.fromString(ss + "_" + i + "_" + bn))); + TableStoreWriter writer = new DefaultTableStoreWriter(client.asAsyncClient(), tableName, config, null, Executors.newFixedThreadPool(3)); + long startTime = System.currentTimeMillis(); + int bn = 0; + for (int i = 0; i < 100000; i++) { + RowPutChange brpc = new RowPutChange(tableName); + List pkcl = new ArrayList(); + for (int j = 0; j < maxNumberPrimaryKeysEachRow; ++j) { + String ss = primaryKeyPrefix + j; + pkcl.add(new PrimaryKeyColumn(ss, PrimaryKeyValue.fromString(ss + "_" + i + "_" + bn))); + } + PrimaryKey bwpk = new PrimaryKey(pkcl); + brpc.setPrimaryKey(bwpk); + for (int k = 0; k < maxNumberColumnsEachRow; ++k) { + String ss = columnNamePrefix + k; + brpc.addColumn(ss, ColumnValue.fromString(ss)); + } + writer.addRowChange(brpc); } - PrimaryKey bwpk = new PrimaryKey(pkcl); - brpc.setPrimaryKey(bwpk); - for (int k = 0; k < maxNumberColumnsEachRow; ++k) { - String ss = columnNamePrefix + k; - brpc.addColumn(ss, ColumnValue.fromString(ss)); - } - writer.addRowChange(brpc); - } - writer.flush(); + writer.flush(); + } - // ComputeSplitsBySize operation - long splitSize = 1l; + /** + * 1) 验证ComputeSplitsBySize功能可以正常地将表格中的数据划分为多个数据块。 + */ + long splitSize = 1; ComputeSplitsBySizeRequest csbsr = new ComputeSplitsBySizeRequest(); csbsr.setTableName(tableName); - csbsr.setSplitSizeIn100MB(splitSize); + csbsr.setSplitSizeInByte(1, 1024 * 1024); ComputeSplitsBySizeResponse csbsrr = null; try { csbsrr = client.computeSplitsBySize(csbsr); } catch( ClientException ce ) { ce.printStackTrace(); fail(); - } + } // To check and print the response. assertTrue(csbsrr.getSplits().size() > 0); for (Split split : csbsrr.getSplits()) { assertNotNull(split.getLocation()); assertTrue(!split.getLocation().equals("")); + + System.out.println(split.getLowerBound().toString()); + System.out.println(split.getUpperBound().toString()); + System.out.println(split.getLocation()); } GetRangeRequest grr = new GetRangeRequest(); @@ -150,16 +178,154 @@ public void testComputeSplitsBySize() throws InterruptedException { ce.printStackTrace(); fail(); } + assertTrue(String.format("%d", grrs.getRows().size()), grrs.getRows().size() > 0); + + /** + * 2) 验证ComputeSplitsBySize功能SplitLimit参数是否可以正确限制Split返回个数。 + */ + { + // A、 0 << SplitPointLimit = 9 << Split.size(); + ComputeSplitsBySizeRequest csbsrLimit = new ComputeSplitsBySizeRequest(); + csbsrLimit.setTableName(tableName); + csbsrLimit.setSplitSizeInByte(1, 1024 * 1024); + csbsrLimit.setSplitPointLimit(2); + ComputeSplitsBySizeResponse csbsrrLimit = null; + try { + csbsrrLimit = client.computeSplitsBySize(csbsrLimit); + } catch (ClientException ce) { + ce.printStackTrace(); + fail(); + } + + // To check and print the response. + + assertEquals(3, csbsrrLimit.getSplits().size()); + for (Split split : csbsrr.getSplits()) { + assertNotNull(split.getLocation()); + assertTrue(!split.getLocation().equals("")); + } + } + + { + // B、 SplitPointLimit = 1; + ComputeSplitsBySizeRequest csbsrLimit = new ComputeSplitsBySizeRequest(); + csbsrLimit.setTableName(tableName); + csbsrLimit.setSplitSizeInByte(1, 1024 * 1024); + csbsrLimit.setSplitPointLimit(1); + ComputeSplitsBySizeResponse csbsrrLimit = null; + try { + csbsrrLimit = client.computeSplitsBySize(csbsrLimit); + } catch (ClientException ce) { + ce.printStackTrace(); + fail(); + } + + // To check and print the response. + assertEquals(2, csbsrrLimit.getSplits().size()); + for (Split split : csbsrr.getSplits()) { + assertNotNull(split.getLocation()); + assertTrue(!split.getLocation().equals("")); + } + } + + { + // C、 SplitPointLimit = Split.size() - 1; + ComputeSplitsBySizeRequest csbsrLimit = new ComputeSplitsBySizeRequest(); + csbsrLimit.setTableName(tableName); + csbsrLimit.setSplitSizeInByte(1, 1024 * 1024); + csbsrLimit.setSplitPointLimit(csbsrr.getSplits().size() - 1); + ComputeSplitsBySizeResponse csbsrrLimit = null; + try { + csbsrrLimit = client.computeSplitsBySize(csbsrLimit); + } catch (ClientException ce) { + ce.printStackTrace(); + fail(); + } + + // To check and print the response. + assertEquals(csbsrr.getSplits().size(), csbsrrLimit.getSplits().size()); + for (Split split : csbsrr.getSplits()) { + assertNotNull(split.getLocation()); + assertTrue(!split.getLocation().equals("")); + } + } + + { + // D、 SplitPointLimit = Split.size(); + ComputeSplitsBySizeRequest csbsrLimit = new ComputeSplitsBySizeRequest(); + csbsrLimit.setTableName(tableName); + csbsrLimit.setSplitSizeInByte(1, 1024 * 1024); + csbsrLimit.setSplitPointLimit(csbsrr.getSplits().size()); + ComputeSplitsBySizeResponse csbsrrLimit = null; + try { + csbsrrLimit = client.computeSplitsBySize(csbsrLimit); + } catch (ClientException ce) { + ce.printStackTrace(); + fail(); + } + + // To check and print the response. + assertEquals(csbsrr.getSplits().size(), csbsrrLimit.getSplits().size()); + for (Split split : csbsrr.getSplits()) { + assertNotNull(split.getLocation()); + assertTrue(!split.getLocation().equals("")); + } + } + + { + // E、 SplitPointLimit = Split.size() - 2; + ComputeSplitsBySizeRequest csbsrLimit = new ComputeSplitsBySizeRequest(); + csbsrLimit.setTableName(tableName); + csbsrLimit.setSplitSizeInByte(1, 1024 * 1024); + csbsrLimit.setSplitPointLimit(csbsrr.getSplits().size() - 2); + ComputeSplitsBySizeResponse csbsrrLimit = null; + try { + csbsrrLimit = client.computeSplitsBySize(csbsrLimit); + } catch (ClientException ce) { + ce.printStackTrace(); + fail(); + } + + // To check and print the response. + assertEquals(csbsrr.getSplits().size() - 1, csbsrrLimit.getSplits().size()); + for (Split split : csbsrr.getSplits()) { + assertNotNull(split.getLocation()); + assertTrue(!split.getLocation().equals("")); + } + } + + { + //F、 SplitPointLimit = 0, -1。 + ComputeSplitsBySizeRequest csbsrLimit = new ComputeSplitsBySizeRequest(); + csbsrLimit.setTableName(tableName); + csbsrLimit.setSplitSizeInByte(1, 1024 * 1024); + + // SplitPointLimit = 0 + try { + csbsrLimit.setSplitPointLimit(0); + fail(); + } catch (IllegalArgumentException e){ + assertEquals("The value of SplitPointLimit must be greater than 0.", e.getMessage()); + } + + // SplitPointLimit = -1 + try { + csbsrLimit.setSplitPointLimit(-1); + fail(); + } catch (IllegalArgumentException e){ + assertEquals("The value of SplitPointLimit must be greater than 0.", e.getMessage()); + } + + } - assertTrue(grrs.getRows().size() > 0); client.shutdown(); } - + /** * 测试目的:验证ComputeSplitsBySize功能可以正常地在空表格中进行操作。 * 测试内容:调用ComputeSplitsBySize接口获得该表格的数据分块,并检查所返回的数据中分块数目等于1因为表格中没有数据。 - * @throws InterruptedException + * @throws InterruptedException */ @Test public void testComputeSplitsBySizeRequestWithEmptyDataSet() throws InterruptedException { @@ -170,7 +336,7 @@ public void testComputeSplitsBySizeRequestWithEmptyDataSet() throws InterruptedE int maxNumberPrimaryKeysEachRow = 4; int defaultCuRead = 0; int defaultCuWrite = 0; - SyncClient client = getClient(); + SyncClient client = publicClient; // Creating empty table ListTableResponse ltr = client.listTable(); @@ -217,18 +383,18 @@ public void testComputeSplitsBySizeRequestWithEmptyDataSet() throws InterruptedE client.shutdown(); } - + /** * 测试目的:验证ComputeSplitsBySize功能在访问不存在的表格的时候会报出异常。 * 测试内容:调用ComputeSplitsBySize接口在访问不存在的表格的时候会报出异常,且异常信息中会包含表格存在的错误异常信息。 - * @throws InterruptedException + * @throws InterruptedException */ @Test public void testComputeSplitsBySizeRequestWithNotExistedTable() throws InterruptedException { // Testing configuration String tableName = "testtargettable3"; - SyncClient client = getClient(); + SyncClient client = publicClient; // Creating empty table ListTableResponse ltr = client.listTable(); @@ -239,7 +405,7 @@ public void testComputeSplitsBySizeRequestWithNotExistedTable() throws Interrupt Thread.sleep(sleepTime); } } - + long splitSize = 1l; ComputeSplitsBySizeRequest csbsr = new ComputeSplitsBySizeRequest(); csbsr.setTableName(tableName); @@ -251,9 +417,9 @@ public void testComputeSplitsBySizeRequestWithNotExistedTable() throws Interrupt if ( !tse.getMessage().contains("Requested table does not exist.") ) { fail(); } - } + } } - + @Test public void testComputeSplitsBySizeRequestWithNegativeSplitSize() throws InterruptedException { // Testing configuration @@ -262,7 +428,7 @@ public void testComputeSplitsBySizeRequestWithNegativeSplitSize() throws Interru int maxNumberPrimaryKeysEachRow = 4; int defaultCuRead = 0; int defaultCuWrite = 0; - SyncClient client = getClient(); + SyncClient client = publicClient; // Creating empty table ListTableResponse ltr = client.listTable(); @@ -284,7 +450,7 @@ public void testComputeSplitsBySizeRequestWithNegativeSplitSize() throws Interru client.createTable(ctr); Thread.sleep(sleepTime); } - + long splitSize = -1l; ComputeSplitsBySizeRequest csbsr = new ComputeSplitsBySizeRequest(); csbsr.setTableName(tableName); @@ -293,9 +459,8 @@ public void testComputeSplitsBySizeRequestWithNegativeSplitSize() throws Interru client.computeSplitsBySize(csbsr); fail(); } catch( TableStoreException tse ) { - if ( !tse.getMessage().contains("split_size_in_MB is not positive") ) { - fail(); - } + assertEquals(ErrorCode.INVALID_PARAMETER, tse.getErrorCode()); + assertEquals("The split_size should be greater than 0.", tse.getMessage()); } } diff --git a/src/test/java/com/alicloud/openservices/tablestore/functiontest/TestCreateTableExFunciton.java b/src/test/java/com/alicloud/openservices/tablestore/functiontest/TestCreateTableExFunciton.java new file mode 100644 index 0000000..bca89b5 --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/functiontest/TestCreateTableExFunciton.java @@ -0,0 +1,196 @@ +package com.alicloud.openservices.tablestore.functiontest; + +import com.alicloud.openservices.tablestore.InternalClient; +import com.alicloud.openservices.tablestore.TableStoreException; +import com.alicloud.openservices.tablestore.common.ServiceSettings; +import com.alicloud.openservices.tablestore.core.ErrorCode; +import com.alicloud.openservices.tablestore.model.CreateTableRequest; +import com.alicloud.openservices.tablestore.model.CreateTableRequestEx; +import com.alicloud.openservices.tablestore.model.CreateTableResponse; +import com.alicloud.openservices.tablestore.model.DeleteTableRequest; +import com.alicloud.openservices.tablestore.model.DeleteTableResponse; +import com.alicloud.openservices.tablestore.model.DescribeTableRequest; +import com.alicloud.openservices.tablestore.model.DescribeTableResponse; +import com.alicloud.openservices.tablestore.model.PrimaryKeySchema; +import com.alicloud.openservices.tablestore.model.PrimaryKeyType; +import com.alicloud.openservices.tablestore.model.PrimaryKeyValue; +import com.alicloud.openservices.tablestore.model.TableMeta; +import com.alicloud.openservices.tablestore.model.TableOptions; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.TimeUnit; + +import static org.junit.Assert.assertArrayEquals; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + +public class TestCreateTableExFunciton { + + static String tableNameNormal = "TestPartitionRange"; + static String tableNameWithPoints = "TestPartitionRange_1"; + static String tableNameWithoutPoints = "TestPartitionRange_2"; + static String tableNameWithTooManyPoints = "TestPartitionRange_3"; + static InternalClient internalClient = null; + + @BeforeClass + public static void beforClass() { + ServiceSettings settings = ServiceSettings.load(); + final String endPoint = settings.getOTSEndpoint(); + final String accessId = settings.getOTSAccessKeyId(); + final String accessKey = settings.getOTSAccessKeySecret(); + final String instanceName = settings.getOTSInstanceName(); + + internalClient = new InternalClient(endPoint, accessId, accessKey, instanceName); + } + + @AfterClass + public static void afterClass() { + internalClient.shutdown(); + } + + @Before + public void setUp() throws Exception { + } + + @Test + public void testCreateTableNormal() throws Exception{ + String tableName = tableNameNormal; + tryDeleteTable(tableName); + + CreateTableResponse createTableResponse = creatTable(tableName); + Thread.sleep(TimeUnit.SECONDS.toMillis(1)); + + DescribeTableResponse describeTableResponse = describeTable(tableName); + + System.out.println(describeTableResponse); + assertEquals(describeTableResponse.getShardSplits().size(), 0); + } + + + @Test + public void testCreateTableWithPartitionRange() throws Exception{ + String tableName = tableNameWithPoints; + + tryDeleteTable(tableName); + + List points = Arrays.asList( + PrimaryKeyValue.fromString("a"), + PrimaryKeyValue.fromString("b"), + PrimaryKeyValue.fromString("c"), + PrimaryKeyValue.fromString("d"), + PrimaryKeyValue.fromString("e")); + + CreateTableResponse createTableResponse = creatTableEx(tableName ,points); + Thread.sleep(TimeUnit.SECONDS.toMillis(1)); + + DescribeTableResponse describeTableResponse = describeTable(tableName); + + System.out.println(describeTableResponse); + assertEquals(describeTableResponse.getShardSplits().size(), points.size()); + } + + @Test + public void testCreateTableWithoutPartitionRange() throws Exception{ + String tableName = tableNameWithoutPoints; + + tryDeleteTable(tableName); + + CreateTableResponse createTableResponse = creatTableEx(tableName, null); + Thread.sleep(TimeUnit.SECONDS.toMillis(1)); + + DescribeTableResponse describeTableResponse = describeTable(tableName); + + System.out.println(describeTableResponse); + assertEquals(describeTableResponse.getShardSplits().size(), 0); + } + + @Test + public void testCreateTableWithTooManyPartitionRange() throws Exception{ + String tableName = tableNameWithTooManyPoints; + + tryDeleteTable(tableName); + + List points = Arrays.asList( + PrimaryKeyValue.fromString("0"), + PrimaryKeyValue.fromString("1"), + PrimaryKeyValue.fromString("2"), + PrimaryKeyValue.fromString("3"), + PrimaryKeyValue.fromString("4"), + PrimaryKeyValue.fromString("5"), + PrimaryKeyValue.fromString("6"), + PrimaryKeyValue.fromString("7"), + PrimaryKeyValue.fromString("8"), + PrimaryKeyValue.fromString("9")); + + try { + CreateTableResponse createTableResponse = creatTableEx(tableName, points); + Assert.fail("Too Many Partition Should Failed"); + } catch (TableStoreException e) { + Assert.assertEquals(e.getErrorCode(), "OTSParameterInvalid"); + Assert.assertEquals(e.getMessage(), "The count of partitions cannot be greater than 10"); + } + } + + + private void tryDeleteTable(String tableName) throws Exception{ + try { + deleteTable(tableName); + } catch (TableStoreException e) { + if (!e.getErrorCode().equals(ErrorCode.OBJECT_NOT_EXIST)) { + throw e; + } + } + } + + private DeleteTableResponse deleteTable(String tableName) throws Exception{ + DeleteTableRequest request = new DeleteTableRequest(tableName); + return internalClient.deleteTable(request, null).get(); + } + + private DescribeTableResponse describeTable(String tableName) throws Exception{ + DescribeTableRequest request = new DescribeTableRequest(tableName); + return internalClient.describeTable(request, null).get(); + } + + private CreateTableResponse creatTableEx(String tableName, List points) throws Exception{ + TableMeta tableMeta = new TableMeta(tableName); + tableMeta.addPrimaryKeyColumn(new PrimaryKeySchema("PK1", PrimaryKeyType.STRING)); + tableMeta.addPrimaryKeyColumn(new PrimaryKeySchema("PK2", PrimaryKeyType.INTEGER)); + tableMeta.addPrimaryKeyColumn(new PrimaryKeySchema("PK3", PrimaryKeyType.BINARY)); + + int timeToLive = -1; + int maxVersions = 1; + + TableOptions tableOptions = new TableOptions(timeToLive, maxVersions); + CreateTableRequestEx createTableRequestEx = new CreateTableRequestEx(tableMeta, tableOptions); + + if (points != null) { + createTableRequestEx.setSplitPoints(points); + } + return internalClient.createTableEx(createTableRequestEx, null).get(); + } + + private CreateTableResponse creatTable(String tableName) throws Exception{ + TableMeta tableMeta = new TableMeta(tableName); + tableMeta.addPrimaryKeyColumn(new PrimaryKeySchema("PK1", PrimaryKeyType.STRING)); + tableMeta.addPrimaryKeyColumn(new PrimaryKeySchema("PK2", PrimaryKeyType.INTEGER)); + tableMeta.addPrimaryKeyColumn(new PrimaryKeySchema("PK3", PrimaryKeyType.BINARY)); + + int timeToLive = -1; + int maxVersions = 1; + + TableOptions tableOptions = new TableOptions(timeToLive, maxVersions); + + + CreateTableRequest request = new CreateTableRequest(tableMeta, tableOptions); + + return internalClient.createTable(request, null).get(); + } +} diff --git a/src/test/java/com/alicloud/openservices/tablestore/functiontest/TimeseriesTest.java b/src/test/java/com/alicloud/openservices/tablestore/functiontest/TimeseriesTest.java new file mode 100644 index 0000000..e577bc5 --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/functiontest/TimeseriesTest.java @@ -0,0 +1,451 @@ +package com.alicloud.openservices.tablestore.functiontest; + +import com.alicloud.openservices.tablestore.TableStoreException; +import com.alicloud.openservices.tablestore.TimeseriesClient; +import com.alicloud.openservices.tablestore.common.ServiceSettings; +import com.alicloud.openservices.tablestore.model.ColumnType; +import com.alicloud.openservices.tablestore.model.ColumnValue; +import com.alicloud.openservices.tablestore.model.TimeseriesTableMeta; +import com.alicloud.openservices.tablestore.model.TimeseriesTableOptions; +import com.alicloud.openservices.tablestore.model.timeseries.*; +import org.junit.*; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.*; + +import static org.junit.Assert.*; + +public class TimeseriesTest { + + static String testTable = "SDKTestTimeseriesTable"; + static TimeseriesClient client = null; + + private static final Logger LOG = LoggerFactory.getLogger(TimeseriesTest.class); + private static long waitTableInit = 60 * 1000; + private static long waitSearchIndexSync = 20 * 1000; + private static boolean createTableBeforeTest = true; // for local test + private static boolean deleteTableAfterTest = true; // for local test + + @BeforeClass + public static void beforeClass() { + ServiceSettings settings = ServiceSettings.load(); + final String endPoint = settings.getOTSEndpoint(); + final String accessId = settings.getOTSAccessKeyId(); + final String accessKey = settings.getOTSAccessKeySecret(); + final String instanceName = settings.getOTSInstanceName(); + + client = new TimeseriesClient(endPoint, accessId, accessKey, instanceName); + + if (createTableBeforeTest) { + ListTimeseriesTableResponse listTimeseriesTableResponse = client.listTimeseriesTable(); + for (String table : listTimeseriesTableResponse.getTimeseriesTableNames()) { + client.deleteTimeseriesTable(new DeleteTimeseriesTableRequest(table)); + } + + CreateTimeseriesTableRequest request = new CreateTimeseriesTableRequest(new TimeseriesTableMeta(testTable)); + client.createTimeseriesTable(request); + LOG.warn("sleep " + waitTableInit + "ms after create table..."); + try { + Thread.sleep(waitTableInit); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + } + + @AfterClass + public static void afterClass() { + if (deleteTableAfterTest) { + ListTimeseriesTableResponse listTimeseriesTableResponse = client.listTimeseriesTable(); + for (String table : listTimeseriesTableResponse.getTimeseriesTableNames()) { + client.deleteTimeseriesTable(new DeleteTimeseriesTableRequest(table)); + } + } + client.shutdown(); + } + + @Before + public void setUp() throws Exception { + } + + @Test + public void testTableOperations() throws Exception { + ListTimeseriesTableResponse listTimeseriesTableResponse = client.listTimeseriesTable(); + Assert.assertEquals(1, listTimeseriesTableResponse.getTimeseriesTableNames().size()); + TimeseriesTableMeta tableMeta = listTimeseriesTableResponse.getTimeseriesTableMetas().get(0); + Assert.assertEquals(testTable, tableMeta.getTimeseriesTableName()); + Assert.assertEquals("CREATED", tableMeta.getStatus()); + Assert.assertEquals(-1, tableMeta.getTimeseriesTableOptions().getTimeToLive()); + + DescribeTimeseriesTableResponse describeTimeseriesTableResponse = client.describeTimeseriesTable(new DescribeTimeseriesTableRequest(testTable)); + tableMeta = describeTimeseriesTableResponse.getTimeseriesTableMeta(); + Assert.assertEquals(testTable, tableMeta.getTimeseriesTableName()); + Assert.assertEquals("CREATED", tableMeta.getStatus()); + Assert.assertEquals(-1, tableMeta.getTimeseriesTableOptions().getTimeToLive()); + + UpdateTimeseriesTableRequest updateTimeseriesTableRequest = new UpdateTimeseriesTableRequest(testTable); + updateTimeseriesTableRequest.setTimeseriesTableOptions(new TimeseriesTableOptions(8640000)); + client.updateTimeseriesTable(updateTimeseriesTableRequest); + + describeTimeseriesTableResponse = client.describeTimeseriesTable(new DescribeTimeseriesTableRequest(testTable)); + tableMeta = describeTimeseriesTableResponse.getTimeseriesTableMeta(); + Assert.assertEquals(testTable, tableMeta.getTimeseriesTableName()); + Assert.assertEquals("CREATED", tableMeta.getStatus()); + Assert.assertEquals(8640000, tableMeta.getTimeseriesTableOptions().getTimeToLive()); + + updateTimeseriesTableRequest = new UpdateTimeseriesTableRequest(testTable); + updateTimeseriesTableRequest.setTimeseriesTableOptions(new TimeseriesTableOptions(-1)); + client.updateTimeseriesTable(updateTimeseriesTableRequest); + + describeTimeseriesTableResponse = client.describeTimeseriesTable(new DescribeTimeseriesTableRequest(testTable)); + tableMeta = describeTimeseriesTableResponse.getTimeseriesTableMeta(); + Assert.assertEquals(testTable, tableMeta.getTimeseriesTableName()); + Assert.assertEquals("CREATED", tableMeta.getStatus()); + Assert.assertEquals(-1, tableMeta.getTimeseriesTableOptions().getTimeToLive()); + } + + @Test + public void testRestrictions() { + List validMeasurements = Arrays.asList("温度", "温度.abc", "123Test", "_@?%$A"); + for (String m : validMeasurements) { + TimeseriesKey timeseriesKey = new TimeseriesKey(m, "source_" + new Random().nextInt(1000000)); + TimeseriesRow timeseriesRow = new TimeseriesRow(timeseriesKey, System.currentTimeMillis() * 1000); + timeseriesRow.addField("value", ColumnValue.fromDouble(1.1)); + List rows = new ArrayList(); + rows.add(timeseriesRow); + + PutTimeseriesDataRequest putTimeseriesDataRequest = new PutTimeseriesDataRequest(testTable); + putTimeseriesDataRequest.setRows(rows); + PutTimeseriesDataResponse putTimeseriesDataResponse = client.putTimeseriesData(putTimeseriesDataRequest); + Assert.assertTrue(putTimeseriesDataResponse.isAllSuccess()); + } + + List invalidMeasurements = Arrays.asList("温度\t", "温度.abc\n", " ", "##AA##", "aa bb"); + for (String m : invalidMeasurements) { + TimeseriesKey timeseriesKey = new TimeseriesKey(m, "source_" + new Random().nextInt(1000000)); + TimeseriesRow timeseriesRow = new TimeseriesRow(timeseriesKey, System.currentTimeMillis() * 1000); + timeseriesRow.addField("value", ColumnValue.fromDouble(1.1)); + List rows = new ArrayList(); + rows.add(timeseriesRow); + + PutTimeseriesDataRequest putTimeseriesDataRequest = new PutTimeseriesDataRequest(testTable); + putTimeseriesDataRequest.setRows(rows); + try { + PutTimeseriesDataResponse putTimeseriesDataResponse = client.putTimeseriesData(putTimeseriesDataRequest); + fail(); + } catch (TableStoreException ex) { + Assert.assertEquals("OTSParameterInvalid", ex.getErrorCode()); + } + } + + List validTagValues = Arrays.asList("aa_", "123", "@$?A", "杭州", "阿里云tablestore", "aa bb 阿里 ots", "\t\n"); + for (String tagValue : validTagValues) { + HashMap tags = new HashMap(); + tags.put("tag", tagValue); + TimeseriesKey timeseriesKey = new TimeseriesKey("tag_test", + "source_" + new Random().nextInt(1000000), tags); + TimeseriesRow timeseriesRow = new TimeseriesRow(timeseriesKey, System.currentTimeMillis() * 1000); + timeseriesRow.addField("value", ColumnValue.fromDouble(1.1)); + List rows = new ArrayList(); + rows.add(timeseriesRow); + + PutTimeseriesDataRequest putTimeseriesDataRequest = new PutTimeseriesDataRequest(testTable); + putTimeseriesDataRequest.setRows(rows); + PutTimeseriesDataResponse putTimeseriesDataResponse = client.putTimeseriesData(putTimeseriesDataRequest); + Assert.assertTrue(putTimeseriesDataResponse.isAllSuccess()); + } + + List invalidTagValues = Arrays.asList("=", "\"", "aa=a", "zz\"", "aa bb 阿里\\\"\" ots"); + for (String tagValue : invalidTagValues) { + HashMap tags = new HashMap(); + tags.put("tag", tagValue); + TimeseriesKey timeseriesKey = new TimeseriesKey("tag_test", + "source_" + new Random().nextInt(1000000), tags); + TimeseriesRow timeseriesRow = new TimeseriesRow(timeseriesKey, System.currentTimeMillis() * 1000); + timeseriesRow.addField("value", ColumnValue.fromDouble(1.1)); + List rows = new ArrayList(); + rows.add(timeseriesRow); + + PutTimeseriesDataRequest putTimeseriesDataRequest = new PutTimeseriesDataRequest(testTable); + putTimeseriesDataRequest.setRows(rows); + try { + PutTimeseriesDataResponse putTimeseriesDataResponse = client.putTimeseriesData(putTimeseriesDataRequest); + fail(); + } catch (IllegalArgumentException ex) { + } + } + } + + @Test + public void testDataOperations() throws InterruptedException { + List rows = new ArrayList(); + Map tags = new HashMap(); + for (int i = 0; i < 10; i++) { + tags.put("tag" + i, "value" + i); + } + for (int i = 0; i < 100; i++) { + TimeseriesKey timeseriesKey = new TimeseriesKey("test_measure", "source" + i, tags); + TimeseriesRow row = new TimeseriesRow(timeseriesKey, System.currentTimeMillis() * 1000 + i); + for (int j = 0; j < 10; j++) { + row.addField("field" + j, ColumnValue.fromString("value" + j)); + } + rows.add(row); + } + PutTimeseriesDataRequest putTimeseriesDataRequest = new PutTimeseriesDataRequest(testTable); + putTimeseriesDataRequest.setRows(rows); + PutTimeseriesDataResponse putTimeseriesDataResponse = client.putTimeseriesData(putTimeseriesDataRequest); + Assert.assertTrue(putTimeseriesDataResponse.isAllSuccess()); + + GetTimeseriesDataRequest getTimeseriesDataRequest = new GetTimeseriesDataRequest(testTable); + getTimeseriesDataRequest.setTimeseriesKey(new TimeseriesKey("test_measure", "source5", tags)); + getTimeseriesDataRequest.setTimeRange(0, System.currentTimeMillis() * 1000 + 1000); + GetTimeseriesDataResponse getTimeseriesDataResponse = client.getTimeseriesData(getTimeseriesDataRequest); + Assert.assertEquals(1, getTimeseriesDataResponse.getRows().size()); + Assert.assertNull(getTimeseriesDataResponse.getNextToken()); + TimeseriesRow row = getTimeseriesDataResponse.getRows().get(0); + Assert.assertEquals("test_measure", row.getTimeseriesKey().getMeasurementName()); + Assert.assertEquals("source5", row.getTimeseriesKey().getDataSource()); + Assert.assertEquals(tags, row.getTimeseriesKey().getTags()); + + try { + Thread.sleep(waitSearchIndexSync); + } catch (InterruptedException e) { + e.printStackTrace(); + } + + { + QueryTimeseriesMetaRequest queryTimeseriesMetaRequest = new QueryTimeseriesMetaRequest(testTable); + CompositeMetaQueryCondition compositeMetaQueryCondition = new CompositeMetaQueryCondition(MetaQueryCompositeOperator.OP_AND); + compositeMetaQueryCondition.addSubCondition(new MeasurementMetaQueryCondition(MetaQuerySingleOperator.OP_PREFIX, "test")); + compositeMetaQueryCondition.addSubCondition(new DataSourceMetaQueryCondition(MetaQuerySingleOperator.OP_PREFIX, "source1")); + compositeMetaQueryCondition.addSubCondition(new TagMetaQueryCondition(MetaQuerySingleOperator.OP_GREATER_EQUAL, "tag5", "value5")); + queryTimeseriesMetaRequest.setCondition(compositeMetaQueryCondition); + queryTimeseriesMetaRequest.setGetTotalHits(true); + QueryTimeseriesMetaResponse queryTimeseriesMetaResponse = client.queryTimeseriesMeta(queryTimeseriesMetaRequest); + Assert.assertEquals(11, queryTimeseriesMetaResponse.getTimeseriesMetas().size()); + Assert.assertEquals(11, queryTimeseriesMetaResponse.getTotalHits()); + Assert.assertNull(queryTimeseriesMetaResponse.getNextToken()); + Assert.assertTrue(queryTimeseriesMetaResponse.getTimeseriesMetas().get(0).getAttributes().isEmpty()); + Assert.assertTrue(queryTimeseriesMetaResponse.getTimeseriesMetas().get(0).getUpdateTimeInUs() > 0); + Assert.assertEquals("test_measure", queryTimeseriesMetaResponse.getTimeseriesMetas().get(0).getTimeseriesKey().getMeasurementName()); + Assert.assertTrue(queryTimeseriesMetaResponse.getTimeseriesMetas().get(0).getTimeseriesKey().getDataSource().startsWith("source1")); + Assert.assertEquals(tags, queryTimeseriesMetaResponse.getTimeseriesMetas().get(0).getTimeseriesKey().getTags()); + } + + Map attrs = new HashMap(); + attrs.put("attr1", "attr_value1"); + attrs.put("attr2", "attr_value2"); + List timeseriesMetaList = new ArrayList(); + for (int i = 0; i < 10; i++) { + TimeseriesKey timeseriesKey = new TimeseriesKey("test_measure", "update_source" + i, tags); + TimeseriesMeta meta = new TimeseriesMeta(timeseriesKey); + meta.setAttributes(attrs); + timeseriesMetaList.add(meta); + } + UpdateTimeseriesMetaRequest updateTimeseriesMetaRequest = new UpdateTimeseriesMetaRequest(testTable); + updateTimeseriesMetaRequest.setMetas(timeseriesMetaList); + UpdateTimeseriesMetaResponse updateTimeseriesMetaResponse = client.updateTimeseriesMeta(updateTimeseriesMetaRequest); + Assert.assertTrue(updateTimeseriesMetaResponse.isAllSuccess()); + + try { + Thread.sleep(waitSearchIndexSync); + } catch (InterruptedException e) { + e.printStackTrace(); + } + + { + QueryTimeseriesMetaRequest queryTimeseriesMetaRequest = new QueryTimeseriesMetaRequest(testTable); + CompositeMetaQueryCondition compositeMetaQueryCondition = new CompositeMetaQueryCondition(MetaQueryCompositeOperator.OP_AND); + compositeMetaQueryCondition.addSubCondition(new MeasurementMetaQueryCondition(MetaQuerySingleOperator.OP_PREFIX, "test")); + compositeMetaQueryCondition.addSubCondition(new DataSourceMetaQueryCondition(MetaQuerySingleOperator.OP_PREFIX, "update_source")); + compositeMetaQueryCondition.addSubCondition(new AttributeMetaQueryCondition(MetaQuerySingleOperator.OP_GREATER_EQUAL, "attr1", "attr_value1")); + queryTimeseriesMetaRequest.setCondition(compositeMetaQueryCondition); + queryTimeseriesMetaRequest.setGetTotalHits(true); + QueryTimeseriesMetaResponse queryTimeseriesMetaResponse = client.queryTimeseriesMeta(queryTimeseriesMetaRequest); + Assert.assertEquals(10, queryTimeseriesMetaResponse.getTimeseriesMetas().size()); + Assert.assertEquals(10, queryTimeseriesMetaResponse.getTotalHits()); + Assert.assertNull(queryTimeseriesMetaResponse.getNextToken()); + Assert.assertTrue(queryTimeseriesMetaResponse.getTimeseriesMetas().get(0).getUpdateTimeInUs() > 0); + Assert.assertEquals("test_measure", queryTimeseriesMetaResponse.getTimeseriesMetas().get(0).getTimeseriesKey().getMeasurementName()); + Assert.assertTrue(queryTimeseriesMetaResponse.getTimeseriesMetas().get(0).getTimeseriesKey().getDataSource().startsWith("update_source")); + Assert.assertEquals(tags, queryTimeseriesMetaResponse.getTimeseriesMetas().get(0).getTimeseriesKey().getTags()); + Assert.assertEquals(attrs, queryTimeseriesMetaResponse.getTimeseriesMetas().get(0).getAttributes()); + } + + { + QueryTimeseriesMetaRequest queryTimeseriesMetaRequest = new QueryTimeseriesMetaRequest(testTable); + CompositeMetaQueryCondition compositeMetaQueryCondition = new CompositeMetaQueryCondition(MetaQueryCompositeOperator.OP_AND); + compositeMetaQueryCondition.addSubCondition(new MeasurementMetaQueryCondition(MetaQuerySingleOperator.OP_PREFIX, "test")); + compositeMetaQueryCondition.addSubCondition(new DataSourceMetaQueryCondition(MetaQuerySingleOperator.OP_PREFIX, "update_source")); + compositeMetaQueryCondition.addSubCondition(new AttributeMetaQueryCondition(MetaQuerySingleOperator.OP_GREATER_EQUAL, "attr1", "attr_value1")); + queryTimeseriesMetaRequest.setCondition(compositeMetaQueryCondition); + queryTimeseriesMetaRequest.setGetTotalHits(true); + QueryTimeseriesMetaResponse queryTimeseriesMetaResponse = client.queryTimeseriesMeta(queryTimeseriesMetaRequest); + Assert.assertEquals(10, queryTimeseriesMetaResponse.getTimeseriesMetas().size()); + Assert.assertEquals(10, queryTimeseriesMetaResponse.getTotalHits()); + + DeleteTimeseriesMetaRequest deleteTimeseriesMetaRequest = new DeleteTimeseriesMetaRequest(testTable); + List keyList = new ArrayList(); + for (int i = 0; i < queryTimeseriesMetaResponse.getTimeseriesMetas().size(); i++) { + keyList.add(queryTimeseriesMetaResponse.getTimeseriesMetas().get(i).getTimeseriesKey()); + } + deleteTimeseriesMetaRequest.setTimeseriesKeys(keyList); + + DeleteTimeseriesMetaResponse deleteTimeseriesMetaResponse = + client.deleteTimeseriesMeta(deleteTimeseriesMetaRequest); + Assert.assertTrue(deleteTimeseriesMetaResponse.isAllSuccess()); + + Thread.sleep(waitSearchIndexSync); + + queryTimeseriesMetaResponse = client.queryTimeseriesMeta(queryTimeseriesMetaRequest); + Assert.assertEquals(0, queryTimeseriesMetaResponse.getTimeseriesMetas().size()); + Assert.assertEquals(0, queryTimeseriesMetaResponse.getTotalHits()); + } + + } + + @Test + public void testGetTimeseriesData() { + List rows = new ArrayList(); + long timeStart = System.currentTimeMillis() * 1000; + TimeseriesKey timeseriesKey = new TimeseriesKey("test_getts", ""); + for (int i = 0; i < 100; i++) { + TimeseriesRow row = new TimeseriesRow(timeseriesKey, timeStart + i); + for (int j = 0; j < 10; j++) { + row.addField("string_" + j, ColumnValue.fromString("value" + j)); + } + for (int j = 0; j < 10; j++) { + row.addField("long_" + j, ColumnValue.fromLong(j)); + } + for (int j = 0; j < 10; j++) { + row.addField("binary_" + j, ColumnValue.fromBinary(("value" + j).getBytes())); + } + for (int j = 0; j < 10; j++) { + row.addField("double_" + j, ColumnValue.fromDouble(j * 1.01)); + } + for (int j = 0; j < 10; j++) { + row.addField("bool_" + j, ColumnValue.fromBoolean(true)); + } + rows.add(row); + } + PutTimeseriesDataRequest putTimeseriesDataRequest = new PutTimeseriesDataRequest(testTable); + putTimeseriesDataRequest.setRows(rows); + PutTimeseriesDataResponse putTimeseriesDataResponse = client.putTimeseriesData(putTimeseriesDataRequest); + Assert.assertTrue(putTimeseriesDataResponse.isAllSuccess()); + + { + GetTimeseriesDataRequest getTimeseriesDataRequest = new GetTimeseriesDataRequest(testTable); + getTimeseriesDataRequest.setTimeseriesKey(timeseriesKey); + getTimeseriesDataRequest.setTimeRange(timeStart, timeStart + 1000000); + GetTimeseriesDataResponse getTimeseriesDataResponse = client.getTimeseriesData(getTimeseriesDataRequest); + Assert.assertEquals(100, getTimeseriesDataResponse.getRows().size()); + for (int i = 0 ; i < getTimeseriesDataResponse.getRows().size(); i++) { + assertEquals(timeStart + i, getTimeseriesDataResponse.getRows().get(i).getTimeInUs()); + } + } + + { + GetTimeseriesDataRequest getTimeseriesDataRequest = new GetTimeseriesDataRequest(testTable); + getTimeseriesDataRequest.setTimeseriesKey(timeseriesKey); + getTimeseriesDataRequest.setTimeRange(timeStart, timeStart + 1000000); + getTimeseriesDataRequest.setLimit(10); + GetTimeseriesDataResponse getTimeseriesDataResponse = client.getTimeseriesData(getTimeseriesDataRequest); + Assert.assertEquals(10, getTimeseriesDataResponse.getRows().size()); + for (int i = 0 ; i < getTimeseriesDataResponse.getRows().size(); i++) { + assertEquals(timeStart + i, getTimeseriesDataResponse.getRows().get(i).getTimeInUs()); + } + Assert.assertNotNull(getTimeseriesDataResponse.getNextToken()); + } + + { + GetTimeseriesDataRequest getTimeseriesDataRequest = new GetTimeseriesDataRequest(testTable); + getTimeseriesDataRequest.setTimeseriesKey(timeseriesKey); + getTimeseriesDataRequest.setTimeRange(timeStart, timeStart + 1000000); + getTimeseriesDataRequest.setLimit(10); + getTimeseriesDataRequest.addFieldToGet("string_1", ColumnType.STRING); + getTimeseriesDataRequest.addFieldToGet("string_2", ColumnType.STRING); + getTimeseriesDataRequest.addFieldToGet("string_3", ColumnType.DOUBLE); // wrong type + getTimeseriesDataRequest.addFieldToGet("double_3", ColumnType.DOUBLE); + getTimeseriesDataRequest.addFieldToGet("double_4", ColumnType.INTEGER); // wrong type + getTimeseriesDataRequest.addFieldToGet("long_1", ColumnType.INTEGER); + getTimeseriesDataRequest.addFieldToGet("binary_5", ColumnType.BINARY); + getTimeseriesDataRequest.addFieldToGet("bool_2", ColumnType.BOOLEAN); + GetTimeseriesDataResponse getTimeseriesDataResponse = client.getTimeseriesData(getTimeseriesDataRequest); + Assert.assertEquals(10, getTimeseriesDataResponse.getRows().size()); + for (int i = 0 ; i < getTimeseriesDataResponse.getRows().size(); i++) { + TimeseriesRow row = getTimeseriesDataResponse.getRows().get(i); + assertEquals(timeStart + i, row.getTimeInUs()); + assertEquals(6, row.getFields().size()); + assertEquals("value1", row.getFields().get("string_1").asString()); + assertEquals("value2", row.getFields().get("string_2").asString()); + assertEquals(3*1.01, row.getFields().get("double_3").asDouble(), 0.01); + assertEquals(1, row.getFields().get("long_1").asLong()); + assertArrayEquals(("value" + 5).getBytes(), row.getFields().get("binary_5").asBinary()); + assertTrue(row.getFields().get("bool_2").asBoolean()); + } + Assert.assertNotNull(getTimeseriesDataResponse.getNextToken()); + } + + { + GetTimeseriesDataRequest getTimeseriesDataRequest = new GetTimeseriesDataRequest(testTable); + getTimeseriesDataRequest.setTimeseriesKey(timeseriesKey); + getTimeseriesDataRequest.setTimeRange(timeStart + 20, timeStart + 1000000); + int limit = 1 + new Random().nextInt(10); + getTimeseriesDataRequest.setLimit(limit); + GetTimeseriesDataResponse getTimeseriesDataResponse = client.getTimeseriesData(getTimeseriesDataRequest); + Assert.assertEquals(limit, getTimeseriesDataResponse.getRows().size()); + for (int i = 0 ; i < getTimeseriesDataResponse.getRows().size(); i++) { + assertEquals(timeStart + 20 + i, getTimeseriesDataResponse.getRows().get(i).getTimeInUs()); + } + Assert.assertNotNull(getTimeseriesDataResponse.getNextToken()); + long timeNext = getTimeseriesDataResponse.getRows().get(limit - 1).getTimeInUs() + 1; + while (true) { + getTimeseriesDataRequest.setNextToken(getTimeseriesDataResponse.getNextToken()); + getTimeseriesDataResponse = client.getTimeseriesData(getTimeseriesDataRequest); + for (int i = 0 ; i < getTimeseriesDataResponse.getRows().size(); i++) { + assertEquals(timeNext + i, getTimeseriesDataResponse.getRows().get(i).getTimeInUs()); + } + Assert.assertTrue(getTimeseriesDataResponse.getRows().size() <= limit); + timeNext = getTimeseriesDataResponse.getRows().get(getTimeseriesDataResponse.getRows().size() - 1).getTimeInUs() + 1; + if (timeNext < timeStart + 100) { + Assert.assertNotNull(getTimeseriesDataResponse.getNextToken()); + } else { + break; + } + } + } + + { + GetTimeseriesDataRequest getTimeseriesDataRequest = new GetTimeseriesDataRequest(testTable); + getTimeseriesDataRequest.setTimeseriesKey(timeseriesKey); + getTimeseriesDataRequest.setTimeRange(timeStart + 20, timeStart + 1000000); + int limit = 1 + new Random().nextInt(10); + getTimeseriesDataRequest.setLimit(limit); + getTimeseriesDataRequest.setBackward(true); + GetTimeseriesDataResponse getTimeseriesDataResponse = client.getTimeseriesData(getTimeseriesDataRequest); + Assert.assertEquals(limit, getTimeseriesDataResponse.getRows().size()); + for (int i = 0 ; i < getTimeseriesDataResponse.getRows().size(); i++) { + assertEquals(timeStart + 99 - i, getTimeseriesDataResponse.getRows().get(i).getTimeInUs()); + } + Assert.assertNotNull(getTimeseriesDataResponse.getNextToken()); + long timeNext = getTimeseriesDataResponse.getRows().get(limit - 1).getTimeInUs() - 1; + while (true) { + getTimeseriesDataRequest.setNextToken(getTimeseriesDataResponse.getNextToken()); + getTimeseriesDataResponse = client.getTimeseriesData(getTimeseriesDataRequest); + for (int i = 0 ; i < getTimeseriesDataResponse.getRows().size(); i++) { + assertEquals(timeNext - i, getTimeseriesDataResponse.getRows().get(i).getTimeInUs()); + } + Assert.assertTrue(getTimeseriesDataResponse.getRows().size() <= limit); + timeNext = getTimeseriesDataResponse.getRows().get(getTimeseriesDataResponse.getRows().size() - 1).getTimeInUs() - 1; + if (timeNext >= getTimeseriesDataRequest.getBeginTimeInUs()) { + Assert.assertNotNull(getTimeseriesDataResponse.getNextToken()); + } else { + break; + } + } + } + + } + +} diff --git a/src/test/java/com/alicloud/openservices/tablestore/model/ComputeSplitsRequestTest.java b/src/test/java/com/alicloud/openservices/tablestore/model/ComputeSplitsRequestTest.java new file mode 100644 index 0000000..07b4284 --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/model/ComputeSplitsRequestTest.java @@ -0,0 +1,71 @@ +package com.alicloud.openservices.tablestore.model; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import org.junit.Assert; +import org.junit.Test; + +import static org.junit.Assert.*; + +public class ComputeSplitsRequestTest { + + static Gson gson = new GsonBuilder() + .disableHtmlEscaping() + .disableInnerClassSerialization() + .serializeNulls() + .serializeSpecialFloatingPointValues() + .enableComplexMapKeySerialization().create(); + + @Test + public void getOperationName() { + ComputeSplitsRequest computeSplitsRequest = new ComputeSplitsRequest(); + assertEquals(computeSplitsRequest.getOperationName(), OperationNames.OP_COMPUTE_SPLITS); + } + + @Test + public void getTableName() { + ComputeSplitsRequest computeSplitsRequest1 = new ComputeSplitsRequest(); + computeSplitsRequest1.setTableName("123ffff"); + ComputeSplitsRequest computeSplitsRequest2 = ComputeSplitsRequest.newBuilder().tableName("123ffff").build(); + Assert.assertEquals(computeSplitsRequest2.getTableName(),computeSplitsRequest1.getTableName()); + Assert.assertEquals(gson.toJson(computeSplitsRequest2),gson.toJson(computeSplitsRequest1) ); + } + + @Test + public void setTableName() { + ComputeSplitsRequest computeSplitsRequest1 = new ComputeSplitsRequest(); + computeSplitsRequest1.setTableName("test1"); + ComputeSplitsRequest computeSplitsRequest2 = ComputeSplitsRequest.newBuilder().tableName("test1").build(); + Assert.assertEquals(gson.toJson(computeSplitsRequest2),gson.toJson(computeSplitsRequest1) ); + } + + @Test + public void getOptions() { + ComputeSplitsRequest computeSplitsRequest1 = new ComputeSplitsRequest(); + computeSplitsRequest1.setSplitsOptions(new SearchIndexSplitsOptions("test1")); + ComputeSplitsRequest computeSplitsRequest2 = ComputeSplitsRequest.newBuilder().splitsOptions(new SearchIndexSplitsOptions("test1")).build(); + Assert.assertEquals(gson.toJson(computeSplitsRequest2),gson.toJson(computeSplitsRequest1) ); + Assert.assertEquals(computeSplitsRequest2.getSearchIndexSplitsOptions().getIndexName(),computeSplitsRequest1.getSearchIndexSplitsOptions().getIndexName()); + } + + @Test + public void setOptions() { + ComputeSplitsRequest computeSplitsRequest1 = new ComputeSplitsRequest(); + computeSplitsRequest1.setSplitsOptions(new SearchIndexSplitsOptions("test1")); + ComputeSplitsRequest computeSplitsRequest2 = ComputeSplitsRequest.newBuilder().splitsOptions(new SearchIndexSplitsOptions("test1")).build(); + Assert.assertEquals(gson.toJson(computeSplitsRequest2),gson.toJson(computeSplitsRequest1) ); + } + + @Test + public void newBuilder() { + ComputeSplitsRequest computeSplitsRequest1 = new ComputeSplitsRequest(); + computeSplitsRequest1.setSplitsOptions(new SearchIndexSplitsOptions("test1")); + computeSplitsRequest1.setTableName("ttt111"); + ComputeSplitsRequest computeSplitsRequest2 = ComputeSplitsRequest + .newBuilder() + .tableName("ttt111") + .splitsOptions(new SearchIndexSplitsOptions("test1")) + .build(); + Assert.assertEquals(gson.toJson(computeSplitsRequest2),gson.toJson(computeSplitsRequest1) ); + } +} \ No newline at end of file diff --git a/src/test/java/com/alicloud/openservices/tablestore/model/ComputeSplitsResponseTest.java b/src/test/java/com/alicloud/openservices/tablestore/model/ComputeSplitsResponseTest.java new file mode 100644 index 0000000..5c3e803 --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/model/ComputeSplitsResponseTest.java @@ -0,0 +1,28 @@ +package com.alicloud.openservices.tablestore.model; + +import java.io.UnsupportedEncodingException; +import java.util.Arrays; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class ComputeSplitsResponseTest { + + @Test + public void splitsSize() { + Response meta = new Response(); + ComputeSplitsResponse computeSplitsResponse = new ComputeSplitsResponse(meta); + computeSplitsResponse.setSplitsSize(123); + assertEquals(123, computeSplitsResponse.getSplitsSize(),0.001); + } + + @Test + public void sessionId() throws UnsupportedEncodingException { + Response meta = new Response(); + ComputeSplitsResponse computeSplitsResponse = new ComputeSplitsResponse(meta); + computeSplitsResponse.setSessionId("123".getBytes("utf-8")); + assertEquals(Arrays.toString("123".getBytes("utf-8")), Arrays.toString(computeSplitsResponse.getSessionId())); + } + +} \ No newline at end of file diff --git a/src/test/java/com/alicloud/openservices/tablestore/model/OperationNamesTest.java b/src/test/java/com/alicloud/openservices/tablestore/model/OperationNamesTest.java new file mode 100644 index 0000000..caa5142 --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/model/OperationNamesTest.java @@ -0,0 +1,14 @@ +package com.alicloud.openservices.tablestore.model; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class OperationNamesTest { + + @Test + public void testComputeSplits(){ + assertEquals("ComputeSplits", OperationNames.OP_COMPUTE_SPLITS); + } + +} \ No newline at end of file diff --git a/src/test/java/com/alicloud/openservices/tablestore/model/SearchIndexSplitsOptionsTest.java b/src/test/java/com/alicloud/openservices/tablestore/model/SearchIndexSplitsOptionsTest.java new file mode 100644 index 0000000..f6dab2b --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/model/SearchIndexSplitsOptionsTest.java @@ -0,0 +1,21 @@ +package com.alicloud.openservices.tablestore.model; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class SearchIndexSplitsOptionsTest { + + @Test + public void getIndexName() { + SearchIndexSplitsOptions searchIndexSplitsOptions = new SearchIndexSplitsOptions("123"); + assertEquals("123", searchIndexSplitsOptions.getIndexName()); + } + + @Test + public void setIndexName() { + SearchIndexSplitsOptions searchIndexSplitsOptions = new SearchIndexSplitsOptions(); + searchIndexSplitsOptions.setIndexName("123"); + assertEquals("123", searchIndexSplitsOptions.getIndexName()); + } +} \ No newline at end of file diff --git a/src/test/java/com/alicloud/openservices/tablestore/model/TableOptionsTest.java b/src/test/java/com/alicloud/openservices/tablestore/model/TableOptionsTest.java new file mode 100644 index 0000000..4e16ae6 --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/model/TableOptionsTest.java @@ -0,0 +1,34 @@ +package com.alicloud.openservices.tablestore.model; + +import org.junit.Assert; +import org.junit.Test; + +import java.util.Random; +import java.util.concurrent.TimeUnit; + +public class TableOptionsTest { + + @Test + public void setTimeToLive() { + Random random = new Random(); + for (int i = 0; i < 100; i++) { + int ttlDays = random.nextInt(10000) + 1; + long ttlSeconds = TimeUnit.DAYS.toSeconds(ttlDays); + TableOptions tableOptions1 = new TableOptions(); + tableOptions1.setTimeToLive((int) ttlSeconds); + TableOptions tableOptions2 = new TableOptions(); + tableOptions2.setTimeToLiveInDays(ttlDays); + Assert.assertEquals(tableOptions1.getTimeToLive(), tableOptions2.getTimeToLive()); + } + + // -1 + { + TableOptions tableOptions1 = new TableOptions(); + tableOptions1.setTimeToLive(-1); + TableOptions tableOptions2 = new TableOptions(); + tableOptions2.setTimeToLiveInDays(-1); + Assert.assertEquals(tableOptions1.getTimeToLive(), tableOptions2.getTimeToLive()); + } + + } +} \ No newline at end of file diff --git a/src/test/java/com/alicloud/openservices/tablestore/model/TestBulkExport.java b/src/test/java/com/alicloud/openservices/tablestore/model/TestBulkExport.java new file mode 100644 index 0000000..a8f5236 --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/model/TestBulkExport.java @@ -0,0 +1,42 @@ +package com.alicloud.openservices.tablestore.model; + +import com.alicloud.openservices.tablestore.model.tunnel.BulkExportQueryCriteria; +import org.junit.Test; + +import static org.junit.Assert.assertEquals; + +public class TestBulkExport { + + static String tableName = "YSTestBulkExport"; + + @Test + public void testBulkExportQueryCriteria() { + BulkExportQueryCriteria bulkExportQueryCriteria = new BulkExportQueryCriteria(tableName); + + PrimaryKey primaryKey = new PrimaryKey(); + try { + bulkExportQueryCriteria.setInclusiveStartPrimaryKey(primaryKey); + } catch (IllegalArgumentException e) { + assertEquals("The inclusive start primary key should not be null.", e.getMessage()); + } + try { + bulkExportQueryCriteria.setExclusiveEndPrimaryKey(primaryKey); + } catch (IllegalArgumentException e) { + assertEquals("The exclusive end primary key should not be null.", e.getMessage()); + } + + DataBlockType dataBlockType = DataBlockType.DBT_SIMPLE_ROW_MATRIX; + bulkExportQueryCriteria.setDataBlockType(dataBlockType); + assertEquals(DataBlockType.DBT_SIMPLE_ROW_MATRIX, bulkExportQueryCriteria.getDataBlockType()); + + + } + + @Test + public void testBulkExportRequest() { + BulkExportQueryCriteria bulkExportQueryCriteria = new BulkExportQueryCriteria(tableName); + BulkExportRequest bulkExportRequest = new BulkExportRequest(); + bulkExportRequest.setBulkExportQueryCriteria(bulkExportQueryCriteria); + + } +} diff --git a/src/test/java/com/alicloud/openservices/tablestore/model/TestPartitionPointsFactory.java b/src/test/java/com/alicloud/openservices/tablestore/model/TestPartitionPointsFactory.java new file mode 100644 index 0000000..75f9954 --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/model/TestPartitionPointsFactory.java @@ -0,0 +1,402 @@ +package com.alicloud.openservices.tablestore.model; + +import org.junit.Test; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.fail; + +/** + * @Author wtt + * @create 2021/7/29 5:06 下午 + */ +public class TestPartitionPointsFactory { + + @Test + public void testSplitPointFactory(){ + + // 获取数字分裂点 + { + List points = SplitPointFactory.getDigit(4, 0,100); + List pointsTrue = Arrays.asList( + PrimaryKeyValue.fromLong(20), + PrimaryKeyValue.fromLong(40), + PrimaryKeyValue.fromLong(60), + PrimaryKeyValue.fromLong(80) + ); + assertEquals(pointsTrue, points); + } + + // 获取数字分裂点 + { + List points = SplitPointFactory.getDigit(3, 2,5); + List pointsTrue = Arrays.asList( + PrimaryKeyValue.fromLong(3), + PrimaryKeyValue.fromLong(4), + PrimaryKeyValue.fromLong(5) + ); + assertEquals(pointsTrue, points); + } + + // 区间[0,5]获取4个数字分裂点-->[-INF,1),[1,2),[2,3),[3,4),[4,+INF) + { + List points = SplitPointFactory.getDigit(4, 0,5); + List pointsTrue = Arrays.asList( + PrimaryKeyValue.fromLong(1), + PrimaryKeyValue.fromLong(2), + PrimaryKeyValue.fromLong(3), + PrimaryKeyValue.fromLong(4) + ); + assertEquals(pointsTrue, points); + } + + // 区间[0,5]获取5个数字分裂点(6个区间),区间过小,异常 + { + try { + List points = SplitPointFactory.getDigit(6, 0, 5); + fail(); + } catch (IllegalArgumentException e) { + assertEquals("When you try to set the split points for the interval [0, 5], you can set up to 5 split points, currently 6.", e.getMessage()); + } + } + + + // 区间[0,10]获取3个数字分裂点-->[-INF,2),[2,5),[5,8),[8,+INF) + { + List points = SplitPointFactory.getDigit(3, 0,10); + List pointsTrue = Arrays.asList( + PrimaryKeyValue.fromLong(2), + PrimaryKeyValue.fromLong(5), + PrimaryKeyValue.fromLong(8) + ); + assertEquals(pointsTrue, points); + } + + // 获取数字分裂点,期望分裂点个数为0 + { + try { + List points = SplitPointFactory.getDigit(0, 0, 100); + fail(); + } catch (IllegalArgumentException e) { + assertEquals("The number of pointCount must be greater than 0.", e.getMessage()); + } + } + + // 获取长度为1的小写MD5码-->[+INF,4),[4,8),[8,c),[c,-INF) + { + List points = SplitPointFactory.getLowerHexString(3,1); + List pointsTrue = Arrays.asList( + PrimaryKeyValue.fromString("4"), + PrimaryKeyValue.fromString("8"), + PrimaryKeyValue.fromString("c") + ); + assertEquals(pointsTrue, points); + } + + // 获取长度为1的小写MD5码,最细粒度划分 + { + List points = SplitPointFactory.getLowerHexString(15,1); + List pointsTrue = Arrays.asList( + PrimaryKeyValue.fromString("1"), + PrimaryKeyValue.fromString("2"), + PrimaryKeyValue.fromString("3"), + PrimaryKeyValue.fromString("4"), + PrimaryKeyValue.fromString("5"), + PrimaryKeyValue.fromString("6"), + PrimaryKeyValue.fromString("7"), + PrimaryKeyValue.fromString("8"), + PrimaryKeyValue.fromString("9"), + PrimaryKeyValue.fromString("a"), + PrimaryKeyValue.fromString("b"), + PrimaryKeyValue.fromString("c"), + PrimaryKeyValue.fromString("d"), + PrimaryKeyValue.fromString("e"), + PrimaryKeyValue.fromString("f") + ); + assertEquals(pointsTrue, points); + } + + + // 获取长度为1的小写MD5码 + { + List points = SplitPointFactory.getLowerHexString(4,4); + List pointsTrue = Arrays.asList( + PrimaryKeyValue.fromString("3333"), + PrimaryKeyValue.fromString("6666"), + PrimaryKeyValue.fromString("9999"), + PrimaryKeyValue.fromString("cccc") + ); + assertEquals(pointsTrue, points); + } + + // 获取小写的MD5分裂点,期望分裂点个数为0 + { + try { + List points = SplitPointFactory.getLowerHexString(0, 4); + fail(); + } catch (IllegalArgumentException e) { + assertEquals("The number of pointCount and pointLength must be greater than 0.", e.getMessage()); + } + } + + // 获取小写的MD5分裂点,期望MD5长度为0 + { + try { + List points = SplitPointFactory.getLowerHexString(16, 1); + fail(); + } catch (IllegalArgumentException e) { + assertEquals("When the length of MD5 is 1, you can set up to 15 split points, currently 16.", e.getMessage()); + } + } + + // 获取长度为1的大写MD5码 + { + List points = SplitPointFactory.getUpperHexString(4,4); + List pointsTrue = Arrays.asList( + PrimaryKeyValue.fromString("3333"), + PrimaryKeyValue.fromString("6666"), + PrimaryKeyValue.fromString("9999"), + PrimaryKeyValue.fromString("CCCC") + ); + assertEquals(pointsTrue, points); + } + } + + @Test + public void testSetPoints() { + List pointsNull = null; + List pointsNullList = new ArrayList(); + + try { + CreateTableRequestEx request = new CreateTableRequestEx(new TableMeta("TableName"), new TableOptions()); + fail(); + } catch (IllegalArgumentException e) { + assertEquals("TableMeta should set at least one primary key.", e.getMessage()); + } + + TableMeta tableMetaInt = new TableMeta("TABLE_NAME"); + tableMetaInt.addPrimaryKeyColumn(new PrimaryKeySchema("PK", PrimaryKeyType.INTEGER)); + CreateTableRequestEx requestInt = new CreateTableRequestEx(tableMetaInt, new TableOptions()); + + List pointsInt = Arrays.asList( + PrimaryKeyValue.fromLong(10000), + PrimaryKeyValue.fromLong(20000), + PrimaryKeyValue.fromLong(30000) + ); + requestInt.setSplitPoints(pointsInt); + assertEquals(requestInt.getSplitPoints(), pointsInt); + + try { + requestInt.setSplitPoints(pointsNull); + fail(); + } catch (IllegalArgumentException e) { + assertEquals("The split-point list cannot be empty.", e.getMessage()); + } + + try { + requestInt.setSplitPoints(pointsNullList); + fail(); + } catch (IllegalArgumentException e) { + assertEquals("The split-point list cannot be empty.", e.getMessage()); + } + + try { + requestInt.setSplitPoints(Arrays.asList( + PrimaryKeyValue.fromLong(10000), + PrimaryKeyValue.INF_MIN, + PrimaryKeyValue.fromLong(30000) + )); + fail(); + } catch (IllegalArgumentException e) { + assertEquals("The split-point can't be set as an INF value.", e.getMessage()); + } + + try { + requestInt.setSplitPoints(Arrays.asList( + PrimaryKeyValue.fromLong(10000), + PrimaryKeyValue.INF_MAX, + PrimaryKeyValue.fromLong(30000) + )); + fail(); + } catch (IllegalArgumentException e) { + assertEquals("The split-point can't be set as an INF value.", e.getMessage()); + } + + try { + requestInt.setSplitPoints(Arrays.asList( + PrimaryKeyValue.fromLong(20000), + PrimaryKeyValue.fromLong(10000), + PrimaryKeyValue.fromLong(30000) + )); + fail(); + } catch (IllegalArgumentException e) { + assertEquals("The split-point list isn't strictly increasing.", e.getMessage()); + } + + try { + requestInt.setSplitPoints(Arrays.asList( + PrimaryKeyValue.fromLong(10000), + PrimaryKeyValue.fromString("fff"), + PrimaryKeyValue.fromBinary(new byte[]{100, 100, 100}) + )); + fail(); + } catch (IllegalArgumentException e) { + assertEquals("The split-point's type doesn't match the partition key's type.", e.getMessage()); + } + + + TableMeta tableMetaStr = new TableMeta("TABLE_NAME"); + tableMetaStr.addPrimaryKeyColumn(new PrimaryKeySchema("PK", PrimaryKeyType.STRING)); + CreateTableRequestEx requestStr = new CreateTableRequestEx(tableMetaStr, new TableOptions()); + + List pointsStrEnglish = Arrays.asList( + PrimaryKeyValue.fromString("aaa"), + PrimaryKeyValue.fromString("fff"), + PrimaryKeyValue.fromString("zzz") + ); + requestStr.setSplitPoints(pointsStrEnglish); + assertEquals(requestStr.getSplitPoints(), pointsStrEnglish); + + List pointsStrChinese = Arrays.asList( + PrimaryKeyValue.fromString("中国"), + PrimaryKeyValue.fromString("法国") + ); + requestStr.setSplitPoints(pointsStrChinese); + assertEquals(requestStr.getSplitPoints(), pointsStrChinese); + + try { + requestStr.setSplitPoints(pointsNull); + fail(); + } catch (IllegalArgumentException e) { + assertEquals("The split-point list cannot be empty.", e.getMessage()); + } + + try { + requestStr.setSplitPoints(pointsNullList); + fail(); + } catch (IllegalArgumentException e) { + assertEquals("The split-point list cannot be empty.", e.getMessage()); + } + + try { + requestStr.setSplitPoints(Arrays.asList( + PrimaryKeyValue.fromString("aaa"), + PrimaryKeyValue.INF_MIN, + PrimaryKeyValue.fromString("zzz") + )); + fail(); + } catch (IllegalArgumentException e) { + assertEquals("The split-point can't be set as an INF value.", e.getMessage()); + } + + try { + requestStr.setSplitPoints(Arrays.asList( + PrimaryKeyValue.fromString("aaa"), + PrimaryKeyValue.INF_MAX, + PrimaryKeyValue.fromString("zzz") + )); + fail(); + } catch (IllegalArgumentException e) { + assertEquals("The split-point can't be set as an INF value.", e.getMessage()); + } + + try { + requestStr.setSplitPoints(Arrays.asList( + PrimaryKeyValue.fromString("fff"), + PrimaryKeyValue.fromString("aaa"), + PrimaryKeyValue.fromString("zzz") + )); + fail(); + } catch (IllegalArgumentException e) { + assertEquals("The split-point list isn't strictly increasing.", e.getMessage()); + } + + try { + requestStr.setSplitPoints(Arrays.asList( + PrimaryKeyValue.fromLong(10000), + PrimaryKeyValue.fromString("fff"), + PrimaryKeyValue.fromBinary(new byte[]{100, 100, 100}) + )); + fail(); + } catch (IllegalArgumentException e) { + assertEquals("The split-point's type doesn't match the partition key's type.", e.getMessage()); + } + + TableMeta tableMetaBin = new TableMeta("TABLE_NAME"); + tableMetaBin.addPrimaryKeyColumn(new PrimaryKeySchema("PK", PrimaryKeyType.BINARY)); + CreateTableRequestEx requestBin = new CreateTableRequestEx(tableMetaBin, new TableOptions()); + + List pointsBin = Arrays.asList( + PrimaryKeyValue.fromBinary(new byte[]{1,1,1}), + PrimaryKeyValue.fromBinary(new byte[]{50,50,50}), + PrimaryKeyValue.fromBinary(new byte[]{100,100,100}) + ); + requestBin.setSplitPoints(pointsBin); + assertEquals(pointsBin, requestBin.getSplitPoints()); + + try { + requestBin.setSplitPoints(pointsNull); + fail(); + } catch (IllegalArgumentException e) { + assertEquals("The split-point list cannot be empty.", e.getMessage()); + } + + + try { + requestBin.setSplitPoints(pointsNullList); + fail(); + } catch (IllegalArgumentException e) { + assertEquals("The split-point list cannot be empty.", e.getMessage()); + } + + + try { + requestBin.setSplitPoints(Arrays.asList( + PrimaryKeyValue.fromBinary(new byte[]{1,1,1}), + PrimaryKeyValue.INF_MIN, + PrimaryKeyValue.fromBinary(new byte[]{100,100,100}) + )); + fail(); + } catch (IllegalArgumentException e) { + assertEquals("The split-point can't be set as an INF value.", e.getMessage()); + } + + try { + requestBin.setSplitPoints(Arrays.asList( + PrimaryKeyValue.fromBinary(new byte[]{1,1,1}), + PrimaryKeyValue.INF_MAX, + PrimaryKeyValue.fromBinary(new byte[]{100,100,100}) + )); + fail(); + } catch (IllegalArgumentException e) { + assertEquals("The split-point can't be set as an INF value.", e.getMessage()); + } + + try { + requestBin.setSplitPoints(Arrays.asList( + PrimaryKeyValue.fromBinary(new byte[]{50, 50, 50}), + PrimaryKeyValue.fromBinary(new byte[]{1, 1 ,1}), + PrimaryKeyValue.fromBinary(new byte[]{100,100,100}) + )); + fail(); + } catch (IllegalArgumentException e) { + assertEquals("The split-point list isn't strictly increasing.", e.getMessage()); + } + + try { + requestBin.setSplitPoints(Arrays.asList( + PrimaryKeyValue.fromLong(10000), + PrimaryKeyValue.fromString("fff"), + PrimaryKeyValue.fromBinary(new byte[]{100, 100, 100}) + )); + fail(); + } catch (IllegalArgumentException e) { + assertEquals("The split-point's type doesn't match the partition key's type.", e.getMessage()); + } + + } + +} diff --git a/src/test/java/com/alicloud/openservices/tablestore/model/UnifiedConditionalUpdateTest.java b/src/test/java/com/alicloud/openservices/tablestore/model/UnifiedConditionalUpdateTest.java index db2e834..ca42217 100644 --- a/src/test/java/com/alicloud/openservices/tablestore/model/UnifiedConditionalUpdateTest.java +++ b/src/test/java/com/alicloud/openservices/tablestore/model/UnifiedConditionalUpdateTest.java @@ -249,35 +249,14 @@ public void testTransactionalUpdate() throws Exception { public void testLimits() throws Exception { CreateTable(); - // column condition count <= 10 + // column condition count <= 32 CompositeColumnValueCondition cond = new CompositeColumnValueCondition(CompositeColumnValueCondition.LogicOperator.OR); - cond.addCondition(new SingleColumnValueCondition( - "ColX1", SingleColumnValueCondition.CompareOperator.EQUAL, - ColumnValue.fromString("ValueX"))) - .addCondition(new SingleColumnValueCondition( - "ColX2", SingleColumnValueCondition.CompareOperator.EQUAL, - ColumnValue.fromString("ValueX"))) - .addCondition(new SingleColumnValueCondition( - "ColX3", SingleColumnValueCondition.CompareOperator.EQUAL, - ColumnValue.fromString("ValueX"))) - .addCondition(new SingleColumnValueCondition( - "ColX4", SingleColumnValueCondition.CompareOperator.EQUAL, - ColumnValue.fromString("ValueX"))) - .addCondition(new SingleColumnValueCondition( - "ColX5", SingleColumnValueCondition.CompareOperator.EQUAL, - ColumnValue.fromString("ValueX"))) - .addCondition(new SingleColumnValueCondition( - "ColX6", SingleColumnValueCondition.CompareOperator.EQUAL, - ColumnValue.fromString("ValueX"))) - .addCondition(new SingleColumnValueCondition( - "ColX7", SingleColumnValueCondition.CompareOperator.EQUAL, - ColumnValue.fromString("ValueX"))) - .addCondition(new SingleColumnValueCondition( - "ColX8", SingleColumnValueCondition.CompareOperator.EQUAL, - ColumnValue.fromString("ValueX"))) - .addCondition(new SingleColumnValueCondition( - "ColX9", SingleColumnValueCondition.CompareOperator.EQUAL, - ColumnValue.fromString("ValueX"))); + for (int i = 0; i < 31; i++) { + cond.addCondition(new SingleColumnValueCondition( + "ColX" + i, SingleColumnValueCondition.CompareOperator.EQUAL, + ColumnValue.fromString("ValueX") + )); + } boolean success = putRow(23, "Col1", ColumnValue.fromString("Value1"), cond); assertTrue(success); diff --git a/src/test/java/com/alicloud/openservices/tablestore/model/UnifiedFilterRestrictionAndParamCheckingTest.java b/src/test/java/com/alicloud/openservices/tablestore/model/UnifiedFilterRestrictionAndParamCheckingTest.java index 2944ea1..ec1ce44 100644 --- a/src/test/java/com/alicloud/openservices/tablestore/model/UnifiedFilterRestrictionAndParamCheckingTest.java +++ b/src/test/java/com/alicloud/openservices/tablestore/model/UnifiedFilterRestrictionAndParamCheckingTest.java @@ -34,7 +34,7 @@ public class UnifiedFilterRestrictionAndParamCheckingTest extends BaseFT { private static final int SECONDS_UNTIL_TABLE_READY = 10; - private static final int MAX_FILTER_COUNT = 10; + private static final int MAX_FILTER_COUNT = 32; @BeforeClass public static void classBefore() throws JsonSyntaxException, IOException { @@ -92,8 +92,10 @@ public Filter makeFilterWithMaxDepth(int depth, CompositeColumnValueFilter.Logic filterCount++; } - for (int i = filterCount; i < MAX_FILTER_COUNT; i++) { - lastFilter.addFilter(new SingleColumnValueFilter("ColumnD", SingleColumnValueFilter.CompareOperator.EQUAL, ColumnValue.fromBoolean(false))); + if (operator != CompositeColumnValueFilter.LogicOperator.NOT) { + for (int i = filterCount; i < MAX_FILTER_COUNT; i++) { + lastFilter.addFilter(new SingleColumnValueFilter("ColumnD", SingleColumnValueFilter.CompareOperator.EQUAL, ColumnValue.fromBoolean(false))); + } } return rootFilter; } @@ -197,7 +199,7 @@ public void testCompositeColumnValueFilter_ExceedMaxDepth_GetRow() { ots.getRow(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } // test AND @@ -209,7 +211,7 @@ public void testCompositeColumnValueFilter_ExceedMaxDepth_GetRow() { ots.getRow(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } // test NOT @@ -221,7 +223,7 @@ public void testCompositeColumnValueFilter_ExceedMaxDepth_GetRow() { ots.getRow(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } } @@ -251,7 +253,7 @@ public void testCompositeColumnValueFilter_ExceedMaxDepth_GetRange() { ots.getRange(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } // test AND @@ -262,7 +264,7 @@ public void testCompositeColumnValueFilter_ExceedMaxDepth_GetRange() { ots.getRange(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } // test NOT @@ -273,7 +275,7 @@ public void testCompositeColumnValueFilter_ExceedMaxDepth_GetRange() { ots.getRange(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } } @@ -298,7 +300,7 @@ public void testCompositeColumnValueFilter_ExceedMaxDepth_BatchGetRow() { ots.batchGetRow(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } // test AND @@ -309,7 +311,7 @@ public void testCompositeColumnValueFilter_ExceedMaxDepth_BatchGetRow() { ots.batchGetRow(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } // test NOT @@ -320,7 +322,7 @@ public void testCompositeColumnValueFilter_ExceedMaxDepth_BatchGetRow() { ots.batchGetRow(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } } @@ -339,14 +341,14 @@ public void testCompositeColumnValueFilter_NotExceedMaxDepth_GetRow() { // test OR { try { - criteria.setFilter(makeFilterWithMaxDepth(6, CompositeColumnValueFilter.LogicOperator.OR)); + criteria.setFilter(makeFilterWithMaxDepth(20, CompositeColumnValueFilter.LogicOperator.OR)); criteria.setMaxVersions(1); GetRowRequest request = new GetRowRequest(); request.setRowQueryCriteria(criteria); ots.getRow(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } criteria.setFilter(makeFilterWithMaxDepth(5, CompositeColumnValueFilter.LogicOperator.OR)); @@ -358,14 +360,14 @@ public void testCompositeColumnValueFilter_NotExceedMaxDepth_GetRow() { // test AND { try { - criteria.setFilter(makeFilterWithMaxDepth(6, CompositeColumnValueFilter.LogicOperator.AND)); + criteria.setFilter(makeFilterWithMaxDepth(20, CompositeColumnValueFilter.LogicOperator.AND)); criteria.setMaxVersions(1); GetRowRequest request = new GetRowRequest(); request.setRowQueryCriteria(criteria); ots.getRow(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } criteria.setFilter(makeFilterWithMaxDepth(5, CompositeColumnValueFilter.LogicOperator.AND)); @@ -377,17 +379,17 @@ public void testCompositeColumnValueFilter_NotExceedMaxDepth_GetRow() { // test NOT { try { - criteria.setFilter(makeFilterWithMaxDepth(11, CompositeColumnValueFilter.LogicOperator.NOT)); + criteria.setFilter(makeFilterWithMaxDepth(33, CompositeColumnValueFilter.LogicOperator.NOT)); criteria.setMaxVersions(1); GetRowRequest request = new GetRowRequest(); request.setRowQueryCriteria(criteria); ots.getRow(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } - criteria.setFilter(makeFilterWithMaxDepth(10, CompositeColumnValueFilter.LogicOperator.NOT)); + criteria.setFilter(makeFilterWithMaxDepth(30, CompositeColumnValueFilter.LogicOperator.NOT)); GetRowRequest request = new GetRowRequest(); request.setRowQueryCriteria(criteria); ots.getRow(request); @@ -414,13 +416,14 @@ public void testCompositeColumnValueFilter_NotExceedMaxDepth_GetRange() { // test OR { try { - criteria.setFilter(makeFilterWithMaxDepth(6, CompositeColumnValueFilter.LogicOperator.OR)); + criteria.setFilter(makeFilterWithMaxDepth(32, CompositeColumnValueFilter.LogicOperator.OR)); + criteria.setMaxVersions(1); GetRangeRequest request = new GetRangeRequest(); request.setRangeRowQueryCriteria(criteria); ots.getRange(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } criteria.setFilter(makeFilterWithMaxDepth(5, CompositeColumnValueFilter.LogicOperator.OR)); @@ -433,13 +436,13 @@ public void testCompositeColumnValueFilter_NotExceedMaxDepth_GetRange() { // test AND { try { - criteria.setFilter(makeFilterWithMaxDepth(6, CompositeColumnValueFilter.LogicOperator.AND)); + criteria.setFilter(makeFilterWithMaxDepth(30, CompositeColumnValueFilter.LogicOperator.AND)); GetRangeRequest request = new GetRangeRequest(); request.setRangeRowQueryCriteria(criteria); ots.getRange(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } criteria.setFilter(makeFilterWithMaxDepth(5, CompositeColumnValueFilter.LogicOperator.AND)); @@ -451,13 +454,13 @@ public void testCompositeColumnValueFilter_NotExceedMaxDepth_GetRange() { // test NOT { try { - criteria.setFilter(makeFilterWithMaxDepth(11, CompositeColumnValueFilter.LogicOperator.NOT)); + criteria.setFilter(makeFilterWithMaxDepth(33, CompositeColumnValueFilter.LogicOperator.NOT)); GetRangeRequest request = new GetRangeRequest(); request.setRangeRowQueryCriteria(criteria); ots.getRange(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } criteria.setFilter(makeFilterWithMaxDepth(10, CompositeColumnValueFilter.LogicOperator.NOT)); @@ -486,13 +489,14 @@ public void testCompositeColumnValueFilter_NotExceedMaxDepth_BatchGetRow() { // test AND { try { - criteria.setFilter(makeFilterWithMaxDepth(6, CompositeColumnValueFilter.LogicOperator.AND)); + criteria.setFilter(makeFilterWithMaxDepth(32, CompositeColumnValueFilter.LogicOperator.AND)); + criteria.setMaxVersions(1); BatchGetRowRequest request = new BatchGetRowRequest(); request.addMultiRowQueryCriteria(criteria); BatchGetRowResponse Response = ots.batchGetRow(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } criteria.setFilter(makeFilterWithMaxDepth(5, CompositeColumnValueFilter.LogicOperator.AND)); @@ -506,13 +510,13 @@ public void testCompositeColumnValueFilter_NotExceedMaxDepth_BatchGetRow() { // test OR { try { - criteria.setFilter(makeFilterWithMaxDepth(6, CompositeColumnValueFilter.LogicOperator.OR)); + criteria.setFilter(makeFilterWithMaxDepth(32, CompositeColumnValueFilter.LogicOperator.OR)); BatchGetRowRequest request = new BatchGetRowRequest(); request.addMultiRowQueryCriteria(criteria); BatchGetRowResponse Response = ots.batchGetRow(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } criteria.setFilter(makeFilterWithMaxDepth(5, CompositeColumnValueFilter.LogicOperator.OR)); @@ -525,13 +529,13 @@ public void testCompositeColumnValueFilter_NotExceedMaxDepth_BatchGetRow() { // test NOT { try { - criteria.setFilter(makeFilterWithMaxDepth(11, CompositeColumnValueFilter.LogicOperator.NOT)); + criteria.setFilter(makeFilterWithMaxDepth(33, CompositeColumnValueFilter.LogicOperator.NOT)); BatchGetRowRequest request = new BatchGetRowRequest(); request.addMultiRowQueryCriteria(criteria); BatchGetRowResponse Response = ots.batchGetRow(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } criteria.setFilter(makeFilterWithMaxDepth(10, CompositeColumnValueFilter.LogicOperator.NOT)); @@ -562,7 +566,7 @@ public void testCompositeColumnValueFilter_ExceedMaxBreadth_GetRow() { ots.getRow(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } // test AND @@ -574,7 +578,7 @@ public void testCompositeColumnValueFilter_ExceedMaxBreadth_GetRow() { ots.getRow(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } // test NOT @@ -586,7 +590,7 @@ public void testCompositeColumnValueFilter_ExceedMaxBreadth_GetRow() { ots.getRow(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } } @@ -616,7 +620,7 @@ public void testCompositeColumnValueFilter_ExceedMaxBreadth_GetRange() { ots.getRange(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } // test AND @@ -628,7 +632,7 @@ public void testCompositeColumnValueFilter_ExceedMaxBreadth_GetRange() { ots.getRange(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } // test NOT @@ -640,7 +644,7 @@ public void testCompositeColumnValueFilter_ExceedMaxBreadth_GetRange() { ots.getRange(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } } @@ -666,7 +670,7 @@ public void testCompositeColumnValueFilter_ExceedMaxBreadth_BatchGetRow() { ots.batchGetRow(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } // test AND @@ -678,7 +682,7 @@ public void testCompositeColumnValueFilter_ExceedMaxBreadth_BatchGetRow() { ots.batchGetRow(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } // test NOT @@ -690,7 +694,7 @@ public void testCompositeColumnValueFilter_ExceedMaxBreadth_BatchGetRow() { ots.batchGetRow(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } } @@ -715,7 +719,7 @@ public void testCompositeColumnValueFilterInBinaryTree_ExceedMaxCount_GetRow() { ots.getRow(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } // test AND @@ -727,7 +731,7 @@ public void testCompositeColumnValueFilterInBinaryTree_ExceedMaxCount_GetRow() { ots.getRow(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } // test NOT @@ -739,7 +743,7 @@ public void testCompositeColumnValueFilterInBinaryTree_ExceedMaxCount_GetRow() { ots.getRow(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } } @@ -769,7 +773,7 @@ public void testCompositeColumnValueFilterInBinaryTree_ExceedMaxCount_GetRange() ots.getRange(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } // test AND @@ -781,7 +785,7 @@ public void testCompositeColumnValueFilterInBinaryTree_ExceedMaxCount_GetRange() ots.getRange(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } // test NOT @@ -793,7 +797,7 @@ public void testCompositeColumnValueFilterInBinaryTree_ExceedMaxCount_GetRange() ots.getRange(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } } @@ -819,7 +823,7 @@ public void testCompositeColumnValueFilterInBinaryTreeExceedMaxCount_BatchGetRow ots.batchGetRow(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } // test AND @@ -831,7 +835,7 @@ public void testCompositeColumnValueFilterInBinaryTreeExceedMaxCount_BatchGetRow ots.batchGetRow(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } // test NOT @@ -843,7 +847,7 @@ public void testCompositeColumnValueFilterInBinaryTreeExceedMaxCount_BatchGetRow ots.batchGetRow(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } } @@ -862,14 +866,14 @@ public void testCompositeColumnValueFilter_NotExceedMaxBreadth_GetRow() { // test OR { try { - criteria.setFilter(makeFilterWithMaxBreadth(11, CompositeColumnValueFilter.LogicOperator.OR)); + criteria.setFilter(makeFilterWithMaxBreadth(33, CompositeColumnValueFilter.LogicOperator.OR)); criteria.setMaxVersions(1); GetRowRequest request = new GetRowRequest(); request.setRowQueryCriteria(criteria); ots.getRow(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } criteria.setFilter(makeFilterWithMaxBreadth(10, CompositeColumnValueFilter.LogicOperator.OR)); GetRowRequest request = new GetRowRequest(); @@ -880,14 +884,14 @@ public void testCompositeColumnValueFilter_NotExceedMaxBreadth_GetRow() { // test NOT { try { - criteria.setFilter(makeFilterWithMaxBreadth(11, CompositeColumnValueFilter.LogicOperator.NOT)); + criteria.setFilter(makeFilterWithMaxBreadth(33, CompositeColumnValueFilter.LogicOperator.NOT)); criteria.setMaxVersions(1); GetRowRequest request = new GetRowRequest(); request.setRowQueryCriteria(criteria); ots.getRow(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } // 广度优先无法使用NOT,NOT只允许一个Filter @@ -896,14 +900,14 @@ public void testCompositeColumnValueFilter_NotExceedMaxBreadth_GetRow() { // test AND { try { - criteria.setFilter(makeFilterWithMaxBreadth(11, CompositeColumnValueFilter.LogicOperator.AND)); + criteria.setFilter(makeFilterWithMaxBreadth(33, CompositeColumnValueFilter.LogicOperator.AND)); criteria.setMaxVersions(1); GetRowRequest request = new GetRowRequest(); request.setRowQueryCriteria(criteria); ots.getRow(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } criteria.setFilter(makeFilterWithMaxBreadth(10, CompositeColumnValueFilter.LogicOperator.AND)); @@ -933,14 +937,14 @@ public void testCompositeColumnValueFilter_NotExceedMaxBreadth_GetRange() { // test OR { try { - criteria.setFilter(makeFilterWithMaxBreadth(11, CompositeColumnValueFilter.LogicOperator.OR)); + criteria.setFilter(makeFilterWithMaxBreadth(33, CompositeColumnValueFilter.LogicOperator.OR)); criteria.setMaxVersions(1); GetRangeRequest request = new GetRangeRequest(); request.setRangeRowQueryCriteria(criteria); ots.getRange(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } @@ -953,14 +957,14 @@ public void testCompositeColumnValueFilter_NotExceedMaxBreadth_GetRange() { // test AND { try { - criteria.setFilter(makeFilterWithMaxBreadth(11, CompositeColumnValueFilter.LogicOperator.AND)); + criteria.setFilter(makeFilterWithMaxBreadth(33, CompositeColumnValueFilter.LogicOperator.AND)); criteria.setMaxVersions(1); GetRangeRequest request = new GetRangeRequest(); request.setRangeRowQueryCriteria(criteria); ots.getRange(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } criteria.setFilter(makeFilterWithMaxBreadth(10, CompositeColumnValueFilter.LogicOperator.OR)); GetRangeRequest request = new GetRangeRequest(); @@ -971,14 +975,14 @@ public void testCompositeColumnValueFilter_NotExceedMaxBreadth_GetRange() { // test NOT { try { - criteria.setFilter(makeFilterWithMaxBreadth(11, CompositeColumnValueFilter.LogicOperator.NOT)); + criteria.setFilter(makeFilterWithMaxBreadth(33, CompositeColumnValueFilter.LogicOperator.NOT)); criteria.setMaxVersions(1); GetRangeRequest request = new GetRangeRequest(); request.setRangeRowQueryCriteria(criteria); ots.getRange(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } criteria.setFilter(makeFilterWithMaxBreadth(10, CompositeColumnValueFilter.LogicOperator.OR)); GetRangeRequest request = new GetRangeRequest(); @@ -1003,14 +1007,14 @@ public void testCompositeColumnValueFilter_NotExceedMaxBreadth_BatchGetRow() { // test OR { try { - criteria.setFilter(makeFilterWithMaxBreadth(11, CompositeColumnValueFilter.LogicOperator.OR)); + criteria.setFilter(makeFilterWithMaxBreadth(33, CompositeColumnValueFilter.LogicOperator.OR)); criteria.setMaxVersions(1); BatchGetRowRequest request = new BatchGetRowRequest(); request.addMultiRowQueryCriteria(criteria); ots.batchGetRow(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } criteria.setFilter(makeFilterWithMaxBreadth(10, CompositeColumnValueFilter.LogicOperator.AND)); BatchGetRowRequest request = new BatchGetRowRequest(); @@ -1022,14 +1026,14 @@ public void testCompositeColumnValueFilter_NotExceedMaxBreadth_BatchGetRow() { // test AND { try { - criteria.setFilter(makeFilterWithMaxBreadth(11, CompositeColumnValueFilter.LogicOperator.AND)); + criteria.setFilter(makeFilterWithMaxBreadth(33, CompositeColumnValueFilter.LogicOperator.AND)); criteria.setMaxVersions(1); BatchGetRowRequest request = new BatchGetRowRequest(); request.addMultiRowQueryCriteria(criteria); ots.batchGetRow(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } criteria.setFilter(makeFilterWithMaxBreadth(10, CompositeColumnValueFilter.LogicOperator.AND)); BatchGetRowRequest request = new BatchGetRowRequest(); @@ -1041,14 +1045,14 @@ public void testCompositeColumnValueFilter_NotExceedMaxBreadth_BatchGetRow() { // test NOT { try { - criteria.setFilter(makeFilterWithMaxBreadth(11, CompositeColumnValueFilter.LogicOperator.NOT)); + criteria.setFilter(makeFilterWithMaxBreadth(33, CompositeColumnValueFilter.LogicOperator.NOT)); criteria.setMaxVersions(1); BatchGetRowRequest request = new BatchGetRowRequest(); request.addMultiRowQueryCriteria(criteria); ots.batchGetRow(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } criteria.setFilter(makeFilterWithMaxBreadth(10, CompositeColumnValueFilter.LogicOperator.AND)); BatchGetRowRequest request = new BatchGetRowRequest(); @@ -1073,14 +1077,14 @@ public void testCompositeColumnValueFilterInBinaryTree_NotExceedMaxCount_GetRow( // test OR { try { - criteria.setFilter(makeFilterInBinaryForm(11, CompositeColumnValueFilter.LogicOperator.OR)); + criteria.setFilter(makeFilterInBinaryForm(33, CompositeColumnValueFilter.LogicOperator.OR)); criteria.setMaxVersions(1); GetRowRequest request = new GetRowRequest(); request.setRowQueryCriteria(criteria); ots.getRow(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } criteria.setFilter(makeFilterWithMaxBreadth(10, CompositeColumnValueFilter.LogicOperator.OR)); GetRowRequest request = new GetRowRequest(); @@ -1091,14 +1095,14 @@ public void testCompositeColumnValueFilterInBinaryTree_NotExceedMaxCount_GetRow( // test AND { try { - criteria.setFilter(makeFilterInBinaryForm(11, CompositeColumnValueFilter.LogicOperator.AND)); + criteria.setFilter(makeFilterInBinaryForm(33, CompositeColumnValueFilter.LogicOperator.AND)); criteria.setMaxVersions(1); GetRowRequest request = new GetRowRequest(); request.setRowQueryCriteria(criteria); ots.getRow(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } criteria.setFilter(makeFilterWithMaxBreadth(10, CompositeColumnValueFilter.LogicOperator.OR)); GetRowRequest request = new GetRowRequest(); @@ -1109,13 +1113,13 @@ public void testCompositeColumnValueFilterInBinaryTree_NotExceedMaxCount_GetRow( // test NOT { try { - criteria.setFilter(makeFilterInBinaryForm(11, CompositeColumnValueFilter.LogicOperator.NOT)); + criteria.setFilter(makeFilterInBinaryForm(33, CompositeColumnValueFilter.LogicOperator.NOT)); GetRowRequest request = new GetRowRequest(); request.setRowQueryCriteria(criteria); ots.getRow(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } criteria.setFilter(makeFilterWithMaxBreadth(10, CompositeColumnValueFilter.LogicOperator.OR)); GetRowRequest request = new GetRowRequest(); @@ -1144,14 +1148,14 @@ public void testCompositeColumnValueFilterInBinaryTree_NotExceedMaxCount_GetRang // test OR { try { - criteria.setFilter(makeFilterInBinaryForm(11, CompositeColumnValueFilter.LogicOperator.OR)); + criteria.setFilter(makeFilterInBinaryForm(33, CompositeColumnValueFilter.LogicOperator.OR)); criteria.setMaxVersions(1); GetRangeRequest request = new GetRangeRequest(); request.setRangeRowQueryCriteria(criteria); ots.getRange(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } criteria.setFilter(makeFilterInBinaryForm(10, CompositeColumnValueFilter.LogicOperator.OR)); GetRangeRequest request = new GetRangeRequest(); @@ -1162,14 +1166,14 @@ public void testCompositeColumnValueFilterInBinaryTree_NotExceedMaxCount_GetRang // test AND { try { - criteria.setFilter(makeFilterInBinaryForm(11, CompositeColumnValueFilter.LogicOperator.AND)); + criteria.setFilter(makeFilterInBinaryForm(33, CompositeColumnValueFilter.LogicOperator.AND)); criteria.setMaxVersions(1); GetRangeRequest request = new GetRangeRequest(); request.setRangeRowQueryCriteria(criteria); ots.getRange(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } criteria.setFilter(makeFilterInBinaryForm(10, CompositeColumnValueFilter.LogicOperator.AND)); GetRangeRequest request = new GetRangeRequest(); @@ -1194,14 +1198,14 @@ public void testCompositeColumnValueFilterInBinaryTree_NotExceedMaxCount_BatchGe // test OR { try { - criteria.setFilter(makeFilterInBinaryForm(11, CompositeColumnValueFilter.LogicOperator.OR)); + criteria.setFilter(makeFilterInBinaryForm(33, CompositeColumnValueFilter.LogicOperator.OR)); criteria.setMaxVersions(1); BatchGetRowRequest request = new BatchGetRowRequest(); request.addMultiRowQueryCriteria(criteria); ots.batchGetRow(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } criteria.setFilter(makeFilterInBinaryForm(10, CompositeColumnValueFilter.LogicOperator.OR)); BatchGetRowRequest request = new BatchGetRowRequest(); @@ -1212,14 +1216,14 @@ public void testCompositeColumnValueFilterInBinaryTree_NotExceedMaxCount_BatchGe // test AND { try { - criteria.setFilter(makeFilterInBinaryForm(11, CompositeColumnValueFilter.LogicOperator.AND)); + criteria.setFilter(makeFilterInBinaryForm(33, CompositeColumnValueFilter.LogicOperator.AND)); criteria.setMaxVersions(1); BatchGetRowRequest request = new BatchGetRowRequest(); request.addMultiRowQueryCriteria(criteria); ots.batchGetRow(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } criteria.setFilter(makeFilterInBinaryForm(10, CompositeColumnValueFilter.LogicOperator.AND)); BatchGetRowRequest request = new BatchGetRowRequest(); @@ -1231,14 +1235,14 @@ public void testCompositeColumnValueFilterInBinaryTree_NotExceedMaxCount_BatchGe // test NOT { try { - criteria.setFilter(makeFilterInBinaryForm(11, CompositeColumnValueFilter.LogicOperator.NOT)); + criteria.setFilter(makeFilterInBinaryForm(33, CompositeColumnValueFilter.LogicOperator.NOT)); criteria.setMaxVersions(1); BatchGetRowRequest request = new BatchGetRowRequest(); request.addMultiRowQueryCriteria(criteria); ots.batchGetRow(request); fail(); } catch (TableStoreException e) { - assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 10.", 400, e); + assertTableStoreException(ErrorCode.INVALID_PARAMETER, "The count of filter exceeds the max: 32.", 400, e); } } } diff --git a/src/test/java/com/alicloud/openservices/tablestore/model/filter/TestSingleColumnValueRegexFilter.java b/src/test/java/com/alicloud/openservices/tablestore/model/filter/TestSingleColumnValueRegexFilter.java new file mode 100644 index 0000000..9b15e9d --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/model/filter/TestSingleColumnValueRegexFilter.java @@ -0,0 +1,232 @@ +package com.alicloud.openservices.tablestore.model.filter; + +import com.alicloud.openservices.tablestore.core.protocol.OtsFilter; +import com.alicloud.openservices.tablestore.core.protocol.OTSProtocolBuilder; +import com.alicloud.openservices.tablestore.model.ColumnValue; +import com.alicloud.openservices.tablestore.model.filter.CompositeColumnValueFilter; + +import org.junit.Test; + +import com.google.protobuf.ByteString; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.fail; + +public class TestSingleColumnValueRegexFilter { + + @Test + public void testSetExistComparator() { + RegexRule rule = new RegexRule("xx^regex", RegexRule.CastType.VT_STRING); + SingleColumnValueRegexFilter filter = new SingleColumnValueRegexFilter( + "column", + rule, + SingleColumnValueRegexFilter.CompareOperator.EXIST); + assertEquals(filter.getOperator(), SingleColumnValueRegexFilter.CompareOperator.EXIST); + } + + @Test + public void testSetValueTransferRule() { + RegexRule rule = new RegexRule("xx^regex", RegexRule.CastType.VT_STRING); + SingleColumnValueRegexFilter filter = new SingleColumnValueRegexFilter( + "column", + rule, + SingleColumnValueRegexFilter.CompareOperator.EXIST); + assertEquals(filter.hasRegexRule(), true); + RegexRule rule1 = filter.getRegexRule(); + assertEquals(rule1.getCastType(), RegexRule.CastType.VT_STRING); + assertEquals(rule1.getRegex(), "xx^regex"); + } + + @Test + public void testValueTransferRuleSerial() { + RegexRule rule = new RegexRule("TEST001xx^regex", RegexRule.CastType.VT_DOUBLE); + SingleColumnValueRegexFilter filter = new SingleColumnValueRegexFilter( + "column001", + rule, + SingleColumnValueRegexFilter.CompareOperator.EXIST); + RegexRule rule1 = filter.getRegexRule(); + OtsFilter.ValueTransferRule pbRule = rule.serialize(); + System.out.println(pbRule.toString()); + assertEquals(pbRule.getRegex(), "TEST001xx^regex"); + assertEquals(pbRule.getCastType(), OtsFilter.VariantType.VT_DOUBLE); + } + + @Test + public void testBuildPBFilter() { + RegexRule rule = new RegexRule("BuildPBFilter:^regex", RegexRule.CastType.VT_DOUBLE); + SingleColumnValueRegexFilter filter = new SingleColumnValueRegexFilter( + "column002", + rule, + SingleColumnValueRegexFilter.CompareOperator.NOT_EXIST); + ByteString pbString = OTSProtocolBuilder.buildSingleColumnValueRegexFilter(filter); + try { + OtsFilter.SingleColumnValueFilter filter1 = OtsFilter.SingleColumnValueFilter.parseFrom(pbString); + System.out.println(filter1.toString()); + } catch (com.google.protobuf.InvalidProtocolBufferException e) {} + } + + @Test + public void testValueCompare() { + RegexRule rule = new RegexRule("xxx([0-9]+)yyy", RegexRule.CastType.VT_INTEGER); + SingleColumnValueRegexFilter filter = new SingleColumnValueRegexFilter( + "columnA", + rule, + SingleColumnValueRegexFilter.CompareOperator.GREATER_EQUAL, + ColumnValue.fromLong(5858)); + ByteString pbString = OTSProtocolBuilder.buildSingleColumnValueRegexFilter(filter); + try { + OtsFilter.SingleColumnValueFilter filter1 = OtsFilter.SingleColumnValueFilter.parseFrom(pbString); + System.out.println(filter1.toString()); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + assertEquals(0, 1); + } + } + + @Test + public void testValueTransferSuccessExpectancy() { + RegexRule rule = new RegexRule("xxx([0-9]+)yyy", RegexRule.CastType.VT_INTEGER); + SingleColumnValueRegexFilter filter = new SingleColumnValueRegexFilter( + "columnA", + rule, + SingleColumnValueRegexFilter.CompareOperator.EXIST); + + SingleColumnValueRegexFilter filter1 = new SingleColumnValueRegexFilter( + "columnA", + SingleColumnValueRegexFilter.CompareOperator.NOT_EXIST); + + CompositeColumnValueFilter cfilter = new CompositeColumnValueFilter( + CompositeColumnValueFilter.LogicOperator.OR); + cfilter.addFilter(filter); + cfilter.addFilter(filter1); + ByteString pbString = OTSProtocolBuilder.buildCompositeColumnValueFilter(cfilter); + try { + OtsFilter.CompositeColumnValueFilter cfiler = OtsFilter.CompositeColumnValueFilter.parseFrom(pbString); + System.out.println(cfiler.toString()); + + assertEquals(cfiler.getSubFiltersCount(), 2); + for (OtsFilter.Filter f : cfiler.getSubFiltersList()) { + assertEquals(f.getType(), OtsFilter.FilterType.FT_SINGLE_COLUMN_VALUE); + System.out.println("SubFilter:"); + ByteString pbStr = f.getFilter(); + OtsFilter.SingleColumnValueFilter f1 = OtsFilter.SingleColumnValueFilter.parseFrom(pbStr); + System.out.println(f1.toString()); + if (f1.hasValueTransRule()) { + assertEquals(f1.getComparator(), OtsFilter.ComparatorType.CT_EXIST); + } else { + assertEquals(f1.getComparator(), OtsFilter.ComparatorType.CT_NOT_EXIST); + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) {} + } + + @Test + public void testValueTransferFailExpectancy() { + RegexRule rule = new RegexRule("xxx([0-9]+)yyy", RegexRule.CastType.VT_DOUBLE); + SingleColumnValueRegexFilter filter = new SingleColumnValueRegexFilter( + "columnA", + rule, + SingleColumnValueRegexFilter.CompareOperator.NOT_EXIST); + + SingleColumnValueRegexFilter filter1 = new SingleColumnValueRegexFilter( + "columnA", + SingleColumnValueRegexFilter.CompareOperator.NOT_EXIST); + + CompositeColumnValueFilter cfilter = new CompositeColumnValueFilter( + CompositeColumnValueFilter.LogicOperator.OR); + cfilter.addFilter(filter); + cfilter.addFilter(filter1); + ByteString pbString = OTSProtocolBuilder.buildCompositeColumnValueFilter(cfilter); + try { + OtsFilter.CompositeColumnValueFilter cfiler = OtsFilter.CompositeColumnValueFilter.parseFrom(pbString); + System.out.println(cfiler.toString()); + + assertEquals(cfiler.getSubFiltersCount(), 2); + for (OtsFilter.Filter f : cfiler.getSubFiltersList()) { + assertEquals(f.getType(), OtsFilter.FilterType.FT_SINGLE_COLUMN_VALUE); + System.out.println("SubFilter:"); + ByteString pbStr = f.getFilter(); + OtsFilter.SingleColumnValueFilter f1 = OtsFilter.SingleColumnValueFilter.parseFrom(pbStr); + System.out.println(f1.toString()); + if (f1.hasValueTransRule()) { + assertEquals(f1.getComparator(), OtsFilter.ComparatorType.CT_NOT_EXIST); + } else { + assertEquals(f1.getComparator(), OtsFilter.ComparatorType.CT_NOT_EXIST); + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) {} + } + + @Test + public void testValueTransferSuccessExpectancyOnly() { + RegexRule rule = new RegexRule("xxx([0-9]+)yyy", RegexRule.CastType.VT_INTEGER); + SingleColumnValueRegexFilter filter = new SingleColumnValueRegexFilter( + "columnA", + rule, + SingleColumnValueRegexFilter.CompareOperator.EXIST); + + SingleColumnValueRegexFilter filter1 = new SingleColumnValueRegexFilter( + "columnA", + SingleColumnValueRegexFilter.CompareOperator.EXIST); + + CompositeColumnValueFilter cfilter = new CompositeColumnValueFilter( + CompositeColumnValueFilter.LogicOperator.AND); + cfilter.addFilter(filter); + cfilter.addFilter(filter1); + ByteString pbString = OTSProtocolBuilder.buildCompositeColumnValueFilter(cfilter); + try { + OtsFilter.CompositeColumnValueFilter cfiler = OtsFilter.CompositeColumnValueFilter.parseFrom(pbString); + System.out.println(cfiler.toString()); + + assertEquals(cfiler.getSubFiltersCount(), 2); + for (OtsFilter.Filter f : cfiler.getSubFiltersList()) { + assertEquals(f.getType(), OtsFilter.FilterType.FT_SINGLE_COLUMN_VALUE); + System.out.println("SubFilter:"); + ByteString pbStr = f.getFilter(); + OtsFilter.SingleColumnValueFilter f1 = OtsFilter.SingleColumnValueFilter.parseFrom(pbStr); + System.out.println(f1.toString()); + if (f1.hasValueTransRule()) { + assertEquals(f1.getComparator(), OtsFilter.ComparatorType.CT_EXIST); + } else { + assertEquals(f1.getComparator(), OtsFilter.ComparatorType.CT_EXIST); + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) {} + } + + @Test + public void testValueTransferFailExpectancyOnly() { + RegexRule rule = new RegexRule("xxx([0-9]+)yyy", RegexRule.CastType.VT_DOUBLE); + SingleColumnValueRegexFilter filter = new SingleColumnValueRegexFilter( + "columnA", + rule, + SingleColumnValueRegexFilter.CompareOperator.NOT_EXIST); + + SingleColumnValueRegexFilter filter1 = new SingleColumnValueRegexFilter( + "columnA", + SingleColumnValueRegexFilter.CompareOperator.EXIST); + + CompositeColumnValueFilter cfilter = new CompositeColumnValueFilter( + CompositeColumnValueFilter.LogicOperator.AND); + cfilter.addFilter(filter); + cfilter.addFilter(filter1); + ByteString pbString = OTSProtocolBuilder.buildCompositeColumnValueFilter(cfilter); + try { + OtsFilter.CompositeColumnValueFilter cfiler = OtsFilter.CompositeColumnValueFilter.parseFrom(pbString); + System.out.println(cfiler.toString()); + + assertEquals(cfiler.getSubFiltersCount(), 2); + for (OtsFilter.Filter f : cfiler.getSubFiltersList()) { + assertEquals(f.getType(), OtsFilter.FilterType.FT_SINGLE_COLUMN_VALUE); + System.out.println("SubFilter:"); + ByteString pbStr = f.getFilter(); + OtsFilter.SingleColumnValueFilter f1 = OtsFilter.SingleColumnValueFilter.parseFrom(pbStr); + System.out.println(f1.toString()); + if (f1.hasValueTransRule()) { + assertEquals(f1.getComparator(), OtsFilter.ComparatorType.CT_NOT_EXIST); + } else { + assertEquals(f1.getComparator(), OtsFilter.ComparatorType.CT_EXIST); + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) {} + } +} diff --git a/src/test/java/com/alicloud/openservices/tablestore/model/search/CreateSearchIndexRequestTest.java b/src/test/java/com/alicloud/openservices/tablestore/model/search/CreateSearchIndexRequestTest.java new file mode 100644 index 0000000..ef832a7 --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/model/search/CreateSearchIndexRequestTest.java @@ -0,0 +1,70 @@ +package com.alicloud.openservices.tablestore.model.search; + +import com.alicloud.openservices.tablestore.core.protocol.BaseSearchTest; +import org.junit.Assert; +import org.junit.Test; + +import java.util.concurrent.TimeUnit; + + +public class CreateSearchIndexRequestTest extends BaseSearchTest { + + @Test + public void testSetTTL() { + // normal + { + String table = randomString(10); + String index = randomString(10); + CreateSearchIndexRequest request = new CreateSearchIndexRequest(table, index); + int ttl = random().nextInt(50) + 1; + request.setTimeToLiveInDays(ttl); + Assert.assertEquals(request.getTimeToLive().intValue(), (int) TimeUnit.DAYS.toSeconds(ttl)); + } + // -1 + { + { + CreateSearchIndexRequest request = new CreateSearchIndexRequest("table", "index"); + request.setTimeToLiveInDays(-1); + Assert.assertEquals(-1, request.getTimeToLive().intValue()); + } + { + CreateSearchIndexRequest request = new CreateSearchIndexRequest("table", "index"); + request.setTimeToLive(-1, TimeUnit.SECONDS); + Assert.assertEquals(-1, request.getTimeToLive().intValue()); + } + } + // not set + { + String table = randomString(10); + String index = randomString(10); + CreateSearchIndexRequest request = new CreateSearchIndexRequest(table, index); + Assert.assertNull(request.getTimeToLive()); + } + // illegal ttl + { + String table = randomString(10); + String index = randomString(10); + CreateSearchIndexRequest request = new CreateSearchIndexRequest(table, index); + try { + request.setTimeToLiveInDays(Integer.MAX_VALUE); + Assert.fail(); + } catch (Exception e) { + Assert.assertEquals(e.getClass(), ArithmeticException.class); + } + try { + request.setTimeToLiveInDays(0); + Assert.fail(); + } catch (Exception e) { + Assert.assertEquals(e.getClass(), IllegalArgumentException.class); + Assert.assertEquals("The value of timeToLive can be -1 or any positive value.", e.getMessage()); + } + try { + request.setTimeToLiveInDays(-2); + Assert.fail(); + } catch (Exception e) { + Assert.assertEquals("The value of timeToLive can be -1 or any positive value.", e.getMessage()); + Assert.assertEquals(e.getClass(), IllegalArgumentException.class); + } + } + } +} \ No newline at end of file diff --git a/src/test/java/com/alicloud/openservices/tablestore/model/search/ParallelScanRequestTest.java b/src/test/java/com/alicloud/openservices/tablestore/model/search/ParallelScanRequestTest.java new file mode 100644 index 0000000..80c6a63 --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/model/search/ParallelScanRequestTest.java @@ -0,0 +1,29 @@ +package com.alicloud.openservices.tablestore.model.search; + +import com.alicloud.openservices.tablestore.core.protocol.BaseSearchTest; +import org.junit.Assert; +import org.junit.Test; + +public class ParallelScanRequestTest extends BaseSearchTest { + @Test + public void testGetTimeoutInMillisecond() { + ParallelScanRequest req = ParallelScanRequest.newBuilder() + .timeout(12000) + .build(); + Assert.assertEquals(12000, req.getTimeoutInMillisecond()); + } + + @Test + public void testGetTimeoutInMillisecondDefault() { + ParallelScanRequest req = ParallelScanRequest.newBuilder() + .build(); + Assert.assertEquals(-1, req.getTimeoutInMillisecond()); + } + + @Test + public void testSetTimeoutInMillisecond() { + ParallelScanRequest req = new ParallelScanRequest(); + req.setTimeoutInMillisecond(59000); + Assert.assertEquals(59000, req.getTimeoutInMillisecond()); + } +} diff --git a/src/test/java/com/alicloud/openservices/tablestore/model/search/ScanQueryTest.java b/src/test/java/com/alicloud/openservices/tablestore/model/search/ScanQueryTest.java new file mode 100644 index 0000000..4e3b5bf --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/model/search/ScanQueryTest.java @@ -0,0 +1,119 @@ +package com.alicloud.openservices.tablestore.model.search; + +import com.alicloud.openservices.tablestore.core.protocol.BaseSearchTest; +import com.alicloud.openservices.tablestore.model.ColumnValue; +import com.alicloud.openservices.tablestore.model.search.query.QueryBuilders; +import com.alicloud.openservices.tablestore.model.search.query.RangeQuery; +import org.junit.Assert; +import org.junit.Test; + +public class ScanQueryTest extends BaseSearchTest { + + @Test + public void testGetSetLimit() { + ScanQuery s1 = new ScanQuery(); + s1.setLimit(99); + ParallelScanRequest build1 = ParallelScanRequest.newBuilder().scanQuery(s1).build(); + + ScanQuery s2 = ScanQuery.newBuilder().limit(99).build(); + ParallelScanRequest build2 = ParallelScanRequest.newBuilder().scanQuery(s2).build(); + + Assert.assertEquals(build1.getRequestInfo(true), build2.getRequestInfo(true)); + Assert.assertNotSame(build1.getRequestInfo(true), build2.getRequestInfo(false)); + } + + @Test + public void testGetSetMaxParallel() { + ScanQuery s1 = new ScanQuery(); + s1.setMaxParallel(99); + ParallelScanRequest build1 = ParallelScanRequest.newBuilder().scanQuery(s1).build(); + + ScanQuery s2 = ScanQuery.newBuilder().maxParallel(99).build(); + ParallelScanRequest build2 = ParallelScanRequest.newBuilder().scanQuery(s2).build(); + + Assert.assertEquals(build1.getRequestInfo(true), build2.getRequestInfo(true)); + Assert.assertNotSame(build1.getRequestInfo(true), build2.getRequestInfo(false)); + } + + @Test + public void testGetSetCurrentParallelId() { + ScanQuery s1 = new ScanQuery(); + s1.setCurrentParallelId(99); + ParallelScanRequest build1 = ParallelScanRequest.newBuilder().scanQuery(s1).build(); + + ScanQuery s2 = ScanQuery.newBuilder().currentParallelId(99).build(); + ParallelScanRequest build2 = ParallelScanRequest.newBuilder().scanQuery(s2).build(); + + Assert.assertEquals(build1.getRequestInfo(true), build2.getRequestInfo(true)); + Assert.assertNotSame(build1.getRequestInfo(true), build2.getRequestInfo(false)); + } + + @Test + public void testGetSetAliveTime() { + ScanQuery s1 = new ScanQuery(); + s1.setAliveTime(99); + ParallelScanRequest build1 = ParallelScanRequest.newBuilder().scanQuery(s1).build(); + + ScanQuery s2 = ScanQuery.newBuilder().aliveTimeInSeconds(91119).aliveTimeInSeconds(99).build(); + ParallelScanRequest build2 = ParallelScanRequest.newBuilder().scanQuery(s2).build(); + + Assert.assertEquals(build1.getRequestInfo(true), build2.getRequestInfo(true)); + Assert.assertNotSame(build1.getRequestInfo(true), build2.getRequestInfo(false)); + } + + @Test + public void testGetAndSetQuery() { + ScanQuery s1 = new ScanQuery(); + RangeQuery query = new RangeQuery(); + query.setFieldName("f1"); + query.setFrom(ColumnValue.fromLong(123), true); + s1.setQuery(query); + ParallelScanRequest build1 = ParallelScanRequest.newBuilder().scanQuery(s1).build(); + + ScanQuery s2 = ScanQuery.newBuilder() + .query(QueryBuilders.range("f1").greaterThanOrEqual(123)) + .build(); + ParallelScanRequest build2 = ParallelScanRequest.newBuilder().scanQuery(s2).build(); + + Assert.assertEquals(build1.getRequestInfo(true), build2.getRequestInfo(true)); + Assert.assertNotSame(build1.getRequestInfo(true), build2.getRequestInfo(false)); + } + + @Test + public void testGetAndSetToken() { + ScanQuery s1 = new ScanQuery(); + s1.setToken("fsfsf".getBytes()); + ParallelScanRequest build1 = ParallelScanRequest.newBuilder().scanQuery(s1).build(); + + ScanQuery s2 = ScanQuery.newBuilder().token("fsfsf".getBytes()).build(); + ParallelScanRequest build2 = ParallelScanRequest.newBuilder().scanQuery(s2).build(); + + Assert.assertEquals(build1.getRequestInfo(true), build2.getRequestInfo(true)); + Assert.assertNotSame(build1.getRequestInfo(true), build2.getRequestInfo(false)); + } + + @Test + public void testGetAndSetNull() { + ScanQuery s1 = new ScanQuery(); + ParallelScanRequest build1 = ParallelScanRequest.newBuilder().scanQuery(s1).build(); + + ScanQuery s2 = ScanQuery.newBuilder().build(); + ParallelScanRequest build2 = ParallelScanRequest.newBuilder().scanQuery(s2).build(); + + Assert.assertEquals(build1.getRequestInfo(true), build2.getRequestInfo(true)); + Assert.assertNotSame(build1.getRequestInfo(true), build2.getRequestInfo(false)); + } + + @Test + public void testSessionId() { + ScanQuery s1 = new ScanQuery(); + ParallelScanRequest build1 = ParallelScanRequest.newBuilder().scanQuery(s1).sessionId("fsfsf".getBytes()).build(); + + ScanQuery s2 = ScanQuery.newBuilder().build(); + ParallelScanRequest build2 = new ParallelScanRequest(); + build2.setScanQuery(s2).setSessionId("fsfsf".getBytes()); + + Assert.assertEquals(build1.getRequestInfo(true), build2.getRequestInfo(true)); + Assert.assertNotSame(build1.getRequestInfo(true), build2.getRequestInfo(false)); + } +} diff --git a/src/test/java/com/alicloud/openservices/tablestore/model/search/SearchQueryTest.java b/src/test/java/com/alicloud/openservices/tablestore/model/search/SearchQueryTest.java new file mode 100644 index 0000000..48f280f --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/model/search/SearchQueryTest.java @@ -0,0 +1,355 @@ +package com.alicloud.openservices.tablestore.model.search; + +import com.alicloud.openservices.tablestore.core.protocol.BaseSearchTest; +import com.alicloud.openservices.tablestore.model.search.query.QueryType; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import com.alicloud.openservices.tablestore.model.ColumnValue; +import com.alicloud.openservices.tablestore.model.search.agg.AggregationBuilders; +import com.alicloud.openservices.tablestore.model.search.agg.AvgAggregation; +import com.alicloud.openservices.tablestore.model.search.agg.CountAggregation; +import com.alicloud.openservices.tablestore.model.search.agg.DistinctCountAggregation; +import com.alicloud.openservices.tablestore.model.search.agg.MaxAggregation; +import com.alicloud.openservices.tablestore.model.search.agg.MinAggregation; +import com.alicloud.openservices.tablestore.model.search.agg.SumAggregation; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupBy; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupByBuilders; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupByField; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupByField.Builder; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupByFilter; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupByGeoDistance; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupByRange; +import com.alicloud.openservices.tablestore.model.search.groupby.Range; +import com.alicloud.openservices.tablestore.model.search.query.QueryBuilders; +import com.alicloud.openservices.tablestore.model.search.query.RangeQuery; +import com.alicloud.openservices.tablestore.model.search.sort.FieldSort; +import com.alicloud.openservices.tablestore.model.search.sort.GeoDistanceSort; +import com.alicloud.openservices.tablestore.model.search.sort.PrimaryKeySort; +import com.alicloud.openservices.tablestore.model.search.sort.ScoreSort; +import com.alicloud.openservices.tablestore.model.search.sort.Sort; +import com.alicloud.openservices.tablestore.model.search.sort.Sort.Sorter; +import org.junit.Assert; +import org.junit.Test; + +/** + * SearchQuery Tester. + * + * @author + * @version 1.0 + * @since
9月 29, 2019
+ */ +public class SearchQueryTest extends BaseSearchTest { + + /** + * Method: getAggregationList() setAggregationList(List aggregationList) + */ + @Test + public void testAggregationList() { + MaxAggregation a1 = new MaxAggregation(); + a1.setAggName("a1"); + a1.setFieldName("f1"); + a1.setMissing(ColumnValue.fromLong(123)); + + AvgAggregation a2 = new AvgAggregation(); + a2.setAggName("a2"); + a2.setFieldName("f2"); + a2.setMissing(ColumnValue.fromLong(333)); + + CountAggregation a3 = new CountAggregation(); + a3.setAggName("a3"); + a3.setFieldName("f3"); + + MinAggregation a4 = new MinAggregation(); + a4.setAggName("a4"); + a4.setFieldName("f4"); + a4.setMissing(ColumnValue.fromLong(444)); + + DistinctCountAggregation a5 = new DistinctCountAggregation(); + a5.setAggName("a5"); + a5.setFieldName("f5"); + a5.setMissing(ColumnValue.fromLong(555)); + + SumAggregation a6 = new SumAggregation(); + a6.setAggName("a6"); + a6.setFieldName("f6"); + a6.setMissing(ColumnValue.fromLong(666)); + + SearchQuery s1 = new SearchQuery(); + s1.setAggregationList(Arrays.asList(a1, a2, a3, a4, a5, a6)); + SearchRequest build1 = SearchRequest.newBuilder().searchQuery(s1).build(); + + SearchQuery s2 = SearchQuery.newBuilder() + .addAggregation(AggregationBuilders.max("a1", "f1").missing(123)) + .addAggregation(AggregationBuilders.avg("a2", "f2").missing(333)) + .addAggregation(AggregationBuilders.count("a3", "f3")) + .addAggregation(AggregationBuilders.min("a4", "f4").missing(444)) + .addAggregation(AggregationBuilders.distinctCount("a5", "f5").missing(555)) + .addAggregation(AggregationBuilders.sum("a6", "f6").missing(666)) + .build(); + SearchRequest build2 = SearchRequest.newBuilder().searchQuery(s2).build(); + + Assert.assertEquals(build1.getRequestInfo(false), build2.getRequestInfo(false)); + Assert.assertNotSame(build1.getRequestInfo(true), build2.getRequestInfo(false)); + + } + + /** + * Method: getGroupByList() setGroupByList(List groupByList) + */ + @Test + public void testGroupByList() { + GroupByField g1 = new GroupByField(); + g1.setFieldName("g1"); + g1.setGroupByName("n1"); + g1.setSize(10); + g1.setSubAggregations(Arrays.asList(AggregationBuilders.max("m1", "m1").build(), + AggregationBuilders.count("m2", "m2").build(), + AggregationBuilders.count("m3", "m3").build())); + + GroupByGeoDistance g2 = new GroupByGeoDistance(); + g2.setFieldName("g2"); + g2.setGroupByName("n2"); + g2.setOrigin(new GeoPoint(1.3, 5.4333)); + g2.setRanges(Arrays.asList(new Range(111.1, 333.2), new Range(333.3, 222.4))); + g2.setSubAggregations(Arrays.asList(AggregationBuilders.max("m3", "m5").build(), + AggregationBuilders.count("m2", "m1").build(), + AggregationBuilders.count("m1", "m3").build())); + g2.setSubGroupBys(Collections.singletonList(g1)); + + GroupByRange g3 = new GroupByRange(); + g3.setFieldName("g3"); + g3.setGroupByName("n3"); + g3.setRanges(Arrays.asList(new Range(34.53, 333.2), new Range(3563.3, 42.4))); + g3.setSubAggregations(Arrays.asList(AggregationBuilders.max("m6", "m5").build(), + AggregationBuilders.count("m22", "m31").build(), + AggregationBuilders.count("m51", "m34").build())); + + GroupByFilter g4 = new GroupByFilter(); + g4.setGroupByName("n4"); + g4.setFilters(Arrays.asList(QueryBuilders.range("123").lessThan(123).build(), + QueryBuilders.match("123", "gdsga").build(), + QueryBuilders.matchAll().build())); + g4.setSubAggregations(Arrays.asList(AggregationBuilders.max("m3", "m5").build(), + AggregationBuilders.count("m2", "m1").build(), + AggregationBuilders.count("m1", "m3").build())); + g4.setSubGroupBys(Collections.singletonList(g1)); + g4.setSubGroupBys(Arrays.asList(g1, g2, g3)); + + SearchQuery s1 = new SearchQuery(); + s1.setGroupByList(Arrays.asList(g1, g2, g3, g4)); + SearchRequest build1 = SearchRequest.newBuilder().searchQuery(s1).build(); + + Builder builder1 = GroupByBuilders.groupByField("n1", "g1") + .size(10) + .addSubAggregation(AggregationBuilders.max("m1", "m1")) + .addSubAggregation(AggregationBuilders.count("m2", "m2")) + .addSubAggregation(AggregationBuilders.count("m3", "m3")); + + GroupByGeoDistance.Builder builder2 = GroupByBuilders.groupByGeoDistance("n2", "g2") + .origin(1.3, 5.4333) + .addRange(111.1, 333.2) + .addRange(333.3, 222.4) + .addSubAggregation(AggregationBuilders.max("m3", "m5")) + .addSubAggregation(AggregationBuilders.count("m2", "m1")) + .addSubAggregation(AggregationBuilders.count("m1", "m3")) + .addSubGroupBy(builder1); + + GroupByRange.Builder builder3 = GroupByBuilders.groupByRange("n3", "g3") + .addRange(34.53, 333.2) + .addRange(3563.3, 42.4) + .addSubAggregation(AggregationBuilders.max("m6", "m5")) + .addSubAggregation(AggregationBuilders.count("m22", "m31")) + .addSubAggregation(AggregationBuilders.count("m51", "m34")); + + GroupByFilter.Builder builder4 = GroupByBuilders.groupByFilter("n4") + .addFilter(QueryBuilders.range("123").lessThan(123)) + .addFilter(QueryBuilders.match("123", "gdsga")) + .addFilter(QueryBuilders.matchAll()) + .addSubAggregation(AggregationBuilders.max("m3", "m5")) + .addSubAggregation(AggregationBuilders.count("m2", "m1")) + .addSubAggregation(AggregationBuilders.count("m1", "m3")) + .addSubGroupBy(builder1) + .addSubGroupBy(builder2) + .addSubGroupBy(builder3); + + SearchQuery s2 = SearchQuery.newBuilder() + .addGroupBy(builder1) + .addGroupBy(builder2) + .addGroupBy(builder3) + .addGroupBy(builder4) + .build(); + SearchRequest build2 = SearchRequest.newBuilder().searchQuery(s2).build(); + Assert.assertEquals(build1.getRequestInfo(true), build2.getRequestInfo(true)); + Assert.assertNotSame(build1.getRequestInfo(true), build2.getRequestInfo(false)); + + } + + /** + * Method: getOffset() setOffset(Integer offset) + */ + @Test + public void testGetOffset() { + SearchQuery s1 = new SearchQuery(); + s1.setOffset(99); + SearchRequest build1 = SearchRequest.newBuilder().searchQuery(s1).build(); + + SearchQuery s2 = SearchQuery.newBuilder().offset(99).build(); + SearchRequest build2 = SearchRequest.newBuilder().searchQuery(s2).build(); + + Assert.assertEquals(build1.getRequestInfo(true), build2.getRequestInfo(true)); + Assert.assertNotSame(build1.getRequestInfo(true), build2.getRequestInfo(false)); + } + + /** + * Method: getLimit() setLimit(Integer limit) + */ + @Test + public void testGetSetLimit() { + SearchQuery s1 = new SearchQuery(); + s1.setLimit(99); + SearchRequest build1 = SearchRequest.newBuilder().searchQuery(s1).build(); + + SearchQuery s2 = SearchQuery.newBuilder().limit(99).build(); + SearchRequest build2 = SearchRequest.newBuilder().searchQuery(s2).build(); + + Assert.assertEquals(build1.getRequestInfo(true), build2.getRequestInfo(true)); + Assert.assertNotSame(build1.getRequestInfo(true), build2.getRequestInfo(false)); + } + + /** + * Method: getQuery() setQuery(Query query) + */ + @Test + public void testGetAndSetQuery() { + SearchQuery s1 = new SearchQuery(); + RangeQuery query = new RangeQuery(); + query.setFieldName("f1"); + query.setFrom(ColumnValue.fromLong(123), true); + s1.setQuery(query); + SearchRequest build1 = SearchRequest.newBuilder().searchQuery(s1).build(); + + SearchQuery s2 = SearchQuery.newBuilder() + .query(QueryBuilders.range("f1").greaterThanOrEqual(123)) + .build(); + SearchRequest build2 = SearchRequest.newBuilder().searchQuery(s2).build(); + + Assert.assertEquals(build1.getRequestInfo(true), build2.getRequestInfo(true)); + Assert.assertNotSame(build1.getRequestInfo(true), build2.getRequestInfo(false)); + } + + /** + * Method: getCollapse() setCollapse(Collapse collapse) + */ + @Test + public void testGetAndGetCollapse() { + SearchQuery s1 = new SearchQuery(); + s1.setCollapse(new Collapse("f1")); + SearchRequest build1 = SearchRequest.newBuilder().searchQuery(s1).build(); + + SearchQuery s2 = SearchQuery.newBuilder().collapse("f1").build(); + SearchRequest build2 = SearchRequest.newBuilder().searchQuery(s2).build(); + + Assert.assertEquals(build1.getRequestInfo(true), build2.getRequestInfo(true)); + Assert.assertNotSame(build1.getRequestInfo(true), build2.getRequestInfo(false)); + } + + /** + * Method: getSort() setSort(Sort sort) + */ + @Test + public void testGetAndSetSort() { + List objects = Arrays.asList( + new FieldSort("f"), + new ScoreSort(), + new ScoreSort(), + new GeoDistanceSort("f3", Arrays.asList("fs", "nfs", "fsf")), + new PrimaryKeySort()); + Sort sort = new Sort(objects); + + SearchQuery s1 = new SearchQuery(); + s1.setSort(sort); + SearchRequest searchRequest1 = SearchRequest.newBuilder().searchQuery(s1).build(); + + SearchQuery searchQuery2 = SearchQuery.newBuilder().sort(sort).build(); + SearchRequest searchRequest2 = new SearchRequest(); + searchRequest2.setSearchQuery(searchQuery2); + + Assert.assertEquals(searchRequest1.getRequestInfo(true), searchRequest2.getRequestInfo(true)); + Assert.assertNotSame(searchRequest1.getRequestInfo(true), searchRequest2.getRequestInfo(false)); + } + + /** + * Method: isGetTotalCount() setGetTotalCount(boolean getTotalCount) + */ + @Test + public void testTotalCount() { + SearchQuery s1 = new SearchQuery(); + s1.setGetTotalCount(true); + SearchRequest build1 = SearchRequest.newBuilder().searchQuery(s1).build(); + + SearchQuery s2 = SearchQuery.newBuilder().getTotalCount(true).build(); + SearchRequest build2 = SearchRequest.newBuilder().searchQuery(s2).build(); + + Assert.assertEquals(build1.getRequestInfo(true), build2.getRequestInfo(true)); + Assert.assertNotSame(build1.getRequestInfo(true), build2.getRequestInfo(false)); + } + + /** + * Method: getToken() setToken(byte[] token) + */ + @Test + public void testGetAndSetToken() { + SearchQuery s1 = new SearchQuery(); + s1.setToken("fsfsf".getBytes()); + SearchRequest build1 = SearchRequest.newBuilder().searchQuery(s1).build(); + + SearchQuery s2 = SearchQuery.newBuilder().token("fsfsf".getBytes()).build(); + SearchRequest build2 = SearchRequest.newBuilder().searchQuery(s2).build(); + + Assert.assertEquals(build1.getRequestInfo(true), build2.getRequestInfo(true)); + Assert.assertNotSame(build1.getRequestInfo(true), build2.getRequestInfo(false)); + } + + @Test + public void testQueryType() { + Assert.assertEquals(QueryType.QueryType_MatchQuery, QueryBuilders.match("","").build().getQueryType()); + Assert.assertEquals(QueryType.QueryType_MatchPhraseQuery, QueryBuilders.matchPhrase("","").build().getQueryType()); + Assert.assertEquals(QueryType.QueryType_TermQuery, QueryBuilders.term("","").build().getQueryType()); + Assert.assertEquals(QueryType.QueryType_RangeQuery, QueryBuilders.range("").build().getQueryType()); + Assert.assertEquals(QueryType.QueryType_PrefixQuery, QueryBuilders.prefix("","").build().getQueryType()); + Assert.assertEquals(QueryType.QueryType_BoolQuery, QueryBuilders.bool().build().getQueryType()); + Assert.assertEquals(QueryType.QueryType_ConstScoreQuery, QueryBuilders.constScore().build().getQueryType()); + Assert.assertEquals(QueryType.QueryType_FunctionScoreQuery, QueryBuilders.functionScore("").build().getQueryType()); + Assert.assertEquals(QueryType.QueryType_NestedQuery, QueryBuilders.nested().build().getQueryType()); + Assert.assertEquals(QueryType.QueryType_WildcardQuery, QueryBuilders.wildcard("", "").build().getQueryType()); + Assert.assertEquals(QueryType.QueryType_MatchAllQuery, QueryBuilders.matchAll().build().getQueryType()); + Assert.assertEquals(QueryType.QueryType_GeoBoundingBoxQuery, QueryBuilders.geoBoundingBox("").build().getQueryType()); + Assert.assertEquals(QueryType.QueryType_GeoDistanceQuery, QueryBuilders.geoDistance("").build().getQueryType()); + Assert.assertEquals(QueryType.QueryType_GeoPolygonQuery, QueryBuilders.geoPolygon("").build().getQueryType()); + Assert.assertEquals(QueryType.QueryType_TermsQuery, QueryBuilders.terms("").build().getQueryType()); + Assert.assertEquals(QueryType.QueryType_ExistsQuery, QueryBuilders.exists("").build().getQueryType()); + } + + @Test + public void testQueryJsonField() { + Gson gson = new GsonBuilder() + .disableHtmlEscaping() + .disableInnerClassSerialization() + .serializeNulls() + .serializeSpecialFloatingPointValues() + .enableComplexMapKeySerialization().create(); + Assert.assertTrue(gson.toJson(QueryBuilders.match("", "").build()).contains("queryType")); + Assert.assertTrue(gson.toJson(QueryBuilders.match("", "").build()).contains("QueryType_MatchQuery")); + + + Assert.assertTrue(gson.toJson(QueryBuilders.wildcard("", "").build()).contains("queryType")); + Assert.assertTrue(gson.toJson(QueryBuilders.wildcard("", "").build()).contains("QueryType_WildcardQuery")); + + Assert.assertTrue(gson.toJson(QueryBuilders.geoDistance("").build()).contains("queryType")); + Assert.assertTrue(gson.toJson(QueryBuilders.geoDistance("").build()).contains("QueryType_GeoDistanceQuery")); + } +} diff --git a/src/test/java/com/alicloud/openservices/tablestore/model/search/SearchRequestTest.java b/src/test/java/com/alicloud/openservices/tablestore/model/search/SearchRequestTest.java new file mode 100644 index 0000000..2182e31 --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/model/search/SearchRequestTest.java @@ -0,0 +1,317 @@ +package com.alicloud.openservices.tablestore.model.search; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import com.alicloud.openservices.tablestore.core.protocol.BaseSearchTest; +import com.alicloud.openservices.tablestore.core.utils.Repeat; +import com.alicloud.openservices.tablestore.model.ColumnValue; +import com.alicloud.openservices.tablestore.model.PrimaryKey; +import com.alicloud.openservices.tablestore.model.PrimaryKeyColumn; +import com.alicloud.openservices.tablestore.model.PrimaryKeyValue; +import com.alicloud.openservices.tablestore.model.search.SearchRequest.ColumnsToGet; +import com.alicloud.openservices.tablestore.model.search.agg.AggregationBuilders; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupByBuilders; +import com.alicloud.openservices.tablestore.model.search.query.MatchAllQuery; +import com.alicloud.openservices.tablestore.model.search.query.QueryBuilders; +import com.alicloud.openservices.tablestore.model.search.query.RangeQuery; +import org.junit.Assert; +import org.junit.Test; + +/** + * SearchRequest Tester. + * + * @author + * @version 1.0 + * @since
9月 29, 2019
+ */ +public class SearchRequestTest extends BaseSearchTest { + + /** + * Method: getTableName() + */ + @Test + public void testGetTableName() { + SearchRequest s1 = new SearchRequest(); + s1.setTableName("a1"); + SearchRequest s2 = SearchRequest.newBuilder().tableName("a1").build(); + Assert.assertEquals(s1.getTableName(), s2.getTableName()); + Assert.assertEquals(s1.getRequestInfo(false), s2.getRequestInfo(false)); + Assert.assertNotSame(s1.getRequestInfo(true), s2.getRequestInfo(false)); + } + + /** + * Method: setTableName(String tableName) + */ + @Test + public void testSetTableName() { + SearchRequest s1 = new SearchRequest(); + s1.setTableName("s2"); + SearchRequest s2 = SearchRequest.newBuilder().tableName("s2").build(); + Assert.assertEquals(s1.getTableName(), s2.getTableName()); + Assert.assertEquals(s1.getRequestInfo(false), s2.getRequestInfo(false)); + Assert.assertNotSame(s1.getRequestInfo(true), s2.getRequestInfo(false)); + } + + /** + * Method: getIndexName() + */ + @Test + public void testGetIndexName() { + SearchRequest s1 = new SearchRequest(); + s1.setTableName("a1"); + s1.setIndexName("i1"); + SearchRequest s2 = SearchRequest.newBuilder().tableName("a1").indexName("i1").build(); + Assert.assertEquals(s1.getTableName(), s2.getTableName()); + Assert.assertEquals(s1.getRequestInfo(false), s2.getRequestInfo(false)); + Assert.assertNotSame(s1.getRequestInfo(true), s2.getRequestInfo(false)); + } + + /** + * Method: setIndexName(String indexName) + */ + @Test + public void testSetIndexName() { + SearchRequest s1 = new SearchRequest(); + s1.setTableName("a1"); + s1.setIndexName("i1"); + SearchRequest s2 = SearchRequest.newBuilder().tableName("a1").indexName("i1").build(); + Assert.assertEquals(s1.getIndexName(), s2.getIndexName()); + Assert.assertEquals(s1.getRequestInfo(false), s2.getRequestInfo(false)); + Assert.assertNotSame(s1.getRequestInfo(true), s2.getRequestInfo(false)); + } + + /** + * Method: getSearchQuery() + */ + @Test + public void testGetSearchQuery() { + SearchRequest s1 = new SearchRequest(); + s1.setSearchQuery(SearchQuery.newBuilder().query(QueryBuilders.matchAll()).build()); + SearchRequest s2 = new SearchRequest(); + SearchQuery searchQuery = new SearchQuery(); + searchQuery.setQuery(new MatchAllQuery()); + s2.setSearchQuery(searchQuery); + Assert.assertEquals(s1.getSearchQuery().getQuery().getQueryType(), + s2.getSearchQuery().getQuery().getQueryType()); + Assert.assertEquals(s1.getRequestInfo(false), s2.getRequestInfo(false)); + Assert.assertNotSame(s1.getRequestInfo(true), s2.getRequestInfo(false)); + } + + /** + * Method: setSearchQuery(SearchQuery searchQuery) + */ + @Test + public void testSetSearchQuery() { + SearchRequest s1 = new SearchRequest(); + s1.setSearchQuery(SearchQuery.newBuilder().query(QueryBuilders.range("123").greaterThanOrEqual(456)).build()); + SearchRequest s2 = new SearchRequest(); + SearchQuery searchQuery = new SearchQuery(); + RangeQuery query = new RangeQuery(); + query.setFieldName("123"); + query.setFrom(ColumnValue.fromLong(456), true); + searchQuery.setQuery(query); + s2.setSearchQuery(searchQuery); + Assert.assertEquals(s1.getRequestInfo(false), s2.getRequestInfo(false)); + Assert.assertNotSame(s1.getRequestInfo(true), s2.getRequestInfo(false)); + } + + /** + * Method: getColumnsToGet() + */ + @Test + public void testGetColumnsToGet() { + SearchRequest s1 = SearchRequest.newBuilder() + .addColumnsToGet("123", "456") + .addColumnsToGet(Arrays.asList("ggg", "aaa")) + .build(); + Assert.assertFalse(s1.getColumnsToGet().isReturnAll()); + Assert.assertEquals(s1.getColumnsToGet().getColumns().toString(), + Arrays.asList("123", "456", "ggg", "aaa").toString()); + + } + + /** + * Method: setColumnsToGet(ColumnsToGet columnsToGet) + */ + @Test + public void testSetColumnsToGet() { + SearchRequest s1 = new SearchRequest(); + ColumnsToGet columnsToGet = new ColumnsToGet(); + columnsToGet.setReturnAll(true); + s1.setColumnsToGet(columnsToGet); + Assert.assertTrue(s1.getColumnsToGet().isReturnAll()); + columnsToGet.setColumns(Arrays.asList("13", "34", "ggg")); + Assert.assertEquals(s1.getColumnsToGet().getColumns().toString(), Arrays.asList("13", "34", "ggg").toString()); + } + + /** + * Method: getRoutingValues() + */ + @Test + public void testGetRoutingValues() { + List primaryKeyColumns = new ArrayList(); + primaryKeyColumns.add(new PrimaryKeyColumn("111", PrimaryKeyValue.fromString("111"))); + primaryKeyColumns.add(new PrimaryKeyColumn("222", PrimaryKeyValue.fromString("222"))); + PrimaryKey primaryKey1 = new PrimaryKey(primaryKeyColumns); + + List primaryKeyColumns2 = new ArrayList(); + primaryKeyColumns2.add(new PrimaryKeyColumn("333", PrimaryKeyValue.fromString("111"))); + primaryKeyColumns2.add(new PrimaryKeyColumn("444", PrimaryKeyValue.fromString("222"))); + PrimaryKey primaryKey2 = new PrimaryKey(primaryKeyColumns2); + + SearchRequest s1 = new SearchRequest(); + s1.setRoutingValues(Arrays.asList(primaryKey1, primaryKey2)); + + SearchRequest s2 = SearchRequest.newBuilder() + .addRoutingValues(Collections.singletonList(primaryKey1)) + .addRoutingValues(Collections.singletonList(primaryKey2)) + .build(); + Assert.assertEquals(s1.getRequestInfo(false), s2.getRequestInfo(false)); + Assert.assertNotSame(s1.getRequestInfo(true), s2.getRequestInfo(false)); + } + + /** + * Method: setRoutingValues(List routingValues) + */ + @Test + public void testSetRoutingValues() { + SearchRequest s1 = new SearchRequest(); + List primaryKeyColumns = new ArrayList(); + primaryKeyColumns.add(new PrimaryKeyColumn("111", PrimaryKeyValue.fromString("111"))); + primaryKeyColumns.add(new PrimaryKeyColumn("222", PrimaryKeyValue.fromString("222"))); + PrimaryKey primaryKey1 = new PrimaryKey(primaryKeyColumns); + List primaryKeyColumns2 = new ArrayList(); + primaryKeyColumns2.add(new PrimaryKeyColumn("333", PrimaryKeyValue.fromString("111"))); + primaryKeyColumns2.add(new PrimaryKeyColumn("444", PrimaryKeyValue.fromString("222"))); + PrimaryKey primaryKey2 = new PrimaryKey(primaryKeyColumns2); + s1.setRoutingValues(Arrays.asList(primaryKey1, primaryKey2)); + Assert.assertEquals(s1.getRoutingValues().get(0).getPrimaryKeyColumn(0).getName(), "111"); + Assert.assertEquals(s1.getRoutingValues().get(0).getPrimaryKeyColumn(0).getValue(), + PrimaryKeyValue.fromString("111")); + Assert.assertEquals(s1.getRoutingValues().get(0).getPrimaryKeyColumn(1).getName(), "222"); + Assert.assertEquals(s1.getRoutingValues().get(0).getPrimaryKeyColumn(1).getValue(), + PrimaryKeyValue.fromString("222")); + Assert.assertEquals(s1.getRoutingValues().get(1).getPrimaryKeyColumn(0).getName(), "333"); + Assert.assertEquals(s1.getRoutingValues().get(1).getPrimaryKeyColumn(0).getValue(), + PrimaryKeyValue.fromString("111")); + Assert.assertEquals(s1.getRoutingValues().get(1).getPrimaryKeyColumn(1).getName(), "444"); + Assert.assertEquals(s1.getRoutingValues().get(1).getPrimaryKeyColumn(1).getValue(), + PrimaryKeyValue.fromString("222")); + } + + @Test + public void testGetTimeoutInMillisecond() { + SearchRequest req = SearchRequest.newBuilder() + .timeout(12000) + .build(); + Assert.assertEquals(12000, req.getTimeoutInMillisecond()); + } + + @Test + public void testGetTimeoutInMillisecondDefault() { + SearchRequest req = SearchRequest.newBuilder() + .build(); + Assert.assertEquals(-1, req.getTimeoutInMillisecond()); + } + + @Test + public void testSetTimeoutInMillisecond() { + SearchRequest req = new SearchRequest(); + req.setTimeoutInMillisecond(59000); + Assert.assertEquals(59000, req.getTimeoutInMillisecond()); + } + + /** + * Method: getOperationName() + */ + @Test + public void testGetOperationName() { + SearchRequest s1 = new SearchRequest(); + Assert.assertEquals(s1.getOperationName(), "Search"); + } + + /** + * Method: getRequestInfo(boolean prettyFormat) + */ + @Test + @Repeat(1) + public void testGetRequestInfo() { + SearchRequest searchRequest = SearchRequest.newBuilder() + .indexName("indexName") + .tableName("tableName") + .addColumnsToGet("columnsToGet_f1", "f2", "f3") + .searchQuery( + SearchQuery.newBuilder() + .query(QueryBuilders.bool() + .mustNot(QueryBuilders.range("f1").lessThan(9990)) + .must(QueryBuilders.terms("f2")) + .must(QueryBuilders.exists("f3")) + .should(QueryBuilders.geoDistance("f4").centerPoint("3,2").distanceInMeter(123.4)) + ) + .offset(123) + .limit(75) + .token("fsfa".getBytes()) + .addAggregation(AggregationBuilders.min("1", "col_long")) + .addAggregation(AggregationBuilders.max("2", "col_long")) + .addAggregation(AggregationBuilders.sum("3", "col_long")) + .addAggregation(AggregationBuilders.avg("4", "col_long")) + .addAggregation(AggregationBuilders.distinctCount("5", "col_long")) + .addGroupBy(GroupByBuilders + .groupByField("field", "col_keyword") + .addSubAggregation(AggregationBuilders.min("1", "col_long")) + .addSubAggregation(AggregationBuilders.count("2", "col_long")) + .addSubAggregation(AggregationBuilders.sum("3", "col_long")) + .addSubAggregation(AggregationBuilders.max("4", "col_long")) + .addSubAggregation(AggregationBuilders.avg("5", "col_long").missing(13)) + .addSubGroupBy(GroupByBuilders + .groupByGeoDistance("123", "col_geo") + .origin(12, 23) + .addRange(21, 333)) + ) + .addGroupBy(GroupByBuilders + .groupByGeoDistance("geo", "col_geo") + .origin(52.3760, 4.894) + .addRange(Double.MIN_VALUE, 100000) + .addRange(100000, 300000) + .addRange(300000, Double.MAX_VALUE)) + .addGroupBy(GroupByBuilders + .groupByFilter("filter") + .addFilter(QueryBuilders.matchAll()) + .addFilter(QueryBuilders.term("col_keyword", "a")) + .addFilter(QueryBuilders.range("col_long").greaterThan(100)) + ) + .addGroupBy(GroupByBuilders + .groupByRange("range", "col_long") + .addRange(0, 100) + .addRange(100, 300) + .addRange(300, Double.MAX_VALUE) + ) + .build()) + .build(); + searchRequest.printRequestInfo(); + String requestInfo = searchRequest.getRequestInfo(false); + Assert.assertTrue(requestInfo.contains("queryType")); + Assert.assertTrue(requestInfo.contains("aggregationType")); + Assert.assertTrue(requestInfo.contains("groupByType")); + Assert.assertTrue(requestInfo.contains("GROUP_BY_RANGE")); + Assert.assertTrue(requestInfo.contains("columnsToGet_f1")); + } + + @Test + @Repeat(1) + public void testPrintRequestInfo() { + SearchRequest searchRequest1 = SearchRequest.newBuilder() + .searchQuery(SearchQuery.newBuilder().query(QueryBuilders.matchAll()).build()) + .build(); + SearchRequest searchRequest2 = new SearchRequest(); + SearchQuery searchQuery = new SearchQuery(); + searchQuery.setQuery(new MatchAllQuery()); + searchRequest2.setSearchQuery(searchQuery); + Assert.assertEquals(searchRequest1.getRequestInfo(false), searchRequest2.getRequestInfo(false)); + Assert.assertNotSame(searchRequest1.getRequestInfo(true), searchRequest2.getRequestInfo(false)); + searchRequest1.printRequestInfo(); + } +} diff --git a/src/test/java/com/alicloud/openservices/tablestore/model/search/TestDescribeSearchIndexResponse.java b/src/test/java/com/alicloud/openservices/tablestore/model/search/TestDescribeSearchIndexResponse.java new file mode 100644 index 0000000..78127e4 --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/model/search/TestDescribeSearchIndexResponse.java @@ -0,0 +1,147 @@ +package com.alicloud.openservices.tablestore.model.search; + +import com.alicloud.openservices.tablestore.core.protocol.BaseSearchTest; +import com.alicloud.openservices.tablestore.core.utils.Repeat; +import com.alicloud.openservices.tablestore.model.Response; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import org.junit.Test; + +import java.util.ArrayList; +import java.util.Arrays; + +import static org.junit.Assert.*; + +public class TestDescribeSearchIndexResponse extends BaseSearchTest { + + @Test + @Repeat(1) + public void jsonizeAll() { + Response resp = new Response("req_id1"); + DescribeSearchIndexResponse describeResp = new DescribeSearchIndexResponse(resp); + + //IndexSchema + IndexSchema indexSchema = new IndexSchema(); + indexSchema.addFieldSchema(new FieldSchema("col_long", FieldType.LONG).setSubFieldSchemas(new ArrayList())); + indexSchema.addFieldSchema(new FieldSchema("col_double", FieldType.DOUBLE).setSubFieldSchemas(new ArrayList())); + indexSchema.addFieldSchema(new FieldSchema("col_boolean", FieldType.BOOLEAN).setSubFieldSchemas(new ArrayList())); + indexSchema.addFieldSchema(new FieldSchema("col_keyword", FieldType.KEYWORD) + .setSubFieldSchemas(new ArrayList()) + .setVirtualField(true) + .setSourceFieldNames(Arrays.asList("n1", "f2", "f3"))); + indexSchema.addFieldSchema(new FieldSchema("col_text", FieldType.TEXT) + .setSubFieldSchemas(new ArrayList()) + .setVirtualField(true) + .setSourceFieldName("n1")); + indexSchema.addFieldSchema(new FieldSchema("col_geo_point", FieldType.GEO_POINT).setSubFieldSchemas(new ArrayList())); + indexSchema.addFieldSchema(new FieldSchema("col_nested", FieldType.NESTED) + .setSubFieldSchemas(Arrays.asList( + new FieldSchema("col_inner", FieldType.TEXT).setSubFieldSchemas(new ArrayList()), + new FieldSchema("col_inner2", FieldType.TEXT) + .setSubFieldSchemas(new ArrayList()) + .setVirtualField(true) + .setSourceFieldName("n1")) + )); + + IndexSetting indexSetting = new IndexSetting(); + indexSetting.setRoutingFields(Arrays.asList("routing_field1", "routing_field2")); + indexSchema.setIndexSetting(indexSetting); + + describeResp.setSchema(indexSchema); + describeResp.setTimeToLive(1000); + + //SyncStat + SyncStat syncStat = new SyncStat(); + syncStat.setSyncPhase(SyncStat.SyncPhase.INCR); + syncStat.setCurrentSyncTimestamp(123456L); + describeResp.setSyncStat(syncStat); + + describeResp.setBrotherIndexName("index1"); + + describeResp.setQueryFlowWeight(Arrays.asList( + new QueryFlowWeight("index1_reindex", 20), + new QueryFlowWeight("index1_reindex_inner", 80) + )); + + String json = describeResp.jsonize(); + JsonElement jsonElement = new Gson().toJsonTree(json); + assertNotNull(jsonElement); + assertEquals("{\n" + + " \"IndexSchema\": {\n" + + " \"IndexSetting\": {\"RoutingFields\": [\"routing_field1\", \"routing_field2\"]},\n" + + " \"FieldSchemas\": [{\n" + + " \"FieldName\": \"col_long\",\n" + + " \"FieldType\": \"LONG\",\n" + + " \"Index\": true,\n" + + " \"SubFieldSchemas\": []\n" + + " },\n" + + " {\n" + + " \"FieldName\": \"col_double\",\n" + + " \"FieldType\": \"DOUBLE\",\n" + + " \"Index\": true,\n" + + " \"SubFieldSchemas\": []\n" + + " },\n" + + " {\n" + + " \"FieldName\": \"col_boolean\",\n" + + " \"FieldType\": \"BOOLEAN\",\n" + + " \"Index\": true,\n" + + " \"SubFieldSchemas\": []\n" + + " },\n" + + " {\n" + + " \"FieldName\": \"col_keyword\",\n" + + " \"FieldType\": \"KEYWORD\",\n" + + " \"Index\": true,\n" + + " \"SubFieldSchemas\": [],\n" + + " \"IsVirtualField\": true,\n" + + " \"SourceFieldNames\": [\"n1\", \"f2\", \"f3\"]\n" + + " },\n" + + " {\n" + + " \"FieldName\": \"col_text\",\n" + + " \"FieldType\": \"TEXT\",\n" + + " \"Index\": true,\n" + + " \"SubFieldSchemas\": [],\n" + + " \"IsVirtualField\": true,\n" + + " \"SourceFieldNames\": [\"n1\"]\n" + + " },\n" + + " {\n" + + " \"FieldName\": \"col_geo_point\",\n" + + " \"FieldType\": \"GEO_POINT\",\n" + + " \"Index\": true,\n" + + " \"SubFieldSchemas\": []\n" + + " },\n" + + " {\n" + + " \"FieldName\": \"col_nested\",\n" + + " \"FieldType\": \"NESTED\",\n" + + " \"Index\": true,\n" + + " \"SubFieldSchemas\": [{\n" + + " \"FieldName\": \"col_inner\",\n" + + " \"FieldType\": \"TEXT\",\n" + + " \"Index\": true,\n" + + " \"SubFieldSchemas\": []\n" + + " }, \n" + + " {\n" + + " \"FieldName\": \"col_inner2\",\n" + + " \"FieldType\": \"TEXT\",\n" + + " \"Index\": true,\n" + + " \"SubFieldSchemas\": [],\n" + + " \"IsVirtualField\": true,\n" + + " \"SourceFieldNames\": [\"n1\"]\n" + + " }]\n" + + " }]\n" + + " },\n" + + " \"SyncStat\": {\n" + + " \"SyncPhase\": \"INCR\",\n" + + " \"CurrentSyncTimestamp\": 123456},\n" + + " \"BrotherIndexName\": \"index1\",\n" + + " \"QueryFlowWeight\": [{\n" + + " \"IndexName\": \"index1_reindex\",\n" + + " \"Weight\": 20\n" + + " },\n" + + " {\n" + + " \"IndexName\": \"index1_reindex_inner\",\n" + + " \"Weight\": 80\n" + + " }],\n" + + " \"TimeToLive\": 1000\n" + + "}", json); + } +} diff --git a/src/test/java/com/alicloud/openservices/tablestore/model/search/TestExistsQuery.java b/src/test/java/com/alicloud/openservices/tablestore/model/search/TestExistsQuery.java new file mode 100644 index 0000000..d160433 --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/model/search/TestExistsQuery.java @@ -0,0 +1,50 @@ +package com.alicloud.openservices.tablestore.model.search; + +import com.alicloud.openservices.tablestore.core.protocol.Search; +import com.alicloud.openservices.tablestore.core.protocol.BaseSearchTest; +import com.alicloud.openservices.tablestore.model.search.query.ExistsQuery; +import com.alicloud.openservices.tablestore.model.search.query.QueryType; +import com.google.protobuf.ByteString; +import org.junit.Test; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.fail; + +public class TestExistsQuery extends BaseSearchTest { + @Test + public void testGetFieldName() { + ExistsQuery existsQuery = new ExistsQuery(); + existsQuery.setFieldName("field1"); + assertEquals(existsQuery.getFieldName(), "field1"); + } + + @Test + public void testQueryType() { + ExistsQuery existsQuery = new ExistsQuery(); + existsQuery.setFieldName("field1"); + assertEquals(existsQuery.getQueryType(), QueryType.QueryType_ExistsQuery); + } + + @Test + public void testSerialize() { + ExistsQuery existsQuery = new ExistsQuery(); + existsQuery.setFieldName("field1"); + ByteString actural = existsQuery.serialize(); + + Search.ExistsQuery.Builder builder = Search.ExistsQuery.newBuilder(); + builder.setFieldName("field1"); + ByteString expected = builder.build().toByteString(); + + assertEquals(expected, actural); + } + + @Test + public void testSerializeFail() { + ExistsQuery existsQuery = new ExistsQuery(); + try { + existsQuery.serialize(); + fail(); + } catch (NullPointerException ignored) { + } + } +} diff --git a/src/test/java/com/alicloud/openservices/tablestore/model/search/TestFieldSchema.java b/src/test/java/com/alicloud/openservices/tablestore/model/search/TestFieldSchema.java new file mode 100644 index 0000000..902ff10 --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/model/search/TestFieldSchema.java @@ -0,0 +1,341 @@ +package com.alicloud.openservices.tablestore.model.search; + +import com.alicloud.openservices.tablestore.core.protocol.BaseSearchTest; +import com.alicloud.openservices.tablestore.model.search.analysis.AnalyzerParameter; +import com.alicloud.openservices.tablestore.model.search.analysis.FuzzyAnalyzerParameter; +import com.alicloud.openservices.tablestore.model.search.analysis.SingleWordAnalyzerParameter; +import com.alicloud.openservices.tablestore.model.search.analysis.SplitAnalyzerParameter; +import com.google.common.base.Supplier; +import org.junit.Test; +import static org.junit.Assert.*; + +import java.util.*; + +import com.google.gson.Gson; + +public class TestFieldSchema extends BaseSearchTest { + @Test + public void jsonizeSingleWordNoParam() { + FieldSchema fieldSchema = new FieldSchema("Col_Analyzer", FieldType.TEXT); + + // sub field schemas + List subSchemas = new ArrayList(); + FieldSchema subFieldSchema = new FieldSchema("Col_Sub", FieldType.TEXT); + subFieldSchema.setSubFieldSchemas(new ArrayList()); + subSchemas.add(subFieldSchema); + fieldSchema.setSubFieldSchemas(subSchemas); + + // analyzers + FieldSchema.Analyzer analyzerSingle = FieldSchema.Analyzer.SingleWord; + fieldSchema.setAnalyzer(analyzerSingle); + + Map fieldSchemaMap = new Gson().fromJson(fieldSchema.jsonize(), Map.class); + assertEquals("single_word", fieldSchemaMap.get("Analyzer")); + assertNull(fieldSchemaMap.get("AnalyzerParameter")); + } + + @Test + public void jsonizeSingleWordWithParam() { + FieldSchema fieldSchema = new FieldSchema("Col_Analyzer", FieldType.TEXT); + + // sub field schemas + List subSchemas = new ArrayList(); + FieldSchema subFieldSchema = new FieldSchema("Col_Sub", FieldType.TEXT); + subFieldSchema.setSubFieldSchemas(new ArrayList()); + subSchemas.add(subFieldSchema); + fieldSchema.setSubFieldSchemas(subSchemas); + + // analyzer + FieldSchema.Analyzer analyzerSingle = FieldSchema.Analyzer.SingleWord; + fieldSchema.setAnalyzer(analyzerSingle); + + AnalyzerParameter param = new SingleWordAnalyzerParameter(Boolean.TRUE, Boolean.TRUE); + fieldSchema.setAnalyzerParameter(param); + + Map fieldSchemaMap = new Gson().fromJson(fieldSchema.jsonize(), Map.class); + assertEquals("single_word", fieldSchemaMap.get("Analyzer")); + @SuppressWarnings("unchecked") + Map analyzerParamMap = (Map)fieldSchemaMap.get("AnalyzerParameter"); + assertTrue((Boolean) analyzerParamMap.get("CaseSensitive")); + assertTrue((Boolean) analyzerParamMap.get("DelimitWord")); + } + + @Test + public void jsonizeSingleWordWithDefaultParam() { + FieldSchema fieldSchema = new FieldSchema("Col_Analyzer", FieldType.TEXT); + + // sub field schemas + List subSchemas = new ArrayList(); + FieldSchema subFieldSchema = new FieldSchema("Col_Sub", FieldType.TEXT); + subFieldSchema.setSubFieldSchemas(new ArrayList()); + subSchemas.add(subFieldSchema); + fieldSchema.setSubFieldSchemas(subSchemas); + + // analyzer + FieldSchema.Analyzer analyzerSingle = FieldSchema.Analyzer.SingleWord; + fieldSchema.setAnalyzer(analyzerSingle); + + AnalyzerParameter param = new SingleWordAnalyzerParameter(); + fieldSchema.setAnalyzerParameter(param); + + Map fieldSchemaMap = new Gson().fromJson(fieldSchema.jsonize(), Map.class); + assertEquals("single_word", fieldSchemaMap.get("Analyzer")); + @SuppressWarnings("unchecked") + Map analyzerParamMap = (Map)fieldSchemaMap.get("AnalyzerParameter"); + assertNull(analyzerParamMap.get("CaseSensitive")); + assertNull(analyzerParamMap.get("DelimitWord")); + } + + @Test + public void jsonizeSplitNoParam() { + FieldSchema fieldSchema = new FieldSchema("Col_Analyzer", FieldType.TEXT); + fieldSchema.setSubFieldSchemas(new ArrayList()); + + // analyzers + FieldSchema.Analyzer analyzerSplit = FieldSchema.Analyzer.Split; + fieldSchema.setAnalyzer(analyzerSplit); + + Map fieldSchemaMap = new Gson().fromJson(fieldSchema.jsonize(), Map.class); + assertEquals("split", fieldSchemaMap.get("Analyzer")); + assertNull(fieldSchemaMap.get("AnalyzerParameter")); + } + + @Test + public void jsonizeSplitWithParam() { + FieldSchema fieldSchema = new FieldSchema("Col_Analyzer", FieldType.TEXT); + fieldSchema.setSubFieldSchemas(new ArrayList()); + + // analyzers + FieldSchema.Analyzer analyzerSplit = FieldSchema.Analyzer.Split; + fieldSchema.setAnalyzer(analyzerSplit); + + AnalyzerParameter param = new SplitAnalyzerParameter("-"); + fieldSchema.setAnalyzerParameter(param); + + Map fieldSchemaMap = new Gson().fromJson(fieldSchema.jsonize(), Map.class); + assertEquals("split", fieldSchemaMap.get("Analyzer")); + @SuppressWarnings("unchecked") + Map analyzerParamMap = (Map)fieldSchemaMap.get("AnalyzerParameter"); + assertEquals("-", analyzerParamMap.get("Delimiter")); + } + + @Test + public void jsonizeSplitWithDefaultParam() { + FieldSchema fieldSchema = new FieldSchema("Col_Analyzer", FieldType.TEXT); + fieldSchema.setSubFieldSchemas(new ArrayList()); + + // analyzers + FieldSchema.Analyzer analyzerSplit = FieldSchema.Analyzer.Split; + fieldSchema.setAnalyzer(analyzerSplit); + + AnalyzerParameter param = new SplitAnalyzerParameter(); + fieldSchema.setAnalyzerParameter(param); + + Map fieldSchemaMap = new Gson().fromJson(fieldSchema.jsonize(), Map.class); + assertEquals("split", fieldSchemaMap.get("Analyzer")); + @SuppressWarnings("unchecked") + Map analyzerParamMap = (Map)fieldSchemaMap.get("AnalyzerParameter"); + assertNull(analyzerParamMap.get("Delimiter")); + } + + @Test + public void jsonizeFuzzyNoParam() { + FieldSchema fieldSchema = new FieldSchema("Col_Analyzer", FieldType.TEXT); + fieldSchema.setSubFieldSchemas(new ArrayList()); + + // analyzers + FieldSchema.Analyzer analyzerFuzzy = FieldSchema.Analyzer.Fuzzy; + fieldSchema.setAnalyzer(analyzerFuzzy); + + Map fieldSchemaMap = new Gson().fromJson(fieldSchema.jsonize(), Map.class); + assertEquals("fuzzy", fieldSchemaMap.get("Analyzer")); + assertNull(fieldSchemaMap.get("AnalyzerParameter")); + } + + @Test + public void jsonizeFuzzyWithParam() { + FieldSchema fieldSchema = new FieldSchema("Col_Analyzer", FieldType.TEXT); + fieldSchema.setSubFieldSchemas(new ArrayList()); + + // analyzers + FieldSchema.Analyzer analyzerFuzzy = FieldSchema.Analyzer.Fuzzy; + fieldSchema.setAnalyzer(analyzerFuzzy); + + AnalyzerParameter param = new FuzzyAnalyzerParameter(1, 3); + fieldSchema.setAnalyzerParameter(param); + + Map fieldSchemaMap = new Gson().fromJson(fieldSchema.jsonize(), Map.class); + assertEquals("fuzzy", fieldSchemaMap.get("Analyzer")); + @SuppressWarnings("unchecked") + Map analyzerParamMap = (Map)fieldSchemaMap.get("AnalyzerParameter"); + assertEquals(1, ((Double)analyzerParamMap.get("MinChars")).intValue()); + assertEquals(3, ((Double)analyzerParamMap.get("MaxChars")).intValue()); + } + + @Test + public void jsonizeFuzzyWithDefaultParam() { + FieldSchema fieldSchema = new FieldSchema("Col_Analyzer", FieldType.TEXT); + fieldSchema.setSubFieldSchemas(new ArrayList()); + + // analyzers + FieldSchema.Analyzer analyzerFuzzy = FieldSchema.Analyzer.Fuzzy; + fieldSchema.setAnalyzer(analyzerFuzzy); + + AnalyzerParameter param = new FuzzyAnalyzerParameter(); + fieldSchema.setAnalyzerParameter(param); + + Map fieldSchemaMap = new Gson().fromJson(fieldSchema.jsonize(), Map.class); + assertEquals("fuzzy", fieldSchemaMap.get("Analyzer")); + @SuppressWarnings("unchecked") + Map analyzerParamMap = (Map)fieldSchemaMap.get("AnalyzerParameter"); + assertNull(analyzerParamMap.get("MinChars")); + assertNull(analyzerParamMap.get("MaxChars")); + } + + @Test + public void jsonizeMinWordNoParam() { + FieldSchema fieldSchema = new FieldSchema("Col_Analyzer", FieldType.TEXT); + fieldSchema.setSubFieldSchemas(new ArrayList()); + + // analyzers + FieldSchema.Analyzer analyzerMinWord = FieldSchema.Analyzer.MinWord; + fieldSchema.setAnalyzer(analyzerMinWord); + + Map fieldSchemaMap = new Gson().fromJson(fieldSchema.jsonize(), Map.class); + assertEquals("min_word", fieldSchemaMap.get("Analyzer")); + assertNull(fieldSchemaMap.get("AnalyzerParameter")); + } + + @Test + public void jsonizeMinWordInvalid() { + FieldSchema fieldSchema = new FieldSchema("Col_Analyzer", FieldType.TEXT); + fieldSchema.setSubFieldSchemas(new ArrayList()); + + // analyzers + FieldSchema.Analyzer analyzerMinWord = FieldSchema.Analyzer.MinWord; + fieldSchema.setAnalyzer(analyzerMinWord); + + // analyzer param ignored + AnalyzerParameter param = new FuzzyAnalyzerParameter(1, 3); + fieldSchema.setAnalyzerParameter(param); + + Map fieldSchemaMap = new Gson().fromJson(fieldSchema.jsonize(), Map.class); + assertEquals("min_word", fieldSchemaMap.get("Analyzer")); + assertNull(fieldSchemaMap.get("AnalyzerParameter")); + } + + @Test + public void jsonizeMaxWordNoParam() { + FieldSchema fieldSchema = new FieldSchema("Col_Analyzer", FieldType.TEXT); + fieldSchema.setSubFieldSchemas(new ArrayList()); + + // analyzers + FieldSchema.Analyzer analyzerMaxWord = FieldSchema.Analyzer.MaxWord; + fieldSchema.setAnalyzer(analyzerMaxWord); + + Map fieldSchemaMap = new Gson().fromJson(fieldSchema.jsonize(), Map.class); + assertEquals("max_word", fieldSchemaMap.get("Analyzer")); + assertNull(fieldSchemaMap.get("AnalyzerParameter")); + } + + @Test + public void jsonizeMaxWordInvalid() { + FieldSchema fieldSchema = new FieldSchema("Col_Analyzer", FieldType.TEXT); + fieldSchema.setSubFieldSchemas(new ArrayList()); + + // analyzers + FieldSchema.Analyzer analyzerMaxWord = FieldSchema.Analyzer.MaxWord; + fieldSchema.setAnalyzer(analyzerMaxWord); + + // analyzer param ignored + AnalyzerParameter param = new FuzzyAnalyzerParameter(1, 3); + fieldSchema.setAnalyzerParameter(param); + + Map fieldSchemaMap = new Gson().fromJson(fieldSchema.jsonize(), Map.class); + assertEquals("max_word", fieldSchemaMap.get("Analyzer")); + assertNull(fieldSchemaMap.get("AnalyzerParameter")); + } + + @Test + public void jsonizeAnalyzerParamWithNoAnalyzer() { + FieldSchema fieldSchema = new FieldSchema("Col_Analyzer", FieldType.TEXT); + fieldSchema.setSubFieldSchemas(new ArrayList()); + + AnalyzerParameter param = new FuzzyAnalyzerParameter(1, 3); + fieldSchema.setAnalyzerParameter(param); + + Map fieldSchemaMap = new Gson().fromJson(fieldSchema.jsonize(), Map.class); + assertNull(fieldSchemaMap.get("Analyzer")); + assertNull(fieldSchemaMap.get("AnalyzerParameter")); + } + + @Test + public void jsonizeNoAnalyzerNoAnalyzerParam() { + FieldSchema fieldSchema = new FieldSchema("Col_Analyzer", FieldType.TEXT); + fieldSchema.setSubFieldSchemas(new ArrayList()); + + Map fieldSchemaMap = new Gson().fromJson(fieldSchema.jsonize(), Map.class); + assertNull(fieldSchemaMap.get("Analyzer")); + assertNull(fieldSchemaMap.get("AnalyzerParameter")); + } + + @Test + public void testVirtualField() { + Boolean isVirtualField = random().nextBoolean() ? null : random().nextBoolean(); + String sourceFieldName = randomString(random().nextInt(5) + 1); + FieldType fieldType = randomFrom(FieldType.values()); + + FieldSchema fieldSchema = new FieldSchema("f1", fieldType); + fieldSchema.setVirtualField(isVirtualField); + fieldSchema.setSourceFieldName(sourceFieldName); + + assertEquals(sourceFieldName, fieldSchema.getSourceFieldNames().get(0)); + assertEquals(fieldType, fieldSchema.getFieldType()); + assertEquals(isVirtualField, fieldSchema.isVirtualField()); + } + + @Test + public void testSourceFieldName() { + Boolean isVirtualField = random().nextBoolean() ? null : random().nextBoolean(); + + List sourceFieldNames = random().nextBoolean() ? Collections.singletonList(randomString(random().nextInt(5) + 1)) : + randomList(new Supplier() { + @Override + public String get() { + return randomString(random().nextInt(5)); + } + }); + FieldType fieldType = randomFrom(FieldType.values()); + + FieldSchema fieldSchema = new FieldSchema("f1", fieldType); + fieldSchema.setVirtualField(isVirtualField); + fieldSchema.setSourceFieldNames(sourceFieldNames); + + assertEquals(sourceFieldNames, fieldSchema.getSourceFieldNames()); + assertEquals(fieldType, fieldSchema.getFieldType()); + assertEquals(isVirtualField, fieldSchema.isVirtualField()); + } + + @Test + public void testVirtualFieldJsonize() { + Boolean isVirtualField = random().nextBoolean() ? null : random().nextBoolean(); + List sourceFieldNames = random().nextBoolean() ? + (random().nextBoolean() ? null : Collections.singletonList(randomString(random().nextInt(5) + 1))) : + randomList(new Supplier() { + @Override + public String get() { + return randomString(random().nextInt(5) + 1); + } + }); + FieldType fieldType = randomFrom(FieldType.values()); + + FieldSchema fieldSchema = new FieldSchema("f1", fieldType); + fieldSchema.setVirtualField(isVirtualField); + fieldSchema.setSourceFieldNames(sourceFieldNames); + String jsonString = fieldSchema.jsonize(); + Map fieldSchemaMap = new Gson().fromJson(jsonString, Map.class); + assertEquals("f1", fieldSchemaMap.get("FieldName")); + assertEquals(isVirtualField, fieldSchemaMap.get("IsVirtualField")); + assertEquals(sourceFieldNames, fieldSchemaMap.get("SourceFieldNames")); + } +} diff --git a/src/test/java/com/alicloud/openservices/tablestore/model/search/TestGeoDecode.java b/src/test/java/com/alicloud/openservices/tablestore/model/search/TestGeoDecode.java new file mode 100644 index 0000000..4a4a22f --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/model/search/TestGeoDecode.java @@ -0,0 +1,56 @@ +package com.alicloud.openservices.tablestore.model.search; + +import com.alicloud.openservices.tablestore.core.protocol.BaseSearchTest; +import com.alicloud.openservices.tablestore.model.search.query.GeoBoundingBoxQuery; +import com.alicloud.openservices.tablestore.model.search.query.GeoDistanceQuery; +import com.alicloud.openservices.tablestore.model.search.query.GeoPolygonQuery; +import com.google.gson.Gson; +import org.junit.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; + +public class TestGeoDecode extends BaseSearchTest { + private static final Logger LOGGER = LoggerFactory.getLogger(TestGeoDecode.class); + + @Test + public void testGeoJsonDecode() { + // SQL Sample: SELECT xxxx FROM tableName WHERE location = Condition + Gson gson = new Gson(); + // GeoDistanceQuery SQL Condition + String s = "{\"centerPoint\": \"104.05358919674954, 30.530045901643962\", \"distanceInMeter\": 3000.0 }"; + GeoDistanceQuery distanceQuery = gson.fromJson(s, GeoDistanceQuery.class); + assertEquals("104.05358919674954, 30.530045901643962", distanceQuery.getCenterPoint()); + assertEquals(3000.0, distanceQuery.getDistanceInMeter(), 0); + assertNull(distanceQuery.getFieldName()); + + // GeoBoundingBoxQuery SQL Condition + s = "{\"topLeft\": \"120.1595116589601, 30.257664116603074\", \"bottomRight\": \"120.15958497923747, 30.256593333442616\"}"; + GeoBoundingBoxQuery boundingBoxQuery = gson.fromJson(s, GeoBoundingBoxQuery.class); + assertEquals("120.1595116589601, 30.257664116603074", boundingBoxQuery.getTopLeft()); + assertEquals("120.15958497923747, 30.256593333442616", boundingBoxQuery.getBottomRight()); + + // GeoPolygonQuery SQL Condition + s = "{\"points\": [\"120.1595116589601, 30.257664116603074\", \"120.15958497923747, 30.256593333442616\", " + + "\"120.15960002901203, 30.25654136528343\", \"120.15966611840484, 30.257671402958163\", " + + "\"120.1595116589601, 30.257664116603074\", \"120.1595116589601, 30.257664116603074\"]}"; + GeoPolygonQuery polygonQuery = gson.fromJson(s, GeoPolygonQuery.class); + assertEquals(6, polygonQuery.getPoints().size()); + assertEquals("120.1595116589601, 30.257664116603074", polygonQuery.getPoints().get(0)); + assertEquals("120.15958497923747, 30.256593333442616", polygonQuery.getPoints().get(1)); + assertEquals("120.15960002901203, 30.25654136528343", polygonQuery.getPoints().get(2)); + assertEquals("120.15966611840484, 30.257671402958163", polygonQuery.getPoints().get(3)); + assertEquals("120.1595116589601, 30.257664116603074", polygonQuery.getPoints().get(4)); + assertEquals("120.1595116589601, 30.257664116603074", polygonQuery.getPoints().get(5)); + } + + @Test + public void testDefault() { + GeoDistanceQuery query = new GeoDistanceQuery(); + LOGGER.info(query.getCenterPoint()); + LOGGER.info(String.valueOf(query.getDistanceInMeter())); + } + +} diff --git a/src/test/java/com/alicloud/openservices/tablestore/model/search/UpdateSearchIndexRequestTest.java b/src/test/java/com/alicloud/openservices/tablestore/model/search/UpdateSearchIndexRequestTest.java new file mode 100644 index 0000000..d9400c7 --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/model/search/UpdateSearchIndexRequestTest.java @@ -0,0 +1,64 @@ +package com.alicloud.openservices.tablestore.model.search; + +import com.alicloud.openservices.tablestore.core.protocol.BaseSearchTest; +import org.junit.Assert; +import org.junit.Test; + +import java.util.concurrent.TimeUnit; + +public class UpdateSearchIndexRequestTest extends BaseSearchTest { + + @Test + public void testSetTTL() { + // normal + { + String table = randomString(10); + String index = randomString(10); + UpdateSearchIndexRequest request = new UpdateSearchIndexRequest(table, index); + int ttl = random().nextInt(50) + 1; + TimeUnit timeUnit = randomFrom(TimeUnit.values()); + request.setTimeToLive(ttl, timeUnit); + Assert.assertEquals(request.getTimeToLive().intValue(), (int) timeUnit.toSeconds(ttl)); + } + // -1 + { + UpdateSearchIndexRequest request = new UpdateSearchIndexRequest("table", "index"); + request.setTimeToLiveInDays(-1); + Assert.assertEquals(-1, request.getTimeToLive().intValue()); + } + // not set + { + String table = randomString(10); + String index = randomString(10); + UpdateSearchIndexRequest request = new UpdateSearchIndexRequest(table, index); + Assert.assertNull(request.getTimeToLive()); + } + // illegal ttl + { + String table = randomString(10); + String index = randomString(10); + UpdateSearchIndexRequest request = new UpdateSearchIndexRequest(table, index); + try { + request.setTimeToLive(Integer.MAX_VALUE, TimeUnit.MINUTES); + Assert.fail(); + } catch (Exception e) { + Assert.assertEquals(e.getClass(), ArithmeticException.class); + } + try { + request.setTimeToLive(0, TimeUnit.DAYS); + Assert.fail(); + } catch (Exception e) { + Assert.assertEquals(e.getClass(), IllegalArgumentException.class); + Assert.assertEquals("The value of timeToLive can be -1 or any positive value.", e.getMessage()); + } + try { + request.setTimeToLive(-2, TimeUnit.DAYS); + Assert.fail(); + } catch (Exception e) { + Assert.assertEquals("The value of timeToLive can be -1 or any positive value.", e.getMessage()); + Assert.assertEquals(e.getClass(), IllegalArgumentException.class); + } + } + } + +} \ No newline at end of file diff --git a/src/test/java/com/alicloud/openservices/tablestore/model/search/agg/AggregationBuildersTest.java b/src/test/java/com/alicloud/openservices/tablestore/model/search/agg/AggregationBuildersTest.java new file mode 100644 index 0000000..ef5b1a1 --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/model/search/agg/AggregationBuildersTest.java @@ -0,0 +1,169 @@ +package com.alicloud.openservices.tablestore.model.search.agg; + +import com.alicloud.openservices.tablestore.core.protocol.BaseSearchTest; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import com.alicloud.openservices.tablestore.core.utils.ValueUtil; +import com.alicloud.openservices.tablestore.model.search.SearchRequest.ColumnsToGet; +import com.alicloud.openservices.tablestore.model.search.sort.FieldSort; +import com.alicloud.openservices.tablestore.model.search.sort.Sort; +import com.alicloud.openservices.tablestore.model.search.sort.Sort.Sorter; +import com.alicloud.openservices.tablestore.model.search.sort.SortOrder; +import org.junit.Test; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; + +public class AggregationBuildersTest extends BaseSearchTest { + + @Test + public void max() { + Aggregation aggregation = AggregationBuilders.max("a", "b").missing(12).build(); + assertEquals(AggregationType.AGG_MAX, aggregation.getAggType()); + assertEquals("a", aggregation.getAggName()); + assertEquals("b", ((MaxAggregation)aggregation).getFieldName()); + assertEquals(12L, ValueUtil.toObject(((MaxAggregation)aggregation).getMissing())); + } + + @Test + public void min() { + Aggregation aggregation = AggregationBuilders.min("a", "b").missing(12).build(); + assertEquals(AggregationType.AGG_MIN, aggregation.getAggType()); + assertEquals("a", aggregation.getAggName()); + assertEquals("b", ((MinAggregation)aggregation).getFieldName()); + assertEquals(12L, ValueUtil.toObject(((MinAggregation)aggregation).getMissing())); + } + + @Test + public void sum() { + Aggregation aggregation = AggregationBuilders.sum("a", "b").missing(12).build(); + assertEquals(AggregationType.AGG_SUM, aggregation.getAggType()); + assertEquals("a", aggregation.getAggName()); + assertEquals("b", ((SumAggregation)aggregation).getFieldName()); + assertEquals(12L, ValueUtil.toObject(((SumAggregation)aggregation).getMissing())); + } + + @Test + public void avg() { + Aggregation aggregation = AggregationBuilders.avg("a", "b").missing(12).build(); + assertEquals(AggregationType.AGG_AVG, aggregation.getAggType()); + assertEquals("a", aggregation.getAggName()); + assertEquals("b", ((AvgAggregation)aggregation).getFieldName()); + assertEquals(12L, ValueUtil.toObject(((AvgAggregation)aggregation).getMissing())); + } + + @Test + public void distinctCount() { + Aggregation aggregation = AggregationBuilders.distinctCount("a", "b").missing(12).build(); + assertEquals(AggregationType.AGG_DISTINCT_COUNT, aggregation.getAggType()); + assertEquals("a", aggregation.getAggName()); + assertEquals("b", ((DistinctCountAggregation)aggregation).getFieldName()); + assertEquals(12L, ValueUtil.toObject(((DistinctCountAggregation)aggregation).getMissing())); + } + + @Test + public void count() { + Aggregation aggregation = AggregationBuilders.count("a", "b").build(); + assertEquals(AggregationType.AGG_COUNT, aggregation.getAggType()); + assertEquals("a", aggregation.getAggName()); + assertEquals("b", ((CountAggregation)aggregation).getFieldName()); + } + + @Test + public void topRows() { + { + Aggregation aggregation = AggregationBuilders.topRows("a") + .limit(10) + .sort(new Sort(Collections.singletonList(new FieldSort("f1", SortOrder.DESC)))) + .build(); + assertEquals(AggregationType.AGG_TOP_ROWS, aggregation.getAggType()); + assertEquals("a", aggregation.getAggName()); + TopRowsAggregation topRowsAggregation = (TopRowsAggregation)aggregation; + assertEquals("a", topRowsAggregation.getAggName()); + assertEquals(10, topRowsAggregation.getLimit().intValue()); + assertEquals("f1", ((FieldSort)topRowsAggregation.getSort().getSorters().get(0)).getFieldName()); + assertEquals(SortOrder.DESC, ((FieldSort)topRowsAggregation.getSort().getSorters().get(0)).getOrder()); + } + { + Aggregation aggregation = AggregationBuilders.topRows("a") + .limit(99) + .build(); + assertEquals(AggregationType.AGG_TOP_ROWS, aggregation.getAggType()); + assertEquals("a", aggregation.getAggName()); + TopRowsAggregation topRowsAggregation = (TopRowsAggregation)aggregation; + assertEquals("a", topRowsAggregation.getAggName()); + assertEquals(99, topRowsAggregation.getLimit().intValue()); + assertNull(topRowsAggregation.getSort()); + } + { + TopRowsAggregation ag1 = new TopRowsAggregation(); + ag1.setAggName("aggName"); + ag1.setLimit(10); + ColumnsToGet columnsToGet = new ColumnsToGet(); + columnsToGet.setColumns(Arrays.asList("12","23")); + ag1.setSort(new Sort(Collections.singletonList(new FieldSort("f1", SortOrder.DESC)))); + + TopRowsAggregation ag2 = AggregationBuilders.topRows("aggName") + .limit(10) + .sort(new Sort(Collections.singletonList(new FieldSort("f1", SortOrder.DESC)))) + .build(); + Gson gson = new GsonBuilder() + .disableHtmlEscaping() + .disableInnerClassSerialization() + .serializeNulls() + .serializeSpecialFloatingPointValues() + .enableComplexMapKeySerialization().create(); + + assertEquals(gson.toJson(ag1), gson.toJson(ag2)); + } + } + + @Test + public void percentiles() { + { + Aggregation aggregation = AggregationBuilders.percentiles("a","bb") + .percentiles(Collections.singletonList(99.0)) + .missing(1L) + .build(); + assertEquals(AggregationType.AGG_PERCENTILES, aggregation.getAggType()); + assertEquals("a", aggregation.getAggName()); + assertEquals(1L, ((PercentilesAggregation)aggregation).getMissing().getValue()); + assertEquals("bb", ((PercentilesAggregation)aggregation).getFieldName()); + assertTrue(((Double)((PercentilesAggregation)aggregation).getPercentiles().get(0)).compareTo(99.0) == 0); + } + { + Aggregation aggregation = AggregationBuilders.percentiles("a","bb") + .fieldName("bb") + .build(); + assertEquals(AggregationType.AGG_PERCENTILES, aggregation.getAggType()); + assertEquals("a", aggregation.getAggName()); + assertEquals("bb", ((PercentilesAggregation)aggregation).getFieldName()); + assertNull(((PercentilesAggregation)aggregation).getPercentiles()); + } + { + Aggregation agg1 = AggregationBuilders.percentiles("a","bb") + .fieldName("bb") + .percentiles(Arrays.asList(0.0,50.0,99.0)) + .build(); + PercentilesAggregation agg2=new PercentilesAggregation(); + agg2.setAggName("a"); + agg2.setFieldName("bb"); + List percentiles=Arrays.asList(0.0,50.0,99.0); + agg2.setPercentiles(percentiles); + + Gson gson = new GsonBuilder() + .disableHtmlEscaping() + .disableInnerClassSerialization() + .serializeNulls() + .serializeSpecialFloatingPointValues() + .enableComplexMapKeySerialization().create(); + + assertEquals(gson.toJson(agg1), gson.toJson(agg2)); + } + } +} \ No newline at end of file diff --git a/src/test/java/com/alicloud/openservices/tablestore/model/search/agg/AggregationResultsTest.java b/src/test/java/com/alicloud/openservices/tablestore/model/search/agg/AggregationResultsTest.java new file mode 100644 index 0000000..3e52fe9 --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/model/search/agg/AggregationResultsTest.java @@ -0,0 +1,112 @@ +package com.alicloud.openservices.tablestore.model.search.agg; + +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; + +import com.alicloud.openservices.tablestore.core.protocol.BaseSearchTest; +import com.alicloud.openservices.tablestore.model.Row; +import org.junit.Before; +import org.junit.Test; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; + +public class AggregationResultsTest extends BaseSearchTest { + + AggregationResults aggregationResults; + + @Before + public void init() { + aggregationResults = new AggregationResults(); + Map map = new HashMap(); + map.put("1a", new AvgAggregationResult().setValue(123).setAggName("1a")); + map.put("2b", new SumAggregationResult().setValue(456).setAggName("2b")); + map.put("3c", new MinAggregationResult().setValue(789).setAggName("3c")); + map.put("4d", new MaxAggregationResult().setValue(101112).setAggName("4d")); + map.put("5e", new CountAggregationResult().setValue(131415).setAggName("5e")); + map.put("6f", new DistinctCountAggregationResult().setValue(161718).setAggName("6f")); + map.put("7g", new TopRowsAggregationResult().setAggName("7g").setRows(Collections.emptyList())); + map.put("8h", new PercentilesAggregationResult().setAggName("8h").setPercentilesAggregationItems(Collections.emptyList())); + + aggregationResults.setResultMap(map); + } + + @Test + public void size() { + assertEquals(0, new AggregationResults().size()); + assertEquals(8, aggregationResults.size()); + + } + + @Test + public void getAsAvgAggregationResult() { + assertEquals(123, aggregationResults.getAsAvgAggregationResult("1a").getValue(), 0.000001); + assertEquals(AggregationType.AGG_AVG, aggregationResults.getAsAvgAggregationResult("1a").getAggType()); + assertEquals("1a", aggregationResults.getAsAvgAggregationResult("1a").getAggName()); + + } + + @Test + public void getAsDistinctCountAggregationResult() { + assertEquals(161718, aggregationResults.getAsDistinctCountAggregationResult("6f").getValue(), 0.000001); + assertEquals(AggregationType.AGG_DISTINCT_COUNT, + aggregationResults.getAsDistinctCountAggregationResult("6f").getAggType()); + assertEquals("6f", aggregationResults.getAsDistinctCountAggregationResult("6f").getAggName()); + } + + @Test + public void getAsMaxAggregationResult() { + assertEquals(101112, aggregationResults.getAsMaxAggregationResult("4d").getValue(), 0.000001); + assertEquals(AggregationType.AGG_MAX, aggregationResults.getAsMaxAggregationResult("4d").getAggType()); + assertEquals("4d", aggregationResults.getAsMaxAggregationResult("4d").getAggName()); + + Throwable t = null; + try { + aggregationResults.getAsMinAggregationResult("4d"); + } catch (Exception ex) { + t = ex; + } + assertNotNull(t); + assertEquals("the result with this aggregationName can't cast to MinAggregationResult.", t.getMessage()); + assertEquals(IllegalArgumentException.class, t.getClass()); + + } + + @Test + public void getAsTopRowsAggregationResult() { + assertEquals(0, aggregationResults.getAsTopRowsAggregationResult("7g").getRows().size(), 0.000001); + assertEquals(AggregationType.AGG_TOP_ROWS, aggregationResults.getAsTopRowsAggregationResult("7g").getAggType()); + assertEquals("7g", aggregationResults.getAsTopRowsAggregationResult("7g").getAggName()); + + Throwable t = null; + try { + aggregationResults.getAsTopRowsAggregationResult("1a"); + } catch (Exception ex) { + t = ex; + } + assertNotNull(t); + assertEquals("the result with this aggregationName can't cast to TopRowsAggregationResult.", t.getMessage()); + assertEquals(IllegalArgumentException.class, t.getClass()); + + } + + @Test + public void getAsPercentilesAggregationResult() { + assertEquals(0, aggregationResults.getAsPercentilesAggregationResult("8h").getPercentilesAggregationItems().size(), 0.000001); + assertEquals(AggregationType.AGG_PERCENTILES, aggregationResults.getAsPercentilesAggregationResult("8h").getAggType()); + assertEquals("8h", aggregationResults.getAsPercentilesAggregationResult("8h").getAggName()); + + Throwable t = null; + try { + aggregationResults.getAsPercentilesAggregationResult("1a"); + } catch (Exception ex) { + t = ex; + } + assertNotNull(t); + assertEquals("the result with this aggregationName can't cast to PercentilesAggregationResult.", t.getMessage()); + assertEquals(IllegalArgumentException.class, t.getClass()); + + } + +} \ No newline at end of file diff --git a/src/test/java/com/alicloud/openservices/tablestore/model/search/analysis/AnalyzerParameterBuilderTest.java b/src/test/java/com/alicloud/openservices/tablestore/model/search/analysis/AnalyzerParameterBuilderTest.java new file mode 100644 index 0000000..c33bf71 --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/model/search/analysis/AnalyzerParameterBuilderTest.java @@ -0,0 +1,55 @@ +package com.alicloud.openservices.tablestore.model.search.analysis; + +import com.alicloud.openservices.tablestore.core.protocol.Search; +import com.alicloud.openservices.tablestore.core.protocol.BaseSearchTest; +import org.junit.Test; +import static org.junit.Assert.*; + +public class AnalyzerParameterBuilderTest extends BaseSearchTest { + + @Test + public void buildSingleWordAnalyzerParameterWithDefaultParameter() { + SingleWordAnalyzerParameter param = new SingleWordAnalyzerParameter(); + Search.SingleWordAnalyzerParameter pbParam = AnalyzerParameterBuilder.buildSingleWordAnalyzerParameter(param); + assertFalse(pbParam.getCaseSensitive()); + assertFalse(pbParam.getDelimitWord()); + } + + @Test + public void buildSingleWordAnalyzerParameterWithParameter() { + SingleWordAnalyzerParameter param = new SingleWordAnalyzerParameter(true, true); + Search.SingleWordAnalyzerParameter pbParam = AnalyzerParameterBuilder.buildSingleWordAnalyzerParameter(param); + assertTrue(pbParam.getCaseSensitive()); + assertTrue(pbParam.getDelimitWord()); + } + + @Test + public void buildSplitAnalyzerParameterWithDefaultParameter() { + SplitAnalyzerParameter param = new SplitAnalyzerParameter(); + Search.SplitAnalyzerParameter pbParam = AnalyzerParameterBuilder.buildSplitAnalyzerParameter(param); + assertFalse(pbParam.hasDelimiter()); + } + + @Test + public void buildSplitAnalyzerParameterWithParameter() { + SplitAnalyzerParameter param = new SplitAnalyzerParameter("-"); + Search.SplitAnalyzerParameter pbParam = AnalyzerParameterBuilder.buildSplitAnalyzerParameter(param); + assertEquals("-", pbParam.getDelimiter()); + } + + @Test + public void buildFuzzyAnalyzerParameterWithDefaultParameter() { + FuzzyAnalyzerParameter param = new FuzzyAnalyzerParameter(); + Search.FuzzyAnalyzerParameter pbParam = AnalyzerParameterBuilder.buildFuzzyAnalyzerParameter(param); + assertFalse(pbParam.hasMinChars()); + assertFalse(pbParam.hasMaxChars()); + } + + @Test + public void buildFuzzyAnalyzerParameterWithParameter() { + FuzzyAnalyzerParameter param = new FuzzyAnalyzerParameter(2, 4); + Search.FuzzyAnalyzerParameter pbParam = AnalyzerParameterBuilder.buildFuzzyAnalyzerParameter(param); + assertEquals(2, pbParam.getMinChars()); + assertEquals(4, pbParam.getMaxChars()); + } +} diff --git a/src/test/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByBuildersTest.java b/src/test/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByBuildersTest.java new file mode 100644 index 0000000..5d11d67 --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByBuildersTest.java @@ -0,0 +1,211 @@ +package com.alicloud.openservices.tablestore.model.search.groupby; + +import com.alicloud.openservices.tablestore.core.utils.ValueUtil; +import com.alicloud.openservices.tablestore.model.ColumnType; +import com.alicloud.openservices.tablestore.model.ColumnValue; +import com.alicloud.openservices.tablestore.core.protocol.BaseSearchTest; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import java.util.Arrays; + +import com.alicloud.openservices.tablestore.model.search.agg.AggregationBuilders; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupByField.Builder; +import com.alicloud.openservices.tablestore.model.search.sort.GroupBySorter; +import com.alicloud.openservices.tablestore.model.search.sort.GroupKeySort; +import com.alicloud.openservices.tablestore.model.search.sort.RowCountSort; +import com.alicloud.openservices.tablestore.model.search.sort.SortOrder; +import static org.junit.Assert.assertEquals; +import org.junit.Test; + +/** + * GroupByBuilders Tester. + * + * @author + * @version 1.0 + * @since
9月 30, 2019
+ */ +public class GroupByBuildersTest extends BaseSearchTest { + + @Test + public void testType() { + GroupByField groupByField = GroupByBuilders.groupByField("t", "t").build(); + assertEquals(GroupByType.GROUP_BY_FIELD, groupByField.getGroupByType()); + + GroupByFilter groupByFilter = GroupByBuilders.groupByFilter("t").build(); + assertEquals(GroupByType.GROUP_BY_FILTER, groupByFilter.getGroupByType()); + + GroupByGeoDistance groupByGeoDistance = GroupByBuilders.groupByGeoDistance("t", "t").build(); + assertEquals(GroupByType.GROUP_BY_GEO_DISTANCE, groupByGeoDistance.getGroupByType()); + + GroupByRange groupByRange = GroupByBuilders.groupByRange("t", "t").build(); + assertEquals(GroupByType.GROUP_BY_RANGE, groupByRange.getGroupByType()); + + GroupByHistogram groupByHistogram = GroupByBuilders.groupByHistogram("u", "u").build(); + assertEquals(GroupByType.GROUP_BY_HISTOGRAM, groupByHistogram.getGroupByType()); + } + + /** + * Method: groupByField(String groupByName, String field) + */ + @Test + public void testGroupByField() throws Exception { + GroupByField g1 = new GroupByField(); + g1.setFieldName("g1"); + g1.setGroupByName("n1"); + g1.setSize(10); + + GroupKeySort groupKeySort = new GroupKeySort(); + groupKeySort.setOrder(SortOrder.ASC); + RowCountSort rowCountSort = new RowCountSort(); + rowCountSort.setOrder(SortOrder.DESC); + GroupBySorter groupBySorter1 = new GroupBySorter(); + GroupBySorter groupBySorter2 = new GroupBySorter(); + groupBySorter1.setGroupKeySort(groupKeySort); + groupBySorter2.setRowCountSort(rowCountSort); + g1.setGroupBySorters(Arrays.asList(groupBySorter1, groupBySorter2)); + g1.setSubAggregations(Arrays.asList(AggregationBuilders.max("m1", "m1").build(), + AggregationBuilders.count("m2", "m2").build(), + AggregationBuilders.count("m3", "m3").build())); + + Builder builder1 = GroupByBuilders.groupByField("n1", "g1") + .size(10) + .addGroupBySorter(Arrays.asList(GroupBySorter.groupKeySortInAsc(), GroupBySorter.rowCountSortInDesc())) + .addSubAggregation(AggregationBuilders.max("m1", "m1")) + .addSubAggregation(AggregationBuilders.count("m2", "m2")) + .addSubAggregation(AggregationBuilders.count("m3", "m3")); + + Gson gson = new GsonBuilder() + .disableHtmlEscaping() + .disableInnerClassSerialization() + .serializeNulls() + .serializeSpecialFloatingPointValues() + .enableComplexMapKeySerialization().create(); + + assertEquals(gson.toJson(builder1.build()), gson.toJson(g1)); + } + + /** + * Method: groupByField(String groupByName, String field) + */ + @Test + public void testGroupByFieldWithDocCount() throws Exception { + GroupByField g1 = new GroupByField(); + g1.setFieldName("g1"); + g1.setGroupByName("n1"); + g1.setSize(10); + g1.setMinDocCount(10L); + + GroupKeySort groupKeySort = new GroupKeySort(); + groupKeySort.setOrder(SortOrder.ASC); + RowCountSort rowCountSort = new RowCountSort(); + rowCountSort.setOrder(SortOrder.DESC); + GroupBySorter groupBySorter1 = new GroupBySorter(); + GroupBySorter groupBySorter2 = new GroupBySorter(); + groupBySorter1.setGroupKeySort(groupKeySort); + groupBySorter2.setRowCountSort(rowCountSort); + g1.setGroupBySorters(Arrays.asList(groupBySorter1, groupBySorter2)); + g1.setSubAggregations(Arrays.asList(AggregationBuilders.max("m1", "m1").build(), + AggregationBuilders.count("m2", "m2").build(), + AggregationBuilders.count("m3", "m3").build())); + + Builder builder1 = GroupByBuilders.groupByField("n1", "g1") + .size(10) + .minDocCount(10L) + .addGroupBySorter(Arrays.asList(GroupBySorter.groupKeySortInAsc(), GroupBySorter.rowCountSortInDesc())) + .addSubAggregation(AggregationBuilders.max("m1", "m1")) + .addSubAggregation(AggregationBuilders.count("m2", "m2")) + .addSubAggregation(AggregationBuilders.count("m3", "m3")); + + Gson gson = new GsonBuilder() + .disableHtmlEscaping() + .disableInnerClassSerialization() + .serializeNulls() + .serializeSpecialFloatingPointValues() + .enableComplexMapKeySerialization().create(); + + assertEquals(gson.toJson(builder1.build()), gson.toJson(g1)); + } + + /** + * Method: groupByHistogram(String groupByName, String field) + */ + @Test + public void testgroupByHistogram() throws Exception { + { + GroupByHistogram g1 = new GroupByHistogram(); + g1.setGroupByName("n1"); + g1.setFieldName("g1"); + g1.setInterval(ValueUtil.toColumnValue(5.0)); + g1.setMissing(new ColumnValue(1, ColumnType.INTEGER)); + g1.setMinDocCount(10L); + g1.setFieldRange( + new FieldRange(new ColumnValue(1.0, ColumnType.DOUBLE), new ColumnValue(5.0, ColumnType.DOUBLE))); + GroupKeySort groupKeySort = new GroupKeySort(); + groupKeySort.setOrder(SortOrder.ASC); + RowCountSort rowCountSort = new RowCountSort(); + rowCountSort.setOrder(SortOrder.DESC); + GroupBySorter groupBySorter1 = new GroupBySorter(); + GroupBySorter groupBySorter2 = new GroupBySorter(); + groupBySorter1.setGroupKeySort(groupKeySort); + groupBySorter2.setRowCountSort(rowCountSort); + g1.setGroupBySorters(Arrays.asList(groupBySorter1, groupBySorter2)); + + GroupByHistogram.Builder builder1 = GroupByBuilders.groupByHistogram("n1", "g1") + .interval(5.0) + .missing(1) + .minDocCount(10L) + .addFieldRange(1.0, 5.0) + .addGroupBySorter(Arrays.asList(GroupBySorter.groupKeySortInAsc(), GroupBySorter.rowCountSortInDesc())); + + Gson gson = new GsonBuilder() + .disableHtmlEscaping() + .disableInnerClassSerialization() + .serializeNulls() + .serializeSpecialFloatingPointValues() + .enableComplexMapKeySerialization().create(); + + assertEquals(gson.toJson(builder1.build()), gson.toJson(g1)); + } + { + GroupByHistogram g1 = new GroupByHistogram(); + g1.setGroupByName("n1"); + g1.setFieldName("g1"); + g1.setInterval(ValueUtil.toColumnValue(5.0)); + g1.setMissing(new ColumnValue(1, ColumnType.INTEGER)); + g1.setMinDocCount(10L); + g1.setFieldRange( + new FieldRange(new ColumnValue(1.0, ColumnType.DOUBLE), new ColumnValue(5.0, ColumnType.DOUBLE))); + GroupKeySort groupKeySort = new GroupKeySort(); + groupKeySort.setOrder(SortOrder.ASC); + RowCountSort rowCountSort = new RowCountSort(); + rowCountSort.setOrder(SortOrder.DESC); + GroupBySorter groupBySorter1 = new GroupBySorter(); + GroupBySorter groupBySorter2 = new GroupBySorter(); + groupBySorter1.setGroupKeySort(groupKeySort); + groupBySorter2.setRowCountSort(rowCountSort); + g1.setGroupBySorters(Arrays.asList(groupBySorter1, groupBySorter2)); + g1.setSubAggregations(Arrays.asList(AggregationBuilders.max("m1", "m1").build(), + AggregationBuilders.count("m2", "m2").build(), + AggregationBuilders.count("m3", "m3").build())); + + GroupByHistogram.Builder builder1 = GroupByBuilders.groupByHistogram("n1", "g1") + .interval(5.0) + .missing(1) + .minDocCount(10L) + .addFieldRange(1.0, 5.0) + .addGroupBySorter(Arrays.asList(GroupBySorter.groupKeySortInAsc(), GroupBySorter.rowCountSortInDesc())) + .addSubAggregation(AggregationBuilders.max("m1", "m1")) + .addSubAggregation(AggregationBuilders.count("m2", "m2")) + .addSubAggregation(AggregationBuilders.count("m3", "m3")); + + Gson gson = new GsonBuilder() + .disableHtmlEscaping() + .disableInnerClassSerialization() + .serializeNulls() + .serializeSpecialFloatingPointValues() + .enableComplexMapKeySerialization().create(); + + assertEquals(gson.toJson(builder1.build()), gson.toJson(g1)); + } + } +} diff --git a/src/test/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByResultsTest.java b/src/test/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByResultsTest.java new file mode 100644 index 0000000..64aa437 --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/model/search/groupby/GroupByResultsTest.java @@ -0,0 +1,55 @@ +package com.alicloud.openservices.tablestore.model.search.groupby; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import com.alicloud.openservices.tablestore.model.ColumnValue; +import junit.framework.TestCase; +import org.junit.Test; + +public class GroupByResultsTest extends TestCase { + + GroupByResults groupByResults; + + + @Test + public void testGetAsGroupByHistogramResult() { + { + groupByResults = new GroupByResults(); + GroupByHistogramItem item = new GroupByHistogramItem(); + item.setKey(ColumnValue.fromLong(1)); + List groupByHistogramItems = new ArrayList(); + groupByHistogramItems.add(item); + item.setValue(12L); + Map map = new HashMap(); + map.put("8h", + new GroupByHistogramResult().setGroupByName("8h").setGroupByHistogramItems(groupByHistogramItems)); + groupByResults.setGroupByResultMap(map); + + assertEquals(1, groupByResults.getAsGroupByHistogramResult("8h").getGroupByHistogramItems().size(), + 0.000001); + assertEquals(GroupByType.GROUP_BY_HISTOGRAM, + groupByResults.getAsGroupByHistogramResult("8h").getGroupByType()); + assertEquals("8h", groupByResults.getAsGroupByHistogramResult("8h").getGroupByName()); + } + { + groupByResults = new GroupByResults(); + Map map = new HashMap(); + map.put("8h", + new GroupByRangeResult().setGroupByName("8h")); + groupByResults.setGroupByResultMap(map); + + Throwable t = null; + try { + groupByResults.getAsGroupByHistogramResult("8h"); + } catch (Exception ex) { + t = ex; + } + assertNotNull(t); + assertEquals("the result with this groupByName can't cast to GroupByHistogramResult.", t.getMessage()); + assertEquals(IllegalArgumentException.class, t.getClass()); + } + } +} \ No newline at end of file diff --git a/src/test/java/com/alicloud/openservices/tablestore/timeline/functionTest/TestSearchParameter.java b/src/test/java/com/alicloud/openservices/tablestore/timeline/functionTest/TestSearchParameter.java index 1a5c340..c369f89 100644 --- a/src/test/java/com/alicloud/openservices/tablestore/timeline/functionTest/TestSearchParameter.java +++ b/src/test/java/com/alicloud/openservices/tablestore/timeline/functionTest/TestSearchParameter.java @@ -61,7 +61,7 @@ public static void setUp() throws Exception { sleepForSyncData(); } catch (FileNotFoundException e) { - e.printStackTrace(); + throw e; } } diff --git a/src/test/java/com/alicloud/openservices/tablestore/timeline/functionTest/TestSearchQueue.java b/src/test/java/com/alicloud/openservices/tablestore/timeline/functionTest/TestSearchQueue.java new file mode 100644 index 0000000..19e8df5 --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/timeline/functionTest/TestSearchQueue.java @@ -0,0 +1,229 @@ +package com.alicloud.openservices.tablestore.timeline.functionTest; + +import com.alicloud.openservices.tablestore.SyncClient; +import com.alicloud.openservices.tablestore.model.Column; +import com.alicloud.openservices.tablestore.model.ColumnValue; +import com.alicloud.openservices.tablestore.model.search.FieldSchema; +import com.alicloud.openservices.tablestore.model.search.FieldType; +import com.alicloud.openservices.tablestore.model.search.IndexSchema; +import com.alicloud.openservices.tablestore.model.search.SearchQuery; +import com.alicloud.openservices.tablestore.model.search.query.*; +import com.alicloud.openservices.tablestore.timeline.TimelineQueue; +import com.alicloud.openservices.tablestore.timeline.TimelineMetaStore; +import com.alicloud.openservices.tablestore.timeline.TimelineStore; +import com.alicloud.openservices.tablestore.timeline.TimelineStoreFactory; +import com.alicloud.openservices.tablestore.timeline.common.Conf; +import com.alicloud.openservices.tablestore.timeline.core.TimelineStoreFactoryImpl; +import com.alicloud.openservices.tablestore.timeline.model.*; +import com.alicloud.openservices.tablestore.timeline.query.SearchResult; +import com.alicloud.openservices.tablestore.writer.WriterConfig; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; + +import java.io.FileNotFoundException; +import java.util.Arrays; + +import static com.alicloud.openservices.tablestore.timeline.common.ServiceWrapper.sleepForSyncData; +import static org.junit.Assert.assertEquals; + +public class TestSearchQueue { + private static String metaTableName = "metaTable"; + private static String metaIndexName = "metaIndex"; + private static String dataTableName = "dataTable"; + private static String dataIndexName = "dataIndex"; + private static String sequenceIdName = "dataIndex"; + + + private static TimelineIdentifierSchema identifierSchema = new TimelineIdentifierSchema.Builder() + .addStringField("timelineId") + .build(); + + private static SyncClient client; + private static TimelineStoreFactory factory = null; + private static TimelineMetaStore metaService = null; + private static TimelineStore timelineStore = null; + + @BeforeClass + public static void setUp() throws Exception { + try { + System.out.println("start before class."); + Conf conf = Conf.newInstance(System.getProperty("user.home") + "/tablestoreConf.json"); + client = new SyncClient(conf.getEndpoint(), conf.getAccessId(), conf.getAccessKey(), conf.getInstanceName()); + factory = new TimelineStoreFactoryImpl(client); + + try { + initMetaTable(); + } catch (Exception e) { + e.printStackTrace(); + } + try { + initDataTable(); + } catch (Exception e) { + e.printStackTrace(); + } + insertMeta(); + insertData(); + + System.out.println("sleep in before class."); + + try { + Thread.sleep(60000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + + System.out.println("finish before class."); + } catch (FileNotFoundException e) { + e.printStackTrace(); + } + } + + @AfterClass + public static void after() { + timelineStore.flush(); + + metaService.dropAllTables(); + timelineStore.dropAllTables(); + + client.shutdown(); + } + + @Test + public void testNotSearchTimeline() { + + System.out.println("start test function."); + MatchPhraseQuery query2 = new MatchPhraseQuery(); + query2.setFieldName("text"); + query2.setText("ots2"); + + SearchQuery searchQuery = new SearchQuery(); + searchQuery.setQuery(query2); + searchQuery.setGetTotalCount(true); + searchQuery.setLimit(100); + + TimelineQueue timelineQueue = timelineStore.createTimelineQueue(new TimelineIdentifier.Builder() + .addField("timelineId", "group_2") + .build()); + + + SearchResult result = timelineQueue.search(searchQuery); + assertEquals(2, result.getTotalCount()); + } + + /** + * init meta table service + * */ + private static void initMetaTable() { + IndexSchema metaIndex = new IndexSchema(); + metaIndex.addFieldSchema(new FieldSchema("groupName", FieldType.TEXT).setIndex(true).setAnalyzer(FieldSchema.Analyzer.MaxWord)); + metaIndex.addFieldSchema(new FieldSchema("createTime", FieldType.LONG).setIndex(true)); + metaIndex.addFieldSchema(new FieldSchema("location", FieldType.GEO_POINT).setIndex(true)); + metaIndex.addFieldSchema(new FieldSchema("isPublic", FieldType.BOOLEAN).setIndex(true)); + metaIndex.addFieldSchema(new FieldSchema("point", FieldType.DOUBLE).setIndex(true)); + metaIndex.addFieldSchema(new FieldSchema("tags", FieldType.KEYWORD).setIndex(true).setIsArray(true)); + + TimelineMetaSchema metaSchema = new TimelineMetaSchema(metaTableName, identifierSchema) + .withIndex(metaIndexName, metaIndex); + metaService = factory.createMetaStore(metaSchema); + metaService.prepareTables(); + } + + /** + * init store table service + * */ + private static void initDataTable() { + IndexSchema dataIndex = new IndexSchema(); + dataIndex.addFieldSchema(new FieldSchema("timelineId", FieldType.KEYWORD).setIndex(true)); + dataIndex.addFieldSchema(new FieldSchema("text", FieldType.TEXT).setIndex(true).setAnalyzer(FieldSchema.Analyzer.MaxWord)); + dataIndex.addFieldSchema(new FieldSchema("receivers", FieldType.KEYWORD).setIsArray(true).setIndex(true)); + dataIndex.addFieldSchema(new FieldSchema("timestamp", FieldType.LONG).setEnableSortAndAgg(true)); + dataIndex.addFieldSchema(new FieldSchema("from", FieldType.KEYWORD)); + + WriterConfig writerConfig = new WriterConfig(); + writerConfig.setFlushInterval(1000); + + TimelineSchema dataSchema = new TimelineSchema(dataTableName, identifierSchema) + .withIndex(dataIndexName, dataIndex) + .autoGenerateSeqId() + .setSequenceIdColumnName(sequenceIdName) + .setTimeToLive(-1) + .withWriterConfig(writerConfig); + timelineStore = factory.createTimelineStore(dataSchema); + timelineStore.prepareTables(); + } + + /** + * insert meta into metaTable + * */ + private static void insertMeta() { + for (int i = 0; i < 10; i++) { + TimelineIdentifier identifier = new TimelineIdentifier.Builder() + .addField("timelineId", "group_" + i) + .build(); + + TimelineMeta insertGroup = new TimelineMeta(identifier) + .setField("groupName", "表格存储" + i) + .setField("createTime", i) + .setField("location", "30,12" + i) + .setField("isPublic", i % 2 == 0) + .setField("point", i + 0.0D) + .setField(new Column("tags", ColumnValue.fromString("[\"Table\",\"Store\"]"))); + + metaService.insert(insertGroup); + } + } + + /** + * insert data into dataTable + * */ + private static void insertData() { + String[] groupMember = new String[]{"user_a", "user_b", "user_c"}; + + + for (int i = 0; i < 10; i++) { + TimelineQueue groupTimelineQueue = timelineStore.createTimelineQueue( + new TimelineIdentifier.Builder() + .addField("timelineId", "group_1") + .build() + ); + + TimelineMessage tm = new TimelineMessage() + .setField("text", "hello TableStore ots" + i) + .setField("receivers", groupMember) + .setField("timestamp", i) + .setField("from", "ots"); + groupTimelineQueue.store(tm); + } + for (int i = 0; i < 10; i++) { + TimelineQueue groupTimelineQueue = timelineStore.createTimelineQueue( + new TimelineIdentifier.Builder() + .addField("timelineId", "group_2") + .build() + ); + + TimelineMessage tm = new TimelineMessage() + .setField("text", "hello TableStore ots" + i) + .setField("receivers", groupMember) + .setField("timestamp", i) + .setField("from", "ots"); + groupTimelineQueue.store(tm); + } + + + for (int i = 0; i < 10; i++) { + TimelineQueue groupTimelineQueue = timelineStore.createTimelineQueue( + new TimelineIdentifier.Builder() + .addField("timelineId", "group_2") + .build() + ); + + TimelineMessage tm = new TimelineMessage() + .setField("text", "fine TableStore ots" + i) + .setField("receivers", groupMember) + .setField("timestamp", i) + .setField("from", "ots"); + groupTimelineQueue.store(tm); + } + } +} diff --git a/src/test/java/com/alicloud/openservices/tablestore/timeline/functionTest/TestTimelineService.java b/src/test/java/com/alicloud/openservices/tablestore/timeline/functionTest/TestTimelineService.java index 3035579..f97419d 100644 --- a/src/test/java/com/alicloud/openservices/tablestore/timeline/functionTest/TestTimelineService.java +++ b/src/test/java/com/alicloud/openservices/tablestore/timeline/functionTest/TestTimelineService.java @@ -148,7 +148,7 @@ public void testExceptionSearch() { TimelineStore syncService = wrapper.getSyncTableStore(); /** - * Test search exception + * MyTest search exception * */ TermQuery wrongQuery = new TermQuery(); wrongQuery.setFieldName("notExist"); diff --git a/src/test/java/com/alicloud/openservices/tablestore/timestream/internal/MetaCacheManagerUnittest.java b/src/test/java/com/alicloud/openservices/tablestore/timestream/internal/MetaCacheManagerUnittest.java index d26766f..1b49c0b 100644 --- a/src/test/java/com/alicloud/openservices/tablestore/timestream/internal/MetaCacheManagerUnittest.java +++ b/src/test/java/com/alicloud/openservices/tablestore/timestream/internal/MetaCacheManagerUnittest.java @@ -1,18 +1,19 @@ package com.alicloud.openservices.tablestore.timestream.internal; -import com.alicloud.openservices.tablestore.ClientException; -import com.alicloud.openservices.tablestore.TableStoreCallback; -import com.alicloud.openservices.tablestore.TableStoreWriter; +import com.alicloud.openservices.tablestore.*; import com.alicloud.openservices.tablestore.model.ConsumedCapacity; import com.alicloud.openservices.tablestore.model.RowChange; import com.alicloud.openservices.tablestore.writer.RowWriteResult; import com.alicloud.openservices.tablestore.writer.WriterConfig; +import com.alicloud.openservices.tablestore.writer.WriterResult; import com.alicloud.openservices.tablestore.writer.WriterStatistics; import com.alicloud.openservices.tablestore.timestream.model.TimestreamIdentifier; import junit.framework.Assert; import org.junit.Test; import java.util.List; +import java.util.concurrent.ConcurrentSkipListMap; +import java.util.concurrent.Future; public class MetaCacheManagerUnittest { @@ -138,6 +139,11 @@ public int getRowCount() { public void addRowChange(RowChange var1) { } + @Override + public Future addRowChangeWithFuture(RowChange rowChange) throws ClientException { + return null; + } + public void setReturnTrue(boolean res) { this.returnTrue = res; } @@ -154,6 +160,11 @@ public boolean tryAddRowChange(RowChange var1) throws ClientException { public void addRowChange(List var1, List var2) throws ClientException{ } + @Override + public Future addRowChangeWithFuture(List rowChanges) throws ClientException { + return null; + } + /** @deprecated */ public void setCallback(TableStoreCallback var1){ } diff --git a/src/test/java/com/alicloud/openservices/tablestore/timestream/model/filter/OrFiltterUnittest.java b/src/test/java/com/alicloud/openservices/tablestore/timestream/model/filter/OrFiltterUnittest.java deleted file mode 100644 index 30d9458..0000000 --- a/src/test/java/com/alicloud/openservices/tablestore/timestream/model/filter/OrFiltterUnittest.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.alicloud.openservices.tablestore.timestream.model.filter; - -import com.alicloud.openservices.tablestore.model.search.query.BoolQuery; -import com.alicloud.openservices.tablestore.model.search.query.Query; -import com.alicloud.openservices.tablestore.model.search.query.TermQuery; -import com.alicloud.openservices.tablestore.timestream.internal.TableMetaGenerator; -import com.alicloud.openservices.tablestore.timestream.internal.Utils; -import org.junit.Assert; -import org.junit.Test; - -import static com.alicloud.openservices.tablestore.timestream.model.filter.FilterFactory.*; - -public class OrFiltterUnittest { - @Test - public void testBasic() { - Tag tagFilter = Tag.equal("t1", "v1"); - Attribute attrFilter = Attribute.equal("a1", "v2"); - OrFilter filter = (OrFilter)(or( - tagFilter, - attrFilter - )); - Query query = filter.getQuery(); - Assert.assertTrue(query instanceof BoolQuery); - Assert.assertEquals(((BoolQuery)query).getShouldQueries().size(), 2); - Assert.assertTrue(((BoolQuery)query).getShouldQueries().get(0) instanceof TermQuery); - Assert.assertEquals(((TermQuery)((BoolQuery)query).getShouldQueries().get(0)).getFieldName(), TableMetaGenerator.CN_PK2); - Assert.assertEquals(((TermQuery)((BoolQuery)query).getShouldQueries().get(0)).getTerm().asString(), Utils.buildTagValue("t1", "v1")); - Assert.assertTrue(((BoolQuery)query).getShouldQueries().get(1) instanceof TermQuery); - Assert.assertEquals(((TermQuery)((BoolQuery)query).getShouldQueries().get(1)).getFieldName(), "a1"); - Assert.assertEquals(((TermQuery)((BoolQuery)query).getShouldQueries().get(1)).getTerm().asString(), "v2"); - } -} diff --git a/src/test/java/com/alicloud/openservices/tablestore/tunnel/functiontest/TestBackFillTunnel.java b/src/test/java/com/alicloud/openservices/tablestore/tunnel/functiontest/TestBackFillTunnel.java new file mode 100644 index 0000000..d0c9b6c --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/tunnel/functiontest/TestBackFillTunnel.java @@ -0,0 +1,117 @@ +package com.alicloud.openservices.tablestore.tunnel.functiontest; + +import com.alicloud.openservices.tablestore.TunnelClient; +import com.alicloud.openservices.tablestore.model.tunnel.*; +import junit.framework.TestCase; +import org.junit.Assert; + +public class TestBackFillTunnel extends TestCase { + private static final String ENDPOINT = "http://zhuoran-test.ali-cn-hangzhou.ots.aliyuncs.com"; + private static final String ACCESS_ID = ""; + private static final String ACCESS_KEY = ""; + private static final String INSTANCE_NAME = "zhuoran-test"; + private static final String TABLE_NAME = "table_test"; + + private TunnelClient client; + + @Override + public void setUp() throws Exception { + client = new TunnelClient(ENDPOINT, ACCESS_ID, ACCESS_KEY, INSTANCE_NAME); + } + + @Override + public void tearDown() throws Exception { + client.shutdown(); + client = null; + } + + public void testCreateTunnelWithoutBackFill() { + String tunnelName = "test_zr" + System.currentTimeMillis(); + try { + client.createTunnel(new CreateTunnelRequest(TABLE_NAME, tunnelName, TunnelType.Stream)); + + DescribeTunnelResponse describeResp = client.describeTunnel(new DescribeTunnelRequest(TABLE_NAME, tunnelName)); + StreamTunnelConfig streamTunnelConfig = describeResp.getTunnelInfo().getStreamTunnelConfig(); + Assert.assertNotNull(streamTunnelConfig); + Assert.assertEquals(StartOffsetFlag.LATEST, streamTunnelConfig.getFlag()); + Assert.assertEquals(0, streamTunnelConfig.getStartOffset()); + Assert.assertEquals(0, streamTunnelConfig.getEndOffset()); + } finally { + client.deleteTunnel(new DeleteTunnelRequest(TABLE_NAME, tunnelName)); + } + } + + public void testCreateTunnelWithDefaultBackFill() { + String tunnelName = "test_zr" + System.currentTimeMillis(); + try { + CreateTunnelRequest createRequest = new CreateTunnelRequest(TABLE_NAME, tunnelName, TunnelType.Stream); + createRequest.setStreamTunnelConfig(new StreamTunnelConfig()); + client.createTunnel(createRequest); + + DescribeTunnelResponse describeResp = client.describeTunnel(new DescribeTunnelRequest(TABLE_NAME, tunnelName)); + StreamTunnelConfig streamTunnelConfig = describeResp.getTunnelInfo().getStreamTunnelConfig(); + Assert.assertNotNull(streamTunnelConfig); + Assert.assertEquals(StartOffsetFlag.LATEST, streamTunnelConfig.getFlag()); + Assert.assertEquals(0, streamTunnelConfig.getStartOffset()); + Assert.assertEquals(0, streamTunnelConfig.getEndOffset()); + } finally { + client.deleteTunnel(new DeleteTunnelRequest(TABLE_NAME, tunnelName)); + } + } + + public void testCreateTunnelWithEarliestBackFill() { + String tunnelName = "test_zr" + System.currentTimeMillis(); + try { + CreateTunnelRequest createRequest = new CreateTunnelRequest(TABLE_NAME, tunnelName, TunnelType.Stream); + createRequest.setStreamTunnelConfig(new StreamTunnelConfig(StartOffsetFlag.EARLIEST)); + client.createTunnel(createRequest); + + DescribeTunnelResponse describeResp = client.describeTunnel(new DescribeTunnelRequest(TABLE_NAME, tunnelName)); + StreamTunnelConfig streamTunnelConfig = describeResp.getTunnelInfo().getStreamTunnelConfig(); + Assert.assertNotNull(streamTunnelConfig); + Assert.assertEquals(StartOffsetFlag.EARLIEST, streamTunnelConfig.getFlag()); + Assert.assertEquals(0, streamTunnelConfig.getStartOffset()); + Assert.assertEquals(0, streamTunnelConfig.getEndOffset()); + } finally { + client.deleteTunnel(new DeleteTunnelRequest(TABLE_NAME, tunnelName)); + } + } + + public void testCreateTunnelWithRangeBackFill() { + String tunnelName = "test_zr" + System.currentTimeMillis(); + try { + CreateTunnelRequest createRequest = new CreateTunnelRequest(TABLE_NAME, tunnelName, TunnelType.Stream); + long beginTime = System.currentTimeMillis(); + long endTime = beginTime + 3600000; + createRequest.setStreamTunnelConfig(new StreamTunnelConfig(beginTime, endTime)); + client.createTunnel(createRequest); + + DescribeTunnelResponse describeResp = client.describeTunnel(new DescribeTunnelRequest(TABLE_NAME, tunnelName)); + StreamTunnelConfig streamTunnelConfig = describeResp.getTunnelInfo().getStreamTunnelConfig(); + Assert.assertNotNull(streamTunnelConfig); + Assert.assertEquals(StartOffsetFlag.LATEST, streamTunnelConfig.getFlag()); + Assert.assertEquals(beginTime, streamTunnelConfig.getStartOffset()); + Assert.assertEquals(endTime, streamTunnelConfig.getEndOffset()); + } finally { + client.deleteTunnel(new DeleteTunnelRequest(TABLE_NAME, tunnelName)); + } + } + + public void testCreateTunnelWithInvalidBackFill() { + String tunnelName = "test_zr" + System.currentTimeMillis(); + try { + CreateTunnelRequest createRequest = new CreateTunnelRequest(TABLE_NAME, tunnelName, TunnelType.Stream); + long beginTime = System.currentTimeMillis(); + long endTime = beginTime - 3600000; // less than beginTime + createRequest.setStreamTunnelConfig(new StreamTunnelConfig(beginTime, endTime)); + client.createTunnel(createRequest); + // cannot achieve below logic. + Assert.fail(); + } catch (Exception e) { + System.out.println(e); + } finally { + // do nothing. + } + } + +} diff --git a/src/test/java/com/alicloud/openservices/tablestore/tunnel/functiontest/TestMaxChannelParallel.java b/src/test/java/com/alicloud/openservices/tablestore/tunnel/functiontest/TestMaxChannelParallel.java new file mode 100644 index 0000000..00805ad --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/tunnel/functiontest/TestMaxChannelParallel.java @@ -0,0 +1,97 @@ +package com.alicloud.openservices.tablestore.tunnel.functiontest; + +import com.alicloud.openservices.tablestore.TunnelClient; +import com.alicloud.openservices.tablestore.model.StreamRecord; +import com.alicloud.openservices.tablestore.tunnel.worker.IChannelProcessor; +import com.alicloud.openservices.tablestore.tunnel.worker.ProcessRecordsInput; +import com.alicloud.openservices.tablestore.tunnel.worker.TunnelWorker; +import com.alicloud.openservices.tablestore.tunnel.worker.TunnelWorkerConfig; + +import java.util.concurrent.*; +import java.util.concurrent.atomic.AtomicInteger; + +public class TestMaxChannelParallel { + private static final String ENDPOINT = "https://vehicle-test.cn-hangzhou.ots.aliyuncs.com"; + private static final String ACCESS_ID = ""; + private static final String ACCESS_KEY = ""; + private static final String INSTANCE_NAME = "vehicle-test"; + + static class SimpleProcessor implements IChannelProcessor { + @Override + public void process(ProcessRecordsInput input) { + System.out.println( + String.format("Process %d records, NextToken: %s", input.getRecords().size(), input.getNextToken())); + try { + // Mock Record Process. + Thread.sleep(500); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + @Override + public void shutdown() { + System.out.println("Mock shutdown"); + } + } + + protected static ThreadPoolExecutor newDefaultThreadPool(final String threadPrefix, int corePoolSize, int maxCorePoolSize) { + return new ThreadPoolExecutor(corePoolSize, maxCorePoolSize, 60, TimeUnit.SECONDS, + new ArrayBlockingQueue(16), + new ThreadFactory() { + private final AtomicInteger counter = new AtomicInteger(); + + @Override + public Thread newThread(Runnable r) { + String threadName = threadPrefix + counter.getAndIncrement(); + System.out.println("SourceHandler new thread: " + threadName); + return new Thread(r, threadName); + } + }, + new ThreadPoolExecutor.CallerRunsPolicy()); + } + + protected static ThreadPoolExecutor newFixedThreadPool(final String threadPrefix, int nThreads) { + return new ThreadPoolExecutor(nThreads, nThreads, + 0L, TimeUnit.MILLISECONDS, + new LinkedBlockingQueue(), new ThreadFactory() { + private final AtomicInteger counter = new AtomicInteger(); + + @Override + public Thread newThread(Runnable r) { + String threadName = threadPrefix + counter.getAndIncrement(); + System.out.println("SourceHandler new thread: " + threadName); + return new Thread(r, threadName); + } + }); + } + + public static void main(String[] args) { + TunnelClient client = new TunnelClient(ENDPOINT, ACCESS_ID, ACCESS_KEY, INSTANCE_NAME); + TunnelWorkerConfig config = new TunnelWorkerConfig(new SimpleProcessor()); + ThreadPoolExecutor readRecordThreadPoolExecutor = + newDefaultThreadPool("tunnel-read-record", + 5, 100 + ); + config.setReadRecordsExecutor(readRecordThreadPoolExecutor); + + ThreadPoolExecutor processRecordThreadPoolExecutor = + newDefaultThreadPool("tunnel-process-record", + 5, 100); + config.setProcessRecordsExecutor(processRecordThreadPoolExecutor); + +// ThreadPoolExecutor channelHelperExcutor = +// newFixedThreadPool("channel-helper-executor", 5); +// config.setChannelHelperExecutor(channelHelperExcutor); + + config.setMaxChannelParallel(5); + TunnelWorker worker1 = new TunnelWorker("70c29c19-50ae-4646-8631-2846e57f670b", client, config); + try { + System.out.println("worker running...."); + worker1.connectAndWorking(); + } catch (Exception e) { + e.printStackTrace(); + worker1.shutdown(); + } + } +} diff --git a/src/test/java/com/alicloud/openservices/tablestore/tunnel/functiontest/TestTunnel.java b/src/test/java/com/alicloud/openservices/tablestore/tunnel/functiontest/TestTunnel.java index 546a49a..e4afd0f 100644 --- a/src/test/java/com/alicloud/openservices/tablestore/tunnel/functiontest/TestTunnel.java +++ b/src/test/java/com/alicloud/openservices/tablestore/tunnel/functiontest/TestTunnel.java @@ -3,17 +3,7 @@ import com.alicloud.openservices.tablestore.ClientException; import com.alicloud.openservices.tablestore.TableStoreException; import com.alicloud.openservices.tablestore.TunnelClient; -import com.alicloud.openservices.tablestore.model.tunnel.ChannelInfo; -import com.alicloud.openservices.tablestore.model.tunnel.CreateTunnelRequest; -import com.alicloud.openservices.tablestore.model.tunnel.CreateTunnelResponse; -import com.alicloud.openservices.tablestore.model.tunnel.DeleteTunnelRequest; -import com.alicloud.openservices.tablestore.model.tunnel.DeleteTunnelResponse; -import com.alicloud.openservices.tablestore.model.tunnel.DescribeTunnelRequest; -import com.alicloud.openservices.tablestore.model.tunnel.DescribeTunnelResponse; -import com.alicloud.openservices.tablestore.model.tunnel.ListTunnelRequest; -import com.alicloud.openservices.tablestore.model.tunnel.ListTunnelResponse; -import com.alicloud.openservices.tablestore.model.tunnel.TunnelInfo; -import com.alicloud.openservices.tablestore.model.tunnel.TunnelType; +import com.alicloud.openservices.tablestore.model.tunnel.*; public class TestTunnel { private static final String Endpoint = ""; @@ -30,7 +20,8 @@ public static void main(String[] args) { // create tunnel System.out.println("Begin CreateTunnel"); - createTunnel(client, tunnelName); +// createTunnel(client, tunnelName); + createTunnelWithBackFill(client, tunnelName); System.out.println("++++++++++++++++++++++++++++++++++++"); // list tunnel @@ -63,6 +54,17 @@ static void createTunnel(TunnelClient client, String tunnelName) { System.out.println("TunnelId: " + resp.getTunnelId()); } + static void createTunnelWithBackFill(TunnelClient client, String tunnelName) { + CreateTunnelRequest request = new CreateTunnelRequest(TableName, tunnelName, TunnelType.BaseData); + StreamTunnelConfig streamTunnelConfig = new StreamTunnelConfig(); + streamTunnelConfig.setFlag(StartOffsetFlag.EARLIEST); + streamTunnelConfig.setEndOffset(System.currentTimeMillis()); + request.setStreamTunnelConfig(streamTunnelConfig); + CreateTunnelResponse resp = client.createTunnel(request); + System.out.println("RequestId: " + resp.getRequestId()); + System.out.println("TunnelId: " + resp.getTunnelId()); + } + static void listTunnel(TunnelClient client) { ListTunnelRequest request = new ListTunnelRequest(TableName); ListTunnelResponse resp = client.listTunnel(request); @@ -94,6 +96,8 @@ static void describeTunnel(TunnelClient client, String tunnelName) { System.out.println("\tInstanceName: " + ti.getInstanceName()); System.out.println("\tStage: " + ti.getStage()); System.out.println("\tExpired: " + ti.isExpired()); + System.out.println("\tStreamTunnelConfig: " + ti.getStreamTunnelConfig()); + System.out.println("\tCreateTime: " + ti.getCreateTime()); for (ChannelInfo ci : resp.getChannelInfos()) { System.out.println("ChannelInfo::::::"); System.out.println("\tChannelId: " + ci.getChannelId()); @@ -102,7 +106,6 @@ static void describeTunnel(TunnelClient client, String tunnelName) { System.out.println("\tChannelRpo: " + ci.getChannelRpo() + "ms"); System.out.println("\tChannelConsumePoint: " + ci.getChannelConsumePoint()); } - } static void deleteTunnel(TunnelClient client, String tunnelName) { diff --git a/src/test/java/com/alicloud/openservices/tablestore/tunnel/functiontest/TestTunnelConsumer.java b/src/test/java/com/alicloud/openservices/tablestore/tunnel/functiontest/TestTunnelConsumer.java new file mode 100644 index 0000000..27d2b20 --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/tunnel/functiontest/TestTunnelConsumer.java @@ -0,0 +1,297 @@ +package com.alicloud.openservices.tablestore.tunnel.functiontest; + +import com.alicloud.openservices.tablestore.SyncClient; +import com.alicloud.openservices.tablestore.TableStoreException; +import com.alicloud.openservices.tablestore.TunnelClient; +import com.alicloud.openservices.tablestore.common.ServiceSettings; +import com.alicloud.openservices.tablestore.core.ErrorCode; +import com.alicloud.openservices.tablestore.model.*; +import com.alicloud.openservices.tablestore.model.tunnel.*; +import com.alicloud.openservices.tablestore.tunnel.worker.IChannelProcessor; +import com.alicloud.openservices.tablestore.tunnel.worker.ProcessRecordsInput; +import com.alicloud.openservices.tablestore.tunnel.worker.TunnelWorker; +import com.alicloud.openservices.tablestore.tunnel.worker.TunnelWorkerConfig; +import org.junit.*; + +import java.util.Random; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicLong; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +public class TestTunnelConsumer { + private static SyncClient syncClient; + private static TunnelClient tunnelClient; + private static TunnelWorkerConfig workerConfig; + + private final String TABLE_NAME = "test_tunnel_consumer"; + private final String TUNNEL_NAME = "test_tunnel_consumer"; + // For Assert + private static ConcurrentHashMap totalRecords = + new ConcurrentHashMap(); + private static AtomicLong consumeRound = new AtomicLong(0); + + @BeforeClass + public static void beforeClass() { + ServiceSettings settings = ServiceSettings.load(); + final String endPoint = settings.getOTSEndpoint(); + final String accessId = settings.getOTSAccessKeyId(); + final String accessKey = settings.getOTSAccessKeySecret(); + final String instanceName = settings.getOTSInstanceName(); + + syncClient = new SyncClient(endPoint, accessId, accessKey, instanceName); + tunnelClient = new TunnelClient(endPoint, accessId, accessKey, instanceName); + workerConfig = new TunnelWorkerConfig(new SimpleProcessor()); + } + + @AfterClass + public static void afterClass() { + if (syncClient != null) { + syncClient.shutdown(); + } + if (tunnelClient != null) { + tunnelClient.shutdown(); + } + if (workerConfig != null) { + workerConfig.shutdown(); + } + } + + @Before + public void setUp() throws Exception { + totalRecords.clear(); + workerConfig.setMaxChannelParallel(-1); + workerConfig.setReadMaxTimesPerRound(1); + workerConfig.setReadMaxBytesPerRound(4 * 1024 * 1024); + + try { + deleteTunnel(tunnelClient); + } catch (TableStoreException e) { + if (!e.getErrorCode().equals(ErrorCode.INVALID_PARAMETER)) { + throw e; + } + } + try { + deleteTable(syncClient); + } catch (TableStoreException e) { + if (!e.getErrorCode().equals(ErrorCode.OBJECT_NOT_EXIST)) { + throw e; + } + } + + createTable(syncClient); + Thread.sleep(TimeUnit.SECONDS.toMillis(5)); + } + + @After + public void tearDown() { + + } + + private void deleteTunnel(TunnelClient client) { + DeleteTunnelRequest deleteTunnelRequest = new DeleteTunnelRequest(TABLE_NAME, TUNNEL_NAME); + client.deleteTunnel(deleteTunnelRequest); + } + + private void deleteTable(SyncClient client) { + DeleteTableRequest request = new DeleteTableRequest(TABLE_NAME); + client.deleteTable(request); + } + + private String createTunnel(TunnelClient client, TunnelType type) { + CreateTunnelRequest request = new CreateTunnelRequest(TABLE_NAME, TUNNEL_NAME, type); + CreateTunnelResponse resp = client.createTunnel(request); + return resp.getTunnelId(); + } + + private void createTable(SyncClient client) { + TableMeta tableMeta = new TableMeta(TABLE_NAME); + tableMeta.addPrimaryKeyColumn(new PrimaryKeySchema("PK1", PrimaryKeyType.STRING)); + tableMeta.addPrimaryKeyColumn(new PrimaryKeySchema("PK2", PrimaryKeyType.INTEGER)); + int timeToLive = -1; + int maxVersions = 1; + TableOptions tableOptions = new TableOptions(timeToLive, maxVersions); + CreateTableRequest request = new CreateTableRequest(tableMeta, tableOptions); + client.createTable(request); + } + + private void prepareTable(SyncClient client, int rowCount) { + // prepare via BatchWriteRow + BatchWriteRowRequest batchWriteRowRequest = new BatchWriteRowRequest(); + for (int i = 0; i < rowCount; i++) { + PrimaryKeyBuilder primaryKeyBuilder = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + primaryKeyBuilder.addPrimaryKeyColumn("PK1", PrimaryKeyValue.fromString("Str" + i)); + primaryKeyBuilder.addPrimaryKeyColumn("PK2", PrimaryKeyValue.fromLong(i)); + RowPutChange rowPutChange = new RowPutChange(TABLE_NAME, primaryKeyBuilder.build()); + batchWriteRowRequest.addRowChange(rowPutChange); + if (batchWriteRowRequest.getRowsCount() == 200) { + client.batchWriteRow(batchWriteRowRequest); + batchWriteRowRequest = new BatchWriteRowRequest(); + } + } + if (batchWriteRowRequest.getRowsCount() > 0) { + client.batchWriteRow(batchWriteRowRequest); + } + } + + static class SimpleProcessor implements IChannelProcessor { + @Override + public void process(ProcessRecordsInput input) { + for (StreamRecord streamRecord : input.getRecords()) { + totalRecords.put(streamRecord.getPrimaryKey(), streamRecord); + } + consumeRound.addAndGet(1); + } + + @Override + public void shutdown() { + System.out.println("Mock shutdown"); + } + } + + @Test + public void testFuzzyConsume() throws Exception { + // 1. 随机写入一定数量数据 + int rowCount = new Random(System.currentTimeMillis()).nextInt(100000) + 1; + prepareTable(syncClient, rowCount); + System.out.println("Finish prepare table."); + // 2. 创建全量类型的Tunnel开始消费,Tunnel进入增量状态时表示消费完毕 + String tunnelId = createTunnel(tunnelClient, TunnelType.BaseData); + TunnelWorker tunnelWorker = new TunnelWorker(tunnelId, tunnelClient, workerConfig); + try { + tunnelWorker.connectAndWorking(); + } catch (Exception e) { + e.printStackTrace(); + } + // 3. 等待数据消费完毕 + DescribeTunnelResponse describeTunnelResponse = tunnelClient.describeTunnel( + new DescribeTunnelRequest(TABLE_NAME, TUNNEL_NAME)); + while (describeTunnelResponse.getTunnelInfo().getStage() != TunnelStage.ProcessStream) { + Thread.sleep(1000); + describeTunnelResponse = tunnelClient.describeTunnel( + new DescribeTunnelRequest(TABLE_NAME, TUNNEL_NAME)); + } + System.out.println("finish consume all data"); + + // 4. Assert with totalRecords + assertEquals(rowCount, totalRecords.size()); + for (int i = 0; i < rowCount; i++) { + PrimaryKeyBuilder primaryKeyBuilder = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + primaryKeyBuilder.addPrimaryKeyColumn("PK1", PrimaryKeyValue.fromString("Str" + i)); + primaryKeyBuilder.addPrimaryKeyColumn("PK2", PrimaryKeyValue.fromLong(i)); + PrimaryKey pk = primaryKeyBuilder.build(); + assertTrue(totalRecords.containsKey(pk)); + } + } + + @Test + public void testMultiTimesReadConsume() throws Exception { + // 1. 随机写入一定数量数据 + Random rand = new Random(System.currentTimeMillis()); + int rowCount = rand.nextInt(100000) + 5000; + prepareTable(syncClient, rowCount); + System.out.println("Finish prepare table."); + + // 2. 创建全量类型的Tunnel开始消费,Tunnel进入增量状态时表示消费完毕 + workerConfig.setReadMaxTimesPerRound(rand.nextInt(10) + 1); + workerConfig.setReadMaxBytesPerRound((rand.nextInt(50) + 4) * 1024 * 1024); + workerConfig.setHeartbeatIntervalInSec(10); + String tunnelId = createTunnel(tunnelClient, TunnelType.BaseData); + TunnelWorker tunnelWorker = new TunnelWorker(tunnelId, tunnelClient, workerConfig); + try { + tunnelWorker.connectAndWorking(); + } catch (Exception e) { + e.printStackTrace(); + } + + // 3. 等待数据消费完毕 + DescribeTunnelResponse describeTunnelResponse = tunnelClient.describeTunnel( + new DescribeTunnelRequest(TABLE_NAME, TUNNEL_NAME)); + while (describeTunnelResponse.getTunnelInfo().getStage() != TunnelStage.ProcessStream) { + Thread.sleep(1000); + describeTunnelResponse = tunnelClient.describeTunnel( + new DescribeTunnelRequest(TABLE_NAME, TUNNEL_NAME)); + } + System.out.println("finish consume all data"); + + // 4. Assert with totalRecords + assertEquals(rowCount, totalRecords.size()); + for (int i = 0; i < rowCount; i++) { + PrimaryKeyBuilder primaryKeyBuilder = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + primaryKeyBuilder.addPrimaryKeyColumn("PK1", PrimaryKeyValue.fromString("Str" + i)); + primaryKeyBuilder.addPrimaryKeyColumn("PK2", PrimaryKeyValue.fromLong(i)); + PrimaryKey pk = primaryKeyBuilder.build(); + assertTrue(totalRecords.containsKey(pk)); + } + } + + @Test + public void testMaxParallelConsume() throws Exception { + // 1. 随机写入一定数量数据 + int rowCount = new Random(System.currentTimeMillis()).nextInt(100000) + 1; + prepareTable(syncClient, rowCount); + System.out.println("Finish prepare table."); + // 2. 创建全量类型的Tunnel开始消费,Tunnel进入增量状态时表示消费完毕 + workerConfig.setMaxChannelParallel(1); + workerConfig.setHeartbeatIntervalInSec(10); + String tunnelId = createTunnel(tunnelClient, TunnelType.BaseData); + TunnelWorker tunnelWorker = new TunnelWorker(tunnelId, tunnelClient, workerConfig); + try { + tunnelWorker.connectAndWorking(); + } catch (Exception e) { + e.printStackTrace(); + } + // 3. 等待数据消费完毕 + DescribeTunnelResponse describeTunnelResponse = tunnelClient.describeTunnel( + new DescribeTunnelRequest(TABLE_NAME, TUNNEL_NAME)); + while (describeTunnelResponse.getTunnelInfo().getStage() != TunnelStage.ProcessStream) { + Thread.sleep(1000); + describeTunnelResponse = tunnelClient.describeTunnel( + new DescribeTunnelRequest(TABLE_NAME, TUNNEL_NAME)); + } + System.out.println("finish consume all data"); + + // 4. Assert with totalRecords + assertEquals(rowCount, totalRecords.size()); + for (int i = 0; i < rowCount; i++) { + PrimaryKeyBuilder primaryKeyBuilder = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + primaryKeyBuilder.addPrimaryKeyColumn("PK1", PrimaryKeyValue.fromString("Str" + i)); + primaryKeyBuilder.addPrimaryKeyColumn("PK2", PrimaryKeyValue.fromLong(i)); + PrimaryKey pk = primaryKeyBuilder.build(); + assertTrue(totalRecords.containsKey(pk)); + } + } + + @Test + public void testTunnelBackOff() throws Exception { + // 1. Create Stream tunnel + workerConfig.setMaxRetryIntervalInMillis(5000); + workerConfig.setHeartbeatIntervalInSec(5); + String tunnelId = createTunnel(tunnelClient, TunnelType.Stream); + TunnelWorker tunnelWorker = new TunnelWorker(tunnelId, tunnelClient, workerConfig); + try { + tunnelWorker.connectAndWorking(); + } catch (Exception e) { + e.printStackTrace(); + } + + long beginTs = System.currentTimeMillis(); + long count = consumeRound.get(); + int i = 0; + for (; i < 100; i++) { + if (consumeRound.get() - count > 0) { + long cost = System.currentTimeMillis() - beginTs; + beginTs = System.currentTimeMillis(); + if (cost >= 5000) { + System.out.println("Current round: " + i); + break; + } + } + Thread.sleep(1000); + } + // Assume achieve max backoff + assertTrue(i < 100); + } +} diff --git a/src/test/java/com/alicloud/openservices/tablestore/tunnel/functiontest/TestTunnelWorkerReconnect.java b/src/test/java/com/alicloud/openservices/tablestore/tunnel/functiontest/TestTunnelWorkerMultiReadTimes.java similarity index 54% rename from src/test/java/com/alicloud/openservices/tablestore/tunnel/functiontest/TestTunnelWorkerReconnect.java rename to src/test/java/com/alicloud/openservices/tablestore/tunnel/functiontest/TestTunnelWorkerMultiReadTimes.java index 44ea369..d8d44b3 100644 --- a/src/test/java/com/alicloud/openservices/tablestore/tunnel/functiontest/TestTunnelWorkerReconnect.java +++ b/src/test/java/com/alicloud/openservices/tablestore/tunnel/functiontest/TestTunnelWorkerMultiReadTimes.java @@ -6,16 +6,16 @@ import com.alicloud.openservices.tablestore.tunnel.worker.TunnelWorker; import com.alicloud.openservices.tablestore.tunnel.worker.TunnelWorkerConfig; -public class TestTunnelWorkerReconnect { - private static final String Endpoint = ""; - private static final String AccessId = ""; - private static final String AccessKey = ""; - private static final String InstanceName = ""; +public class TestTunnelWorkerMultiReadTimes { + private static final String ENDPOINT = "https://vehicle-test.cn-hangzhou.ots.aliyuncs.com"; + private static final String ACCESS_ID = ""; + private static final String ACCESS_KEY = ""; + private static final String INSTANCE_NAME = "vehicle-test"; static class SimpleProcessor implements IChannelProcessor { @Override public void process(ProcessRecordsInput input) { - System.out.println("Default record processor, would print records count"); + System.out.println("Default record processor, print records count, timestamp: " + System.currentTimeMillis()); System.out.println( String.format("Process %d records, NextToken: %s", input.getRecords().size(), input.getNextToken())); try { @@ -33,15 +33,31 @@ public void shutdown() { } public static void main(String[] args) { - TunnelClient client = new TunnelClient(Endpoint, AccessId, AccessKey, InstanceName); + TunnelClient client = new TunnelClient(ENDPOINT, ACCESS_ID, ACCESS_KEY, INSTANCE_NAME); TunnelWorkerConfig config = new TunnelWorkerConfig(new SimpleProcessor()); - TunnelWorker worker1 = new TunnelWorker("9c0fbd17-65b7-4449-ac38-03e794e261aa", client, config); + config.setHeartbeatIntervalInSec(10); + config.setHeartbeatTimeoutInSec(120); + config.setMaxRetryIntervalInMillis(200); + config.setReadMaxBytesPerRound(64 * 1024 * 1024); + config.setReadMaxTimesPerRound(2); + config.setMaxChannelParallel(1); + TunnelWorker worker1 = new TunnelWorker("ac442770-feea-4e3c-941e-5f07c7ff5363", client, config); try { System.out.println("worker running...."); worker1.connectAndWorking(); } catch (Exception e) { e.printStackTrace(); + config.shutdown(); worker1.shutdown(); + client.shutdown(); } + try { + Thread.sleep(100000); + } catch (Exception e) { + e.printStackTrace(); + } + config.shutdown(); + worker1.shutdown(); + client.shutdown(); } } diff --git a/src/test/java/com/alicloud/openservices/tablestore/writer/TestExceptionFailedSingleRetry.java b/src/test/java/com/alicloud/openservices/tablestore/writer/TestExceptionFailedSingleRetry.java new file mode 100644 index 0000000..fc7eefe --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/writer/TestExceptionFailedSingleRetry.java @@ -0,0 +1,228 @@ +package com.alicloud.openservices.tablestore.writer; + +import com.alicloud.openservices.tablestore.*; +import com.alicloud.openservices.tablestore.common.ServiceSettings; +import com.alicloud.openservices.tablestore.model.*; +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +import java.util.concurrent.*; +import java.util.concurrent.atomic.AtomicLong; + + +public class TestExceptionFailedSingleRetry { + private static ServiceSettings serviceSettings = ServiceSettings.load(); + private static String MOCK_TABLE_NAME = "mockTableName"; + private static String MOCK_INDEX_NAME = "mockIndexName"; + private static String PK = "pk"; + private static String COL_1 = "col1"; + private static String COL_2 = "col2"; + + private static AtomicLong succeedRows = new AtomicLong(); + private static AtomicLong failedRows = new AtomicLong(); + final ExecutorService executor = Executors.newFixedThreadPool(10); + + private int rowSize = 200; + private AsyncClient ots; + private TableStoreWriter writer; + + + @Before + public void setUp() throws Exception { + succeedRows.getAndSet(0); + failedRows.getAndSet(0); + ots = new UnknownExceptionMockClient( + serviceSettings.getOTSEndpoint(), + serviceSettings.getOTSAccessKeyId(), + serviceSettings.getOTSAccessKeySecret(), + serviceSettings.getOTSInstanceName()); + final WriterConfig batchWriteRowConfig = new WriterConfig(); + batchWriteRowConfig.setBucketCount(1); + writer = createMockWriter(ots, batchWriteRowConfig, executor); + } + + @After + public void after() throws Exception { + ots.shutdown(); + executor.shutdown(); + } + + + @Test + public void testUnknownExceptionFailed() throws Exception { + + for (int i = 0; i < rowSize / 3; i++) { + PrimaryKey pk = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn(PK, PrimaryKeyValue.fromLong(i)) + .build(); + + RowPutChange rowChange = new RowPutChange(MOCK_TABLE_NAME, pk); + rowChange.addColumn(COL_1, ColumnValue.fromLong(i)); + + writer.addRowChange(rowChange); + } + + for (int i = rowSize / 3; i < 2 * (rowSize / 3); i++) { + PrimaryKey pk = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn(PK, PrimaryKeyValue.fromLong(i)) + .build(); + + RowUpdateChange rowChange = new RowUpdateChange(MOCK_TABLE_NAME, pk); + rowChange.put(COL_1, ColumnValue.fromLong(i)); + + writer.addRowChange(rowChange); + } + + for (int i = 2 * (rowSize / 3); i < rowSize; i++) { + PrimaryKey pk = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn(PK, PrimaryKeyValue.fromLong(i)) + .build(); + + RowDeleteChange rowChange = new RowDeleteChange(MOCK_TABLE_NAME, pk); + + writer.addRowChange(rowChange); + } + + writer.flush(); + try { + Thread.sleep(500); + } catch (InterruptedException e) { + Assert.fail(); + } + + Assert.assertEquals(succeedRows.get(), 0); + Assert.assertEquals(failedRows.get(), rowSize); + } + + + private static TableStoreWriter createMockWriter(AsyncClient ots, WriterConfig config, ExecutorService executor) { + + + TableStoreCallback callback = new TableStoreCallback() { + @Override + public void onCompleted(RowChange rowChange, ConsumedCapacity cc) { + succeedRows.incrementAndGet(); + } + + @Override + public void onFailed(RowChange rowChange, Exception ex) { + ex.printStackTrace(); + failedRows.incrementAndGet(); + } + }; + return new DefaultTableStoreWriter(ots, MOCK_TABLE_NAME, config, callback, executor); + } + + + + public class UnknownExceptionMockClient extends AsyncClient { + public UnknownExceptionMockClient(String endpoint, String accessKeyId, String accessKeySecret, String instanceName) { + super(endpoint, accessKeyId, accessKeySecret, instanceName); + } + + @Override + public void shutdown() { + super.shutdown(); + } + + @Override + public Future describeTable( + DescribeTableRequest request, + TableStoreCallback callback) + { + Response meta = new Response(); + meta.setRequestId("mockRequestId"); + + final DescribeTableResponse response = new DescribeTableResponse(meta); + TableMeta tableMeta = new TableMeta(MOCK_TABLE_NAME); + tableMeta.addPrimaryKeyColumn(PK, PrimaryKeyType.INTEGER); + + IndexMeta indexMeta = new IndexMeta(MOCK_INDEX_NAME); + response.addIndexMeta(indexMeta); + + response.setTableMeta(tableMeta); + + if (callback != null) { + callback.onCompleted(request, response); + } + + return new Future() { + @Override + public boolean cancel(boolean mayInterruptIfRunning) { + return false; + } + + @Override + public boolean isCancelled() { + return false; + } + + @Override + public boolean isDone() { + return false; + } + + @Override + public DescribeTableResponse get() throws InterruptedException, ExecutionException { + return response; + } + + @Override + public DescribeTableResponse get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException { + return response; + } + }; + } + + + @Override + public Future batchWriteRow( + final BatchWriteRowRequest request, + TableStoreCallback callback) { + + if (callback != null) { + callback.onFailed(request, new TableStoreException("UnknownException", "retry")); + } + + return null; + } + + @Override + public Future putRow( + final PutRowRequest request, + TableStoreCallback callback) { + + if (callback != null) { + callback.onFailed(request, new Exception("UnknownException")); + } + + return null; + } + + @Override + public Future updateRow( + final UpdateRowRequest request, + TableStoreCallback callback) { + + if (callback != null) { + callback.onFailed(request, new Exception("UnknownException")); + } + + return null; + } + + @Override + public Future deleteRow( + final DeleteRowRequest request, + TableStoreCallback callback) { + + if (callback != null) { + callback.onFailed(request, new Exception("UnknownException")); + } + + return null; + } + } +} diff --git a/src/test/java/com/alicloud/openservices/tablestore/writer/TestPartitionFailed.java b/src/test/java/com/alicloud/openservices/tablestore/writer/TestPartitionFailed.java new file mode 100644 index 0000000..959e9e3 --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/writer/TestPartitionFailed.java @@ -0,0 +1,312 @@ +package com.alicloud.openservices.tablestore.writer; + +import com.alicloud.openservices.tablestore.AsyncClient; +import com.alicloud.openservices.tablestore.DefaultTableStoreWriter; +import com.alicloud.openservices.tablestore.TableStoreCallback; +import com.alicloud.openservices.tablestore.TableStoreWriter; +import com.alicloud.openservices.tablestore.common.ServiceSettings; +import com.alicloud.openservices.tablestore.model.*; +import com.alicloud.openservices.tablestore.model.Error; +import com.alicloud.openservices.tablestore.writer.enums.BatchRequestType; +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.*; +import java.util.concurrent.atomic.AtomicLong; + + +public class TestPartitionFailed { + private static ServiceSettings serviceSettings = ServiceSettings.load(); + private static String MOCK_TABLE_NAME = "mockTableName"; + private static String MOCK_INDEX_NAME = "mockIndexName"; + private static String PK = "pk"; + private static String COL_1 = "col1"; + private static String COL_2 = "col2"; + + private static AtomicLong succeedRows = new AtomicLong(); + private static AtomicLong failedRows = new AtomicLong(); + final ExecutorService executor = Executors.newFixedThreadPool(10); + + private int rowSize = 200; + private AsyncClient ots; + private TableStoreWriter batchWriteRowWriter; + private TableStoreWriter bulkImportWriter; + + + @Before + public void setUp() throws Exception { + succeedRows.getAndSet(0); + failedRows.getAndSet(0); + ots = new MockClient( + serviceSettings.getOTSEndpoint(), + serviceSettings.getOTSAccessKeyId(), + serviceSettings.getOTSAccessKeySecret(), + serviceSettings.getOTSInstanceName()); + final WriterConfig batchWriteRowConfig = new WriterConfig(); + batchWriteRowConfig.setBucketCount(1); + batchWriteRowWriter = createMockWriter(ots, batchWriteRowConfig, executor); + + final WriterConfig bulkImportConfig = new WriterConfig(); + bulkImportConfig.setBucketCount(1); + bulkImportConfig.setBatchRequestType(BatchRequestType.BULK_IMPORT); + bulkImportWriter = createMockWriter(ots, bulkImportConfig, executor); + + } + + @After + public void after() throws Exception { + ots.shutdown(); + executor.shutdown(); + } + + + @Test + public void testBatchWriteRowPartitionFailed() throws Exception { + + for (int i = 0; i < rowSize; i++) { + PrimaryKey pk = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn(PK, PrimaryKeyValue.fromLong(i)) + .build(); + + RowUpdateChange rowChange = new RowUpdateChange(MOCK_TABLE_NAME, pk); + rowChange.put(COL_1, ColumnValue.fromLong(i)); + + batchWriteRowWriter.addRowChange(rowChange); + } + + batchWriteRowWriter.flush(); + + Assert.assertEquals(succeedRows.get(), rowSize / 2); + } + + @Test + public void testBulkImportPartitionFailed() throws Exception { + + for (int i = 0; i < rowSize; i++) { + PrimaryKey pk = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn(PK, PrimaryKeyValue.fromLong(i)) + .build(); + + RowUpdateChange rowChange = new RowUpdateChange(MOCK_TABLE_NAME, pk); + rowChange.put(COL_1, ColumnValue.fromLong(i)); + rowChange.put(COL_2, ColumnValue.fromLong(i)); + + bulkImportWriter.addRowChange(rowChange); + } + + bulkImportWriter.flush(); + + Assert.assertEquals(succeedRows.get(), rowSize / 2); + } + + + private static TableStoreWriter createMockWriter(AsyncClient ots, WriterConfig config, ExecutorService executor) { + + + TableStoreCallback callback = new TableStoreCallback() { + @Override + public void onCompleted(RowChange rowChange, ConsumedCapacity cc) { + succeedRows.incrementAndGet(); + } + + @Override + public void onFailed(RowChange rowChange, Exception ex) { + ex.printStackTrace(); + failedRows.incrementAndGet(); + } + }; + return new DefaultTableStoreWriter(ots, MOCK_TABLE_NAME, config, callback, executor); + } + + + + public class MockClient extends AsyncClient { + public MockClient(String endpoint, String accessKeyId, String accessKeySecret, String instanceName) { + super(endpoint, accessKeyId, accessKeySecret, instanceName); + } + + @Override + public void shutdown() { + super.shutdown(); + } + + @Override + public Future describeTable( + DescribeTableRequest request, + TableStoreCallback callback) + { + Response meta = new Response(); + meta.setRequestId("mockRequestId"); + + final DescribeTableResponse response = new DescribeTableResponse(meta); + TableMeta tableMeta = new TableMeta(MOCK_TABLE_NAME); + tableMeta.addPrimaryKeyColumn(PK, PrimaryKeyType.INTEGER); + + IndexMeta indexMeta = new IndexMeta(MOCK_INDEX_NAME); + response.addIndexMeta(indexMeta); + + response.setTableMeta(tableMeta); + + if (callback != null) { + callback.onCompleted(request, response); + } + + return new Future() { + @Override + public boolean cancel(boolean mayInterruptIfRunning) { + return false; + } + + @Override + public boolean isCancelled() { + return false; + } + + @Override + public boolean isDone() { + return false; + } + + @Override + public DescribeTableResponse get() throws InterruptedException, ExecutionException { + return response; + } + + @Override + public DescribeTableResponse get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException { + return response; + } + }; + } + + + @Override + public Future batchWriteRow( + final BatchWriteRowRequest request, + TableStoreCallback callback) { + + Response meta = new Response(); + meta.setRequestId("mockRequestId"); + + final BatchWriteRowResponse response = new BatchWriteRowResponse(meta); + for (int i = 0; i < rowSize; i++) { + PrimaryKey primaryKey = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("pk", PrimaryKeyValue.fromLong(i)) + .build(); + List columns = Arrays.asList( + new Column("col1", ColumnValue.fromLong(i)), + new Column("col2", ColumnValue.fromString(i + ""))); + + Row row = new Row(primaryKey, columns); + + CapacityUnit capacityUnit = new CapacityUnit(); + capacityUnit.setWriteCapacityUnit(0); + capacityUnit.setReadCapacityUnit(1); + + ConsumedCapacity consumedCapacity = new ConsumedCapacity(capacityUnit); + + BatchWriteRowResponse.RowResult status = null; + if (i % 2 == 0) { + status = new BatchWriteRowResponse.RowResult(MOCK_TABLE_NAME, row, consumedCapacity, i); + } else { + Error error = new Error("500", "mock partition failed"); + status = new BatchWriteRowResponse.RowResult(MOCK_TABLE_NAME, row, error, i); + } + response.addRowResult(status); + } + + if (callback != null) { + callback.onCompleted(request, response); + } + + return new Future() { + @Override + public boolean cancel(boolean mayInterruptIfRunning) { + return false; + } + + @Override + public boolean isCancelled() { + return false; + } + + @Override + public boolean isDone() { + return true; + } + + @Override + public BatchWriteRowResponse get() throws InterruptedException, ExecutionException { + return response; + } + + @Override + public BatchWriteRowResponse get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException { + return response; + } + }; + } + + @Override + public Future bulkImport( + BulkImportRequest request, + TableStoreCallback callback) { + + Response meta = new Response(); + meta.setRequestId("mockRequestId"); + + final BulkImportResponse response = new BulkImportResponse(meta); + for (int i = 0; i < rowSize; i++) { + CapacityUnit capacityUnit = new CapacityUnit(); + capacityUnit.setWriteCapacityUnit(0); + capacityUnit.setReadCapacityUnit(1); + + ConsumedCapacity consumedCapacity = new ConsumedCapacity(capacityUnit); + + BulkImportResponse.RowResult status = null; + if (i % 2 == 0) { + status = new BulkImportResponse.RowResult(consumedCapacity, i); + } else { + Error error = new Error("500", "mock partition failed"); + status = new BulkImportResponse.RowResult(error, i); + } + response.addRowResult(status); + } + + if (callback != null) { + callback.onCompleted(request, response); + } + + return new Future() { + @Override + public boolean cancel(boolean mayInterruptIfRunning) { + return false; + } + + @Override + public boolean isCancelled() { + return false; + } + + @Override + public boolean isDone() { + return true; + } + + @Override + public BulkImportResponse get() throws InterruptedException, ExecutionException { + return response; + } + + @Override + public BulkImportResponse get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException { + return response; + } + }; + } + } +} diff --git a/src/test/java/com/alicloud/openservices/tablestore/writer/TestUnknownExceptionFailed.java b/src/test/java/com/alicloud/openservices/tablestore/writer/TestUnknownExceptionFailed.java new file mode 100644 index 0000000..d597197 --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/writer/TestUnknownExceptionFailed.java @@ -0,0 +1,216 @@ +package com.alicloud.openservices.tablestore.writer; + +import com.alicloud.openservices.tablestore.AsyncClient; +import com.alicloud.openservices.tablestore.DefaultTableStoreWriter; +import com.alicloud.openservices.tablestore.TableStoreCallback; +import com.alicloud.openservices.tablestore.TableStoreWriter; +import com.alicloud.openservices.tablestore.common.ServiceSettings; +import com.alicloud.openservices.tablestore.model.*; +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +import java.util.concurrent.*; +import java.util.concurrent.atomic.AtomicLong; + + +public class TestUnknownExceptionFailed { + private static ServiceSettings serviceSettings = ServiceSettings.load(); + private static String MOCK_TABLE_NAME = "mockTableName"; + private static String MOCK_INDEX_NAME = "mockIndexName"; + private static String PK = "pk"; + private static String COL_1 = "col1"; + private static String COL_2 = "col2"; + + private static AtomicLong succeedRows = new AtomicLong(); + private static AtomicLong failedRows = new AtomicLong(); + final ExecutorService executor = Executors.newFixedThreadPool(10); + + private int rowSize = 200; + private AsyncClient ots; + private TableStoreWriter batchWriteRowWriter; + private TableStoreWriter bulkImportWriter; + + + @Before + public void setUp() throws Exception { + succeedRows.getAndSet(0); + failedRows.getAndSet(0); + ots = new UnknownExceptionMockClient( + serviceSettings.getOTSEndpoint(), + serviceSettings.getOTSAccessKeyId(), + serviceSettings.getOTSAccessKeySecret(), + serviceSettings.getOTSInstanceName()); + final WriterConfig batchWriteRowConfig = new WriterConfig(); + batchWriteRowConfig.setBucketCount(1); + batchWriteRowWriter = createMockWriter(ots, batchWriteRowConfig, executor); + + final WriterConfig bulkImportConfig = new WriterConfig(); + bulkImportConfig.setBucketCount(1); + bulkImportWriter = createMockWriter(ots, bulkImportConfig, executor); + } + + @After + public void after() throws Exception { + ots.shutdown(); + executor.shutdown(); + } + + + @Test + public void testBatchWriteUnknownExceptionFailed() throws Exception { + + for (int i = 0; i < rowSize; i++) { + PrimaryKey pk = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn(PK, PrimaryKeyValue.fromLong(i)) + .build(); + + RowUpdateChange rowChange = new RowUpdateChange(MOCK_TABLE_NAME, pk); + rowChange.put(COL_1, ColumnValue.fromLong(i)); + + batchWriteRowWriter.addRowChange(rowChange); + } + + batchWriteRowWriter.flush(); + try { + Thread.sleep(500); + } catch (InterruptedException e) { + Assert.fail(); + } + + Assert.assertEquals(succeedRows.get(), 0); + Assert.assertEquals(failedRows.get(), rowSize); + } + + @Test + public void testBulkImportUnknownExceptionFailed() throws Exception { + + for (int i = 0; i < rowSize; i++) { + PrimaryKey pk = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn(PK, PrimaryKeyValue.fromLong(i)) + .build(); + + RowUpdateChange rowChange = new RowUpdateChange(MOCK_TABLE_NAME, pk); + rowChange.put(COL_1, ColumnValue.fromLong(i)); + + bulkImportWriter.addRowChange(rowChange); + } + + bulkImportWriter.flush(); + try { + Thread.sleep(500); + } catch (InterruptedException e) { + Assert.fail(); + } + + Assert.assertEquals(succeedRows.get(), 0); + Assert.assertEquals(failedRows.get(), rowSize); + } + + + private static TableStoreWriter createMockWriter(AsyncClient ots, WriterConfig config, ExecutorService executor) { + + + TableStoreCallback callback = new TableStoreCallback() { + @Override + public void onCompleted(RowChange rowChange, ConsumedCapacity cc) { + succeedRows.incrementAndGet(); + } + + @Override + public void onFailed(RowChange rowChange, Exception ex) { + ex.printStackTrace(); + failedRows.incrementAndGet(); + } + }; + return new DefaultTableStoreWriter(ots, MOCK_TABLE_NAME, config, callback, executor); + } + + + + public class UnknownExceptionMockClient extends AsyncClient { + public UnknownExceptionMockClient(String endpoint, String accessKeyId, String accessKeySecret, String instanceName) { + super(endpoint, accessKeyId, accessKeySecret, instanceName); + } + + @Override + public void shutdown() { + super.shutdown(); + } + + @Override + public Future describeTable( + DescribeTableRequest request, + TableStoreCallback callback) + { + Response meta = new Response(); + meta.setRequestId("mockRequestId"); + + final DescribeTableResponse response = new DescribeTableResponse(meta); + TableMeta tableMeta = new TableMeta(MOCK_TABLE_NAME); + tableMeta.addPrimaryKeyColumn(PK, PrimaryKeyType.INTEGER); + + IndexMeta indexMeta = new IndexMeta(MOCK_INDEX_NAME); + response.addIndexMeta(indexMeta); + + response.setTableMeta(tableMeta); + + if (callback != null) { + callback.onCompleted(request, response); + } + + return new Future() { + @Override + public boolean cancel(boolean mayInterruptIfRunning) { + return false; + } + + @Override + public boolean isCancelled() { + return false; + } + + @Override + public boolean isDone() { + return false; + } + + @Override + public DescribeTableResponse get() throws InterruptedException, ExecutionException { + return response; + } + + @Override + public DescribeTableResponse get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException { + return response; + } + }; + } + + + @Override + public Future batchWriteRow( + final BatchWriteRowRequest request, + TableStoreCallback callback) { + + if (callback != null) { + callback.onFailed(request, new Exception("UnknownException")); + } + + return null; + } + + @Override + public Future bulkImport( + final BulkImportRequest request, + TableStoreCallback callback) { + + if (callback != null) { + callback.onFailed(request, new Exception("UnknownException")); + } + + return null; + } + } +} diff --git a/src/test/java/com/alicloud/openservices/tablestore/writer/TestWriter.java b/src/test/java/com/alicloud/openservices/tablestore/writer/TestWriter.java index aca5567..624ab80 100644 --- a/src/test/java/com/alicloud/openservices/tablestore/writer/TestWriter.java +++ b/src/test/java/com/alicloud/openservices/tablestore/writer/TestWriter.java @@ -4,7 +4,10 @@ import com.alicloud.openservices.tablestore.core.ErrorCode; import com.alicloud.openservices.tablestore.model.*; import com.alicloud.openservices.tablestore.common.ServiceSettings; +import com.alicloud.openservices.tablestore.writer.enums.BatchRequestType; +import com.alicloud.openservices.tablestore.writer.enums.WriteMode; import org.junit.After; +import org.junit.Assert; import org.junit.Before; import org.junit.Test; @@ -14,8 +17,7 @@ import java.util.concurrent.*; import java.util.concurrent.atomic.AtomicLong; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.Assert.*; public class TestWriter { private static final String tableName = "WriterTest"; @@ -85,7 +87,11 @@ public int getRetries() { @Override public long nextPause(String action, Exception ex) { - if (action.equals("DeleteTable")) { + if ("DeleteRow".equals(action)) { + return 0; + } + + if ("DeleteTable".equals(action)) { return 0; } @@ -447,6 +453,7 @@ public void testWriteDirtyRows() throws Exception { config.setFlushInterval(1000000); config.setMaxAttrColumnSize(3 * 1024 * 1024); // max attribute length set to 3MB config.setMaxBatchSize(4 * 1024 * 1024); + config.setBucketCount(1); StringBuilder longStr = new StringBuilder(); for (int i = 0; i < 2 * 1024 * 1024 + 1; i++) { longStr.append('a'); @@ -455,9 +462,43 @@ public void testWriteDirtyRows() throws Exception { DefaultTableStoreWriter writer = createWriter(ots, config, executor); - int dirtyRowId = 25; + int putDirtyRowId = 25; + int updateDirtyRowId = 75; try { - for (int i = 0; i < 100; i++) { + for (int i = -1; i < 0; i++) { + PrimaryKey pk = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("pk0", PrimaryKeyValue.fromLong(i)) + .addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromString("pk_not_exist_" + i )) + .addPrimaryKeyColumn("pk2", PrimaryKeyValue.fromLong(i)) + .build(); + + RowDeleteChange rowChange = new RowDeleteChange(tableName, pk); + + Condition condition = new Condition(); + condition.setRowExistenceExpectation(RowExistenceExpectation.EXPECT_EXIST); + rowChange.setCondition(condition); + + writer.addRowChange(rowChange); + } + for (int i = 0; i < 50; i++) { + PrimaryKey pk = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("pk0", PrimaryKeyValue.fromLong(i)) + .addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromString("pk_" + i)) + .addPrimaryKeyColumn("pk2", PrimaryKeyValue.fromLong(i)) + .build(); + + RowPutChange rowChange = new RowPutChange(tableName, pk); + for (int j = 0; j < columnsCount; j++) { + rowChange.addColumn("column_" + j, ColumnValue.fromString(strValue)); + } + + if (i == putDirtyRowId) { + rowChange.addColumn("longattr", ColumnValue.fromString(longStr.toString())); + } + + writer.addRowChange(rowChange); + } + for (int i = 50; i < 100; i++) { PrimaryKey pk = PrimaryKeyBuilder.createPrimaryKeyBuilder() .addPrimaryKeyColumn("pk0", PrimaryKeyValue.fromLong(i)) .addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromString("pk_" + i)) @@ -469,7 +510,7 @@ public void testWriteDirtyRows() throws Exception { rowChange.put("column_" + j, ColumnValue.fromString(strValue)); } - if (i == dirtyRowId) { + if (i == updateDirtyRowId) { rowChange.put("longattr", ColumnValue.fromString(longStr.toString())); } @@ -478,19 +519,21 @@ public void testWriteDirtyRows() throws Exception { writer.flush(); + } catch (Exception e) { + fail(); } finally { writer.close(); executor.shutdown(); executor.awaitTermination(10, TimeUnit.SECONDS); } - assertEquals(succeedRows.get(), 99); - assertEquals(failedRows.get(), 1); - assertEquals(writer.getWriterStatistics().getTotalRowsCount(), 100); - assertEquals(writer.getWriterStatistics().getTotalSucceedRowsCount(), 99); - assertEquals(writer.getWriterStatistics().getTotalFailedRowsCount(), 1); - assertEquals(writer.getWriterStatistics().getTotalSingleRowRequestCount(), 100); - assertEquals(writer.getWriterStatistics().getTotalRequestCount(), 101); + assertEquals(succeedRows.get(), 98); + assertEquals(failedRows.get(), 3); + assertEquals(writer.getWriterStatistics().getTotalRowsCount(), 101); + assertEquals(writer.getWriterStatistics().getTotalSucceedRowsCount(), 98); + assertEquals(writer.getWriterStatistics().getTotalFailedRowsCount(), 3); + assertEquals(writer.getWriterStatistics().getTotalSingleRowRequestCount(), 101); //only when bucket = 1 + assertEquals(writer.getWriterStatistics().getTotalRequestCount(), 103); int rowsCountInTable = 0; RangeRowQueryCriteria criteria = new RangeRowQueryCriteria(tableName); @@ -517,7 +560,7 @@ public void testWriteDirtyRows() throws Exception { Future future = ots.getRange(request, null); GetRangeResponse result = future.get(); for (Row row : result.getRows()) { - if (rowsCountInTable == dirtyRowId) { + if (rowsCountInTable == putDirtyRowId || rowsCountInTable == updateDirtyRowId) { rowsCountInTable++; } PrimaryKeyValue pk0 = row.getPrimaryKey().getPrimaryKeyColumn("pk0").getValue(); @@ -553,4 +596,97 @@ public void testWriteDirtyRows() throws Exception { assertEquals(rowsCountInTable, 100); } + + @Test + public void testBulkImportWriteDirtyRows() throws Exception { + final WriterConfig config = new WriterConfig(); + config.setConcurrency(concurrency); + config.setBufferSize(queueSize); + config.setFlushInterval(1000000); + config.setMaxAttrColumnSize(3 * 1024 * 1024); // max attribute length set to 3MB + config.setMaxBatchSize(4 * 1024 * 1024); + config.setBucketCount(1); + config.setBatchRequestType(BatchRequestType.BULK_IMPORT); + config.setWriteMode(WriteMode.SEQUENTIAL); + StringBuilder longStr = new StringBuilder(); + for (int i = 0; i < 2 * 1024 * 1024 + 1; i++) { + longStr.append('a'); + } + final ExecutorService executor = Executors.newFixedThreadPool(10); + + DefaultTableStoreWriter writer = createWriter(ots, config, executor); + + int putDirtyRowId = 25; + int updateDirtyRowId = 75; + try { + for (int i = -1; i < 0; i++) { + PrimaryKey pk = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("pk0", PrimaryKeyValue.fromLong(i)) + .addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromString("pk_not_exist_" + i )) + .addPrimaryKeyColumn("pk2", PrimaryKeyValue.fromLong(i)) + .build(); + + RowDeleteChange rowChange = new RowDeleteChange(tableName, pk); + + Condition condition = new Condition(); + condition.setRowExistenceExpectation(RowExistenceExpectation.EXPECT_EXIST); + rowChange.setCondition(condition); + + writer.addRowChange(rowChange); + } + for (int i = 0; i < 50; i++) { + PrimaryKey pk = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("pk0", PrimaryKeyValue.fromLong(i)) + .addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromString("pk_" + i)) + .addPrimaryKeyColumn("pk2", PrimaryKeyValue.fromLong(i)) + .build(); + + RowPutChange rowChange = new RowPutChange(tableName, pk); + for (int j = 0; j < columnsCount; j++) { + rowChange.addColumn("column_" + j, ColumnValue.fromString(strValue)); + } + + if (i == putDirtyRowId) { + rowChange.addColumn("longattr", ColumnValue.fromString(longStr.toString())); + } + + writer.addRowChange(rowChange); + } + for (int i = 50; i < 100; i++) { + PrimaryKey pk = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("pk0", PrimaryKeyValue.fromLong(i)) + .addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromString("pk_" + i)) + .addPrimaryKeyColumn("pk2", PrimaryKeyValue.fromLong(i)) + .build(); + + RowUpdateChange rowChange = new RowUpdateChange(tableName, pk); + for (int j = 0; j < columnsCount; j++) { + rowChange.put("column_" + j, ColumnValue.fromString(strValue)); + } + + if (i == updateDirtyRowId) { + rowChange.put("longattr", ColumnValue.fromString(longStr.toString())); + } + + writer.addRowChange(rowChange); + } + + writer.flush(); + + } catch (Exception e) { + fail(); + } finally { + writer.close(); + executor.shutdown(); + executor.awaitTermination(10, TimeUnit.SECONDS); + } + + assertEquals(succeedRows.get(), 98); + assertEquals(failedRows.get(), 3); + assertEquals(writer.getWriterStatistics().getTotalRowsCount(), 101); + assertEquals(writer.getWriterStatistics().getTotalSucceedRowsCount(), 98); + assertEquals(writer.getWriterStatistics().getTotalFailedRowsCount(), 3); + assertEquals(writer.getWriterStatistics().getTotalSingleRowRequestCount(), 101); //only when bucket = 1 + assertEquals(writer.getWriterStatistics().getTotalRequestCount(), 103); + } } diff --git a/src/test/java/com/alicloud/openservices/tablestore/writer/TestWriterInnerConstructClient.java b/src/test/java/com/alicloud/openservices/tablestore/writer/TestWriterInnerConstructClient.java new file mode 100644 index 0000000..b8a2444 --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/writer/TestWriterInnerConstructClient.java @@ -0,0 +1,888 @@ +package com.alicloud.openservices.tablestore.writer; + +import com.alicloud.openservices.tablestore.*; +import com.alicloud.openservices.tablestore.common.ServiceSettings; +import com.alicloud.openservices.tablestore.core.auth.DefaultCredentials; +import com.alicloud.openservices.tablestore.model.*; +import com.alicloud.openservices.tablestore.writer.enums.BatchRequestType; +import com.alicloud.openservices.tablestore.writer.enums.WriteMode; +import com.google.common.util.concurrent.ThreadFactoryBuilder; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Random; +import java.util.concurrent.*; +import java.util.concurrent.atomic.AtomicLong; + +import static org.junit.Assert.*; + +public class TestWriterInnerConstructClient { + private static final String TABLE_NAME = "WriterTestNewConstructor"; + private static final String TABLE_NAME_AI = "WriterTestNewConstructorAI"; + private static ServiceSettings serviceSettings = ServiceSettings.load(); + private static AtomicLong succeedRows = new AtomicLong(); + private static AtomicLong failedRows = new AtomicLong(); + private static long rowsCount = 10000; + private static long columnsCount = 10; + private static int concurrency = 100; + private static int queueSize = 1024; + private static int bucketCount = 100; + private static WriteMode writeMode = WriteMode.SEQUENTIAL; + private AsyncClientInterface ots; + private final String strValue = "0123456789"; + private ExecutorService threadPool; + + + public void createTable(AsyncClientInterface ots) throws Exception { + TableMeta tableMeta = new TableMeta(TABLE_NAME); + tableMeta.addPrimaryKeyColumn("pk0", PrimaryKeyType.INTEGER); + tableMeta.addPrimaryKeyColumn("pk1", PrimaryKeyType.STRING); + tableMeta.addPrimaryKeyColumn("pk2", PrimaryKeyType.INTEGER); + TableOptions tableOptions = new TableOptions(); + tableOptions.setMaxVersions(1); + tableOptions.setTimeToLive(-1); + CreateTableRequest request = new CreateTableRequest(tableMeta, tableOptions); + request.setReservedThroughput(new ReservedThroughput(new CapacityUnit(0, 0))); + request.setTableOptions(tableOptions); + + Future future = ots.createTable(request, null); + future.get(); + } + + public void createTableAI(AsyncClientInterface ots) throws Exception { + TableMeta tableMeta = new TableMeta(TABLE_NAME_AI); + tableMeta.addPrimaryKeyColumn("pk0", PrimaryKeyType.INTEGER); + tableMeta.addPrimaryKeyColumn("pk1", PrimaryKeyType.INTEGER, PrimaryKeyOption.AUTO_INCREMENT); + tableMeta.addPrimaryKeyColumn("pk2", PrimaryKeyType.INTEGER); + TableOptions tableOptions = new TableOptions(); + tableOptions.setMaxVersions(1); + tableOptions.setTimeToLive(-1); + CreateTableRequest request = new CreateTableRequest(tableMeta, tableOptions); + request.setReservedThroughput(new ReservedThroughput(new CapacityUnit(0, 0))); + request.setTableOptions(tableOptions); + + Future future = ots.createTable(request, null); + future.get(); + } + + + @Before + public void setUp() throws Exception { + ThreadFactory threadFactory = new ThreadFactoryBuilder().setNameFormat("writer-pool-%d").build(); + threadPool = new ThreadPoolExecutor(10, 10, 0L, TimeUnit.MILLISECONDS, + new LinkedBlockingQueue(1024), threadFactory, new ThreadPoolExecutor.CallerRunsPolicy()); + + succeedRows.getAndSet(0); + failedRows.getAndSet(0); + + ots = new AsyncClient(serviceSettings.getOTSEndpoint(), + serviceSettings.getOTSAccessKeyId(), serviceSettings.getOTSAccessKeySecret(), + serviceSettings.getOTSInstanceName()); + + try { + DeleteTableRequest request = new DeleteTableRequest(TABLE_NAME); + Future future = ots.deleteTable(request, null); + future.get(); + } catch (Exception e) { + // pass + } + + try { + DeleteTableRequest request = new DeleteTableRequest(TABLE_NAME_AI); + Future future = ots.deleteTable(request, null); + future.get(); + } catch (Exception e) { + // pass + } + + createTable(ots); + createTableAI(ots); + Thread.sleep(3000); + } + + @After + public void after() { + threadPool.shutdown(); + ots.shutdown(); + } + + public static DefaultTableStoreWriter createWriter(WriterConfig config, String tableName) { + TableStoreCallback callback = new TableStoreCallback() { + @Override + public void onCompleted(RowChange rowChange, RowWriteResult cc) { + succeedRows.incrementAndGet(); + } + + @Override + public void onFailed(RowChange rowChange, Exception ex) { + ex.printStackTrace(); + failedRows.incrementAndGet(); + } + }; + + DefaultCredentials credentials = new DefaultCredentials(serviceSettings.getOTSAccessKeyId(), serviceSettings.getOTSAccessKeySecret()); + DefaultTableStoreWriter writer = new DefaultTableStoreWriter( + serviceSettings.getOTSEndpoint(), + credentials, + serviceSettings.getOTSInstanceName(), + tableName, config, callback); + + return writer; + } + + @Test + public void testWriteCallback() throws Exception { + final WriterConfig config = new WriterConfig(); + config.setConcurrency(concurrency); + config.setBufferSize(queueSize); + config.setWriteMode(writeMode); + config.setBucketCount(bucketCount); + config.setFlushInterval(1000000); + + DefaultTableStoreWriter writer = createWriter(config, TABLE_NAME_AI); + + final AtomicLong gotRowCount = new AtomicLong(0); + writer.setResultCallback(new TableStoreCallback() { + @Override + public void onCompleted(RowChange req, RowWriteResult res) { + gotRowCount.incrementAndGet(); + succeedRows.incrementAndGet(); + } + + @Override + public void onFailed(RowChange req, Exception ex) { + failedRows.incrementAndGet(); + } + }); + + try { + for (int i = 0; i < 100; i++) { + PrimaryKey pk = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("pk0", PrimaryKeyValue.fromLong(i)) + .addPrimaryKeyColumn("pk1", PrimaryKeyValue.AUTO_INCREMENT) + .addPrimaryKeyColumn("pk2", PrimaryKeyValue.fromLong(0)).build(); + + RowPutChange rowChange = new RowPutChange(TABLE_NAME_AI, pk); + for (int j = 0; j < columnsCount; j++) { + rowChange.addColumn("column_" + j, ColumnValue.fromString(strValue)); + } + rowChange.setReturnType(ReturnType.RT_PK); + + writer.addRowChange(rowChange); + } + + writer.flush(); + + } finally { + writer.close(); + } + + assertEquals(succeedRows.get(), 100); + assertEquals(writer.getWriterStatistics().getTotalSucceedRowsCount(), 100); + assertEquals(writer.getWriterStatistics().getTotalFailedRowsCount(), 0); + assertEquals(writer.getWriterStatistics().getTotalRowsCount(), 100); + assertEquals(writer.getWriterStatistics().getTotalSingleRowRequestCount(), 0); + assertEquals(gotRowCount.get(), 100); + } + + @Test + public void testWriteSameRow() throws Exception { + final WriterConfig config = new WriterConfig(); + config.setConcurrency(concurrency); + config.setBufferSize(queueSize); + config.setWriteMode(writeMode); + config.setBucketCount(bucketCount); + config.setFlushInterval(1000000); + config.setBatchRequestType(BatchRequestType.BULK_IMPORT); + + DefaultTableStoreWriter writer = createWriter(config, TABLE_NAME); + + try { + for (int i = 0; i < 100; i++) { + PrimaryKey pk = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("pk0", PrimaryKeyValue.fromLong(i)) + .addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromString("pk_" + 0)) + .addPrimaryKeyColumn("pk2", PrimaryKeyValue.fromLong(0)).build(); + + RowUpdateChange rowChange = new RowUpdateChange(TABLE_NAME, pk); + for (int j = 0; j < columnsCount; j++) { + rowChange.put("column_" + j, ColumnValue.fromString(strValue)); + } + + writer.addRowChange(rowChange); + } + + writer.flush(); + + } finally { + writer.close(); + } + + assertEquals(succeedRows.get(), 100); + assertEquals(writer.getWriterStatistics().getTotalSucceedRowsCount(), 100); + assertEquals(writer.getWriterStatistics().getTotalFailedRowsCount(), 0); + assertEquals(writer.getWriterStatistics().getTotalRowsCount(), 100); + assertEquals(writer.getWriterStatistics().getTotalSingleRowRequestCount(), 0); + } + + @Test + public void testCloseWriter() throws Exception { + final WriterConfig config = new WriterConfig(); + config.setConcurrency(concurrency); + config.setBufferSize(queueSize); + config.setFlushInterval(1000000); + config.setWriteMode(writeMode); + config.setBucketCount(bucketCount); + + DefaultTableStoreWriter writer = createWriter(config, TABLE_NAME); + + PrimaryKey pk = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("pk0", PrimaryKeyValue.fromLong(0)) + .addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromString("pk_" + 0)) + .addPrimaryKeyColumn("pk2", PrimaryKeyValue.fromLong(0)).build(); + + RowUpdateChange rowChange = new RowUpdateChange(TABLE_NAME, pk); + for (int j = 0; j < columnsCount; j++) { + rowChange.put("column_" + j, ColumnValue.fromString(strValue)); + } + + writer.addRowChange(rowChange); + writer.close(); + + try { + writer.addRowChange(rowChange); + assertTrue(false); + } catch (ClientException e) { + assertEquals(e.getMessage(), "The writer has been closed."); + } + + try { + writer.close(); + assertTrue(false); + } catch (ClientException e) { + assertEquals(e.getMessage(), "The writer has already been closed."); + } + + try { + writer.flush(); + assertTrue(false); + } catch (ClientException e) { + assertEquals(e.getMessage(), "The writer has been closed."); + } + } + + @Test + public void testMixOperation() throws Exception { + final WriterConfig config = new WriterConfig(); + config.setConcurrency(concurrency); + config.setBufferSize(queueSize); + config.setFlushInterval(1000000); + config.setWriteMode(writeMode); + config.setBucketCount(bucketCount); + + final DefaultTableStoreWriter writer = createWriter(config, TABLE_NAME); + + final int threadsCount = 5; + final CountDownLatch countDownLatch = new CountDownLatch(threadsCount); + try { + for (int i = 0; i < threadsCount; i++) { + final int finalI = i; + threadPool.execute(new Runnable() { + public void run() { + Random random = new Random(System.currentTimeMillis() + finalI * 1000); + for (int i = 0; i < rowsCount; i++) { + int id = Math.abs(random.nextInt()) % 2; + if (id == 0) { + PrimaryKey pk = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("pk0", PrimaryKeyValue.fromLong(i)) + .addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromString("pk_" + i)) + .addPrimaryKeyColumn("pk2", PrimaryKeyValue.fromLong(i)) + .build(); + + RowUpdateChange rowChange = new RowUpdateChange(TABLE_NAME, pk); + for (int j = 0; j < columnsCount; j++) { + rowChange.put("update_" + j, ColumnValue.fromString(strValue)); + } + + writer.addRowChange(rowChange); + } else { + PrimaryKey pk = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("pk0", PrimaryKeyValue.fromLong(i)) + .addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromString("pk_" + i)) + .addPrimaryKeyColumn("pk2", PrimaryKeyValue.fromLong(i)) + .build(); + + RowPutChange rowChange = new RowPutChange(TABLE_NAME, pk); + for (int j = 0; j < columnsCount; j++) { + rowChange.addColumn("put_" + j, ColumnValue.fromString(strValue)); + } + + writer.addRowChange(rowChange); + } + } + System.out.println("Write thread finished."); + countDownLatch.countDown(); + } + }); + } + + countDownLatch.await(); + + writer.flush(); + Thread.sleep(1000); + + assertEquals(failedRows.get(), 0); + assertEquals(succeedRows.get(), threadsCount * rowsCount); + assertEquals(writer.getWriterStatistics().getTotalRowsCount(), succeedRows.get()); + assertEquals(writer.getWriterStatistics().getTotalSucceedRowsCount(), succeedRows.get()); + assertEquals(writer.getWriterStatistics().getTotalFailedRowsCount(), 0); + assertEquals(writer.getWriterStatistics().getTotalSingleRowRequestCount(), 0); + //scanTable(ots); + } finally { + writer.close(); + } + } + + @Test + public void testMixOperationBulkImport() throws Exception { + final WriterConfig config = new WriterConfig(); + config.setConcurrency(concurrency); + config.setBufferSize(queueSize); + config.setFlushInterval(1000000); + config.setWriteMode(writeMode); + config.setBatchRequestType(BatchRequestType.BULK_IMPORT); + config.setBucketCount(100); + final ExecutorService executor = Executors.newFixedThreadPool(10); + + final DefaultTableStoreWriter writer = createWriter(config, TABLE_NAME); + + final int threadsCount = 2; + final CountDownLatch countDownLatch = new CountDownLatch(threadsCount); + try { + for (int i = 0; i < threadsCount; i++) { + final int finalI = i; + threadPool.execute(new Runnable() { + public void run() { + Random random = new Random(System.currentTimeMillis() + finalI * 1000); + for (int i = 0; i < rowsCount; i++) { + int id = Math.abs(random.nextInt()) % 2; + if (id == 0) { + PrimaryKey pk = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("pk0", PrimaryKeyValue.fromLong(i)) + .addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromString("pk_" + i)) + .addPrimaryKeyColumn("pk2", PrimaryKeyValue.fromLong(i)) + .build(); + + RowUpdateChange rowChange = new RowUpdateChange(TABLE_NAME, pk); + for (int j = 0; j < columnsCount; j++) { + rowChange.put("update_" + j, ColumnValue.fromString(strValue)); + } + + writer.addRowChange(rowChange); + } else { + PrimaryKey pk = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("pk0", PrimaryKeyValue.fromLong(i)) + .addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromString("pk_" + i)) + .addPrimaryKeyColumn("pk2", PrimaryKeyValue.fromLong(i)) + .build(); + + RowPutChange rowChange = new RowPutChange(TABLE_NAME, pk); + for (int j = 0; j < columnsCount; j++) { + rowChange.addColumn("put_" + j, ColumnValue.fromString(strValue)); + } + + writer.addRowChange(rowChange); + } + } + System.out.println("Write thread finished."); + countDownLatch.countDown(); + } + }); + } + + countDownLatch.await(); + + writer.flush(); + Thread.sleep(1000); + + assertEquals(failedRows.get(), 0); + assertEquals(succeedRows.get(), threadsCount * rowsCount); + assertEquals(writer.getWriterStatistics().getTotalRowsCount(), succeedRows.get()); + assertEquals(writer.getWriterStatistics().getTotalSucceedRowsCount(), succeedRows.get()); + assertEquals(writer.getWriterStatistics().getTotalFailedRowsCount(), 0); + assertEquals(writer.getWriterStatistics().getTotalSingleRowRequestCount(), 0); + //scanTable(ots); + } finally { + writer.close(); + executor.shutdown(); + executor.awaitTermination(10, TimeUnit.SECONDS); + } + } + + private void scanTable(AsyncClientInterface ots) { + int rowsCountInTable = 0; + RangeRowQueryCriteria criteria = new RangeRowQueryCriteria(TABLE_NAME); + PrimaryKey start = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("pk0", PrimaryKeyValue.INF_MIN) + .addPrimaryKeyColumn("pk1", PrimaryKeyValue.INF_MIN) + .addPrimaryKeyColumn("pk2", PrimaryKeyValue.INF_MIN) + .build(); + PrimaryKey end = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("pk0", PrimaryKeyValue.INF_MAX) + .addPrimaryKeyColumn("pk1", PrimaryKeyValue.INF_MAX) + .addPrimaryKeyColumn("pk2", PrimaryKeyValue.INF_MAX) + .build(); + criteria.setInclusiveStartPrimaryKey(start); + criteria.setExclusiveEndPrimaryKey(end); + criteria.setMaxVersions(1); + + GetRangeRequest request = new GetRangeRequest(); + request.setRangeRowQueryCriteria(criteria); + + PrimaryKey nextStart = null; + do { + Future future = ots.getRange(request, null); + GetRangeResponse result = null; + try { + result = future.get(); + } catch (Exception e) { + throw new ClientException(e); + } + for (Row row : result.getRows()) { + PrimaryKeyValue pk0 = row.getPrimaryKey().getPrimaryKeyColumn("pk0").getValue(); + PrimaryKeyValue pk1 = row.getPrimaryKey().getPrimaryKeyColumn("pk1").getValue(); + PrimaryKeyValue pk2 = row.getPrimaryKey().getPrimaryKeyColumn("pk2").getValue(); + assertEquals(pk0.asLong(), rowsCountInTable); + assertEquals(pk1.asString(), "pk_" + rowsCountInTable); + assertEquals(pk2.asLong(), rowsCountInTable); + + if (row.contains("put_0")) { + for (int i = 0; i < columnsCount; i++) { + ColumnValue c = row.getLatestColumn("put_" + i).getValue(); + assertTrue(c != null); + assertEquals(c.asString(), strValue); + } + } else if (row.contains("update_0")) { + for (int i = 0; i < columnsCount; i++) { + ColumnValue c = row.getLatestColumn("update_" + i).getValue(); + assertTrue(c != null); + assertEquals(c.asString(), strValue); + } + } + + rowsCountInTable++; + } + + nextStart = result.getNextStartPrimaryKey(); + + if (nextStart != null) { + criteria.setInclusiveStartPrimaryKey(nextStart); + } + } while (nextStart != null); + + assertEquals(rowsCountInTable, rowsCount); + } + + @Test + public void testWriteDirtyRows() throws Exception { + final WriterConfig config = new WriterConfig(); + config.setConcurrency(concurrency); + config.setBufferSize(queueSize); + config.setFlushInterval(1000000); + config.setMaxAttrColumnSize(3 * 1024 * 1024); // max attribute length set to 3MB + config.setMaxBatchSize(4 * 1024 * 1024); + config.setWriteMode(writeMode); + config.setBucketCount(1); + StringBuilder longStr = new StringBuilder(); + for (int i = 0; i < 2 * 1024 * 1024 + 1; i++) { + longStr.append('a'); + } + DefaultTableStoreWriter writer = createWriter(config, TABLE_NAME); + + int dirtyRowId = 25; + try { + for (int i = 0; i < 100; i++) { + PrimaryKey pk = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("pk0", PrimaryKeyValue.fromLong(i)) + .addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromString("pk_" + i)) + .addPrimaryKeyColumn("pk2", PrimaryKeyValue.fromLong(i)) + .build(); + + RowUpdateChange rowChange = new RowUpdateChange(TABLE_NAME, pk); + for (int j = 0; j < columnsCount; j++) { + rowChange.put("column_" + j, ColumnValue.fromString(strValue)); + } + + if (i == dirtyRowId) { + rowChange.put("longattr", ColumnValue.fromString(longStr.toString())); + } + + writer.addRowChange(rowChange); + } + + writer.flush(); + + } finally { + writer.close(); + } + + assertEquals(succeedRows.get(), 99); + assertEquals(failedRows.get(), 1); + assertEquals(writer.getWriterStatistics().getTotalRowsCount(), 100); + assertEquals(writer.getWriterStatistics().getTotalSucceedRowsCount(), 99); + assertEquals(writer.getWriterStatistics().getTotalFailedRowsCount(), 1); + assertEquals(writer.getWriterStatistics().getTotalSingleRowRequestCount(), 100); //only when bucket = 1 + assertEquals(writer.getWriterStatistics().getTotalRequestCount(), 101); + + int rowsCountInTable = 0; + RangeRowQueryCriteria criteria = new RangeRowQueryCriteria(TABLE_NAME); + PrimaryKey start = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("pk0", PrimaryKeyValue.INF_MIN) + .addPrimaryKeyColumn("pk1", PrimaryKeyValue.INF_MIN) + .addPrimaryKeyColumn("pk2", PrimaryKeyValue.INF_MIN) + .build(); + PrimaryKey end = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("pk0", PrimaryKeyValue.INF_MAX) + .addPrimaryKeyColumn("pk1", PrimaryKeyValue.INF_MAX) + .addPrimaryKeyColumn("pk2", PrimaryKeyValue.INF_MAX) + .build(); + + criteria.setInclusiveStartPrimaryKey(start); + criteria.setExclusiveEndPrimaryKey(end); + criteria.setMaxVersions(1); + + GetRangeRequest request = new GetRangeRequest(); + request.setRangeRowQueryCriteria(criteria); + + PrimaryKey nextStart = null; + do { + Future future = ots.getRange(request, null); + GetRangeResponse result = future.get(); + for (Row row : result.getRows()) { + if (rowsCountInTable == dirtyRowId) { + rowsCountInTable++; + } + PrimaryKeyValue pk0 = row.getPrimaryKey().getPrimaryKeyColumn("pk0").getValue(); + PrimaryKeyValue pk1 = row.getPrimaryKey().getPrimaryKeyColumn("pk1").getValue(); + PrimaryKeyValue pk2 = row.getPrimaryKey().getPrimaryKeyColumn("pk2").getValue(); + assertEquals(pk0.asLong(), rowsCountInTable); + assertEquals(pk1.asString(), "pk_" + rowsCountInTable); + assertEquals(pk2.asLong(), rowsCountInTable); + + if (row.contains("put_0")) { + for (int i = 0; i < columnsCount; i++) { + ColumnValue c = row.getLatestColumn("put_" + i).getValue(); + assertTrue(c != null); + assertEquals(c.asString(), strValue); + } + } else if (row.contains("update_0")) { + for (int i = 0; i < columnsCount; i++) { + ColumnValue c = row.getLatestColumn("update_" + i).getValue(); + assertTrue(c != null); + assertEquals(c.asString(), strValue); + } + } + + rowsCountInTable++; + } + + nextStart = result.getNextStartPrimaryKey(); + + if (nextStart != null) { + criteria.setInclusiveStartPrimaryKey(nextStart); + } + } while (nextStart != null); + + assertEquals(rowsCountInTable, 100); + } + + @Test + public void testSingleRowFuture() { + int rowCount = 101; + final WriterConfig config = new WriterConfig(); + config.setConcurrency(concurrency); + config.setBufferSize(queueSize); + config.setFlushInterval(1000000); + config.setMaxAttrColumnSize(3 * 1024 * 1024); // max attribute length set to 3MB + config.setMaxBatchSize(4 * 1024 * 1024); + config.setWriteMode(writeMode); + config.setBucketCount(1); + + DefaultTableStoreWriter writer = createWriter(config, TABLE_NAME); + + List> futureList = new LinkedList>(); + try { + for (int i = 0; i < rowCount; i++) { + PrimaryKey pk = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("pk0", PrimaryKeyValue.fromLong(i)) + .addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromString("pk_" + i)) + .addPrimaryKeyColumn("pk2", PrimaryKeyValue.fromLong(i)) + .build(); + + RowUpdateChange rowChange = new RowUpdateChange(TABLE_NAME, pk); + for (int j = 0; j < columnsCount; j++) { + rowChange.put("column_" + j, ColumnValue.fromString(strValue)); + } + + Future future = writer.addRowChangeWithFuture(rowChange); + futureList.add(future); + } + + writer.flush(); + + } finally { + writer.close(); + } + assertEquals(futureList.size(), rowCount); + for (Future future : futureList) { + try { + WriterResult result = future.get(); + + assertTrue(result.isAllFinished()); + assertEquals(result.getTotalCount(), 1); + assertEquals(result.getSucceedRows().size(), 1); + } catch (Exception e) { + fail(); + } + } + assertEquals(succeedRows.get(), rowCount); + assertEquals(failedRows.get(), 0); + assertEquals(writer.getWriterStatistics().getTotalRowsCount(), rowCount); + assertEquals(writer.getWriterStatistics().getTotalSucceedRowsCount(), rowCount); + assertEquals(writer.getWriterStatistics().getTotalFailedRowsCount(), 0); + assertEquals(writer.getWriterStatistics().getTotalSingleRowRequestCount(), 0); + assertEquals(writer.getWriterStatistics().getTotalRequestCount(), 1); // 101行 单筒下请求1次 + } + + @Test + public void testRowListFuture() { + int batchCount = 10; + int rowCount = 101; + final WriterConfig config = new WriterConfig(); + config.setConcurrency(concurrency); + config.setBufferSize(queueSize); + config.setFlushInterval(1000000); + config.setMaxAttrColumnSize(3 * 1024 * 1024); // max attribute length set to 3MB + config.setMaxBatchSize(4 * 1024 * 1024); + config.setWriteMode(writeMode); + config.setBucketCount(1); + + DefaultTableStoreWriter writer = createWriter(config, TABLE_NAME); + + List> futureList = new LinkedList>(); + try { + for (int batch = 0; batch < batchCount; batch++) { + List rowChanges = new ArrayList(rowCount); + for (int i = 0; i < rowCount; i++) { + PrimaryKey pk = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("pk0", PrimaryKeyValue.fromLong(i)) + .addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromString("pk_" + batch + "_" + i)) + .addPrimaryKeyColumn("pk2", PrimaryKeyValue.fromLong(i)) + .build(); + + RowUpdateChange rowChange = new RowUpdateChange(TABLE_NAME, pk); + for (int j = 0; j < columnsCount; j++) { + rowChange.put("column_" + j, ColumnValue.fromString(strValue)); + } + rowChanges.add(rowChange); + } + Future future = writer.addRowChangeWithFuture(rowChanges); + futureList.add(future); + } + + writer.flush(); + + } finally { + writer.close(); + } + assertEquals(futureList.size(), batchCount); + for (Future future : futureList) { + try { + WriterResult result = future.get(); + + assertTrue(result.isAllFinished()); + assertEquals(result.getTotalCount(), rowCount); + assertEquals(result.getSucceedRows().size(), rowCount); + } catch (Exception e) { + fail(); + } + } + assertEquals(succeedRows.get(), batchCount * rowCount); + assertEquals(failedRows.get(), 0); + assertEquals(writer.getWriterStatistics().getTotalRowsCount(), batchCount * rowCount); + assertEquals(writer.getWriterStatistics().getTotalSucceedRowsCount(), batchCount * rowCount); + assertEquals(writer.getWriterStatistics().getTotalFailedRowsCount(), 0); + assertEquals(writer.getWriterStatistics().getTotalSingleRowRequestCount(), 0); + assertEquals(writer.getWriterStatistics().getTotalRequestCount(), 6); // 1010行 单筒下请求6次 + } + + + @Test + public void testWriteDirtySingleRowsFuture() throws Exception { + int rowCount = 99; + final WriterConfig config = new WriterConfig(); + config.setConcurrency(concurrency); + config.setBufferSize(queueSize); + config.setFlushInterval(1000000); + config.setMaxAttrColumnSize(3 * 1024 * 1024); // max attribute length set to 3MB + config.setMaxBatchSize(4 * 1024 * 1024); + config.setWriteMode(writeMode); + config.setBucketCount(1); + StringBuilder longStr = new StringBuilder(); + for (int i = 0; i < 2 * 1024 * 1024 + 1; i++) { + longStr.append('a'); + } + DefaultTableStoreWriter writer = createWriter(config, TABLE_NAME); + List> futureList = new LinkedList>(); + + int dirtyRowId = 25; + try { + for (int i = 0; i < rowCount; i++) { + PrimaryKey pk = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("pk0", PrimaryKeyValue.fromLong(i)) + .addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromString("pk_" + i)) + .addPrimaryKeyColumn("pk2", PrimaryKeyValue.fromLong(i)) + .build(); + + RowUpdateChange rowChange = new RowUpdateChange(TABLE_NAME, pk); + for (int j = 0; j < columnsCount; j++) { + rowChange.put("column_" + j, ColumnValue.fromString(strValue)); + } + + if (i == dirtyRowId) { + rowChange.put("longattr", ColumnValue.fromString(longStr.toString())); + } + + Future future = writer.addRowChangeWithFuture(rowChange); + futureList.add(future); + } + + writer.flush(); + + } finally { + writer.close(); + } + + int failedCounter = 0; + for (int i = 0; i < futureList.size(); i++) { + try { + Future future = futureList.get(i); + WriterResult result = future.get(); + + assertEquals(result.getTotalCount(), 1); + assertEquals(result.isAllFinished(), true); + if (result.isAllSucceed()) { + assertEquals(result.getSucceedRows().size(), 1); + } else { + failedCounter++; + assertEquals(result.getFailedRows().size(), 1); + assertEquals(result.getFailedRows().get(0).getException().getMessage(), + "The length of attribute column: 'longattr' exceeds the MaxLength:2097152 with CurrentLength:2097153."); + } + } catch (Exception e) { + fail(); + } + } + assertEquals(failedCounter, 1); + + assertEquals(succeedRows.get(), rowCount - 1); + assertEquals(failedRows.get(), 1); + assertEquals(writer.getWriterStatistics().getTotalRowsCount(), rowCount); + assertEquals(writer.getWriterStatistics().getTotalSucceedRowsCount(), rowCount - 1); + assertEquals(writer.getWriterStatistics().getTotalFailedRowsCount(), 1); + assertEquals(writer.getWriterStatistics().getTotalSingleRowRequestCount(), rowCount); //only when bucket = 1 + assertEquals(writer.getWriterStatistics().getTotalRequestCount(), rowCount + 1); + + } + + @Test + public void testWriteDirtyRowsListFuture() throws Exception { + int batchCount = 2; + int rowCount = 101; + final WriterConfig config = new WriterConfig(); + config.setConcurrency(concurrency); + config.setBufferSize(queueSize); + config.setFlushInterval(1000000); + config.setMaxAttrColumnSize(3 * 1024 * 1024); // max attribute length set to 3MB + config.setMaxBatchSize(4 * 1024 * 1024); + config.setWriteMode(writeMode); + config.setBucketCount(1); + StringBuilder longStr = new StringBuilder(); + for (int i = 0; i < 2 * 1024 * 1024 + 1; i++) { + longStr.append('a'); + } + DefaultTableStoreWriter writer = createWriter(config, TABLE_NAME); + + List> futureList = new LinkedList>(); + try { + int dirtyRowId = 25; + for (int batch = 0; batch < batchCount; batch++) { + List rowChanges = new ArrayList(rowCount); + for (int i = 0; i < rowCount; i++) { + PrimaryKey pk = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("pk0", PrimaryKeyValue.fromLong(i)) + .addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromString("pk_" + batch + "_" + i)) + .addPrimaryKeyColumn("pk2", PrimaryKeyValue.fromLong(i)) + .build(); + + RowUpdateChange rowChange = new RowUpdateChange(TABLE_NAME, pk); + for (int j = 0; j < columnsCount; j++) { + rowChange.put("column_" + j, ColumnValue.fromString(strValue)); + } + + if (i == dirtyRowId) { + rowChange.put("longattr", ColumnValue.fromString(longStr.toString())); +// rowChange.setCondition(new Condition(RowExistenceExpectation.EXPECT_EXIST)); + } + + rowChanges.add(rowChange); + } + Future future = writer.addRowChangeWithFuture(rowChanges); + futureList.add(future); + } + + writer.flush(); + + } finally { + writer.close(); + } + assertEquals(futureList.size(), batchCount); + + int failedCounter = 0; + for (Future future : futureList) { + try { + WriterResult result = future.get(); + + assertTrue(result.isAllFinished()); + assertEquals(result.getTotalCount(), rowCount); + if (result.isAllSucceed()) { + assertEquals(result.getSucceedRows().size(), rowCount); + assertEquals(result.getFailedRows().size(), 0); + } else { + failedCounter += result.getFailedRows().size(); + assertFalse(result.getSucceedRows().size() == rowCount); + assertEquals(result.getFailedRows().size(), 1); + assertEquals(result.getFailedRows().get(0).getException().getMessage(), + "The length of attribute column: 'longattr' exceeds the MaxLength:2097152 with CurrentLength:2097153."); + } + } catch (Exception e) { + fail(); + } + } + // 每一批次的第25行都是错的 + assertEquals(failedCounter, batchCount); + + assertEquals(succeedRows.get(), batchCount * rowCount - batchCount); + assertEquals(failedRows.get(), batchCount); + assertEquals(writer.getWriterStatistics().getTotalRowsCount(), batchCount * rowCount); + assertEquals(writer.getWriterStatistics().getTotalSucceedRowsCount(), batchCount * rowCount - batchCount); + assertEquals(writer.getWriterStatistics().getTotalFailedRowsCount(), batchCount); + assertEquals(writer.getWriterStatistics().getTotalSingleRowRequestCount(), batchCount * rowCount); //only when bucket = 1 + assertEquals(writer.getWriterStatistics().getTotalRequestCount(), batchCount * (rowCount + 1) ); + + } +} diff --git a/src/test/java/com/alicloud/openservices/tablestore/writer/TestWriterParallel.java b/src/test/java/com/alicloud/openservices/tablestore/writer/TestWriterParallel.java new file mode 100644 index 0000000..ae43a2e --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/writer/TestWriterParallel.java @@ -0,0 +1,260 @@ +package com.alicloud.openservices.tablestore.writer; + +import com.alicloud.openservices.tablestore.*; +import com.alicloud.openservices.tablestore.common.ServiceSettings; +import com.alicloud.openservices.tablestore.core.auth.DefaultCredentials; +import com.alicloud.openservices.tablestore.model.*; +import com.alicloud.openservices.tablestore.writer.enums.WriteMode; +import com.google.common.util.concurrent.ThreadFactoryBuilder; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.*; +import java.util.concurrent.atomic.AtomicLong; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +public class TestWriterParallel { + + private static final String TABLE_NAME = "WriterTestParallel"; + private static ServiceSettings serviceSettings = ServiceSettings.load(); + private static long totalTime = 0; + private volatile boolean stop = false; + private static AtomicLong succeedRows = new AtomicLong(); + private static AtomicLong failedRows = new AtomicLong(); + private static long rowsCount = 100000; + private static AtomicLong rowIndex = new AtomicLong(-1); + private static long columnsCount = 10; + private static int concurrency = 100; + private static int queueSize = 4096; + private static int sendThreads = 1; + private static int writerCount = 1; + private static int bucketCount = 3; + private static WriteMode writeMode = WriteMode.PARALLEL; + private AsyncClientInterface ots; + final String strValue = "0123456789"; + private static AtomicLong retryCount = new AtomicLong(); + private static ExecutorService threadPool; + + public void createTable(AsyncClientInterface ots) { + TableMeta tableMeta = new TableMeta(TABLE_NAME); + tableMeta.addPrimaryKeyColumn("pk0", PrimaryKeyType.INTEGER); + tableMeta.addPrimaryKeyColumn("pk1", PrimaryKeyType.STRING); + tableMeta.addPrimaryKeyColumn("pk2", PrimaryKeyType.INTEGER); + TableOptions tableOptions = new TableOptions(-1, 1); + CreateTableRequest request = new CreateTableRequest(tableMeta, tableOptions, new ReservedThroughput(new CapacityUnit(0, 0))); + request.setReservedThroughput(new ReservedThroughput(new CapacityUnit(0, 0))); + + Future future = ots.createTable(request, null); + try { + future.get(); + } catch (Exception e) { + throw new ClientException(e); + } + } + + @Before + public void setUp() throws Exception { + ThreadFactory threadFactory = new ThreadFactoryBuilder().setNameFormat("writer-pool-%d").build(); + threadPool = new ThreadPoolExecutor(10, 10, 0L, TimeUnit.MILLISECONDS, + new LinkedBlockingQueue(1024), threadFactory, new ThreadPoolExecutor.CallerRunsPolicy()); + + + ots = new AsyncClient(serviceSettings.getOTSEndpoint(), + serviceSettings.getOTSAccessKeyId(), serviceSettings.getOTSAccessKeySecret(), + serviceSettings.getOTSInstanceName()); + + try { + DeleteTableRequest request = new DeleteTableRequest(TABLE_NAME); + Future future = ots.deleteTable(request, null); + future.get(); + } catch (Exception e) { + // pass + } + createTable(ots); + Thread.sleep(3000); + } + + @After + public void after() { + ots.shutdown(); + threadPool.shutdown(); + } + + public static DefaultTableStoreWriter createWriter(WriterConfig config) { + TableStoreCallback callback = new TableStoreCallback() { + @Override + public void onCompleted(RowChange rowChange, RowWriteResult cc) { + succeedRows.incrementAndGet(); + } + + @Override + public void onFailed(RowChange rowChange, Exception ex) { + ex.printStackTrace(); + failedRows.incrementAndGet(); + } + }; + + DefaultCredentials credentials = new DefaultCredentials(serviceSettings.getOTSAccessKeyId(), serviceSettings.getOTSAccessKeySecret()); + DefaultTableStoreWriter writer = new DefaultTableStoreWriter( + serviceSettings.getOTSEndpoint(), + credentials, + serviceSettings.getOTSInstanceName(), + TABLE_NAME, config, callback); + + return writer; + } + + @Test + public void testSimple() throws Exception { + final WriterConfig config = new WriterConfig(); + config.setConcurrency(concurrency); + config.setBufferSize(queueSize); + config.setWriteMode(writeMode); + config.setBucketCount(bucketCount); + config.setFlushInterval(10000); + + long st = System.currentTimeMillis(); + List threads = new ArrayList(); + List writers = new ArrayList(); + final CountDownLatch latch = new CountDownLatch(writerCount * sendThreads); + for (int tc = 0; tc < writerCount; tc++) { + final DefaultTableStoreWriter writer = createWriter(config); + writers.add(writer); + for (int k = 0; k < sendThreads; k++) { + final int threadId = k; + threadPool.execute(new Runnable() { + public void run() { + + for (long index = rowIndex.incrementAndGet(); index < rowsCount; index = rowIndex.incrementAndGet()) { + PrimaryKey pk = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("pk0", PrimaryKeyValue.fromLong(index)) + .addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromString("pk_" + index)) + .addPrimaryKeyColumn("pk2", PrimaryKeyValue.fromLong(index)) + .build(); + + RowUpdateChange rowChange = new RowUpdateChange(TABLE_NAME, pk); + for (int j = 0; j < columnsCount; j++) { + rowChange.put("column_" + j, ColumnValue.fromString(strValue)); + } + + rowChange.put("thread_" + threadId, ColumnValue.fromLong(threadId)); + writer.addRowChange(rowChange); + } + System.out.println("Write thread finished."); + latch.countDown(); + } + }); + } + } + + latch.await(); + for (DefaultTableStoreWriter writer : writers) { + writer.flush(); + writer.close(); + } + + long et = System.currentTimeMillis(); + totalTime = et - st; + stop = true; + //scanTable(ots); + + System.out.println("TotalTime: " + totalTime); + System.out.println("Write succeed rows: " + succeedRows.get()); + System.out.println("Write failed rows: " + failedRows.get()); + System.out.println("Retry count: " + retryCount.get()); + double qps = 1.0 * (succeedRows.get() + failedRows.get()) / (totalTime / 1000.0); + System.out.println("QPS: " + qps); + + // check value + System.out.println("Start check values..."); + long totalRPCCount = succeedRows.get() + failedRows.get(); + assertEquals(totalRPCCount, rowsCount); + scanTable(ots); + System.out.println("PASS!"); + } + + private void scanTable(AsyncClientInterface ots) throws ExecutionException, InterruptedException { + System.out.println("#################### Begin scan table ####################"); + int rowsCountInTable = 0; + RangeRowQueryCriteria criteria = new RangeRowQueryCriteria(TABLE_NAME); + PrimaryKey start = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("pk0", PrimaryKeyValue.INF_MIN) + .addPrimaryKeyColumn("pk1", PrimaryKeyValue.INF_MIN) + .addPrimaryKeyColumn("pk2", PrimaryKeyValue.INF_MIN) + .build(); + PrimaryKey end = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("pk0", PrimaryKeyValue.INF_MAX) + .addPrimaryKeyColumn("pk1", PrimaryKeyValue.INF_MAX) + .addPrimaryKeyColumn("pk2", PrimaryKeyValue.INF_MAX) + .build(); + + criteria.setInclusiveStartPrimaryKey(start); + criteria.setExclusiveEndPrimaryKey(end); + criteria.setMaxVersions(1); + + GetRangeRequest request = new GetRangeRequest(); + request.setRangeRowQueryCriteria(criteria); + + PrimaryKey nextStart = null; + do { + Future future = ots.getRange(request, null); + GetRangeResponse result = future.get(); + for (Row row : result.getRows()) { + PrimaryKeyValue pk0 = row.getPrimaryKey().getPrimaryKeyColumn("pk0").getValue(); + PrimaryKeyValue pk1 = row.getPrimaryKey().getPrimaryKeyColumn("pk1").getValue(); + PrimaryKeyValue pk2 = row.getPrimaryKey().getPrimaryKeyColumn("pk2").getValue(); + assertEquals(pk0.asLong(), rowsCountInTable); + assertEquals(pk1.asString(), "pk_" + rowsCountInTable); + assertEquals(pk2.asLong(), rowsCountInTable); + + for (int i = 0; i < columnsCount; i++) { + ColumnValue c = row.getLatestColumn("column_" + i).getValue(); + assertTrue(c != null); + assertEquals(c.asString(), strValue); + } + + rowsCountInTable++; + } + + nextStart = result.getNextStartPrimaryKey(); + + if (nextStart != null) { + criteria.setInclusiveStartPrimaryKey(nextStart); + } + } while (nextStart != null); + + assertEquals(rowsCountInTable, rowsCount); + System.out.println("TotalRowsCount: " + rowsCountInTable); + } + + public static void main(String[] args) throws Exception { + if (args.length >= 6) { + rowsCount = Long.parseLong(args[0]); + columnsCount = Long.parseLong(args[1]); + concurrency = Integer.parseInt(args[2]); + queueSize = Integer.parseInt(args[3]); + sendThreads = Integer.parseInt(args[4]); + writerCount = Integer.parseInt(args[5]); + } + + + System.out.println("RowsCount: " + rowsCount); + System.out.println("ColumnsCount: " + columnsCount); + System.out.println("Concurrency: " + concurrency); + System.out.println("QueueSize: " + queueSize); + System.out.println("SendThreads: " + sendThreads); + System.out.println("WriterCount: " + writerCount); + System.out.println("WriterMode: " + writeMode); + System.out.println("BucketCount: " + bucketCount); + + TestWriterParallel tw = new TestWriterParallel(); + tw.setUp(); + tw.testSimple(); + tw.after(); + } +} diff --git a/src/test/java/com/alicloud/openservices/tablestore/writer/TestWriterPerf.java b/src/test/java/com/alicloud/openservices/tablestore/writer/TestWriterPerf.java index 5ccef45..00db9b0 100644 --- a/src/test/java/com/alicloud/openservices/tablestore/writer/TestWriterPerf.java +++ b/src/test/java/com/alicloud/openservices/tablestore/writer/TestWriterPerf.java @@ -3,6 +3,7 @@ import com.alicloud.openservices.tablestore.*; import com.alicloud.openservices.tablestore.model.*; import com.alicloud.openservices.tablestore.common.ServiceSettings; +import com.google.common.util.concurrent.ThreadFactoryBuilder; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -17,7 +18,7 @@ public class TestWriterPerf { - private static final String tableName = "WriterTest"; + private static final String TABLE_NAME = "WriterTest"; private static ServiceSettings serviceSettings = ServiceSettings.load(); private static long totalTime = 0; private volatile boolean stop = false; @@ -33,9 +34,10 @@ public class TestWriterPerf { private AsyncClientInterface ots; final String strValue = "0123456789"; private static AtomicLong retryCount = new AtomicLong(); + private static ExecutorService threadPool; public void createTable(AsyncClientInterface ots) { - TableMeta tableMeta = new TableMeta(tableName); + TableMeta tableMeta = new TableMeta(TABLE_NAME); tableMeta.addPrimaryKeyColumn("pk0", PrimaryKeyType.INTEGER); tableMeta.addPrimaryKeyColumn("pk1", PrimaryKeyType.STRING); tableMeta.addPrimaryKeyColumn("pk2", PrimaryKeyType.INTEGER); @@ -53,6 +55,10 @@ public void createTable(AsyncClientInterface ots) { @Before public void setUp() throws Exception { + ThreadFactory threadFactory = new ThreadFactoryBuilder().setNameFormat("writer-pool-%d").build(); + threadPool = new ThreadPoolExecutor(10, 10, 0L, TimeUnit.MILLISECONDS, + new LinkedBlockingQueue(1024), threadFactory, new ThreadPoolExecutor.AbortPolicy()); + ClientConfiguration cc = new ClientConfiguration(); cc.setMaxConnections(1000); cc.setRetryStrategy(new RetryStrategy() { @@ -80,7 +86,7 @@ public long nextPause(String action, Exception ex) { serviceSettings.getOTSInstanceName(), cc); try { - DeleteTableRequest request = new DeleteTableRequest(tableName); + DeleteTableRequest request = new DeleteTableRequest(TABLE_NAME); Future future = ots.deleteTable(request, null); future.get(); } catch (Exception e) { @@ -107,7 +113,7 @@ public void onFailed(RowChange rowChange, Exception ex) { failedRows.incrementAndGet(); } }; - DefaultTableStoreWriter writer = new DefaultTableStoreWriter(ots, tableName, config, callback, executor); + DefaultTableStoreWriter writer = new DefaultTableStoreWriter(ots, TABLE_NAME, config, callback, executor); return writer; } @@ -123,12 +129,13 @@ public void testSimple() throws Exception { long st = System.currentTimeMillis(); List threads = new ArrayList(); List writers = new ArrayList(); + final CountDownLatch latch = new CountDownLatch(writerCount * sendThreads); for (int tc = 0; tc < writerCount; tc++) { final DefaultTableStoreWriter writer = createWriter(ots, config, executor); writers.add(writer); for (int k = 0; k < sendThreads; k++) { final int threadId = k; - Thread th = new Thread(new Runnable() { + threadPool.execute(new Runnable() { public void run() { for (long index = rowIndex.incrementAndGet(); index < rowsCount; index = rowIndex.incrementAndGet()) { @@ -138,7 +145,7 @@ public void run() { .addPrimaryKeyColumn("pk2", PrimaryKeyValue.fromLong(index)) .build(); - RowUpdateChange rowChange = new RowUpdateChange(tableName, pk); + RowUpdateChange rowChange = new RowUpdateChange(TABLE_NAME, pk); for (int j = 0; j < columnsCount; j++) { rowChange.put("column_" + j, ColumnValue.fromString(strValue)); } @@ -147,20 +154,13 @@ public void run() { writer.addRowChange(rowChange); } System.out.println("Write thread finished."); + latch.countDown(); } }); - threads.add(th); } } - for (Thread th : threads) { - th.start(); - } - - for (Thread th : threads) { - th.join(); - } - + latch.await(); for (DefaultTableStoreWriter writer : writers) { writer.flush(); writer.close(); @@ -191,7 +191,7 @@ public void run() { private void scanTable(AsyncClientInterface ots) throws ExecutionException, InterruptedException { System.out.println("#################### Begin scan table ####################"); int rowsCountInTable = 0; - RangeRowQueryCriteria criteria = new RangeRowQueryCriteria(tableName); + RangeRowQueryCriteria criteria = new RangeRowQueryCriteria(TABLE_NAME); PrimaryKey start = PrimaryKeyBuilder.createPrimaryKeyBuilder() .addPrimaryKeyColumn("pk0", PrimaryKeyValue.INF_MIN) .addPrimaryKeyColumn("pk1", PrimaryKeyValue.INF_MIN) @@ -243,17 +243,16 @@ private void scanTable(AsyncClientInterface ots) throws ExecutionException, Inte } public static void main(String[] args) throws Exception { - if (args.length < 6) { - System.out.println("Arguments not enough."); - System.exit(-1); + if (args.length >= 6) { + rowsCount = Long.parseLong(args[0]); + columnsCount = Long.parseLong(args[1]); + concurrency = Integer.parseInt(args[2]); + queueSize = Integer.parseInt(args[3]); + sendThreads = Integer.parseInt(args[4]); + writerCount = Integer.parseInt(args[5]); } - rowsCount = Long.parseLong(args[0]); - columnsCount = Long.parseLong(args[1]); - concurrency = Integer.parseInt(args[2]); - queueSize = Integer.parseInt(args[3]); - sendThreads = Integer.parseInt(args[4]); - writerCount = Integer.parseInt(args[5]); + System.out.println("RowsCount: " + rowsCount); System.out.println("ColumnsCount: " + columnsCount); System.out.println("Concurrency: " + concurrency); diff --git a/src/test/java/com/alicloud/openservices/tablestore/writer/TestWriterSequential.java b/src/test/java/com/alicloud/openservices/tablestore/writer/TestWriterSequential.java new file mode 100644 index 0000000..2d973fb --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/writer/TestWriterSequential.java @@ -0,0 +1,260 @@ +package com.alicloud.openservices.tablestore.writer; + +import com.alicloud.openservices.tablestore.*; +import com.alicloud.openservices.tablestore.common.ServiceSettings; +import com.alicloud.openservices.tablestore.core.auth.DefaultCredentials; +import com.alicloud.openservices.tablestore.model.*; +import com.alicloud.openservices.tablestore.writer.enums.WriteMode; +import com.google.common.util.concurrent.ThreadFactoryBuilder; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.*; +import java.util.concurrent.atomic.AtomicLong; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +public class TestWriterSequential { + + private static final String TABLE_NAME = "WriterTestSequential"; + private static ServiceSettings serviceSettings = ServiceSettings.load(); + private static long totalTime = 0; + private volatile boolean stop = false; + private static AtomicLong succeedRows = new AtomicLong(); + private static AtomicLong failedRows = new AtomicLong(); + private static long rowsCount = 100000; + private static AtomicLong rowIndex = new AtomicLong(-1); + private static long columnsCount = 10; + private static int concurrency = 100; + private static int queueSize = 4096; + private static int sendThreads = 1; + private static int writerCount = 1; + private static int bucketCount = 100; // writerConfig default value + private static WriteMode writeMode = WriteMode.SEQUENTIAL; + private AsyncClientInterface ots; + final String strValue = "0123456789"; + private static AtomicLong retryCount = new AtomicLong(); + private static ExecutorService threadPool; + + public void createTable(AsyncClientInterface ots) { + TableMeta tableMeta = new TableMeta(TABLE_NAME); + tableMeta.addPrimaryKeyColumn("pk0", PrimaryKeyType.INTEGER); + tableMeta.addPrimaryKeyColumn("pk1", PrimaryKeyType.STRING); + tableMeta.addPrimaryKeyColumn("pk2", PrimaryKeyType.INTEGER); + TableOptions tableOptions = new TableOptions(-1, 1); + CreateTableRequest request = new CreateTableRequest(tableMeta, tableOptions, new ReservedThroughput(new CapacityUnit(0, 0))); + request.setReservedThroughput(new ReservedThroughput(new CapacityUnit(0, 0))); + + Future future = ots.createTable(request, null); + try { + future.get(); + } catch (Exception e) { + throw new ClientException(e); + } + } + + @Before + public void setUp() throws Exception { + ThreadFactory threadFactory = new ThreadFactoryBuilder().setNameFormat("writer-pool-%d").build(); + threadPool = new ThreadPoolExecutor(10, 10, 0L, TimeUnit.MILLISECONDS, + new LinkedBlockingQueue(1024), threadFactory, new ThreadPoolExecutor.CallerRunsPolicy()); + + + ots = new AsyncClient(serviceSettings.getOTSEndpoint(), + serviceSettings.getOTSAccessKeyId(), serviceSettings.getOTSAccessKeySecret(), + serviceSettings.getOTSInstanceName()); + + try { + DeleteTableRequest request = new DeleteTableRequest(TABLE_NAME); + Future future = ots.deleteTable(request, null); + future.get(); + } catch (Exception e) { + // pass + } + createTable(ots); + Thread.sleep(3000); + } + + @After + public void after() { + ots.shutdown(); + threadPool.shutdown(); + } + + public static DefaultTableStoreWriter createWriter(WriterConfig config) { + TableStoreCallback callback = new TableStoreCallback() { + @Override + public void onCompleted(RowChange rowChange, RowWriteResult cc) { + succeedRows.incrementAndGet(); + } + + @Override + public void onFailed(RowChange rowChange, Exception ex) { + ex.printStackTrace(); + failedRows.incrementAndGet(); + } + }; + + DefaultCredentials credentials = new DefaultCredentials(serviceSettings.getOTSAccessKeyId(), serviceSettings.getOTSAccessKeySecret()); + DefaultTableStoreWriter writer = new DefaultTableStoreWriter( + serviceSettings.getOTSEndpoint(), + credentials, + serviceSettings.getOTSInstanceName(), + TABLE_NAME, config, callback); + + return writer; + } + + @Test + public void testSimple() throws Exception { + final WriterConfig config = new WriterConfig(); + config.setConcurrency(concurrency); + config.setBufferSize(queueSize); + config.setWriteMode(writeMode); + config.setBucketCount(bucketCount); + config.setFlushInterval(10000); + + long st = System.currentTimeMillis(); + List threads = new ArrayList(); + List writers = new ArrayList(); + final CountDownLatch latch = new CountDownLatch(writerCount * sendThreads); + for (int tc = 0; tc < writerCount; tc++) { + final DefaultTableStoreWriter writer = createWriter(config); + writers.add(writer); + for (int k = 0; k < sendThreads; k++) { + final int threadId = k; + threadPool.execute(new Runnable() { + public void run() { + + for (long index = rowIndex.incrementAndGet(); index < rowsCount; index = rowIndex.incrementAndGet()) { + PrimaryKey pk = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("pk0", PrimaryKeyValue.fromLong(index)) + .addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromString("pk_" + index)) + .addPrimaryKeyColumn("pk2", PrimaryKeyValue.fromLong(index)) + .build(); + + RowUpdateChange rowChange = new RowUpdateChange(TABLE_NAME, pk); + for (int j = 0; j < columnsCount; j++) { + rowChange.put("column_" + j, ColumnValue.fromString(strValue)); + } + + rowChange.put("thread_" + threadId, ColumnValue.fromLong(threadId)); + writer.addRowChange(rowChange); + } + System.out.println("Write thread finished."); + latch.countDown(); + } + }); + } + } + + latch.await(); + for (DefaultTableStoreWriter writer : writers) { + writer.flush(); + writer.close(); + } + + long et = System.currentTimeMillis(); + totalTime = et - st; + stop = true; + //scanTable(ots); + + System.out.println("TotalTime: " + totalTime); + System.out.println("Write succeed rows: " + succeedRows.get()); + System.out.println("Write failed rows: " + failedRows.get()); + System.out.println("Retry count: " + retryCount.get()); + double qps = 1.0 * (succeedRows.get() + failedRows.get()) / (totalTime / 1000.0); + System.out.println("QPS: " + qps); + + // check value + System.out.println("Start check values..."); + long totalRPCCount = succeedRows.get() + failedRows.get(); + assertEquals(totalRPCCount, rowsCount); + scanTable(ots); + System.out.println("PASS!"); + } + + private void scanTable(AsyncClientInterface ots) throws ExecutionException, InterruptedException { + System.out.println("#################### Begin scan table ####################"); + int rowsCountInTable = 0; + RangeRowQueryCriteria criteria = new RangeRowQueryCriteria(TABLE_NAME); + PrimaryKey start = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("pk0", PrimaryKeyValue.INF_MIN) + .addPrimaryKeyColumn("pk1", PrimaryKeyValue.INF_MIN) + .addPrimaryKeyColumn("pk2", PrimaryKeyValue.INF_MIN) + .build(); + PrimaryKey end = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("pk0", PrimaryKeyValue.INF_MAX) + .addPrimaryKeyColumn("pk1", PrimaryKeyValue.INF_MAX) + .addPrimaryKeyColumn("pk2", PrimaryKeyValue.INF_MAX) + .build(); + + criteria.setInclusiveStartPrimaryKey(start); + criteria.setExclusiveEndPrimaryKey(end); + criteria.setMaxVersions(1); + + GetRangeRequest request = new GetRangeRequest(); + request.setRangeRowQueryCriteria(criteria); + + PrimaryKey nextStart = null; + do { + Future future = ots.getRange(request, null); + GetRangeResponse result = future.get(); + for (Row row : result.getRows()) { + PrimaryKeyValue pk0 = row.getPrimaryKey().getPrimaryKeyColumn("pk0").getValue(); + PrimaryKeyValue pk1 = row.getPrimaryKey().getPrimaryKeyColumn("pk1").getValue(); + PrimaryKeyValue pk2 = row.getPrimaryKey().getPrimaryKeyColumn("pk2").getValue(); + assertEquals(pk0.asLong(), rowsCountInTable); + assertEquals(pk1.asString(), "pk_" + rowsCountInTable); + assertEquals(pk2.asLong(), rowsCountInTable); + + for (int i = 0; i < columnsCount; i++) { + ColumnValue c = row.getLatestColumn("column_" + i).getValue(); + assertTrue(c != null); + assertEquals(c.asString(), strValue); + } + + rowsCountInTable++; + } + + nextStart = result.getNextStartPrimaryKey(); + + if (nextStart != null) { + criteria.setInclusiveStartPrimaryKey(nextStart); + } + } while (nextStart != null); + + assertEquals(rowsCountInTable, rowsCount); + System.out.println("TotalRowsCount: " + rowsCountInTable); + } + + public static void main(String[] args) throws Exception { + if (args.length >= 6) { + rowsCount = Long.parseLong(args[0]); + columnsCount = Long.parseLong(args[1]); + concurrency = Integer.parseInt(args[2]); + queueSize = Integer.parseInt(args[3]); + sendThreads = Integer.parseInt(args[4]); + writerCount = Integer.parseInt(args[5]); + } + + + System.out.println("RowsCount: " + rowsCount); + System.out.println("ColumnsCount: " + columnsCount); + System.out.println("Concurrency: " + concurrency); + System.out.println("QueueSize: " + queueSize); + System.out.println("SendThreads: " + sendThreads); + System.out.println("WriterCount: " + writerCount); + System.out.println("WriterMode: " + writeMode); + System.out.println("BucketCount: " + bucketCount); + + TestWriterSequential tw = new TestWriterSequential(); + tw.setUp(); + tw.testSimple(); + tw.after(); + } +} diff --git a/src/test/java/com/alicloud/openservices/tablestore/writer/TestWriterUserProvidedClientConfig.java b/src/test/java/com/alicloud/openservices/tablestore/writer/TestWriterUserProvidedClientConfig.java new file mode 100644 index 0000000..a5d92b4 --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/writer/TestWriterUserProvidedClientConfig.java @@ -0,0 +1,237 @@ +package com.alicloud.openservices.tablestore.writer; + +import com.alicloud.openservices.tablestore.AsyncClient; +import com.alicloud.openservices.tablestore.AsyncClientInterface; +import com.alicloud.openservices.tablestore.ClientConfiguration; +import com.alicloud.openservices.tablestore.ClientException; +import com.alicloud.openservices.tablestore.DefaultTableStoreWriter; +import com.alicloud.openservices.tablestore.TableStoreCallback; +import com.alicloud.openservices.tablestore.common.ServiceSettings; +import com.alicloud.openservices.tablestore.core.auth.DefaultCredentials; +import com.alicloud.openservices.tablestore.model.CapacityUnit; +import com.alicloud.openservices.tablestore.model.ColumnValue; +import com.alicloud.openservices.tablestore.model.CreateTableRequest; +import com.alicloud.openservices.tablestore.model.CreateTableResponse; +import com.alicloud.openservices.tablestore.model.DeleteTableRequest; +import com.alicloud.openservices.tablestore.model.DeleteTableResponse; +import com.alicloud.openservices.tablestore.model.GetRangeRequest; +import com.alicloud.openservices.tablestore.model.GetRangeResponse; +import com.alicloud.openservices.tablestore.model.PrimaryKey; +import com.alicloud.openservices.tablestore.model.PrimaryKeyBuilder; +import com.alicloud.openservices.tablestore.model.PrimaryKeyOption; +import com.alicloud.openservices.tablestore.model.PrimaryKeyType; +import com.alicloud.openservices.tablestore.model.PrimaryKeyValue; +import com.alicloud.openservices.tablestore.model.RangeRowQueryCriteria; +import com.alicloud.openservices.tablestore.model.ReservedThroughput; +import com.alicloud.openservices.tablestore.model.RetryStrategy; +import com.alicloud.openservices.tablestore.model.ReturnType; +import com.alicloud.openservices.tablestore.model.Row; +import com.alicloud.openservices.tablestore.model.RowChange; +import com.alicloud.openservices.tablestore.model.RowPutChange; +import com.alicloud.openservices.tablestore.model.RowUpdateChange; +import com.alicloud.openservices.tablestore.model.TableMeta; +import com.alicloud.openservices.tablestore.model.TableOptions; +import com.alicloud.openservices.tablestore.writer.enums.BatchRequestType; +import com.alicloud.openservices.tablestore.writer.enums.WriteMode; +import com.alicloud.openservices.tablestore.writer.retry.CertainCodeRetryStrategy; +import com.google.common.util.concurrent.ThreadFactoryBuilder; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Random; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.Future; +import java.util.concurrent.LinkedBlockingQueue; +import java.util.concurrent.ThreadFactory; +import java.util.concurrent.ThreadPoolExecutor; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicLong; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + +public class TestWriterUserProvidedClientConfig { + private static final String TABLE_NAME = "WriterTestNewConstructorWithUserDefinedClientConfig"; + private static ServiceSettings serviceSettings = ServiceSettings.load(); + private static AtomicLong succeedRows = new AtomicLong(); + private static AtomicLong failedRows = new AtomicLong(); + private static long columnsCount = 10; + private static int concurrency = 100; + private static int queueSize = 1024; + private static int bucketCount = 100; + private static WriteMode writeMode = WriteMode.SEQUENTIAL; + private AsyncClientInterface ots; + private final String strValue = "0123456789"; + private ExecutorService threadPool; + + + public void createTable(AsyncClientInterface ots) throws Exception { + TableMeta tableMeta = new TableMeta(TABLE_NAME); + tableMeta.addPrimaryKeyColumn("pk_0", PrimaryKeyType.INTEGER); + tableMeta.addPrimaryKeyColumn("pk_1", PrimaryKeyType.STRING); + tableMeta.addPrimaryKeyColumn("pk_2", PrimaryKeyType.INTEGER); + TableOptions tableOptions = new TableOptions(); + tableOptions.setMaxVersions(1); + tableOptions.setTimeToLive(-1); + CreateTableRequest request = new CreateTableRequest(tableMeta, tableOptions); + request.setReservedThroughput(new ReservedThroughput(new CapacityUnit(0, 0))); + request.setTableOptions(tableOptions); + + Future future = ots.createTable(request, null); + future.get(); + } + + + @Before + public void setUp() throws Exception { + ThreadFactory threadFactory = new ThreadFactoryBuilder().setNameFormat("writer-pool-%d").build(); + threadPool = new ThreadPoolExecutor(10, 10, 0L, TimeUnit.MILLISECONDS, + new LinkedBlockingQueue(1024), threadFactory, new ThreadPoolExecutor.CallerRunsPolicy()); + + succeedRows.getAndSet(0); + failedRows.getAndSet(0); + + ots = new AsyncClient(serviceSettings.getOTSEndpoint(), + serviceSettings.getOTSAccessKeyId(), serviceSettings.getOTSAccessKeySecret(), + serviceSettings.getOTSInstanceName()); + + try { + DeleteTableRequest request = new DeleteTableRequest(TABLE_NAME); + Future future = ots.deleteTable(request, null); + future.get(); + } catch (Exception e) { + // pass + } + + createTable(ots); + Thread.sleep(3000); + } + + @After + public void after() { + threadPool.shutdown(); + ots.shutdown(); + } + + public static DefaultTableStoreWriter createWriter(WriterConfig config, String tableName) { + TableStoreCallback callback = new TableStoreCallback() { + @Override + public void onCompleted(RowChange rowChange, RowWriteResult cc) { + succeedRows.incrementAndGet(); + } + + @Override + public void onFailed(RowChange rowChange, Exception ex) { + ex.printStackTrace(); + failedRows.incrementAndGet(); + } + }; + + RetryStrategy retryStrategy = new CertainCodeRetryStrategy(1, TimeUnit.SECONDS); + ClientConfiguration configuration = new ClientConfiguration(); + configuration.setRetryStrategy(retryStrategy); + + DefaultCredentials credentials = new DefaultCredentials(serviceSettings.getOTSAccessKeyId(), serviceSettings.getOTSAccessKeySecret()); + DefaultTableStoreWriter writer = new DefaultTableStoreWriter( + serviceSettings.getOTSEndpoint(), + credentials, + serviceSettings.getOTSInstanceName(), + tableName, config, configuration, callback); + + return writer; + } + + @Test + public void testWriteSameRow() throws Exception { + final WriterConfig config = new WriterConfig(); + config.setConcurrency(concurrency); + config.setBufferSize(queueSize); + config.setWriteMode(writeMode); + config.setBucketCount(bucketCount); + config.setFlushInterval(1000000); + config.setBatchRequestType(BatchRequestType.BULK_IMPORT); + + DefaultTableStoreWriter writer = createWriter(config, TABLE_NAME); + + try { + for (int i = 0; i < 100; i++) { + PrimaryKey pk = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("pk_0", PrimaryKeyValue.fromLong(i)) + .addPrimaryKeyColumn("pk_1", PrimaryKeyValue.fromString("pk_" + 0)) + .addPrimaryKeyColumn("pk_2", PrimaryKeyValue.fromLong(0)).build(); + + RowUpdateChange rowChange = new RowUpdateChange(TABLE_NAME, pk); + for (int j = 0; j < columnsCount; j++) { + rowChange.put("column_" + j, ColumnValue.fromString(strValue)); + } + + writer.addRowChange(rowChange); + } + + writer.flush(); + + } finally { + writer.close(); + } + + assertEquals(succeedRows.get(), 100); + assertEquals(writer.getWriterStatistics().getTotalSucceedRowsCount(), 100); + assertEquals(writer.getWriterStatistics().getTotalFailedRowsCount(), 0); + assertEquals(writer.getWriterStatistics().getTotalRowsCount(), 100); + assertEquals(writer.getWriterStatistics().getTotalSingleRowRequestCount(), 0); + } + + @Test + public void testCloseWriter() throws Exception { + final WriterConfig config = new WriterConfig(); + config.setConcurrency(concurrency); + config.setBufferSize(queueSize); + config.setFlushInterval(1000000); + config.setWriteMode(writeMode); + config.setBucketCount(bucketCount); + + DefaultTableStoreWriter writer = createWriter(config, TABLE_NAME); + + PrimaryKey pk = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("pk_0", PrimaryKeyValue.fromLong(0)) + .addPrimaryKeyColumn("pk_1", PrimaryKeyValue.fromString("pk_" + 0)) + .addPrimaryKeyColumn("pk_2", PrimaryKeyValue.fromLong(0)).build(); + + RowUpdateChange rowChange = new RowUpdateChange(TABLE_NAME, pk); + for (int j = 0; j < columnsCount; j++) { + rowChange.put("column_" + j, ColumnValue.fromString(strValue)); + } + + writer.addRowChange(rowChange); + writer.close(); + + try { + writer.addRowChange(rowChange); + assertTrue(false); + } catch (ClientException e) { + assertEquals(e.getMessage(), "The writer has been closed."); + } + + try { + writer.close(); + assertTrue(false); + } catch (ClientException e) { + assertEquals(e.getMessage(), "The writer has already been closed."); + } + + try { + writer.flush(); + assertTrue(false); + } catch (ClientException e) { + assertEquals(e.getMessage(), "The writer has been closed."); + } + } +} diff --git a/src/test/java/com/alicloud/openservices/tablestore/writer/TestWriterWithGlobaIndex.java b/src/test/java/com/alicloud/openservices/tablestore/writer/TestWriterWithGlobaIndex.java new file mode 100644 index 0000000..c9ed387 --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/writer/TestWriterWithGlobaIndex.java @@ -0,0 +1,263 @@ +package com.alicloud.openservices.tablestore.writer; + +import com.alicloud.openservices.tablestore.*; +import com.alicloud.openservices.tablestore.common.ServiceSettings; +import com.alicloud.openservices.tablestore.core.auth.DefaultCredentials; +import com.alicloud.openservices.tablestore.model.*; +import com.alicloud.openservices.tablestore.writer.enums.WriteMode; +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +import java.util.concurrent.Future; +import java.util.concurrent.atomic.AtomicLong; + +import static org.junit.Assert.*; + +public class TestWriterWithGlobaIndex { + private static final String TABLE_NAME_WITH_INDEX = "WriterTestWithIndex"; + private static final String TABLE_GLOBAL_INDEX = "WriterTestGlobalIndex"; + private static final String TABLE_NAME_NO_INDEX = "WriterTestNoIndex"; + private static ServiceSettings serviceSettings = ServiceSettings.load(); + private static AtomicLong succeedRows = new AtomicLong(); + private static AtomicLong failedRows = new AtomicLong(); + private static long rowsCount = 10000; + private static long columnsCount = 10; + private static int concurrency = 100; + private static int queueSize = 1024; + private static int bucketCount = 100; + private static WriteMode writeMode = WriteMode.SEQUENTIAL; + private AsyncClientInterface ots; + private final String strValue = "0123456789"; + + public void createTable(AsyncClientInterface ots) throws Exception { + TableMeta tableMeta = new TableMeta(TABLE_NAME_NO_INDEX); + tableMeta.addPrimaryKeyColumn("pk0", PrimaryKeyType.INTEGER); + tableMeta.addPrimaryKeyColumn("pk1", PrimaryKeyType.STRING); + tableMeta.addPrimaryKeyColumn("pk2", PrimaryKeyType.INTEGER); + TableOptions tableOptions = new TableOptions(); + tableOptions.setMaxVersions(1); + tableOptions.setTimeToLive(-1); + CreateTableRequest request = new CreateTableRequest(tableMeta, tableOptions); + request.setReservedThroughput(new ReservedThroughput(new CapacityUnit(0, 0))); + request.setTableOptions(tableOptions); + + Future future = ots.createTable(request, null); + future.get(); + } + + public void createTableWithIndex(AsyncClientInterface ots) throws Exception { + TableMeta tableMeta = new TableMeta(TABLE_NAME_WITH_INDEX); + tableMeta.addPrimaryKeyColumn("pk0", PrimaryKeyType.INTEGER); + tableMeta.addPrimaryKeyColumn("pk1", PrimaryKeyType.STRING); + tableMeta.addPrimaryKeyColumn("pk2", PrimaryKeyType.INTEGER); + TableOptions tableOptions = new TableOptions(); + tableOptions.setMaxVersions(1); + tableOptions.setTimeToLive(-1); + CreateTableRequest request = new CreateTableRequest(tableMeta, tableOptions); + + IndexMeta indexMeta = new IndexMeta(TABLE_GLOBAL_INDEX); + indexMeta.addPrimaryKeyColumn("pk2"); + indexMeta.addPrimaryKeyColumn("pk1"); + indexMeta.addPrimaryKeyColumn("pk0"); + + request.addIndex(indexMeta); + + request.setReservedThroughput(new ReservedThroughput(new CapacityUnit(0, 0))); + request.setTableOptions(tableOptions); + + Future future = ots.createTable(request, null); + future.get(); + } + + + @Before + public void setUp() throws Exception { + succeedRows.getAndSet(0); + failedRows.getAndSet(0); + + ots = new AsyncClient(serviceSettings.getOTSEndpoint(), + serviceSettings.getOTSAccessKeyId(), serviceSettings.getOTSAccessKeySecret(), + serviceSettings.getOTSInstanceName()); + + try { + DeleteIndexRequest request = new DeleteIndexRequest(TABLE_NAME_WITH_INDEX, TABLE_GLOBAL_INDEX); + Future future = ots.deleteIndex(request, null); + future.get(); + } catch (Exception e) { + // pass + } + + try { + DeleteTableRequest request = new DeleteTableRequest(TABLE_NAME_WITH_INDEX); + Future future = ots.deleteTable(request, null); + future.get(); + } catch (Exception e) { + // pass + } + + + try { + DeleteTableRequest request = new DeleteTableRequest(TABLE_NAME_NO_INDEX); + Future future = ots.deleteTable(request, null); + future.get(); + } catch (Exception e) { + // pass + } + + createTable(ots); + createTableWithIndex(ots); + Thread.sleep(3000); + } + + @After + public void after() { + ots.shutdown(); + } + + public static DefaultTableStoreWriter createWriter(WriterConfig config, String tableName) { + TableStoreCallback callback = new TableStoreCallback() { + @Override + public void onCompleted(RowChange rowChange, RowWriteResult cc) { + succeedRows.incrementAndGet(); + } + + @Override + public void onFailed(RowChange rowChange, Exception ex) { + ex.printStackTrace(); + failedRows.incrementAndGet(); + } + }; + + DefaultCredentials credentials = new DefaultCredentials(serviceSettings.getOTSAccessKeyId(), serviceSettings.getOTSAccessKeySecret()); + DefaultTableStoreWriter writer = new DefaultTableStoreWriter( + serviceSettings.getOTSEndpoint(), + credentials, + serviceSettings.getOTSInstanceName(), + tableName, config, callback); + + return writer; + } + + @Test + public void testNotAllowDuplicatedRow() throws Exception { + int rowCount = 101; + final WriterConfig config = new WriterConfig(); + config.setConcurrency(concurrency); + config.setBufferSize(queueSize); + config.setFlushInterval(1000000); + config.setMaxAttrColumnSize(3 * 1024 * 1024); // max attribute length set to 3MB + config.setMaxBatchSize(4 * 1024 * 1024); + config.setWriteMode(writeMode); + config.setBucketCount(1); + config.setAllowDuplicatedRowInBatchRequest(true); + DefaultTableStoreWriter writer = createWriter(config, TABLE_NAME_WITH_INDEX); + + try { + for (int i = 0; i < rowCount; i++) { + PrimaryKey pk = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("pk0", PrimaryKeyValue.fromLong(0)) + .addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromString("pk_1")) + .addPrimaryKeyColumn("pk2", PrimaryKeyValue.fromLong(2)) + .build(); + + RowUpdateChange rowChange = new RowUpdateChange(TABLE_NAME_WITH_INDEX, pk); + for (int j = 0; j < columnsCount; j++) { + rowChange.put("column_" + j, ColumnValue.fromString(strValue)); + } + + writer.addRowChange(rowChange); + } + + writer.flush(); + + } finally { + writer.close(); + } + + assertEquals(writer.getWriterStatistics().getTotalRowsCount(), rowCount); + assertEquals(writer.getWriterStatistics().getTotalSucceedRowsCount(), rowCount); + assertEquals(writer.getWriterStatistics().getTotalSingleRowRequestCount(), 0); + assertEquals(writer.getWriterStatistics().getTotalRequestCount(), rowCount); + + } + + @Test + public void testAllowDuplicatedRow() throws Exception { + int rowCount = 101; + final WriterConfig config = new WriterConfig(); + config.setConcurrency(concurrency); + config.setBufferSize(queueSize); + config.setFlushInterval(1000000); + config.setMaxAttrColumnSize(3 * 1024 * 1024); // max attribute length set to 3MB + config.setMaxBatchSize(4 * 1024 * 1024); + config.setWriteMode(writeMode); + config.setBucketCount(1); + DefaultTableStoreWriter writer = createWriter(config, TABLE_NAME_NO_INDEX); + + try { + for (int i = 0; i < rowCount; i++) { + PrimaryKey pk = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("pk0", PrimaryKeyValue.fromLong(0)) + .addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromString("pk_1")) + .addPrimaryKeyColumn("pk2", PrimaryKeyValue.fromLong(2)) + .build(); + + RowUpdateChange rowChange = new RowUpdateChange(TABLE_NAME_NO_INDEX, pk); + for (int j = 0; j < columnsCount; j++) { + rowChange.put("column_" + j, ColumnValue.fromString(strValue)); + } + + writer.addRowChange(rowChange); + } + + writer.flush(); + + } finally { + writer.close(); + } + + assertEquals(writer.getWriterStatistics().getTotalRowsCount(), rowCount); + assertEquals(writer.getWriterStatistics().getTotalSucceedRowsCount(), rowCount); + assertEquals(writer.getWriterStatistics().getTotalSingleRowRequestCount(), 0); + assertEquals(writer.getWriterStatistics().getTotalRequestCount(), 1); + + } + + @Test + public void testNotAllowDuplicatedRowAlthoughNoGlobalIndex() throws Exception { + int rowCount = 101; + final WriterConfig config = new WriterConfig(); + config.setAllowDuplicatedRowInBatchRequest(false); + DefaultTableStoreWriter writer = createWriter(config, TABLE_NAME_NO_INDEX); + + try { + for (int i = 0; i < rowCount; i++) { + PrimaryKey pk = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("pk0", PrimaryKeyValue.fromLong(0)) + .addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromString("pk_1")) + .addPrimaryKeyColumn("pk2", PrimaryKeyValue.fromLong(2)) + .build(); + + RowUpdateChange rowChange = new RowUpdateChange(TABLE_NAME_NO_INDEX, pk); + for (int j = 0; j < columnsCount; j++) { + rowChange.put("column_" + j, ColumnValue.fromString(strValue)); + } + + writer.addRowChange(rowChange); + } + + writer.flush(); + + } finally { + writer.close(); + } + + assertEquals(writer.getWriterStatistics().getTotalRowsCount(), rowCount); + assertEquals(writer.getWriterStatistics().getTotalSucceedRowsCount(), rowCount); + assertEquals(writer.getWriterStatistics().getTotalSingleRowRequestCount(), 0); + assertEquals(writer.getWriterStatistics().getTotalRequestCount(), rowCount); + + } +} diff --git a/src/test/java/com/alicloud/openservices/tablestore/writer/MultiPMultiC.java b/src/test/java/com/alicloud/openservices/tablestore/writer/unittest/MultiPMultiC.java similarity index 98% rename from src/test/java/com/alicloud/openservices/tablestore/writer/MultiPMultiC.java rename to src/test/java/com/alicloud/openservices/tablestore/writer/unittest/MultiPMultiC.java index 36cc615..9c5c738 100644 --- a/src/test/java/com/alicloud/openservices/tablestore/writer/MultiPMultiC.java +++ b/src/test/java/com/alicloud/openservices/tablestore/writer/unittest/MultiPMultiC.java @@ -1,4 +1,4 @@ -package com.alicloud.openservices.tablestore.writer; +package com.alicloud.openservices.tablestore.writer.unittest; import com.lmax.disruptor.*; import com.lmax.disruptor.dsl.Disruptor; diff --git a/src/test/java/com/alicloud/openservices/tablestore/writer/OnePOneC.java b/src/test/java/com/alicloud/openservices/tablestore/writer/unittest/OnePOneC.java similarity index 98% rename from src/test/java/com/alicloud/openservices/tablestore/writer/OnePOneC.java rename to src/test/java/com/alicloud/openservices/tablestore/writer/unittest/OnePOneC.java index 229d1df..da5fe92 100644 --- a/src/test/java/com/alicloud/openservices/tablestore/writer/OnePOneC.java +++ b/src/test/java/com/alicloud/openservices/tablestore/writer/unittest/OnePOneC.java @@ -1,4 +1,4 @@ -package com.alicloud.openservices.tablestore.writer; +package com.alicloud.openservices.tablestore.writer.unittest; import com.lmax.disruptor.EventFactory; import com.lmax.disruptor.EventHandler; diff --git a/src/test/java/com/alicloud/openservices/tablestore/writer/RingBufferPerf.java b/src/test/java/com/alicloud/openservices/tablestore/writer/unittest/RingBufferPerf.java similarity index 98% rename from src/test/java/com/alicloud/openservices/tablestore/writer/RingBufferPerf.java rename to src/test/java/com/alicloud/openservices/tablestore/writer/unittest/RingBufferPerf.java index 72cedd8..a58771b 100644 --- a/src/test/java/com/alicloud/openservices/tablestore/writer/RingBufferPerf.java +++ b/src/test/java/com/alicloud/openservices/tablestore/writer/unittest/RingBufferPerf.java @@ -1,4 +1,4 @@ -package com.alicloud.openservices.tablestore.writer; +package com.alicloud.openservices.tablestore.writer.unittest; import com.lmax.disruptor.EventFactory; import com.lmax.disruptor.EventHandler; diff --git a/src/test/java/com/alicloud/openservices/tablestore/writer/unittest/TestDispatcher.java b/src/test/java/com/alicloud/openservices/tablestore/writer/unittest/TestDispatcher.java new file mode 100644 index 0000000..699430e --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/writer/unittest/TestDispatcher.java @@ -0,0 +1,100 @@ +package com.alicloud.openservices.tablestore.writer.unittest; + +import com.alicloud.openservices.tablestore.model.*; +import com.alicloud.openservices.tablestore.writer.dispatch.HashPartitionKeyDispatcher; +import com.alicloud.openservices.tablestore.writer.dispatch.HashPrimaryKeyDispatcher; +import com.alicloud.openservices.tablestore.writer.dispatch.RoundRobinDispatcher; +import java.util.Arrays; +import org.junit.Assert; +import org.junit.Test; + +import java.util.concurrent.atomic.AtomicLong; + + +public class TestDispatcher { + static final int BUCKET_COUNT = (int) (Math.random() * 100); + static final int TOTAL_PRIMARYKEY = 1000000; + + @Test + public void testHashPrimaryKeyDispatcher() { + + HashPrimaryKeyDispatcher dispatcher = new HashPrimaryKeyDispatcher(BUCKET_COUNT); + long start = System.currentTimeMillis(); + + for (int i = 0; i < TOTAL_PRIMARYKEY; i++) { + PrimaryKey primaryKey = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(i)) + .addPrimaryKeyColumn("pk2", PrimaryKeyValue.fromString("String_" + i)) + .build(); + RowChange rowChange = new RowPutChange("name", primaryKey); + dispatcher.getDispatchIndex(rowChange); + } + System.out.println("HashPrimaryKeyDispatcher Cost: " + (System.currentTimeMillis() - start)); + + + System.out.println("Bucket Count: " + Arrays.asList(dispatcher.getBucketDispatchRowCount())); + Assert.assertEquals(dispatcher.getBucketDispatchRowCount().length, BUCKET_COUNT); + + int total = 0; + for (AtomicLong bucket : dispatcher.getBucketDispatchRowCount()) { + total += bucket.get(); + } + Assert.assertEquals(total, TOTAL_PRIMARYKEY); + } + + @Test + public void testHashPartitionKeyDispatcher() { + + HashPartitionKeyDispatcher dispatcher = new HashPartitionKeyDispatcher(BUCKET_COUNT); + long start = System.currentTimeMillis(); + + for (int i = 0; i < TOTAL_PRIMARYKEY; i++) { + PrimaryKey primaryKey = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(i)) + .addPrimaryKeyColumn("pk2", PrimaryKeyValue.fromString("String_" + i)) + .build(); + RowChange rowChange = new RowPutChange("name", primaryKey); + dispatcher.getDispatchIndex(rowChange); + } + System.out.println("HashPartitionKeyDispatcher Cost: " + (System.currentTimeMillis() - start)); + + + System.out.println("Bucket Count: " + Arrays.asList(dispatcher.getBucketDispatchRowCount())); + Assert.assertEquals(dispatcher.getBucketDispatchRowCount().length, BUCKET_COUNT); + + int total = 0; + for (AtomicLong bucket : dispatcher.getBucketDispatchRowCount()) { + total += bucket.get(); + } + Assert.assertEquals(total, TOTAL_PRIMARYKEY); + } + + + @Test + public void testLoopDispatcher() { + + RoundRobinDispatcher dispatcher = new RoundRobinDispatcher(BUCKET_COUNT); + long start = System.currentTimeMillis(); + + for (int i = 0; i < TOTAL_PRIMARYKEY; i++) { + PrimaryKey primaryKey = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(i)) + .addPrimaryKeyColumn("pk2", PrimaryKeyValue.fromString("String_" + i)) + .build(); + RowChange rowChange = new RowPutChange("name", primaryKey); + dispatcher.getDispatchIndex(rowChange); + } + System.out.println("RoundRobinDispatcher Cost: " + (System.currentTimeMillis() - start)); + + + System.out.println("Bucket Count: " + Arrays.asList(dispatcher.getBucketDispatchRowCount())); + Assert.assertEquals(dispatcher.getBucketDispatchRowCount().length, BUCKET_COUNT); + + int total = 0; + for (AtomicLong bucket : dispatcher.getBucketDispatchRowCount()) { + total += bucket.get(); + } + Assert.assertEquals(total, TOTAL_PRIMARYKEY); + } + +} diff --git a/src/test/java/com/alicloud/openservices/tablestore/writer/unittest/TestGroup.java b/src/test/java/com/alicloud/openservices/tablestore/writer/unittest/TestGroup.java new file mode 100644 index 0000000..90cb180 --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/writer/unittest/TestGroup.java @@ -0,0 +1,177 @@ +package com.alicloud.openservices.tablestore.writer.unittest; + + +import com.alicloud.openservices.tablestore.model.PrimaryKeyBuilder; +import com.alicloud.openservices.tablestore.model.PrimaryKeyValue; +import com.alicloud.openservices.tablestore.model.RowDeleteChange; +import com.alicloud.openservices.tablestore.model.RowPutChange; +import com.alicloud.openservices.tablestore.writer.Group; +import com.alicloud.openservices.tablestore.writer.WriterResult; +import org.junit.Assert; +import org.junit.Test; + +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; + +public class TestGroup { + + @Test + public void testGroupOnComplete() { + int groupSize = 200; + String exceptionMessage = "mock exception"; + + Group group = new Group(groupSize); + for (int i = 0; i < groupSize; i++) { + PrimaryKeyBuilder builder = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(i)); + if (i % 2 == 0) { + group.failedOneRow(new RowPutChange("tableName", builder.build()), new Exception(exceptionMessage)); + } else { + group.succeedOneRow(new RowDeleteChange("tableName", builder.build())); + } + + } + + try { + WriterResult result = group.getFuture().get(); + + Assert.assertTrue(result.isAllFinished()); + Assert.assertFalse(result.isAllSucceed()); + Assert.assertEquals(result.getTotalCount(), groupSize); + + Assert.assertEquals(result.getSucceedRows().size(), groupSize / 2); + for (WriterResult.RowChangeStatus status : result.getSucceedRows()) { + Assert.assertTrue(status.isSucceed()); + Assert.assertNull(status.getException()); + Assert.assertNotNull(status.getRowChange()); + } + + Assert.assertEquals(result.getFailedRows().size(), groupSize / 2); + for (WriterResult.RowChangeStatus status : result.getFailedRows()) { + Assert.assertFalse(status.isSucceed()); + Assert.assertNotNull(status.getException()); + Assert.assertEquals(status.getException().getMessage(), exceptionMessage); + } + + } catch (Exception e) { + Assert.fail(); + } + } + + @Test + public void testGroupOnCompleteWithDirtyRow() { + int groupSize = 200; + int dirtyIndex = 100; + String exceptionMessage = "DirtyRow"; + + Group group = new Group(groupSize); + for (int i = 0; i < groupSize; i++) { + PrimaryKeyBuilder builder = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(i)); + if (i == dirtyIndex) { + group.failedOneRow(new RowPutChange("tableName", builder.build()), new Exception(exceptionMessage)); + } else { + group.succeedOneRow(new RowDeleteChange("tableName", builder.build())); + } + + } + + try { + WriterResult result = group.getFuture().get(); + + Assert.assertTrue(result.isAllFinished()); + Assert.assertFalse(result.isAllSucceed()); + Assert.assertEquals(result.getTotalCount(), groupSize); + + Assert.assertEquals(result.getFailedRows().size(), 1); + for (WriterResult.RowChangeStatus status : result.getFailedRows()) { + Assert.assertFalse(status.isSucceed()); + Assert.assertNotNull(status.getException()); + Assert.assertEquals(status.getException().getMessage(), exceptionMessage); + } + + Assert.assertEquals(result.getSucceedRows().size(), groupSize - 1); + for (WriterResult.RowChangeStatus status : result.getSucceedRows()) { + Assert.assertTrue(status.isSucceed()); + Assert.assertNull(status.getException()); + Assert.assertNotSame(status.getRowChange().getPrimaryKey().getPrimaryKeyColumn(0).getValue().asLong(), dirtyIndex); + } + + } catch (Exception e) { + Assert.fail(); + } + } + + + @Test + public void testGroupFinishMore() { + int groupSize = 200; + String exceptionMessage = "mock exception"; + + Group group = new Group(groupSize); + for (int i = 0; i < groupSize; i++) { + PrimaryKeyBuilder builder = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(i)); + if (i % 3 == 0) { + group.failedOneRow(new RowPutChange("tableName", builder.build()), new Exception(exceptionMessage)); + } else { + group.succeedOneRow(new RowDeleteChange("tableName", builder.build())); + } + + } + + try { + group.succeedOneRow(null); + Assert.fail(); + } catch (IllegalStateException e) { + Assert.assertEquals(e.getMessage().split("] ")[1], "WriterResult shouldn't finish more rows than total count"); + Assert.assertEquals(e.getMessage().split("] ")[0], "[" + group.getGroupId()); + } catch (Exception e) { + Assert.fail(); + } + } + + @Test + public void testGroupFinishLess() { + int groupSize = 200; + long timeoutValue = 901111; + String exceptionMessage = "Mock Timeout"; + + Group group = new Group(groupSize); + for (int i = 0; i < groupSize - 1; i++) { + PrimaryKeyBuilder builder = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(i)); + + group.succeedOneRow(new RowDeleteChange("tableName", builder.build())); + } + + try { + group.getFuture().get(1000, TimeUnit.MILLISECONDS); + Assert.fail(); + } catch (TimeoutException e) { + e.printStackTrace(); + } catch (Exception e) { + Assert.fail(); + } + + PrimaryKeyBuilder builder = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(timeoutValue)); + group.failedOneRow(new RowDeleteChange("tableName", builder.build()), new Exception(exceptionMessage)); + + try { + WriterResult result = group.getFuture().get(); + Assert.assertTrue(result.isAllFinished()); + Assert.assertFalse(result.isAllSucceed()); + + Assert.assertEquals(result.getFailedRows().size(), 1); + for (WriterResult.RowChangeStatus status : result.getFailedRows()) { + Assert.assertFalse(status.isSucceed()); + Assert.assertEquals(status.getException().getMessage(), exceptionMessage); + Assert.assertEquals(status.getRowChange().getPrimaryKey().getPrimaryKeyColumn(0).getValue().asLong(), timeoutValue); + } + } catch (Exception e) { + Assert.fail(); + } + } + +} diff --git a/src/test/java/com/alicloud/openservices/tablestore/writer/unittest/TestWriterConfig.java b/src/test/java/com/alicloud/openservices/tablestore/writer/unittest/TestWriterConfig.java new file mode 100644 index 0000000..b85ac7f --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/writer/unittest/TestWriterConfig.java @@ -0,0 +1,129 @@ +package com.alicloud.openservices.tablestore.writer.unittest; + +import com.alicloud.openservices.tablestore.writer.WriterConfig; +import com.alicloud.openservices.tablestore.writer.enums.BatchRequestType; +import com.alicloud.openservices.tablestore.writer.enums.DispatchMode; +import com.alicloud.openservices.tablestore.writer.enums.WriteMode; +import com.alicloud.openservices.tablestore.writer.enums.WriterRetryStrategy; +import org.junit.Assert; +import org.junit.Test; + + +public class TestWriterConfig { + @Test + public void testParameters() { + WriterConfig config = new WriterConfig(); + + config.setFlushInterval(100000); + config.setLogInterval(10000); + config.setCallbackThreadCount(100); + config.setCallbackThreadPoolQueueSize(4096); + config.setBucketCount(256); + config.setBufferSize(1024); + config.setConcurrency(100); + config.setMaxAttrColumnSize(20); + config.setMaxBatchSize(200); + config.setMaxBatchRowsCount(200); + config.setMaxColumnsCount(20); + config.setMaxPKColumnSize(3096); + config.setClientMaxConnections(900); + + config.setWriteMode(WriteMode.PARALLEL); + config.setWriterRetryStrategy(WriterRetryStrategy.CERTAIN_ERROR_CODE_NOT_RETRY); + config.setDispatchMode(DispatchMode.HASH_PARTITION_KEY); + config.setBatchRequestType(BatchRequestType.BULK_IMPORT); + + config.setEnableSchemaCheck(true); + config.setAllowDuplicatedRowInBatchRequest(false); + + + Assert.assertEquals(100000, config.getFlushInterval()); + Assert.assertEquals(10000, config.getLogInterval()); + Assert.assertEquals(100, config.getCallbackThreadCount()); + Assert.assertEquals(4096, config.getCallbackThreadPoolQueueSize()); + Assert.assertEquals(256, config.getBucketCount()); + Assert.assertEquals(1024, config.getBufferSize()); + Assert.assertEquals(100, config.getConcurrency()); + Assert.assertEquals(20, config.getMaxAttrColumnSize()); + Assert.assertEquals(200, config.getMaxBatchSize()); + Assert.assertEquals(200, config.getMaxBatchRowsCount()); + Assert.assertEquals(20, config.getMaxColumnsCount()); + Assert.assertEquals(3096, config.getMaxPKColumnSize()); + Assert.assertEquals(900, config.getClientMaxConnections()); + + Assert.assertEquals(WriteMode.PARALLEL, config.getWriteMode()); + Assert.assertEquals(WriterRetryStrategy.CERTAIN_ERROR_CODE_NOT_RETRY, config.getWriterRetryStrategy()); + Assert.assertEquals(DispatchMode.HASH_PARTITION_KEY, config.getDispatchMode()); + Assert.assertEquals(BatchRequestType.BULK_IMPORT, config.getBatchRequestType()); + + + Assert.assertTrue(config.isEnableSchemaCheck()); + Assert.assertFalse(config.isAllowDuplicatedRowInBatchRequest()); + + } + + @Test + public void testParameterExceptions() { + WriterConfig config = new WriterConfig(); + + try { + config.setFlushInterval(0); + Assert.fail(); + } catch (Exception e) {} + + try { + config.setLogInterval(0); + Assert.fail(); + } catch (Exception e) {} + + try { + config.setCallbackThreadCount(0); + Assert.fail(); + } catch (Exception e) {} + + try { + config.setCallbackThreadPoolQueueSize(0); + Assert.fail(); + } catch (Exception e) {} + + try { + config.setBucketCount(0); + Assert.fail(); + } catch (Exception e) {} + + try { + config.setBufferSize(0); + Assert.fail(); + } catch (Exception e) {} + + try { + config.setConcurrency(0); + Assert.fail(); + } catch (Exception e) {} + + try { + config.setMaxAttrColumnSize(0); + Assert.fail(); + } catch (Exception e) {} + + try { + config.setMaxBatchSize(0); + Assert.fail(); + } catch (Exception e) {} + + try { + config.setMaxBatchRowsCount(0); + Assert.fail(); + } catch (Exception e) {} + + try { + config.setMaxColumnsCount(0); + Assert.fail(); + } catch (Exception e) {} + + try { + config.setMaxPKColumnSize(0); + Assert.fail(); + } catch (Exception e) {} + } +} diff --git a/src/test/java/com/alicloud/openservices/tablestore/writer/unittest/TestWriterResult.java b/src/test/java/com/alicloud/openservices/tablestore/writer/unittest/TestWriterResult.java new file mode 100644 index 0000000..8c9a2c4 --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/writer/unittest/TestWriterResult.java @@ -0,0 +1,47 @@ +package com.alicloud.openservices.tablestore.writer.unittest; + +import com.alicloud.openservices.tablestore.model.*; +import com.alicloud.openservices.tablestore.writer.RowWriteResult; +import org.junit.Assert; +import org.junit.Test; + +import java.util.Arrays; + + +public class TestWriterResult { + @Test + public void testWriterResult() { + + CapacityUnit capacityUnit = new CapacityUnit(); + capacityUnit.setReadCapacityUnit(1); + capacityUnit.setWriteCapacityUnit(0); + ConsumedCapacity consumedCapacity = new ConsumedCapacity(capacityUnit); + + + PrimaryKey primaryKey = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("pk1", PrimaryKeyValue.fromLong(100)) + .addPrimaryKeyColumn("pk2", PrimaryKeyValue.fromString("pk2")) + .build(); + Row row = new Row(primaryKey, Arrays.asList(new Column("col1", ColumnValue.fromDouble(1L)))); + + RowWriteResult result = new RowWriteResult(consumedCapacity, row); + + Assert.assertEquals(1, result.getConsumedCapacity().getCapacityUnit().getReadCapacityUnit()); + Assert.assertEquals(0, result.getConsumedCapacity().getCapacityUnit().getWriteCapacityUnit()); + Assert.assertEquals(primaryKey, result.getRow().getPrimaryKey()); + + + + CapacityUnit newCapacityUnit = new CapacityUnit(); + newCapacityUnit.setReadCapacityUnit(0); + newCapacityUnit.setWriteCapacityUnit(1); + ConsumedCapacity newConsumedCapacity = new ConsumedCapacity(newCapacityUnit); + + result.setConsumedCapacity(newConsumedCapacity); + result.setRow(null); + + Assert.assertEquals(0, result.getConsumedCapacity().getCapacityUnit().getReadCapacityUnit()); + Assert.assertEquals(1, result.getConsumedCapacity().getCapacityUnit().getWriteCapacityUnit()); + Assert.assertNull(result.getRow()); + } +} diff --git a/src/test/java/com/alicloud/openservices/tablestore/writer/unittest/TestWriterRetry.java b/src/test/java/com/alicloud/openservices/tablestore/writer/unittest/TestWriterRetry.java new file mode 100644 index 0000000..dc15b78 --- /dev/null +++ b/src/test/java/com/alicloud/openservices/tablestore/writer/unittest/TestWriterRetry.java @@ -0,0 +1,122 @@ +package com.alicloud.openservices.tablestore.writer.unittest; + + +import com.alicloud.openservices.tablestore.ClientException; +import com.alicloud.openservices.tablestore.PartialResultFailedException; +import com.alicloud.openservices.tablestore.TableStoreException; +import com.alicloud.openservices.tablestore.model.RetryStrategy; +import com.alicloud.openservices.tablestore.writer.retry.CertainCodeNotRetryStrategy; +import com.alicloud.openservices.tablestore.writer.retry.CertainCodeRetryStrategy; +import org.junit.Assert; +import org.junit.Test; + +import java.util.Arrays; +import java.util.List; + +import static com.alicloud.openservices.tablestore.model.OperationNames.OP_BULK_IMPORT; + +public class TestWriterRetry { + + private static String UN_EXPECTED_ERROR_CODE = "UnExpectedErrorCode"; + private List certainRetryCode = Arrays.asList( + "OTSInternalServerError", "OTSRequestTimeout", "OTSPartitionUnavailable", "OTSTableNotReady", + "OTSRowOperationConflict", "OTSTimeout", "OTSServerUnavailable", "OTSServerBusy"); + private List certainNotRetryCode = Arrays.asList( + "OTSParameterInvalid", "OTSConditionCheckFail", "OTSRequestBodyTooLarge", + "OTSInvalidPK", "OTSOutOfColumnCountLimit", "OTSOutOfRowSizeLimit"); + + @Test + public void testCertainCodeRetry() { + RetryStrategy retryStrategy = new CertainCodeRetryStrategy(); + + /** + * 非TableStoreException 不可重试 + * */ + long nextPause = retryStrategy.clone().nextPause(OP_BULK_IMPORT, new Exception()); + Assert.assertEquals(nextPause, 0); + + /** + * ClientException 可重试 + * */ + nextPause = retryStrategy.clone().nextPause(OP_BULK_IMPORT, new ClientException()); + Assert.assertTrue(nextPause > 0); + + /** + * 5XX错误,非PartitionFailed 可重试 + * */ + nextPause = retryStrategy.clone().nextPause(OP_BULK_IMPORT, new TableStoreException("message", null, UN_EXPECTED_ERROR_CODE, null, 501)); + Assert.assertTrue(nextPause > 0); + + /** + * PartialResultFailedException,且每行都可重试 整体可重试 + * + * */ + PartialResultFailedException exception = new PartialResultFailedException(null, "requestId", null); + for (String errorCode : certainRetryCode) { + exception.addError(new TableStoreException("", errorCode)); + } + nextPause = retryStrategy.clone().nextPause(OP_BULK_IMPORT, exception); + Assert.assertTrue(nextPause > 0); + + /** + * PartialResultFailedException,部分行不可重试 整体不可重试 + * + * */ + exception.addError(new TableStoreException("", UN_EXPECTED_ERROR_CODE)); + nextPause = retryStrategy.clone().nextPause(OP_BULK_IMPORT, exception); + Assert.assertTrue(nextPause == 0); + + } + + @Test + public void testCertainCodeNotRetry() { + RetryStrategy retryStrategy = new CertainCodeNotRetryStrategy(); + + /** + * 非TableStoreException 可重试 + * */ + long nextPause = retryStrategy.clone().nextPause(OP_BULK_IMPORT, new Exception()); + Assert.assertEquals(nextPause, 0); + + /** + * ClientException 可重试 + * */ + nextPause = retryStrategy.clone().nextPause(OP_BULK_IMPORT, new ClientException()); + Assert.assertTrue(nextPause > 0); + + /** + * 5XX错误 可重试 + * */ + nextPause = retryStrategy.clone().nextPause(OP_BULK_IMPORT, new TableStoreException("message", null, UN_EXPECTED_ERROR_CODE, null, 501)); + Assert.assertTrue(nextPause > 0); + + /** + * 非5XX,非不重试错误码 可重试 + * */ + nextPause = retryStrategy.clone().nextPause(OP_BULK_IMPORT, new TableStoreException("message", null, UN_EXPECTED_ERROR_CODE, null, 400)); + Assert.assertTrue(nextPause > 0); + + /** + * PartialResultFailedException,每行都可重试 整体可重试 + * + * */ + PartialResultFailedException exception = new PartialResultFailedException(null, "requestId", null); + for (String errorCode : certainRetryCode) { + exception.addError(new TableStoreException("", errorCode)); + } + exception.addError(new TableStoreException("", UN_EXPECTED_ERROR_CODE)); + nextPause = retryStrategy.clone().nextPause(OP_BULK_IMPORT, exception); + Assert.assertTrue(nextPause > 0); + + /** + * PartialResultFailedException,部分行不可重试 整体不可重试 + * + * */ + for (String errorCode : certainNotRetryCode) { + exception.addError(new TableStoreException("", errorCode)); + } + nextPause = retryStrategy.clone().nextPause(OP_BULK_IMPORT, exception); + Assert.assertTrue(nextPause == 0); + + } +} diff --git a/src/test/java/examples/DataOperationSample.java b/src/test/java/examples/DataOperationSample.java index 7c3bf1b..b1a88c2 100644 --- a/src/test/java/examples/DataOperationSample.java +++ b/src/test/java/examples/DataOperationSample.java @@ -4,11 +4,15 @@ import com.alicloud.openservices.tablestore.SyncClient; import com.alicloud.openservices.tablestore.TableStoreException; import com.alicloud.openservices.tablestore.model.*; +import com.alicloud.openservices.tablestore.model.BulkExportRequest; import com.alicloud.openservices.tablestore.model.condition.ColumnCondition; import com.alicloud.openservices.tablestore.model.condition.SingleColumnValueCondition; import com.alicloud.openservices.tablestore.model.filter.SingleColumnValueFilter; +import com.alicloud.openservices.tablestore.model.tunnel.BulkExportQueryCriteria; +import java.util.ArrayList; import java.util.Iterator; +import java.util.List; public class DataOperationSample { @@ -413,4 +417,53 @@ private static void getRangeByIterator(SyncClient client, String startPkValue, S } } + private static void bulkImport(SyncClient client, String start, String end){ + // create bulkImportRequest + BulkImportRequest bulkImportRequest = new BulkImportRequest(TABLE_NAME); + + // create rowChanges + List rowChanges = new ArrayList(); + for (Integer i = Integer.valueOf(start); i <= Integer.valueOf(end); i++){ + PrimaryKeyBuilder primaryKeyBuilder = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + primaryKeyBuilder.addPrimaryKeyColumn("pk", PrimaryKeyValue.fromString(String.valueOf(i))); + PrimaryKey primaryKey = primaryKeyBuilder.build(); + RowPutChange rowChange = new RowPutChange(TABLE_NAME,primaryKey); + rowChange.addColumn(new Column("DC1", ColumnValue.fromString(i.toString()))); + rowChange.addColumn(new Column("DC2", ColumnValue.fromString(i.toString()))); + rowChange.addColumn(new Column("DC3", ColumnValue.fromString(i.toString()))); + rowChanges.add(rowChange); + } + + bulkImportRequest.addRowChanges(rowChanges); + // get bulkImportResponse + BulkImportResponse bulkImportResponse = client.bulkImport(bulkImportRequest); + } + + private static void bulkExport(SyncClient client, String start, String end){ + // create startPrimaryKey + PrimaryKeyBuilder startPrimaryKeyBuilder = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + startPrimaryKeyBuilder.addPrimaryKeyColumn("pk", PrimaryKeyValue.fromString(String.valueOf(start))); + PrimaryKey startPrimaryKey = startPrimaryKeyBuilder.build(); + + // create endPrimaryKey + PrimaryKeyBuilder endPrimaryKeyBuilder = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + endPrimaryKeyBuilder.addPrimaryKeyColumn("pk", PrimaryKeyValue.fromString(String.valueOf(end))); + PrimaryKey endPrimaryKey = endPrimaryKeyBuilder.build(); + + // create bulkExportRequest + BulkExportRequest bulkExportRequest = new BulkExportRequest(); + // create bulkExportQueryCriteria + BulkExportQueryCriteria bulkExportQueryCriteria = new BulkExportQueryCriteria(TABLE_NAME); + + bulkExportQueryCriteria.setInclusiveStartPrimaryKey(startPrimaryKey); + bulkExportQueryCriteria.setExclusiveEndPrimaryKey(endPrimaryKey); + bulkExportQueryCriteria.setDataBlockType(DataBlockType.DBT_PLAIN_BUFFER); + bulkExportQueryCriteria.addColumnsToGet("pk"); + bulkExportQueryCriteria.addColumnsToGet("DC1"); + bulkExportQueryCriteria.addColumnsToGet("DC2"); + + bulkExportRequest.setBulkExportQueryCriteria(bulkExportQueryCriteria); + // get bulkExportResponse + BulkExportResponse bulkExportResponse = client.bulkExport(bulkExportRequest); + } } diff --git a/src/test/java/examples/DeliveryOperationSample.java b/src/test/java/examples/DeliveryOperationSample.java new file mode 100644 index 0000000..81a1341 --- /dev/null +++ b/src/test/java/examples/DeliveryOperationSample.java @@ -0,0 +1,93 @@ +package examples; + +import com.alicloud.openservices.tablestore.ClientException; +import com.alicloud.openservices.tablestore.SyncClient; +import com.alicloud.openservices.tablestore.TableStoreException; +import com.alicloud.openservices.tablestore.model.delivery.*; + +public class DeliveryOperationSample { + + public static void main(String[] args) { + final String endPoint = ""; + final String accessId = ""; + final String accessKey = ""; + final String instanceName = ""; + + SyncClient client = new SyncClient(endPoint, accessId, accessKey, instanceName); + try { + createDeliveryTask(client); +// deleteDeliveryTask(client); + describeDeliveryTask(client); + listDeliveryTask(client); + System.out.println("end"); + } catch (TableStoreException e) { + System.err.println("操作失败,详情:" + e.getMessage() + e.getErrorCode() + e.toString()); + System.err.println("Request ID:" + e.getRequestId()); + } catch (ClientException e) { + System.err.println("请求失败,详情:" + e.getMessage()); + } finally { + client.shutdown(); + } + } + + private static void createDeliveryTask(SyncClient client) { + String tableName = "TaskInfo"; + String taskName = "taskTest_29"; + OSSTaskConfig taskConfig = new OSSTaskConfig(); + taskConfig.setOssPrefix("taskTest_02/year=$yyyy/month=$MM"); + taskConfig.setOssBucket("ots-delivery-hz"); + taskConfig.setOssEndpoint("oss-cn-hangzhou.aliyuncs.com"); + taskConfig.setOssStsRole("aliyunotsdeliveryrole"); + //optional + EventColumn eventColumn = new EventColumn("TaskInfo", EventTimeFormat.RFC1123); + taskConfig.setEventTimeColumn(eventColumn); + taskConfig.addParquetSchema(new ParquetSchema("TaskID", "TaskID", DataType.UTF8)); + taskConfig.addParquetSchema(new ParquetSchema("SoftDelete", "SoftDelete", DataType.BOOL)); + taskConfig.addParquetSchema(new ParquetSchema("Config", "Config", DataType.UTF8)); + CreateDeliveryTaskRequest request = new CreateDeliveryTaskRequest(); + request.setTableName(tableName); + request.setTaskName(taskName); + request.setTaskConfig(taskConfig); + request.setTaskType(DeliveryTaskType.BASE_INC); + CreateDeliveryTaskResponse response = client.createDeliveryTask(request); + System.out.println("resquestID: "+ response.getRequestId()); + System.out.println("traceID: " + response.getTraceId()); + System.out.println("create delivery task success"); + } + + private static void deleteDeliveryTask(SyncClient client) { + String tableName = "TaskInfo"; + String taskName = "testTask_29"; + DeleteDeliveryTaskRequest request = new DeleteDeliveryTaskRequest(tableName, taskName); + DeleteDeliveryTaskResponse response = client.deleteDeliveryTask(request); + System.out.println("resquestID: "+ response.getRequestId()); + System.out.println("traceID: " + response.getTraceId()); + System.out.println("delete task delivery success"); + } + + public static void describeDeliveryTask(SyncClient client) { + String tableName = "TaskInfo"; + String taskName = "taskTest_25"; + DescribeDeliveryTaskRequest request = new DescribeDeliveryTaskRequest(tableName, taskName); + DescribeDeliveryTaskResponse response = client.describeDeliveryTask(request); + System.out.println("resquestID: "+ response.getRequestId()); + System.out.println("traceID: " + response.getTraceId()); + System.out.println("OSSconfig: " + response.getTaskConfig()); + System.out.println("TaskSyncStat: " + response.getTaskSyncStat()); + System.out.println("taskType: " + response.getTaskType()); + } + + public static void listDeliveryTask(SyncClient client) { + String tableName = "TaskInfo"; + ListDeliveryTaskRequest request = new ListDeliveryTaskRequest(tableName); + ListDeliveryTaskResponse response = client.listDeliveryTask(request); + System.out.println("resquestID: "+ response.getRequestId()); + System.out.println("traceID: " + response.getTraceId()); + for(DeliveryTaskInfo taskInfo: response.getTaskInfos()) { + System.out.println("tableName: " + taskInfo.getTableName()); + System.out.println("taskName: " + taskInfo.getTaskName()); + System.out.println("taskType: " + taskInfo.getTaskType().toString()); + } + } +} + diff --git a/src/test/java/examples/GlobalIndexSample.java b/src/test/java/examples/GlobalIndexSample.java index 623d230..b239ef1 100644 --- a/src/test/java/examples/GlobalIndexSample.java +++ b/src/test/java/examples/GlobalIndexSample.java @@ -25,6 +25,8 @@ public class GlobalIndexSample { private static final String PRIMARY_KEY_NAME_2 = "pk2"; private static final String DEFINED_COL_NAME_1 = "col1"; private static final String DEFINED_COL_NAME_2 = "col2"; + private static final String ADD_COL_NAME_0 = "c0"; + private static final String ADD_COL_NAME_1 = "c1"; public static void main(String[] args) { final String endPoint = ""; @@ -101,6 +103,23 @@ public static void main(String[] args) { // 从索引表2中读取,验证索引表中的索引已经被删除 scanFromIndex2(client); + // 为表添加预定义列 + addDefCol(client); + // 查看添加预定义列后的表schema + describeTable(client, TABLE_NAME); + try { + Thread.sleep(1 * 1000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + + updateRow(client, pk); + scanFromIndex(client); + // 删除预定义列 + delDefCol(client); + // 查看删除预定义列后的表schema + describeTable(client, TABLE_NAME); + // 删除索引表 deleteIndex(client); @@ -119,6 +138,24 @@ public static void main(String[] args) { client.shutdown(); } + private static void addDefCol(SyncClient client) { + ArrayList defCols = new ArrayList(); + + AddDefinedColumnRequest request = new AddDefinedColumnRequest(); + request.setTableName(TABLE_NAME); + request.addDefinedColumn(ADD_COL_NAME_0, DefinedColumnType.STRING); + request.addDefinedColumn(ADD_COL_NAME_1, DefinedColumnType.STRING); + client.addDefinedColumn(request); + } + + private static void delDefCol(SyncClient client) { + DeleteDefinedColumnRequest request = new DeleteDefinedColumnRequest(); + request.setTableName(TABLE_NAME); + request.addDefinedColumn(ADD_COL_NAME_0); + request.addDefinedColumn(ADD_COL_NAME_1); + client.deleteDefinedColumn(request); + } + private static void createTable(SyncClient client) { TableMeta tableMeta = new TableMeta(TABLE_NAME); tableMeta.addPrimaryKeyColumn(new PrimaryKeySchema(PRIMARY_KEY_NAME_1, PrimaryKeyType.STRING)); diff --git a/src/test/java/examples/SQLQuerySample.java b/src/test/java/examples/SQLQuerySample.java new file mode 100644 index 0000000..4846b9f --- /dev/null +++ b/src/test/java/examples/SQLQuerySample.java @@ -0,0 +1,154 @@ +package examples; + +import com.alicloud.openservices.tablestore.*; +import com.alicloud.openservices.tablestore.core.ErrorCode; +import com.alicloud.openservices.tablestore.model.sql.SQLQueryRequest; +import com.alicloud.openservices.tablestore.model.sql.SQLQueryResponse; +import com.alicloud.openservices.tablestore.model.sql.SQLResultSet; +import com.alicloud.openservices.tablestore.model.sql.SQLRow; +import com.alicloud.openservices.tablestore.model.sql.SQLTableMeta; +import com.alicloud.openservices.tablestore.model.sql.SQLUtils; + +import java.nio.ByteBuffer; +import java.util.List; + +public class SQLQuerySample { + + public static void main(String args[]) { + final String endPoint = ""; + final String accessId = ""; + final String accessKey = ""; + final String instanceName = ""; + + SyncClientInterface client = new SyncClient(endPoint, accessId, accessKey, instanceName); + + try { + // drop mapping table fb_test; + System.out.println("drop mapping table begin"); + SQLQueryRequest dropMappingTableRequest = new SQLQueryRequest("drop mapping table fb_test"); + SQLQueryResponse dropMappingTableResponse = client.sqlQuery(dropMappingTableRequest); + System.out.println("response type: " + dropMappingTableResponse.getSQLStatementType()); + System.out.println("drop mapping table end"); + + // create table fb_test (pk varchar(1024), long_value bigint, double_value double, string_value mediumtext, bool_value bool, binary_value mediumblob, primary key(pk)); + System.out.println("create table begin"); + SQLQueryRequest createTableRequest = new SQLQueryRequest("create table fb_test (pk varchar(1024), long_value bigint, double_value double, string_value mediumtext, bool_value bool, binary_value mediumblob, primary key(pk))"); + SQLQueryResponse createTableResponse = client.sqlQuery(createTableRequest); + System.out.println("response type: " + createTableResponse.getSQLStatementType()); + System.out.println("create table end"); + + // desc fb_test + System.out.println("desc table begin"); + SQLQueryRequest descTableRequest = new SQLQueryRequest("desc fb_test"); + SQLQueryResponse descTableResponse = client.sqlQuery(descTableRequest); + System.out.println("response type: " + descTableResponse.getSQLStatementType()); + SQLResultSet descTableResultSet = descTableResponse.getSQLResultSet(); + SQLTableMeta descTableMeta = descTableResultSet.getSQLTableMeta(); + System.out.println(descTableMeta.getSchema()); + while (descTableResultSet.hasNext()) { + SQLRow row = descTableResultSet.next(); + System.out.println(row.getString(0) + ", " + row.getString(1) + ", " + + row.getString(2) + ", " + row.getString(3) + ", " + + row.getString(4) + ", " + row.getString(5)); + } + System.out.println("desc table end"); + + // show index in fb_test + System.out.println("show index begin"); + SQLQueryRequest showIndexRequest = new SQLQueryRequest("show index in fb_test"); + SQLQueryResponse showIndexResponse = client.sqlQuery(showIndexRequest); + System.out.println("response type: " + showIndexResponse.getSQLStatementType()); + SQLResultSet showIndexResultSet = showIndexResponse.getSQLResultSet(); + SQLTableMeta showIndexTableMeta = showIndexResultSet.getSQLTableMeta(); + System.out.println(showIndexTableMeta.getSchema()); + while (showIndexResultSet.hasNext()) { + SQLRow row = showIndexResultSet.next(); + System.out.println(row.getString("Table") + ", " + row.getLong("Non_unique") + ", " + + row.getString("Key_name") + ", " + row.getLong("Seq_in_index") + ", " + + row.getString("Column_name") + ", " + row.getString("Index_type") ); + } + System.out.println("show index end"); + + // show tables; + System.out.println("show tables begin"); + SQLQueryRequest showTableRequest = new SQLQueryRequest("show tables"); + SQLQueryResponse showTableResponse = client.sqlQuery(showTableRequest); + System.out.println("response type: " + showTableResponse.getSQLStatementType()); + SQLResultSet showTableResultSet = showTableResponse.getSQLResultSet(); + SQLTableMeta showTableMeta = showTableResultSet.getSQLTableMeta(); + System.out.println(showTableMeta.getSchema()); + while (showTableResultSet.hasNext()) { + SQLRow row = showTableResultSet.next(); + System.out.println(row.getString(0)); + } + List tables = SQLUtils.parseShowTablesResponse(showTableResponse); + for (String table : tables) { + System.out.print(table + ", "); + } + System.out.println(); + System.out.println("show tables end"); + + // select pk, long_value, double_value, string_value, bool_value, binary_value FROM fb_test limit 20; + System.out.println("select query begin"); + SQLQueryRequest selectRequest = new SQLQueryRequest("select pk, long_value, double_value, string_value, bool_value, binary_value from fb_test limit 20"); + SQLQueryResponse selectResponse = client.sqlQuery(selectRequest); + System.out.println("response type: " + selectResponse.getSQLStatementType()); + SQLTableMeta selectMeta = selectResponse.getSQLResultSet().getSQLTableMeta(); + System.out.println(selectMeta.getSchema()); + SQLResultSet selectResultSet = selectResponse.getSQLResultSet(); + while (selectResultSet.hasNext()) { + SQLRow row = selectResultSet.next(); + System.out.println(row.toDebugString()); + System.out.println(row.getString(0) + ", " + row.getString("pk") + ", " + + row.getLong(1) + ", " + row.getLong("long_value") + ", " + + row.getDouble(2) + ", " + row.getDouble("double_value") + ", " + + row.getString(3) + ", " + row.getString("string_value") + ", " + + row.getBoolean(4) + ", " + row.getBoolean("bool_value") + ", " + + byteBufferToString(row.getBinary(5)) + ", " + byteBufferToString(row.getBinary("binary_value")) + ); + } + System.out.println("select query end"); + + // timeseries query + System.out.println("timeseries query begin"); + SQLQueryRequest timeseriesRequest = new SQLQueryRequest("select * from devops_25w limit 10"); + SQLQueryResponse timeseriesResponse = client.sqlQuery(timeseriesRequest); + System.out.println("response type: " + timeseriesResponse.getSQLStatementType()); + SQLTableMeta timeseriesMeta = timeseriesResponse.getSQLResultSet().getSQLTableMeta(); + System.out.println(timeseriesMeta.getSchema()); + SQLResultSet timeseriesResultSet = timeseriesResponse.getSQLResultSet(); + while (timeseriesResultSet.hasNext()) { + SQLRow row = timeseriesResultSet.next(); + System.out.println(row.toDebugString()); + } + System.out.println("timeseries query end"); + + } catch (TableStoreException e) { + System.err.println("操作失败,详情:" + e.getMessage()); + // 可以根据错误代码做出处理, OTS的ErrorCode定义在OTSErrorCode中。 + if (ErrorCode.QUOTA_EXHAUSTED.equals(e.getErrorCode())) { + System.err.println("超出存储配额。"); + } + // Request ID可以用于有问题时联系客服诊断异常。 + System.err.println("Request ID:" + e.getRequestId()); + } catch (ClientException e) { + // 可能是网络不好或者是返回结果有问题 + System.err.println("请求失败,详情:" + e.getMessage()); + } catch (Exception e) { + System.err.println(e); + } finally { + client.shutdown(); + } + } + + private static String byteBufferToString(ByteBuffer byteBuffer) { + if (byteBuffer == null) { + return null; + } else { + byte[] array = new byte[byteBuffer.remaining()]; + byteBuffer.get(array); + return new String(array); + } + } + +} diff --git a/src/test/java/examples/SearchIndexSample.java b/src/test/java/examples/SearchIndexSample.java index 44d5fb9..d45e9e9 100644 --- a/src/test/java/examples/SearchIndexSample.java +++ b/src/test/java/examples/SearchIndexSample.java @@ -2,14 +2,33 @@ import com.alicloud.openservices.tablestore.ClientException; import com.alicloud.openservices.tablestore.SyncClient; +import com.alicloud.openservices.tablestore.SyncClientInterface; import com.alicloud.openservices.tablestore.TableStoreException; import com.alicloud.openservices.tablestore.model.*; +import com.alicloud.openservices.tablestore.model.iterator.RowIterator; import com.alicloud.openservices.tablestore.model.search.*; +import com.alicloud.openservices.tablestore.model.search.SearchRequest.ColumnsToGet; +import com.alicloud.openservices.tablestore.model.search.agg.AggregationBuilders; +import com.alicloud.openservices.tablestore.model.search.agg.AggregationResults; +import com.alicloud.openservices.tablestore.model.search.agg.PercentilesAggregationItem; +import com.alicloud.openservices.tablestore.model.search.agg.PercentilesAggregationResult; +import com.alicloud.openservices.tablestore.model.search.analysis.AnalyzerParameter; +import com.alicloud.openservices.tablestore.model.search.analysis.SplitAnalyzerParameter; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupByBuilders; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupByFieldResult; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupByFieldResultItem; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupByFilterResult; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupByFilterResultItem; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupByHistogramItem; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupByHistogramResult; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupByRangeResult; +import com.alicloud.openservices.tablestore.model.search.groupby.GroupByRangeResultItem; import com.alicloud.openservices.tablestore.model.search.query.*; import com.alicloud.openservices.tablestore.model.search.sort.FieldSort; import com.alicloud.openservices.tablestore.model.search.sort.Sort; import com.alicloud.openservices.tablestore.model.search.sort.SortOrder; +import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -19,10 +38,10 @@ public class SearchIndexSample { * 本示例中建立一张表,名为search_index_sample_table,两个主键, 主键分别为pk1,pk2. * 给这张表建立一个SearchIndex,然后列出表下的SearchIndex,然后查询SearchIndex的信息。 * 向表内写入几条数据,并通过几种search query进行查询。 - * */ private static final String TABLE_NAME = "search_index_sample_table"; private static final String INDEX_NAME = "test_index"; + private static final String INDEX_NAME_SCHEMA_MODIFIED = "test_index_reindex"; private static final String PRIMARY_KEY_NAME_1 = "pk1"; private static final String PRIMARY_KEY_NAME_2 = "pk2"; @@ -34,7 +53,7 @@ public static void main(String[] args) { final String instanceName = ""; SyncClient client = new SyncClient(endPoint, accessId, accessKey, - instanceName); + instanceName); try { // 建表 @@ -69,7 +88,7 @@ public static void main(String[] args) { System.out.println("put row succeeded."); // 等待数据同步到SearchIndex - waitUntilAllDataSync(client, 5); + waitUntilAllDataSync(client, INDEX_NAME, 6); // 使用matchAllQuery查询数据总行数 System.out.println("MatchAllQuery..."); @@ -102,20 +121,38 @@ public static void main(String[] args) { // 使用BoolQuery查询数据 System.out.println("BoolQuery..."); boolQuery(client); + + // 使用ExistsQuery查询数据 + System.out.println("ExistsQuery..."); + existsQuery(client); + + // 使用groupByHistogram查询数据 + System.out.println("groupByHistogram..."); + groupByHistogram( client); + + // 使用percentilesAggLong查询数据 + System.out.println("percentilesAggLong(client);..."); + percentilesAggLong(client); + + + // 动态修改schema + System.out.println("DynamicModifySchema..."); + dynamicModifySchema(client); + } catch (TableStoreException e) { System.err.println("操作失败,详情:" + e.getMessage()); System.err.println("Request ID:" + e.getRequestId()); } catch (ClientException e) { System.err.println("请求失败,详情:" + e.getMessage()); } finally { -// // 为了安全,这里不能默认删除索引和表,如果需要删除,需用户自己手动打开 -// try { -// // 删除SearchIndex -// deleteSearchIndex(client); -// } catch (Exception ex) { -// ex.printStackTrace(); -// } -// deleteTable(client); + // // 为了安全,这里不能默认删除索引和表,如果需要删除,需用户自己手动打开 + // try { + // // 删除SearchIndex + // deleteSearchIndex(client); + // } catch (Exception ex) { + // ex.printStackTrace(); + // } + // deleteTable(client); } client.shutdown(); } @@ -141,9 +178,24 @@ private static void createSearchIndex(SyncClient client) { request.setIndexName(INDEX_NAME); IndexSchema indexSchema = new IndexSchema(); indexSchema.setFieldSchemas(Arrays.asList( - new FieldSchema("Col_Keyword", FieldType.KEYWORD).setIndex(true).setEnableSortAndAgg(true), - new FieldSchema("Col_Long", FieldType.LONG).setIndex(true).setEnableSortAndAgg(true), - new FieldSchema("Col_Text", FieldType.TEXT).setIndex(true))); + new FieldSchema("Col_Keyword", FieldType.KEYWORD).setIndex(true).setEnableSortAndAgg(true), + new FieldSchema("Col_Long", FieldType.LONG).setIndex(true).setEnableSortAndAgg(true), + new FieldSchema("Col_Text", FieldType.TEXT).setIndex(true))); + request.setIndexSchema(indexSchema); + client.createSearchIndex(request); + } + + private static void createSearchIndexWithAnalyzer(SyncClient client) { + FieldSchema.Analyzer analyzer = FieldSchema.Analyzer.Split; + AnalyzerParameter analyzerParameter = new SplitAnalyzerParameter("-"); + + CreateSearchIndexRequest request = new CreateSearchIndexRequest(); + request.setTableName(TABLE_NAME); + request.setIndexName(INDEX_NAME); + IndexSchema indexSchema = new IndexSchema(); + indexSchema.setFieldSchemas(Arrays.asList( + new FieldSchema("Col_Text", FieldType.TEXT).setIndex(true).setAnalyzer(analyzer) + .setAnalyzerParameter(analyzerParameter))); request.setIndexSchema(indexSchema); client.createSearchIndex(request); } @@ -154,20 +206,19 @@ private static void createSearchIndexWithIndexSort(SyncClient client) { request.setIndexName(INDEX_NAME); IndexSchema indexSchema = new IndexSchema(); indexSchema.setFieldSchemas(Arrays.asList( - new FieldSchema("Col_Keyword", FieldType.KEYWORD).setIndex(true).setEnableSortAndAgg(true), - new FieldSchema("Col_Long", FieldType.LONG).setIndex(true).setEnableSortAndAgg(true), - new FieldSchema("Col_Text", FieldType.TEXT).setIndex(true), - new FieldSchema("Timestamp", FieldType.LONG).setIndex(true).setEnableSortAndAgg(true))); + new FieldSchema("Col_Keyword", FieldType.KEYWORD).setIndex(true).setEnableSortAndAgg(true), + new FieldSchema("Col_Long", FieldType.LONG).setIndex(true).setEnableSortAndAgg(true), + new FieldSchema("Col_Text", FieldType.TEXT).setIndex(true), + new FieldSchema("Timestamp", FieldType.LONG).setIndex(true).setEnableSortAndAgg(true))); indexSchema.setIndexSort(new Sort( - Arrays.asList(new FieldSort("Timestamp", SortOrder.ASC)))); + Arrays.asList(new FieldSort("Timestamp", SortOrder.ASC)))); request.setIndexSchema(indexSchema); client.createSearchIndex(request); } /** * 使用Token进行翻页。 - * @param client - */ + **/ private static void readMoreRowsWithToken(SyncClient client) { SearchQuery searchQuery = new SearchQuery(); searchQuery.setQuery(new MatchAllQuery()); @@ -178,7 +229,7 @@ private static void readMoreRowsWithToken(SyncClient client) { throw new RuntimeException("not all success"); } List rows = resp.getRows(); - while (resp.getNextToken()!=null) { + while (resp.getNextToken() != null) { searchRequest.getSearchQuery().setToken(resp.getNextToken()); resp = client.search(searchRequest); if (!resp.isAllSuccess()) { @@ -210,6 +261,9 @@ private static void deleteSearchIndex(SyncClient client) { request.setTableName(TABLE_NAME); request.setIndexName(INDEX_NAME); client.deleteSearchIndex(request); + + request.setIndexName(INDEX_NAME_SCHEMA_MODIFIED); + client.deleteSearchIndex(request); } private static void deleteTable(SyncClient client) { @@ -219,7 +273,7 @@ private static void deleteTable(SyncClient client) { private static void putRow(SyncClient client) { String[] keywords = {"hangzhou", "beijing", "shanghai", "hangzhou shanghai", "hangzhou beijing shanghai"}; - long[] longValues = {1, 2, 3, 4, 5}; + long[] longValues = {1, 2, 3, 4, 5, 6}; for (int i = 0; i < 5; i++) { // 构造主键 PrimaryKeyBuilder primaryKeyBuilder = PrimaryKeyBuilder.createPrimaryKeyBuilder(); @@ -232,18 +286,34 @@ private static void putRow(SyncClient client) { //加入一些属性列 rowPutChange.addColumn("Col_Keyword", ColumnValue.fromString(keywords[i])); rowPutChange.addColumn("Col_Long", ColumnValue.fromLong(longValues[i])); + rowPutChange.addColumn("Col_Text", ColumnValue.fromString(keywords[i])); + rowPutChange.addColumn("Col_Boolean", ColumnValue.fromBoolean(i % 2 == 0 ? true : false)); + client.putRow(new PutRowRequest(rowPutChange)); + } + { // 构造一行缺失 Col_Keyword 和 Col_Text列 + // 构造主键 + PrimaryKeyBuilder primaryKeyBuilder = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + primaryKeyBuilder.addPrimaryKeyColumn(PRIMARY_KEY_NAME_1, PrimaryKeyValue.fromString("sample")); + primaryKeyBuilder.addPrimaryKeyColumn(PRIMARY_KEY_NAME_2, PrimaryKeyValue.fromLong(5)); + PrimaryKey primaryKey = primaryKeyBuilder.build(); + + RowPutChange rowPutChange = new RowPutChange(TABLE_NAME, primaryKey); + + //加入一些属性列 + rowPutChange.addColumn("Col_Long", ColumnValue.fromLong(longValues[5])); + rowPutChange.addColumn("Col_Boolean", ColumnValue.fromBoolean(false)); client.putRow(new PutRowRequest(rowPutChange)); } } - private static void waitUntilAllDataSync(SyncClient client, long expectTotalHit) { + private static void waitUntilAllDataSync(SyncClient client, String indexName, long expectTotalHit) { long begin = System.currentTimeMillis(); while (true) { SearchQuery searchQuery = new SearchQuery(); searchQuery.setQuery(new MatchAllQuery()); searchQuery.setGetTotalCount(true); - SearchRequest searchRequest = new SearchRequest(TABLE_NAME, INDEX_NAME, searchQuery); + SearchRequest searchRequest = new SearchRequest(TABLE_NAME, indexName, searchQuery); SearchResponse resp = client.search(searchRequest); if (resp.getTotalCount() == expectTotalHit) { break; @@ -261,7 +331,6 @@ private static void waitUntilAllDataSync(SyncClient client, long expectTotalHit) /** * 通过MatchAllQuery查询表中数据的总行数 - * @param client */ private static void matchAllQuery(SyncClient client) { SearchQuery searchQuery = new SearchQuery(); @@ -287,7 +356,6 @@ private static void matchAllQuery(SyncClient client) { /** * 查询表中Col_Keyword这一列的值能够匹配"hangzhou"的数据,返回匹配到的总行数和一些匹配成功的行。 - * @param client */ private static void matchQuery(SyncClient client) { SearchQuery searchQuery = new SearchQuery(); @@ -303,7 +371,7 @@ private static void matchQuery(SyncClient client) { System.out.println("TotalCount: " + resp.getTotalCount()); System.out.println("Row: " + resp.getRows()); // 不设置columnsToGet,默认只返回主键 - SearchRequest.ColumnsToGet columnsToGet = new SearchRequest.ColumnsToGet(); + ColumnsToGet columnsToGet = new ColumnsToGet(); columnsToGet.setReturnAll(true); // 设置返回所有列 searchRequest.setColumnsToGet(columnsToGet); @@ -312,10 +380,8 @@ private static void matchQuery(SyncClient client) { System.out.println("Row: " + resp.getRows()); } - /** * 查询表中Col_Text这一列的值能够匹配"hangzhou shanghai"的数据,匹配条件为短语匹配(要求短语完整的按照顺序匹配),返回匹配到的总行数和一些匹配成功的行。 - * @param client */ private static void matchPhraseQuery(SyncClient client) { SearchQuery searchQuery = new SearchQuery(); @@ -331,7 +397,7 @@ private static void matchPhraseQuery(SyncClient client) { System.out.println("TotalCount: " + resp.getTotalCount()); System.out.println("Row: " + resp.getRows()); // 默认只返回主键 - SearchRequest.ColumnsToGet columnsToGet = new SearchRequest.ColumnsToGet(); + ColumnsToGet columnsToGet = new ColumnsToGet(); columnsToGet.setReturnAll(true); // 设置返回所有列 searchRequest.setColumnsToGet(columnsToGet); @@ -342,7 +408,6 @@ private static void matchPhraseQuery(SyncClient client) { /** * 查询表中Col_Keyword这一列精确匹配"hangzhou"的数据。 - * @param client */ private static void termQuery(SyncClient client) { SearchQuery searchQuery = new SearchQuery(); @@ -353,7 +418,7 @@ private static void termQuery(SyncClient client) { searchQuery.setGetTotalCount(true); SearchRequest searchRequest = new SearchRequest(TABLE_NAME, INDEX_NAME, searchQuery); - SearchRequest.ColumnsToGet columnsToGet = new SearchRequest.ColumnsToGet(); + ColumnsToGet columnsToGet = new ColumnsToGet(); columnsToGet.setReturnAll(true); // 设置返回所有列 searchRequest.setColumnsToGet(columnsToGet); @@ -365,19 +430,18 @@ private static void termQuery(SyncClient client) { /** * 查询表中Col_Keyword这一列精确匹配"hangzhou"或"shanghai"的数据。 * TermsQuery可以使用多个Term同时查询。 - * @param client */ private static void termsQuery(SyncClient client) { SearchQuery searchQuery = new SearchQuery(); TermsQuery termsQuery = new TermsQuery(); // 设置查询类型为TermQuery termsQuery.setFieldName("Col_Keyword"); // 设置要匹配的字段 termsQuery.setTerms(Arrays.asList(ColumnValue.fromString("hangzhou"), - ColumnValue.fromString("shanghai"))); // 设置要匹配的值 + ColumnValue.fromString("shanghai"))); // 设置要匹配的值 searchQuery.setQuery(termsQuery); searchQuery.setGetTotalCount(true); SearchRequest searchRequest = new SearchRequest(TABLE_NAME, INDEX_NAME, searchQuery); - SearchRequest.ColumnsToGet columnsToGet = new SearchRequest.ColumnsToGet(); + ColumnsToGet columnsToGet = new ColumnsToGet(); columnsToGet.setReturnAll(true); // 设置返回所有列 searchRequest.setColumnsToGet(columnsToGet); @@ -388,7 +452,6 @@ private static void termsQuery(SyncClient client) { /** * 查询表中Col_Keyword这一列前缀为"hangzhou"的数据。 - * @param client */ private static void prefixQuery(SyncClient client) { SearchQuery searchQuery = new SearchQuery(); @@ -399,7 +462,7 @@ private static void prefixQuery(SyncClient client) { searchQuery.setGetTotalCount(true); SearchRequest searchRequest = new SearchRequest(TABLE_NAME, INDEX_NAME, searchQuery); - SearchRequest.ColumnsToGet columnsToGet = new SearchRequest.ColumnsToGet(); + ColumnsToGet columnsToGet = new ColumnsToGet(); columnsToGet.setReturnAll(true); // 设置返回所有列 searchRequest.setColumnsToGet(columnsToGet); @@ -410,7 +473,6 @@ private static void prefixQuery(SyncClient client) { /** * 使用通配符查询,查询表中Col_Keyword这一列的值匹配"hang*u"的数据 - * @param client */ private static void wildcardQuery(SyncClient client) { SearchQuery searchQuery = new SearchQuery(); @@ -421,7 +483,7 @@ private static void wildcardQuery(SyncClient client) { searchQuery.setGetTotalCount(true); SearchRequest searchRequest = new SearchRequest(TABLE_NAME, INDEX_NAME, searchQuery); - SearchRequest.ColumnsToGet columnsToGet = new SearchRequest.ColumnsToGet(); + ColumnsToGet columnsToGet = new ColumnsToGet(); columnsToGet.setReturnAll(true); // 设置返回所有列 searchRequest.setColumnsToGet(columnsToGet); @@ -433,7 +495,6 @@ private static void wildcardQuery(SyncClient client) { /** * 查询表中Col_Long这一列大于3的数据,结果按照Col_Long这一列的值逆序排序。 - * @param client */ private static void rangeQuery(SyncClient client) { SearchQuery searchQuery = new SearchQuery(); @@ -454,10 +515,8 @@ private static void rangeQuery(SyncClient client) { System.out.println("Row: " + resp.getRows()); } - /** * Col_GeoPoint是GeoPoint类型,查询表中Col_GeoPoint这一列的值在左上角为"10,0", 右下角为"0,10"的矩形范围内的数据。 - * @param client */ public static void geoBoundingBoxQuery(SyncClient client) { SearchQuery searchQuery = new SearchQuery(); @@ -469,7 +528,7 @@ public static void geoBoundingBoxQuery(SyncClient client) { searchQuery.setGetTotalCount(true); SearchRequest searchRequest = new SearchRequest(TABLE_NAME, INDEX_NAME, searchQuery); - SearchRequest.ColumnsToGet columnsToGet = new SearchRequest.ColumnsToGet(); + ColumnsToGet columnsToGet = new ColumnsToGet(); columnsToGet.setColumns(Arrays.asList("Col_GeoPoint")); //设置返回Col_GeoPoint这一列 searchRequest.setColumnsToGet(columnsToGet); @@ -480,7 +539,6 @@ public static void geoBoundingBoxQuery(SyncClient client) { /** * 查询表中Col_GeoPoint这一列的值距离中心点不超过一定距离的数据。 - * @param client */ public static void geoDistanceQuery(SyncClient client) { SearchQuery searchQuery = new SearchQuery(); @@ -492,7 +550,7 @@ public static void geoDistanceQuery(SyncClient client) { searchQuery.setGetTotalCount(true); SearchRequest searchRequest = new SearchRequest(TABLE_NAME, INDEX_NAME, searchQuery); - SearchRequest.ColumnsToGet columnsToGet = new SearchRequest.ColumnsToGet(); + ColumnsToGet columnsToGet = new ColumnsToGet(); columnsToGet.setColumns(Arrays.asList("Col_GeoPoint")); //设置返回Col_GeoPoint这一列 searchRequest.setColumnsToGet(columnsToGet); @@ -503,18 +561,17 @@ public static void geoDistanceQuery(SyncClient client) { /** * 查询表中Col_GeoPoint这一列的值在一个给定多边形范围内的数据。 - * @param client */ public static void geoPolygonQuery(SyncClient client) { SearchQuery searchQuery = new SearchQuery(); GeoPolygonQuery geoPolygonQuery = new GeoPolygonQuery(); // 设置查询类型为GeoPolygonQuery geoPolygonQuery.setFieldName("Col_GeoPoint"); - geoPolygonQuery.setPoints(Arrays.asList("0,0","5,5","5,0")); // 设置多边形的顶点 + geoPolygonQuery.setPoints(Arrays.asList("0,0", "5,5", "5,0")); // 设置多边形的顶点 searchQuery.setQuery(geoPolygonQuery); searchQuery.setGetTotalCount(true); SearchRequest searchRequest = new SearchRequest(TABLE_NAME, INDEX_NAME, searchQuery); - SearchRequest.ColumnsToGet columnsToGet = new SearchRequest.ColumnsToGet(); + ColumnsToGet columnsToGet = new ColumnsToGet(); columnsToGet.setColumns(Arrays.asList("Col_GeoPoint")); //设置返回Col_GeoPoint这一列 searchRequest.setColumnsToGet(columnsToGet); @@ -525,17 +582,16 @@ public static void geoPolygonQuery(SyncClient client) { /** * 通过BoolQuery进行复合条件查询。 - * @param client */ public static void boolQuery(SyncClient client) { - /** + /* * 查询条件一:RangeQuery,Col_Long这一列的值要大于3 */ RangeQuery rangeQuery = new RangeQuery(); rangeQuery.setFieldName("Col_Long"); rangeQuery.greaterThan(ColumnValue.fromLong(3)); - /** + /* * 查询条件二:MatchQuery,Col_Keyword这一列的值要匹配"hangzhou" */ MatchQuery matchQuery = new MatchQuery(); // 设置查询类型为MatchQuery @@ -544,7 +600,7 @@ public static void boolQuery(SyncClient client) { SearchQuery searchQuery = new SearchQuery(); { - /** + /* * 构造一个BoolQuery,设置查询条件是必须同时满足"条件一"和"条件二" */ BoolQuery boolQuery = new BoolQuery(); @@ -558,7 +614,7 @@ public static void boolQuery(SyncClient client) { } { - /** + /* * 构造一个BoolQuery,设置查询条件是至少满足"条件一"和"条件二"中的一个条件 */ BoolQuery boolQuery = new BoolQuery(); @@ -573,4 +629,654 @@ public static void boolQuery(SyncClient client) { } } + public static void existsQuery(SyncClient client) { + SearchQuery searchQuery = new SearchQuery(); + ExistsQuery existsQuery = new ExistsQuery(); + existsQuery.setFieldName("Col_Keyword"); + searchQuery.setQuery(existsQuery); + searchQuery.setGetTotalCount(true); + SearchRequest searchRequest = new SearchRequest(TABLE_NAME, INDEX_NAME, searchQuery); + + ColumnsToGet columnsToGet = new ColumnsToGet(); + columnsToGet.setReturnAll(true); // 设置返回所有列 + searchRequest.setColumnsToGet(columnsToGet); + + SearchResponse resp = client.search(searchRequest); + System.out.println("TotalCount: " + resp.getTotalCount()); // 匹配到的总行数,非返回行数 + System.out.println("Row: " + resp.getRows()); + } + + public static void dynamicModifySchema(SyncClient client) { + //step 1. 创建"重建索引" + //若需要删除源索引的索引列Col_Long,并新增一列Col_Boolean,则可以重建索引,如下: + CreateSearchIndexRequest request = new CreateSearchIndexRequest(); + request.setTableName(TABLE_NAME); + request.setIndexName(INDEX_NAME_SCHEMA_MODIFIED); //重建索引:修改schema后的索引 + request.setSourceIndexName(INDEX_NAME); //源索引:被修改schema的索引 + + IndexSchema indexSchema = new IndexSchema(); + indexSchema.setFieldSchemas(Arrays.asList( + new FieldSchema("Col_Keyword", FieldType.KEYWORD).setIndex(true).setEnableSortAndAgg(true), + new FieldSchema("Col_Long", FieldType.LONG).setIndex(true).setEnableSortAndAgg(true), + //new FieldSchema("Col_Text", FieldType.TEXT).setIndex(true), //删除索引列 + new FieldSchema("Col_Boolean", FieldType.BOOLEAN).setIndex(true) //新增索引列 + )); + request.setIndexSchema(indexSchema); + client.createSearchIndex(request); + + //step 2. 等待"重建索引"数据同步。先后经历"全量同步"和"增量同步"两个阶段 + waitUntilAllDataSync(client, INDEX_NAME, 6); + + //step 3. AB test + { //设置查询流量的权重:源索引80%, 重建索引80% + UpdateSearchIndexRequest updateSearchIndexRequest = new UpdateSearchIndexRequest(TABLE_NAME, INDEX_NAME, + Arrays.asList( + new QueryFlowWeight(INDEX_NAME, 80), + new QueryFlowWeight(INDEX_NAME_SCHEMA_MODIFIED, 20) + )); + client.updateSearchIndex(updateSearchIndexRequest); + + //检查权重设置是否成功 + DescribeSearchIndexRequest describeSearchIndexRequest = new DescribeSearchIndexRequest(); + describeSearchIndexRequest.setTableName(TABLE_NAME); + describeSearchIndexRequest.setIndexName(INDEX_NAME); + DescribeSearchIndexResponse describeSearchIndexResponse = client.describeSearchIndex(describeSearchIndexRequest); + System.out.println("describe response: " + describeSearchIndexResponse.jsonize()); + + //等待权重设置生效 + try { + Thread.sleep(50000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + + //此时,会有20%的查询被重建索引分担,逐步调大比例,可以灰度地将查询流量切到重建索引 + int hitOrigin = 0; + int hitTotal = 100; + for (int i = 0; i < hitTotal; ++i) { + SearchRequest searchRequest = new SearchRequest(TABLE_NAME, INDEX_NAME, + SearchQuery.newBuilder() + .query(QueryBuilders.exists("Col_Boolean")) + .getTotalCount(true).build()); + SearchResponse resp = client.search(searchRequest); + if (resp.getTotalCount() == 0) { + ++ hitOrigin; + } + } + System.out.println("hit origin: " + hitOrigin + ", hit modified: " + (hitTotal - hitOrigin)); + } + + { //设置查询流量的权重:源索引20%, 重建索引80% + UpdateSearchIndexRequest updateSearchIndexRequest = new UpdateSearchIndexRequest(TABLE_NAME, INDEX_NAME, + Arrays.asList( + new QueryFlowWeight(INDEX_NAME, 20), + new QueryFlowWeight(INDEX_NAME_SCHEMA_MODIFIED, 80) + )); + client.updateSearchIndex(updateSearchIndexRequest); + + //检查权重设置是否成功 + DescribeSearchIndexRequest describeSearchIndexRequest = new DescribeSearchIndexRequest(); + describeSearchIndexRequest.setTableName(TABLE_NAME); + describeSearchIndexRequest.setIndexName(INDEX_NAME); + DescribeSearchIndexResponse describeSearchIndexResponse = client.describeSearchIndex(describeSearchIndexRequest); + System.out.println("describe response: " + describeSearchIndexResponse.jsonize()); + + //等待权重设置生效 + try { + Thread.sleep(50000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + + //此时,会有80%的查询被重建索引分担 + int hitOrigin = 0; + int hitTotal = 100; + for (int i = 0; i < hitTotal; ++i) { + SearchRequest searchRequest = new SearchRequest(TABLE_NAME, INDEX_NAME, + SearchQuery.newBuilder() + .query(QueryBuilders.exists("Col_Boolean")) + .getTotalCount(true).build()); + SearchResponse resp = client.search(searchRequest); + if (resp.getTotalCount() == 0) { + ++ hitOrigin; + } + } + System.out.println("hit origin: " + hitOrigin + ", hit modified: " + (hitTotal - hitOrigin)); + } + + { //设置查询流量的权重:源索引20%, 重建索引80% + UpdateSearchIndexRequest updateSearchIndexRequest = new UpdateSearchIndexRequest(TABLE_NAME, INDEX_NAME, + Arrays.asList( + new QueryFlowWeight(INDEX_NAME, 0), + new QueryFlowWeight(INDEX_NAME_SCHEMA_MODIFIED, 100) + )); + client.updateSearchIndex(updateSearchIndexRequest); + + //检查权重设置是否成功 + DescribeSearchIndexRequest describeSearchIndexRequest = new DescribeSearchIndexRequest(); + describeSearchIndexRequest.setTableName(TABLE_NAME); + describeSearchIndexRequest.setIndexName(INDEX_NAME); + DescribeSearchIndexResponse describeSearchIndexResponse = client.describeSearchIndex(describeSearchIndexRequest); + System.out.println("describe response: " + describeSearchIndexResponse.jsonize()); + + //等待权重设置生效 + try { + Thread.sleep(50000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + + //此时,全部查询流量被引流到重建索引 + int hitOrigin = 0; + int hitTotal = 100; + for (int i = 0; i < hitTotal; ++i) { + SearchRequest searchRequest = new SearchRequest(TABLE_NAME, INDEX_NAME, + SearchQuery.newBuilder() + .query(QueryBuilders.exists("Col_Boolean")) + .getTotalCount(true).build()); + SearchResponse resp = client.search(searchRequest); + if (resp.getTotalCount() == 0) { + ++ hitOrigin; + } + } + System.out.println("hit origin: " + hitOrigin + ", hit modified: " + (hitTotal - hitOrigin)); + } + + //step 4. 经过一段时间充分的AB test后,可以切换索引 + UpdateSearchIndexRequest switchRequest = new UpdateSearchIndexRequest(TABLE_NAME, INDEX_NAME, INDEX_NAME_SCHEMA_MODIFIED); + client.updateSearchIndex(switchRequest); + +// //如果发现问题,还有机会切回 +// switchRequest = new UpdateSearchIndexRequest(TABLE_NAME, INDEX_NAME, INDEX_NAME_SCHEMA_MODIFIED); +// client.updateSearchIndex(switchRequest); + + //step 5. 经过一段静默时间后,可以删除修改前的索引 + DeleteSearchIndexRequest deleteRequest = new DeleteSearchIndexRequest(); + deleteRequest.setTableName(TABLE_NAME); + deleteRequest.setIndexName(INDEX_NAME_SCHEMA_MODIFIED); + client.deleteSearchIndex(deleteRequest); + } + + /** + * 在 MatchQuery 的结果上对某一个字段求最小值。 + */ + public static void minAgg(SyncClient client) { + SearchRequest searchRequest = SearchRequest.newBuilder() + .tableName(INDEX_NAME) + .indexName(TABLE_NAME) + .returnAllColumns(true) + .searchQuery( + SearchQuery.newBuilder() + .query(QueryBuilders.match("fieldName1", "hello")) + .limit(10) + .getTotalCount(true) + .addAggregation(AggregationBuilders.min("SomeName1", "fieldName2")) + .build()) + .build(); + SearchResponse resp = client.search(searchRequest); + //使用结果 + System.out.println(resp.getAggregationResults().getAsMinAggregationResult("SomeName1").getValue()); + } + + /** + * 在 MatchQuery 的结果上,对不同的字段求最小值、最大值、平均值、和、数量、去重的数量。 + */ + public static void agg(SyncClient client) { + SearchRequest searchRequest = SearchRequest.newBuilder() + .tableName(TABLE_NAME) + .indexName(INDEX_NAME) + .returnAllColumns(true) + .searchQuery( + SearchQuery.newBuilder() + .query(QueryBuilders.match("fieldName1", "hello")) + .limit(10) + .getTotalCount(true) + .addAggregation(AggregationBuilders.min("SomeName1", "fieldName1")) + .addAggregation(AggregationBuilders.max("SomeName2", "fieldName1")) + .addAggregation(AggregationBuilders.sum("SomeName3", "fieldName1")) + .addAggregation(AggregationBuilders.avg("SomeName4", "fieldName2")) + .addAggregation(AggregationBuilders.count("SomeName5", "fieldName2")) + .addAggregation(AggregationBuilders.distinctCount("SomeName6", "fieldName2")) + .build()) + .build(); + SearchResponse resp = client.search(searchRequest); + //使用结果 + AggregationResults results = resp.getAggregationResults(); + + System.out.println(results.getAsMinAggregationResult("SomeName1").getValue()); + System.out.println(results.getAsMaxAggregationResult("SomeName2").getValue()); + System.out.println(results.getAsSumAggregationResult("SomeName3").getValue()); + System.out.println(results.getAsAvgAggregationResult("SomeName4").getValue()); + System.out.println(results.getAsCountAggregationResult("SomeName5").getValue()); + System.out.println(results.getAsDistinctCountAggregationResult("SomeName6").getValue()); + } + + /** + * 在 MatchQuery 的结果上,根据一个字段进行分组统计。 + * 举例:库存账单里有“篮球”、“足球”、“羽毛球”等,对这一个字段进行 GroupByField 聚合,返回: “篮球:10个”,“足球:5个”,“网球:1个”这样的聚合信息。 + */ + public static void groupByField(SyncClient client) { + SearchRequest searchRequest = SearchRequest.newBuilder() + .indexName(TABLE_NAME) + .tableName(INDEX_NAME) + .returnAllColumns(true) + .searchQuery( + SearchQuery.newBuilder() + .query(QueryBuilders.match("fieldName1", "hello")) + .limit(10) + .getTotalCount(true) + .addGroupBy(GroupByBuilders.groupByField("someName1", "someFieldName1")) + .build()) + .build(); + SearchResponse resp = client.search(searchRequest); + //使用结果 + GroupByFieldResult results = resp.getGroupByResults().getAsGroupByFieldResult("someName1"); + //循环取出结果 + for (GroupByFieldResultItem item : results.getGroupByFieldResultItems()) { + System.out.println("key:" + item.getKey()); + System.out.println("数量:" + item.getRowCount()); + } + } + + /** + * 在 MatchQuery 的结果上,根据给出的range范围进行分组统计。 + */ + public static void groupByRange(SyncClient client) { + SearchRequest searchRequest = SearchRequest.newBuilder() + .indexName(TABLE_NAME) + .tableName(INDEX_NAME) + .returnAllColumns(true) + .searchQuery( + SearchQuery.newBuilder() + .query(QueryBuilders.match("fieldName1", "hello")) + .limit(10) + .getTotalCount(true) + .addGroupBy(GroupByBuilders + .groupByRange("someName1", "someFieldName1") + .addRange(Double.MIN_VALUE, 100) + .addRange(100, 500) + .addRange(500, Double.MAX_VALUE)) + .build()) + .build(); + SearchResponse resp = client.search(searchRequest); + //使用结果 + GroupByRangeResult results = resp.getGroupByResults().getAsGroupByRangeResult("someName1"); + //循环取出结果 + for (GroupByRangeResultItem item : results.getGroupByRangeResultItems()) { + System.out.println("数量:" + item.getRowCount()); + } + } + + /** + * 在 MatchQuery 的结果上,根据地理上的经纬度进行分组统计。 + */ + public static void groupByGeoDistance(SyncClient client) { + SearchRequest searchRequest = SearchRequest.newBuilder() + .tableName(INDEX_NAME) + .indexName(TABLE_NAME) + .returnAllColumns(true) + .searchQuery( + SearchQuery.newBuilder() + .query(QueryBuilders.match("fieldName1", "hello")) + .limit(10) + .getTotalCount(true) + .addGroupBy(GroupByBuilders + .groupByGeoDistance("someName1", "someFieldName1") + .origin(8.6545, 176.31231) // 经纬度中心坐标点 + .addRange(Double.MIN_VALUE, 100) + .addRange(100, 500) + .addRange(500, Double.MAX_VALUE)) + .build()) + .build(); + SearchResponse resp = client.search(searchRequest); + //使用结果 + GroupByRangeResult results = resp.getGroupByResults().getAsGroupByRangeResult("someName1"); + //循环取出结果 + for (GroupByRangeResultItem item : results.getGroupByRangeResultItems()) { + System.out.println("数量:" + item.getRowCount()); + } + } + + /** + * 在 MatchQuery 的结果上,根据 filter 进行分组统计。 + */ + public static void groupByFilter(SyncClient client) { + SearchRequest searchRequest = SearchRequest.newBuilder() + .tableName(INDEX_NAME) + .indexName(TABLE_NAME) + .returnAllColumns(true) + .searchQuery( + SearchQuery.newBuilder() + .query(QueryBuilders.match("fieldName1", "hello")) + .limit(10) + .getTotalCount(true) + .addGroupBy(GroupByBuilders + .groupByFilter("someName1") + .addFilter(QueryBuilders.matchAll()) + .addFilter(QueryBuilders.match("someFieldName2", "hi")) + .addFilter(QueryBuilders.range("someFieldName3").greaterThan(1000)) + .addFilter(QueryBuilders.exists("someFieldName4")) + ) + .build()) + .build(); + SearchResponse resp = client.search(searchRequest); + //使用结果 + GroupByFilterResult results = resp.getGroupByResults().getAsGroupByFilterResult("someName1"); + //循环取出结果 + for (GroupByFilterResultItem item : results.getGroupByFilterResultItems()) { + System.out.println("数量:" + item.getRowCount()); + } + } + + /** + * 在 MatchQuery 的结果上,进行各种agg和GroupBy组合,并支持多层嵌套(subAgg和subGroupBy)。 + */ + public static void groupByLotsOfGroupByAndAgg(SyncClient client) { + SearchRequest searchRequest = SearchRequest.newBuilder() + .tableName(INDEX_NAME) + .indexName(TABLE_NAME) + .returnAllColumns(true) + .searchQuery( + SearchQuery.newBuilder() + .query(QueryBuilders.match("fieldName1", "hello")) + .limit(10) + .getTotalCount(true) + .addAggregation(AggregationBuilders.min("SomeAggName1", "fieldName1")) + .addAggregation(AggregationBuilders.max("SomeAggName2", "fieldName1")) + .addGroupBy(GroupByBuilders + .groupByField("someName1", "someFieldName6") + .addSubAggregation(AggregationBuilders.max("subAgg1", "fieldName1")) + .addSubAggregation(AggregationBuilders.sum("subAgg2", "fieldName1"))) + .addGroupBy(GroupByBuilders + .groupByRange("someName2", "someFieldName5") + .addRange(12, 90) + .addRange(100, 900)) + .addGroupBy(GroupByBuilders + .groupByFilter("someName3") + .addFilter(QueryBuilders.matchAll()) + .addFilter(QueryBuilders.match("someFieldName2", "hi")) + .addFilter(QueryBuilders.range("someFieldName3").greaterThan(1000)) + .addFilter(QueryBuilders.exists("someFieldName4")) + ) + .build()) + .build(); + SearchResponse resp = client.search(searchRequest); + //第一层的agg结果 + AggregationResults aggResults = resp.getAggregationResults(); + System.out.println(aggResults.getAsMinAggregationResult("SomeAggName1").getValue()); + System.out.println(aggResults.getAsMaxAggregationResult("SomeAggName2").getValue()); + + //取出第一层的groupByField结果,并同时取出其嵌套的agg结果 + GroupByFieldResult results = resp.getGroupByResults().getAsGroupByFieldResult("someName1"); + for (GroupByFieldResultItem item : results.getGroupByFieldResultItems()) { + System.out.println("数量:" + item.getRowCount()); + System.out.println("key:" + item.getKey()); + System.out.println(item.getSubAggregationResults().getAsMaxAggregationResult("subAgg1")); + System.out.println(item.getSubAggregationResults().getAsSumAggregationResult("subAgg2")); + } + + // 取出第一层没有嵌套的GroupByRange和GroupByFilter的结果 + //GroupByFilter + GroupByFilterResult results1 = resp.getGroupByResults().getAsGroupByFilterResult("someName3"); + for (GroupByFilterResultItem item : results1.getGroupByFilterResultItems()) { + System.out.println("数量:" + item.getRowCount()); + } + + //GroupByRange + GroupByRangeResult results2 = resp.getGroupByResults().getAsGroupByRangeResult("someName2"); + for (GroupByRangeResultItem item : results2.getGroupByRangeResultItems()) { + System.out.println("数量:" + item.getRowCount()); + System.out.println("from:" + item.getFrom()); + System.out.println("to:" + item.getTo()); + } + } + + + /** + * 获取数据分块信息 + * 作用:用以{@link ScanQuery}中设置最大并行度{@link ScanQuery#setMaxParallel(Integer)}和sessionId {@link ParallelScanRequest#setSessionId(byte[])} + */ + public static ComputeSplitsResponse computeSplits(SyncClient client, String tableName, String indexName){ + ComputeSplitsRequest computeSplitsRequest = new ComputeSplitsRequest(); + computeSplitsRequest.setTableName(tableName); + computeSplitsRequest.setSplitsOptions(new SearchIndexSplitsOptions(indexName)); + return client.computeSplits(computeSplitsRequest); + } + + + + /** + * ScanQuery获取数据,原生接口使用示例,推荐 {@link SyncClientInterface#createParallelScanIterator(ParallelScanRequest)}. + */ + public static void scanQuery(SyncClient client, String tableName, String indexName){ + // 计算分裂数和创建session + ComputeSplitsResponse computeSplitsResponse = computeSplits(client, tableName, indexName); + // 根据上一步创建的session进行获取数据 + ParallelScanRequest parallelScanRequest = ParallelScanRequest.newBuilder() + .tableName(tableName) + .indexName(indexName) + .scanQuery(ScanQuery.newBuilder() + .query(QueryBuilders.range("col_long").lessThan(123)) //这里的query决定了取得什么数据 + .limit(100) + .build()) + .addColumnsToGet("col_bool", "col_keyword", "col_long") //只能是索引中的字段 + .sessionId(computeSplitsResponse.getSessionId()) + .build(); + + ParallelScanResponse response = client.parallelScan(parallelScanRequest); + + int total = 0; + //持续取数据和消费数据 + while (null != response.getNextToken()) { + // 取得数据,进行消费 + List rows = response.getRows(); + total += rows.size(); + + //下一次请求的初始化 + parallelScanRequest.getScanQuery().setToken(response.getNextToken()); + response = client.parallelScan(parallelScanRequest); + } + System.out.println("原生接口 实际获取到的数据总数:" + total); + } + + + /** + * ScanQuery获取数据,通过 {@link SyncClientInterface#createParallelScanIterator(ParallelScanRequest)}. + */ + public static void scanQueryByRowIterator(SyncClient client, String tableName, String indexName){ + // 计算分裂数和创建session + ComputeSplitsResponse computeSplitsResponse = computeSplits(client, tableName, indexName); + // 根据上一步创建的session进行获取数据 + ParallelScanRequest parallelScanRequest = ParallelScanRequest.newBuilder() + .tableName(tableName) + .indexName(indexName) + .scanQuery(ScanQuery.newBuilder() + .query(QueryBuilders.range("col_long").lessThan(123)) //这里的query决定了取得什么数据 + .limit(100) + .build()) + .addColumnsToGet("col_bool", "col_keyword", "col_long") //只能是索引中的字段 + .sessionId(computeSplitsResponse.getSessionId()) + .build(); + + RowIterator ltr = client.createParallelScanIterator(parallelScanRequest); + + int count = 0; + while (ltr.hasNext()) { + Row next = ltr.next(); + count++; + } + System.out.println("实际获取到的数据总数:" + count); + } + + /** + * 根据给出的fieldRange范围进行直方图统计。 + */ + public static void groupByHistogram(SyncClient client) { + SearchRequest searchRequest = SearchRequest.newBuilder() + .indexName(INDEX_NAME) + .tableName(TABLE_NAME) + .returnAllColumns(true) + .searchQuery( + SearchQuery.newBuilder() + .addGroupBy(GroupByBuilders + .groupByHistogram("someName1", "Col_Double") + .interval(2.0) + .addFieldRange(1.0, 5.0)) + .build()) + .build(); + SearchResponse resp = client.search(searchRequest); + //使用结果 + GroupByHistogramResult results = resp.getGroupByResults().getAsGroupByHistogramResult("someName1"); + //循环取出结果 + for (GroupByHistogramItem item : results.getGroupByHistogramItems()) { + System.out.println("key:" + item.getKey().asDouble() + " value:" + item.getValue()); + } + } + + /** + * 在 MatchQuery 的结果上进行百分比统计。 + */ + public static void percentilesAggDouble(SyncClient client) { + + SearchRequest searchRequest = SearchRequest.newBuilder() + .tableName(TABLE_NAME) + .indexName(INDEX_NAME) + .returnAllColumns(true) + .searchQuery( + SearchQuery.newBuilder() + .addAggregation(AggregationBuilders.percentiles("percentilesAgg", "Col_Double") + .percentiles(new ArrayList() { + { + this.add(1.0); + this.add(50.0); + this.add(99.0); + } + }) + .missing(1.0)) + .build()) + .build(); + SearchResponse resp = client.search(searchRequest); + + //使用结果 + PercentilesAggregationResult percentilesAggregationResult = resp.getAggregationResults().getAsPercentilesAggregationResult( + "percentilesAgg"); + for (PercentilesAggregationItem item : percentilesAggregationResult.getPercentilesAggregationItems()) { + System.out.println("key:" + item.getKey() + " value:" + item.getValue().asDouble()); + } + } + + /** + * 在 MatchQuery 的结果上进行百分比统计。 + */ + public static void percentilesAggLong(SyncClient client) { + + SearchRequest searchRequest = SearchRequest.newBuilder() + .tableName(TABLE_NAME) + .indexName(INDEX_NAME) + .returnAllColumns(true) + .searchQuery( + SearchQuery.newBuilder() + .addAggregation(AggregationBuilders.percentiles("percentilesAgg", "Col_Long") + .percentiles(new ArrayList() { + { + this.add(1.0); + this.add(50.0); + this.add(99.0); + } + }) + .missing(1L)) + .build()) + .build(); + SearchResponse resp = client.search(searchRequest); + + //使用结果 + PercentilesAggregationResult percentilesAggregationResult = resp.getAggregationResults().getAsPercentilesAggregationResult( + "percentilesAgg"); + for (PercentilesAggregationItem item : percentilesAggregationResult.getPercentilesAggregationItems()) { + System.out.println("key:" + item.getKey() + " value:" + item.getValue().asLong()); + } + } + + /** + * ScanQuery获取数据,遇到异常进行重试。 + */ + public static void scanQueryByRowIteratorWithException(SyncClient client, String tableName, String indexName){ + try { + scanQueryByRowIterator(client, tableName, indexName); + } catch (TableStoreException ex) { + if (ex.getErrorCode().equals("OTSSessionExpired")){ + // session失效,进行重试 + scanQueryByRowIterator(client, tableName, indexName); + }else { + ex.printStackTrace(); + } + }catch (Exception ex){ + ex.printStackTrace(); + } + } + + /** + * ScanQuery获取数据,使用多线程并行取数据 + */ + public static void scanQueryByMultiThread(SyncClient client) throws InterruptedException { + // 计算分裂数和创建session + ComputeSplitsResponse computeSplitsResponse = computeSplits(client, "tableName", "indexName"); + + final class ThreadForScanQuery extends Thread { + private SyncClient client; + private ParallelScanRequest parallelScanRequest; + + private ThreadForScanQuery(SyncClient client, int currentParallelId, int maxParallel, byte[] sessionId) { + this.client = client; + this.setName(maxParallel + "-" + currentParallelId); //设置线程名字 + this.parallelScanRequest = ParallelScanRequest.newBuilder() + .tableName("tableName") + .indexName("indexName") + .scanQuery(ScanQuery.newBuilder() + .query(QueryBuilders.range("col_long").lessThan(123)) //这里的query决定了取得什么数据 + .limit(100) //每次网络请求获取多少数据 + .currentParallelId(currentParallelId) + .maxParallel(maxParallel) + .build()) + .addColumnsToGet("col_bool", "col_keyword", "col_long") //只能是索引中的字段 + .sessionId(sessionId) + .build(); + } + @Override + public void run() { + RowIterator ltr = client.createParallelScanIterator(parallelScanRequest); + System.out.println("线程名字:" + this.getName()); + + // 消费数据 + int count = 0; + while (ltr.hasNext()) { + Row next = ltr.next(); //增加自己的处理逻辑 + count++; + } + System.out.println("线程名字:" + this.getName() + ", 实际获取到的数据总数:" + count); + } + } + + // 最大线程数,不推荐超过maxParallel,性能可能会下降很多 + int maxParallel = computeSplitsResponse.getSplitsSize(); + byte[] sessionId = computeSplitsResponse.getSessionId(); + + //多个线程一起跑, currentParallelId 取值范围是 [0, maxParallel) + List threadList = new ArrayList(); + for (int i = 0; i < maxParallel; i++) { + ThreadForScanQuery thread = new ThreadForScanQuery(client, i, maxParallel, sessionId); + threadList.add(thread); + } + + // 启动 + for (ThreadForScanQuery thread : threadList) { + thread.start(); + } + + // 阻塞等待 + for (ThreadForScanQuery thread : threadList) { + thread.join(); + } + System.out.println("all thread done!"); + } } diff --git a/src/test/java/examples/SearchIndexSerializationSample.java b/src/test/java/examples/SearchIndexSerializationSample.java new file mode 100644 index 0000000..67e93d7 --- /dev/null +++ b/src/test/java/examples/SearchIndexSerializationSample.java @@ -0,0 +1,65 @@ +package examples; + +import com.alicloud.openservices.tablestore.core.protocol.SearchProtocolBuilder; +import com.alicloud.openservices.tablestore.core.protocol.SearchProtocolParser; +import com.alicloud.openservices.tablestore.core.protocol.SearchQueryBuilder; +import com.alicloud.openservices.tablestore.core.protocol.SearchQueryParser; +import com.alicloud.openservices.tablestore.model.search.ParallelScanRequest; +import com.alicloud.openservices.tablestore.model.search.ScanQuery; +import com.alicloud.openservices.tablestore.model.search.SearchQuery; +import com.alicloud.openservices.tablestore.model.search.SearchRequest; +import com.alicloud.openservices.tablestore.model.search.query.Query; +import com.alicloud.openservices.tablestore.model.search.query.QueryBuilders; +import org.junit.Test; + +import java.io.IOException; + + +public class SearchIndexSerializationSample { + + @Test + public void testQuery() throws IOException { + // any kind of query + Query oldQuery = QueryBuilders.bool().must(QueryBuilders.range("field_a").greaterThan(10.4)).build(); + // serialization + byte[] bytes = SearchQueryBuilder.buildQueryToBytes(oldQuery); + // deserialization + Query newQuery = SearchQueryParser.toQuery(bytes); + } + + @Test + public void testSearchQuery() throws IOException { + SearchQuery oldSearchQuery = new SearchQuery(); + // serialization + byte[] bytes = SearchProtocolBuilder.buildSearchQueryToBytes(oldSearchQuery); + // deserialization + SearchQuery newSearchQuery = SearchProtocolParser.toSearchQuery(bytes); + } + + @Test + public void testSearchRequest() throws IOException { + SearchRequest oldSearchRequest = new SearchRequest(); + // serialization + byte[] bytes = SearchProtocolBuilder.buildSearchRequestToBytes(oldSearchRequest); + // deserialization + SearchRequest newSearchRequest = SearchProtocolParser.toSearchRequest(bytes); + } + + @Test + public void testScanQuery() throws IOException { + ScanQuery oldScanQuery = new ScanQuery(); + // serialization + byte[] bytes = SearchProtocolBuilder.buildScanQueryToBytes(oldScanQuery); + // deserialization + ScanQuery newScanQuery = SearchProtocolParser.toScanQuery(bytes); + } + + @Test + public void testParallelScanRequest() throws IOException { + ParallelScanRequest oldParallelScanRequest = new ParallelScanRequest(); + // serialization + byte[] bytes = SearchProtocolBuilder.buildParallelScanRequestToBytes(oldParallelScanRequest); + // deserialization + ParallelScanRequest newParallelScanRequest = SearchProtocolParser.toParallelScanRequest(bytes); + } +} diff --git a/src/test/java/examples/ServerSideEncryptionSample.java b/src/test/java/examples/ServerSideEncryptionSample.java new file mode 100644 index 0000000..0462b40 --- /dev/null +++ b/src/test/java/examples/ServerSideEncryptionSample.java @@ -0,0 +1,167 @@ +package examples; + +import com.alicloud.openservices.tablestore.ClientException; +import com.alicloud.openservices.tablestore.SyncClient; +import com.alicloud.openservices.tablestore.TableStoreException; +import com.alicloud.openservices.tablestore.model.*; + +public class ServerSideEncryptionSample { + + /** + * 本示例中建立三张表,都只含有一个主键, 主键名为pk。 + * 一张表名为disableSseSampleTable,该表关闭服务器端加密功能 + * 一张表名为kmsServiceSampleTable, 该表开启服务器端加密功能,且使用KMS的服务主密钥 + * 一张表名为byokSampleTable, 该表开启服务器端加密功能,且使用KMS的用户主密钥 + */ + private static final String TABLE_NAME_DISABLE = "disableSseSampleTable"; + private static final String TABLE_NAME_KMS_SERVICE = "kmsServiceSampleTable"; + private static final String TABLE_NAME_BYOK = "byokSampleTable"; + private static final String PRIMARY_KEY_NAME = "pk"; + + public static void main(String[] args) { + final String endPoint = ""; + final String accessId = ""; + final String accessKey = ""; + final String instanceName = ""; + + final String keyId = ""; + final String roleArn = ""; + + SyncClient client = new SyncClient(endPoint, accessId, accessKey, + instanceName); + + try { + // 创建关闭服务器端加密功能的表 + deleteTableIfExist(client, TABLE_NAME_DISABLE); + createTableDisableSse(client, TABLE_NAME_DISABLE); + + // 创建开启服务器端加密功能(服务主秘钥)的表 + deleteTableIfExist(client, TABLE_NAME_KMS_SERVICE); + createTableKmsService(client, TABLE_NAME_KMS_SERVICE); + + // 创建开启服务器端加密功能(用户主秘钥)的表 + deleteTableIfExist(client, TABLE_NAME_KMS_SERVICE); + createTableByok(client, TABLE_NAME_BYOK, keyId, roleArn); + + // 查看两张表的属性 + describeTable(client, TABLE_NAME_DISABLE); + describeTable(client, TABLE_NAME_KMS_SERVICE); + describeTable(client, TABLE_NAME_BYOK); + + // 等待表load完毕. + try { + Thread.sleep(10 * 1000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + + // 两张表各写入一行数据 + putRow(client, TABLE_NAME_DISABLE, "pkValue"); + putRow(client, TABLE_NAME_KMS_SERVICE, "pkValue"); + putRow(client, TABLE_NAME_BYOK, "pkValue"); + + // 两张表各读取该行数据 + getRow(client, TABLE_NAME_DISABLE, "pkValue"); + getRow(client, TABLE_NAME_KMS_SERVICE, "pkValue"); + getRow(client, TABLE_NAME_BYOK, "pkValue"); + + } catch (TableStoreException e) { + System.err.println("操作失败,详情:" + e.getMessage()); + System.err.println("Request ID:" + e.getRequestId()); + } catch (ClientException e) { + System.err.println("请求失败,详情:" + e.getMessage()); + } + client.shutdown(); + } + + private static void createTable(SyncClient client, String tableName, SSESpecification sseSpec) { + TableMeta tableMeta = new TableMeta(tableName); + tableMeta.addPrimaryKeyColumn(new PrimaryKeySchema(PRIMARY_KEY_NAME, PrimaryKeyType.STRING)); + + TableOptions tableOptions = new TableOptions(-1, 1); + + CreateTableRequest request = new CreateTableRequest(tableMeta, tableOptions); + request.setSseSpecification(sseSpec); + + client.createTable(request); + } + + private static void createTableDisableSse(SyncClient client, String tableName) { + // 关闭服务器端加密功能 + SSESpecification sseSpec = new SSESpecification(false); + createTable(client, tableName, sseSpec); + } + + private static void createTableKmsService(SyncClient client, String tableName) { + // 打开服务器端加密功能,使用KMS的服务主密钥 + // 需要确保已经在所在区域开通了KMS服务 + SSESpecification sseSpec = new SSESpecification(true, SSEKeyType.SSE_KMS_SERVICE); + createTable(client, tableName, sseSpec); + } + + private static void createTableByok(SyncClient client, String tableName, String keyId, String roleArn) { + // 打开服务器端加密功能,使用KMS的用户主密钥 + // 需要确保keyId合法有效且未被禁用,同时roleArn被授予了临时访问该keyId的权限 + SSESpecification sseSpec = new SSESpecification(true, SSEKeyType.SSE_BYOK, keyId, roleArn); + createTable(client, tableName, sseSpec); + } + + private static void describeTable(SyncClient client, String tableName) { + DescribeTableRequest request = new DescribeTableRequest(tableName); + DescribeTableResponse response = client.describeTable(request); + + TableMeta tableMeta = response.getTableMeta(); + System.out.println("表的名称:" + tableMeta.getTableName()); + SSEDetails sseDetails = response.getSseDetails(); + if (sseDetails.isEnable()) { + System.out.println("表是否开启服务器端加密功能:是"); + System.out.println("表的加密秘钥类型:" + sseDetails.getKeyType().toString()); + System.out.println("表的加密主密钥id:" + sseDetails.getKeyId()); + if (sseDetails.getKeyType() == SSEKeyType.SSE_BYOK) { + System.out.println("表的全局资源描述符:" + sseDetails.getRoleArn()); + } + } else { + System.out.println("表是否开启服务器端加密功能:否"); + } + } + + private static void deleteTableIfExist(SyncClient client, String tableName) { + ListTableResponse response = client.listTable(); + if (response.getTableNames().contains(tableName)) { + DeleteTableRequest request = new DeleteTableRequest(tableName); + client.deleteTable(request); + } + } + + private static void putRow(SyncClient client, String tableName, String pkValue) { + // 构造主键 + PrimaryKeyBuilder primaryKeyBuilder = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + primaryKeyBuilder.addPrimaryKeyColumn(PRIMARY_KEY_NAME, PrimaryKeyValue.fromString(pkValue)); + PrimaryKey primaryKey = primaryKeyBuilder.build(); + + RowPutChange rowPutChange = new RowPutChange(tableName, primaryKey); + + //加入一些属性列 + long ts = System.currentTimeMillis(); + rowPutChange.addColumn(new Column("price", ColumnValue.fromLong(5120), ts)); + + client.putRow(new PutRowRequest(rowPutChange)); + } + + private static void getRow(SyncClient client, String tableName, String pkValue) { + // 构造主键 + PrimaryKeyBuilder primaryKeyBuilder = PrimaryKeyBuilder.createPrimaryKeyBuilder(); + primaryKeyBuilder.addPrimaryKeyColumn(PRIMARY_KEY_NAME, PrimaryKeyValue.fromString(pkValue)); + PrimaryKey primaryKey = primaryKeyBuilder.build(); + + // 读一行 + SingleRowQueryCriteria criteria = new SingleRowQueryCriteria(tableName, primaryKey); + // 设置读取最新版本 + criteria.setMaxVersions(1); + GetRowResponse getRowResponse = client.getRow(new GetRowRequest(criteria)); + Row row = getRowResponse.getRow(); + + System.out.println("读取行完毕, 结果为: "); + System.out.println(row); + } +} diff --git a/src/test/java/examples/WriterSample.java b/src/test/java/examples/WriterSample.java new file mode 100644 index 0000000..60e4121 --- /dev/null +++ b/src/test/java/examples/WriterSample.java @@ -0,0 +1,233 @@ +package examples; + +import com.alicloud.openservices.tablestore.*; +import com.alicloud.openservices.tablestore.core.auth.DefaultCredentials; +import com.alicloud.openservices.tablestore.core.auth.ServiceCredentials; +import com.alicloud.openservices.tablestore.model.*; +import com.alicloud.openservices.tablestore.writer.RowWriteResult; +import com.alicloud.openservices.tablestore.writer.WriterConfig; +import com.alicloud.openservices.tablestore.writer.WriterResult; +import com.alicloud.openservices.tablestore.writer.enums.BatchRequestType; +import com.alicloud.openservices.tablestore.writer.enums.DispatchMode; +import com.alicloud.openservices.tablestore.writer.enums.WriteMode; + +import java.util.LinkedList; +import java.util.List; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.Future; +import java.util.concurrent.atomic.AtomicLong; + +import static org.apache.commons.codec.digest.DigestUtils.md5Hex; + + +public class WriterSample { + private static String endpoint = "https://[instanceName].cn-hangzhou.ots.aliyuncs.com"; + private static String instanceName = "instanceName"; + private static String accessKeyId = "XXXXXXXXXX"; + private static String accessKeySecret = "XXXXXXXXXXXXXXXXXXXXXX"; + private static String tableName = "tableName"; + + private static AtomicLong succeedRows = new AtomicLong(); + private static AtomicLong failedRows = new AtomicLong(); + + public static void main(String[] args) { + WriterSample sample = new WriterSample(); + + /** + * 使用Writer前确保表已存在 + * 1、writer会校验表的存在性 + * 2、校验写入数据是否与表的字段、类型一致 + * */ + sample.tryCreateTable(); + + /** + * 初始化建议使用 + * DefaultTableStoreWriter( + * String endpoint, // 实例域名 + * ServiceCredentials credentials, // 认证信息:含AK,也支持token + * String instanceName, // 实例名 + * String tableName, // 表名:一个writer仅针对一个表 + * WriterConfig config, // writer的配置 + * TableStoreCallback resultCallback // 行级别回调 + * ) + * */ + TableStoreWriter writer = sample.createTablesStoreWriter(); + + /** + * Future使用: 批量写 + * */ + sample.writeRowListWithFuture(writer); + + /** + * Future使用: 单行写 + * */ + sample.writeSingleRowWithFuture(writer); + + System.out.println("Count by TablestoreCallback: failedRow=" + failedRows.get() + ", succeedRow=" + succeedRows.get()); + System.out.println("Count by WriterStatics: " + writer.getWriterStatistics()); + + /** + * 用户需要主动关闭Writer,内部等候所有队列数据写入后,自动关闭client与内部的线程池 + * */ + writer.close(); + } + + + private TableStoreWriter createTablesStoreWriter() { + + WriterConfig config = new WriterConfig(); + config.setWriteMode(WriteMode.SEQUENTIAL); // 串行写(每个筒内串行写) + config.setBatchRequestType(BatchRequestType.BULK_IMPORT); // 底层构建BulkImportRequest做批量写 + config.setDispatchMode(DispatchMode.HASH_PRIMARY_KEY); // 基于主键哈希值做分筒,保证同主键落在一个桶内,有序写 + config.setBucketCount(100); // 分筒数,提升串行写并发,未达机器瓶颈时与写入速率正相关 + config.setCallbackThreadCount(16); // 设置Writer内部Callback运行的线程池线程数 + config.setAllowDuplicatedRowInBatchRequest(false); // 底层构建的批量请求内,不允许有重复行(主要针对二级索引,如果含有忽略用户设置,false覆盖) + + /** + * 用户自定义的行级别callback + * 该示例通过成功、失败计数,简单展示回调能力 + * */ + TableStoreCallback resultCallback = new TableStoreCallback() { + @Override + public void onCompleted(RowChange rowChange, RowWriteResult cc) { + succeedRows.incrementAndGet(); + } + + @Override + public void onFailed(RowChange rowChange, Exception ex) { + failedRows.incrementAndGet(); + } + }; + + ServiceCredentials credentials = new DefaultCredentials(accessKeyId, accessKeySecret); + + + /** + * 推荐使用内部构建的线程池与Client,方便用户使用,隔离初始化、释放的逻辑 + * */ + DefaultTableStoreWriter writer = new DefaultTableStoreWriter( + endpoint, credentials, instanceName, tableName, config, resultCallback); + + return writer; + } + + + private void tryCreateTable() { + SyncClient ots = new SyncClient(endpoint, accessKeyId, accessKeySecret, instanceName); + + try { + ots.deleteTable(new DeleteTableRequest(tableName)); + } catch (Exception e) { + } + + TableMeta tableMeta = new TableMeta(tableName); + tableMeta.addPrimaryKeyColumn("pk_0", PrimaryKeyType.STRING); + tableMeta.addPrimaryKeyColumn("pk_1", PrimaryKeyType.STRING); + tableMeta.addPrimaryKeyColumn("pk_2", PrimaryKeyType.INTEGER); + TableOptions tableOptions = new TableOptions(-1, 1); + CreateTableRequest request = new CreateTableRequest( + tableMeta, tableOptions, new ReservedThroughput(new CapacityUnit(0, 0))); + + try { + CreateTableResponse res = ots.createTable(request); + } catch (Exception e) { + throw new ClientException(e); + } finally { + ots.shutdown(); + } + } + + + public void writeSingleRowWithFuture(TableStoreWriter writer) { + System.out.println("=========================================================[Start]"); + System.out.println("Write Single Row With Future"); + int rowsCount = 20; + int columnsCount = 10; + String strValue = "1234567890"; + AtomicLong rowIndex = new AtomicLong(-1); + + List> futures = new LinkedList>(); + for (long index = rowIndex.incrementAndGet(); index < rowsCount; index = rowIndex.incrementAndGet()) { + + PrimaryKey pk = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("pk_0", PrimaryKeyValue.fromString(md5Hex(index + ""))) + .addPrimaryKeyColumn("pk_1", PrimaryKeyValue.fromString("pk" + index)) + .addPrimaryKeyColumn("pk_2", PrimaryKeyValue.fromLong(index % 5)) + .build(); + + RowUpdateChange rowChange = new RowUpdateChange(tableName, pk); + for (int j = 0; j < columnsCount; j++) { + rowChange.put("column_" + j, ColumnValue.fromString(strValue)); + } + rowChange.put("index", ColumnValue.fromLong(index)); + Future future = writer.addRowChangeWithFuture(rowChange); + futures.add(future); + } + + System.out.println("Write thread finished."); + writer.flush(); + + printFutureResult(futures); + + System.out.println("=========================================================[Finish]"); + } + + + public void writeRowListWithFuture(TableStoreWriter writer) { + System.out.println("=========================================================[Start]"); + System.out.println("Write Row List With Future"); + + int rowsCount = 10000; + int columnsCount = 10; + String strValue = "1234567890"; + AtomicLong rowIndex = new AtomicLong(-1); + + List> futures = new LinkedList>(); + List rowChanges = new LinkedList(); + for (long index = rowIndex.incrementAndGet(); index < rowsCount; index = rowIndex.incrementAndGet()) { + + PrimaryKey pk = PrimaryKeyBuilder.createPrimaryKeyBuilder() + .addPrimaryKeyColumn("pk_0", PrimaryKeyValue.fromString(md5Hex(index + ""))) + .addPrimaryKeyColumn("pk_1", PrimaryKeyValue.fromString("pk" + index)) + .addPrimaryKeyColumn("pk_2", PrimaryKeyValue.fromLong(index % 5)) + .build(); + + RowUpdateChange rowChange = new RowUpdateChange(tableName, pk); + for (int j = 0; j < columnsCount; j++) { + rowChange.put("column_" + j, ColumnValue.fromString(strValue)); + } + rowChange.put("index", ColumnValue.fromLong(index)); + rowChanges.add(rowChange); + if (Math.random() > 0.995 || index == rowsCount - 1) { + Future future = writer.addRowChangeWithFuture(rowChanges); + futures.add(future); + rowChanges.clear(); + } + } + + System.out.println("Write thread finished."); + writer.flush(); + printFutureResult(futures); + System.out.println("=========================================================[Finish]"); + } + + private void printFutureResult(List> futures) { + int totalRow = 0; + + for (int index = 0; index < futures.size(); index++) { + try { + WriterResult result = futures.get(index).get(); + totalRow += result.getTotalCount(); + System.out.println(String.format( + "Future[%d] finished:\tfailed: %d\tsucceed: %d\tfutureBatch: %d\ttotalFinished: %d", + index, result.getFailedRows().size(), result.getSucceedRows().size(), + result.getTotalCount(), totalRow)); + + } catch (InterruptedException e) { + e.printStackTrace(); + } catch (ExecutionException e) { + e.printStackTrace(); + } + } + } +} diff --git a/src/test/resources/conf.properties b/src/test/resources/conf.properties index 5aac179..e23b816 100644 --- a/src/test/resources/conf.properties +++ b/src/test/resources/conf.properties @@ -3,3 +3,4 @@ ots.endpoint= ots.accesskeyid= ots.accesskeysecret= ots.instancename= +ots.instancenameinternal=