Search in sources :

Example 6 with BaseBigtableDataClient

use of com.google.cloud.bigtable.data.v2.BaseBigtableDataClient in project gapic-generator-java by googleapis.

the class SyncReadModifyWriteRow method syncReadModifyWriteRow.

public static void syncReadModifyWriteRow() throws Exception {
    // It may require modifications to work in your environment.
    try (BaseBigtableDataClient baseBigtableDataClient = BaseBigtableDataClient.create()) {
        ReadModifyWriteRowRequest request = ReadModifyWriteRowRequest.newBuilder().setTableName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString()).setAppProfileId("appProfileId704923523").setRowKey(ByteString.EMPTY).addAllRules(new ArrayList<ReadModifyWriteRule>()).build();
        ReadModifyWriteRowResponse response = baseBigtableDataClient.readModifyWriteRow(request);
    }
}
Also used : ReadModifyWriteRowRequest(com.google.bigtable.v2.ReadModifyWriteRowRequest) ArrayList(java.util.ArrayList) ReadModifyWriteRowResponse(com.google.bigtable.v2.ReadModifyWriteRowResponse) BaseBigtableDataClient(com.google.cloud.bigtable.data.v2.BaseBigtableDataClient)

Example 7 with BaseBigtableDataClient

use of com.google.cloud.bigtable.data.v2.BaseBigtableDataClient in project gapic-generator-java by googleapis.

the class SyncReadModifyWriteRowStringBytestringListreadmodifywriterule method syncReadModifyWriteRowStringBytestringListreadmodifywriterule.

public static void syncReadModifyWriteRowStringBytestringListreadmodifywriterule() throws Exception {
    // It may require modifications to work in your environment.
    try (BaseBigtableDataClient baseBigtableDataClient = BaseBigtableDataClient.create()) {
        String tableName = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString();
        ByteString rowKey = ByteString.EMPTY;
        List<ReadModifyWriteRule> rules = new ArrayList<>();
        ReadModifyWriteRowResponse response = baseBigtableDataClient.readModifyWriteRow(tableName, rowKey, rules);
    }
}
Also used : ByteString(com.google.protobuf.ByteString) ArrayList(java.util.ArrayList) ReadModifyWriteRule(com.google.bigtable.v2.ReadModifyWriteRule) ByteString(com.google.protobuf.ByteString) ReadModifyWriteRowResponse(com.google.bigtable.v2.ReadModifyWriteRowResponse) BaseBigtableDataClient(com.google.cloud.bigtable.data.v2.BaseBigtableDataClient)

Example 8 with BaseBigtableDataClient

use of com.google.cloud.bigtable.data.v2.BaseBigtableDataClient in project gapic-generator-java by googleapis.

the class SyncReadModifyWriteRowTablenameBytestringListreadmodifywriterule method syncReadModifyWriteRowTablenameBytestringListreadmodifywriterule.

public static void syncReadModifyWriteRowTablenameBytestringListreadmodifywriterule() throws Exception {
    // It may require modifications to work in your environment.
    try (BaseBigtableDataClient baseBigtableDataClient = BaseBigtableDataClient.create()) {
        TableName tableName = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
        ByteString rowKey = ByteString.EMPTY;
        List<ReadModifyWriteRule> rules = new ArrayList<>();
        ReadModifyWriteRowResponse response = baseBigtableDataClient.readModifyWriteRow(tableName, rowKey, rules);
    }
}
Also used : TableName(com.google.bigtable.v2.TableName) ByteString(com.google.protobuf.ByteString) ArrayList(java.util.ArrayList) ReadModifyWriteRule(com.google.bigtable.v2.ReadModifyWriteRule) ReadModifyWriteRowResponse(com.google.bigtable.v2.ReadModifyWriteRowResponse) BaseBigtableDataClient(com.google.cloud.bigtable.data.v2.BaseBigtableDataClient)

Example 9 with BaseBigtableDataClient

use of com.google.cloud.bigtable.data.v2.BaseBigtableDataClient in project gapic-generator-java by googleapis.

the class SyncReadModifyWriteRowTablenameBytestringListreadmodifywriteruleString method syncReadModifyWriteRowTablenameBytestringListreadmodifywriteruleString.

public static void syncReadModifyWriteRowTablenameBytestringListreadmodifywriteruleString() throws Exception {
    // It may require modifications to work in your environment.
    try (BaseBigtableDataClient baseBigtableDataClient = BaseBigtableDataClient.create()) {
        TableName tableName = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
        ByteString rowKey = ByteString.EMPTY;
        List<ReadModifyWriteRule> rules = new ArrayList<>();
        String appProfileId = "appProfileId704923523";
        ReadModifyWriteRowResponse response = baseBigtableDataClient.readModifyWriteRow(tableName, rowKey, rules, appProfileId);
    }
}
Also used : TableName(com.google.bigtable.v2.TableName) ByteString(com.google.protobuf.ByteString) ArrayList(java.util.ArrayList) ReadModifyWriteRule(com.google.bigtable.v2.ReadModifyWriteRule) ByteString(com.google.protobuf.ByteString) ReadModifyWriteRowResponse(com.google.bigtable.v2.ReadModifyWriteRowResponse) BaseBigtableDataClient(com.google.cloud.bigtable.data.v2.BaseBigtableDataClient)

Example 10 with BaseBigtableDataClient

use of com.google.cloud.bigtable.data.v2.BaseBigtableDataClient in project gapic-generator-java by googleapis.

the class SyncCheckAndMutateRowStringBytestringRowfilterListmutationListmutation method syncCheckAndMutateRowStringBytestringRowfilterListmutationListmutation.

public static void syncCheckAndMutateRowStringBytestringRowfilterListmutationListmutation() throws Exception {
    // It may require modifications to work in your environment.
    try (BaseBigtableDataClient baseBigtableDataClient = BaseBigtableDataClient.create()) {
        String tableName = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString();
        ByteString rowKey = ByteString.EMPTY;
        RowFilter predicateFilter = RowFilter.newBuilder().build();
        List<Mutation> trueMutations = new ArrayList<>();
        List<Mutation> falseMutations = new ArrayList<>();
        CheckAndMutateRowResponse response = baseBigtableDataClient.checkAndMutateRow(tableName, rowKey, predicateFilter, trueMutations, falseMutations);
    }
}
Also used : RowFilter(com.google.bigtable.v2.RowFilter) ByteString(com.google.protobuf.ByteString) ArrayList(java.util.ArrayList) CheckAndMutateRowResponse(com.google.bigtable.v2.CheckAndMutateRowResponse) ByteString(com.google.protobuf.ByteString) Mutation(com.google.bigtable.v2.Mutation) BaseBigtableDataClient(com.google.cloud.bigtable.data.v2.BaseBigtableDataClient)

Aggregations

BaseBigtableDataClient (com.google.cloud.bigtable.data.v2.BaseBigtableDataClient)22 ArrayList (java.util.ArrayList)18 ByteString (com.google.protobuf.ByteString)12 Mutation (com.google.bigtable.v2.Mutation)10 CheckAndMutateRowResponse (com.google.bigtable.v2.CheckAndMutateRowResponse)6 ReadModifyWriteRowResponse (com.google.bigtable.v2.ReadModifyWriteRowResponse)6 TableName (com.google.bigtable.v2.TableName)6 MutateRowResponse (com.google.bigtable.v2.MutateRowResponse)5 ReadModifyWriteRule (com.google.bigtable.v2.ReadModifyWriteRule)4 RowFilter (com.google.bigtable.v2.RowFilter)4 CheckAndMutateRowRequest (com.google.bigtable.v2.CheckAndMutateRowRequest)2 ReadModifyWriteRowRequest (com.google.bigtable.v2.ReadModifyWriteRowRequest)2 BaseBigtableDataSettings (com.google.cloud.bigtable.data.v2.BaseBigtableDataSettings)2 MutateRowRequest (com.google.bigtable.v2.MutateRowRequest)1 MutateRowsRequest (com.google.bigtable.v2.MutateRowsRequest)1 MutateRowsResponse (com.google.bigtable.v2.MutateRowsResponse)1 ReadRowsRequest (com.google.bigtable.v2.ReadRowsRequest)1 ReadRowsResponse (com.google.bigtable.v2.ReadRowsResponse)1 SampleRowKeysRequest (com.google.bigtable.v2.SampleRowKeysRequest)1 SampleRowKeysResponse (com.google.bigtable.v2.SampleRowKeysResponse)1