-
Notifications
You must be signed in to change notification settings - Fork 371
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PiperOrigin-RevId: 714842212 Source-Link: googleapis/googleapis@51b75ed Source-Link: googleapis/googleapis-gen@2689f70 Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuQUlQbGF0Zm9ybS5WMS8uT3dsQm90LnlhbWwiLCJoIjoiMjY4OWY3MGQyYmRhMThmMjI2YTdlZGU2NDgzZGUxMTk2N2U4MTE1NCJ9
- Loading branch information
1 parent
31f0b69
commit 9997d14
Showing
45 changed files
with
8,444 additions
and
114 deletions.
There are no files selected for viewing
45 changes: 45 additions & 0 deletions
45
...latform.V1.GeneratedSnippets/GenAiCacheServiceClient.CreateCachedContentAsyncSnippet.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,45 @@ | ||
// Copyright 2025 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 aiplatform_v1_generated_GenAiCacheService_CreateCachedContent_async_flattened] | ||
using Google.Cloud.AIPlatform.V1; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedGenAiCacheServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for CreateCachedContentAsync</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 CreateCachedContentAsync() | ||
{ | ||
// Create client | ||
GenAiCacheServiceClient genAiCacheServiceClient = await GenAiCacheServiceClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
string parent = "projects/[PROJECT]/locations/[LOCATION]"; | ||
CachedContent cachedContent = new CachedContent(); | ||
// Make the request | ||
CachedContent response = await genAiCacheServiceClient.CreateCachedContentAsync(parent, cachedContent); | ||
} | ||
} | ||
// [END aiplatform_v1_generated_GenAiCacheService_CreateCachedContent_async_flattened] | ||
} |
49 changes: 49 additions & 0 deletions
49
...neratedSnippets/GenAiCacheServiceClient.CreateCachedContentRequestObjectAsyncSnippet.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,49 @@ | ||
// Copyright 2025 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 aiplatform_v1_generated_GenAiCacheService_CreateCachedContent_async] | ||
using Google.Api.Gax.ResourceNames; | ||
using Google.Cloud.AIPlatform.V1; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedGenAiCacheServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for CreateCachedContentAsync</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 CreateCachedContentRequestObjectAsync() | ||
{ | ||
// Create client | ||
GenAiCacheServiceClient genAiCacheServiceClient = await GenAiCacheServiceClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
CreateCachedContentRequest request = new CreateCachedContentRequest | ||
{ | ||
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"), | ||
CachedContent = new CachedContent(), | ||
}; | ||
// Make the request | ||
CachedContent response = await genAiCacheServiceClient.CreateCachedContentAsync(request); | ||
} | ||
} | ||
// [END aiplatform_v1_generated_GenAiCacheService_CreateCachedContent_async] | ||
} |
48 changes: 48 additions & 0 deletions
48
...V1.GeneratedSnippets/GenAiCacheServiceClient.CreateCachedContentRequestObjectSnippet.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,48 @@ | ||
// Copyright 2025 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 aiplatform_v1_generated_GenAiCacheService_CreateCachedContent_sync] | ||
using Google.Api.Gax.ResourceNames; | ||
using Google.Cloud.AIPlatform.V1; | ||
|
||
public sealed partial class GeneratedGenAiCacheServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for CreateCachedContent</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 CreateCachedContentRequestObject() | ||
{ | ||
// Create client | ||
GenAiCacheServiceClient genAiCacheServiceClient = GenAiCacheServiceClient.Create(); | ||
// Initialize request argument(s) | ||
CreateCachedContentRequest request = new CreateCachedContentRequest | ||
{ | ||
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"), | ||
CachedContent = new CachedContent(), | ||
}; | ||
// Make the request | ||
CachedContent response = genAiCacheServiceClient.CreateCachedContent(request); | ||
} | ||
} | ||
// [END aiplatform_v1_generated_GenAiCacheService_CreateCachedContent_sync] | ||
} |
46 changes: 46 additions & 0 deletions
46
...neratedSnippets/GenAiCacheServiceClient.CreateCachedContentResourceNamesAsyncSnippet.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 2025 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 aiplatform_v1_generated_GenAiCacheService_CreateCachedContent_async_flattened_resourceNames] | ||
using Google.Api.Gax.ResourceNames; | ||
using Google.Cloud.AIPlatform.V1; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedGenAiCacheServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for CreateCachedContentAsync</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 CreateCachedContentResourceNamesAsync() | ||
{ | ||
// Create client | ||
GenAiCacheServiceClient genAiCacheServiceClient = await GenAiCacheServiceClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"); | ||
CachedContent cachedContent = new CachedContent(); | ||
// Make the request | ||
CachedContent response = await genAiCacheServiceClient.CreateCachedContentAsync(parent, cachedContent); | ||
} | ||
} | ||
// [END aiplatform_v1_generated_GenAiCacheService_CreateCachedContent_async_flattened_resourceNames] | ||
} |
45 changes: 45 additions & 0 deletions
45
...V1.GeneratedSnippets/GenAiCacheServiceClient.CreateCachedContentResourceNamesSnippet.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,45 @@ | ||
// Copyright 2025 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 aiplatform_v1_generated_GenAiCacheService_CreateCachedContent_sync_flattened_resourceNames] | ||
using Google.Api.Gax.ResourceNames; | ||
using Google.Cloud.AIPlatform.V1; | ||
|
||
public sealed partial class GeneratedGenAiCacheServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for CreateCachedContent</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 CreateCachedContentResourceNames() | ||
{ | ||
// Create client | ||
GenAiCacheServiceClient genAiCacheServiceClient = GenAiCacheServiceClient.Create(); | ||
// Initialize request argument(s) | ||
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"); | ||
CachedContent cachedContent = new CachedContent(); | ||
// Make the request | ||
CachedContent response = genAiCacheServiceClient.CreateCachedContent(parent, cachedContent); | ||
} | ||
} | ||
// [END aiplatform_v1_generated_GenAiCacheService_CreateCachedContent_sync_flattened_resourceNames] | ||
} |
44 changes: 44 additions & 0 deletions
44
...d.AIPlatform.V1.GeneratedSnippets/GenAiCacheServiceClient.CreateCachedContentSnippet.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 2025 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 aiplatform_v1_generated_GenAiCacheService_CreateCachedContent_sync_flattened] | ||
using Google.Cloud.AIPlatform.V1; | ||
|
||
public sealed partial class GeneratedGenAiCacheServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for CreateCachedContent</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 CreateCachedContent() | ||
{ | ||
// Create client | ||
GenAiCacheServiceClient genAiCacheServiceClient = GenAiCacheServiceClient.Create(); | ||
// Initialize request argument(s) | ||
string parent = "projects/[PROJECT]/locations/[LOCATION]"; | ||
CachedContent cachedContent = new CachedContent(); | ||
// Make the request | ||
CachedContent response = genAiCacheServiceClient.CreateCachedContent(parent, cachedContent); | ||
} | ||
} | ||
// [END aiplatform_v1_generated_GenAiCacheService_CreateCachedContent_sync_flattened] | ||
} |
44 changes: 44 additions & 0 deletions
44
...latform.V1.GeneratedSnippets/GenAiCacheServiceClient.DeleteCachedContentAsyncSnippet.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 2025 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 aiplatform_v1_generated_GenAiCacheService_DeleteCachedContent_async_flattened] | ||
using Google.Cloud.AIPlatform.V1; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedGenAiCacheServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for DeleteCachedContentAsync</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 DeleteCachedContentAsync() | ||
{ | ||
// Create client | ||
GenAiCacheServiceClient genAiCacheServiceClient = await GenAiCacheServiceClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
string name = "projects/[PROJECT]/locations/[LOCATION]/cachedContents/[CACHED_CONTENT]"; | ||
// Make the request | ||
await genAiCacheServiceClient.DeleteCachedContentAsync(name); | ||
} | ||
} | ||
// [END aiplatform_v1_generated_GenAiCacheService_DeleteCachedContent_async_flattened] | ||
} |
47 changes: 47 additions & 0 deletions
47
...neratedSnippets/GenAiCacheServiceClient.DeleteCachedContentRequestObjectAsyncSnippet.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 2025 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 aiplatform_v1_generated_GenAiCacheService_DeleteCachedContent_async] | ||
using Google.Cloud.AIPlatform.V1; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedGenAiCacheServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for DeleteCachedContentAsync</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 DeleteCachedContentRequestObjectAsync() | ||
{ | ||
// Create client | ||
GenAiCacheServiceClient genAiCacheServiceClient = await GenAiCacheServiceClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
DeleteCachedContentRequest request = new DeleteCachedContentRequest | ||
{ | ||
CachedContentName = CachedContentName.FromProjectLocationCachedContent("[PROJECT]", "[LOCATION]", "[CACHED_CONTENT]"), | ||
}; | ||
// Make the request | ||
await genAiCacheServiceClient.DeleteCachedContentAsync(request); | ||
} | ||
} | ||
// [END aiplatform_v1_generated_GenAiCacheService_DeleteCachedContent_async] | ||
} |
Oops, something went wrong.