コード例 #1
0
        /// <summary>
        /// Creates a commitment in the specified project using the data included in the request.
        /// </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 lro::Operation <Operation, Operation> Insert(InsertRegionCommitmentRequest request, gaxgrpc::CallSettings callSettings = null)
        {
            Modify_InsertRegionCommitmentRequest(ref request, ref callSettings);
            Operation response = _callInsert.Sync(request, callSettings);
            GetRegionOperationRequest pollRequest = GetRegionOperationRequest.FromInitialResponse(response);

            request.PopulatePollRequestFields(pollRequest);
            return(new lro::Operation <Operation, Operation>(response.ToLroResponse(pollRequest.ToLroOperationName()), InsertOperationsClient));
        }
コード例 #2
0
        /// <summary>
        /// Creates a commitment in the specified project using the data included in the request.
        /// </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>A Task containing the RPC response.</returns>
        public override async stt::Task <lro::Operation <Operation, Operation> > InsertAsync(InsertRegionCommitmentRequest request, gaxgrpc::CallSettings callSettings = null)
        {
            Modify_InsertRegionCommitmentRequest(ref request, ref callSettings);
            Operation response = await _callInsert.Async(request, callSettings).ConfigureAwait(false);

            GetRegionOperationRequest pollRequest = GetRegionOperationRequest.FromInitialResponse(response);

            request.PopulatePollRequestFields(pollRequest);
            return(new lro::Operation <Operation, Operation>(response.ToLroResponse(pollRequest.ToLroOperationName()), InsertOperationsClient));
        }