Exemplo n.º 1
0
 /// <summary>Snippet for CreateProperty</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void CreateProperty()
 {
     // Create client
     AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.Create();
     // Initialize request argument(s)
     Property property = new Property();
     // Make the request
     Property response = analyticsAdminServiceClient.CreateProperty(property);
 }
Exemplo n.º 2
0
 /// <summary>Snippet for GetUserLink</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetUserLinkResourceNames()
 {
     // Create client
     AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.Create();
     // Initialize request argument(s)
     UserLinkName name = UserLinkName.FromAccountUserLink("[ACCOUNT]", "[USER_LINK]");
     // Make the request
     UserLink response = analyticsAdminServiceClient.GetUserLink(name);
 }
 /// <summary>Snippet for GetEnhancedMeasurementSettings</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetEnhancedMeasurementSettings()
 {
     // Create client
     AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.Create();
     // Initialize request argument(s)
     string name = "properties/[PROPERTY]/webDataStreams/[WEB_DATA_STREAM]/enhancedMeasurementSettings";
     // Make the request
     EnhancedMeasurementSettings response = analyticsAdminServiceClient.GetEnhancedMeasurementSettings(name);
 }
Exemplo n.º 4
0
 /// <summary>Snippet for GetCustomDimension</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetCustomDimension()
 {
     // Create client
     AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.Create();
     // Initialize request argument(s)
     string name = "properties/[PROPERTY]/customDimensions";
     // Make the request
     CustomDimension response = analyticsAdminServiceClient.GetCustomDimension(name);
 }
 /// <summary>Snippet for GetGoogleSignalsSettings</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetGoogleSignalsSettingsResourceNames()
 {
     // Create client
     AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.Create();
     // Initialize request argument(s)
     GoogleSignalsSettingsName name = GoogleSignalsSettingsName.FromProperty("[PROPERTY]");
     // Make the request
     GoogleSignalsSettings response = analyticsAdminServiceClient.GetGoogleSignalsSettings(name);
 }
Exemplo n.º 6
0
 /// <summary>Snippet for GetAccount</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetAccountResourceNames()
 {
     // Create client
     AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.Create();
     // Initialize request argument(s)
     AccountName name = AccountName.FromAccount("[ACCOUNT]");
     // Make the request
     Account response = analyticsAdminServiceClient.GetAccount(name);
 }
Exemplo n.º 7
0
 /// <summary>Snippet for GetUserLink</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetUserLink()
 {
     // Create client
     AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.Create();
     // Initialize request argument(s)
     string name = "accounts/[ACCOUNT]/userLinks/[USER_LINK]";
     // Make the request
     UserLink response = analyticsAdminServiceClient.GetUserLink(name);
 }
Exemplo n.º 8
0
 /// <summary>Snippet for UpdateUserLink</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void UpdateUserLink()
 {
     // Create client
     AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.Create();
     // Initialize request argument(s)
     UserLink userLink = new UserLink();
     // Make the request
     UserLink response = analyticsAdminServiceClient.UpdateUserLink(userLink);
 }
Exemplo n.º 9
0
 /// <summary>Snippet for GetConversionEvent</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetConversionEvent()
 {
     // Create client
     AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.Create();
     // Initialize request argument(s)
     string name = "properties/[PROPERTY]/conversionEvents/[CONVERSION_EVENT]";
     // Make the request
     ConversionEvent response = analyticsAdminServiceClient.GetConversionEvent(name);
 }
 /// <summary>Snippet for GetIosAppDataStream</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetIosAppDataStream()
 {
     // Create client
     AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.Create();
     // Initialize request argument(s)
     string name = "properties/[PROPERTY]/iosAppDataStreams/[IOS_APP_DATA_STREAM]";
     // Make the request
     IosAppDataStream response = analyticsAdminServiceClient.GetIosAppDataStream(name);
 }
Exemplo n.º 11
0
 /// <summary>Snippet for GetEnhancedMeasurementSettings</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetEnhancedMeasurementSettingsResourceNames()
 {
     // Create client
     AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.Create();
     // Initialize request argument(s)
     EnhancedMeasurementSettingsName name = EnhancedMeasurementSettingsName.FromPropertyWebDataStream("[PROPERTY]", "[WEB_DATA_STREAM]");
     // Make the request
     EnhancedMeasurementSettings response = analyticsAdminServiceClient.GetEnhancedMeasurementSettings(name);
 }
Exemplo n.º 12
0
 /// <summary>Snippet for GetGlobalSiteTag</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetGlobalSiteTag()
 {
     // Create client
     AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.Create();
     // Initialize request argument(s)
     string name = "properties/[PROPERTY]/globalSiteTag";
     // Make the request
     GlobalSiteTag response = analyticsAdminServiceClient.GetGlobalSiteTag(name);
 }
 /// <summary>Snippet for GetMeasurementProtocolSecret</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetMeasurementProtocolSecretResourceNames()
 {
     // Create client
     AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.Create();
     // Initialize request argument(s)
     MeasurementProtocolSecretName name = MeasurementProtocolSecretName.FromPropertyWebDataStreamMeasurementProtocolSecret("[PROPERTY]", "[WEB_DATA_STREAM]", "[MEASUREMENT_PROTOCOL_SECRET]");
     // Make the request
     MeasurementProtocolSecret response = analyticsAdminServiceClient.GetMeasurementProtocolSecret(name);
 }
Exemplo n.º 14
0
 /// <summary>Snippet for GetDataSharingSettings</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetDataSharingSettingsResourceNames()
 {
     // Create client
     AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.Create();
     // Initialize request argument(s)
     DataSharingSettingsName name = DataSharingSettingsName.FromAccount("[ACCOUNT]");
     // Make the request
     DataSharingSettings response = analyticsAdminServiceClient.GetDataSharingSettings(name);
 }
 /// <summary>Snippet for GetConversionEvent</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetConversionEventResourceNames()
 {
     // Create client
     AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.Create();
     // Initialize request argument(s)
     ConversionEventName name = ConversionEventName.FromPropertyConversionEvent("[PROPERTY]", "[CONVERSION_EVENT]");
     // Make the request
     ConversionEvent response = analyticsAdminServiceClient.GetConversionEvent(name);
 }
 /// <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 DeleteProperty()
 {
     // Create client
     AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.Create();
     // Initialize request argument(s)
     string name = "properties/[PROPERTY]";
     // Make the request
     Property response = analyticsAdminServiceClient.DeleteProperty(name);
 }
        /// <summary>Snippet for SearchChangeHistoryEvents</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public void SearchChangeHistoryEventsRequestObject()
        {
            // Create client
            AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.Create();
            // 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
            PagedEnumerable <SearchChangeHistoryEventsResponse, ChangeHistoryEvent> response = analyticsAdminServiceClient.SearchChangeHistoryEvents(request);

            // Iterate over all response items, lazily performing RPCs as required
            foreach (ChangeHistoryEvent 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 (SearchChangeHistoryEventsResponse page in response.AsRawResponses())
            {
                // 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 = response.ReadPage(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 GetGlobalSiteTag</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetGlobalSiteTagResourceNames()
 {
     // Create client
     AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.Create();
     // Initialize request argument(s)
     GlobalSiteTagName name = GlobalSiteTagName.FromProperty("[PROPERTY]");
     // Make the request
     GlobalSiteTag response = analyticsAdminServiceClient.GetGlobalSiteTag(name);
 }
 /// <summary>Snippet for GetDataSharingSettings</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetDataSharingSettings()
 {
     // Create client
     AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.Create();
     // Initialize request argument(s)
     string name = "accounts/[ACCOUNT]/dataSharingSettings";
     // Make the request
     DataSharingSettings response = analyticsAdminServiceClient.GetDataSharingSettings(name);
 }
Exemplo n.º 20
0
 /// <summary>Snippet for GetMeasurementProtocolSecret</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetMeasurementProtocolSecret()
 {
     // Create client
     AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.Create();
     // Initialize request argument(s)
     string name = "properties/[PROPERTY]/webDataStreams/[WEB_DATA_STREAM]/measurementProtocolSecrets/[MEASUREMENT_PROTOCOL_SECRET]";
     // Make the request
     MeasurementProtocolSecret response = analyticsAdminServiceClient.GetMeasurementProtocolSecret(name);
 }
Exemplo n.º 21
0
 /// <summary>Snippet for GetAccount</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetAccount()
 {
     // Create client
     AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.Create();
     // Initialize request argument(s)
     string name = "accounts/[ACCOUNT]";
     // Make the request
     Account response = analyticsAdminServiceClient.GetAccount(name);
 }
 /// <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 GetGoogleSignalsSettings</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetGoogleSignalsSettings()
 {
     // Create client
     AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.Create();
     // Initialize request argument(s)
     string name = "properties/[PROPERTY]/googleSignalsSettings";
     // Make the request
     GoogleSignalsSettings response = analyticsAdminServiceClient.GetGoogleSignalsSettings(name);
 }
Exemplo n.º 24
0
 /// <summary>Snippet for GetWebDataStream</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetWebDataStreamResourceNames()
 {
     // Create client
     AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.Create();
     // Initialize request argument(s)
     WebDataStreamName name = WebDataStreamName.FromPropertyWebDataStream("[PROPERTY]", "[WEB_DATA_STREAM]");
     // Make the request
     WebDataStream response = analyticsAdminServiceClient.GetWebDataStream(name);
 }
 /// <summary>Snippet for GetCustomDimension</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void GetCustomDimensionResourceNames()
 {
     // Create client
     AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.Create();
     // Initialize request argument(s)
     CustomDimensionName name = CustomDimensionName.FromProperty("[PROPERTY]");
     // Make the request
     CustomDimension response = analyticsAdminServiceClient.GetCustomDimension(name);
 }
Exemplo n.º 26
0
 /// <summary>Snippet for UpdateProperty</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void UpdateProperty()
 {
     // Create client
     AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.Create();
     // Initialize request argument(s)
     Property  property   = new Property();
     FieldMask updateMask = new FieldMask();
     // Make the request
     Property response = analyticsAdminServiceClient.UpdateProperty(property, updateMask);
 }
Exemplo n.º 27
0
        /// <summary>Snippet for DeleteGoogleAdsLink</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public void DeleteGoogleAdsLink()
        {
            // Create client
            AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.Create();
            // Initialize request argument(s)
            string name = "properties/[PROPERTY]/googleAdsLinks/[GOOGLE_ADS_LINK]";

            // Make the request
            analyticsAdminServiceClient.DeleteGoogleAdsLink(name);
        }
Exemplo n.º 28
0
 /// <summary>Snippet for UpdateWebDataStream</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void UpdateWebDataStream()
 {
     // Create client
     AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.Create();
     // Initialize request argument(s)
     WebDataStream webDataStream = new WebDataStream();
     FieldMask     updateMask    = new FieldMask();
     // Make the request
     WebDataStream response = analyticsAdminServiceClient.UpdateWebDataStream(webDataStream, updateMask);
 }
 /// <summary>Snippet for UpdateGoogleAdsLink</summary>
 /// <remarks>
 /// This snippet has been automatically generated for illustrative purposes only.
 /// It may require modifications to work in your environment.
 /// </remarks>
 public void UpdateGoogleAdsLink()
 {
     // Create client
     AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.Create();
     // Initialize request argument(s)
     GoogleAdsLink googleAdsLink = new GoogleAdsLink();
     FieldMask     updateMask    = new FieldMask();
     // Make the request
     GoogleAdsLink response = analyticsAdminServiceClient.UpdateGoogleAdsLink(googleAdsLink, updateMask);
 }
        /// <summary>Snippet for DeleteIosAppDataStream</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public void DeleteIosAppDataStreamResourceNames()
        {
            // Create client
            AnalyticsAdminServiceClient analyticsAdminServiceClient = AnalyticsAdminServiceClient.Create();
            // Initialize request argument(s)
            IosAppDataStreamName name = IosAppDataStreamName.FromPropertyIosAppDataStream("[PROPERTY]", "[IOS_APP_DATA_STREAM]");

            // Make the request
            analyticsAdminServiceClient.DeleteIosAppDataStream(name);
        }