-
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: Update Logging API with latest changes
PiperOrigin-RevId: 429289471 Source-Link: googleapis/googleapis@acd5f89 Source-Link: googleapis/googleapis-gen@8a12622 Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuTG9nZ2luZy5WMi8uT3dsQm90LnlhbWwiLCJoIjoiOGExMjYyMjUzNmFlMmU5YTg5NzgxOThhMTUxZTg5MjM0YjgzOWIyMCJ9
- Loading branch information
1 parent
b29bee2
commit 644279c
Showing
31 changed files
with
7,230 additions
and
1,551 deletions.
There are no files selected for viewing
63 changes: 63 additions & 0 deletions
63
...g.V2.GeneratedSnippets/ConfigServiceV2Client.CopyLogEntriesRequestObjectAsyncSnippet.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,63 @@ | ||
// Copyright 2022 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 Google.Cloud.Logging.V2.Snippets | ||
{ | ||
// [START logging_v2_generated_ConfigServiceV2_CopyLogEntries_async] | ||
using Google.Cloud.Logging.V2; | ||
using Google.LongRunning; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedConfigServiceV2ClientSnippets | ||
{ | ||
/// <summary>Snippet for CopyLogEntriesAsync</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 CopyLogEntriesRequestObjectAsync() | ||
{ | ||
// Create client | ||
ConfigServiceV2Client configServiceV2Client = await ConfigServiceV2Client.CreateAsync(); | ||
// Initialize request argument(s) | ||
CopyLogEntriesRequest request = new CopyLogEntriesRequest | ||
{ | ||
Name = "", | ||
Filter = "", | ||
Destination = "", | ||
}; | ||
// Make the request | ||
Operation<CopyLogEntriesResponse, CopyLogEntriesMetadata> response = await configServiceV2Client.CopyLogEntriesAsync(request); | ||
|
||
// Poll until the returned long-running operation is complete | ||
Operation<CopyLogEntriesResponse, CopyLogEntriesMetadata> completedResponse = await response.PollUntilCompletedAsync(); | ||
// Retrieve the operation result | ||
CopyLogEntriesResponse 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<CopyLogEntriesResponse, CopyLogEntriesMetadata> retrievedResponse = await configServiceV2Client.PollOnceCopyLogEntriesAsync(operationName); | ||
// Check if the retrieved long-running operation has completed | ||
if (retrievedResponse.IsCompleted) | ||
{ | ||
// If it has completed, then access the result | ||
CopyLogEntriesResponse retrievedResult = retrievedResponse.Result; | ||
} | ||
} | ||
} | ||
// [END logging_v2_generated_ConfigServiceV2_CopyLogEntries_async] | ||
} |
62 changes: 62 additions & 0 deletions
62
...ogging.V2.GeneratedSnippets/ConfigServiceV2Client.CopyLogEntriesRequestObjectSnippet.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,62 @@ | ||
// Copyright 2022 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 Google.Cloud.Logging.V2.Snippets | ||
{ | ||
// [START logging_v2_generated_ConfigServiceV2_CopyLogEntries_sync] | ||
using Google.Cloud.Logging.V2; | ||
using Google.LongRunning; | ||
|
||
public sealed partial class GeneratedConfigServiceV2ClientSnippets | ||
{ | ||
/// <summary>Snippet for CopyLogEntries</summary> | ||
/// <remarks> | ||
/// This snippet has been automatically generated for illustrative purposes only. | ||
/// It may require modifications to work in your environment. | ||
/// </remarks> | ||
public void CopyLogEntriesRequestObject() | ||
{ | ||
// Create client | ||
ConfigServiceV2Client configServiceV2Client = ConfigServiceV2Client.Create(); | ||
// Initialize request argument(s) | ||
CopyLogEntriesRequest request = new CopyLogEntriesRequest | ||
{ | ||
Name = "", | ||
Filter = "", | ||
Destination = "", | ||
}; | ||
// Make the request | ||
Operation<CopyLogEntriesResponse, CopyLogEntriesMetadata> response = configServiceV2Client.CopyLogEntries(request); | ||
|
||
// Poll until the returned long-running operation is complete | ||
Operation<CopyLogEntriesResponse, CopyLogEntriesMetadata> completedResponse = response.PollUntilCompleted(); | ||
// Retrieve the operation result | ||
CopyLogEntriesResponse 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<CopyLogEntriesResponse, CopyLogEntriesMetadata> retrievedResponse = configServiceV2Client.PollOnceCopyLogEntries(operationName); | ||
// Check if the retrieved long-running operation has completed | ||
if (retrievedResponse.IsCompleted) | ||
{ | ||
// If it has completed, then access the result | ||
CopyLogEntriesResponse retrievedResult = retrievedResponse.Result; | ||
} | ||
} | ||
} | ||
// [END logging_v2_generated_ConfigServiceV2_CopyLogEntries_sync] | ||
} |
41 changes: 41 additions & 0 deletions
41
...gle.Cloud.Logging.V2.GeneratedSnippets/ConfigServiceV2Client.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,41 @@ | ||
// Copyright 2022 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 Google.Cloud.Logging.V2.Snippets | ||
{ | ||
// [START logging_v2_generated_ConfigServiceV2_GetSettings_async_flattened] | ||
using Google.Cloud.Logging.V2; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedConfigServiceV2ClientSnippets | ||
{ | ||
/// <summary>Snippet for GetSettingsAsync</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 GetSettingsAsync() | ||
{ | ||
// Create client | ||
ConfigServiceV2Client configServiceV2Client = await ConfigServiceV2Client.CreateAsync(); | ||
// Initialize request argument(s) | ||
string name = "projects/[PROJECT]/settings"; | ||
// Make the request | ||
Settings response = await configServiceV2Client.GetSettingsAsync(name); | ||
} | ||
} | ||
// [END logging_v2_generated_ConfigServiceV2_GetSettings_async_flattened] | ||
} |
44 changes: 44 additions & 0 deletions
44
...ging.V2.GeneratedSnippets/ConfigServiceV2Client.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,44 @@ | ||
// Copyright 2022 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 Google.Cloud.Logging.V2.Snippets | ||
{ | ||
// [START logging_v2_generated_ConfigServiceV2_GetSettings_async] | ||
using Google.Cloud.Logging.V2; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedConfigServiceV2ClientSnippets | ||
{ | ||
/// <summary>Snippet for GetSettingsAsync</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 GetSettingsRequestObjectAsync() | ||
{ | ||
// Create client | ||
ConfigServiceV2Client configServiceV2Client = await ConfigServiceV2Client.CreateAsync(); | ||
// Initialize request argument(s) | ||
GetSettingsRequest request = new GetSettingsRequest | ||
{ | ||
SettingsName = SettingsName.FromProject("[PROJECT]"), | ||
}; | ||
// Make the request | ||
Settings response = await configServiceV2Client.GetSettingsAsync(request); | ||
} | ||
} | ||
// [END logging_v2_generated_ConfigServiceV2_GetSettings_async] | ||
} |
43 changes: 43 additions & 0 deletions
43
...d.Logging.V2.GeneratedSnippets/ConfigServiceV2Client.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,43 @@ | ||
// Copyright 2022 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 Google.Cloud.Logging.V2.Snippets | ||
{ | ||
// [START logging_v2_generated_ConfigServiceV2_GetSettings_sync] | ||
using Google.Cloud.Logging.V2; | ||
|
||
public sealed partial class GeneratedConfigServiceV2ClientSnippets | ||
{ | ||
/// <summary>Snippet for GetSettings</summary> | ||
/// <remarks> | ||
/// This snippet has been automatically generated for illustrative purposes only. | ||
/// It may require modifications to work in your environment. | ||
/// </remarks> | ||
public void GetSettingsRequestObject() | ||
{ | ||
// Create client | ||
ConfigServiceV2Client configServiceV2Client = ConfigServiceV2Client.Create(); | ||
// Initialize request argument(s) | ||
GetSettingsRequest request = new GetSettingsRequest | ||
{ | ||
SettingsName = SettingsName.FromProject("[PROJECT]"), | ||
}; | ||
// Make the request | ||
Settings response = configServiceV2Client.GetSettings(request); | ||
} | ||
} | ||
// [END logging_v2_generated_ConfigServiceV2_GetSettings_sync] | ||
} |
41 changes: 41 additions & 0 deletions
41
...ging.V2.GeneratedSnippets/ConfigServiceV2Client.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,41 @@ | ||
// Copyright 2022 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 Google.Cloud.Logging.V2.Snippets | ||
{ | ||
// [START logging_v2_generated_ConfigServiceV2_GetSettings_async_flattened_resourceNames] | ||
using Google.Cloud.Logging.V2; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedConfigServiceV2ClientSnippets | ||
{ | ||
/// <summary>Snippet for GetSettingsAsync</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 GetSettingsResourceNamesAsync() | ||
{ | ||
// Create client | ||
ConfigServiceV2Client configServiceV2Client = await ConfigServiceV2Client.CreateAsync(); | ||
// Initialize request argument(s) | ||
SettingsName name = SettingsName.FromProject("[PROJECT]"); | ||
// Make the request | ||
Settings response = await configServiceV2Client.GetSettingsAsync(name); | ||
} | ||
} | ||
// [END logging_v2_generated_ConfigServiceV2_GetSettings_async_flattened_resourceNames] | ||
} |
40 changes: 40 additions & 0 deletions
40
...d.Logging.V2.GeneratedSnippets/ConfigServiceV2Client.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,40 @@ | ||
// Copyright 2022 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 Google.Cloud.Logging.V2.Snippets | ||
{ | ||
// [START logging_v2_generated_ConfigServiceV2_GetSettings_sync_flattened_resourceNames] | ||
using Google.Cloud.Logging.V2; | ||
|
||
public sealed partial class GeneratedConfigServiceV2ClientSnippets | ||
{ | ||
/// <summary>Snippet for GetSettings</summary> | ||
/// <remarks> | ||
/// This snippet has been automatically generated for illustrative purposes only. | ||
/// It may require modifications to work in your environment. | ||
/// </remarks> | ||
public void GetSettingsResourceNames() | ||
{ | ||
// Create client | ||
ConfigServiceV2Client configServiceV2Client = ConfigServiceV2Client.Create(); | ||
// Initialize request argument(s) | ||
SettingsName name = SettingsName.FromProject("[PROJECT]"); | ||
// Make the request | ||
Settings response = configServiceV2Client.GetSettings(name); | ||
} | ||
} | ||
// [END logging_v2_generated_ConfigServiceV2_GetSettings_sync_flattened_resourceNames] | ||
} |
40 changes: 40 additions & 0 deletions
40
...2/Google.Cloud.Logging.V2.GeneratedSnippets/ConfigServiceV2Client.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,40 @@ | ||
// Copyright 2022 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 Google.Cloud.Logging.V2.Snippets | ||
{ | ||
// [START logging_v2_generated_ConfigServiceV2_GetSettings_sync_flattened] | ||
using Google.Cloud.Logging.V2; | ||
|
||
public sealed partial class GeneratedConfigServiceV2ClientSnippets | ||
{ | ||
/// <summary>Snippet for GetSettings</summary> | ||
/// <remarks> | ||
/// This snippet has been automatically generated for illustrative purposes only. | ||
/// It may require modifications to work in your environment. | ||
/// </remarks> | ||
public void GetSettings() | ||
{ | ||
// Create client | ||
ConfigServiceV2Client configServiceV2Client = ConfigServiceV2Client.Create(); | ||
// Initialize request argument(s) | ||
string name = "projects/[PROJECT]/settings"; | ||
// Make the request | ||
Settings response = configServiceV2Client.GetSettings(name); | ||
} | ||
} | ||
// [END logging_v2_generated_ConfigServiceV2_GetSettings_sync_flattened] | ||
} |
Oops, something went wrong.