Exemple #1
0
 /// <summary>Snippet for MutateAccountBudgetProposal</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void MutateAccountBudgetProposalRequestObject()
 {
     // Create client
     AccountBudgetProposalServiceClient accountBudgetProposalServiceClient = AccountBudgetProposalServiceClient.Create();
     // Initialize request argument(s)
     MutateAccountBudgetProposalRequest request = new MutateAccountBudgetProposalRequest
     {
         CustomerId   = "",
         Operation    = new AccountBudgetProposalOperation(),
         ValidateOnly = false,
     };
     // Make the request
     MutateAccountBudgetProposalResponse response = accountBudgetProposalServiceClient.MutateAccountBudgetProposal(request);
 }
Exemple #2
0
        public async Task MutateAccountBudgetProposalAsync2()
        {
            Mock <AccountBudgetProposalService.AccountBudgetProposalServiceClient> mockGrpcClient = new Mock <AccountBudgetProposalService.AccountBudgetProposalServiceClient>(MockBehavior.Strict);
            MutateAccountBudgetProposalRequest request = new MutateAccountBudgetProposalRequest
            {
                CustomerId = "customerId-1772061412",
                Operation  = new AccountBudgetProposalOperation(),
            };
            MutateAccountBudgetProposalResponse expectedResponse = new MutateAccountBudgetProposalResponse();

            mockGrpcClient.Setup(x => x.MutateAccountBudgetProposalAsync(request, It.IsAny <CallOptions>()))
            .Returns(new Grpc.Core.AsyncUnaryCall <MutateAccountBudgetProposalResponse>(Task.FromResult(expectedResponse), null, null, null, null));
            AccountBudgetProposalServiceClient  client   = new AccountBudgetProposalServiceClientImpl(mockGrpcClient.Object, null);
            MutateAccountBudgetProposalResponse response = await client.MutateAccountBudgetProposalAsync(request);

            Assert.AreEqual(expectedResponse, response);
            mockGrpcClient.VerifyAll();
        }
Exemple #3
0
        public void MutateAccountBudgetProposal2()
        {
            Mock <AccountBudgetProposalService.AccountBudgetProposalServiceClient> mockGrpcClient = new Mock <AccountBudgetProposalService.AccountBudgetProposalServiceClient>(MockBehavior.Strict);
            MutateAccountBudgetProposalRequest request = new MutateAccountBudgetProposalRequest
            {
                CustomerId = "customerId-1772061412",
                Operation  = new AccountBudgetProposalOperation(),
            };
            MutateAccountBudgetProposalResponse expectedResponse = new MutateAccountBudgetProposalResponse();

            mockGrpcClient.Setup(x => x.MutateAccountBudgetProposal(request, It.IsAny <CallOptions>()))
            .Returns(expectedResponse);
            AccountBudgetProposalServiceClient  client   = new AccountBudgetProposalServiceClientImpl(mockGrpcClient.Object, null);
            MutateAccountBudgetProposalResponse response = client.MutateAccountBudgetProposal(request);

            Assert.AreEqual(expectedResponse, response);
            mockGrpcClient.VerifyAll();
        }
        /// <summary>Snippet for MutateAccountBudgetProposalAsync</summary>
        public async Task MutateAccountBudgetProposalRequestObjectAsync()
        {
            // Snippet: MutateAccountBudgetProposalAsync(MutateAccountBudgetProposalRequest, CallSettings)
            // Additional: MutateAccountBudgetProposalAsync(MutateAccountBudgetProposalRequest, CancellationToken)
            // Create client
            AccountBudgetProposalServiceClient accountBudgetProposalServiceClient = await AccountBudgetProposalServiceClient.CreateAsync();

            // Initialize request argument(s)
            MutateAccountBudgetProposalRequest request = new MutateAccountBudgetProposalRequest
            {
                CustomerId   = "",
                Operation    = new AccountBudgetProposalOperation(),
                ValidateOnly = false,
            };
            // Make the request
            MutateAccountBudgetProposalResponse response = await accountBudgetProposalServiceClient.MutateAccountBudgetProposalAsync(request);

            // End snippet
        }
Exemple #5
0
        public void MutateAccountBudgetProposal()
        {
            moq::Mock <AccountBudgetProposalService.AccountBudgetProposalServiceClient> mockGrpcClient = new moq::Mock <AccountBudgetProposalService.AccountBudgetProposalServiceClient>(moq::MockBehavior.Strict);
            MutateAccountBudgetProposalRequest request = new MutateAccountBudgetProposalRequest
            {
                CustomerId = "customer_id3b3724cb",
                Operation  = new AccountBudgetProposalOperation(),
            };
            MutateAccountBudgetProposalResponse expectedResponse = new MutateAccountBudgetProposalResponse
            {
                Result = new MutateAccountBudgetProposalResult(),
            };

            mockGrpcClient.Setup(x => x.MutateAccountBudgetProposal(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(expectedResponse);
            AccountBudgetProposalServiceClient  client   = new AccountBudgetProposalServiceClientImpl(mockGrpcClient.Object, null);
            MutateAccountBudgetProposalResponse response = client.MutateAccountBudgetProposal(request.CustomerId, request.Operation);

            Assert.AreEqual(expectedResponse, response);
            mockGrpcClient.VerifyAll();
        }
Exemple #6
0
        public async stt::Task MutateAccountBudgetProposalAsync()
        {
            moq::Mock <AccountBudgetProposalService.AccountBudgetProposalServiceClient> mockGrpcClient = new moq::Mock <AccountBudgetProposalService.AccountBudgetProposalServiceClient>(moq::MockBehavior.Strict);
            MutateAccountBudgetProposalRequest request = new MutateAccountBudgetProposalRequest
            {
                CustomerId = "customer_id3b3724cb",
                Operation  = new AccountBudgetProposalOperation(),
            };
            MutateAccountBudgetProposalResponse expectedResponse = new MutateAccountBudgetProposalResponse
            {
                Result = new MutateAccountBudgetProposalResult(),
            };

            mockGrpcClient.Setup(x => x.MutateAccountBudgetProposalAsync(request, moq::It.IsAny <grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall <MutateAccountBudgetProposalResponse>(stt::Task.FromResult(expectedResponse), null, null, null, null));
            AccountBudgetProposalServiceClient  client = new AccountBudgetProposalServiceClientImpl(mockGrpcClient.Object, null);
            MutateAccountBudgetProposalResponse responseCallSettings = await client.MutateAccountBudgetProposalAsync(request.CustomerId, request.Operation, gaxgrpc::CallSettings.FromCancellationToken(st::CancellationToken.None));

            Assert.AreEqual(expectedResponse, responseCallSettings);
            MutateAccountBudgetProposalResponse responseCancellationToken = await client.MutateAccountBudgetProposalAsync(request.CustomerId, request.Operation, st::CancellationToken.None);

            Assert.AreEqual(expectedResponse, responseCancellationToken);
            mockGrpcClient.VerifyAll();
        }
Exemple #7
0
 /// <summary>
 /// Creates, updates, or removes account budget proposals.  Operation statuses
 /// are returned.
 /// </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 stt::Task <MutateAccountBudgetProposalResponse> MutateAccountBudgetProposalAsync(MutateAccountBudgetProposalRequest request, gaxgrpc::CallSettings callSettings = null)
 {
     Modify_MutateAccountBudgetProposalRequest(ref request, ref callSettings);
     return(_callMutateAccountBudgetProposal.Async(request, callSettings));
 }
Exemple #8
0
 partial void Modify_MutateAccountBudgetProposalRequest(ref MutateAccountBudgetProposalRequest request, ref gaxgrpc::CallSettings settings);
Exemple #9
0
 /// <summary>
 /// Creates, updates, or removes account budget proposals.  Operation statuses
 /// are returned.
 /// </summary>
 /// <param name="request">The request object containing all of the parameters for the API call.</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 <MutateAccountBudgetProposalResponse> MutateAccountBudgetProposalAsync(MutateAccountBudgetProposalRequest request, st::CancellationToken cancellationToken) =>
 MutateAccountBudgetProposalAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));
Exemple #10
0
 /// <summary>
 /// Creates, updates, or removes account budget proposals.  Operation statuses
 /// are returned.
 /// </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 virtual stt::Task <MutateAccountBudgetProposalResponse> MutateAccountBudgetProposalAsync(MutateAccountBudgetProposalRequest request, gaxgrpc::CallSettings callSettings = null) =>
 throw new sys::NotImplementedException();