Search in sources :

Example 16 with BaseBigtableDataClient

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

the class SyncCheckAndMutateRow method syncCheckAndMutateRow.

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

Example 17 with BaseBigtableDataClient

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

the class SyncCheckAndMutateRowStringBytestringRowfilterListmutationListmutationString method syncCheckAndMutateRowStringBytestringRowfilterListmutationListmutationString.

public static void syncCheckAndMutateRowStringBytestringRowfilterListmutationListmutationString() 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<>();
        String appProfileId = "appProfileId704923523";
        CheckAndMutateRowResponse response = baseBigtableDataClient.checkAndMutateRow(tableName, rowKey, predicateFilter, trueMutations, falseMutations, appProfileId);
    }
}
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)

Example 18 with BaseBigtableDataClient

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

the class SyncCheckAndMutateRowTablenameBytestringRowfilterListmutationListmutation method syncCheckAndMutateRowTablenameBytestringRowfilterListmutationListmutation.

public static void syncCheckAndMutateRowTablenameBytestringRowfilterListmutationListmutation() 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;
        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 : TableName(com.google.bigtable.v2.TableName) RowFilter(com.google.bigtable.v2.RowFilter) ByteString(com.google.protobuf.ByteString) ArrayList(java.util.ArrayList) CheckAndMutateRowResponse(com.google.bigtable.v2.CheckAndMutateRowResponse) Mutation(com.google.bigtable.v2.Mutation) BaseBigtableDataClient(com.google.cloud.bigtable.data.v2.BaseBigtableDataClient)

Example 19 with BaseBigtableDataClient

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

the class SyncCheckAndMutateRowTablenameBytestringRowfilterListmutationListmutationString method syncCheckAndMutateRowTablenameBytestringRowfilterListmutationListmutationString.

public static void syncCheckAndMutateRowTablenameBytestringRowfilterListmutationListmutationString() 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;
        RowFilter predicateFilter = RowFilter.newBuilder().build();
        List<Mutation> trueMutations = new ArrayList<>();
        List<Mutation> falseMutations = new ArrayList<>();
        String appProfileId = "appProfileId704923523";
        CheckAndMutateRowResponse response = baseBigtableDataClient.checkAndMutateRow(tableName, rowKey, predicateFilter, trueMutations, falseMutations, appProfileId);
    }
}
Also used : TableName(com.google.bigtable.v2.TableName) RowFilter(com.google.bigtable.v2.RowFilter) ByteString(com.google.protobuf.ByteString) ArrayList(java.util.ArrayList) CheckAndMutateRowResponse(com.google.bigtable.v2.CheckAndMutateRowResponse) Mutation(com.google.bigtable.v2.Mutation) ByteString(com.google.protobuf.ByteString) BaseBigtableDataClient(com.google.cloud.bigtable.data.v2.BaseBigtableDataClient)

Example 20 with BaseBigtableDataClient

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

the class SyncCreateSetCredentialsProvider method syncCreateSetCredentialsProvider.

public static void syncCreateSetCredentialsProvider() throws Exception {
    // This snippet has been automatically generated for illustrative purposes only.
    // It may require modifications to work in your environment.
    BaseBigtableDataSettings baseBigtableDataSettings = BaseBigtableDataSettings.newBuilder().setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)).build();
    BaseBigtableDataClient baseBigtableDataClient = BaseBigtableDataClient.create(baseBigtableDataSettings);
}
Also used : BaseBigtableDataSettings(com.google.cloud.bigtable.data.v2.BaseBigtableDataSettings) 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