/// <summary>Snippet for GetSettingAsync</summary> public async Task GetSettingAsync() { // Snippet: GetSettingAsync(string, CallSettings) // Additional: GetSettingAsync(string, CancellationToken) // Create client ResourceSettingsServiceClient resourceSettingsServiceClient = await ResourceSettingsServiceClient.CreateAsync(); // Initialize request argument(s) string name = "projects/[PROJECT_NUMBER]/settings/[SETTING_NAME]"; // Make the request Setting response = await resourceSettingsServiceClient.GetSettingAsync(name); // End snippet }
/// <summary>Snippet for GetSettingAsync</summary> public async Task GetSettingResourceNamesAsync() { // Snippet: GetSettingAsync(SettingName, CallSettings) // Additional: GetSettingAsync(SettingName, CancellationToken) // Create client ResourceSettingsServiceClient resourceSettingsServiceClient = await ResourceSettingsServiceClient.CreateAsync(); // Initialize request argument(s) SettingName name = SettingName.FromProjectNumberSettingName("[PROJECT_NUMBER]", "[SETTING_NAME]"); // Make the request Setting response = await resourceSettingsServiceClient.GetSettingAsync(name); // End snippet }
/// <summary>Snippet for GetSettingAsync</summary> public async Task GetSettingRequestObjectAsync() { // Snippet: GetSettingAsync(GetSettingRequest, CallSettings) // Additional: GetSettingAsync(GetSettingRequest, CancellationToken) // Create client ResourceSettingsServiceClient resourceSettingsServiceClient = await ResourceSettingsServiceClient.CreateAsync(); // Initialize request argument(s) GetSettingRequest request = new GetSettingRequest { SettingName = SettingName.FromProjectNumberSettingName("[PROJECT_NUMBER]", "[SETTING_NAME]"), View = SettingView.Unspecified, }; // Make the request Setting response = await resourceSettingsServiceClient.GetSettingAsync(request); // End snippet }