-
Notifications
You must be signed in to change notification settings - Fork 362
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add new RPCs GetSettings, UpdateSettings and new messages Setti…
…ngs, NotificationSettings, GetSettingsRequest, UpdateSettingsRequest PiperOrigin-RevId: 568252764 Source-Link: googleapis/googleapis@c981bf5 Source-Link: googleapis/googleapis-gen@a37d28d Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuQWR2aXNvcnlOb3RpZmljYXRpb25zLlYxLy5Pd2xCb3QueWFtbCIsImgiOiJhMzdkMjhkYWNiY2QxOGZhZjUyOTdkMmZkZmFlMjlmZWEwMGQ5NmJkIn0=
- Loading branch information
1 parent
8f008d6
commit 881c034
Showing
17 changed files
with
2,681 additions
and
35 deletions.
There are no files selected for viewing
44 changes: 44 additions & 0 deletions
44
...ions.V1.GeneratedSnippets/AdvisoryNotificationsServiceClient.GetSettingsAsyncSnippet.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// Copyright 2023 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated code. DO NOT EDIT! | ||
|
||
namespace GoogleCSharpSnippets | ||
{ | ||
// [START advisorynotifications_v1_generated_AdvisoryNotificationsService_GetSettings_async_flattened] | ||
using Google.Cloud.AdvisoryNotifications.V1; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedAdvisoryNotificationsServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for GetSettingsAsync</summary> | ||
/// <remarks> | ||
/// This snippet has been automatically generated and should be regarded as a code template only. | ||
/// It will require modifications to work: | ||
/// - It may require correct/in-range values for request initialization. | ||
/// - It may require specifying regional endpoints when creating the service client as shown in | ||
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. | ||
/// </remarks> | ||
public async Task GetSettingsAsync() | ||
{ | ||
// Create client | ||
AdvisoryNotificationsServiceClient advisoryNotificationsServiceClient = await AdvisoryNotificationsServiceClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
string name = "organizations/[ORGANIZATION]/locations/[LOCATION]/settings"; | ||
// Make the request | ||
Settings response = await advisoryNotificationsServiceClient.GetSettingsAsync(name); | ||
} | ||
} | ||
// [END advisorynotifications_v1_generated_AdvisoryNotificationsService_GetSettings_async_flattened] | ||
} |
47 changes: 47 additions & 0 deletions
47
...atedSnippets/AdvisoryNotificationsServiceClient.GetSettingsRequestObjectAsyncSnippet.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// Copyright 2023 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated code. DO NOT EDIT! | ||
|
||
namespace GoogleCSharpSnippets | ||
{ | ||
// [START advisorynotifications_v1_generated_AdvisoryNotificationsService_GetSettings_async] | ||
using Google.Cloud.AdvisoryNotifications.V1; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedAdvisoryNotificationsServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for GetSettingsAsync</summary> | ||
/// <remarks> | ||
/// This snippet has been automatically generated and should be regarded as a code template only. | ||
/// It will require modifications to work: | ||
/// - It may require correct/in-range values for request initialization. | ||
/// - It may require specifying regional endpoints when creating the service client as shown in | ||
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. | ||
/// </remarks> | ||
public async Task GetSettingsRequestObjectAsync() | ||
{ | ||
// Create client | ||
AdvisoryNotificationsServiceClient advisoryNotificationsServiceClient = await AdvisoryNotificationsServiceClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
GetSettingsRequest request = new GetSettingsRequest | ||
{ | ||
SettingsName = SettingsName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]"), | ||
}; | ||
// Make the request | ||
Settings response = await advisoryNotificationsServiceClient.GetSettingsAsync(request); | ||
} | ||
} | ||
// [END advisorynotifications_v1_generated_AdvisoryNotificationsService_GetSettings_async] | ||
} |
46 changes: 46 additions & 0 deletions
46
...GeneratedSnippets/AdvisoryNotificationsServiceClient.GetSettingsRequestObjectSnippet.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// Copyright 2023 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated code. DO NOT EDIT! | ||
|
||
namespace GoogleCSharpSnippets | ||
{ | ||
// [START advisorynotifications_v1_generated_AdvisoryNotificationsService_GetSettings_sync] | ||
using Google.Cloud.AdvisoryNotifications.V1; | ||
|
||
public sealed partial class GeneratedAdvisoryNotificationsServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for GetSettings</summary> | ||
/// <remarks> | ||
/// This snippet has been automatically generated and should be regarded as a code template only. | ||
/// It will require modifications to work: | ||
/// - It may require correct/in-range values for request initialization. | ||
/// - It may require specifying regional endpoints when creating the service client as shown in | ||
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. | ||
/// </remarks> | ||
public void GetSettingsRequestObject() | ||
{ | ||
// Create client | ||
AdvisoryNotificationsServiceClient advisoryNotificationsServiceClient = AdvisoryNotificationsServiceClient.Create(); | ||
// Initialize request argument(s) | ||
GetSettingsRequest request = new GetSettingsRequest | ||
{ | ||
SettingsName = SettingsName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]"), | ||
}; | ||
// Make the request | ||
Settings response = advisoryNotificationsServiceClient.GetSettings(request); | ||
} | ||
} | ||
// [END advisorynotifications_v1_generated_AdvisoryNotificationsService_GetSettings_sync] | ||
} |
44 changes: 44 additions & 0 deletions
44
...atedSnippets/AdvisoryNotificationsServiceClient.GetSettingsResourceNamesAsyncSnippet.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// Copyright 2023 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated code. DO NOT EDIT! | ||
|
||
namespace GoogleCSharpSnippets | ||
{ | ||
// [START advisorynotifications_v1_generated_AdvisoryNotificationsService_GetSettings_async_flattened_resourceNames] | ||
using Google.Cloud.AdvisoryNotifications.V1; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedAdvisoryNotificationsServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for GetSettingsAsync</summary> | ||
/// <remarks> | ||
/// This snippet has been automatically generated and should be regarded as a code template only. | ||
/// It will require modifications to work: | ||
/// - It may require correct/in-range values for request initialization. | ||
/// - It may require specifying regional endpoints when creating the service client as shown in | ||
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. | ||
/// </remarks> | ||
public async Task GetSettingsResourceNamesAsync() | ||
{ | ||
// Create client | ||
AdvisoryNotificationsServiceClient advisoryNotificationsServiceClient = await AdvisoryNotificationsServiceClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
SettingsName name = SettingsName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]"); | ||
// Make the request | ||
Settings response = await advisoryNotificationsServiceClient.GetSettingsAsync(name); | ||
} | ||
} | ||
// [END advisorynotifications_v1_generated_AdvisoryNotificationsService_GetSettings_async_flattened_resourceNames] | ||
} |
43 changes: 43 additions & 0 deletions
43
...GeneratedSnippets/AdvisoryNotificationsServiceClient.GetSettingsResourceNamesSnippet.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// Copyright 2023 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated code. DO NOT EDIT! | ||
|
||
namespace GoogleCSharpSnippets | ||
{ | ||
// [START advisorynotifications_v1_generated_AdvisoryNotificationsService_GetSettings_sync_flattened_resourceNames] | ||
using Google.Cloud.AdvisoryNotifications.V1; | ||
|
||
public sealed partial class GeneratedAdvisoryNotificationsServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for GetSettings</summary> | ||
/// <remarks> | ||
/// This snippet has been automatically generated and should be regarded as a code template only. | ||
/// It will require modifications to work: | ||
/// - It may require correct/in-range values for request initialization. | ||
/// - It may require specifying regional endpoints when creating the service client as shown in | ||
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. | ||
/// </remarks> | ||
public void GetSettingsResourceNames() | ||
{ | ||
// Create client | ||
AdvisoryNotificationsServiceClient advisoryNotificationsServiceClient = AdvisoryNotificationsServiceClient.Create(); | ||
// Initialize request argument(s) | ||
SettingsName name = SettingsName.FromOrganizationLocation("[ORGANIZATION]", "[LOCATION]"); | ||
// Make the request | ||
Settings response = advisoryNotificationsServiceClient.GetSettings(name); | ||
} | ||
} | ||
// [END advisorynotifications_v1_generated_AdvisoryNotificationsService_GetSettings_sync_flattened_resourceNames] | ||
} |
43 changes: 43 additions & 0 deletions
43
...fications.V1.GeneratedSnippets/AdvisoryNotificationsServiceClient.GetSettingsSnippet.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// Copyright 2023 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated code. DO NOT EDIT! | ||
|
||
namespace GoogleCSharpSnippets | ||
{ | ||
// [START advisorynotifications_v1_generated_AdvisoryNotificationsService_GetSettings_sync_flattened] | ||
using Google.Cloud.AdvisoryNotifications.V1; | ||
|
||
public sealed partial class GeneratedAdvisoryNotificationsServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for GetSettings</summary> | ||
/// <remarks> | ||
/// This snippet has been automatically generated and should be regarded as a code template only. | ||
/// It will require modifications to work: | ||
/// - It may require correct/in-range values for request initialization. | ||
/// - It may require specifying regional endpoints when creating the service client as shown in | ||
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. | ||
/// </remarks> | ||
public void GetSettings() | ||
{ | ||
// Create client | ||
AdvisoryNotificationsServiceClient advisoryNotificationsServiceClient = AdvisoryNotificationsServiceClient.Create(); | ||
// Initialize request argument(s) | ||
string name = "organizations/[ORGANIZATION]/locations/[LOCATION]/settings"; | ||
// Make the request | ||
Settings response = advisoryNotificationsServiceClient.GetSettings(name); | ||
} | ||
} | ||
// [END advisorynotifications_v1_generated_AdvisoryNotificationsService_GetSettings_sync_flattened] | ||
} |
44 changes: 44 additions & 0 deletions
44
...s.V1.GeneratedSnippets/AdvisoryNotificationsServiceClient.UpdateSettingsAsyncSnippet.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// Copyright 2023 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated code. DO NOT EDIT! | ||
|
||
namespace GoogleCSharpSnippets | ||
{ | ||
// [START advisorynotifications_v1_generated_AdvisoryNotificationsService_UpdateSettings_async_flattened] | ||
using Google.Cloud.AdvisoryNotifications.V1; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedAdvisoryNotificationsServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for UpdateSettingsAsync</summary> | ||
/// <remarks> | ||
/// This snippet has been automatically generated and should be regarded as a code template only. | ||
/// It will require modifications to work: | ||
/// - It may require correct/in-range values for request initialization. | ||
/// - It may require specifying regional endpoints when creating the service client as shown in | ||
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. | ||
/// </remarks> | ||
public async Task UpdateSettingsAsync() | ||
{ | ||
// Create client | ||
AdvisoryNotificationsServiceClient advisoryNotificationsServiceClient = await AdvisoryNotificationsServiceClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
Settings settings = new Settings(); | ||
// Make the request | ||
Settings response = await advisoryNotificationsServiceClient.UpdateSettingsAsync(settings); | ||
} | ||
} | ||
// [END advisorynotifications_v1_generated_AdvisoryNotificationsService_UpdateSettings_async_flattened] | ||
} |
47 changes: 47 additions & 0 deletions
47
...dSnippets/AdvisoryNotificationsServiceClient.UpdateSettingsRequestObjectAsyncSnippet.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// Copyright 2023 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated code. DO NOT EDIT! | ||
|
||
namespace GoogleCSharpSnippets | ||
{ | ||
// [START advisorynotifications_v1_generated_AdvisoryNotificationsService_UpdateSettings_async] | ||
using Google.Cloud.AdvisoryNotifications.V1; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedAdvisoryNotificationsServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for UpdateSettingsAsync</summary> | ||
/// <remarks> | ||
/// This snippet has been automatically generated and should be regarded as a code template only. | ||
/// It will require modifications to work: | ||
/// - It may require correct/in-range values for request initialization. | ||
/// - It may require specifying regional endpoints when creating the service client as shown in | ||
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. | ||
/// </remarks> | ||
public async Task UpdateSettingsRequestObjectAsync() | ||
{ | ||
// Create client | ||
AdvisoryNotificationsServiceClient advisoryNotificationsServiceClient = await AdvisoryNotificationsServiceClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
UpdateSettingsRequest request = new UpdateSettingsRequest | ||
{ | ||
Settings = new Settings(), | ||
}; | ||
// Make the request | ||
Settings response = await advisoryNotificationsServiceClient.UpdateSettingsAsync(request); | ||
} | ||
} | ||
// [END advisorynotifications_v1_generated_AdvisoryNotificationsService_UpdateSettings_async] | ||
} |
Oops, something went wrong.