/// <summary>
 /// Mutates a row atomically based on the output of a predicate Reader filter.
 /// </summary>
 /// <param name="request">
 /// The request object containing all of the parameters for the API call.
 /// </param>
 /// <param name="callSettings">
 /// If not null, applies overrides to this RPC call.
 /// </param>
 /// <returns>
 /// The RPC response.
 /// </returns>
 public override CheckAndMutateRowResponse CheckAndMutateRow(
     CheckAndMutateRowRequest request,
     CallSettings callSettings = null)
 {
     Modify_CheckAndMutateRowRequest(ref request, ref callSettings);
     return(_callCheckAndMutateRow.Sync(request, callSettings));
 }
        private static CheckAndMutateRowRequest CreateCheckAndMutateRowRequest(
            TableName tableName,
            BigtableByteString rowKey,
            RowFilter predicateFilter,
            IEnumerable <Mutation> trueMutations,
            IEnumerable <Mutation> falseMutations)
        {
            GaxPreconditions.CheckNotNull(tableName, nameof(tableName));
            GaxPreconditions.CheckArgument(rowKey.Length != 0, nameof(rowKey), "The row key must not empty");

            var request = new CheckAndMutateRowRequest
            {
                TableNameAsTableName = tableName,
                RowKey          = rowKey.Value,
                PredicateFilter = predicateFilter,
                TrueMutations   = { Utilities.ValidateCollection(trueMutations, nameof(trueMutations), allowNullCollection: true) },
                FalseMutations  = { Utilities.ValidateCollection(falseMutations, nameof(falseMutations), allowNullCollection: true) }
            };

            GaxPreconditions.CheckArgument(
                request.TrueMutations.Count + request.FalseMutations.Count != 0,
                nameof(trueMutations),
                "There must be at least one mutation.");
            return(request);
        }
        /// <inheritdoc/>
        public override CheckAndMutateRowResponse CheckAndMutateRow(
            CheckAndMutateRowRequest request,
            gaxgrpc::CallSettings callSettings = null)
        {
            if (request.AppProfileId == null)
            {
                request.AppProfileId = _appProfileId;
            }

            return(GetUnderlyingClient().CheckAndMutateRow(request, callSettings));
        }
Example #4
0
        /// <inheritdoc/>
        public override CheckAndMutateRowResponse CheckAndMutateRow(
            CheckAndMutateRowRequest request,
            gaxgrpc::CallSettings callSettings = null)
        {
            if (_appProfileId != null && request.AppProfileId.Length == 0)
            {
                request.AppProfileId = _appProfileId;
            }

            return(_client.CheckAndMutateRow(request, callSettings));
        }
        /// <inheritdoc/>
        public override Task <CheckAndMutateRowResponse> CheckAndMutateRowAsync(
            CheckAndMutateRowRequest request,
            CallSettings callSettings = null)
        {
            if (request.AppProfileId == null)
            {
                request.AppProfileId = _appProfileId;
            }

            return(GetUnderlyingClient().CheckAndMutateRowAsync(request, callSettings));
        }
 /// <summary>
 /// Mutates a row atomically based on the output of a predicate Reader filter.
 /// </summary>
 /// <param name="request">
 /// The request object containing all of the parameters for the API call.
 /// If the <see cref="CheckAndMutateRowRequest.AppProfileId"/> has not been specified, it will be initialized from the value stored in the client.
 /// </param>
 /// <param name="callSettings">
 /// If not null, applies overrides to this RPC call.
 /// </param>
 /// <returns>
 /// The RPC response.
 /// </returns>
 public virtual CheckAndMutateRowResponse CheckAndMutateRow(
     CheckAndMutateRowRequest request,
     gaxgrpc::CallSettings callSettings = null)
 {
     throw new sys::NotImplementedException();
 }
 /// <summary>
 /// Mutates a row atomically based on the output of a predicate Reader filter.
 /// </summary>
 /// <param name="request">
 /// The request object containing all of the parameters for the API call.
 /// If the <see cref="CheckAndMutateRowRequest.AppProfileId"/> has not been specified, it will be initialized from the value stored in the client.
 /// </param>
 /// <param name="cancellationToken">
 /// A <see cref="st::CancellationToken"/> to use for this RPC.
 /// </param>
 /// <returns>
 /// A Task containing the RPC response.
 /// </returns>
 public virtual stt::Task <CheckAndMutateRowResponse> CheckAndMutateRowAsync(
     CheckAndMutateRowRequest request,
     st::CancellationToken cancellationToken) => CheckAndMutateRowAsync(
     request,
     gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));
 partial void Modify_CheckAndMutateRowRequest(ref CheckAndMutateRowRequest request, ref CallSettings settings) =>
 TryApplyAppProfileId(request, r => r.AppProfileId, (r, a) => r.AppProfileId = a);
 partial void Modify_CheckAndMutateRowRequest(ref CheckAndMutateRowRequest request, ref CallSettings settings) =>
 ApplyResourcePrefixHeader(ref settings, request.TableName);
Example #10
0
 /// <inheritdoc/>
 public override stt::Task <CheckAndMutateRowResponse> CheckAndMutateRowAsync(CheckAndMutateRowRequest request, gaxgrpc::CallSettings callSettings = null) => _client.CheckAndMutateRowAsync(request, callSettings);
Example #11
0
 /// <inheritdoc/>
 public override CheckAndMutateRowResponse CheckAndMutateRow(CheckAndMutateRowRequest request, gaxgrpc::CallSettings callSettings = null) => _client.CheckAndMutateRow(request, callSettings);
Example #12
0
 /// <summary>
 /// Mutates a row atomically based on the output of a predicate Reader filter.
 /// </summary>
 /// <param name="request">The request object containing all of the parameters for the API call. If the <see cref="CheckAndMutateRowRequest.AppProfileId"/> has not been specified, it will be initialized from the value stored in the client.</param>
 /// <param name="callSettings">If not null, applies overrides to this RPC call.</param>
 /// <returns>A Task containing the RPC response.</returns>
 public virtual stt::Task <CheckAndMutateRowResponse> CheckAndMutateRowAsync(CheckAndMutateRowRequest request, gaxgrpc::CallSettings callSettings = null) =>
 throw new sys::NotImplementedException();
 /// <summary>
 /// Mutates a row atomically based on the output of a predicate Reader filter.
 /// </summary>
 /// <param name="request">
 /// The request object containing all of the parameters for the API call.
 /// If the <see cref="CheckAndMutateRowRequest.AppProfileId"/> has not been specified, it will be initialized from the value stored in the client.
 /// </param>
 /// <param name="callSettings">
 /// If not null, applies overrides to this RPC call.
 /// </param>
 /// <returns>
 /// A Task containing the RPC response.
 /// </returns>
 public virtual Task <CheckAndMutateRowResponse> CheckAndMutateRowAsync(
     CheckAndMutateRowRequest request,
     CallSettings callSettings = null)
 {
     throw new NotImplementedException();
 }
 partial void Modify_CheckAndMutateRowRequest(ref CheckAndMutateRowRequest request, ref CallSettings settings);