/// <summary>Snippet for SearchChangeHistoryEventsAsync</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public async Task SearchChangeHistoryEventsRequestObjectAsync() { // Create client AnalyticsAdminServiceClient analyticsAdminServiceClient = await AnalyticsAdminServiceClient.CreateAsync(); // Initialize request argument(s) SearchChangeHistoryEventsRequest request = new SearchChangeHistoryEventsRequest { AccountAsAccountName = AccountName.FromAccount("[ACCOUNT]"), PropertyAsPropertyName = PropertyName.FromProperty("[PROPERTY]"), ResourceType = { ChangeHistoryResourceType.Unspecified, }, Action = { ActionType.Unspecified, }, ActorEmail = { "", }, EarliestChangeTime = new Timestamp(), LatestChangeTime = new Timestamp(), }; // Make the request PagedAsyncEnumerable <SearchChangeHistoryEventsResponse, ChangeHistoryEvent> response = analyticsAdminServiceClient.SearchChangeHistoryEventsAsync(request); // Iterate over all response items, lazily performing RPCs as required await response.ForEachAsync((ChangeHistoryEvent item) => { // Do something with each item Console.WriteLine(item); }); // Or iterate over pages (of server-defined size), performing one RPC per page await response.AsRawResponses().ForEachAsync((SearchChangeHistoryEventsResponse page) => { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (ChangeHistoryEvent 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 <ChangeHistoryEvent> singlePage = await response.ReadPageAsync(pageSize); // Do something with the page of items Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); foreach (ChangeHistoryEvent 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; }
/// <summary>Snippet for DeleteProperty</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void DeletePropertyResourceNames() { // Create client AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.Create(); // Initialize request argument(s) PropertyName name = PropertyName.FromProperty("[PROPERTY]"); // Make the request Property response = analyticsAdminServiceClient.DeleteProperty(name); }
/// <summary>Snippet for CreateGoogleAdsLink</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void CreateGoogleAdsLinkResourceNames() { // Create client AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.Create(); // Initialize request argument(s) PropertyName parent = PropertyName.FromProperty("[PROPERTY]"); GoogleAdsLink googleAdsLink = new GoogleAdsLink(); // Make the request GoogleAdsLink response = analyticsAdminServiceClient.CreateGoogleAdsLink(parent, googleAdsLink); }
/// <summary>Snippet for CreateConversionEvent</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void CreateConversionEventResourceNames() { // Create client AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.Create(); // Initialize request argument(s) PropertyName parent = PropertyName.FromProperty("[PROPERTY]"); ConversionEvent conversionEvent = new ConversionEvent(); // Make the request ConversionEvent response = analyticsAdminServiceClient.CreateConversionEvent(parent, conversionEvent); }
/// <summary>Snippet for CreateWebDataStream</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void CreateWebDataStreamResourceNames() { // Create client AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.Create(); // Initialize request argument(s) PropertyName parent = PropertyName.FromProperty("[PROPERTY]"); WebDataStream webDataStream = new WebDataStream(); // Make the request WebDataStream response = analyticsAdminServiceClient.CreateWebDataStream(parent, webDataStream); }
/// <summary>Snippet for CreateCustomDimension</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void CreateCustomDimensionResourceNames() { // Create client AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.Create(); // Initialize request argument(s) PropertyName parent = PropertyName.FromProperty("[PROPERTY]"); CustomDimension customDimension = new CustomDimension(); // Make the request CustomDimension response = analyticsAdminServiceClient.CreateCustomDimension(parent, customDimension); }
/// <summary>Snippet for GetPropertyAsync</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public async Task GetPropertyResourceNamesAsync() { // Create client AnalyticsAdminServiceClient analyticsAdminServiceClient = await AnalyticsAdminServiceClient.CreateAsync(); // Initialize request argument(s) PropertyName name = PropertyName.FromProperty("[PROPERTY]"); // Make the request Property response = await analyticsAdminServiceClient.GetPropertyAsync(name); }
/// <summary>Snippet for CreateUserLink</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void CreateUserLinkResourceNames2() { // Create client AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.Create(); // Initialize request argument(s) PropertyName parent = PropertyName.FromProperty("[PROPERTY]"); UserLink userLink = new UserLink(); // Make the request UserLink response = analyticsAdminServiceClient.CreateUserLink(parent, userLink); }
/// <summary>Snippet for CreateFirebaseLinkAsync</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public async Task CreateFirebaseLinkResourceNamesAsync() { // Create client AnalyticsAdminServiceClient analyticsAdminServiceClient = await AnalyticsAdminServiceClient.CreateAsync(); // Initialize request argument(s) PropertyName parent = PropertyName.FromProperty("[PROPERTY]"); FirebaseLink firebaseLink = new FirebaseLink(); // Make the request FirebaseLink response = await analyticsAdminServiceClient.CreateFirebaseLinkAsync(parent, firebaseLink); }
/// <summary>Snippet for CreateCustomMetricAsync</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public async Task CreateCustomMetricResourceNamesAsync() { // Create client AnalyticsAdminServiceClient analyticsAdminServiceClient = await AnalyticsAdminServiceClient.CreateAsync(); // Initialize request argument(s) PropertyName parent = PropertyName.FromProperty("[PROPERTY]"); CustomMetric customMetric = new CustomMetric(); // Make the request CustomMetric response = await analyticsAdminServiceClient.CreateCustomMetricAsync(parent, customMetric); }
/// <summary>Snippet for GetProperty</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void GetPropertyRequestObject() { // Create client AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.Create(); // Initialize request argument(s) GetPropertyRequest request = new GetPropertyRequest { PropertyName = PropertyName.FromProperty("[PROPERTY]"), }; // Make the request Property response = analyticsAdminServiceClient.GetProperty(request); }
/// <summary>Snippet for CreateWebDataStream</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void CreateWebDataStreamRequestObject() { // Create client AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.Create(); // Initialize request argument(s) CreateWebDataStreamRequest request = new CreateWebDataStreamRequest { WebDataStream = new WebDataStream(), ParentAsPropertyName = PropertyName.FromProperty("[PROPERTY]"), }; // Make the request WebDataStream response = analyticsAdminServiceClient.CreateWebDataStream(request); }
/// <summary>Snippet for CreateCustomDimension</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void CreateCustomDimensionRequestObject() { // Create client AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.Create(); // Initialize request argument(s) CreateCustomDimensionRequest request = new CreateCustomDimensionRequest { ParentAsPropertyName = PropertyName.FromProperty("[PROPERTY]"), CustomDimension = new CustomDimension(), }; // Make the request CustomDimension response = analyticsAdminServiceClient.CreateCustomDimension(request); }
/// <summary>Snippet for CreateGoogleAdsLink</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void CreateGoogleAdsLinkRequestObject() { // Create client AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.Create(); // Initialize request argument(s) CreateGoogleAdsLinkRequest request = new CreateGoogleAdsLinkRequest { ParentAsPropertyName = PropertyName.FromProperty("[PROPERTY]"), GoogleAdsLink = new GoogleAdsLink(), }; // Make the request GoogleAdsLink response = analyticsAdminServiceClient.CreateGoogleAdsLink(request); }
/// <summary>Snippet for DeletePropertyAsync</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public async Task DeletePropertyRequestObjectAsync() { // Create client AnalyticsAdminServiceClient analyticsAdminServiceClient = await AnalyticsAdminServiceClient.CreateAsync(); // Initialize request argument(s) DeletePropertyRequest request = new DeletePropertyRequest { PropertyName = PropertyName.FromProperty("[PROPERTY]"), }; // Make the request Property response = await analyticsAdminServiceClient.DeletePropertyAsync(request); }
/// <summary>Snippet for CreateConversionEvent</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void CreateConversionEventRequestObject() { // Create client AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.Create(); // Initialize request argument(s) CreateConversionEventRequest request = new CreateConversionEventRequest { ConversionEvent = new ConversionEvent(), ParentAsPropertyName = PropertyName.FromProperty("[PROPERTY]"), }; // Make the request ConversionEvent response = analyticsAdminServiceClient.CreateConversionEvent(request); }
/// <summary>Snippet for CreateCustomMetricAsync</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public async Task CreateCustomMetricRequestObjectAsync() { // Create client AnalyticsAdminServiceClient analyticsAdminServiceClient = await AnalyticsAdminServiceClient.CreateAsync(); // Initialize request argument(s) CreateCustomMetricRequest request = new CreateCustomMetricRequest { ParentAsPropertyName = PropertyName.FromProperty("[PROPERTY]"), CustomMetric = new CustomMetric(), }; // Make the request CustomMetric response = await analyticsAdminServiceClient.CreateCustomMetricAsync(request); }
/// <summary>Snippet for CreateFirebaseLinkAsync</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public async Task CreateFirebaseLinkRequestObjectAsync() { // Create client AnalyticsAdminServiceClient analyticsAdminServiceClient = await AnalyticsAdminServiceClient.CreateAsync(); // Initialize request argument(s) CreateFirebaseLinkRequest request = new CreateFirebaseLinkRequest { ParentAsPropertyName = PropertyName.FromProperty("[PROPERTY]"), FirebaseLink = new FirebaseLink(), }; // Make the request FirebaseLink response = await analyticsAdminServiceClient.CreateFirebaseLinkAsync(request); }
/// <summary>Snippet for ListConversionEventsAsync</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public async Task ListConversionEventsRequestObjectAsync() { // Create client AnalyticsAdminServiceClient analyticsAdminServiceClient = await AnalyticsAdminServiceClient.CreateAsync(); // Initialize request argument(s) ListConversionEventsRequest request = new ListConversionEventsRequest { ParentAsPropertyName = PropertyName.FromProperty("[PROPERTY]"), }; // Make the request PagedAsyncEnumerable <ListConversionEventsResponse, ConversionEvent> response = analyticsAdminServiceClient.ListConversionEventsAsync(request); // Iterate over all response items, lazily performing RPCs as required await response.ForEachAsync((ConversionEvent item) => { // Do something with each item Console.WriteLine(item); }); // Or iterate over pages (of server-defined size), performing one RPC per page await response.AsRawResponses().ForEachAsync((ListConversionEventsResponse page) => { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (ConversionEvent 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 <ConversionEvent> singlePage = await response.ReadPageAsync(pageSize); // Do something with the page of items Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); foreach (ConversionEvent 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; }
/// <summary>Snippet for ListCustomDimensions</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void ListCustomDimensionsRequestObject() { // Create client AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.Create(); // Initialize request argument(s) ListCustomDimensionsRequest request = new ListCustomDimensionsRequest { ParentAsPropertyName = PropertyName.FromProperty("[PROPERTY]"), }; // Make the request PagedEnumerable <ListCustomDimensionsResponse, CustomDimension> response = analyticsAdminServiceClient.ListCustomDimensions(request); // Iterate over all response items, lazily performing RPCs as required foreach (CustomDimension 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 (ListCustomDimensionsResponse page in response.AsRawResponses()) { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (CustomDimension 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 <CustomDimension> 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 (CustomDimension 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; }