Esempio n. 1
0
        private static DropRowRangeRequest CreateDropRowRangeRequest(
            TableName tableName,
            ByteString rowKeyPrefix,
            bool deleteAllDataFromTable)
        {
            GaxPreconditions.CheckNotNull(tableName, nameof(tableName));
            var request = new DropRowRangeRequest {
                TableName = tableName
            };

            if (deleteAllDataFromTable)
            {
                request.DeleteAllDataFromTable = true;
            }
            else
            {
                GaxPreconditions.CheckNotNull(rowKeyPrefix, nameof(rowKeyPrefix));
                GaxPreconditions.CheckArgument(
                    rowKeyPrefix.Length != 0, nameof(rowKeyPrefix),
                    "The row key prefix must not empty");
                request.RowKeyPrefix = rowKeyPrefix;
            }
            return(request);
        }
Esempio n. 2
0
 partial void Modify_DropRowRangeRequest(ref DropRowRangeRequest request, ref CallSettings settings) =>
 ApplyResourcePrefixHeader(ref settings, request.Name);