/// <summary>Snippet for PromoteCampaignExperiment</summary>
        public void PromoteCampaignExperiment()
        {
            // Snippet: PromoteCampaignExperiment(string, CallSettings)
            // Create client
            CampaignExperimentServiceClient campaignExperimentServiceClient = CampaignExperimentServiceClient.Create();
            // Initialize request argument(s)
            string campaignExperiment = "";
            // Make the request
            Operation <Empty, Empty> response = campaignExperimentServiceClient.PromoteCampaignExperiment(campaignExperiment);

            // Poll until the returned long-running operation is complete
            Operation <Empty, Empty> completedResponse = response.PollUntilCompleted();
            // Retrieve the operation result
            Empty result = completedResponse.Result;

            // Or get the name of the operation
            string operationName = response.Name;
            // This name can be stored, then the long-running operation retrieved later by name
            Operation <Empty, Empty> retrievedResponse = campaignExperimentServiceClient.PollOncePromoteCampaignExperiment(operationName);

            // Check if the retrieved long-running operation has completed
            if (retrievedResponse.IsCompleted)
            {
                // If it has completed, then access the result
                Empty retrievedResult = retrievedResponse.Result;
            }
            // End snippet
        }
        /// <summary>Snippet for CreateCampaignExperiment</summary>
        public void CreateCampaignExperimentRequestObject()
        {
            // Snippet: CreateCampaignExperiment(CreateCampaignExperimentRequest, CallSettings)
            // Create client
            CampaignExperimentServiceClient campaignExperimentServiceClient = CampaignExperimentServiceClient.Create();
            // Initialize request argument(s)
            CreateCampaignExperimentRequest request = new CreateCampaignExperimentRequest
            {
                CustomerId         = "",
                CampaignExperiment = new CampaignExperiment(),
                ValidateOnly       = false,
            };
            // Make the request
            Operation <Empty, CreateCampaignExperimentMetadata> response = campaignExperimentServiceClient.CreateCampaignExperiment(request);

            // Poll until the returned long-running operation is complete
            Operation <Empty, CreateCampaignExperimentMetadata> completedResponse = response.PollUntilCompleted();
            // Retrieve the operation result
            Empty result = completedResponse.Result;

            // Or get the name of the operation
            string operationName = response.Name;
            // This name can be stored, then the long-running operation retrieved later by name
            Operation <Empty, CreateCampaignExperimentMetadata> retrievedResponse = campaignExperimentServiceClient.PollOnceCreateCampaignExperiment(operationName);

            // Check if the retrieved long-running operation has completed
            if (retrievedResponse.IsCompleted)
            {
                // If it has completed, then access the result
                Empty retrievedResult = retrievedResponse.Result;
            }
            // End snippet
        }
 /// <summary>Snippet for GetCampaignExperiment</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetCampaignExperimentResourceNames()
 {
     // Create client
     CampaignExperimentServiceClient campaignExperimentServiceClient = CampaignExperimentServiceClient.Create();
     // Initialize request argument(s)
     CampaignExperimentName resourceName = CampaignExperimentName.FromCustomerCampaignExperiment("[CUSTOMER_ID]", "[CAMPAIGN_EXPERIMENT_ID]");
     // Make the request
     CampaignExperiment response = campaignExperimentServiceClient.GetCampaignExperiment(resourceName);
 }
Esempio n. 4
0
 /// <summary>Snippet for GetCampaignExperiment</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetCampaignExperiment()
 {
     // Create client
     CampaignExperimentServiceClient campaignExperimentServiceClient = CampaignExperimentServiceClient.Create();
     // Initialize request argument(s)
     string resourceName = "customers/[CUSTOMER]/campaignExperiments/[CAMPAIGN_EXPERIMENT]";
     // Make the request
     CampaignExperiment response = campaignExperimentServiceClient.GetCampaignExperiment(resourceName);
 }
 /// <summary>Snippet for GraduateCampaignExperiment</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GraduateCampaignExperiment()
 {
     // Create client
     CampaignExperimentServiceClient campaignExperimentServiceClient = CampaignExperimentServiceClient.Create();
     // Initialize request argument(s)
     string campaignExperiment = "";
     string campaignBudget = "";
     // Make the request
     GraduateCampaignExperimentResponse response = campaignExperimentServiceClient.GraduateCampaignExperiment(campaignExperiment, campaignBudget);
 }
Esempio n. 6
0
        /// <summary>Snippet for EndCampaignExperiment</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public void EndCampaignExperiment()
        {
            // Create client
            CampaignExperimentServiceClient campaignExperimentServiceClient = CampaignExperimentServiceClient.Create();
            // Initialize request argument(s)
            string campaignExperiment = "";

            // Make the request
            campaignExperimentServiceClient.EndCampaignExperiment(campaignExperiment);
        }
Esempio n. 7
0
 /// <summary>Snippet for GetCampaignExperiment</summary>
 public void GetCampaignExperiment()
 {
     // Snippet: GetCampaignExperiment(string, CallSettings)
     // Create client
     CampaignExperimentServiceClient campaignExperimentServiceClient = CampaignExperimentServiceClient.Create();
     // Initialize request argument(s)
     string resourceName = "customers/[CUSTOMER_ID]/campaignExperiments/[CAMPAIGN_EXPERIMENT_ID]";
     // Make the request
     CampaignExperiment response = campaignExperimentServiceClient.GetCampaignExperiment(resourceName);
     // End snippet
 }
Esempio n. 8
0
        /// <summary>Snippet for EndCampaignExperiment</summary>
        public void EndCampaignExperiment()
        {
            // Snippet: EndCampaignExperiment(string, CallSettings)
            // Create client
            CampaignExperimentServiceClient campaignExperimentServiceClient = CampaignExperimentServiceClient.Create();
            // Initialize request argument(s)
            string campaignExperiment = "";

            // Make the request
            campaignExperimentServiceClient.EndCampaignExperiment(campaignExperiment);
            // End snippet
        }
Esempio n. 9
0
 /// <summary>Snippet for GetCampaignExperiment</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetCampaignExperimentRequestObject()
 {
     // Create client
     CampaignExperimentServiceClient campaignExperimentServiceClient = CampaignExperimentServiceClient.Create();
     // Initialize request argument(s)
     GetCampaignExperimentRequest request = new GetCampaignExperimentRequest
     {
         ResourceNameAsCampaignExperimentName = CampaignExperimentName.FromCustomerCampaignExperiment("[CUSTOMER]", "[CAMPAIGN_EXPERIMENT]"),
     };
     // Make the request
     CampaignExperiment response = campaignExperimentServiceClient.GetCampaignExperiment(request);
 }
Esempio n. 10
0
        /// <summary>Snippet for EndCampaignExperiment</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public void EndCampaignExperimentRequestObject()
        {
            // Create client
            CampaignExperimentServiceClient campaignExperimentServiceClient = CampaignExperimentServiceClient.Create();
            // Initialize request argument(s)
            EndCampaignExperimentRequest request = new EndCampaignExperimentRequest
            {
                CampaignExperiment = "",
            };

            // Make the request
            campaignExperimentServiceClient.EndCampaignExperiment(request);
        }
 /// <summary>Snippet for MutateCampaignExperiments</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void MutateCampaignExperiments()
 {
     // Create client
     CampaignExperimentServiceClient campaignExperimentServiceClient = CampaignExperimentServiceClient.Create();
     // Initialize request argument(s)
     string customerId = "";
     IEnumerable <CampaignExperimentOperation> operations = new CampaignExperimentOperation[]
     {
         new CampaignExperimentOperation(),
     };
     // Make the request
     MutateCampaignExperimentsResponse response = campaignExperimentServiceClient.MutateCampaignExperiments(customerId, operations);
 }
 /// <summary>Snippet for GraduateCampaignExperiment</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GraduateCampaignExperimentRequestObject()
 {
     // Create client
     CampaignExperimentServiceClient campaignExperimentServiceClient = CampaignExperimentServiceClient.Create();
     // Initialize request argument(s)
     GraduateCampaignExperimentRequest request = new GraduateCampaignExperimentRequest
     {
         CampaignExperiment = "",
         CampaignBudget     = "",
     };
     // Make the request
     GraduateCampaignExperimentResponse response = campaignExperimentServiceClient.GraduateCampaignExperiment(request);
 }
Esempio n. 13
0
        /// <summary>Snippet for EndCampaignExperiment</summary>
        public void EndCampaignExperimentRequestObject()
        {
            // Snippet: EndCampaignExperiment(EndCampaignExperimentRequest, CallSettings)
            // Create client
            CampaignExperimentServiceClient campaignExperimentServiceClient = CampaignExperimentServiceClient.Create();
            // Initialize request argument(s)
            EndCampaignExperimentRequest request = new EndCampaignExperimentRequest
            {
                CampaignExperiment = "",
                ValidateOnly       = false,
            };

            // Make the request
            campaignExperimentServiceClient.EndCampaignExperiment(request);
            // End snippet
        }
Esempio n. 14
0
 /// <summary>Snippet for GraduateCampaignExperiment</summary>
 public void GraduateCampaignExperimentRequestObject()
 {
     // Snippet: GraduateCampaignExperiment(GraduateCampaignExperimentRequest, CallSettings)
     // Create client
     CampaignExperimentServiceClient campaignExperimentServiceClient = CampaignExperimentServiceClient.Create();
     // Initialize request argument(s)
     GraduateCampaignExperimentRequest request = new GraduateCampaignExperimentRequest
     {
         CampaignExperiment = "",
         CampaignBudget     = "",
         ValidateOnly       = false,
     };
     // Make the request
     GraduateCampaignExperimentResponse response = campaignExperimentServiceClient.GraduateCampaignExperiment(request);
     // End snippet
 }
Esempio n. 15
0
        /// <summary>Snippet for ListCampaignExperimentAsyncErrors</summary>
        public void ListCampaignExperimentAsyncErrorsRequestObject()
        {
            // Snippet: ListCampaignExperimentAsyncErrors(ListCampaignExperimentAsyncErrorsRequest, CallSettings)
            // Create client
            CampaignExperimentServiceClient campaignExperimentServiceClient = CampaignExperimentServiceClient.Create();
            // Initialize request argument(s)
            ListCampaignExperimentAsyncErrorsRequest request = new ListCampaignExperimentAsyncErrorsRequest
            {
                ResourceNameAsCampaignExperimentName = CampaignExperimentName.FromCustomerCampaignExperiment("[CUSTOMER_ID]", "[CAMPAIGN_EXPERIMENT_ID]"),
            };
            // Make the request
            PagedEnumerable <ListCampaignExperimentAsyncErrorsResponse, Status> response = campaignExperimentServiceClient.ListCampaignExperimentAsyncErrors(request);

            // Iterate over all response items, lazily performing RPCs as required
            foreach (Status item in response)
            {
                // Do something with each item
                Console.WriteLine(item);
            }

            // Or iterate over pages (of server-defined size), performing one RPC per page
            foreach (ListCampaignExperimentAsyncErrorsResponse page in response.AsRawResponses())
            {
                // Do something with each page of items
                Console.WriteLine("A page of results:");
                foreach (Status item in page)
                {
                    // Do something with each item
                    Console.WriteLine(item);
                }
            }

            // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
            int           pageSize   = 10;
            Page <Status> singlePage = response.ReadPage(pageSize);

            // Do something with the page of items
            Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
            foreach (Status item in singlePage)
            {
                // Do something with each item
                Console.WriteLine(item);
            }
            // Store the pageToken, for when the next page is required.
            string nextPageToken = singlePage.NextPageToken;
            // End snippet
        }
 /// <summary>Snippet for MutateCampaignExperiments</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void MutateCampaignExperimentsRequestObject()
 {
     // Create client
     CampaignExperimentServiceClient campaignExperimentServiceClient = CampaignExperimentServiceClient.Create();
     // Initialize request argument(s)
     MutateCampaignExperimentsRequest request = new MutateCampaignExperimentsRequest
     {
         CustomerId = "",
         Operations =
         {
             new CampaignExperimentOperation(),
         },
         PartialFailure = false,
         ValidateOnly   = false,
     };
     // Make the request
     MutateCampaignExperimentsResponse response = campaignExperimentServiceClient.MutateCampaignExperiments(request);
 }
Esempio n. 17
0
 /// <summary>Snippet for MutateCampaignExperiments</summary>
 public void MutateCampaignExperimentsRequestObject()
 {
     // Snippet: MutateCampaignExperiments(MutateCampaignExperimentsRequest, CallSettings)
     // Create client
     CampaignExperimentServiceClient campaignExperimentServiceClient = CampaignExperimentServiceClient.Create();
     // Initialize request argument(s)
     MutateCampaignExperimentsRequest request = new MutateCampaignExperimentsRequest
     {
         CustomerId = "",
         Operations =
         {
             new CampaignExperimentOperation(),
         },
         PartialFailure      = false,
         ValidateOnly        = false,
         ResponseContentType = ResponseContentTypeEnum.Types.ResponseContentType.Unspecified,
     };
     // Make the request
     MutateCampaignExperimentsResponse response = campaignExperimentServiceClient.MutateCampaignExperiments(request);
     // End snippet
 }