ali_ots 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +7 -0
  2. data/lib/ali_ots.rb +127 -0
  3. data/lib/ali_ots/client.rb +183 -0
  4. data/lib/ali_ots/connection.rb +118 -0
  5. data/lib/ali_ots/metas/batch_get_row_request.rb +17 -0
  6. data/lib/ali_ots/metas/batch_get_row_response.rb +17 -0
  7. data/lib/ali_ots/metas/batch_write_row_request.rb +17 -0
  8. data/lib/ali_ots/metas/batch_write_row_response.rb +17 -0
  9. data/lib/ali_ots/metas/capacity_unit.rb +19 -0
  10. data/lib/ali_ots/metas/column.rb +19 -0
  11. data/lib/ali_ots/metas/column_schema.rb +18 -0
  12. data/lib/ali_ots/metas/column_update.rb +21 -0
  13. data/lib/ali_ots/metas/column_value.rb +27 -0
  14. data/lib/ali_ots/metas/condition.rb +16 -0
  15. data/lib/ali_ots/metas/consumed_capacity.rb +17 -0
  16. data/lib/ali_ots/metas/create_table_request.rb +18 -0
  17. data/lib/ali_ots/metas/delete_row_in_batch_write_row_request.rb +19 -0
  18. data/lib/ali_ots/metas/delete_row_request.rb +21 -0
  19. data/lib/ali_ots/metas/delete_row_response.rb +17 -0
  20. data/lib/ali_ots/metas/delete_table_request.rb +17 -0
  21. data/lib/ali_ots/metas/describe_table_request.rb +16 -0
  22. data/lib/ali_ots/metas/describe_table_response.rb +18 -0
  23. data/lib/ali_ots/metas/enums/column_type.rb +32 -0
  24. data/lib/ali_ots/metas/enums/direction.rb +21 -0
  25. data/lib/ali_ots/metas/enums/operation_type.rb +22 -0
  26. data/lib/ali_ots/metas/enums/row_existence_expectation.rb +21 -0
  27. data/lib/ali_ots/metas/error.rb +19 -0
  28. data/lib/ali_ots/metas/get_range_request.rb +27 -0
  29. data/lib/ali_ots/metas/get_range_response.rb +21 -0
  30. data/lib/ali_ots/metas/get_row_request.rb +21 -0
  31. data/lib/ali_ots/metas/get_row_response.rb +18 -0
  32. data/lib/ali_ots/metas/list_table_request.rb +14 -0
  33. data/lib/ali_ots/metas/list_table_response.rb +16 -0
  34. data/lib/ali_ots/metas/put_row_in_batch_write_row_request.rb +21 -0
  35. data/lib/ali_ots/metas/put_row_request.rb +22 -0
  36. data/lib/ali_ots/metas/put_row_response.rb +17 -0
  37. data/lib/ali_ots/metas/reserved_throughput.rb +16 -0
  38. data/lib/ali_ots/metas/reserved_throughput_details.rb +22 -0
  39. data/lib/ali_ots/metas/row.rb +19 -0
  40. data/lib/ali_ots/metas/row_in_batch_get_row_request.rb +17 -0
  41. data/lib/ali_ots/metas/row_in_batch_get_row_response.rb +23 -0
  42. data/lib/ali_ots/metas/row_in_batch_write_row_response.rb +21 -0
  43. data/lib/ali_ots/metas/table_in_batch_get_row_request.rb +21 -0
  44. data/lib/ali_ots/metas/table_in_batch_get_row_response.rb +20 -0
  45. data/lib/ali_ots/metas/table_in_batch_write_row_request.rb +23 -0
  46. data/lib/ali_ots/metas/table_in_batch_write_row_response.rb +23 -0
  47. data/lib/ali_ots/metas/table_meta.rb +18 -0
  48. data/lib/ali_ots/metas/table_primary_key.rb +21 -0
  49. data/lib/ali_ots/metas/update_row_in_batch_write_row_request.rb +21 -0
  50. data/lib/ali_ots/metas/update_row_request.rb +22 -0
  51. data/lib/ali_ots/metas/update_row_response.rb +17 -0
  52. data/lib/ali_ots/metas/update_table_request.rb +18 -0
  53. data/lib/ali_ots/metas/update_table_response.rb +16 -0
  54. data/lib/ali_ots/version.rb +3 -0
  55. metadata +138 -0
@@ -0,0 +1,19 @@
1
+ module AliOts
2
+ module Metas
3
+ #用于在操作失败时的响应消息中表示错误信息,以及在BatchGetRow和BatchWriteRow操作的响应消息中表示单行请求的错误。
4
+ class Error < ::Protobuf::Message
5
+ required :string, :code, 1
6
+ optional :string, :message, 2
7
+ end
8
+ end
9
+ end
10
+
11
+
12
+
13
+ =begin
14
+ Error {
15
+ required string code = 1;
16
+ optional string message = 2;
17
+ }
18
+
19
+ =end
@@ -0,0 +1,27 @@
1
+ module AliOts
2
+ module Metas
3
+ #读取指定主键范围内的数据。
4
+ class GetRangeRequest < ::Protobuf::Message
5
+ required :string, :table_name, 1;
6
+ required AliOts::Metas::Enums::Direction, :direction, 2;
7
+ repeated :string, :columns_to_get, 3;
8
+ optional :int32, :limit, 4;
9
+ repeated AliOts::Metas::Column, :inclusive_start_primary_key, 5;
10
+ repeated AliOts::Metas::Column, :exclusive_end_primary_key, 6;
11
+ end
12
+ end
13
+ end
14
+
15
+
16
+
17
+ =begin
18
+ message GetRangeRequest {
19
+ required string table_name = 1;
20
+ required Direction direction = 2;
21
+ repeated string columns_to_get = 3;
22
+ optional int32 limit = 4;
23
+ repeated Column inclusive_start_primary_key = 5;
24
+ repeated Column exclusive_end_primary_key = 6;
25
+ }
26
+
27
+ =end
@@ -0,0 +1,21 @@
1
+ module AliOts
2
+ module Metas
3
+ #读取指定主键范围内的数据。
4
+ class GetRangeResponse < ::Protobuf::Message
5
+ required AliOts::Metas::ConsumedCapacity, :consumed, 1
6
+ repeated AliOts::Metas::Column, :next_start_primary_key, 2
7
+ repeated AliOts::Metas::Row, :rows, 3
8
+ end
9
+ end
10
+ end
11
+
12
+
13
+
14
+ =begin
15
+ message GetRangeResponse {
16
+ required ConsumedCapacity consumed = 1;
17
+ repeated Column next_start_primary_key = 2;
18
+ repeated Row rows = 3;
19
+ }
20
+
21
+ =end
@@ -0,0 +1,21 @@
1
+ module AliOts
2
+ module Metas
3
+ #根据给定的主键读取单行数据。
4
+ class GetRowRequest < ::Protobuf::Message
5
+ required :string, :table_name, 1
6
+ repeated AliOts::Metas::Column, :primary_key, 2
7
+ repeated :string, :columns_to_get, 3
8
+ end
9
+ end
10
+ end
11
+
12
+
13
+
14
+ =begin
15
+ message GetRowRequest {
16
+ required string table_name = 1;
17
+ repeated Column primary_key = 2;
18
+ repeated string columns_to_get = 3;
19
+ }
20
+
21
+ =end
@@ -0,0 +1,18 @@
1
+ module AliOts
2
+ module Metas
3
+ #根据给定的主键读取单行数据。
4
+ class GetRowResponse < ::Protobuf::Message
5
+ required AliOts::Metas::ConsumedCapacity, :consumed, 1
6
+ required AliOts::Metas::Row, :row, 2
7
+ end
8
+ end
9
+ end
10
+
11
+
12
+
13
+ =begin
14
+ message GetRowResponse {
15
+ required ConsumedCapacity consumed = 1;
16
+ required Row row = 2;
17
+ }
18
+ =end
@@ -0,0 +1,14 @@
1
+ module AliOts
2
+ module Metas
3
+ #获取当前实例下已创建的所有表的表名。
4
+ class ListTableRequest < ::Protobuf::Message
5
+ end
6
+ end
7
+ end
8
+
9
+
10
+
11
+ =begin
12
+ message ListTableRequest {
13
+ }
14
+ =end
@@ -0,0 +1,16 @@
1
+ module AliOts
2
+ module Metas
3
+ #查询指定表的结构信息和预留读写吞吐量设置信息。
4
+ class ListTableResponse < ::Protobuf::Message
5
+ repeated :string, :table_names, 1
6
+ end
7
+ end
8
+ end
9
+
10
+
11
+
12
+ =begin
13
+ message ListTableResponse {
14
+ repeated string table_names = 1;
15
+ }
16
+ =end
@@ -0,0 +1,21 @@
1
+ module AliOts
2
+ module Metas
3
+ #在BatchWriteRow操作中,表示要插入的一行信息。
4
+ class PutRowInBatchWriteRowRequest < ::Protobuf::Message
5
+ required AliOts::Metas::Condition, :condition, 1
6
+ repeated AliOts::Metas::Column, :primary_key, 2
7
+ repeated AliOts::Metas::Column, :attribute_columns, 3
8
+ end
9
+ end
10
+ end
11
+
12
+
13
+
14
+ =begin
15
+ message PutRowInBatchWriteRowRequest {
16
+ required Condition condition = 1;
17
+ repeated Column primary_key = 2;
18
+ repeated Column attribute_columns = 3;
19
+ }
20
+
21
+ =end
@@ -0,0 +1,22 @@
1
+ module AliOts
2
+ module Metas
3
+ #插入数据到指定的行,如果该行不存在,则新增一行;若该行存在,则覆盖原有行。
4
+ class PutRowRequest < ::Protobuf::Message
5
+ required :string, :table_name, 1
6
+ required AliOts::Metas::Condition, :condition, 2
7
+ repeated AliOts::Metas::Column, :primary_key, 3
8
+ repeated AliOts::Metas::Column, :attribute_columns, 4
9
+ end
10
+ end
11
+ end
12
+
13
+
14
+
15
+ =begin
16
+ message PutRowRequest {
17
+ required string table_name = 1;
18
+ required Condition condition = 2;
19
+ repeated Column primary_key = 3;
20
+ repeated Column attribute_columns = 4;
21
+ }
22
+ =end
@@ -0,0 +1,17 @@
1
+ module AliOts
2
+ module Metas
3
+ #插入数据到指定的行,如果该行不存在,则新增一行;若该行存在,则覆盖原有行。
4
+ class PutRowResponse < ::Protobuf::Message
5
+ required AliOts::Metas::ConsumedCapacity, :consumed, 1
6
+ end
7
+ end
8
+ end
9
+
10
+
11
+
12
+ =begin
13
+ message PutRowResponse {
14
+ required ConsumedCapacity consumed = 1;
15
+ }
16
+
17
+ =end
@@ -0,0 +1,16 @@
1
+ module AliOts
2
+ module Metas
3
+ #表示一个表设置的预留读写吞吐量数值。
4
+ class ReservedThroughput < ::Protobuf::Message
5
+ required ::AliOts::Metas::CapacityUnit, :capacity_unit, 1;
6
+ end
7
+ end
8
+ end
9
+
10
+
11
+
12
+ =begin
13
+ message ReservedThroughput {
14
+ required CapacityUnit capacity_unit = 1;
15
+ }
16
+ =end
@@ -0,0 +1,22 @@
1
+ module AliOts
2
+ module Metas
3
+ #更新指定表的预留读吞吐量或预留写吞吐量设置,新设定将于更新成功一分钟内生效。
4
+ class ReservedThroughputDetails < ::Protobuf::Message
5
+ required AliOts::Metas::CapacityUnit, :capacity_unit, 1
6
+ required :int64, :last_increase_time, 2
7
+ optional :int64, :last_decrease_time, 3
8
+ required :int32, :number_of_decreases_today, 4
9
+ end
10
+ end
11
+ end
12
+
13
+
14
+
15
+ =begin
16
+ message ReservedThroughputDetails {
17
+ required CapacityUnit capacity_unit = 1;
18
+ required int64 last_increase_time = 2;
19
+ optional int64 last_decrease_time = 3;
20
+ required int32 number_of_decreases_today = 4;
21
+ }
22
+ =end
@@ -0,0 +1,19 @@
1
+ module AliOts
2
+ module Metas
3
+ #在GetRow和GetRange的响应消息中,表示一行数据。
4
+ class Row < ::Protobuf::Message
5
+ repeated AliOts::Metas::Column, :primary_key_columns, 1
6
+ repeated AliOts::Metas::Column, :attribute_columns, 2
7
+ end
8
+ end
9
+ end
10
+
11
+
12
+
13
+ =begin
14
+ message Row {
15
+ repeated Column primary_key_columns = 1;
16
+ repeated Column attribute_columns = 2;
17
+ }
18
+
19
+ =end
@@ -0,0 +1,17 @@
1
+ module AliOts
2
+ module Metas
3
+ #在BatchGetRow操作中,表示要读取的一行请求信息。
4
+ class RowInBatchGetRowRequest < ::Protobuf::Message
5
+ repeated AliOts::Metas::Column, :primary_key, 1
6
+ end
7
+ end
8
+ end
9
+
10
+
11
+
12
+ =begin
13
+ message RowInBatchGetRowRequest {
14
+ repeated Column primary_key = 1;
15
+ }
16
+
17
+ =end
@@ -0,0 +1,23 @@
1
+ module AliOts
2
+ module Metas
3
+ #在BatchGetRow操作的返回消息中,表示一行数据。
4
+ class RowInBatchGetRowResponse < ::Protobuf::Message
5
+ required :bool, :is_ok, 1;
6
+ optional AliOts::Metas::Error, :error, 2;
7
+ optional AliOts::Metas::ConsumedCapacity, :consumed, 3
8
+ optional AliOts::Metas::Row, :row, 4
9
+ end
10
+ end
11
+ end
12
+
13
+
14
+
15
+ =begin
16
+ message RowInBatchGetRowResponse {
17
+ required bool is_ok = 1 [default = true];
18
+ optional Error error = 2;
19
+ optional ConsumedCapacity consumed = 3;
20
+ optional Row row = 4;
21
+ }
22
+
23
+ =end
@@ -0,0 +1,21 @@
1
+ module AliOts
2
+ module Metas
3
+ #在BatchWriteRow操作的返回消息中,表示一行写入操作的结果。
4
+ class RowInBatchWriteRowResponse < ::Protobuf::Message
5
+ required :bool, :is_ok, 1
6
+ optional AliOts::Metas::Error, :error, 2
7
+ optional AliOts::Metas::ConsumedCapacity, :consumed, 3
8
+ end
9
+ end
10
+ end
11
+
12
+
13
+
14
+ =begin
15
+ message RowInBatchWriteRowResponse {
16
+ required bool is_ok = 1 [default = true];
17
+ optional Error error = 2;
18
+ optional ConsumedCapacity consumed = 3;
19
+ }
20
+
21
+ =end
@@ -0,0 +1,21 @@
1
+ module AliOts
2
+ module Metas
3
+ #在BatchGetRow操作中,表示要读取的一个表的请求信息。
4
+ class TableInBatchGetRowRequest < ::Protobuf::Message
5
+ required :string, :table_name, 1;
6
+ repeated AliOts::Metas::RowInBatchGetRowRequest, :rows, 2;
7
+ repeated :string, :columns_to_get, 3;
8
+ end
9
+ end
10
+ end
11
+
12
+
13
+
14
+ =begin
15
+ message TableInBatchGetRowRequest {
16
+ required string table_name = 1;
17
+ repeated RowInBatchGetRowRequest rows = 2;
18
+ repeated string columns_to_get = 3;
19
+ }
20
+
21
+ =end
@@ -0,0 +1,20 @@
1
+ module AliOts
2
+ module Metas
3
+ #在BatchGetRow操作的返回消息中,表示一个表的数据。
4
+ class TableInBatchGetRowResponse < ::Protobuf::Message
5
+ required :string, :table_name, 1
6
+ repeated AliOts::Metas::RowInBatchGetRowResponse, :rows, 2
7
+ end
8
+ end
9
+ end
10
+
11
+
12
+
13
+ =begin
14
+ message TableInBatchGetRowResponse {
15
+ required string table_name = 1;
16
+ repeated RowInBatchGetRowResponse rows = 2;
17
+ }
18
+
19
+
20
+ =end
@@ -0,0 +1,23 @@
1
+ module AliOts
2
+ module Metas
3
+ #在BatchWriteRow操作中,表示要写入的一个表的请求信息。
4
+ class TableInBatchWriteRowRequest < ::Protobuf::Message
5
+ required :string, :table_name, 1
6
+ repeated AliOts::Metas::PutRowInBatchWriteRowRequest, :put_rows, 2
7
+ repeated AliOts::Metas::UpdateRowInBatchWriteRowRequest, :update_rows, 3
8
+ repeated AliOts::Metas::DeleteRowInBatchWriteRowRequest, :delete_rows, 4
9
+ end
10
+ end
11
+ end
12
+
13
+
14
+
15
+ =begin
16
+ message TableInBatchWriteRowRequest {
17
+ required string table_name = 1;
18
+ repeated PutRowInBatchWriteRowRequest put_rows = 2;
19
+ repeated UpdateRowInBatchWriteRowRequest update_rows = 3;
20
+ repeated DeleteRowInBatchWriteRowRequest delete_rows = 4;
21
+ }
22
+
23
+ =end
@@ -0,0 +1,23 @@
1
+ module AliOts
2
+ module Metas
3
+ #在BatchWriteRow操作中,表示对一个表进行写入的结果。
4
+ class TableInBatchWriteRowResponse < ::Protobuf::Message
5
+ required :string, :table_name, 1
6
+ repeated AliOts::Metas::RowInBatchWriteRowResponse, :put_rows, 2
7
+ repeated AliOts::Metas::RowInBatchWriteRowResponse, :update_rows, 3
8
+ repeated AliOts::Metas::RowInBatchWriteRowResponse, :delete_rows, 4
9
+ end
10
+ end
11
+ end
12
+
13
+
14
+
15
+ =begin
16
+ message TableInBatchWriteRowResponse {
17
+ required string table_name = 1;
18
+ repeated RowInBatchWriteRowResponse put_rows = 2;
19
+ repeated RowInBatchWriteRowResponse update_rows = 3;
20
+ repeated RowInBatchWriteRowResponse delete_rows = 4;
21
+ }
22
+
23
+ =end
@@ -0,0 +1,18 @@
1
+ module AliOts
2
+ module Metas
3
+ #表示一个表的结构信息。
4
+ class TableMeta < ::Protobuf::Message
5
+ required :string, :table_name, 1
6
+ repeated AliOts::Metas::ColumnSchema, :primary_key, 2
7
+ end
8
+ end
9
+ end
10
+
11
+
12
+
13
+ =begin
14
+ message TableMeta {
15
+ required string table_name = 1;
16
+ repeated ColumnSchema primary_key = 2;
17
+ }
18
+ =end